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 95.7.17+g4208276+chromium-95.0.4638.69 and it 11 uses UTF-16 strings. 12 13 Then to install the cef put in the Resources in the RElease directory and 14 copy the locales to /opt/cef/Resources/Locales 15 16 You can download compatible builds from https://cef-builds.spotifycdn.com/index.html 17 just make sure to put in the version filter and check "all builds" to match it. 18 19 You do NOT actually need the cef to build the application, but it must be 20 on the user's machine to run it. It looks in /opt/cef/ on Linux. 21 22 Work in progress. DO NOT USE YET as I am prolly gonna break everything too. 23 24 On Windows, you need to distribute the WebView2Loader.dll with your exe. That 25 is found in the web view 2 sdk. Furthermore, users will have to install the runtime. 26 27 Please note; the Microsoft terms and conditions say they may be able to collect 28 information about your users if you use this on Windows. 29 see: https://developer.microsoft.com/en-us/microsoft-edge/webview2/ 30 31 32 +/ 33 module arsd.webview; 34 35 enum WebviewEngine { 36 none, 37 cef, 38 wv2, 39 webkit_gtk 40 } 41 // see activeEngine which is an enum you can static if on 42 43 44 // I might recover this gtk thing but i don't like gtk 45 // dmdi webview -version=linux_gtk -version=Demo 46 47 // the setup link for Microsoft: 48 // https://go.microsoft.com/fwlink/p/?LinkId=2124703 49 50 51 version(Windows) { 52 import arsd.simpledisplay; 53 import arsd.com; 54 import core.atomic; 55 56 //import std.stdio; 57 58 T callback(T)(typeof(&T.init.Invoke) dg) { 59 return new class T { 60 extern(Windows): 61 62 static if(is(typeof(T.init.Invoke) R == return)) 63 static if(is(typeof(T.init.Invoke) P == __parameters)) 64 override R Invoke(P _args_) { 65 return dg(_args_); 66 } 67 68 override HRESULT QueryInterface(const (IID)*riid, LPVOID *ppv) { 69 if (IID_IUnknown == *riid) { 70 *ppv = cast(void*) cast(IUnknown) this; 71 } 72 else if (T.iid == *riid) { 73 *ppv = cast(void*) cast(T) this; 74 } 75 else { 76 *ppv = null; 77 return E_NOINTERFACE; 78 } 79 80 AddRef(); 81 return NOERROR; 82 } 83 84 shared LONG count = 0; 85 ULONG AddRef() { 86 return atomicOp!"+="(count, 1); 87 } 88 ULONG Release() { 89 return atomicOp!"-="(count, 1); 90 } 91 }; 92 } 93 94 enum activeEngine = WebviewEngine.wv2; 95 96 struct RC(T) { 97 private T object; 98 this(T t) { 99 object = t; 100 object.AddRef(); 101 } 102 this(this) { 103 if(object is null) return; 104 object.AddRef(); 105 } 106 ~this() { 107 if(object is null) return; 108 object.Release(); 109 object = null; 110 } 111 112 bool opCast(T:bool)() nothrow { 113 return inner !is null; 114 } 115 116 void opAssign(T obj) { 117 obj.AddRef(); 118 if(object) 119 object.Release(); 120 this.object = obj; 121 } 122 123 T raw() { return object; } 124 125 T returnable() { 126 if(object is null) return null; 127 return object; 128 } 129 130 T passable() { 131 if(object is null) return null; 132 object.AddRef(); 133 return object; 134 } 135 136 static foreach(memberName; __traits(derivedMembers, T)) { 137 mixin ForwardMethod!(memberName); 138 } 139 } 140 141 extern(Windows) 142 alias StringMethod = int delegate(wchar**); 143 144 string toGC(scope StringMethod dg) { 145 wchar* t; 146 auto res = dg(&t); 147 if(res != S_OK) 148 throw new ComException(res); 149 150 auto ot = t; 151 152 string s; 153 154 // FIXME: encode properly in UTF-8 155 while(*t) { 156 s ~= *t; 157 t++; 158 } 159 160 auto ret = s; 161 162 CoTaskMemFree(ot); 163 164 return ret; 165 } 166 167 class ComException : Exception { 168 HRESULT errorCode; 169 this(HRESULT errorCode) { 170 import std.format; 171 super(format("HRESULT: 0x%08x", errorCode)); 172 // FIXME: call FormatMessage 173 } 174 } 175 176 mixin template ForwardMethod(string methodName) { 177 static if(methodName.length > 4 && methodName[0 .. 4] == "put_") { 178 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 179 private alias Type = Params[0]; 180 mixin(q{ @property void } ~ memberName[4 .. $] ~ q{(Type v) { 181 auto errorCode = __traits(getMember, object, memberName)(v); 182 if(errorCode) 183 throw new ComException(errorCode); 184 } 185 }); 186 } else 187 static if(methodName.length > 4 && methodName[0 .. 4] == "get_") { 188 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 189 private alias Type = typeof(*(Params[0].init)); 190 mixin(q{ @property Type } ~ memberName[4 .. $] ~ q{() { 191 Type response; 192 auto errorCode = __traits(getMember, object, memberName)(&response); 193 if(errorCode) 194 throw new ComException(errorCode); 195 return response; 196 } 197 }); 198 } else 199 static if(methodName.length > 4 && methodName[0 .. 4] == "add_") { 200 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 201 alias Handler = Params[0]; 202 alias HandlerDg = typeof(&Handler.init.Invoke); 203 mixin(q{ EventRegistrationToken } ~ memberName ~ q{ (HandlerDg handler) { 204 EventRegistrationToken token; 205 __traits(getMember, object, memberName)(callback!Handler(handler), &token); 206 return token; 207 }}); 208 } else 209 static if(methodName.length > 7 && methodName[0 .. 4] == "remove_") { 210 mixin(q{ void } ~ memberName ~ q{ (EventRegistrationToken token) { 211 __traits(getMember, object, memberName)(token); 212 }}); 213 } else { 214 // I could do the return value things by looking for these comments: 215 // /+[out]+/ but be warned it is possible or a thing to have multiple out params (only one such function in here though i think) 216 // /+[out, retval]+/ 217 // a find/replace could make them a UDA or something. 218 219 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 220 static if(is(typeof(__traits(getMember, T, memberName)) Return == return)) 221 222 mixin(q{ Return } ~ memberName ~ q{ (Params p) { 223 // FIXME: check the return value and throw 224 return __traits(getMember, object, memberName)(p); 225 } 226 }); 227 228 } 229 } 230 231 struct Wv2App { 232 static bool active = false; 233 234 static HRESULT code; 235 static bool initialized = false; 236 static RC!ICoreWebView2Environment webview_env; 237 238 @disable this(this); 239 240 static void delegate(RC!ICoreWebView2Environment)[] pending; 241 this(void delegate(RC!ICoreWebView2Environment) withEnvironment) { 242 if(withEnvironment) 243 pending ~= withEnvironment; 244 245 import core.sys.windows.com; 246 CoInitializeEx(null, COINIT_APARTMENTTHREADED); 247 248 active = true; 249 250 auto lib = LoadLibraryW("WebView2Loader.dll"w.ptr); 251 typeof(&CreateCoreWebView2EnvironmentWithOptions) func; 252 253 if(lib is null) 254 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."); 255 func = cast(typeof(func)) GetProcAddress(lib, CreateCoreWebView2EnvironmentWithOptions.mangleof); 256 if(func is null) 257 throw new Exception("CreateCoreWebView2EnvironmentWithOptions failed from WebView2Loader..."); 258 259 auto result = func(null, null, null, 260 callback!(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler)( 261 delegate(error, env) { 262 initialized = true; 263 code = error; 264 265 if(error) 266 return error; 267 268 webview_env = env; 269 270 auto len = pending.length; 271 foreach(item; pending) { 272 item(webview_env); 273 } 274 275 pending = pending[len .. $]; 276 277 return S_OK; 278 } 279 ) 280 ); 281 282 if(result != S_OK) { 283 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) { 284 import std.process; 285 browse("https://go.microsoft.com/fwlink/p/?LinkId=2124703"); 286 } 287 throw new ComException(result); 288 } 289 } 290 291 @disable this(); 292 293 ~this() { 294 active = false; 295 } 296 297 static void useEnvironment(void delegate(RC!ICoreWebView2Environment) withEnvironment) { 298 assert(active); 299 assert(withEnvironment !is null); 300 if(initialized) { 301 if(code) 302 throw new ComException(code); 303 withEnvironment(webview_env); 304 } else 305 pending ~= withEnvironment; 306 } 307 } 308 } 309 310 311 312 /+ 313 interface WebView { 314 void refresh(); 315 void back(); 316 void forward(); 317 void stop(); 318 319 void navigate(string url); 320 321 // the url and line are for error reporting purposes 322 void executeJavascript(string code, string url = null, int line = 0); 323 324 void showDevTools(); 325 326 // these are get/set properties that you can subscribe to with some system 327 328 mixin Observable!(string, "title"); 329 mixin Observable!(string, "url"); 330 mixin Observable!(string, "status"); 331 mixin Observable!(int, "loadingProgress"); 332 } 333 +/ 334 335 336 version(linux) { 337 version(linux_gtk) {} else 338 version=cef; 339 } 340 341 342 version(cef) { 343 import arsd.simpledisplay; 344 345 //pragma(lib, "cef"); 346 347 class BrowserProcessHandler : CEF!cef_browser_process_handler_t { 348 override void on_context_initialized() { } 349 350 override void on_before_child_process_launch(RC!cef_command_line_t) { } 351 override void on_schedule_message_pump_work(long delayMs) { } 352 override cef_client_t* get_default_client() { return null; } 353 } 354 355 356 int cefProcessHelper() { 357 import core.runtime; 358 import core.stdc.stdlib; 359 360 cef_main_args_t main_args; 361 version(linux) { 362 main_args.argc = Runtime.cArgs.argc; 363 main_args.argv = Runtime.cArgs.argv; 364 } else version(Windows) { 365 main_args.instance = GetModuleHandle(null); 366 } 367 368 if(libcef.loadDynamicLibrary()) { 369 int code = libcef.execute_process(&main_args, null, null); 370 if(code >= 0) 371 exit(code); 372 return code; 373 } 374 return -1; 375 } 376 377 shared static this() { 378 cefProcessHelper(); 379 } 380 381 public struct CefApp { 382 static bool active() { 383 return count > 0; 384 } 385 386 private __gshared int count = 0; 387 388 @disable this(this); 389 @disable new(); 390 this(void delegate(cef_settings_t* settings) setSettings) { 391 392 if(!libcef.loadDynamicLibrary()) 393 throw new Exception("failed to load cef dll"); 394 395 count++; 396 397 import core.runtime; 398 import core.stdc.stdlib; 399 400 cef_main_args_t main_args; 401 version(linux) { 402 main_args.argc = Runtime.cArgs.argc; 403 main_args.argv = Runtime.cArgs.argv; 404 } else version(Windows) { 405 main_args.instance = GetModuleHandle(null); 406 } 407 408 cef_settings_t settings; 409 settings.size = cef_settings_t.sizeof; 410 //settings.log_severity = cef_log_severity_t.LOGSEVERITY_DISABLE; // Show only warnings/errors 411 settings.log_severity = cef_log_severity_t.LOGSEVERITY_INFO; // Show only warnings/errors 412 settings.multi_threaded_message_loop = 1; 413 settings.no_sandbox = 1; 414 415 version(linux) 416 settings.locales_dir_path = cef_string_t("/opt/cef/Resources/locales"); 417 418 if(setSettings !is null) 419 setSettings(&settings); 420 421 422 auto app = new class CEF!cef_app_t { 423 BrowserProcessHandler bph; 424 this() { 425 bph = new BrowserProcessHandler(); 426 } 427 override void on_before_command_line_processing(const(cef_string_t)*, RC!cef_command_line_t) {} 428 429 override cef_resource_bundle_handler_t* get_resource_bundle_handler() { 430 return null; 431 } 432 override cef_browser_process_handler_t* get_browser_process_handler() { 433 return bph.returnable; 434 } 435 override cef_render_process_handler_t* get_render_process_handler() { 436 return null; 437 } 438 override void on_register_custom_schemes(cef_scheme_registrar_t*) { 439 440 } 441 }; 442 443 if(!libcef.initialize(&main_args, &settings, app.passable, null)) { 444 throw new Exception("cef_initialize failed"); 445 } 446 } 447 448 ~this() { 449 count--; 450 // this call hangs and idk why. 451 // FIXME 452 //libcef.shutdown(); 453 } 454 } 455 456 457 version(Demo) 458 void main() { 459 auto app = CefApp(null); 460 461 auto window = new SimpleWindow(640, 480, "D Browser", Resizability.allowResizing); 462 flushGui; 463 464 cef_window_info_t window_info; 465 /* 466 window_info.x = 100; 467 window_info.y = 100; 468 window_info.width = 300; 469 window_info.height = 300; 470 */ 471 //window_info.parent_window = window.nativeWindowHandle; 472 473 cef_string_t cef_url = cef_string_t("http://dpldocs.info/");//"http://youtube.com/"w); 474 475 //string url = "http://arsdnet.net/"; 476 //cef_string_utf8_to_utf16(url.ptr, url.length, &cef_url); 477 478 cef_browser_settings_t browser_settings; 479 browser_settings.size = cef_browser_settings_t.sizeof; 480 481 auto client = new MyCefClient(); 482 483 auto got = libcef.browser_host_create_browser(&window_info, client.passable, &cef_url, &browser_settings, null, null); // or _sync 484 485 window.eventLoop(0); 486 } 487 488 489 /++ 490 This gives access to the CEF functions. If you get a linker error for using an undefined function, 491 it is probably because you did NOT go through this when dynamically loading. 492 493 (...similarly, if you get a segfault, it is probably because you DID go through this when static binding.) 494 +/ 495 struct libcef { 496 static __gshared: 497 498 bool isLoaded; 499 bool loadAttempted; 500 void* libHandle; 501 502 /// Make sure you call this only from one thread, probably at process startup. It caches internally and returns true if the load was successful. 503 bool loadDynamicLibrary() { 504 if(loadAttempted) 505 return isLoaded; 506 507 loadAttempted = true; 508 509 version(linux) { 510 import core.sys.posix.dlfcn; 511 libHandle = dlopen("libcef.so", RTLD_NOW); 512 513 static void* loadsym(const char* name) { 514 return dlsym(libHandle, name); 515 } 516 } else version(Windows) { 517 import core.sys.windows.windows; 518 libHandle = LoadLibrary("libcef.dll"); 519 520 static void* loadsym(const char* name) { 521 return GetProcAddress(libHandle, name); 522 } 523 } 524 525 //import std.stdio; 526 if(libHandle is null) { 527 //writeln("libhandlenull"); 528 return false; 529 } 530 foreach(memberName; __traits(allMembers, libcef)[4 .. $]) { // cutting off everything until the actual static foreach below; this trims off isLoaded to loadDynamicLibrary 531 alias mem = __traits(getMember, libcef, memberName); 532 mem = cast(typeof(mem)) loadsym("cef_" ~ memberName); 533 if(mem is null) { 534 // writeln(memberName); 535 // throw new Exception("cef_" ~ memberName ~ " failed to load"); 536 return false; 537 } 538 } 539 540 import core.stdc.string; 541 if(strcmp(libcef.api_hash(1), CEF_API_HASH_UNIVERSAL) != 0) 542 throw new Exception("libcef versions not matching bindings"); 543 544 isLoaded = true; 545 return true; 546 } 547 548 static foreach(memberName; __traits(allMembers, arsd.webview)) 549 static if(is(typeof(__traits(getMember, arsd.webview, memberName)) == function)) 550 static if(memberName.length > 4 && memberName[0 .. 4] == "cef_") { 551 mixin(q{ typeof(&__traits(getMember, arsd.webview, memberName)) } ~ memberName[4 .. $] ~ ";"); // = &" ~ memberName ~ ";"); 552 } 553 } 554 555 } 556 557 version(linux_gtk) 558 version(Demo) 559 void main() { 560 auto wv = new WebView(true, null); 561 wv.navigate("http://dpldocs.info/"); 562 wv.setTitle("omg a D webview"); 563 wv.setSize(500, 500, true); 564 wv.eval("console.log('just testing');"); 565 wv.run(); 566 } 567 568 version(linux_gtk) 569 enum activeEngine = WebviewEngine.webkit_gtk; 570 571 /++ 572 573 +/ 574 version(linux_gtk) 575 class WebView : browser_engine { 576 577 /++ 578 Creates a new webview instance. If dbg is non-zero - developer tools will 579 be enabled (if the platform supports them). Window parameter can be a 580 pointer to the native window handle. If it's non-null - then child WebView 581 is embedded into the given parent window. Otherwise a new window is created. 582 Depending on the platform, a GtkWindow, NSWindow or HWND pointer can be 583 passed here. 584 +/ 585 this(bool dbg, void* window) { 586 super(&on_message, dbg, window); 587 } 588 589 extern(C) 590 static void on_message(const char*) {} 591 592 /// Destroys a webview and closes the native window. 593 void destroy() { 594 595 } 596 597 /// Runs the main loop until it's terminated. After this function exits - you 598 /// must destroy the webview. 599 override void run() { super.run(); } 600 601 /// Stops the main loop. It is safe to call this function from another other 602 /// background thread. 603 override void terminate() { super.terminate(); } 604 605 /+ 606 /// Posts a function to be executed on the main thread. You normally do not need 607 /// to call this function, unless you want to tweak the native window. 608 void dispatch(void function(WebView w, void *arg) fn, void *arg) {} 609 +/ 610 611 /// Returns a native window handle pointer. When using GTK backend the pointer 612 /// is GtkWindow pointer, when using Cocoa backend the pointer is NSWindow 613 /// pointer, when using Win32 backend the pointer is HWND pointer. 614 void* getWindow() { return m_window; } 615 616 /// Updates the title of the native window. Must be called from the UI thread. 617 override void setTitle(const char *title) { super.setTitle(title); } 618 619 /// Navigates webview to the given URL. URL may be a data URI. 620 override void navigate(const char *url) { super.navigate(url); } 621 622 /// Injects JavaScript code at the initialization of the new page. Every time 623 /// the webview will open a the new page - this initialization code will be 624 /// executed. It is guaranteed that code is executed before window.onload. 625 override void init(const char *js) { super.init(js); } 626 627 /// Evaluates arbitrary JavaScript code. Evaluation happens asynchronously, also 628 /// the result of the expression is ignored. Use RPC bindings if you want to 629 /// receive notifications about the results of the evaluation. 630 override void eval(const char *js) { super.eval(js); } 631 632 /// Binds a native C callback so that it will appear under the given name as a 633 /// global JavaScript function. Internally it uses webview_init(). Callback 634 /// receives a request string and a user-provided argument pointer. Request 635 /// string is a JSON array of all the arguments passed to the JavaScript 636 /// function. 637 void bind(const char *name, void function(const char *, void *) fn, void *arg) {} 638 639 /// Allows to return a value from the native binding. Original request pointer 640 /// must be provided to help internal RPC engine match requests with responses. 641 /// If status is zero - result is expected to be a valid JSON result value. 642 /// If status is not zero - result is an error JSON object. 643 void webview_return(const char *req, int status, const char *result) {} 644 645 /* 646 void on_message(const char *msg) { 647 auto seq = json_parse(msg, "seq", 0); 648 auto name = json_parse(msg, "name", 0); 649 auto args = json_parse(msg, "args", 0); 650 auto fn = bindings[name]; 651 if (fn == null) { 652 return; 653 } 654 std::async(std::launch::async, [=]() { 655 auto result = (*fn)(args); 656 dispatch([=]() { 657 eval(("var b = window['" + name + "'];b['callbacks'][" + seq + "](" + 658 result + ");b['callbacks'][" + seq + 659 "] = undefined;b['errors'][" + seq + "] = undefined;") 660 .c_str()); 661 }); 662 }); 663 } 664 std::map<std::string, binding_t *> bindings; 665 666 alias binding_t = std::function<std::string(std::string)>; 667 668 void bind(const char *name, binding_t f) { 669 auto js = "(function() { var name = '" + std::string(name) + "';" + R"( 670 window[name] = function() { 671 var me = window[name]; 672 var errors = me['errors']; 673 var callbacks = me['callbacks']; 674 if (!callbacks) { 675 callbacks = {}; 676 me['callbacks'] = callbacks; 677 } 678 if (!errors) { 679 errors = {}; 680 me['errors'] = errors; 681 } 682 var seq = (me['lastSeq'] || 0) + 1; 683 me['lastSeq'] = seq; 684 var promise = new Promise(function(resolve, reject) { 685 callbacks[seq] = resolve; 686 errors[seq] = reject; 687 }); 688 window.external.invoke(JSON.stringify({ 689 name: name, 690 seq:seq, 691 args: Array.prototype.slice.call(arguments), 692 })); 693 return promise; 694 } 695 })())"; 696 init(js.c_str()); 697 bindings[name] = new binding_t(f); 698 } 699 700 */ 701 } 702 703 private extern(C) { 704 alias dispatch_fn_t = void function(); 705 alias msg_cb_t = void function(const char *msg); 706 } 707 708 version(linux_gtk) { 709 710 711 /* Original https://github.com/zserge/webview notice below: 712 * MIT License 713 * 714 * Copyright (c) 2017 Serge Zaitsev 715 * 716 * Permission is hereby granted, free of charge, to any person obtaining a copy 717 * of this software and associated documentation files (the "Software"), to deal 718 * in the Software without restriction, including without limitation the rights 719 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 720 * copies of the Software, and to permit persons to whom the Software is 721 * furnished to do so, subject to the following conditions: 722 * 723 * The above copyright notice and this permission notice shall be included in 724 * all copies or substantial portions of the Software. 725 * 726 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 727 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 728 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 729 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 730 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 731 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 732 * SOFTWARE. 733 */ 734 735 /* 736 Port to D by Adam D. Ruppe, November 30, 2019 737 */ 738 739 740 pragma(lib, "gtk-3"); 741 pragma(lib, "glib-2.0"); 742 pragma(lib, "gobject-2.0"); 743 pragma(lib, "webkit2gtk-4.0"); 744 pragma(lib, "javascriptcoregtk-4.0"); 745 746 private extern(C) { 747 import core.stdc.config; 748 alias GtkWidget = void; 749 enum GtkWindowType { 750 GTK_WINDOW_TOPLEVEL = 0 751 } 752 bool gtk_init_check(int*, char***); 753 GtkWidget* gtk_window_new(GtkWindowType); 754 c_ulong g_signal_connect_data(void*, const char*, void* /* function pointer!!! */, void*, void*, int); 755 GtkWidget* webkit_web_view_new(); 756 alias WebKitUserContentManager = void; 757 WebKitUserContentManager* webkit_web_view_get_user_content_manager(GtkWidget*); 758 759 void gtk_container_add(GtkWidget*, GtkWidget*); 760 void gtk_widget_grab_focus(GtkWidget*); 761 void gtk_widget_show_all(GtkWidget*); 762 void gtk_main(); 763 void gtk_main_quit(); 764 void webkit_web_view_load_uri(GtkWidget*, const char*); 765 alias WebKitSettings = void; 766 WebKitSettings* webkit_web_view_get_settings(GtkWidget*); 767 void webkit_settings_set_enable_write_console_messages_to_stdout(WebKitSettings*, bool); 768 void webkit_settings_set_enable_developer_extras(WebKitSettings*, bool); 769 void webkit_user_content_manager_register_script_message_handler(WebKitUserContentManager*, const char*); 770 alias JSCValue = void; 771 alias WebKitJavascriptResult = void; 772 JSCValue* webkit_javascript_result_get_js_value(WebKitJavascriptResult*); 773 char* jsc_value_to_string(JSCValue*); 774 void g_free(void*); 775 void webkit_web_view_run_javascript(GtkWidget*, const char*, void*, void*, void*); 776 alias WebKitUserScript = void; 777 void webkit_user_content_manager_add_script(WebKitUserContentManager*, WebKitUserScript*); 778 WebKitUserScript* webkit_user_script_new(const char*, WebKitUserContentInjectedFrames, WebKitUserScriptInjectionTime, const char*, const char*); 779 enum WebKitUserContentInjectedFrames { 780 WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES, 781 WEBKIT_USER_CONTENT_INJECT_TOP_FRAME 782 } 783 enum WebKitUserScriptInjectionTime { 784 WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START, 785 WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_END 786 } 787 void gtk_window_set_title(GtkWidget*, const char*); 788 789 void gtk_window_set_resizable(GtkWidget*, bool); 790 void gtk_window_set_default_size(GtkWidget*, int, int); 791 void gtk_widget_set_size_request(GtkWidget*, int, int); 792 } 793 794 private class browser_engine { 795 796 static extern(C) 797 void ondestroy (GtkWidget *w, void* arg) { 798 (cast(browser_engine) arg).terminate(); 799 } 800 801 static extern(C) 802 void smr(WebKitUserContentManager* m, WebKitJavascriptResult* r, void* arg) { 803 auto w = cast(browser_engine) arg; 804 JSCValue *value = webkit_javascript_result_get_js_value(r); 805 auto s = jsc_value_to_string(value); 806 w.m_cb(s); 807 g_free(s); 808 } 809 810 this(msg_cb_t cb, bool dbg, void* window) { 811 m_cb = cb; 812 813 gtk_init_check(null, null); 814 m_window = cast(GtkWidget*) window; 815 if (m_window == null) 816 m_window = gtk_window_new(GtkWindowType.GTK_WINDOW_TOPLEVEL); 817 818 g_signal_connect_data(m_window, "destroy", &ondestroy, cast(void*) this, null, 0); 819 820 m_webview = webkit_web_view_new(); 821 WebKitUserContentManager* manager = webkit_web_view_get_user_content_manager(m_webview); 822 823 g_signal_connect_data(manager, "script-message-received::external", &smr, cast(void*) this, null, 0); 824 webkit_user_content_manager_register_script_message_handler(manager, "external"); 825 init("window.external={invoke:function(s){window.webkit.messageHandlers.external.postMessage(s);}}"); 826 827 gtk_container_add(m_window, m_webview); 828 gtk_widget_grab_focus(m_webview); 829 830 if (dbg) { 831 WebKitSettings *settings = webkit_web_view_get_settings(m_webview); 832 webkit_settings_set_enable_write_console_messages_to_stdout(settings, true); 833 webkit_settings_set_enable_developer_extras(settings, true); 834 } 835 836 gtk_widget_show_all(m_window); 837 } 838 void run() { gtk_main(); } 839 void terminate() { gtk_main_quit(); } 840 841 void navigate(const char *url) { 842 webkit_web_view_load_uri(m_webview, url); 843 } 844 845 void setTitle(const char* title) { 846 gtk_window_set_title(m_window, title); 847 } 848 849 /+ 850 void dispatch(std::function<void()> f) { 851 g_idle_add_full(G_PRIORITY_HIGH_IDLE, (GSourceFunc)([](void *f) -> int { 852 (*static_cast<dispatch_fn_t *>(f))(); 853 return G_SOURCE_REMOVE; 854 }), 855 new std::function<void()>(f), 856 [](void *f) { delete static_cast<dispatch_fn_t *>(f); }); 857 } 858 +/ 859 860 void setSize(int width, int height, bool resizable) { 861 gtk_window_set_resizable(m_window, resizable); 862 if (resizable) { 863 gtk_window_set_default_size(m_window, width, height); 864 } 865 gtk_widget_set_size_request(m_window, width, height); 866 } 867 868 void init(const char *js) { 869 WebKitUserContentManager *manager = webkit_web_view_get_user_content_manager(m_webview); 870 webkit_user_content_manager_add_script( 871 manager, webkit_user_script_new( 872 js, WebKitUserContentInjectedFrames.WEBKIT_USER_CONTENT_INJECT_TOP_FRAME, 873 WebKitUserScriptInjectionTime.WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START, null, null)); 874 } 875 876 void eval(const char *js) { 877 webkit_web_view_run_javascript(m_webview, js, null, null, null); 878 } 879 880 protected: 881 GtkWidget* m_window; 882 GtkWidget* m_webview; 883 msg_cb_t m_cb; 884 } 885 } else version(WEBVIEW_COCOA) { 886 /+ 887 888 // 889 // ==================================================================== 890 // 891 // This implementation uses Cocoa WKWebView backend on macOS. It is 892 // written using ObjC runtime and uses WKWebView class as a browser runtime. 893 // You should pass "-framework Webkit" flag to the compiler. 894 // 895 // ==================================================================== 896 // 897 898 #define OBJC_OLD_DISPATCH_PROTOTYPES 1 899 #include <CoreGraphics/CoreGraphics.h> 900 #include <objc/objc-runtime.h> 901 902 #define NSBackingStoreBuffered 2 903 904 #define NSWindowStyleMaskResizable 8 905 #define NSWindowStyleMaskMiniaturizable 4 906 #define NSWindowStyleMaskTitled 1 907 #define NSWindowStyleMaskClosable 2 908 909 #define NSApplicationActivationPolicyRegular 0 910 911 #define WKUserScriptInjectionTimeAtDocumentStart 0 912 913 id operator"" _cls(const char *s, std::size_t sz) { 914 return (id)objc_getClass(s); 915 } 916 SEL operator"" _sel(const char *s, std::size_t sz) { 917 return sel_registerName(s); 918 } 919 id operator"" _str(const char *s, std::size_t sz) { 920 return objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, s); 921 } 922 923 class browser_engine { 924 public: 925 browser_engine(msg_cb_t cb, bool dbg, void *window) : m_cb(cb) { 926 // Application 927 id app = objc_msgSend("NSApplication"_cls, "sharedApplication"_sel); 928 objc_msgSend(app, "setActivationPolicy:"_sel, 929 NSApplicationActivationPolicyRegular); 930 931 // Delegate 932 auto cls = objc_allocateClassPair((Class) "NSObject"_cls, "AppDelegate", 0); 933 class_addProtocol(cls, objc_getProtocol("NSApplicationDelegate")); 934 class_addProtocol(cls, objc_getProtocol("WKScriptMessageHandler")); 935 class_addMethod( 936 cls, "applicationShouldTerminateAfterLastWindowClosed:"_sel, 937 (IMP)(+[](id self, SEL cmd, id notification) -> BOOL { return 1; }), 938 "c@:@"); 939 class_addMethod( 940 cls, "userContentController:didReceiveScriptMessage:"_sel, 941 (IMP)(+[](id self, SEL cmd, id notification, id msg) { 942 auto w = (browser_engine *)objc_getAssociatedObject(self, "webview"); 943 w->m_cb((const char *)objc_msgSend(objc_msgSend(msg, "body"_sel), 944 "UTF8String"_sel)); 945 }), 946 "v@:@@"); 947 objc_registerClassPair(cls); 948 949 auto delegate = objc_msgSend((id)cls, "new"_sel); 950 objc_setAssociatedObject(delegate, "webview", (id)this, 951 OBJC_ASSOCIATION_ASSIGN); 952 objc_msgSend(app, sel_registerName("setDelegate:"), delegate); 953 954 // Main window 955 if (window is null) { 956 m_window = objc_msgSend("NSWindow"_cls, "alloc"_sel); 957 m_window = objc_msgSend( 958 m_window, "initWithContentRect:styleMask:backing:defer:"_sel, 959 CGRectMake(0, 0, 0, 0), 0, NSBackingStoreBuffered, 0); 960 setSize(480, 320, true); 961 } else { 962 m_window = (id)window; 963 } 964 965 // Webview 966 auto config = objc_msgSend("WKWebViewConfiguration"_cls, "new"_sel); 967 m_manager = objc_msgSend(config, "userContentController"_sel); 968 m_webview = objc_msgSend("WKWebView"_cls, "alloc"_sel); 969 objc_msgSend(m_webview, "initWithFrame:configuration:"_sel, 970 CGRectMake(0, 0, 0, 0), config); 971 objc_msgSend(m_manager, "addScriptMessageHandler:name:"_sel, delegate, 972 "external"_str); 973 init(R"script( 974 window.external = { 975 invoke: function(s) { 976 window.webkit.messageHandlers.external.postMessage(s); 977 }, 978 }; 979 )script"); 980 if (dbg) { 981 objc_msgSend(objc_msgSend(config, "preferences"_sel), 982 "setValue:forKey:"_sel, 1, "developerExtrasEnabled"_str); 983 } 984 objc_msgSend(m_window, "setContentView:"_sel, m_webview); 985 objc_msgSend(m_window, "makeKeyAndOrderFront:"_sel, null); 986 } 987 ~browser_engine() { close(); } 988 void terminate() { close(); objc_msgSend("NSApp"_cls, "terminate:"_sel, null); } 989 void run() { 990 id app = objc_msgSend("NSApplication"_cls, "sharedApplication"_sel); 991 dispatch([&]() { objc_msgSend(app, "activateIgnoringOtherApps:"_sel, 1); }); 992 objc_msgSend(app, "run"_sel); 993 } 994 void dispatch(std::function<void()> f) { 995 dispatch_async_f(dispatch_get_main_queue(), new dispatch_fn_t(f), 996 (dispatch_function_t)([](void *arg) { 997 auto f = static_cast<dispatch_fn_t *>(arg); 998 (*f)(); 999 delete f; 1000 })); 1001 } 1002 void setTitle(const char *title) { 1003 objc_msgSend( 1004 m_window, "setTitle:"_sel, 1005 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, title)); 1006 } 1007 void setSize(int width, int height, bool resizable) { 1008 auto style = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | 1009 NSWindowStyleMaskMiniaturizable; 1010 if (resizable) { 1011 style = style | NSWindowStyleMaskResizable; 1012 } 1013 objc_msgSend(m_window, "setStyleMask:"_sel, style); 1014 objc_msgSend(m_window, "setFrame:display:animate:"_sel, 1015 CGRectMake(0, 0, width, height), 1, 0); 1016 } 1017 void navigate(const char *url) { 1018 auto nsurl = objc_msgSend( 1019 "NSURL"_cls, "URLWithString:"_sel, 1020 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, url)); 1021 objc_msgSend( 1022 m_webview, "loadRequest:"_sel, 1023 objc_msgSend("NSURLRequest"_cls, "requestWithURL:"_sel, nsurl)); 1024 } 1025 void init(const char *js) { 1026 objc_msgSend( 1027 m_manager, "addUserScript:"_sel, 1028 objc_msgSend( 1029 objc_msgSend("WKUserScript"_cls, "alloc"_sel), 1030 "initWithSource:injectionTime:forMainFrameOnly:"_sel, 1031 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, js), 1032 WKUserScriptInjectionTimeAtDocumentStart, 1)); 1033 } 1034 void eval(const char *js) { 1035 objc_msgSend(m_webview, "evaluateJavaScript:completionHandler:"_sel, 1036 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, js), 1037 null); 1038 } 1039 1040 protected: 1041 void close() { objc_msgSend(m_window, "close"_sel); } 1042 id m_window; 1043 id m_webview; 1044 id m_manager; 1045 msg_cb_t m_cb; 1046 }; 1047 1048 +/ 1049 1050 } 1051 1052 version(cef) { 1053 1054 /++ 1055 This creates a base class for a thing to help you implement the function pointers. 1056 1057 class MyApp : CEF!cef_app_t { 1058 1059 } 1060 +/ 1061 abstract class CEF(Base) { 1062 private struct Inner { 1063 Base c; 1064 CEF d_object; 1065 } 1066 private Inner inner; 1067 1068 this() nothrow { 1069 if(!__ctfe) construct(); 1070 } 1071 1072 // ONLY call this if you did a ctfe construction 1073 void construct() nothrow { 1074 assert(inner.c.base.size == 0); 1075 1076 import core.memory; 1077 GC.addRoot(cast(void*) this); 1078 inner.c.base.size = Inner.sizeof; 1079 inner.c.base.add_ref = &c_add_ref; 1080 inner.c.base.release = &c_release; 1081 inner.c.base.has_one_ref = &c_has_one_ref; 1082 inner.c.base.has_at_least_one_ref = &c_has_at_least_one_ref; 1083 inner.d_object = this; 1084 1085 static foreach(memberName; __traits(allMembers, Base)) { 1086 static if(is(typeof(__traits(getMember, Base, memberName)) == return)) { 1087 __traits(getMember, inner.c, memberName) = mixin("&c_" ~ memberName); 1088 } 1089 } 1090 } 1091 1092 private static nothrow @nogc extern(System) { 1093 void c_add_ref(cef_base_ref_counted_t* self) { 1094 return ((cast(Inner*) self).d_object).add_ref(); 1095 } 1096 int c_release(cef_base_ref_counted_t* self) { 1097 return ((cast(Inner*) self).d_object).release(); 1098 } 1099 int c_has_one_ref(cef_base_ref_counted_t* self) { 1100 return ((cast(Inner*) self).d_object).has_one_ref(); 1101 } 1102 int c_has_at_least_one_ref(cef_base_ref_counted_t* self) { 1103 return ((cast(Inner*) self).d_object).has_at_least_one_ref(); 1104 } 1105 } 1106 1107 private shared(int) refcount = 1; 1108 final void add_ref() { 1109 import core.atomic; 1110 atomicOp!"+="(refcount, 1); 1111 } 1112 final int release() { 1113 import core.atomic; 1114 auto v = atomicOp!"-="(refcount, 1); 1115 if(v == 0) { 1116 import core.memory; 1117 GC.removeRoot(cast(void*) this); 1118 return 1; 1119 } 1120 return 0; 1121 } 1122 final int has_one_ref() { 1123 return (cast() refcount) == 1; 1124 } 1125 final int has_at_least_one_ref() { 1126 return (cast() refcount) >= 1; 1127 } 1128 1129 /// Call this to pass to CEF. It will add ref for you. 1130 final Base* passable() { 1131 assert(inner.c.base.size); 1132 add_ref(); 1133 return returnable(); 1134 } 1135 1136 final Base* returnable() { 1137 assert(inner.c.base.size); 1138 return &inner.c; 1139 } 1140 1141 static foreach(memberName; __traits(allMembers, Base)) { 1142 static if(is(typeof(__traits(getMember, Base, memberName)) == return)) { 1143 mixin AbstractMethod!(memberName); 1144 } else { 1145 mixin(q{final ref @property } ~ memberName ~ q{() { return __traits(getMember, inner.c, memberName); }}); 1146 } 1147 } 1148 } 1149 1150 // you implement this in D... 1151 private mixin template AbstractMethod(string name) { 1152 alias ptr = typeof(__traits(getMember, Base, name)); 1153 static if(is(ptr Return == return)) 1154 static if(is(typeof(*ptr) Params == function)) 1155 { 1156 mixin(q{abstract nothrow Return } ~ name ~ q{(CefToD!(Params[1 .. $]) p);}); 1157 // mixin(q{abstract nothrow Return } ~ name ~ q{(Params[1 .. $] p);}); 1158 1159 mixin(q{ 1160 private static nothrow extern(System) 1161 Return c_}~name~q{(Params p) { 1162 Base* self = p[0]; // a bit of a type check here... 1163 auto dobj = (cast(Inner*) self).d_object; // ...before this cast. 1164 1165 //return __traits(getMember, dobj, name)(p[1 .. $]); 1166 mixin(() { 1167 string code = "return __traits(getMember, dobj, name)("; 1168 1169 static foreach(idx; 1 .. p.length) { 1170 if(idx > 1) 1171 code ~= ", "; 1172 code ~= "cefToD(p[" ~ idx.stringof ~ "])"; 1173 } 1174 code ~= ");"; 1175 return code; 1176 }()); 1177 } 1178 }); 1179 } 1180 else static assert(0, name ~ " params"); 1181 else static assert(0, name ~ " return"); 1182 } 1183 1184 // you call this from D... 1185 private mixin template ForwardMethod(string name) { 1186 alias ptr = typeof(__traits(getMember, Base, name)); 1187 static if(is(ptr Return == return)) 1188 static if(is(typeof(*ptr) Params == function)) 1189 { 1190 mixin(q{nothrow auto } ~ name ~ q{(Params[1 .. $] p) { 1191 Base* self = inner; // a bit of a type check here... 1192 static if(is(Return == void)) 1193 return __traits(getMember, inner, name)(self, p); 1194 else 1195 return cefToD(__traits(getMember, inner, name)(self, p)); 1196 }}); 1197 } 1198 else static assert(0, name ~ " params"); 1199 else static assert(0, name ~ " return"); 1200 } 1201 1202 1203 private alias AliasSeq(T...) = T; 1204 1205 private template CefToD(T...) { 1206 static if(T.length == 0) { 1207 alias CefToD = T; 1208 } else static if(T.length == 1) { 1209 static if(is(typeof(T[0].base) == cef_base_ref_counted_t)) { 1210 alias CefToD = RC!(typeof(*T[0])); 1211 /+ 1212 static if(is(T[0] == I*, I)) { 1213 alias CefToD = CEF!(I); 1214 } else static assert(0, T[0]); 1215 +/ 1216 } else 1217 alias CefToD = T[0]; 1218 } else { 1219 alias CefToD = AliasSeq!(CefToD!(T[0]), CefToD!(T[1..$])); 1220 1221 } 1222 } 1223 1224 enum activeEngine = WebviewEngine.cef; 1225 1226 struct RC(Base) { 1227 private Base* inner; 1228 1229 this(Base* t) nothrow { 1230 inner = t; 1231 // assuming the refcount is already set here 1232 } 1233 this(this) nothrow { 1234 if(inner is null) return; 1235 inner.base.add_ref(&inner.base); 1236 } 1237 ~this() nothrow { 1238 if(inner is null) return; 1239 inner.base.release(&inner.base); 1240 inner = null; 1241 //sdpyPrintDebugString("omg release"); 1242 } 1243 bool opCast(T:bool)() nothrow { 1244 return inner !is null; 1245 } 1246 1247 Base* getRawPointer() nothrow { 1248 return inner; 1249 } 1250 1251 Base* passable() nothrow { 1252 if(inner is null) 1253 return inner; 1254 1255 inner.base.add_ref(&inner.base); 1256 return inner; 1257 } 1258 1259 static foreach(memberName; __traits(allMembers, Base)) { 1260 static if(is(typeof(__traits(getMember, Base, memberName)) == return)) { 1261 mixin ForwardMethod!(memberName); 1262 } else { 1263 mixin(q{final ref @property } ~ memberName ~ q{() { return __traits(getMember, inner, memberName); }}); 1264 } 1265 } 1266 } 1267 1268 auto cefToD(T)(T t) { 1269 static if(is(typeof(T.base) == cef_base_ref_counted_t)) { 1270 return RC!(typeof(*T))(t); 1271 } else { 1272 return t; 1273 } 1274 } 1275 1276 1277 string toGC(const cef_string_utf16_t str) nothrow { 1278 if(str.str is null) 1279 return null; 1280 1281 string s; 1282 s.reserve(str.length); 1283 1284 try 1285 foreach(char ch; str.str[0 .. str.length]) 1286 s ~= ch; 1287 catch(Exception e) {} 1288 return s; 1289 } 1290 1291 string toGC(const cef_string_utf16_t* str) nothrow { 1292 if(str is null) 1293 return null; 1294 return toGC(*str); 1295 } 1296 1297 string toGCAndFree(const cef_string_userfree_t str) nothrow { 1298 if(str is null) 1299 return null; 1300 1301 string s = toGC(str); 1302 libcef.string_userfree_utf16_free(str); 1303 //str = null; 1304 return s; 1305 } 1306 1307 // bindings follow, first some hand-written ones for Linux, then some machine translated things. More comments about the machine translation when it comes. 1308 1309 version(linux) 1310 struct cef_main_args_t { 1311 int argc; 1312 char** argv; 1313 } 1314 version(Windows) 1315 struct cef_main_args_t { 1316 HINSTANCE instance; 1317 } 1318 1319 // 0 - CEF_VERSION_MAJOR 1320 // 1 - CEF_VERSION_MINOR 1321 // 2 - CEF_VERSION_PATCH 1322 // 3 - CEF_COMMIT_NUMBER 1323 // 4 - CHROME_VERSION_MAJOR 1324 // 5 - CHROME_VERSION_MINOR 1325 // 6 - CHROME_VERSION_BUILD 1326 // 7 - CHROME_VERSION_PATCH 1327 1328 extern(C) nothrow 1329 int cef_string_utf8_to_utf16(const char* src, size_t src_len, cef_string_utf16_t* output); 1330 1331 struct cef_string_utf8_t { 1332 char* str; 1333 size_t length; 1334 void* dtor;// void (*dtor)(char* str); 1335 } 1336 1337 1338 1339 struct cef_string_utf16_t { 1340 char16* str; 1341 size_t length; 1342 void* dtor; // voiod (*dtor)(char16* str); 1343 1344 this(wstring s) nothrow { 1345 this.str = cast(char16*) s.ptr; 1346 this.length = s.length; 1347 } 1348 1349 this(string s) nothrow { 1350 libcef.string_utf8_to_utf16(s.ptr, s.length, &this); 1351 } 1352 } 1353 1354 alias cef_string_t = cef_string_utf16_t; 1355 alias cef_window_handle_t = NativeWindowHandle; 1356 version(Windows) 1357 alias cef_cursor_handle_t = HCURSOR; 1358 else 1359 alias cef_cursor_handle_t = XID; 1360 1361 struct cef_time_t { 1362 int year; // Four or five digit year "2007" (1601 to 30827 on 1363 // Windows, 1970 to 2038 on 32-bit POSIX) 1364 int month; // 1-based month (values 1 = January, etc.) 1365 int day_of_week; // 0-based day of week (0 = Sunday, etc.) 1366 int day_of_month; // 1-based day of month (1-31) 1367 int hour; // Hour within the current day (0-23) 1368 int minute; // Minute within the current hour (0-59) 1369 int second; // Second within the current minute (0-59 plus leap 1370 // seconds which may take it up to 60). 1371 int millisecond; // Milliseconds within the current second (0-999) 1372 } 1373 1374 version(linux) 1375 struct cef_window_info_t { 1376 cef_string_t window_name; 1377 1378 uint x; 1379 uint y; 1380 uint width; 1381 uint height; 1382 1383 cef_window_handle_t parent_window; 1384 1385 int windowless_rendering_enabled; 1386 1387 int shared_texture_enabled; 1388 1389 int external_begin_frame_enabled; 1390 1391 cef_window_handle_t window; 1392 } 1393 1394 version(Windows) 1395 struct cef_window_info_t { 1396 DWORD ex_style; 1397 cef_string_t window_name; 1398 DWORD style; 1399 cef_rect_t bounds; 1400 cef_window_handle_t parent_window; 1401 HMENU menu; 1402 int windowless_rendering_enabled; 1403 int shared_texture_enabled; 1404 int external_begin_frame_enabled; 1405 cef_window_handle_t window; 1406 } 1407 1408 1409 1410 import core.stdc.config; 1411 alias int16 = short; 1412 alias uint16 = ushort; 1413 alias int32 = int; 1414 alias uint32 = uint; 1415 alias char16 = wchar; 1416 alias int64 = long; 1417 alias uint64 = ulong; 1418 1419 // these are supposed to just be opaque pointers but i want some type safety. this same abi wise.......... RIGHT? 1420 struct cef_string_list_t { void* r; } 1421 struct cef_string_multimap_t { void* r; } 1422 struct cef_string_map_t { void* r; } 1423 1424 1425 extern(C) nothrow { 1426 cef_string_list_t cef_string_list_alloc(); 1427 size_t cef_string_list_size(cef_string_list_t list); 1428 int cef_string_list_value(cef_string_list_t list, size_t index, cef_string_t* value); 1429 void cef_string_list_append(cef_string_list_t list, const cef_string_t* value); 1430 void cef_string_list_clear(cef_string_list_t list); 1431 void cef_string_list_free(cef_string_list_t list); 1432 cef_string_list_t cef_string_list_copy(cef_string_list_t list); 1433 } 1434 1435 1436 version(linux) { 1437 import core.sys.posix.sys.types; 1438 alias pid_t cef_platform_thread_id_t; 1439 alias OS_EVENT = XEvent; 1440 } else { 1441 import core.sys.windows.windows; 1442 alias HANDLE cef_platform_thread_id_t; 1443 alias OS_EVENT = void; 1444 } 1445 1446 nothrow @nogc extern(C) void cef_string_userfree_utf16_free(const cef_string_userfree_utf16_t str); 1447 struct cef_string_userfree_utf16_t { cef_string_utf16_t* it; alias it this; } 1448 alias cef_string_userfree_t = cef_string_userfree_utf16_t; 1449 1450 // ************** 1451 1452 // cef/include/capi$ for i in *.h; do dstep -I../.. $i; done 1453 // also dstep include/cef_version.h 1454 // update the CEF_VERSION and the CEF_API_HASH_UNIVERSAL out of cef_version.h and cef_api_hash.h 1455 // then concatenate the bodies of them and delete the translated macros and `struct .*;` stuff 1456 // 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 1457 // then select all and global replace s/_cef/cef/g 1458 // 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. 1459 1460 // and make sure version(linux) void cef_register_widevine_cdm ( if it is there. 1461 1462 // and extern (C) is wrong on the callbacks, they should all be extern(System) 1463 // `/function (<ENTER>Oextern(System)<ESC>` 1464 1465 1466 version=embedded_cef_bindings; 1467 1468 // everything inside these brackets are the bindings you can replace if update needed 1469 1470 version(embedded_cef_bindings) { 1471 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 1472 // 1473 // Redistribution and use in source and binary forms, with or without 1474 // modification, are permitted provided that the following conditions are 1475 // met: 1476 // 1477 // * Redistributions of source code must retain the above copyright 1478 // notice, this list of conditions and the following disclaimer. 1479 // * Redistributions in binary form must reproduce the above 1480 // copyright notice, this list of conditions and the following disclaimer 1481 // in the documentation and/or other materials provided with the 1482 // distribution. 1483 // * Neither the name of Google Inc. nor the name Chromium Embedded 1484 // Framework nor the names of its contributors may be used to endorse 1485 // or promote products derived from this software without specific prior 1486 // written permission. 1487 // 1488 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1489 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1490 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1491 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1492 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1493 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1494 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1495 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1496 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1497 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1498 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1499 // 1500 // --------------------------------------------------------------------------- 1501 // 1502 // This file was generated by the make_version_header.py tool. 1503 // 1504 1505 extern (C): 1506 1507 enum CEF_VERSION = "95.7.17+g4208276+chromium-95.0.4638.69"; 1508 enum CEF_VERSION_MAJOR = 95; 1509 enum CEF_VERSION_MINOR = 7; 1510 enum CEF_VERSION_PATCH = 17; 1511 enum CEF_COMMIT_NUMBER = 2459; 1512 enum CEF_COMMIT_HASH = "4208276762b1f52ed444debd7caa84fc3332e6a9"; 1513 enum COPYRIGHT_YEAR = 2021; 1514 1515 enum CHROME_VERSION_MAJOR = 95; 1516 enum CHROME_VERSION_MINOR = 0; 1517 enum CHROME_VERSION_BUILD = 4638; 1518 enum CHROME_VERSION_PATCH = 69; 1519 1520 1521 1522 // Returns CEF version information for the libcef library. The |entry| 1523 // parameter describes which version component will be returned: 1524 // 0 - CEF_VERSION_MAJOR 1525 // 1 - CEF_VERSION_MINOR 1526 // 2 - CEF_VERSION_PATCH 1527 // 3 - CEF_COMMIT_NUMBER 1528 // 4 - CHROME_VERSION_MAJOR 1529 // 5 - CHROME_VERSION_MINOR 1530 // 6 - CHROME_VERSION_BUILD 1531 // 7 - CHROME_VERSION_PATCH 1532 /// 1533 int cef_version_info (int entry); 1534 1535 // APSTUDIO_HIDDEN_SYMBOLS 1536 1537 // CEF_INCLUDE_CEF_VERSION_H_ 1538 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 1539 // 1540 // Redistribution and use in source and binary forms, with or without 1541 // modification, are permitted provided that the following conditions are 1542 // met: 1543 // 1544 // * Redistributions of source code must retain the above copyright 1545 // notice, this list of conditions and the following disclaimer. 1546 // * Redistributions in binary form must reproduce the above 1547 // copyright notice, this list of conditions and the following disclaimer 1548 // in the documentation and/or other materials provided with the 1549 // distribution. 1550 // * Neither the name of Google Inc. nor the name Chromium Embedded 1551 // Framework nor the names of its contributors may be used to endorse 1552 // or promote products derived from this software without specific prior 1553 // written permission. 1554 // 1555 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1556 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1557 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1558 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1559 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1560 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1561 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1562 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1563 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1564 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1565 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1566 // 1567 // --------------------------------------------------------------------------- 1568 // 1569 // This file was generated by the make_api_hash_header.py tool. 1570 // 1571 1572 extern (C): 1573 1574 // The API hash is created by analyzing CEF header files for C API type 1575 // definitions. The hash value will change when header files are modified in a 1576 // way that may cause binary incompatibility with other builds. The universal 1577 // hash value will change if any platform is affected whereas the platform hash 1578 // values will change only if that particular platform is affected. 1579 enum CEF_API_HASH_UNIVERSAL = "21ac25aebdb49a8e8088c6fbee802b04fd07b501"; 1580 1581 enum CEF_API_HASH_PLATFORM = "0b5227787444955a548b7544b2cdcda95a354506"; 1582 1583 /// 1584 // Returns CEF API hashes for the libcef library. The returned string is owned 1585 // by the library and should not be freed. The |entry| parameter describes which 1586 // hash value will be returned: 1587 // 0 - CEF_API_HASH_PLATFORM 1588 // 1 - CEF_API_HASH_UNIVERSAL 1589 // 2 - CEF_COMMIT_HASH (from cef_version.h) 1590 /// 1591 const(char)* cef_api_hash (int entry); 1592 1593 // CEF_INCLUDE_API_HASH_H_ 1594 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 1595 // 1596 // Redistribution and use in source and binary forms, with or without 1597 // modification, are permitted provided that the following conditions are 1598 // met: 1599 // 1600 // * Redistributions of source code must retain the above copyright 1601 // notice, this list of conditions and the following disclaimer. 1602 // * Redistributions in binary form must reproduce the above 1603 // copyright notice, this list of conditions and the following disclaimer 1604 // in the documentation and/or other materials provided with the 1605 // distribution. 1606 // * Neither the name of Google Inc. nor the name Chromium Embedded 1607 // Framework nor the names of its contributors may be used to endorse 1608 // or promote products derived from this software without specific prior 1609 // written permission. 1610 // 1611 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1612 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1613 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1614 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1615 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1616 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1617 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1618 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1619 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1620 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1621 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1622 1623 extern (C): 1624 1625 /// 1626 // Structure representing a point. 1627 /// 1628 struct cef_point_t 1629 { 1630 int x; 1631 int y; 1632 } 1633 1634 1635 1636 /// 1637 // Structure representing a rectangle. 1638 /// 1639 struct cef_rect_t 1640 { 1641 int x; 1642 int y; 1643 int width; 1644 int height; 1645 } 1646 1647 1648 1649 /// 1650 // Structure representing a size. 1651 /// 1652 struct cef_size_t 1653 { 1654 int width; 1655 int height; 1656 } 1657 1658 1659 1660 /// 1661 // Structure representing insets. 1662 /// 1663 struct cef_insets_t 1664 { 1665 int top; 1666 int left; 1667 int bottom; 1668 int right; 1669 } 1670 1671 1672 1673 // CEF_INCLUDE_INTERNAL_CEF_TYPES_GEOMETRY_H_ 1674 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 1675 // 1676 // Redistribution and use in source and binary forms, with or without 1677 // modification, are permitted provided that the following conditions are 1678 // met: 1679 // 1680 // * Redistributions of source code must retain the above copyright 1681 // notice, this list of conditions and the following disclaimer. 1682 // * Redistributions in binary form must reproduce the above 1683 // copyright notice, this list of conditions and the following disclaimer 1684 // in the documentation and/or other materials provided with the 1685 // distribution. 1686 // * Neither the name of Google Inc. nor the name Chromium Embedded 1687 // Framework nor the names of its contributors may be used to endorse 1688 // or promote products derived from this software without specific prior 1689 // written permission. 1690 // 1691 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1692 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1693 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1694 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1695 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1696 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1697 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1698 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1699 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1700 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1701 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1702 1703 import core.stdc.limits; 1704 1705 extern (C): 1706 1707 // Bring in platform-specific definitions. 1708 1709 // 32-bit ARGB color value, not premultiplied. The color components are always 1710 // in a known order. Equivalent to the SkColor type. 1711 alias cef_color_t = uint; 1712 1713 // Return the alpha byte from a cef_color_t value. 1714 1715 1716 // Return the red byte from a cef_color_t value. 1717 1718 1719 // Return the green byte from a cef_color_t value. 1720 1721 1722 // Return the blue byte from a cef_color_t value. 1723 1724 1725 // Return an cef_color_t value with the specified byte component values. 1726 1727 1728 // Return an int64 value with the specified low and high int32 component values. 1729 1730 1731 // Return the low int32 value from an int64 value. 1732 1733 1734 // Return the high int32 value from an int64 value. 1735 1736 1737 /// 1738 // Log severity levels. 1739 /// 1740 enum cef_log_severity_t 1741 { 1742 /// 1743 // Default logging (currently INFO logging). 1744 /// 1745 LOGSEVERITY_DEFAULT = 0, 1746 1747 /// 1748 // Verbose logging. 1749 /// 1750 LOGSEVERITY_VERBOSE = 1, 1751 1752 /// 1753 // DEBUG logging. 1754 /// 1755 LOGSEVERITY_DEBUG = LOGSEVERITY_VERBOSE, 1756 1757 /// 1758 // INFO logging. 1759 /// 1760 LOGSEVERITY_INFO = 2, 1761 1762 /// 1763 // WARNING logging. 1764 /// 1765 LOGSEVERITY_WARNING = 3, 1766 1767 /// 1768 // ERROR logging. 1769 /// 1770 LOGSEVERITY_ERROR = 4, 1771 1772 /// 1773 // FATAL logging. 1774 /// 1775 LOGSEVERITY_FATAL = 5, 1776 1777 /// 1778 // Disable logging to file for all messages, and to stderr for messages with 1779 // severity less than FATAL. 1780 /// 1781 LOGSEVERITY_DISABLE = 99 1782 } 1783 1784 /// 1785 // Represents the state of a setting. 1786 /// 1787 enum cef_state_t 1788 { 1789 /// 1790 // Use the default state for the setting. 1791 /// 1792 STATE_DEFAULT = 0, 1793 1794 /// 1795 // Enable or allow the setting. 1796 /// 1797 STATE_ENABLED = 1, 1798 1799 /// 1800 // Disable or disallow the setting. 1801 /// 1802 STATE_DISABLED = 2 1803 } 1804 1805 /// 1806 // Initialization settings. Specify NULL or 0 to get the recommended default 1807 // values. Many of these and other settings can also configured using command- 1808 // line switches. 1809 /// 1810 struct cef_settings_t 1811 { 1812 /// 1813 // Size of this structure. 1814 /// 1815 size_t size; 1816 1817 /// 1818 // Set to true (1) to disable the sandbox for sub-processes. See 1819 // cef_sandbox_win.h for requirements to enable the sandbox on Windows. Also 1820 // configurable using the "no-sandbox" command-line switch. 1821 /// 1822 int no_sandbox; 1823 1824 /// 1825 // The path to a separate executable that will be launched for sub-processes. 1826 // If this value is empty on Windows or Linux then the main process executable 1827 // will be used. If this value is empty on macOS then a helper executable must 1828 // exist at "Contents/Frameworks/<app> Helper.app/Contents/MacOS/<app> Helper" 1829 // in the top-level app bundle. See the comments on CefExecuteProcess() for 1830 // details. If this value is non-empty then it must be an absolute path. Also 1831 // configurable using the "browser-subprocess-path" command-line switch. 1832 /// 1833 cef_string_t browser_subprocess_path; 1834 1835 /// 1836 // The path to the CEF framework directory on macOS. If this value is empty 1837 // then the framework must exist at "Contents/Frameworks/Chromium Embedded 1838 // Framework.framework" in the top-level app bundle. If this value is 1839 // non-empty then it must be an absolute path. Also configurable using the 1840 // "framework-dir-path" command-line switch. 1841 /// 1842 cef_string_t framework_dir_path; 1843 1844 /// 1845 // The path to the main bundle on macOS. If this value is empty then it 1846 // defaults to the top-level app bundle. If this value is non-empty then it 1847 // must be an absolute path. Also configurable using the "main-bundle-path" 1848 // command-line switch. 1849 /// 1850 cef_string_t main_bundle_path; 1851 1852 /// 1853 // Set to true (1) to enable use of the Chrome runtime in CEF. This feature is 1854 // considered experimental and is not recommended for most users at this time. 1855 // See issue #2969 for details. 1856 /// 1857 int chrome_runtime; 1858 1859 /// 1860 // Set to true (1) to have the browser process message loop run in a separate 1861 // thread. If false (0) than the CefDoMessageLoopWork() function must be 1862 // called from your application message loop. This option is only supported on 1863 // Windows and Linux. 1864 /// 1865 int multi_threaded_message_loop; 1866 1867 /// 1868 // Set to true (1) to control browser process main (UI) thread message pump 1869 // scheduling via the CefBrowserProcessHandler::OnScheduleMessagePumpWork() 1870 // callback. This option is recommended for use in combination with the 1871 // CefDoMessageLoopWork() function in cases where the CEF message loop must be 1872 // integrated into an existing application message loop (see additional 1873 // comments and warnings on CefDoMessageLoopWork). Enabling this option is not 1874 // recommended for most users; leave this option disabled and use either the 1875 // CefRunMessageLoop() function or multi_threaded_message_loop if possible. 1876 /// 1877 int external_message_pump; 1878 1879 /// 1880 // Set to true (1) to enable windowless (off-screen) rendering support. Do not 1881 // enable this value if the application does not use windowless rendering as 1882 // it may reduce rendering performance on some systems. 1883 /// 1884 int windowless_rendering_enabled; 1885 1886 /// 1887 // Set to true (1) to disable configuration of browser process features using 1888 // standard CEF and Chromium command-line arguments. Configuration can still 1889 // be specified using CEF data structures or via the 1890 // CefApp::OnBeforeCommandLineProcessing() method. 1891 /// 1892 int command_line_args_disabled; 1893 1894 /// 1895 // The location where data for the global browser cache will be stored on 1896 // disk. If this value is non-empty then it must be an absolute path that is 1897 // either equal to or a child directory of CefSettings.root_cache_path. If 1898 // this value is empty then browsers will be created in "incognito mode" where 1899 // in-memory caches are used for storage and no data is persisted to disk. 1900 // HTML5 databases such as localStorage will only persist across sessions if a 1901 // cache path is specified. Can be overridden for individual CefRequestContext 1902 // instances via the CefRequestContextSettings.cache_path value. When using 1903 // the Chrome runtime the "default" profile will be used if |cache_path| and 1904 // |root_cache_path| have the same value. 1905 /// 1906 cef_string_t cache_path; 1907 1908 /// 1909 // The root directory that all CefSettings.cache_path and 1910 // CefRequestContextSettings.cache_path values must have in common. If this 1911 // value is empty and CefSettings.cache_path is non-empty then it will 1912 // default to the CefSettings.cache_path value. If this value is non-empty 1913 // then it must be an absolute path. Failure to set this value correctly may 1914 // result in the sandbox blocking read/write access to the cache_path 1915 // directory. 1916 /// 1917 cef_string_t root_cache_path; 1918 1919 /// 1920 // The location where user data such as the Widevine CDM module and spell 1921 // checking dictionary files will be stored on disk. If this value is empty 1922 // then the default platform-specific user data directory will be used 1923 // ("~/.config/cef_user_data" directory on Linux, "~/Library/Application 1924 // Support/CEF/User Data" directory on MacOS, "AppData\Local\CEF\User Data" 1925 // directory under the user profile directory on Windows). If this value is 1926 // non-empty then it must be an absolute path. When using the Chrome runtime 1927 // this value will be ignored in favor of the |root_cache_path| value. 1928 /// 1929 cef_string_t user_data_path; 1930 1931 /// 1932 // To persist session cookies (cookies without an expiry date or validity 1933 // interval) by default when using the global cookie manager set this value to 1934 // true (1). Session cookies are generally intended to be transient and most 1935 // Web browsers do not persist them. A |cache_path| value must also be 1936 // specified to enable this feature. Also configurable using the 1937 // "persist-session-cookies" command-line switch. Can be overridden for 1938 // individual CefRequestContext instances via the 1939 // CefRequestContextSettings.persist_session_cookies value. 1940 /// 1941 int persist_session_cookies; 1942 1943 /// 1944 // To persist user preferences as a JSON file in the cache path directory set 1945 // this value to true (1). A |cache_path| value must also be specified 1946 // to enable this feature. Also configurable using the 1947 // "persist-user-preferences" command-line switch. Can be overridden for 1948 // individual CefRequestContext instances via the 1949 // CefRequestContextSettings.persist_user_preferences value. 1950 /// 1951 int persist_user_preferences; 1952 1953 /// 1954 // Value that will be returned as the User-Agent HTTP header. If empty the 1955 // default User-Agent string will be used. Also configurable using the 1956 // "user-agent" command-line switch. 1957 /// 1958 cef_string_t user_agent; 1959 1960 /// 1961 // Value that will be inserted as the product portion of the default 1962 // User-Agent string. If empty the Chromium product version will be used. If 1963 // |userAgent| is specified this value will be ignored. Also configurable 1964 // using the "user-agent-product" command-line switch. 1965 /// 1966 cef_string_t user_agent_product; 1967 1968 /// 1969 // The locale string that will be passed to WebKit. If empty the default 1970 // locale of "en-US" will be used. This value is ignored on Linux where locale 1971 // is determined using environment variable parsing with the precedence order: 1972 // LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also configurable using the "lang" 1973 // command-line switch. 1974 /// 1975 cef_string_t locale; 1976 1977 /// 1978 // The directory and file name to use for the debug log. If empty a default 1979 // log file name and location will be used. On Windows and Linux a "debug.log" 1980 // file will be written in the main executable directory. On MacOS a 1981 // "~/Library/Logs/<app name>_debug.log" file will be written where <app name> 1982 // is the name of the main app executable. Also configurable using the 1983 // "log-file" command-line switch. 1984 /// 1985 cef_string_t log_file; 1986 1987 /// 1988 // The log severity. Only messages of this severity level or higher will be 1989 // logged. When set to DISABLE no messages will be written to the log file, 1990 // but FATAL messages will still be output to stderr. Also configurable using 1991 // the "log-severity" command-line switch with a value of "verbose", "info", 1992 // "warning", "error", "fatal" or "disable". 1993 /// 1994 cef_log_severity_t log_severity; 1995 1996 /// 1997 // Custom flags that will be used when initializing the V8 JavaScript engine. 1998 // The consequences of using custom flags may not be well tested. Also 1999 // configurable using the "js-flags" command-line switch. 2000 /// 2001 cef_string_t javascript_flags; 2002 2003 /// 2004 // The fully qualified path for the resources directory. If this value is 2005 // empty the *.pak files must be located in the module directory on 2006 // Windows/Linux or the app bundle Resources directory on MacOS. If this 2007 // value is non-empty then it must be an absolute path. Also configurable 2008 // using the "resources-dir-path" command-line switch. 2009 /// 2010 cef_string_t resources_dir_path; 2011 2012 /// 2013 // The fully qualified path for the locales directory. If this value is empty 2014 // the locales directory must be located in the module directory. If this 2015 // value is non-empty then it must be an absolute path. This value is ignored 2016 // on MacOS where pack files are always loaded from the app bundle Resources 2017 // directory. Also configurable using the "locales-dir-path" command-line 2018 // switch. 2019 /// 2020 cef_string_t locales_dir_path; 2021 2022 /// 2023 // Set to true (1) to disable loading of pack files for resources and locales. 2024 // A resource bundle handler must be provided for the browser and render 2025 // processes via CefApp::GetResourceBundleHandler() if loading of pack files 2026 // is disabled. Also configurable using the "disable-pack-loading" command- 2027 // line switch. 2028 /// 2029 int pack_loading_disabled; 2030 2031 /// 2032 // Set to a value between 1024 and 65535 to enable remote debugging on the 2033 // specified port. For example, if 8080 is specified the remote debugging URL 2034 // will be http://localhost:8080. CEF can be remotely debugged from any CEF or 2035 // Chrome browser window. Also configurable using the "remote-debugging-port" 2036 // command-line switch. 2037 /// 2038 int remote_debugging_port; 2039 2040 /// 2041 // The number of stack trace frames to capture for uncaught exceptions. 2042 // Specify a positive value to enable the CefRenderProcessHandler:: 2043 // OnUncaughtException() callback. Specify 0 (default value) and 2044 // OnUncaughtException() will not be called. Also configurable using the 2045 // "uncaught-exception-stack-size" command-line switch. 2046 /// 2047 int uncaught_exception_stack_size; 2048 2049 /// 2050 // Background color used for the browser before a document is loaded and when 2051 // no document color is specified. The alpha component must be either fully 2052 // opaque (0xFF) or fully transparent (0x00). If the alpha component is fully 2053 // opaque then the RGB components will be used as the background color. If the 2054 // alpha component is fully transparent for a windowed browser then the 2055 // default value of opaque white be used. If the alpha component is fully 2056 // transparent for a windowless (off-screen) browser then transparent painting 2057 // will be enabled. 2058 /// 2059 cef_color_t background_color; 2060 2061 /// 2062 // Comma delimited ordered list of language codes without any whitespace that 2063 // will be used in the "Accept-Language" HTTP header. May be overridden on a 2064 // per-browser basis using the CefBrowserSettings.accept_language_list value. 2065 // If both values are empty then "en-US,en" will be used. Can be overridden 2066 // for individual CefRequestContext instances via the 2067 // CefRequestContextSettings.accept_language_list value. 2068 /// 2069 cef_string_t accept_language_list; 2070 2071 /// 2072 // Comma delimited list of schemes supported by the associated 2073 // CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0) the 2074 // default schemes ("http", "https", "ws" and "wss") will also be supported. 2075 // Specifying a |cookieable_schemes_list| value and setting 2076 // |cookieable_schemes_exclude_defaults| to true (1) will disable all loading 2077 // and saving of cookies for this manager. Can be overridden 2078 // for individual CefRequestContext instances via the 2079 // CefRequestContextSettings.cookieable_schemes_list and 2080 // CefRequestContextSettings.cookieable_schemes_exclude_defaults values. 2081 /// 2082 cef_string_t cookieable_schemes_list; 2083 int cookieable_schemes_exclude_defaults; 2084 2085 /// 2086 // GUID string used for identifying the application. This is passed to the 2087 // system AV function for scanning downloaded files. By default, the GUID 2088 // will be an empty string and the file will be treated as an untrusted 2089 // file when the GUID is empty. 2090 /// 2091 cef_string_t application_client_id_for_file_scanning; 2092 } 2093 2094 2095 2096 /// 2097 // Request context initialization settings. Specify NULL or 0 to get the 2098 // recommended default values. 2099 /// 2100 struct cef_request_context_settings_t 2101 { 2102 /// 2103 // Size of this structure. 2104 /// 2105 size_t size; 2106 2107 /// 2108 // The location where cache data for this request context will be stored on 2109 // disk. If this value is non-empty then it must be an absolute path that is 2110 // either equal to or a child directory of CefSettings.root_cache_path. If 2111 // this value is empty then browsers will be created in "incognito mode" where 2112 // in-memory caches are used for storage and no data is persisted to disk. 2113 // HTML5 databases such as localStorage will only persist across sessions if a 2114 // cache path is specified. To share the global browser cache and related 2115 // configuration set this value to match the CefSettings.cache_path value. 2116 /// 2117 cef_string_t cache_path; 2118 2119 /// 2120 // To persist session cookies (cookies without an expiry date or validity 2121 // interval) by default when using the global cookie manager set this value to 2122 // true (1). Session cookies are generally intended to be transient and most 2123 // Web browsers do not persist them. Can be set globally using the 2124 // CefSettings.persist_session_cookies value. This value will be ignored if 2125 // |cache_path| is empty or if it matches the CefSettings.cache_path value. 2126 /// 2127 int persist_session_cookies; 2128 2129 /// 2130 // To persist user preferences as a JSON file in the cache path directory set 2131 // this value to true (1). Can be set globally using the 2132 // CefSettings.persist_user_preferences value. This value will be ignored if 2133 // |cache_path| is empty or if it matches the CefSettings.cache_path value. 2134 /// 2135 int persist_user_preferences; 2136 2137 /// 2138 // Comma delimited ordered list of language codes without any whitespace that 2139 // will be used in the "Accept-Language" HTTP header. Can be set globally 2140 // using the CefSettings.accept_language_list value or overridden on a per- 2141 // browser basis using the CefBrowserSettings.accept_language_list value. If 2142 // all values are empty then "en-US,en" will be used. This value will be 2143 // ignored if |cache_path| matches the CefSettings.cache_path value. 2144 /// 2145 cef_string_t accept_language_list; 2146 2147 /// 2148 // Comma delimited list of schemes supported by the associated 2149 // CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0) the 2150 // default schemes ("http", "https", "ws" and "wss") will also be supported. 2151 // Specifying a |cookieable_schemes_list| value and setting 2152 // |cookieable_schemes_exclude_defaults| to true (1) will disable all loading 2153 // and saving of cookies for this manager. These values will be ignored if 2154 // |cache_path| matches the CefSettings.cache_path value. 2155 /// 2156 cef_string_t cookieable_schemes_list; 2157 int cookieable_schemes_exclude_defaults; 2158 } 2159 2160 2161 2162 /// 2163 // Browser initialization settings. Specify NULL or 0 to get the recommended 2164 // default values. The consequences of using custom values may not be well 2165 // tested. Many of these and other settings can also configured using command- 2166 // line switches. 2167 /// 2168 struct cef_browser_settings_t 2169 { 2170 /// 2171 // Size of this structure. 2172 /// 2173 size_t size; 2174 2175 /// 2176 // The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint 2177 // will be called for a windowless browser. The actual fps may be lower if 2178 // the browser cannot generate frames at the requested rate. The minimum 2179 // value is 1 and the maximum value is 60 (default 30). This value can also be 2180 // changed dynamically via CefBrowserHost::SetWindowlessFrameRate. 2181 /// 2182 int windowless_frame_rate; 2183 2184 // The below values map to WebPreferences settings. 2185 2186 /// 2187 // Font settings. 2188 /// 2189 cef_string_t standard_font_family; 2190 cef_string_t fixed_font_family; 2191 cef_string_t serif_font_family; 2192 cef_string_t sans_serif_font_family; 2193 cef_string_t cursive_font_family; 2194 cef_string_t fantasy_font_family; 2195 int default_font_size; 2196 int default_fixed_font_size; 2197 int minimum_font_size; 2198 int minimum_logical_font_size; 2199 2200 /// 2201 // Default encoding for Web content. If empty "ISO-8859-1" will be used. Also 2202 // configurable using the "default-encoding" command-line switch. 2203 /// 2204 cef_string_t default_encoding; 2205 2206 /// 2207 // Controls the loading of fonts from remote sources. Also configurable using 2208 // the "disable-remote-fonts" command-line switch. 2209 /// 2210 cef_state_t remote_fonts; 2211 2212 /// 2213 // Controls whether JavaScript can be executed. Also configurable using the 2214 // "disable-javascript" command-line switch. 2215 /// 2216 cef_state_t javascript; 2217 2218 /// 2219 // Controls whether JavaScript can be used to close windows that were not 2220 // opened via JavaScript. JavaScript can still be used to close windows that 2221 // were opened via JavaScript or that have no back/forward history. Also 2222 // configurable using the "disable-javascript-close-windows" command-line 2223 // switch. 2224 /// 2225 cef_state_t javascript_close_windows; 2226 2227 /// 2228 // Controls whether JavaScript can access the clipboard. Also configurable 2229 // using the "disable-javascript-access-clipboard" command-line switch. 2230 /// 2231 cef_state_t javascript_access_clipboard; 2232 2233 /// 2234 // Controls whether DOM pasting is supported in the editor via 2235 // execCommand("paste"). The |javascript_access_clipboard| setting must also 2236 // be enabled. Also configurable using the "disable-javascript-dom-paste" 2237 // command-line switch. 2238 /// 2239 cef_state_t javascript_dom_paste; 2240 2241 /// 2242 // Controls whether any plugins will be loaded. Also configurable using the 2243 // "disable-plugins" command-line switch. 2244 /// 2245 cef_state_t plugins; 2246 2247 /// 2248 // Controls whether image URLs will be loaded from the network. A cached image 2249 // will still be rendered if requested. Also configurable using the 2250 // "disable-image-loading" command-line switch. 2251 /// 2252 cef_state_t image_loading; 2253 2254 /// 2255 // Controls whether standalone images will be shrunk to fit the page. Also 2256 // configurable using the "image-shrink-standalone-to-fit" command-line 2257 // switch. 2258 /// 2259 cef_state_t image_shrink_standalone_to_fit; 2260 2261 /// 2262 // Controls whether text areas can be resized. Also configurable using the 2263 // "disable-text-area-resize" command-line switch. 2264 /// 2265 cef_state_t text_area_resize; 2266 2267 /// 2268 // Controls whether the tab key can advance focus to links. Also configurable 2269 // using the "disable-tab-to-links" command-line switch. 2270 /// 2271 cef_state_t tab_to_links; 2272 2273 /// 2274 // Controls whether local storage can be used. Also configurable using the 2275 // "disable-local-storage" command-line switch. 2276 /// 2277 cef_state_t local_storage; 2278 2279 /// 2280 // Controls whether databases can be used. Also configurable using the 2281 // "disable-databases" command-line switch. 2282 /// 2283 cef_state_t databases; 2284 2285 /// 2286 // Controls whether WebGL can be used. Note that WebGL requires hardware 2287 // support and may not work on all systems even when enabled. Also 2288 // configurable using the "disable-webgl" command-line switch. 2289 /// 2290 cef_state_t webgl; 2291 2292 /// 2293 // Background color used for the browser before a document is loaded and when 2294 // no document color is specified. The alpha component must be either fully 2295 // opaque (0xFF) or fully transparent (0x00). If the alpha component is fully 2296 // opaque then the RGB components will be used as the background color. If the 2297 // alpha component is fully transparent for a windowed browser then the 2298 // CefSettings.background_color value will be used. If the alpha component is 2299 // fully transparent for a windowless (off-screen) browser then transparent 2300 // painting will be enabled. 2301 /// 2302 cef_color_t background_color; 2303 2304 /// 2305 // Comma delimited ordered list of language codes without any whitespace that 2306 // will be used in the "Accept-Language" HTTP header. May be set globally 2307 // using the CefSettings.accept_language_list value. If both values are 2308 // empty then "en-US,en" will be used. 2309 /// 2310 cef_string_t accept_language_list; 2311 } 2312 2313 2314 2315 /// 2316 // Return value types. 2317 /// 2318 enum cef_return_value_t 2319 { 2320 /// 2321 // Cancel immediately. 2322 /// 2323 RV_CANCEL = 0, 2324 2325 /// 2326 // Continue immediately. 2327 /// 2328 RV_CONTINUE = 1, 2329 2330 /// 2331 // Continue asynchronously (usually via a callback). 2332 /// 2333 RV_CONTINUE_ASYNC = 2 2334 } 2335 2336 /// 2337 // URL component parts. 2338 /// 2339 struct cef_urlparts_t 2340 { 2341 /// 2342 // The complete URL specification. 2343 /// 2344 cef_string_t spec; 2345 2346 /// 2347 // Scheme component not including the colon (e.g., "http"). 2348 /// 2349 cef_string_t scheme; 2350 2351 /// 2352 // User name component. 2353 /// 2354 cef_string_t username; 2355 2356 /// 2357 // Password component. 2358 /// 2359 cef_string_t password; 2360 2361 /// 2362 // Host component. This may be a hostname, an IPv4 address or an IPv6 literal 2363 // surrounded by square brackets (e.g., "[2001:db8::1]"). 2364 /// 2365 cef_string_t host; 2366 2367 /// 2368 // Port number component. 2369 /// 2370 cef_string_t port; 2371 2372 /// 2373 // Origin contains just the scheme, host, and port from a URL. Equivalent to 2374 // clearing any username and password, replacing the path with a slash, and 2375 // clearing everything after that. This value will be empty for non-standard 2376 // URLs. 2377 /// 2378 cef_string_t origin; 2379 2380 /// 2381 // Path component including the first slash following the host. 2382 /// 2383 cef_string_t path; 2384 2385 /// 2386 // Query string component (i.e., everything following the '?'). 2387 /// 2388 cef_string_t query; 2389 2390 /// 2391 // Fragment (hash) identifier component (i.e., the string following the '#'). 2392 /// 2393 cef_string_t fragment; 2394 } 2395 2396 2397 2398 /// 2399 // Cookie priority values. 2400 /// 2401 enum cef_cookie_priority_t 2402 { 2403 CEF_COOKIE_PRIORITY_LOW = -1, 2404 CEF_COOKIE_PRIORITY_MEDIUM = 0, 2405 CEF_COOKIE_PRIORITY_HIGH = 1 2406 } 2407 2408 /// 2409 // Cookie same site values. 2410 /// 2411 enum cef_cookie_same_site_t 2412 { 2413 CEF_COOKIE_SAME_SITE_UNSPECIFIED = 0, 2414 CEF_COOKIE_SAME_SITE_NO_RESTRICTION = 1, 2415 CEF_COOKIE_SAME_SITE_LAX_MODE = 2, 2416 CEF_COOKIE_SAME_SITE_STRICT_MODE = 3 2417 } 2418 2419 /// 2420 // Cookie information. 2421 /// 2422 struct cef_cookie_t 2423 { 2424 /// 2425 // The cookie name. 2426 /// 2427 cef_string_t name; 2428 2429 /// 2430 // The cookie value. 2431 /// 2432 cef_string_t value; 2433 2434 /// 2435 // If |domain| is empty a host cookie will be created instead of a domain 2436 // cookie. Domain cookies are stored with a leading "." and are visible to 2437 // sub-domains whereas host cookies are not. 2438 /// 2439 cef_string_t domain; 2440 2441 /// 2442 // If |path| is non-empty only URLs at or below the path will get the cookie 2443 // value. 2444 /// 2445 cef_string_t path; 2446 2447 /// 2448 // If |secure| is true the cookie will only be sent for HTTPS requests. 2449 /// 2450 int secure; 2451 2452 /// 2453 // If |httponly| is true the cookie will only be sent for HTTP requests. 2454 /// 2455 int httponly; 2456 2457 /// 2458 // The cookie creation date. This is automatically populated by the system on 2459 // cookie creation. 2460 /// 2461 cef_time_t creation; 2462 2463 /// 2464 // The cookie last access date. This is automatically populated by the system 2465 // on access. 2466 /// 2467 cef_time_t last_access; 2468 2469 /// 2470 // The cookie expiration date is only valid if |has_expires| is true. 2471 /// 2472 int has_expires; 2473 cef_time_t expires; 2474 2475 /// 2476 // Same site. 2477 /// 2478 cef_cookie_same_site_t same_site; 2479 2480 /// 2481 // Priority. 2482 /// 2483 cef_cookie_priority_t priority; 2484 } 2485 2486 2487 2488 /// 2489 // Process termination status values. 2490 /// 2491 enum cef_termination_status_t 2492 { 2493 /// 2494 // Non-zero exit status. 2495 /// 2496 TS_ABNORMAL_TERMINATION = 0, 2497 2498 /// 2499 // SIGKILL or task manager kill. 2500 /// 2501 TS_PROCESS_WAS_KILLED = 1, 2502 2503 /// 2504 // Segmentation fault. 2505 /// 2506 TS_PROCESS_CRASHED = 2, 2507 2508 /// 2509 // Out of memory. Some platforms may use TS_PROCESS_CRASHED instead. 2510 /// 2511 TS_PROCESS_OOM = 3 2512 } 2513 2514 /// 2515 // Path key values. 2516 /// 2517 enum cef_path_key_t 2518 { 2519 /// 2520 // Current directory. 2521 /// 2522 PK_DIR_CURRENT = 0, 2523 2524 /// 2525 // Directory containing PK_FILE_EXE. 2526 /// 2527 PK_DIR_EXE = 1, 2528 2529 /// 2530 // Directory containing PK_FILE_MODULE. 2531 /// 2532 PK_DIR_MODULE = 2, 2533 2534 /// 2535 // Temporary directory. 2536 /// 2537 PK_DIR_TEMP = 3, 2538 2539 /// 2540 // Path and filename of the current executable. 2541 /// 2542 PK_FILE_EXE = 4, 2543 2544 /// 2545 // Path and filename of the module containing the CEF code (usually the libcef 2546 // module). 2547 /// 2548 PK_FILE_MODULE = 5, 2549 2550 /// 2551 // "Local Settings\Application Data" directory under the user profile 2552 // directory on Windows. 2553 /// 2554 PK_LOCAL_APP_DATA = 6, 2555 2556 /// 2557 // "Application Data" directory under the user profile directory on Windows 2558 // and "~/Library/Application Support" directory on MacOS. 2559 /// 2560 PK_USER_DATA = 7, 2561 2562 /// 2563 // Directory containing application resources. Can be configured via 2564 // CefSettings.resources_dir_path. 2565 /// 2566 PK_DIR_RESOURCES = 8 2567 } 2568 2569 /// 2570 // Storage types. 2571 /// 2572 enum cef_storage_type_t 2573 { 2574 ST_LOCALSTORAGE = 0, 2575 ST_SESSIONSTORAGE = 1 2576 } 2577 2578 /// 2579 // Supported error code values. 2580 /// 2581 enum cef_errorcode_t 2582 { 2583 // No error. 2584 ERR_NONE = 0, 2585 ERR_IO_PENDING = -1, 2586 ERR_FAILED = -2, 2587 ERR_ABORTED = -3, 2588 ERR_INVALID_ARGUMENT = -4, 2589 ERR_INVALID_HANDLE = -5, 2590 ERR_FILE_NOT_FOUND = -6, 2591 ERR_TIMED_OUT = -7, 2592 ERR_FILE_TOO_BIG = -8, 2593 ERR_UNEXPECTED = -9, 2594 ERR_ACCESS_DENIED = -10, 2595 ERR_NOT_IMPLEMENTED = -11, 2596 ERR_INSUFFICIENT_RESOURCES = -12, 2597 ERR_OUT_OF_MEMORY = -13, 2598 ERR_UPLOAD_FILE_CHANGED = -14, 2599 ERR_SOCKET_NOT_CONNECTED = -15, 2600 ERR_FILE_EXISTS = -16, 2601 ERR_FILE_PATH_TOO_LONG = -17, 2602 ERR_FILE_NO_SPACE = -18, 2603 ERR_FILE_VIRUS_INFECTED = -19, 2604 ERR_BLOCKED_BY_CLIENT = -20, 2605 ERR_NETWORK_CHANGED = -21, 2606 ERR_BLOCKED_BY_ADMINISTRATOR = -22, 2607 ERR_SOCKET_IS_CONNECTED = -23, 2608 ERR_BLOCKED_ENROLLMENT_CHECK_PENDING = -24, 2609 ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = -25, 2610 ERR_CONTEXT_SHUT_DOWN = -26, 2611 ERR_BLOCKED_BY_RESPONSE = -27, 2612 ERR_CLEARTEXT_NOT_PERMITTED = -29, 2613 ERR_BLOCKED_BY_CSP = -30, 2614 ERR_H2_OR_QUIC_REQUIRED = -31, 2615 ERR_CONNECTION_CLOSED = -100, 2616 ERR_CONNECTION_RESET = -101, 2617 ERR_CONNECTION_REFUSED = -102, 2618 ERR_CONNECTION_ABORTED = -103, 2619 ERR_CONNECTION_FAILED = -104, 2620 ERR_NAME_NOT_RESOLVED = -105, 2621 ERR_INTERNET_DISCONNECTED = -106, 2622 ERR_SSL_PROTOCOL_ERROR = -107, 2623 ERR_ADDRESS_INVALID = -108, 2624 ERR_ADDRESS_UNREACHABLE = -109, 2625 ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110, 2626 ERR_TUNNEL_CONNECTION_FAILED = -111, 2627 ERR_NO_SSL_VERSIONS_ENABLED = -112, 2628 ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113, 2629 ERR_SSL_RENEGOTIATION_REQUESTED = -114, 2630 ERR_PROXY_AUTH_UNSUPPORTED = -115, 2631 ERR_CERT_ERROR_IN_SSL_RENEGOTIATION = -116, 2632 ERR_BAD_SSL_CLIENT_AUTH_CERT = -117, 2633 ERR_CONNECTION_TIMED_OUT = -118, 2634 ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = -119, 2635 ERR_SOCKS_CONNECTION_FAILED = -120, 2636 ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = -121, 2637 ERR_ALPN_NEGOTIATION_FAILED = -122, 2638 ERR_SSL_NO_RENEGOTIATION = -123, 2639 ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = -124, 2640 ERR_SSL_DECOMPRESSION_FAILURE_ALERT = -125, 2641 ERR_SSL_BAD_RECORD_MAC_ALERT = -126, 2642 ERR_PROXY_AUTH_REQUESTED = -127, 2643 ERR_PROXY_CONNECTION_FAILED = -130, 2644 ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = -131, 2645 ERR_PRECONNECT_MAX_SOCKET_LIMIT = -133, 2646 ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = -134, 2647 ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = -135, 2648 ERR_PROXY_CERTIFICATE_INVALID = -136, 2649 ERR_NAME_RESOLUTION_FAILED = -137, 2650 ERR_NETWORK_ACCESS_DENIED = -138, 2651 ERR_TEMPORARILY_THROTTLED = -139, 2652 ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = -140, 2653 ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = -141, 2654 ERR_MSG_TOO_BIG = -142, 2655 ERR_WS_PROTOCOL_ERROR = -145, 2656 ERR_ADDRESS_IN_USE = -147, 2657 ERR_SSL_HANDSHAKE_NOT_COMPLETED = -148, 2658 ERR_SSL_BAD_PEER_PUBLIC_KEY = -149, 2659 ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = -150, 2660 ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = -151, 2661 ERR_SSL_DECRYPT_ERROR_ALERT = -153, 2662 ERR_WS_THROTTLE_QUEUE_TOO_LARGE = -154, 2663 ERR_SSL_SERVER_CERT_CHANGED = -156, 2664 ERR_SSL_UNRECOGNIZED_NAME_ALERT = -159, 2665 ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = -160, 2666 ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = -161, 2667 ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = -162, 2668 ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = -163, 2669 ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = -164, 2670 ERR_ICANN_NAME_COLLISION = -166, 2671 ERR_SSL_SERVER_CERT_BAD_FORMAT = -167, 2672 ERR_CT_STH_PARSING_FAILED = -168, 2673 ERR_CT_STH_INCOMPLETE = -169, 2674 ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = -170, 2675 ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = -171, 2676 ERR_SSL_OBSOLETE_CIPHER = -172, 2677 ERR_WS_UPGRADE = -173, 2678 ERR_READ_IF_READY_NOT_IMPLEMENTED = -174, 2679 ERR_NO_BUFFER_SPACE = -176, 2680 ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = -177, 2681 ERR_EARLY_DATA_REJECTED = -178, 2682 ERR_WRONG_VERSION_ON_EARLY_DATA = -179, 2683 ERR_TLS13_DOWNGRADE_DETECTED = -180, 2684 ERR_SSL_KEY_USAGE_INCOMPATIBLE = -181, 2685 ERR_CERT_COMMON_NAME_INVALID = -200, 2686 ERR_CERT_DATE_INVALID = -201, 2687 ERR_CERT_AUTHORITY_INVALID = -202, 2688 ERR_CERT_CONTAINS_ERRORS = -203, 2689 ERR_CERT_NO_REVOCATION_MECHANISM = -204, 2690 ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205, 2691 ERR_CERT_REVOKED = -206, 2692 ERR_CERT_INVALID = -207, 2693 ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208, 2694 ERR_CERT_NON_UNIQUE_NAME = -210, 2695 ERR_CERT_WEAK_KEY = -211, 2696 ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212, 2697 ERR_CERT_VALIDITY_TOO_LONG = -213, 2698 ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = -214, 2699 ERR_CERT_SYMANTEC_LEGACY = -215, 2700 ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = -217, 2701 ERR_SSL_OBSOLETE_VERSION = -218, 2702 ERR_CERT_END = -219, 2703 ERR_INVALID_URL = -300, 2704 ERR_DISALLOWED_URL_SCHEME = -301, 2705 ERR_UNKNOWN_URL_SCHEME = -302, 2706 ERR_INVALID_REDIRECT = -303, 2707 ERR_TOO_MANY_REDIRECTS = -310, 2708 ERR_UNSAFE_REDIRECT = -311, 2709 ERR_UNSAFE_PORT = -312, 2710 ERR_INVALID_RESPONSE = -320, 2711 ERR_INVALID_CHUNKED_ENCODING = -321, 2712 ERR_METHOD_NOT_SUPPORTED = -322, 2713 ERR_UNEXPECTED_PROXY_AUTH = -323, 2714 ERR_EMPTY_RESPONSE = -324, 2715 ERR_RESPONSE_HEADERS_TOO_BIG = -325, 2716 ERR_PAC_SCRIPT_FAILED = -327, 2717 ERR_REQUEST_RANGE_NOT_SATISFIABLE = -328, 2718 ERR_MALFORMED_IDENTITY = -329, 2719 ERR_CONTENT_DECODING_FAILED = -330, 2720 ERR_NETWORK_IO_SUSPENDED = -331, 2721 ERR_SYN_REPLY_NOT_RECEIVED = -332, 2722 ERR_ENCODING_CONVERSION_FAILED = -333, 2723 ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = -334, 2724 ERR_NO_SUPPORTED_PROXIES = -336, 2725 ERR_HTTP2_PROTOCOL_ERROR = -337, 2726 ERR_INVALID_AUTH_CREDENTIALS = -338, 2727 ERR_UNSUPPORTED_AUTH_SCHEME = -339, 2728 ERR_ENCODING_DETECTION_FAILED = -340, 2729 ERR_MISSING_AUTH_CREDENTIALS = -341, 2730 ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = -342, 2731 ERR_MISCONFIGURED_AUTH_ENVIRONMENT = -343, 2732 ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = -344, 2733 ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = -345, 2734 ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = -346, 2735 ERR_INCOMPLETE_HTTP2_HEADERS = -347, 2736 ERR_PAC_NOT_IN_DHCP = -348, 2737 ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = -349, 2738 ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = -350, 2739 ERR_HTTP2_SERVER_REFUSED_STREAM = -351, 2740 ERR_HTTP2_PING_FAILED = -352, 2741 ERR_CONTENT_LENGTH_MISMATCH = -354, 2742 ERR_INCOMPLETE_CHUNKED_ENCODING = -355, 2743 ERR_QUIC_PROTOCOL_ERROR = -356, 2744 ERR_RESPONSE_HEADERS_TRUNCATED = -357, 2745 ERR_QUIC_HANDSHAKE_FAILED = -358, 2746 ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = -360, 2747 ERR_HTTP2_FLOW_CONTROL_ERROR = -361, 2748 ERR_HTTP2_FRAME_SIZE_ERROR = -362, 2749 ERR_HTTP2_COMPRESSION_ERROR = -363, 2750 ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = -364, 2751 ERR_HTTP_1_1_REQUIRED = -365, 2752 ERR_PROXY_HTTP_1_1_REQUIRED = -366, 2753 ERR_PAC_SCRIPT_TERMINATED = -367, 2754 ERR_INVALID_HTTP_RESPONSE = -370, 2755 ERR_CONTENT_DECODING_INIT_FAILED = -371, 2756 ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = -372, 2757 ERR_HTTP2_PUSHED_STREAM_NOT_AVAILABLE = -373, 2758 ERR_HTTP2_CLAIMED_PUSHED_STREAM_RESET_BY_SERVER = -374, 2759 ERR_TOO_MANY_RETRIES = -375, 2760 ERR_HTTP2_STREAM_CLOSED = -376, 2761 ERR_HTTP2_CLIENT_REFUSED_STREAM = -377, 2762 ERR_HTTP2_PUSHED_RESPONSE_DOES_NOT_MATCH = -378, 2763 ERR_HTTP_RESPONSE_CODE_FAILURE = -379, 2764 ERR_QUIC_CERT_ROOT_NOT_KNOWN = -380, 2765 ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = -381, 2766 ERR_CACHE_MISS = -400, 2767 ERR_CACHE_READ_FAILURE = -401, 2768 ERR_CACHE_WRITE_FAILURE = -402, 2769 ERR_CACHE_OPERATION_NOT_SUPPORTED = -403, 2770 ERR_CACHE_OPEN_FAILURE = -404, 2771 ERR_CACHE_CREATE_FAILURE = -405, 2772 2773 /// 2774 // Supported certificate status code values. See net\cert\cert_status_flags.h 2775 ERR_CACHE_RACE = -406, 2776 // for more information. CERT_STATUS_NONE is new in CEF because we use an 2777 // enum while cert_status_flags.h uses a typedef and static const variables. 2778 /// 2779 ERR_CACHE_CHECKSUM_READ_FAILURE = -407, 2780 2781 // 1 << 3 is reserved for ERR_CERT_CONTAINS_ERRORS (not useful with WinHTTP). 2782 ERR_CACHE_CHECKSUM_MISMATCH = -408, 2783 2784 // 1 << 9 was used for CERT_STATUS_NOT_IN_DNS 2785 ERR_CACHE_LOCK_TIMEOUT = -409, 2786 2787 // 1 << 12 was used for CERT_STATUS_WEAK_DH_KEY 2788 ERR_CACHE_AUTH_FAILURE_AFTER_READ = -410, 2789 2790 // Bits 16 to 31 are for non-error statuses. 2791 2792 // Bit 18 was CERT_STATUS_IS_DNSSEC 2793 ERR_CACHE_ENTRY_NOT_SUITABLE = -411, 2794 ERR_CACHE_DOOM_FAILURE = -412, 2795 2796 /// 2797 // The manner in which a link click should be opened. These constants match 2798 // their equivalents in Chromium's window_open_disposition.h and should not be 2799 ERR_CACHE_OPEN_OR_CREATE_FAILURE = -413, 2800 // renumbered. 2801 /// 2802 ERR_INSECURE_RESPONSE = -501, 2803 ERR_NO_PRIVATE_KEY_FOR_CERT = -502, 2804 2805 /// 2806 // "Verb" of a drag-and-drop operation as negotiated between the source and 2807 ERR_ADD_USER_CERT_FAILED = -503, 2808 // destination. These constants match their equivalents in WebCore's 2809 ERR_INVALID_SIGNED_EXCHANGE = -504, 2810 // DragActions.h and should not be renumbered. 2811 /// 2812 ERR_INVALID_WEB_BUNDLE = -505, 2813 ERR_TRUST_TOKEN_OPERATION_FAILED = -506, 2814 2815 /// 2816 // Input mode of a virtual keyboard. These constants match their equivalents 2817 // in Chromium's text_input_mode.h and should not be renumbered. 2818 // See https://html.spec.whatwg.org/#input-modalities:-the-inputmode-attribute 2819 /// 2820 ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = -507, 2821 2822 /// 2823 // V8 access control values. 2824 ERR_FTP_FAILED = -601, 2825 /// 2826 ERR_FTP_SERVICE_UNAVAILABLE = -602, 2827 2828 /// 2829 // V8 property attribute values. 2830 ERR_FTP_TRANSFER_ABORTED = -603, 2831 /// 2832 2833 // Writeable, Enumerable, 2834 // Configurable 2835 ERR_FTP_FILE_BUSY = -604, 2836 // Not writeable 2837 // Not enumerable 2838 ERR_FTP_SYNTAX_ERROR = -605, 2839 // Not configurable 2840 2841 /// 2842 // Post data elements may represent either bytes or files. 2843 ERR_FTP_COMMAND_NOT_SUPPORTED = -606, 2844 /// 2845 2846 /// 2847 ERR_FTP_BAD_COMMAND_SEQUENCE = -607, 2848 // Resource type for a request. 2849 /// 2850 2851 /// 2852 // Top level page. 2853 /// 2854 ERR_PKCS12_IMPORT_BAD_PASSWORD = -701, 2855 2856 /// 2857 // Frame or iframe. 2858 /// 2859 2860 /// 2861 // CSS stylesheet. 2862 ERR_PKCS12_IMPORT_FAILED = -702, 2863 /// 2864 2865 /// 2866 // External script. 2867 /// 2868 2869 /// 2870 ERR_IMPORT_CA_CERT_NOT_CA = -703, 2871 // Image (jpg/gif/png/etc). 2872 /// 2873 2874 /// 2875 // Font. 2876 /// 2877 2878 /// 2879 // Some other subresource. This is the default type if the actual type is 2880 // unknown. 2881 /// 2882 2883 /// 2884 ERR_IMPORT_CERT_ALREADY_EXISTS = -704, 2885 // Object (or embed) tag for a plugin, or a resource that a plugin requested. 2886 /// 2887 ERR_IMPORT_CA_CERT_FAILED = -705, 2888 2889 /// 2890 // Media resource. 2891 /// 2892 2893 /// 2894 // Main resource of a dedicated worker. 2895 ERR_IMPORT_SERVER_CERT_FAILED = -706, 2896 /// 2897 2898 /// 2899 // Main resource of a shared worker. 2900 /// 2901 ERR_PKCS12_IMPORT_INVALID_MAC = -707, 2902 2903 /// 2904 // Explicitly requested prefetch. 2905 /// 2906 2907 /// 2908 // Favicon. 2909 /// 2910 ERR_PKCS12_IMPORT_INVALID_FILE = -708, 2911 2912 /// 2913 // XMLHttpRequest. 2914 /// 2915 2916 /// 2917 // A request for a <ping> 2918 /// 2919 ERR_PKCS12_IMPORT_UNSUPPORTED = -709, 2920 2921 /// 2922 // Main resource of a service worker. 2923 /// 2924 ERR_KEY_GENERATION_FAILED = -710, 2925 2926 /// 2927 // A report of Content Security Policy violations. 2928 /// 2929 2930 /// 2931 // A resource that a plugin requested. 2932 ERR_PRIVATE_KEY_EXPORT_FAILED = -712, 2933 /// 2934 2935 /// 2936 // A main-frame service worker navigation preload request. 2937 ERR_SELF_SIGNED_CERT_GENERATION_FAILED = -713, 2938 /// 2939 2940 /// 2941 // A sub-frame service worker navigation preload request. 2942 ERR_CERT_DATABASE_CHANGED = -714, 2943 /// 2944 2945 /// 2946 // Transition type for a request. Made up of one source value and 0 or more 2947 // qualifiers. 2948 ERR_DNS_MALFORMED_RESPONSE = -800, 2949 /// 2950 2951 /// 2952 // Source is a link click or the JavaScript window.open function. This is 2953 ERR_DNS_SERVER_REQUIRES_TCP = -801, 2954 // also the default value for requests like sub-resource loads that are not 2955 // navigations. 2956 /// 2957 2958 /// 2959 // Source is some other "explicit" navigation. This is the default value for 2960 // navigations where the actual type is unknown. See also TT_DIRECT_LOAD_FLAG. 2961 /// 2962 2963 /// 2964 // Source is a subframe navigation. This is any content that is automatically 2965 // loaded in a non-toplevel frame. For example, if a page consists of several 2966 ERR_DNS_SERVER_FAILED = -802, 2967 // frames containing ads, those ad URLs will have this transition type. 2968 ERR_DNS_TIMED_OUT = -803, 2969 // The user may not even realize the content in these pages is a separate 2970 // frame, so may not care about the URL. 2971 /// 2972 2973 /// 2974 // Source is a subframe navigation explicitly requested by the user that will 2975 // generate new navigation entries in the back/forward list. These are 2976 ERR_DNS_CACHE_MISS = -804, 2977 // probably more important than frames that were automatically loaded in 2978 ERR_DNS_SEARCH_EMPTY = -805, 2979 // the background because the user probably cares about the fact that this 2980 ERR_DNS_SORT_ERROR = -806, 2981 // link was loaded. 2982 /// 2983 2984 /// 2985 // Source is a form submission by the user. NOTE: In some situations 2986 // submitting a form does not result in this transition type. This can happen 2987 ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = -808, 2988 // if the form uses a script to submit the contents. 2989 /// 2990 2991 /// 2992 // Source is a "reload" of the page via the Reload function or by re-visiting 2993 ERR_DNS_NAME_HTTPS_ONLY = -809 2994 } 2995 2996 enum cef_cert_status_t 2997 { 2998 CERT_STATUS_NONE = 0, 2999 CERT_STATUS_COMMON_NAME_INVALID = 1 << 0, 3000 CERT_STATUS_DATE_INVALID = 1 << 1, 3001 CERT_STATUS_AUTHORITY_INVALID = 1 << 2, 3002 CERT_STATUS_NO_REVOCATION_MECHANISM = 1 << 4, 3003 CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = 1 << 5, 3004 CERT_STATUS_REVOKED = 1 << 6, 3005 CERT_STATUS_INVALID = 1 << 7, 3006 CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = 1 << 8, 3007 CERT_STATUS_NON_UNIQUE_NAME = 1 << 10, 3008 CERT_STATUS_WEAK_KEY = 1 << 11, 3009 CERT_STATUS_PINNED_KEY_MISSING = 1 << 13, 3010 CERT_STATUS_NAME_CONSTRAINT_VIOLATION = 1 << 14, 3011 CERT_STATUS_VALIDITY_TOO_LONG = 1 << 15, 3012 CERT_STATUS_IS_EV = 1 << 16, 3013 CERT_STATUS_REV_CHECKING_ENABLED = 1 << 17, 3014 CERT_STATUS_SHA1_SIGNATURE_PRESENT = 1 << 19, 3015 CERT_STATUS_CT_COMPLIANCE_FAILED = 1 << 20 3016 } 3017 3018 enum cef_window_open_disposition_t 3019 { 3020 WOD_UNKNOWN = 0, 3021 WOD_CURRENT_TAB = 1, 3022 WOD_SINGLETON_TAB = 2, 3023 WOD_NEW_FOREGROUND_TAB = 3, 3024 WOD_NEW_BACKGROUND_TAB = 4, 3025 WOD_NEW_POPUP = 5, 3026 WOD_NEW_WINDOW = 6, 3027 WOD_SAVE_TO_DISK = 7, 3028 WOD_OFF_THE_RECORD = 8, 3029 WOD_IGNORE_ACTION = 9 3030 } 3031 3032 enum cef_drag_operations_mask_t 3033 { 3034 DRAG_OPERATION_NONE = 0, 3035 DRAG_OPERATION_COPY = 1, 3036 DRAG_OPERATION_LINK = 2, 3037 DRAG_OPERATION_GENERIC = 4, 3038 DRAG_OPERATION_PRIVATE = 8, 3039 DRAG_OPERATION_MOVE = 16, 3040 DRAG_OPERATION_DELETE = 32, 3041 DRAG_OPERATION_EVERY = UINT_MAX 3042 } 3043 3044 enum cef_text_input_mode_t 3045 { 3046 CEF_TEXT_INPUT_MODE_DEFAULT = 0, 3047 CEF_TEXT_INPUT_MODE_NONE = 1, 3048 CEF_TEXT_INPUT_MODE_TEXT = 2, 3049 CEF_TEXT_INPUT_MODE_TEL = 3, 3050 CEF_TEXT_INPUT_MODE_URL = 4, 3051 CEF_TEXT_INPUT_MODE_EMAIL = 5, 3052 CEF_TEXT_INPUT_MODE_NUMERIC = 6, 3053 CEF_TEXT_INPUT_MODE_DECIMAL = 7, 3054 CEF_TEXT_INPUT_MODE_SEARCH = 8, 3055 CEF_TEXT_INPUT_MODE_MAX = CEF_TEXT_INPUT_MODE_SEARCH 3056 } 3057 3058 enum cef_v8_accesscontrol_t 3059 { 3060 V8_ACCESS_CONTROL_DEFAULT = 0, 3061 V8_ACCESS_CONTROL_ALL_CAN_READ = 1, 3062 V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1, 3063 V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = 1 << 2 3064 } 3065 3066 enum cef_v8_propertyattribute_t 3067 { 3068 V8_PROPERTY_ATTRIBUTE_NONE = 0, 3069 V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0, 3070 V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1, 3071 V8_PROPERTY_ATTRIBUTE_DONTDELETE = 1 << 2 3072 } 3073 3074 enum cef_postdataelement_type_t 3075 { 3076 PDE_TYPE_EMPTY = 0, 3077 PDE_TYPE_BYTES = 1, 3078 PDE_TYPE_FILE = 2 3079 } 3080 3081 enum cef_resource_type_t 3082 { 3083 RT_MAIN_FRAME = 0, 3084 RT_SUB_FRAME = 1, 3085 RT_STYLESHEET = 2, 3086 RT_SCRIPT = 3, 3087 RT_IMAGE = 4, 3088 RT_FONT_RESOURCE = 5, 3089 RT_SUB_RESOURCE = 6, 3090 RT_OBJECT = 7, 3091 RT_MEDIA = 8, 3092 RT_WORKER = 9, 3093 RT_SHARED_WORKER = 10, 3094 RT_PREFETCH = 11, 3095 RT_FAVICON = 12, 3096 RT_XHR = 13, 3097 RT_PING = 14, 3098 RT_SERVICE_WORKER = 15, 3099 RT_CSP_REPORT = 16, 3100 RT_PLUGIN_RESOURCE = 17, 3101 RT_NAVIGATION_PRELOAD_MAIN_FRAME = 19, 3102 RT_NAVIGATION_PRELOAD_SUB_FRAME = 20 3103 } 3104 3105 enum cef_transition_type_t 3106 { 3107 TT_LINK = 0, 3108 TT_EXPLICIT = 1, 3109 TT_AUTO_SUBFRAME = 3, 3110 TT_MANUAL_SUBFRAME = 4, 3111 TT_FORM_SUBMIT = 7, 3112 // the same URL. NOTE: This is distinct from the concept of whether a 3113 // particular load uses "reload semantics" (i.e. bypasses cached data). 3114 /// 3115 TT_RELOAD = 8, 3116 3117 /// 3118 // General mask defining the bits used for the source values. 3119 /// 3120 TT_SOURCE_MASK = 0xFF, 3121 3122 // Qualifiers. 3123 // Any of the core values above can be augmented by one or more qualifiers. 3124 // These qualifiers further define the transition. 3125 3126 /// 3127 // Attempted to visit a URL but was blocked. 3128 /// 3129 TT_BLOCKED_FLAG = 0x00800000, 3130 3131 /// 3132 // Used the Forward or Back function to navigate among browsing history. 3133 // Will be ORed to the transition type for the original load. 3134 /// 3135 TT_FORWARD_BACK_FLAG = 0x01000000, 3136 3137 /// 3138 // Loaded a URL directly via CreateBrowser, LoadURL or LoadRequest. 3139 /// 3140 TT_DIRECT_LOAD_FLAG = 0x02000000, 3141 3142 /// 3143 // The beginning of a navigation chain. 3144 /// 3145 TT_CHAIN_START_FLAG = 0x10000000, 3146 3147 /// 3148 // The last transition in a redirect chain. 3149 /// 3150 TT_CHAIN_END_FLAG = 0x20000000, 3151 3152 /// 3153 // Redirects caused by JavaScript or a meta refresh tag on the page. 3154 /// 3155 TT_CLIENT_REDIRECT_FLAG = 0x40000000, 3156 3157 /// 3158 // Redirects sent from the server by HTTP headers. 3159 /// 3160 TT_SERVER_REDIRECT_FLAG = 0x80000000, 3161 3162 /// 3163 // Used to test whether a transition involves a redirect. 3164 /// 3165 TT_IS_REDIRECT_MASK = 0xC0000000, 3166 3167 /// 3168 // General mask defining the bits used for the qualifiers. 3169 /// 3170 TT_QUALIFIER_MASK = 0xFFFFFF00 3171 } 3172 3173 /// 3174 // Flags used to customize the behavior of CefURLRequest. 3175 /// 3176 enum cef_urlrequest_flags_t 3177 { 3178 /// 3179 // Default behavior. 3180 /// 3181 UR_FLAG_NONE = 0, 3182 3183 /// 3184 // If set the cache will be skipped when handling the request. Setting this 3185 // value is equivalent to specifying the "Cache-Control: no-cache" request 3186 // header. Setting this value in combination with UR_FLAG_ONLY_FROM_CACHE will 3187 // cause the request to fail. 3188 /// 3189 UR_FLAG_SKIP_CACHE = 1 << 0, 3190 3191 /// 3192 // If set the request will fail if it cannot be served from the cache (or some 3193 // equivalent local store). Setting this value is equivalent to specifying the 3194 // "Cache-Control: only-if-cached" request header. Setting this value in 3195 // combination with UR_FLAG_SKIP_CACHE or UR_FLAG_DISABLE_CACHE will cause the 3196 // request to fail. 3197 /// 3198 UR_FLAG_ONLY_FROM_CACHE = 1 << 1, 3199 3200 /// 3201 // If set the cache will not be used at all. Setting this value is equivalent 3202 // to specifying the "Cache-Control: no-store" request header. Setting this 3203 // value in combination with UR_FLAG_ONLY_FROM_CACHE will cause the request to 3204 // fail. 3205 /// 3206 UR_FLAG_DISABLE_CACHE = 1 << 2, 3207 3208 /// 3209 // If set user name, password, and cookies may be sent with the request, and 3210 // cookies may be saved from the response. 3211 /// 3212 UR_FLAG_ALLOW_STORED_CREDENTIALS = 1 << 3, 3213 3214 /// 3215 // If set upload progress events will be generated when a request has a body. 3216 /// 3217 UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 4, 3218 3219 /// 3220 // If set the CefURLRequestClient::OnDownloadData method will not be called. 3221 /// 3222 UR_FLAG_NO_DOWNLOAD_DATA = 1 << 5, 3223 3224 /// 3225 // If set 5XX redirect errors will be propagated to the observer instead of 3226 // automatically re-tried. This currently only applies for requests 3227 // originated in the browser process. 3228 /// 3229 UR_FLAG_NO_RETRY_ON_5XX = 1 << 6, 3230 3231 /// 3232 // If set 3XX responses will cause the fetch to halt immediately rather than 3233 // continue through the redirect. 3234 /// 3235 UR_FLAG_STOP_ON_REDIRECT = 1 << 7 3236 } 3237 3238 /// 3239 // Flags that represent CefURLRequest status. 3240 /// 3241 enum cef_urlrequest_status_t 3242 { 3243 /// 3244 // Unknown status. 3245 /// 3246 UR_UNKNOWN = 0, 3247 3248 /// 3249 // Request succeeded. 3250 /// 3251 UR_SUCCESS = 1, 3252 3253 /// 3254 // An IO request is pending, and the caller will be informed when it is 3255 // completed. 3256 /// 3257 UR_IO_PENDING = 2, 3258 3259 /// 3260 // Request was canceled programatically. 3261 /// 3262 UR_CANCELED = 3, 3263 3264 /// 3265 // Request failed for some reason. 3266 /// 3267 UR_FAILED = 4 3268 } 3269 3270 // Structure representing a draggable region. 3271 /// 3272 struct cef_draggable_region_t 3273 { 3274 /// 3275 // Bounds of the region. 3276 /// 3277 cef_rect_t bounds; 3278 3279 /// 3280 // True (1) this this region is draggable and false (0) otherwise. 3281 /// 3282 int draggable; 3283 } 3284 3285 3286 3287 /// 3288 // Existing process IDs. 3289 /// 3290 enum cef_process_id_t 3291 { 3292 /// 3293 // Browser process. 3294 /// 3295 PID_BROWSER = 0, 3296 /// 3297 // Renderer process. 3298 /// 3299 PID_RENDERER = 1 3300 } 3301 3302 /// 3303 // Existing thread IDs. 3304 /// 3305 enum cef_thread_id_t 3306 { 3307 // BROWSER PROCESS THREADS -- Only available in the browser process. 3308 3309 /// 3310 // The main thread in the browser. This will be the same as the main 3311 // application thread if CefInitialize() is called with a 3312 // CefSettings.multi_threaded_message_loop value of false. Do not perform 3313 // blocking tasks on this thread. All tasks posted after 3314 // CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 3315 // are guaranteed to run. This thread will outlive all other CEF threads. 3316 /// 3317 TID_UI = 0, 3318 3319 /// 3320 // Used for blocking tasks (e.g. file system access) where the user won't 3321 // notice if the task takes an arbitrarily long time to complete. All tasks 3322 // posted after CefBrowserProcessHandler::OnContextInitialized() and before 3323 // CefShutdown() are guaranteed to run. 3324 /// 3325 TID_FILE_BACKGROUND = 1, 3326 3327 /// 3328 // Used for blocking tasks (e.g. file system access) that affect UI or 3329 // responsiveness of future user interactions. Do not use if an immediate 3330 // response to a user interaction is expected. All tasks posted after 3331 // CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 3332 // are guaranteed to run. 3333 // Examples: 3334 // - Updating the UI to reflect progress on a long task. 3335 // - Loading data that might be shown in the UI after a future user 3336 // interaction. 3337 /// 3338 TID_FILE_USER_VISIBLE = 2, 3339 3340 /// 3341 // Used for blocking tasks (e.g. file system access) that affect UI 3342 // immediately after a user interaction. All tasks posted after 3343 // CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 3344 // are guaranteed to run. 3345 // Example: Generating data shown in the UI immediately after a click. 3346 /// 3347 TID_FILE_USER_BLOCKING = 3, 3348 3349 /// 3350 // Used to launch and terminate browser processes. 3351 /// 3352 TID_PROCESS_LAUNCHER = 4, 3353 3354 /// 3355 // Used to process IPC and network messages. Do not perform blocking tasks on 3356 // this thread. All tasks posted after 3357 // CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 3358 // are guaranteed to run. 3359 /// 3360 TID_IO = 5, 3361 3362 // RENDER PROCESS THREADS -- Only available in the render process. 3363 3364 /// 3365 // The main thread in the renderer. Used for all WebKit and V8 interaction. 3366 // Tasks may be posted to this thread after 3367 // CefRenderProcessHandler::OnWebKitInitialized but are not guaranteed to 3368 // run before sub-process termination (sub-processes may be killed at any time 3369 // without warning). 3370 /// 3371 TID_RENDERER = 6 3372 } 3373 3374 /// 3375 // Thread priority values listed in increasing order of importance. 3376 /// 3377 enum cef_thread_priority_t 3378 { 3379 /// 3380 // Suitable for threads that shouldn't disrupt high priority work. 3381 /// 3382 TP_BACKGROUND = 0, 3383 3384 /// 3385 // Default priority level. 3386 /// 3387 TP_NORMAL = 1, 3388 3389 /// 3390 // Suitable for threads which generate data for the display (at ~60Hz). 3391 /// 3392 TP_DISPLAY = 2, 3393 3394 /// 3395 // Suitable for low-latency, glitch-resistant audio. 3396 /// 3397 TP_REALTIME_AUDIO = 3 3398 } 3399 3400 /// 3401 // Message loop types. Indicates the set of asynchronous events that a message 3402 // loop can process. 3403 /// 3404 enum cef_message_loop_type_t 3405 { 3406 /// 3407 // Supports tasks and timers. 3408 /// 3409 ML_TYPE_DEFAULT = 0, 3410 3411 /// 3412 // Supports tasks, timers and native UI events (e.g. Windows messages). 3413 /// 3414 ML_TYPE_UI = 1, 3415 3416 /// 3417 // Supports tasks, timers and asynchronous IO events. 3418 /// 3419 ML_TYPE_IO = 2 3420 } 3421 3422 /// 3423 // Windows COM initialization mode. Specifies how COM will be initialized for a 3424 // new thread. 3425 /// 3426 enum cef_com_init_mode_t 3427 { 3428 /// 3429 // No COM initialization. 3430 /// 3431 COM_INIT_MODE_NONE = 0, 3432 3433 /// 3434 // Initialize COM using single-threaded apartments. 3435 /// 3436 COM_INIT_MODE_STA = 1, 3437 3438 /// 3439 // Initialize COM using multi-threaded apartments. 3440 /// 3441 COM_INIT_MODE_MTA = 2 3442 } 3443 3444 /// 3445 // Supported value types. 3446 /// 3447 enum cef_value_type_t 3448 { 3449 VTYPE_INVALID = 0, 3450 VTYPE_NULL = 1, 3451 VTYPE_BOOL = 2, 3452 VTYPE_INT = 3, 3453 VTYPE_DOUBLE = 4, 3454 VTYPE_STRING = 5, 3455 VTYPE_BINARY = 6, 3456 VTYPE_DICTIONARY = 7, 3457 VTYPE_LIST = 8 3458 } 3459 3460 /// 3461 // Supported JavaScript dialog types. 3462 /// 3463 enum cef_jsdialog_type_t 3464 { 3465 JSDIALOGTYPE_ALERT = 0, 3466 JSDIALOGTYPE_CONFIRM = 1, 3467 JSDIALOGTYPE_PROMPT = 2 3468 } 3469 3470 /// 3471 // Screen information used when window rendering is disabled. This structure is 3472 // passed as a parameter to CefRenderHandler::GetScreenInfo and should be filled 3473 // in by the client. 3474 /// 3475 struct cef_screen_info_t 3476 { 3477 /// 3478 // Device scale factor. Specifies the ratio between physical and logical 3479 // pixels. 3480 /// 3481 float device_scale_factor; 3482 3483 /// 3484 // The screen depth in bits per pixel. 3485 /// 3486 int depth; 3487 3488 /// 3489 // The bits per color component. This assumes that the colors are balanced 3490 // equally. 3491 /// 3492 int depth_per_component; 3493 3494 /// 3495 // This can be true for black and white printers. 3496 /// 3497 int is_monochrome; 3498 3499 /// 3500 // This is set from the rcMonitor member of MONITORINFOEX, to whit: 3501 // "A RECT structure that specifies the display monitor rectangle, 3502 // expressed in virtual-screen coordinates. Note that if the monitor 3503 // is not the primary display monitor, some of the rectangle's 3504 // coordinates may be negative values." 3505 // 3506 // The |rect| and |available_rect| properties are used to determine the 3507 // available surface for rendering popup views. 3508 /// 3509 cef_rect_t rect; 3510 3511 /// 3512 // This is set from the rcWork member of MONITORINFOEX, to whit: 3513 // "A RECT structure that specifies the work area rectangle of the 3514 // display monitor that can be used by applications, expressed in 3515 // virtual-screen coordinates. Windows uses this rectangle to 3516 // maximize an application on the monitor. The rest of the area in 3517 // rcMonitor contains system windows such as the task bar and side 3518 // bars. Note that if the monitor is not the primary display monitor, 3519 // some of the rectangle's coordinates may be negative values". 3520 // 3521 // The |rect| and |available_rect| properties are used to determine the 3522 // available surface for rendering popup views. 3523 /// 3524 cef_rect_t available_rect; 3525 } 3526 3527 3528 3529 /// 3530 // Supported menu IDs. Non-English translations can be provided for the 3531 // IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString(). 3532 /// 3533 enum cef_menu_id_t 3534 { 3535 // Navigation. 3536 MENU_ID_BACK = 100, 3537 MENU_ID_FORWARD = 101, 3538 MENU_ID_RELOAD = 102, 3539 MENU_ID_RELOAD_NOCACHE = 103, 3540 MENU_ID_STOPLOAD = 104, 3541 3542 // Editing. 3543 MENU_ID_UNDO = 110, 3544 MENU_ID_REDO = 111, 3545 MENU_ID_CUT = 112, 3546 MENU_ID_COPY = 113, 3547 MENU_ID_PASTE = 114, 3548 MENU_ID_DELETE = 115, 3549 MENU_ID_SELECT_ALL = 116, 3550 3551 // Miscellaneous. 3552 MENU_ID_FIND = 130, 3553 MENU_ID_PRINT = 131, 3554 MENU_ID_VIEW_SOURCE = 132, 3555 3556 // Spell checking word correction suggestions. 3557 MENU_ID_SPELLCHECK_SUGGESTION_0 = 200, 3558 MENU_ID_SPELLCHECK_SUGGESTION_1 = 201, 3559 MENU_ID_SPELLCHECK_SUGGESTION_2 = 202, 3560 MENU_ID_SPELLCHECK_SUGGESTION_3 = 203, 3561 MENU_ID_SPELLCHECK_SUGGESTION_4 = 204, 3562 MENU_ID_SPELLCHECK_SUGGESTION_LAST = 204, 3563 MENU_ID_NO_SPELLING_SUGGESTIONS = 205, 3564 MENU_ID_ADD_TO_DICTIONARY = 206, 3565 3566 // Custom menu items originating from the renderer process. For example, 3567 // plugin placeholder menu items. 3568 MENU_ID_CUSTOM_FIRST = 220, 3569 MENU_ID_CUSTOM_LAST = 250, 3570 3571 // All user-defined menu IDs should come between MENU_ID_USER_FIRST and 3572 // MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges 3573 // defined in the tools/gritsettings/resource_ids file. 3574 MENU_ID_USER_FIRST = 26500, 3575 MENU_ID_USER_LAST = 28500 3576 } 3577 3578 /// 3579 // Mouse button types. 3580 /// 3581 enum cef_mouse_button_type_t 3582 { 3583 MBT_LEFT = 0, 3584 MBT_MIDDLE = 1, 3585 MBT_RIGHT = 2 3586 } 3587 3588 /// 3589 // Structure representing mouse event information. 3590 /// 3591 struct cef_mouse_event_t 3592 { 3593 /// 3594 // X coordinate relative to the left side of the view. 3595 /// 3596 int x; 3597 3598 /// 3599 // Y coordinate relative to the top side of the view. 3600 /// 3601 int y; 3602 3603 /// 3604 // Bit flags describing any pressed modifier keys. See 3605 // cef_event_flags_t for values. 3606 /// 3607 uint32 modifiers; 3608 } 3609 3610 3611 3612 /// 3613 // Touch points states types. 3614 /// 3615 enum cef_touch_event_type_t 3616 { 3617 CEF_TET_RELEASED = 0, 3618 CEF_TET_PRESSED = 1, 3619 CEF_TET_MOVED = 2, 3620 CEF_TET_CANCELLED = 3 3621 } 3622 3623 /// 3624 // The device type that caused the event. 3625 /// 3626 enum cef_pointer_type_t 3627 { 3628 CEF_POINTER_TYPE_TOUCH = 0, 3629 CEF_POINTER_TYPE_MOUSE = 1, 3630 CEF_POINTER_TYPE_PEN = 2, 3631 CEF_POINTER_TYPE_ERASER = 3, 3632 CEF_POINTER_TYPE_UNKNOWN = 4 3633 } 3634 3635 /// 3636 // Structure representing touch event information. 3637 /// 3638 struct cef_touch_event_t 3639 { 3640 /// 3641 // Id of a touch point. Must be unique per touch, can be any number except -1. 3642 // Note that a maximum of 16 concurrent touches will be tracked; touches 3643 // beyond that will be ignored. 3644 /// 3645 int id; 3646 3647 /// 3648 // X coordinate relative to the left side of the view. 3649 /// 3650 float x; 3651 3652 /// 3653 // Y coordinate relative to the top side of the view. 3654 /// 3655 float y; 3656 3657 /// 3658 // X radius in pixels. Set to 0 if not applicable. 3659 /// 3660 float radius_x; 3661 3662 /// 3663 // Y radius in pixels. Set to 0 if not applicable. 3664 /// 3665 float radius_y; 3666 3667 /// 3668 // Rotation angle in radians. Set to 0 if not applicable. 3669 /// 3670 float rotation_angle; 3671 3672 /// 3673 // The normalized pressure of the pointer input in the range of [0,1]. 3674 // Set to 0 if not applicable. 3675 /// 3676 float pressure; 3677 3678 /// 3679 // The state of the touch point. Touches begin with one CEF_TET_PRESSED event 3680 // followed by zero or more CEF_TET_MOVED events and finally one 3681 // CEF_TET_RELEASED or CEF_TET_CANCELLED event. Events not respecting this 3682 // order will be ignored. 3683 /// 3684 cef_touch_event_type_t type; 3685 3686 /// 3687 // Bit flags describing any pressed modifier keys. See 3688 // cef_event_flags_t for values. 3689 /// 3690 uint32 modifiers; 3691 3692 /// 3693 // The device type that caused the event. 3694 /// 3695 cef_pointer_type_t pointer_type; 3696 } 3697 3698 3699 3700 /// 3701 // Paint element types. 3702 /// 3703 enum cef_paint_element_type_t 3704 { 3705 PET_VIEW = 0, 3706 PET_POPUP = 1 3707 } 3708 3709 /// 3710 // Supported event bit flags. 3711 /// 3712 enum cef_event_flags_t 3713 { 3714 EVENTFLAG_NONE = 0, 3715 EVENTFLAG_CAPS_LOCK_ON = 1 << 0, 3716 EVENTFLAG_SHIFT_DOWN = 1 << 1, 3717 EVENTFLAG_CONTROL_DOWN = 1 << 2, 3718 EVENTFLAG_ALT_DOWN = 1 << 3, 3719 EVENTFLAG_LEFT_MOUSE_BUTTON = 1 << 4, 3720 EVENTFLAG_MIDDLE_MOUSE_BUTTON = 1 << 5, 3721 EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6, 3722 // Mac OS-X command key. 3723 EVENTFLAG_COMMAND_DOWN = 1 << 7, 3724 EVENTFLAG_NUM_LOCK_ON = 1 << 8, 3725 EVENTFLAG_IS_KEY_PAD = 1 << 9, 3726 EVENTFLAG_IS_LEFT = 1 << 10, 3727 EVENTFLAG_IS_RIGHT = 1 << 11, 3728 EVENTFLAG_ALTGR_DOWN = 1 << 12, 3729 EVENTFLAG_IS_REPEAT = 1 << 13 3730 } 3731 3732 /// 3733 // Supported menu item types. 3734 /// 3735 enum cef_menu_item_type_t 3736 { 3737 MENUITEMTYPE_NONE = 0, 3738 MENUITEMTYPE_COMMAND = 1, 3739 MENUITEMTYPE_CHECK = 2, 3740 MENUITEMTYPE_RADIO = 3, 3741 MENUITEMTYPE_SEPARATOR = 4, 3742 MENUITEMTYPE_SUBMENU = 5 3743 } 3744 3745 /// 3746 // Supported context menu type flags. 3747 /// 3748 enum cef_context_menu_type_flags_t 3749 { 3750 /// 3751 // No node is selected. 3752 /// 3753 CM_TYPEFLAG_NONE = 0, 3754 /// 3755 // The top page is selected. 3756 /// 3757 CM_TYPEFLAG_PAGE = 1 << 0, 3758 /// 3759 // A subframe page is selected. 3760 /// 3761 CM_TYPEFLAG_FRAME = 1 << 1, 3762 /// 3763 // A link is selected. 3764 /// 3765 CM_TYPEFLAG_LINK = 1 << 2, 3766 /// 3767 // A media node is selected. 3768 /// 3769 CM_TYPEFLAG_MEDIA = 1 << 3, 3770 /// 3771 // There is a textual or mixed selection that is selected. 3772 /// 3773 CM_TYPEFLAG_SELECTION = 1 << 4, 3774 /// 3775 // An editable element is selected. 3776 /// 3777 CM_TYPEFLAG_EDITABLE = 1 << 5 3778 } 3779 3780 /// 3781 // Supported context menu media types. 3782 /// 3783 enum cef_context_menu_media_type_t 3784 { 3785 /// 3786 // No special node is in context. 3787 /// 3788 CM_MEDIATYPE_NONE = 0, 3789 /// 3790 // An image node is selected. 3791 /// 3792 CM_MEDIATYPE_IMAGE = 1, 3793 /// 3794 // A video node is selected. 3795 /// 3796 CM_MEDIATYPE_VIDEO = 2, 3797 /// 3798 // An audio node is selected. 3799 /// 3800 CM_MEDIATYPE_AUDIO = 3, 3801 /// 3802 // A file node is selected. 3803 /// 3804 CM_MEDIATYPE_FILE = 4, 3805 /// 3806 // A plugin node is selected. 3807 /// 3808 CM_MEDIATYPE_PLUGIN = 5 3809 } 3810 3811 /// 3812 // Supported context menu media state bit flags. 3813 /// 3814 enum cef_context_menu_media_state_flags_t 3815 { 3816 CM_MEDIAFLAG_NONE = 0, 3817 CM_MEDIAFLAG_ERROR = 1 << 0, 3818 CM_MEDIAFLAG_PAUSED = 1 << 1, 3819 CM_MEDIAFLAG_MUTED = 1 << 2, 3820 CM_MEDIAFLAG_LOOP = 1 << 3, 3821 CM_MEDIAFLAG_CAN_SAVE = 1 << 4, 3822 CM_MEDIAFLAG_HAS_AUDIO = 1 << 5, 3823 CM_MEDIAFLAG_HAS_VIDEO = 1 << 6, 3824 CM_MEDIAFLAG_CONTROL_ROOT_ELEMENT = 1 << 7, 3825 CM_MEDIAFLAG_CAN_PRINT = 1 << 8, 3826 CM_MEDIAFLAG_CAN_ROTATE = 1 << 9 3827 } 3828 3829 /// 3830 // Supported context menu edit state bit flags. 3831 /// 3832 enum cef_context_menu_edit_state_flags_t 3833 { 3834 CM_EDITFLAG_NONE = 0, 3835 CM_EDITFLAG_CAN_UNDO = 1 << 0, 3836 CM_EDITFLAG_CAN_REDO = 1 << 1, 3837 CM_EDITFLAG_CAN_CUT = 1 << 2, 3838 CM_EDITFLAG_CAN_COPY = 1 << 3, 3839 CM_EDITFLAG_CAN_PASTE = 1 << 4, 3840 CM_EDITFLAG_CAN_DELETE = 1 << 5, 3841 CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6, 3842 CM_EDITFLAG_CAN_TRANSLATE = 1 << 7 3843 } 3844 3845 /// 3846 // Key event types. 3847 /// 3848 enum cef_key_event_type_t 3849 { 3850 /// 3851 // Notification that a key transitioned from "up" to "down". 3852 /// 3853 KEYEVENT_RAWKEYDOWN = 0, 3854 3855 /// 3856 // Notification that a key was pressed. This does not necessarily correspond 3857 // to a character depending on the key and language. Use KEYEVENT_CHAR for 3858 // character input. 3859 /// 3860 KEYEVENT_KEYDOWN = 1, 3861 3862 /// 3863 // Notification that a key was released. 3864 /// 3865 KEYEVENT_KEYUP = 2, 3866 3867 /// 3868 // Notification that a character was typed. Use this for text input. Key 3869 // down events may generate 0, 1, or more than one character event depending 3870 // on the key, locale, and operating system. 3871 /// 3872 KEYEVENT_CHAR = 3 3873 } 3874 3875 /// 3876 // Structure representing keyboard event information. 3877 /// 3878 struct cef_key_event_t 3879 { 3880 /// 3881 // The type of keyboard event. 3882 /// 3883 cef_key_event_type_t type; 3884 3885 /// 3886 // Bit flags describing any pressed modifier keys. See 3887 // cef_event_flags_t for values. 3888 /// 3889 uint32 modifiers; 3890 3891 /// 3892 // The Windows key code for the key event. This value is used by the DOM 3893 // specification. Sometimes it comes directly from the event (i.e. on 3894 // Windows) and sometimes it's determined using a mapping function. See 3895 // WebCore/platform/chromium/KeyboardCodes.h for the list of values. 3896 /// 3897 int windows_key_code; 3898 3899 /// 3900 // The actual key code genenerated by the platform. 3901 /// 3902 int native_key_code; 3903 3904 /// 3905 // Indicates whether the event is considered a "system key" event (see 3906 // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details). 3907 // This value will always be false on non-Windows platforms. 3908 /// 3909 int is_system_key; 3910 3911 /// 3912 // The character generated by the keystroke. 3913 /// 3914 char16 character; 3915 3916 /// 3917 // Same as |character| but unmodified by any concurrently-held modifiers 3918 // (except shift). This is useful for working out shortcut keys. 3919 /// 3920 char16 unmodified_character; 3921 3922 /// 3923 // True if the focus is currently on an editable field on the page. This is 3924 // useful for determining if standard key events should be intercepted. 3925 /// 3926 int focus_on_editable_field; 3927 } 3928 3929 3930 3931 /// 3932 // Focus sources. 3933 /// 3934 enum cef_focus_source_t 3935 { 3936 /// 3937 // The source is explicit navigation via the API (LoadURL(), etc). 3938 /// 3939 FOCUS_SOURCE_NAVIGATION = 0, 3940 /// 3941 // The source is a system-generated focus event. 3942 /// 3943 FOCUS_SOURCE_SYSTEM = 1 3944 } 3945 3946 /// 3947 // Navigation types. 3948 /// 3949 enum cef_navigation_type_t 3950 { 3951 NAVIGATION_LINK_CLICKED = 0, 3952 NAVIGATION_FORM_SUBMITTED = 1, 3953 NAVIGATION_BACK_FORWARD = 2, 3954 NAVIGATION_RELOAD = 3, 3955 NAVIGATION_FORM_RESUBMITTED = 4, 3956 NAVIGATION_OTHER = 5 3957 } 3958 3959 /// 3960 // Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and 3961 // UTF16 (LE and BE) by default. All other types must be translated to UTF8 3962 // before being passed to the parser. If a BOM is detected and the correct 3963 // decoder is available then that decoder will be used automatically. 3964 /// 3965 enum cef_xml_encoding_type_t 3966 { 3967 XML_ENCODING_NONE = 0, 3968 XML_ENCODING_UTF8 = 1, 3969 XML_ENCODING_UTF16LE = 2, 3970 XML_ENCODING_UTF16BE = 3, 3971 XML_ENCODING_ASCII = 4 3972 } 3973 3974 /// 3975 // XML node types. 3976 /// 3977 enum cef_xml_node_type_t 3978 { 3979 XML_NODE_UNSUPPORTED = 0, 3980 XML_NODE_PROCESSING_INSTRUCTION = 1, 3981 XML_NODE_DOCUMENT_TYPE = 2, 3982 XML_NODE_ELEMENT_START = 3, 3983 XML_NODE_ELEMENT_END = 4, 3984 XML_NODE_ATTRIBUTE = 5, 3985 XML_NODE_TEXT = 6, 3986 XML_NODE_CDATA = 7, 3987 XML_NODE_ENTITY_REFERENCE = 8, 3988 XML_NODE_WHITESPACE = 9, 3989 XML_NODE_COMMENT = 10 3990 } 3991 3992 /// 3993 // Popup window features. 3994 /// 3995 struct cef_popup_features_t 3996 { 3997 int x; 3998 int xSet; 3999 int y; 4000 int ySet; 4001 int width; 4002 int widthSet; 4003 int height; 4004 int heightSet; 4005 4006 int menuBarVisible; 4007 int statusBarVisible; 4008 int toolBarVisible; 4009 int scrollbarsVisible; 4010 } 4011 4012 4013 4014 /// 4015 // DOM document types. 4016 /// 4017 enum cef_dom_document_type_t 4018 { 4019 DOM_DOCUMENT_TYPE_UNKNOWN = 0, 4020 DOM_DOCUMENT_TYPE_HTML = 1, 4021 DOM_DOCUMENT_TYPE_XHTML = 2, 4022 DOM_DOCUMENT_TYPE_PLUGIN = 3 4023 } 4024 4025 /// 4026 // DOM event category flags. 4027 /// 4028 enum cef_dom_event_category_t 4029 { 4030 DOM_EVENT_CATEGORY_UNKNOWN = 0x0, 4031 DOM_EVENT_CATEGORY_UI = 0x1, 4032 DOM_EVENT_CATEGORY_MOUSE = 0x2, 4033 DOM_EVENT_CATEGORY_MUTATION = 0x4, 4034 DOM_EVENT_CATEGORY_KEYBOARD = 0x8, 4035 DOM_EVENT_CATEGORY_TEXT = 0x10, 4036 DOM_EVENT_CATEGORY_COMPOSITION = 0x20, 4037 DOM_EVENT_CATEGORY_DRAG = 0x40, 4038 DOM_EVENT_CATEGORY_CLIPBOARD = 0x80, 4039 DOM_EVENT_CATEGORY_MESSAGE = 0x100, 4040 DOM_EVENT_CATEGORY_WHEEL = 0x200, 4041 DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = 0x400, 4042 DOM_EVENT_CATEGORY_OVERFLOW = 0x800, 4043 DOM_EVENT_CATEGORY_PAGE_TRANSITION = 0x1000, 4044 DOM_EVENT_CATEGORY_POPSTATE = 0x2000, 4045 DOM_EVENT_CATEGORY_PROGRESS = 0x4000, 4046 DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000 4047 } 4048 4049 /// 4050 // DOM event processing phases. 4051 /// 4052 enum cef_dom_event_phase_t 4053 { 4054 DOM_EVENT_PHASE_UNKNOWN = 0, 4055 DOM_EVENT_PHASE_CAPTURING = 1, 4056 DOM_EVENT_PHASE_AT_TARGET = 2, 4057 DOM_EVENT_PHASE_BUBBLING = 3 4058 } 4059 4060 /// 4061 // DOM node types. 4062 /// 4063 enum cef_dom_node_type_t 4064 { 4065 DOM_NODE_TYPE_UNSUPPORTED = 0, 4066 DOM_NODE_TYPE_ELEMENT = 1, 4067 DOM_NODE_TYPE_ATTRIBUTE = 2, 4068 DOM_NODE_TYPE_TEXT = 3, 4069 DOM_NODE_TYPE_CDATA_SECTION = 4, 4070 DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS = 5, 4071 DOM_NODE_TYPE_COMMENT = 6, 4072 DOM_NODE_TYPE_DOCUMENT = 7, 4073 DOM_NODE_TYPE_DOCUMENT_TYPE = 8, 4074 DOM_NODE_TYPE_DOCUMENT_FRAGMENT = 9 4075 } 4076 4077 /// 4078 // Supported file dialog modes. 4079 /// 4080 enum cef_file_dialog_mode_t 4081 { 4082 /// 4083 // Requires that the file exists before allowing the user to pick it. 4084 /// 4085 FILE_DIALOG_OPEN = 0, 4086 4087 /// 4088 // Like Open, but allows picking multiple files to open. 4089 /// 4090 FILE_DIALOG_OPEN_MULTIPLE = 1, 4091 4092 /// 4093 // Like Open, but selects a folder to open. 4094 /// 4095 FILE_DIALOG_OPEN_FOLDER = 2, 4096 4097 /// 4098 // Allows picking a nonexistent file, and prompts to overwrite if the file 4099 // already exists. 4100 /// 4101 FILE_DIALOG_SAVE = 3, 4102 4103 /// 4104 // General mask defining the bits used for the type values. 4105 /// 4106 FILE_DIALOG_TYPE_MASK = 0xFF, 4107 4108 // Qualifiers. 4109 // Any of the type values above can be augmented by one or more qualifiers. 4110 // These qualifiers further define the dialog behavior. 4111 4112 /// 4113 // Prompt to overwrite if the user selects an existing file with the Save 4114 // dialog. 4115 /// 4116 FILE_DIALOG_OVERWRITEPROMPT_FLAG = 0x01000000, 4117 4118 /// 4119 // Do not display read-only files. 4120 /// 4121 FILE_DIALOG_HIDEREADONLY_FLAG = 0x02000000 4122 } 4123 4124 /// 4125 // Print job color mode values. 4126 /// 4127 enum cef_color_model_t 4128 { 4129 COLOR_MODEL_UNKNOWN = 0, 4130 COLOR_MODEL_GRAY = 1, 4131 COLOR_MODEL_COLOR = 2, 4132 COLOR_MODEL_CMYK = 3, 4133 COLOR_MODEL_CMY = 4, 4134 COLOR_MODEL_KCMY = 5, 4135 COLOR_MODEL_CMY_K = 6, // CMY_K represents CMY+K. 4136 COLOR_MODEL_BLACK = 7, 4137 COLOR_MODEL_GRAYSCALE = 8, 4138 COLOR_MODEL_RGB = 9, 4139 COLOR_MODEL_RGB16 = 10, 4140 COLOR_MODEL_RGBA = 11, 4141 COLOR_MODEL_COLORMODE_COLOR = 12, // Used in samsung printer ppds. 4142 COLOR_MODEL_COLORMODE_MONOCHROME = 13, // Used in samsung printer ppds. 4143 COLOR_MODEL_HP_COLOR_COLOR = 14, // Used in HP color printer ppds. 4144 COLOR_MODEL_HP_COLOR_BLACK = 15, // Used in HP color printer ppds. 4145 COLOR_MODEL_PRINTOUTMODE_NORMAL = 16, // Used in foomatic ppds. 4146 COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY = 17, // Used in foomatic ppds. 4147 COLOR_MODEL_PROCESSCOLORMODEL_CMYK = 18, // Used in canon printer ppds. 4148 COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE = 19, // Used in canon printer ppds. 4149 COLOR_MODEL_PROCESSCOLORMODEL_RGB = 20 // Used in canon printer ppds 4150 } 4151 4152 /// 4153 // Print job duplex mode values. 4154 /// 4155 enum cef_duplex_mode_t 4156 { 4157 DUPLEX_MODE_UNKNOWN = -1, 4158 DUPLEX_MODE_SIMPLEX = 0, 4159 DUPLEX_MODE_LONG_EDGE = 1, 4160 DUPLEX_MODE_SHORT_EDGE = 2 4161 } 4162 4163 /// 4164 // Cursor type values. 4165 /// 4166 enum cef_cursor_type_t 4167 { 4168 CT_POINTER = 0, 4169 CT_CROSS = 1, 4170 CT_HAND = 2, 4171 CT_IBEAM = 3, 4172 CT_WAIT = 4, 4173 CT_HELP = 5, 4174 CT_EASTRESIZE = 6, 4175 CT_NORTHRESIZE = 7, 4176 CT_NORTHEASTRESIZE = 8, 4177 CT_NORTHWESTRESIZE = 9, 4178 CT_SOUTHRESIZE = 10, 4179 CT_SOUTHEASTRESIZE = 11, 4180 CT_SOUTHWESTRESIZE = 12, 4181 CT_WESTRESIZE = 13, 4182 CT_NORTHSOUTHRESIZE = 14, 4183 CT_EASTWESTRESIZE = 15, 4184 CT_NORTHEASTSOUTHWESTRESIZE = 16, 4185 CT_NORTHWESTSOUTHEASTRESIZE = 17, 4186 CT_COLUMNRESIZE = 18, 4187 CT_ROWRESIZE = 19, 4188 CT_MIDDLEPANNING = 20, 4189 CT_EASTPANNING = 21, 4190 CT_NORTHPANNING = 22, 4191 CT_NORTHEASTPANNING = 23, 4192 CT_NORTHWESTPANNING = 24, 4193 CT_SOUTHPANNING = 25, 4194 CT_SOUTHEASTPANNING = 26, 4195 CT_SOUTHWESTPANNING = 27, 4196 CT_WESTPANNING = 28, 4197 CT_MOVE = 29, 4198 CT_VERTICALTEXT = 30, 4199 CT_CELL = 31, 4200 CT_CONTEXTMENU = 32, 4201 CT_ALIAS = 33, 4202 CT_PROGRESS = 34, 4203 CT_NODROP = 35, 4204 CT_COPY = 36, 4205 CT_NONE = 37, 4206 CT_NOTALLOWED = 38, 4207 CT_ZOOMIN = 39, 4208 CT_ZOOMOUT = 40, 4209 CT_GRAB = 41, 4210 CT_GRABBING = 42, 4211 CT_MIDDLE_PANNING_VERTICAL = 43, 4212 CT_MIDDLE_PANNING_HORIZONTAL = 44, 4213 CT_CUSTOM = 45, 4214 CT_DND_NONE = 46, 4215 CT_DND_MOVE = 47, 4216 CT_DND_COPY = 48, 4217 CT_DND_LINK = 49 4218 } 4219 4220 /// 4221 // Structure representing cursor information. |buffer| will be 4222 // |size.width|*|size.height|*4 bytes in size and represents a BGRA image with 4223 // an upper-left origin. 4224 /// 4225 struct cef_cursor_info_t 4226 { 4227 cef_point_t hotspot; 4228 float image_scale_factor; 4229 void* buffer; 4230 cef_size_t size; 4231 } 4232 4233 4234 4235 /// 4236 // URI unescape rules passed to CefURIDecode(). 4237 /// 4238 enum cef_uri_unescape_rule_t 4239 { 4240 /// 4241 // Don't unescape anything at all. 4242 /// 4243 UU_NONE = 0, 4244 4245 /// 4246 // Don't unescape anything special, but all normal unescaping will happen. 4247 // This is a placeholder and can't be combined with other flags (since it's 4248 // just the absence of them). All other unescape rules imply "normal" in 4249 // addition to their special meaning. Things like escaped letters, digits, 4250 // and most symbols will get unescaped with this mode. 4251 /// 4252 UU_NORMAL = 1 << 0, 4253 4254 /// 4255 // Convert %20 to spaces. In some places where we're showing URLs, we may 4256 // want this. In places where the URL may be copied and pasted out, then 4257 // you wouldn't want this since it might not be interpreted in one piece 4258 // by other applications. 4259 /// 4260 UU_SPACES = 1 << 1, 4261 4262 /// 4263 // Unescapes '/' and '\\'. If these characters were unescaped, the resulting 4264 // URL won't be the same as the source one. Moreover, they are dangerous to 4265 // unescape in strings that will be used as file paths or names. This value 4266 // should only be used when slashes don't have special meaning, like data 4267 // URLs. 4268 /// 4269 UU_PATH_SEPARATORS = 1 << 2, 4270 4271 /// 4272 // Unescapes various characters that will change the meaning of URLs, 4273 // including '%', '+', '&', '#'. Does not unescape path separators. 4274 // If these characters were unescaped, the resulting URL won't be the same 4275 // as the source one. This flag is used when generating final output like 4276 // filenames for URLs where we won't be interpreting as a URL and want to do 4277 // as much unescaping as possible. 4278 /// 4279 UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 << 3, 4280 4281 /// 4282 // URL queries use "+" for space. This flag controls that replacement. 4283 /// 4284 UU_REPLACE_PLUS_WITH_SPACE = 1 << 4 4285 } 4286 4287 /// 4288 // Options that can be passed to CefParseJSON. 4289 /// 4290 enum cef_json_parser_options_t 4291 { 4292 /// 4293 // Parses the input strictly according to RFC 4627. See comments in Chromium's 4294 // base/json/json_reader.h file for known limitations/deviations from the RFC. 4295 /// 4296 JSON_PARSER_RFC = 0, 4297 4298 /// 4299 // Allows commas to exist after the last element in structures. 4300 /// 4301 JSON_PARSER_ALLOW_TRAILING_COMMAS = 1 << 0 4302 } 4303 4304 /// 4305 // Options that can be passed to CefWriteJSON. 4306 /// 4307 enum cef_json_writer_options_t 4308 { 4309 /// 4310 // Default behavior. 4311 /// 4312 JSON_WRITER_DEFAULT = 0, 4313 4314 /// 4315 // This option instructs the writer that if a Binary value is encountered, 4316 // the value (and key if within a dictionary) will be omitted from the 4317 // output, and success will be returned. Otherwise, if a binary value is 4318 // encountered, failure will be returned. 4319 /// 4320 JSON_WRITER_OMIT_BINARY_VALUES = 1 << 0, 4321 4322 /// 4323 // This option instructs the writer to write doubles that have no fractional 4324 // part as a normal integer (i.e., without using exponential notation 4325 // or appending a '.0') as long as the value is within the range of a 4326 // 64-bit int. 4327 /// 4328 JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = 1 << 1, 4329 4330 /// 4331 // Return a slightly nicer formatted json string (pads with whitespace to 4332 // help with readability). 4333 /// 4334 JSON_WRITER_PRETTY_PRINT = 1 << 2 4335 } 4336 4337 /// 4338 // Margin type for PDF printing. 4339 /// 4340 enum cef_pdf_print_margin_type_t 4341 { 4342 /// 4343 // Default margins. 4344 /// 4345 PDF_PRINT_MARGIN_DEFAULT = 0, 4346 4347 /// 4348 // No margins. 4349 /// 4350 PDF_PRINT_MARGIN_NONE = 1, 4351 4352 /// 4353 // Minimum margins. 4354 /// 4355 PDF_PRINT_MARGIN_MINIMUM = 2, 4356 4357 /// 4358 // Custom margins using the |margin_*| values from cef_pdf_print_settings_t. 4359 /// 4360 PDF_PRINT_MARGIN_CUSTOM = 3 4361 } 4362 4363 /// 4364 // Structure representing PDF print settings. 4365 /// 4366 struct cef_pdf_print_settings_t 4367 { 4368 /// 4369 // Page title to display in the header. Only used if |header_footer_enabled| 4370 // is set to true (1). 4371 /// 4372 cef_string_t header_footer_title; 4373 4374 /// 4375 // URL to display in the footer. Only used if |header_footer_enabled| is set 4376 // to true (1). 4377 /// 4378 cef_string_t header_footer_url; 4379 4380 /// 4381 // Output page size in microns. If either of these values is less than or 4382 // equal to zero then the default paper size (A4) will be used. 4383 /// 4384 int page_width; 4385 int page_height; 4386 4387 /// 4388 // The percentage to scale the PDF by before printing (e.g. 50 is 50%). 4389 // If this value is less than or equal to zero the default value of 100 4390 // will be used. 4391 /// 4392 int scale_factor; 4393 4394 /// 4395 // Margins in points. Only used if |margin_type| is set to 4396 // PDF_PRINT_MARGIN_CUSTOM. 4397 /// 4398 int margin_top; 4399 int margin_right; 4400 int margin_bottom; 4401 int margin_left; 4402 4403 /// 4404 // Margin type. 4405 /// 4406 cef_pdf_print_margin_type_t margin_type; 4407 4408 /// 4409 // Set to true (1) to print headers and footers or false (0) to not print 4410 // headers and footers. 4411 /// 4412 int header_footer_enabled; 4413 4414 /// 4415 // Set to true (1) to print the selection only or false (0) to print all. 4416 /// 4417 int selection_only; 4418 4419 /// 4420 // Set to true (1) for landscape mode or false (0) for portrait mode. 4421 /// 4422 int landscape; 4423 4424 /// 4425 // Set to true (1) to print background graphics or false (0) to not print 4426 // background graphics. 4427 /// 4428 int backgrounds_enabled; 4429 } 4430 4431 4432 4433 /// 4434 // Supported UI scale factors for the platform. SCALE_FACTOR_NONE is used for 4435 // density independent resources such as string, html/js files or an image that 4436 // can be used for any scale factors (such as wallpapers). 4437 /// 4438 enum cef_scale_factor_t 4439 { 4440 SCALE_FACTOR_NONE = 0, 4441 SCALE_FACTOR_100P = 1, 4442 SCALE_FACTOR_125P = 2, 4443 SCALE_FACTOR_133P = 3, 4444 SCALE_FACTOR_140P = 4, 4445 SCALE_FACTOR_150P = 5, 4446 SCALE_FACTOR_180P = 6, 4447 SCALE_FACTOR_200P = 7, 4448 SCALE_FACTOR_250P = 8, 4449 SCALE_FACTOR_300P = 9 4450 } 4451 4452 /// 4453 // Plugin policies supported by CefRequestContextHandler::OnBeforePluginLoad. 4454 /// 4455 enum cef_plugin_policy_t 4456 { 4457 /// 4458 // Allow the content. 4459 /// 4460 PLUGIN_POLICY_ALLOW = 0, 4461 4462 /// 4463 // Allow important content and block unimportant content based on heuristics. 4464 // The user can manually load blocked content. 4465 /// 4466 PLUGIN_POLICY_DETECT_IMPORTANT = 1, 4467 4468 /// 4469 // Block the content. The user can manually load blocked content. 4470 /// 4471 PLUGIN_POLICY_BLOCK = 2, 4472 4473 /// 4474 // Disable the content. The user cannot load disabled content. 4475 /// 4476 PLUGIN_POLICY_DISABLE = 3 4477 } 4478 4479 /// 4480 // Policy for how the Referrer HTTP header value will be sent during navigation. 4481 // If the `--no-referrers` command-line flag is specified then the policy value 4482 // will be ignored and the Referrer value will never be sent. 4483 // Must be kept synchronized with net::URLRequest::ReferrerPolicy from Chromium. 4484 /// 4485 enum cef_referrer_policy_t 4486 { 4487 /// 4488 // Clear the referrer header if the header value is HTTPS but the request 4489 // destination is HTTP. This is the default behavior. 4490 /// 4491 REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 0, 4492 REFERRER_POLICY_DEFAULT = REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE, 4493 4494 /// 4495 // A slight variant on CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE: 4496 // If the request destination is HTTP, an HTTPS referrer will be cleared. If 4497 // the request's destination is cross-origin with the referrer (but does not 4498 // downgrade), the referrer's granularity will be stripped down to an origin 4499 // rather than a full URL. Same-origin requests will send the full referrer. 4500 /// 4501 REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = 1, 4502 4503 /// 4504 // Strip the referrer down to an origin when the origin of the referrer is 4505 // different from the destination's origin. 4506 /// 4507 REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = 2, 4508 4509 /// 4510 // Never change the referrer. 4511 /// 4512 REFERRER_POLICY_NEVER_CLEAR_REFERRER = 3, 4513 4514 /// 4515 // Strip the referrer down to the origin regardless of the redirect location. 4516 /// 4517 REFERRER_POLICY_ORIGIN = 4, 4518 4519 /// 4520 // Clear the referrer when the request's referrer is cross-origin with the 4521 // request's destination. 4522 /// 4523 REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = 5, 4524 4525 /// 4526 // Strip the referrer down to the origin, but clear it entirely if the 4527 // referrer value is HTTPS and the destination is HTTP. 4528 /// 4529 REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 6, 4530 4531 /// 4532 // Always clear the referrer regardless of the request destination. 4533 /// 4534 REFERRER_POLICY_NO_REFERRER = 7, 4535 4536 // Always the last value in this enumeration. 4537 REFERRER_POLICY_LAST_VALUE = REFERRER_POLICY_NO_REFERRER 4538 } 4539 4540 /// 4541 // Return values for CefResponseFilter::Filter(). 4542 /// 4543 enum cef_response_filter_status_t 4544 { 4545 /// 4546 // Some or all of the pre-filter data was read successfully but more data is 4547 // needed in order to continue filtering (filtered output is pending). 4548 /// 4549 RESPONSE_FILTER_NEED_MORE_DATA = 0, 4550 4551 /// 4552 // Some or all of the pre-filter data was read successfully and all available 4553 // filtered output has been written. 4554 /// 4555 RESPONSE_FILTER_DONE = 1, 4556 4557 /// 4558 // An error occurred during filtering. 4559 /// 4560 RESPONSE_FILTER_ERROR = 2 4561 } 4562 4563 /// 4564 // Describes how to interpret the components of a pixel. 4565 /// 4566 enum cef_color_type_t 4567 { 4568 /// 4569 // RGBA with 8 bits per pixel (32bits total). 4570 /// 4571 CEF_COLOR_TYPE_RGBA_8888 = 0, 4572 4573 /// 4574 // BGRA with 8 bits per pixel (32bits total). 4575 /// 4576 CEF_COLOR_TYPE_BGRA_8888 = 1 4577 } 4578 4579 /// 4580 // Describes how to interpret the alpha component of a pixel. 4581 /// 4582 enum cef_alpha_type_t 4583 { 4584 /// 4585 // No transparency. The alpha component is ignored. 4586 /// 4587 CEF_ALPHA_TYPE_OPAQUE = 0, 4588 4589 /// 4590 // Transparency with pre-multiplied alpha component. 4591 /// 4592 CEF_ALPHA_TYPE_PREMULTIPLIED = 1, 4593 4594 /// 4595 // Transparency with post-multiplied alpha component. 4596 /// 4597 CEF_ALPHA_TYPE_POSTMULTIPLIED = 2 4598 } 4599 4600 /// 4601 // Text style types. Should be kepy in sync with gfx::TextStyle. 4602 /// 4603 enum cef_text_style_t 4604 { 4605 CEF_TEXT_STYLE_BOLD = 0, 4606 CEF_TEXT_STYLE_ITALIC = 1, 4607 CEF_TEXT_STYLE_STRIKE = 2, 4608 CEF_TEXT_STYLE_DIAGONAL_STRIKE = 3, 4609 CEF_TEXT_STYLE_UNDERLINE = 4 4610 } 4611 4612 /// 4613 // Specifies where along the main axis the CefBoxLayout child views should be 4614 // laid out. 4615 /// 4616 enum cef_main_axis_alignment_t 4617 { 4618 /// 4619 // Child views will be left-aligned. 4620 /// 4621 CEF_MAIN_AXIS_ALIGNMENT_START = 0, 4622 4623 /// 4624 // Child views will be center-aligned. 4625 /// 4626 CEF_MAIN_AXIS_ALIGNMENT_CENTER = 1, 4627 4628 /// 4629 // Child views will be right-aligned. 4630 /// 4631 CEF_MAIN_AXIS_ALIGNMENT_END = 2 4632 } 4633 4634 /// 4635 // Specifies where along the cross axis the CefBoxLayout child views should be 4636 // laid out. 4637 /// 4638 enum cef_cross_axis_alignment_t 4639 { 4640 /// 4641 // Child views will be stretched to fit. 4642 /// 4643 CEF_CROSS_AXIS_ALIGNMENT_STRETCH = 0, 4644 4645 /// 4646 // Child views will be left-aligned. 4647 /// 4648 CEF_CROSS_AXIS_ALIGNMENT_START = 1, 4649 4650 /// 4651 // Child views will be center-aligned. 4652 /// 4653 CEF_CROSS_AXIS_ALIGNMENT_CENTER = 2, 4654 4655 /// 4656 // Child views will be right-aligned. 4657 /// 4658 CEF_CROSS_AXIS_ALIGNMENT_END = 3 4659 } 4660 4661 /// 4662 // Settings used when initializing a CefBoxLayout. 4663 /// 4664 struct cef_box_layout_settings_t 4665 { 4666 /// 4667 // If true (1) the layout will be horizontal, otherwise the layout will be 4668 // vertical. 4669 /// 4670 int horizontal; 4671 4672 /// 4673 // Adds additional horizontal space between the child view area and the host 4674 // view border. 4675 /// 4676 int inside_border_horizontal_spacing; 4677 4678 /// 4679 // Adds additional vertical space between the child view area and the host 4680 // view border. 4681 /// 4682 int inside_border_vertical_spacing; 4683 4684 /// 4685 // Adds additional space around the child view area. 4686 /// 4687 cef_insets_t inside_border_insets; 4688 4689 /// 4690 // Adds additional space between child views. 4691 /// 4692 int between_child_spacing; 4693 4694 /// 4695 // Specifies where along the main axis the child views should be laid out. 4696 /// 4697 cef_main_axis_alignment_t main_axis_alignment; 4698 4699 /// 4700 // Specifies where along the cross axis the child views should be laid out. 4701 /// 4702 cef_cross_axis_alignment_t cross_axis_alignment; 4703 4704 /// 4705 // Minimum cross axis size. 4706 /// 4707 int minimum_cross_axis_size; 4708 4709 /// 4710 // Default flex for views when none is specified via CefBoxLayout methods. 4711 // Using the preferred size as the basis, free space along the main axis is 4712 // distributed to views in the ratio of their flex weights. Similarly, if the 4713 // views will overflow the parent, space is subtracted in these ratios. A flex 4714 // of 0 means this view is not resized. Flex values must not be negative. 4715 /// 4716 int default_flex; 4717 } 4718 4719 4720 4721 /// 4722 // Specifies the button display state. 4723 /// 4724 enum cef_button_state_t 4725 { 4726 CEF_BUTTON_STATE_NORMAL = 0, 4727 CEF_BUTTON_STATE_HOVERED = 1, 4728 CEF_BUTTON_STATE_PRESSED = 2, 4729 CEF_BUTTON_STATE_DISABLED = 3 4730 } 4731 4732 /// 4733 // Specifies the horizontal text alignment mode. 4734 /// 4735 enum cef_horizontal_alignment_t 4736 { 4737 /// 4738 // Align the text's left edge with that of its display area. 4739 /// 4740 CEF_HORIZONTAL_ALIGNMENT_LEFT = 0, 4741 4742 /// 4743 // Align the text's center with that of its display area. 4744 /// 4745 CEF_HORIZONTAL_ALIGNMENT_CENTER = 1, 4746 4747 /// 4748 // Align the text's right edge with that of its display area. 4749 /// 4750 CEF_HORIZONTAL_ALIGNMENT_RIGHT = 2 4751 } 4752 4753 /// 4754 // Specifies how a menu will be anchored for non-RTL languages. The opposite 4755 // position will be used for RTL languages. 4756 /// 4757 enum cef_menu_anchor_position_t 4758 { 4759 CEF_MENU_ANCHOR_TOPLEFT = 0, 4760 CEF_MENU_ANCHOR_TOPRIGHT = 1, 4761 CEF_MENU_ANCHOR_BOTTOMCENTER = 2 4762 } 4763 4764 /// 4765 // Supported color types for menu items. 4766 /// 4767 enum cef_menu_color_type_t 4768 { 4769 CEF_MENU_COLOR_TEXT = 0, 4770 CEF_MENU_COLOR_TEXT_HOVERED = 1, 4771 CEF_MENU_COLOR_TEXT_ACCELERATOR = 2, 4772 CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED = 3, 4773 CEF_MENU_COLOR_BACKGROUND = 4, 4774 CEF_MENU_COLOR_BACKGROUND_HOVERED = 5, 4775 CEF_MENU_COLOR_COUNT = 6 4776 } 4777 4778 // Supported SSL version values. See net/ssl/ssl_connection_status_flags.h 4779 // for more information. 4780 enum cef_ssl_version_t 4781 { 4782 SSL_CONNECTION_VERSION_UNKNOWN = 0, // Unknown SSL version. 4783 SSL_CONNECTION_VERSION_SSL2 = 1, 4784 SSL_CONNECTION_VERSION_SSL3 = 2, 4785 SSL_CONNECTION_VERSION_TLS1 = 3, 4786 SSL_CONNECTION_VERSION_TLS1_1 = 4, 4787 SSL_CONNECTION_VERSION_TLS1_2 = 5, 4788 SSL_CONNECTION_VERSION_TLS1_3 = 6, 4789 SSL_CONNECTION_VERSION_QUIC = 7 4790 } 4791 4792 // Supported SSL content status flags. See content/public/common/ssl_status.h 4793 // for more information. 4794 enum cef_ssl_content_status_t 4795 { 4796 SSL_CONTENT_NORMAL_CONTENT = 0, 4797 SSL_CONTENT_DISPLAYED_INSECURE_CONTENT = 1 << 0, 4798 SSL_CONTENT_RAN_INSECURE_CONTENT = 1 << 1 4799 } 4800 4801 // 4802 // Configuration options for registering a custom scheme. 4803 // These values are used when calling AddCustomScheme. 4804 // 4805 enum cef_scheme_options_t 4806 { 4807 CEF_SCHEME_OPTION_NONE = 0, 4808 4809 /// 4810 // If CEF_SCHEME_OPTION_STANDARD is set the scheme will be treated as a 4811 // standard scheme. Standard schemes are subject to URL canonicalization and 4812 // parsing rules as defined in the Common Internet Scheme Syntax RFC 1738 4813 // Section 3.1 available at http://www.ietf.org/rfc/rfc1738.txt 4814 // 4815 // In particular, the syntax for standard scheme URLs must be of the form: 4816 // <pre> 4817 // [scheme]://[username]:[password]@[host]:[port]/[url-path] 4818 // </pre> Standard scheme URLs must have a host component that is a fully 4819 // qualified domain name as defined in Section 3.5 of RFC 1034 [13] and 4820 // Section 2.1 of RFC 1123. These URLs will be canonicalized to 4821 // "scheme://host/path" in the simplest case and 4822 // "scheme://username:password@host:port/path" in the most explicit case. For 4823 // example, "scheme:host/path" and "scheme:///host/path" will both be 4824 // canonicalized to "scheme://host/path". The origin of a standard scheme URL 4825 // is the combination of scheme, host and port (i.e., "scheme://host:port" in 4826 // the most explicit case). 4827 // 4828 // For non-standard scheme URLs only the "scheme:" component is parsed and 4829 // canonicalized. The remainder of the URL will be passed to the handler as- 4830 // is. For example, "scheme:///some%20text" will remain the same. Non-standard 4831 // scheme URLs cannot be used as a target for form submission. 4832 /// 4833 CEF_SCHEME_OPTION_STANDARD = 1 << 0, 4834 4835 /// 4836 // If CEF_SCHEME_OPTION_LOCAL is set the scheme will be treated with the same 4837 // security rules as those applied to "file" URLs. Normal pages cannot link to 4838 // or access local URLs. Also, by default, local URLs can only perform 4839 // XMLHttpRequest calls to the same URL (origin + path) that originated the 4840 // request. To allow XMLHttpRequest calls from a local URL to other URLs with 4841 // the same origin set the CefSettings.file_access_from_file_urls_allowed 4842 // value to true (1). To allow XMLHttpRequest calls from a local URL to all 4843 // origins set the CefSettings.universal_access_from_file_urls_allowed value 4844 // to true (1). 4845 /// 4846 CEF_SCHEME_OPTION_LOCAL = 1 << 1, 4847 4848 /// 4849 // If CEF_SCHEME_OPTION_DISPLAY_ISOLATED is set the scheme can only be 4850 // displayed from other content hosted with the same scheme. For example, 4851 // pages in other origins cannot create iframes or hyperlinks to URLs with the 4852 // scheme. For schemes that must be accessible from other schemes don't set 4853 // this, set CEF_SCHEME_OPTION_CORS_ENABLED, and use CORS 4854 // "Access-Control-Allow-Origin" headers to further restrict access. 4855 /// 4856 CEF_SCHEME_OPTION_DISPLAY_ISOLATED = 1 << 2, 4857 4858 /// 4859 // If CEF_SCHEME_OPTION_SECURE is set the scheme will be treated with the same 4860 // security rules as those applied to "https" URLs. For example, loading this 4861 // scheme from other secure schemes will not trigger mixed content warnings. 4862 /// 4863 CEF_SCHEME_OPTION_SECURE = 1 << 3, 4864 4865 /// 4866 // If CEF_SCHEME_OPTION_CORS_ENABLED is set the scheme can be sent CORS 4867 // requests. This value should be set in most cases where 4868 // CEF_SCHEME_OPTION_STANDARD is set. 4869 /// 4870 CEF_SCHEME_OPTION_CORS_ENABLED = 1 << 4, 4871 4872 /// 4873 // If CEF_SCHEME_OPTION_CSP_BYPASSING is set the scheme can bypass Content- 4874 // Security-Policy (CSP) checks. This value should not be set in most cases 4875 // where CEF_SCHEME_OPTION_STANDARD is set. 4876 /// 4877 CEF_SCHEME_OPTION_CSP_BYPASSING = 1 << 5, 4878 4879 /// 4880 // If CEF_SCHEME_OPTION_FETCH_ENABLED is set the scheme can perform Fetch API 4881 // requests. 4882 /// 4883 CEF_SCHEME_OPTION_FETCH_ENABLED = 1 << 6 4884 } 4885 4886 /// 4887 // Structure representing a range. 4888 /// 4889 struct cef_range_t 4890 { 4891 int from; 4892 int to; 4893 } 4894 4895 4896 4897 /// 4898 // Composition underline style. 4899 /// 4900 enum cef_composition_underline_style_t 4901 { 4902 CEF_CUS_SOLID = 0, 4903 CEF_CUS_DOT = 1, 4904 CEF_CUS_DASH = 2, 4905 CEF_CUS_NONE = 3 4906 } 4907 4908 /// 4909 // Structure representing IME composition underline information. This is a thin 4910 // wrapper around Blink's WebCompositionUnderline class and should be kept in 4911 // sync with that. 4912 /// 4913 struct cef_composition_underline_t 4914 { 4915 /// 4916 // Underline character range. 4917 /// 4918 cef_range_t range; 4919 4920 /// 4921 // Text color. 4922 /// 4923 cef_color_t color; 4924 4925 /// 4926 // Background color. 4927 /// 4928 cef_color_t background_color; 4929 4930 /// 4931 // Set to true (1) for thick underline. 4932 /// 4933 int thick; 4934 4935 /// 4936 // Style. 4937 /// 4938 cef_composition_underline_style_t style; 4939 } 4940 4941 4942 4943 /// 4944 // Enumerates the various representations of the ordering of audio channels. 4945 // Must be kept synchronized with media::ChannelLayout from Chromium. 4946 // See media\base\channel_layout.h 4947 /// 4948 enum cef_channel_layout_t 4949 { 4950 CEF_CHANNEL_LAYOUT_NONE = 0, 4951 CEF_CHANNEL_LAYOUT_UNSUPPORTED = 1, 4952 4953 // Front C 4954 CEF_CHANNEL_LAYOUT_MONO = 2, 4955 4956 // Front L, Front R 4957 CEF_CHANNEL_LAYOUT_STEREO = 3, 4958 4959 // Front L, Front R, Back C 4960 CEF_CHANNEL_LAYOUT_2_1 = 4, 4961 4962 // Front L, Front R, Front C 4963 CEF_CHANNEL_LAYOUT_SURROUND = 5, 4964 4965 // Front L, Front R, Front C, Back C 4966 CEF_CHANNEL_LAYOUT_4_0 = 6, 4967 4968 // Front L, Front R, Side L, Side R 4969 CEF_CHANNEL_LAYOUT_2_2 = 7, 4970 4971 // Front L, Front R, Back L, Back R 4972 CEF_CHANNEL_LAYOUT_QUAD = 8, 4973 4974 // Front L, Front R, Front C, Side L, Side R 4975 CEF_CHANNEL_LAYOUT_5_0 = 9, 4976 4977 // Front L, Front R, Front C, LFE, Side L, Side R 4978 CEF_CHANNEL_LAYOUT_5_1 = 10, 4979 4980 // Front L, Front R, Front C, Back L, Back R 4981 CEF_CHANNEL_LAYOUT_5_0_BACK = 11, 4982 4983 // Front L, Front R, Front C, LFE, Back L, Back R 4984 CEF_CHANNEL_LAYOUT_5_1_BACK = 12, 4985 4986 // Front L, Front R, Front C, Side L, Side R, Back L, Back R 4987 CEF_CHANNEL_LAYOUT_7_0 = 13, 4988 4989 // Front L, Front R, Front C, LFE, Side L, Side R, Back L, Back R 4990 CEF_CHANNEL_LAYOUT_7_1 = 14, 4991 4992 // Front L, Front R, Front C, LFE, Side L, Side R, Front LofC, Front RofC 4993 CEF_CHANNEL_LAYOUT_7_1_WIDE = 15, 4994 4995 // Stereo L, Stereo R 4996 CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX = 16, 4997 4998 // Stereo L, Stereo R, LFE 4999 CEF_CHANNEL_LAYOUT_2POINT1 = 17, 5000 5001 // Stereo L, Stereo R, Front C, LFE 5002 CEF_CHANNEL_LAYOUT_3_1 = 18, 5003 5004 // Stereo L, Stereo R, Front C, Rear C, LFE 5005 CEF_CHANNEL_LAYOUT_4_1 = 19, 5006 5007 // Stereo L, Stereo R, Front C, Side L, Side R, Back C 5008 CEF_CHANNEL_LAYOUT_6_0 = 20, 5009 5010 // Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC 5011 CEF_CHANNEL_LAYOUT_6_0_FRONT = 21, 5012 5013 // Stereo L, Stereo R, Front C, Rear L, Rear R, Rear C 5014 CEF_CHANNEL_LAYOUT_HEXAGONAL = 22, 5015 5016 // Stereo L, Stereo R, Front C, LFE, Side L, Side R, Rear Center 5017 CEF_CHANNEL_LAYOUT_6_1 = 23, 5018 5019 // Stereo L, Stereo R, Front C, LFE, Back L, Back R, Rear Center 5020 CEF_CHANNEL_LAYOUT_6_1_BACK = 24, 5021 5022 // Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC, LFE 5023 CEF_CHANNEL_LAYOUT_6_1_FRONT = 25, 5024 5025 // Front L, Front R, Front C, Side L, Side R, Front LofC, Front RofC 5026 CEF_CHANNEL_LAYOUT_7_0_FRONT = 26, 5027 5028 // Front L, Front R, Front C, LFE, Back L, Back R, Front LofC, Front RofC 5029 CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK = 27, 5030 5031 // Front L, Front R, Front C, Side L, Side R, Rear L, Back R, Back C. 5032 CEF_CHANNEL_LAYOUT_OCTAGONAL = 28, 5033 5034 // Channels are not explicitly mapped to speakers. 5035 CEF_CHANNEL_LAYOUT_DISCRETE = 29, 5036 5037 // Front L, Front R, Front C. Front C contains the keyboard mic audio. This 5038 // layout is only intended for input for WebRTC. The Front C channel 5039 // is stripped away in the WebRTC audio input pipeline and never seen outside 5040 // of that. 5041 CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = 30, 5042 5043 // Front L, Front R, Side L, Side R, LFE 5044 CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE = 31, 5045 5046 // Actual channel layout is specified in the bitstream and the actual channel 5047 // count is unknown at Chromium media pipeline level (useful for audio 5048 // pass-through mode). 5049 CEF_CHANNEL_LAYOUT_BITSTREAM = 32, 5050 5051 // Max value, must always equal the largest entry ever logged. 5052 CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_BITSTREAM 5053 } 5054 5055 /// 5056 // Structure representing the audio parameters for setting up the audio handler. 5057 /// 5058 struct cef_audio_parameters_t 5059 { 5060 /// 5061 // Layout of the audio channels 5062 /// 5063 cef_channel_layout_t channel_layout; 5064 5065 /// 5066 // Sample rate 5067 // 5068 int sample_rate; 5069 5070 /// 5071 // Number of frames per buffer 5072 /// 5073 int frames_per_buffer; 5074 } 5075 5076 5077 5078 /// 5079 // Result codes for CefMediaRouter::CreateRoute. Should be kept in sync with 5080 // Chromium's media_router::RouteRequestResult::ResultCode type. 5081 /// 5082 enum cef_media_route_create_result_t 5083 { 5084 CEF_MRCR_UNKNOWN_ERROR = 0, 5085 CEF_MRCR_OK = 1, 5086 CEF_MRCR_TIMED_OUT = 2, 5087 CEF_MRCR_ROUTE_NOT_FOUND = 3, 5088 CEF_MRCR_SINK_NOT_FOUND = 4, 5089 CEF_MRCR_INVALID_ORIGIN = 5, 5090 CEF_MRCR_NO_SUPPORTED_PROVIDER = 7, 5091 CEF_MRCR_CANCELLED = 8, 5092 CEF_MRCR_ROUTE_ALREADY_EXISTS = 9, 5093 CEF_MRCR_ROUTE_ALREADY_TERMINATED = 11, 5094 5095 CEF_MRCR_TOTAL_COUNT = 12 // The total number of values. 5096 } 5097 5098 /// 5099 // Connection state for a MediaRoute object. 5100 /// 5101 enum cef_media_route_connection_state_t 5102 { 5103 CEF_MRCS_UNKNOWN = 0, 5104 CEF_MRCS_CONNECTING = 1, 5105 CEF_MRCS_CONNECTED = 2, 5106 CEF_MRCS_CLOSED = 3, 5107 CEF_MRCS_TERMINATED = 4 5108 } 5109 5110 /// 5111 // Icon types for a MediaSink object. Should be kept in sync with Chromium's 5112 // media_router::SinkIconType type. 5113 /// 5114 enum cef_media_sink_icon_type_t 5115 { 5116 CEF_MSIT_CAST = 0, 5117 CEF_MSIT_CAST_AUDIO_GROUP = 1, 5118 CEF_MSIT_CAST_AUDIO = 2, 5119 CEF_MSIT_MEETING = 3, 5120 CEF_MSIT_HANGOUT = 4, 5121 CEF_MSIT_EDUCATION = 5, 5122 CEF_MSIT_WIRED_DISPLAY = 6, 5123 CEF_MSIT_GENERIC = 7, 5124 5125 CEF_MSIT_TOTAL_COUNT = 8 // The total number of values. 5126 } 5127 5128 /// 5129 // Device information for a MediaSink object. 5130 /// 5131 struct cef_media_sink_device_info_t 5132 { 5133 cef_string_t ip_address; 5134 int port; 5135 cef_string_t model_name; 5136 } 5137 5138 5139 5140 /// 5141 // Represents commands available to TextField. 5142 /// 5143 enum cef_text_field_commands_t 5144 { 5145 CEF_TFC_CUT = 1, 5146 CEF_TFC_COPY = 2, 5147 CEF_TFC_PASTE = 3, 5148 CEF_TFC_UNDO = 4, 5149 CEF_TFC_DELETE = 5, 5150 CEF_TFC_SELECT_ALL = 6 5151 } 5152 5153 /// 5154 // Supported Chrome toolbar types. 5155 /// 5156 enum cef_chrome_toolbar_type_t 5157 { 5158 CEF_CTT_NONE = 1, 5159 CEF_CTT_NORMAL = 2, 5160 CEF_CTT_LOCATION = 3 5161 } 5162 5163 /// 5164 // Docking modes supported by CefWindow::AddOverlay. 5165 /// 5166 enum cef_docking_mode_t 5167 { 5168 CEF_DOCKING_MODE_TOP_LEFT = 1, 5169 CEF_DOCKING_MODE_TOP_RIGHT = 2, 5170 CEF_DOCKING_MODE_BOTTOM_LEFT = 3, 5171 CEF_DOCKING_MODE_BOTTOM_RIGHT = 4, 5172 CEF_DOCKING_MODE_CUSTOM = 5 5173 } 5174 5175 /// 5176 // Show states supported by CefWindowDelegate::GetInitialShowState. 5177 /// 5178 enum cef_show_state_t 5179 { 5180 CEF_SHOW_STATE_NORMAL = 1, 5181 CEF_SHOW_STATE_MINIMIZED = 2, 5182 CEF_SHOW_STATE_MAXIMIZED = 3, 5183 CEF_SHOW_STATE_FULLSCREEN = 4 5184 } 5185 5186 // CEF_INCLUDE_INTERNAL_CEF_TYPES_H_ 5187 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 5188 // 5189 // Redistribution and use in source and binary forms, with or without 5190 // modification, are permitted provided that the following conditions are 5191 // met: 5192 // 5193 // * Redistributions of source code must retain the above copyright 5194 // notice, this list of conditions and the following disclaimer. 5195 // * Redistributions in binary form must reproduce the above 5196 // copyright notice, this list of conditions and the following disclaimer 5197 // in the documentation and/or other materials provided with the 5198 // distribution. 5199 // * Neither the name of Google Inc. nor the name Chromium Embedded 5200 // Framework nor the names of its contributors may be used to endorse 5201 // or promote products derived from this software without specific prior 5202 // written permission. 5203 // 5204 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 5205 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 5206 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 5207 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 5208 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 5209 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 5210 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 5211 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 5212 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 5213 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 5214 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5215 // 5216 // --------------------------------------------------------------------------- 5217 // 5218 // This file was generated by the CEF translator tool and should not edited 5219 // by hand. See the translator.README.txt file in the tools directory for 5220 // more information. 5221 // 5222 // $hash=c487e5fd787b1be8224a8981839e0cfdd0ed74f3$ 5223 // 5224 5225 extern (C): 5226 5227 /// 5228 // Implement this structure to receive accessibility notification when 5229 // accessibility events have been registered. The functions of this structure 5230 // will be called on the UI thread. 5231 /// 5232 struct cef_accessibility_handler_t 5233 { 5234 /// 5235 // Base structure. 5236 /// 5237 cef_base_ref_counted_t base; 5238 5239 /// 5240 // Called after renderer process sends accessibility tree changes to the 5241 // browser process. 5242 /// 5243 extern(System) void function ( 5244 cef_accessibility_handler_t* self, 5245 cef_value_t* value) nothrow on_accessibility_tree_change; 5246 5247 /// 5248 // Called after renderer process sends accessibility location changes to the 5249 // browser process. 5250 /// 5251 extern(System) void function ( 5252 cef_accessibility_handler_t* self, 5253 cef_value_t* value) nothrow on_accessibility_location_change; 5254 } 5255 5256 5257 5258 // CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_ 5259 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 5260 // 5261 // Redistribution and use in source and binary forms, with or without 5262 // modification, are permitted provided that the following conditions are 5263 // met: 5264 // 5265 // * Redistributions of source code must retain the above copyright 5266 // notice, this list of conditions and the following disclaimer. 5267 // * Redistributions in binary form must reproduce the above 5268 // copyright notice, this list of conditions and the following disclaimer 5269 // in the documentation and/or other materials provided with the 5270 // distribution. 5271 // * Neither the name of Google Inc. nor the name Chromium Embedded 5272 // Framework nor the names of its contributors may be used to endorse 5273 // or promote products derived from this software without specific prior 5274 // written permission. 5275 // 5276 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 5277 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 5278 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 5279 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 5280 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 5281 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 5282 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 5283 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 5284 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 5285 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 5286 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5287 // 5288 // --------------------------------------------------------------------------- 5289 // 5290 // This file was generated by the CEF translator tool and should not edited 5291 // by hand. See the translator.README.txt file in the tools directory for 5292 // more information. 5293 // 5294 // $hash=a4b63e6e7942e3a3961b4f7141a963980178ae6f$ 5295 // 5296 5297 extern (C): 5298 5299 /// 5300 // Implement this structure to provide handler implementations. Methods will be 5301 // called by the process and/or thread indicated. 5302 /// 5303 struct cef_app_t 5304 { 5305 /// 5306 // Base structure. 5307 /// 5308 cef_base_ref_counted_t base; 5309 5310 /// 5311 // Provides an opportunity to view and/or modify command-line arguments before 5312 // processing by CEF and Chromium. The |process_type| value will be NULL for 5313 // the browser process. Do not keep a reference to the cef_command_line_t 5314 // object passed to this function. The CefSettings.command_line_args_disabled 5315 // value can be used to start with an NULL command-line object. Any values 5316 // specified in CefSettings that equate to command-line arguments will be set 5317 // before this function is called. Be cautious when using this function to 5318 // modify command-line arguments for non-browser processes as this may result 5319 // in undefined behavior including crashes. 5320 /// 5321 extern(System) void function ( 5322 cef_app_t* self, 5323 const(cef_string_t)* process_type, 5324 cef_command_line_t* command_line) nothrow on_before_command_line_processing; 5325 5326 /// 5327 // Provides an opportunity to register custom schemes. Do not keep a reference 5328 // to the |registrar| object. This function is called on the main thread for 5329 // each process and the registered schemes should be the same across all 5330 // processes. 5331 /// 5332 extern(System) void function ( 5333 cef_app_t* self, 5334 cef_scheme_registrar_t* registrar) nothrow on_register_custom_schemes; 5335 5336 /// 5337 // Return the handler for resource bundle events. If 5338 // CefSettings.pack_loading_disabled is true (1) a handler must be returned. 5339 // If no handler is returned resources will be loaded from pack files. This 5340 // function is called by the browser and render processes on multiple threads. 5341 /// 5342 extern(System) cef_resource_bundle_handler_t* function ( 5343 cef_app_t* self) nothrow get_resource_bundle_handler; 5344 5345 /// 5346 // Return the handler for functionality specific to the browser process. This 5347 // function is called on multiple threads in the browser process. 5348 /// 5349 extern(System) cef_browser_process_handler_t* function ( 5350 cef_app_t* self) nothrow get_browser_process_handler; 5351 5352 /// 5353 // Return the handler for functionality specific to the render process. This 5354 // function is called on the render process main thread. 5355 /// 5356 extern(System) cef_render_process_handler_t* function ( 5357 cef_app_t* self) nothrow get_render_process_handler; 5358 } 5359 5360 5361 5362 /// 5363 // This function should be called from the application entry point function to 5364 // execute a secondary process. It can be used to run secondary processes from 5365 // the browser client executable (default behavior) or from a separate 5366 // executable specified by the CefSettings.browser_subprocess_path value. If 5367 // called for the browser process (identified by no "type" command-line value) 5368 // it will return immediately with a value of -1. If called for a recognized 5369 // secondary process it will block until the process should exit and then return 5370 // the process exit code. The |application| parameter may be NULL. The 5371 // |windows_sandbox_info| parameter is only used on Windows and may be NULL (see 5372 // cef_sandbox_win.h for details). 5373 /// 5374 int cef_execute_process ( 5375 const(cef_main_args_t)* args, 5376 cef_app_t* application, 5377 void* windows_sandbox_info); 5378 5379 /// 5380 // This function should be called on the main application thread to initialize 5381 // the CEF browser process. The |application| parameter may be NULL. A return 5382 // value of true (1) indicates that it succeeded and false (0) indicates that it 5383 // failed. The |windows_sandbox_info| parameter is only used on Windows and may 5384 // be NULL (see cef_sandbox_win.h for details). 5385 /// 5386 int cef_initialize ( 5387 const(cef_main_args_t)* args, 5388 const(cef_settings_t)* settings, 5389 cef_app_t* application, 5390 void* windows_sandbox_info); 5391 5392 /// 5393 // This function should be called on the main application thread to shut down 5394 // the CEF browser process before the application exits. 5395 /// 5396 void cef_shutdown (); 5397 5398 /// 5399 // Perform a single iteration of CEF message loop processing. This function is 5400 // provided for cases where the CEF message loop must be integrated into an 5401 // existing application message loop. Use of this function is not recommended 5402 // for most users; use either the cef_run_message_loop() function or 5403 // CefSettings.multi_threaded_message_loop if possible. When using this function 5404 // care must be taken to balance performance against excessive CPU usage. It is 5405 // recommended to enable the CefSettings.external_message_pump option when using 5406 // this function so that 5407 // cef_browser_process_handler_t::on_schedule_message_pump_work() callbacks can 5408 // facilitate the scheduling process. This function should only be called on the 5409 // main application thread and only if cef_initialize() is called with a 5410 // CefSettings.multi_threaded_message_loop value of false (0). This function 5411 // will not block. 5412 /// 5413 void cef_do_message_loop_work (); 5414 5415 /// 5416 // Run the CEF message loop. Use this function instead of an application- 5417 // provided message loop to get the best balance between performance and CPU 5418 // usage. This function should only be called on the main application thread and 5419 // only if cef_initialize() is called with a 5420 // CefSettings.multi_threaded_message_loop value of false (0). This function 5421 // will block until a quit message is received by the system. 5422 /// 5423 void cef_run_message_loop (); 5424 5425 /// 5426 // Quit the CEF message loop that was started by calling cef_run_message_loop(). 5427 // This function should only be called on the main application thread and only 5428 // if cef_run_message_loop() was used. 5429 /// 5430 void cef_quit_message_loop (); 5431 5432 /// 5433 // Set to true (1) before calling Windows APIs like TrackPopupMenu that enter a 5434 // modal message loop. Set to false (0) after exiting the modal message loop. 5435 /// 5436 void cef_set_osmodal_loop (int osModalLoop); 5437 5438 /// 5439 // Call during process startup to enable High-DPI support on Windows 7 or newer. 5440 // Older versions of Windows should be left DPI-unaware because they do not 5441 // support DirectWrite and GDI fonts are kerned very badly. 5442 /// 5443 void cef_enable_highdpi_support (); 5444 5445 // CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_ 5446 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 5447 // 5448 // Redistribution and use in source and binary forms, with or without 5449 // modification, are permitted provided that the following conditions are 5450 // met: 5451 // 5452 // * Redistributions of source code must retain the above copyright 5453 // notice, this list of conditions and the following disclaimer. 5454 // * Redistributions in binary form must reproduce the above 5455 // copyright notice, this list of conditions and the following disclaimer 5456 // in the documentation and/or other materials provided with the 5457 // distribution. 5458 // * Neither the name of Google Inc. nor the name Chromium Embedded 5459 // Framework nor the names of its contributors may be used to endorse 5460 // or promote products derived from this software without specific prior 5461 // written permission. 5462 // 5463 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 5464 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 5465 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 5466 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 5467 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 5468 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 5469 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 5470 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 5471 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 5472 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 5473 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5474 // 5475 // --------------------------------------------------------------------------- 5476 // 5477 // This file was generated by the CEF translator tool and should not edited 5478 // by hand. See the translator.README.txt file in the tools directory for 5479 // more information. 5480 // 5481 // $hash=7a483ed552ecca4f1aaa03800d366beca1ea2dee$ 5482 // 5483 5484 extern (C): 5485 5486 /// 5487 // Implement this structure to handle audio events. 5488 /// 5489 struct cef_audio_handler_t 5490 { 5491 /// 5492 // Base structure. 5493 /// 5494 cef_base_ref_counted_t base; 5495 5496 /// 5497 // Called on the UI thread to allow configuration of audio stream parameters. 5498 // Return true (1) to proceed with audio stream capture, or false (0) to 5499 // cancel it. All members of |params| can optionally be configured here, but 5500 // they are also pre-filled with some sensible defaults. 5501 /// 5502 extern(System) int function ( 5503 cef_audio_handler_t* self, 5504 cef_browser_t* browser, 5505 cef_audio_parameters_t* params) nothrow get_audio_parameters; 5506 5507 /// 5508 // Called on a browser audio capture thread when the browser starts streaming 5509 // audio. OnAudioSteamStopped will always be called after 5510 // OnAudioStreamStarted; both functions may be called multiple times for the 5511 // same browser. |params| contains the audio parameters like sample rate and 5512 // channel layout. |channels| is the number of channels. 5513 /// 5514 extern(System) void function ( 5515 cef_audio_handler_t* self, 5516 cef_browser_t* browser, 5517 const(cef_audio_parameters_t)* params, 5518 int channels) nothrow on_audio_stream_started; 5519 5520 /// 5521 // Called on the audio stream thread when a PCM packet is received for the 5522 // stream. |data| is an array representing the raw PCM data as a floating 5523 // point type, i.e. 4-byte value(s). |frames| is the number of frames in the 5524 // PCM packet. |pts| is the presentation timestamp (in milliseconds since the 5525 // Unix Epoch) and represents the time at which the decompressed packet should 5526 // be presented to the user. Based on |frames| and the |channel_layout| value 5527 // passed to OnAudioStreamStarted you can calculate the size of the |data| 5528 // array in bytes. 5529 /// 5530 extern(System) void function ( 5531 cef_audio_handler_t* self, 5532 cef_browser_t* browser, 5533 const(float*)* data, 5534 int frames, 5535 int64 pts) nothrow on_audio_stream_packet; 5536 5537 /// 5538 // Called on the UI thread when the stream has stopped. OnAudioSteamStopped 5539 // will always be called after OnAudioStreamStarted; both functions may be 5540 // called multiple times for the same stream. 5541 /// 5542 extern(System) void function ( 5543 cef_audio_handler_t* self, 5544 cef_browser_t* browser) nothrow on_audio_stream_stopped; 5545 5546 /// 5547 // Called on the UI or audio stream thread when an error occurred. During the 5548 // stream creation phase this callback will be called on the UI thread while 5549 // in the capturing phase it will be called on the audio stream thread. The 5550 // stream will be stopped immediately. 5551 /// 5552 extern(System) void function ( 5553 cef_audio_handler_t* self, 5554 cef_browser_t* browser, 5555 const(cef_string_t)* message) nothrow on_audio_stream_error; 5556 } 5557 5558 5559 5560 // CEF_INCLUDE_CAPI_CEF_AUDIO_HANDLER_CAPI_H_ 5561 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 5562 // 5563 // Redistribution and use in source and binary forms, with or without 5564 // modification, are permitted provided that the following conditions are 5565 // met: 5566 // 5567 // * Redistributions of source code must retain the above copyright 5568 // notice, this list of conditions and the following disclaimer. 5569 // * Redistributions in binary form must reproduce the above 5570 // copyright notice, this list of conditions and the following disclaimer 5571 // in the documentation and/or other materials provided with the 5572 // distribution. 5573 // * Neither the name of Google Inc. nor the name Chromium Embedded 5574 // Framework nor the names of its contributors may be used to endorse 5575 // or promote products derived from this software without specific prior 5576 // written permission. 5577 // 5578 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 5579 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 5580 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 5581 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 5582 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 5583 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 5584 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 5585 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 5586 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 5587 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 5588 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5589 // 5590 // --------------------------------------------------------------------------- 5591 // 5592 // This file was generated by the CEF translator tool and should not edited 5593 // by hand. See the translator.README.txt file in the tools directory for 5594 // more information. 5595 // 5596 // $hash=2b9508a328ed0218e2c576af455f8d76e5978545$ 5597 // 5598 5599 extern (C): 5600 5601 /// 5602 // Callback structure used for asynchronous continuation of authentication 5603 // requests. 5604 /// 5605 struct cef_auth_callback_t 5606 { 5607 /// 5608 // Base structure. 5609 /// 5610 cef_base_ref_counted_t base; 5611 5612 /// 5613 // Continue the authentication request. 5614 /// 5615 extern(System) void function ( 5616 cef_auth_callback_t* self, 5617 const(cef_string_t)* username, 5618 const(cef_string_t)* password) nothrow cont; 5619 5620 /// 5621 // Cancel the authentication request. 5622 /// 5623 extern(System) void function (cef_auth_callback_t* self) nothrow cancel; 5624 } 5625 5626 5627 5628 // CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_ 5629 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 5630 // 5631 // Redistribution and use in source and binary forms, with or without 5632 // modification, are permitted provided that the following conditions are 5633 // met: 5634 // 5635 // * Redistributions of source code must retain the above copyright 5636 // notice, this list of conditions and the following disclaimer. 5637 // * Redistributions in binary form must reproduce the above 5638 // copyright notice, this list of conditions and the following disclaimer 5639 // in the documentation and/or other materials provided with the 5640 // distribution. 5641 // * Neither the name of Google Inc. nor the name Chromium Embedded 5642 // Framework nor the names of its contributors may be used to endorse 5643 // or promote products derived from this software without specific prior 5644 // written permission. 5645 // 5646 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 5647 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 5648 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 5649 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 5650 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 5651 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 5652 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 5653 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 5654 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 5655 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 5656 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5657 5658 extern (C): 5659 5660 /// 5661 // All ref-counted framework structures must include this structure first. 5662 /// 5663 struct cef_base_ref_counted_t 5664 { 5665 /// 5666 // Size of the data structure. 5667 /// 5668 size_t size; 5669 5670 /// 5671 // Called to increment the reference count for the object. Should be called 5672 // for every new copy of a pointer to a given object. 5673 /// 5674 extern(System) void function (cef_base_ref_counted_t* self) nothrow add_ref; 5675 5676 /// 5677 // Called to decrement the reference count for the object. If the reference 5678 // count falls to 0 the object should self-delete. Returns true (1) if the 5679 // resulting reference count is 0. 5680 /// 5681 extern(System) int function (cef_base_ref_counted_t* self) nothrow release; 5682 5683 /// 5684 // Returns true (1) if the current reference count is 1. 5685 /// 5686 extern(System) int function (cef_base_ref_counted_t* self) nothrow has_one_ref; 5687 5688 /// 5689 // Returns true (1) if the current reference count is at least 1. 5690 /// 5691 extern(System) int function (cef_base_ref_counted_t* self) nothrow has_at_least_one_ref; 5692 } 5693 5694 5695 5696 /// 5697 // All scoped framework structures must include this structure first. 5698 /// 5699 struct cef_base_scoped_t 5700 { 5701 /// 5702 // Size of the data structure. 5703 /// 5704 size_t size; 5705 5706 /// 5707 // Called to delete this object. May be NULL if the object is not owned. 5708 /// 5709 extern(System) void function (cef_base_scoped_t* self) nothrow del; 5710 } 5711 5712 5713 5714 // Check that the structure |s|, which is defined with a size_t member at the 5715 // top, is large enough to contain the specified member |f|. 5716 5717 5718 5719 5720 // CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_ 5721 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 5722 // 5723 // Redistribution and use in source and binary forms, with or without 5724 // modification, are permitted provided that the following conditions are 5725 // met: 5726 // 5727 // * Redistributions of source code must retain the above copyright 5728 // notice, this list of conditions and the following disclaimer. 5729 // * Redistributions in binary form must reproduce the above 5730 // copyright notice, this list of conditions and the following disclaimer 5731 // in the documentation and/or other materials provided with the 5732 // distribution. 5733 // * Neither the name of Google Inc. nor the name Chromium Embedded 5734 // Framework nor the names of its contributors may be used to endorse 5735 // or promote products derived from this software without specific prior 5736 // written permission. 5737 // 5738 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 5739 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 5740 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 5741 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 5742 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 5743 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 5744 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 5745 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 5746 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 5747 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 5748 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5749 // 5750 // --------------------------------------------------------------------------- 5751 // 5752 // This file was generated by the CEF translator tool and should not edited 5753 // by hand. See the translator.README.txt file in the tools directory for 5754 // more information. 5755 // 5756 // $hash=b83b96e2b90124bba8084e2df7f66cc6749df872$ 5757 // 5758 5759 import core.stdc.config; 5760 5761 extern (C): 5762 5763 5764 5765 /// 5766 // Structure used to represent a browser. When used in the browser process the 5767 // functions of this structure may be called on any thread unless otherwise 5768 // indicated in the comments. When used in the render process the functions of 5769 // this structure may only be called on the main thread. 5770 /// 5771 struct cef_browser_t 5772 { 5773 /// 5774 // Base structure. 5775 /// 5776 cef_base_ref_counted_t base; 5777 5778 /// 5779 // True if this object is currently valid. This will return false (0) after 5780 // cef_life_span_handler_t::OnBeforeClose is called. 5781 /// 5782 extern(System) int function (cef_browser_t* self) nothrow is_valid; 5783 5784 /// 5785 // Returns the browser host object. This function can only be called in the 5786 // browser process. 5787 /// 5788 extern(System) cef_browser_host_t* function (cef_browser_t* self) nothrow get_host; 5789 5790 /// 5791 // Returns true (1) if the browser can navigate backwards. 5792 /// 5793 extern(System) int function (cef_browser_t* self) nothrow can_go_back; 5794 5795 /// 5796 // Navigate backwards. 5797 /// 5798 extern(System) void function (cef_browser_t* self) nothrow go_back; 5799 5800 /// 5801 // Returns true (1) if the browser can navigate forwards. 5802 /// 5803 extern(System) int function (cef_browser_t* self) nothrow can_go_forward; 5804 5805 /// 5806 // Navigate forwards. 5807 /// 5808 extern(System) void function (cef_browser_t* self) nothrow go_forward; 5809 5810 /// 5811 // Returns true (1) if the browser is currently loading. 5812 /// 5813 extern(System) int function (cef_browser_t* self) nothrow is_loading; 5814 5815 /// 5816 // Reload the current page. 5817 /// 5818 extern(System) void function (cef_browser_t* self) nothrow reload; 5819 5820 /// 5821 // Reload the current page ignoring any cached data. 5822 /// 5823 extern(System) void function (cef_browser_t* self) nothrow reload_ignore_cache; 5824 5825 /// 5826 // Stop loading the page. 5827 /// 5828 extern(System) void function (cef_browser_t* self) nothrow stop_load; 5829 5830 /// 5831 // Returns the globally unique identifier for this browser. This value is also 5832 // used as the tabId for extension APIs. 5833 /// 5834 extern(System) int function (cef_browser_t* self) nothrow get_identifier; 5835 5836 /// 5837 // Returns true (1) if this object is pointing to the same handle as |that| 5838 // object. 5839 /// 5840 extern(System) int function (cef_browser_t* self, cef_browser_t* that) nothrow is_same; 5841 5842 /// 5843 // Returns true (1) if the browser is a popup. 5844 /// 5845 extern(System) int function (cef_browser_t* self) nothrow is_popup; 5846 5847 /// 5848 // Returns true (1) if a document has been loaded in the browser. 5849 /// 5850 extern(System) int function (cef_browser_t* self) nothrow has_document; 5851 5852 /// 5853 // Returns the main (top-level) frame for the browser. In the browser process 5854 // this will return a valid object until after 5855 // cef_life_span_handler_t::OnBeforeClose is called. In the renderer process 5856 // this will return NULL if the main frame is hosted in a different renderer 5857 // process (e.g. for cross-origin sub-frames). The main frame object will 5858 // change during cross-origin navigation or re-navigation after renderer 5859 // process termination (due to crashes, etc). 5860 /// 5861 extern(System) cef_frame_t* function (cef_browser_t* self) nothrow get_main_frame; 5862 5863 /// 5864 // Returns the focused frame for the browser. 5865 /// 5866 extern(System) cef_frame_t* function (cef_browser_t* self) nothrow get_focused_frame; 5867 5868 /// 5869 // Returns the frame with the specified identifier, or NULL if not found. 5870 /// 5871 extern(System) cef_frame_t* function ( 5872 cef_browser_t* self, 5873 int64 identifier) nothrow get_frame_byident; 5874 5875 /// 5876 // Returns the frame with the specified name, or NULL if not found. 5877 /// 5878 extern(System) cef_frame_t* function ( 5879 cef_browser_t* self, 5880 const(cef_string_t)* name) nothrow get_frame; 5881 5882 /// 5883 // Returns the number of frames that currently exist. 5884 /// 5885 extern(System) size_t function (cef_browser_t* self) nothrow get_frame_count; 5886 5887 /// 5888 // Returns the identifiers of all existing frames. 5889 /// 5890 extern(System) void function ( 5891 cef_browser_t* self, 5892 size_t* identifiersCount, 5893 int64* identifiers) nothrow get_frame_identifiers; 5894 5895 /// 5896 // Returns the names of all existing frames. 5897 /// 5898 extern(System) void function ( 5899 cef_browser_t* self, 5900 cef_string_list_t names) nothrow get_frame_names; 5901 } 5902 5903 5904 5905 /// 5906 // Callback structure for cef_browser_host_t::RunFileDialog. The functions of 5907 // this structure will be called on the browser process UI thread. 5908 /// 5909 struct cef_run_file_dialog_callback_t 5910 { 5911 /// 5912 // Base structure. 5913 /// 5914 cef_base_ref_counted_t base; 5915 5916 /// 5917 // Called asynchronously after the file dialog is dismissed. 5918 // |selected_accept_filter| is the 0-based index of the value selected from 5919 // the accept filters array passed to cef_browser_host_t::RunFileDialog. 5920 // |file_paths| will be a single value or a list of values depending on the 5921 // dialog mode. If the selection was cancelled |file_paths| will be NULL. 5922 /// 5923 extern(System) void function ( 5924 cef_run_file_dialog_callback_t* self, 5925 int selected_accept_filter, 5926 cef_string_list_t file_paths) nothrow on_file_dialog_dismissed; 5927 } 5928 5929 5930 5931 /// 5932 // Callback structure for cef_browser_host_t::GetNavigationEntries. The 5933 // functions of this structure will be called on the browser process UI thread. 5934 /// 5935 struct cef_navigation_entry_visitor_t 5936 { 5937 /// 5938 // Base structure. 5939 /// 5940 cef_base_ref_counted_t base; 5941 5942 /// 5943 // Method that will be executed. Do not keep a reference to |entry| outside of 5944 // this callback. Return true (1) to continue visiting entries or false (0) to 5945 // stop. |current| is true (1) if this entry is the currently loaded 5946 // navigation entry. |index| is the 0-based index of this entry and |total| is 5947 // the total number of entries. 5948 /// 5949 extern(System) int function ( 5950 cef_navigation_entry_visitor_t* self, 5951 cef_navigation_entry_t* entry, 5952 int current, 5953 int index, 5954 int total) nothrow visit; 5955 } 5956 5957 5958 5959 /// 5960 // Callback structure for cef_browser_host_t::PrintToPDF. The functions of this 5961 // structure will be called on the browser process UI thread. 5962 /// 5963 struct cef_pdf_print_callback_t 5964 { 5965 /// 5966 // Base structure. 5967 /// 5968 cef_base_ref_counted_t base; 5969 5970 /// 5971 // Method that will be executed when the PDF printing has completed. |path| is 5972 // the output path. |ok| will be true (1) if the printing completed 5973 // successfully or false (0) otherwise. 5974 /// 5975 extern(System) void function ( 5976 cef_pdf_print_callback_t* self, 5977 const(cef_string_t)* path, 5978 int ok) nothrow on_pdf_print_finished; 5979 } 5980 5981 5982 5983 /// 5984 // Callback structure for cef_browser_host_t::DownloadImage. The functions of 5985 // this structure will be called on the browser process UI thread. 5986 /// 5987 struct cef_download_image_callback_t 5988 { 5989 /// 5990 // Base structure. 5991 /// 5992 cef_base_ref_counted_t base; 5993 5994 /// 5995 // Method that will be executed when the image download has completed. 5996 // |image_url| is the URL that was downloaded and |http_status_code| is the 5997 // resulting HTTP status code. |image| is the resulting image, possibly at 5998 // multiple scale factors, or NULL if the download failed. 5999 /// 6000 extern(System) void function ( 6001 cef_download_image_callback_t* self, 6002 const(cef_string_t)* image_url, 6003 int http_status_code, 6004 cef_image_t* image) nothrow on_download_image_finished; 6005 } 6006 6007 6008 6009 /// 6010 // Structure used to represent the browser process aspects of a browser. The 6011 // functions of this structure can only be called in the browser process. They 6012 // may be called on any thread in that process unless otherwise indicated in the 6013 // comments. 6014 /// 6015 struct cef_browser_host_t 6016 { 6017 /// 6018 // Base structure. 6019 /// 6020 cef_base_ref_counted_t base; 6021 6022 /// 6023 // Returns the hosted browser object. 6024 /// 6025 extern(System) cef_browser_t* function (cef_browser_host_t* self) nothrow get_browser; 6026 6027 /// 6028 // Request that the browser close. The JavaScript 'onbeforeunload' event will 6029 // be fired. If |force_close| is false (0) the event handler, if any, will be 6030 // allowed to prompt the user and the user can optionally cancel the close. If 6031 // |force_close| is true (1) the prompt will not be displayed and the close 6032 // will proceed. Results in a call to cef_life_span_handler_t::do_close() if 6033 // the event handler allows the close or if |force_close| is true (1). See 6034 // cef_life_span_handler_t::do_close() documentation for additional usage 6035 // information. 6036 /// 6037 extern(System) void function (cef_browser_host_t* self, int force_close) nothrow close_browser; 6038 6039 /// 6040 // Helper for closing a browser. Call this function from the top-level window 6041 // close handler (if any). Internally this calls CloseBrowser(false (0)) if 6042 // the close has not yet been initiated. This function returns false (0) while 6043 // the close is pending and true (1) after the close has completed. See 6044 // close_browser() and cef_life_span_handler_t::do_close() documentation for 6045 // additional usage information. This function must be called on the browser 6046 // process UI thread. 6047 /// 6048 extern(System) int function (cef_browser_host_t* self) nothrow try_close_browser; 6049 6050 /// 6051 // Set whether the browser is focused. 6052 /// 6053 extern(System) void function (cef_browser_host_t* self, int focus) nothrow set_focus; 6054 6055 /// 6056 // Retrieve the window handle (if any) for this browser. If this browser is 6057 // wrapped in a cef_browser_view_t this function should be called on the 6058 // browser process UI thread and it will return the handle for the top-level 6059 // native window. 6060 /// 6061 extern(System) c_ulong function (cef_browser_host_t* self) nothrow get_window_handle; 6062 6063 /// 6064 // Retrieve the window handle (if any) of the browser that opened this 6065 // browser. Will return NULL for non-popup browsers or if this browser is 6066 // wrapped in a cef_browser_view_t. This function can be used in combination 6067 // with custom handling of modal windows. 6068 /// 6069 extern(System) c_ulong function (cef_browser_host_t* self) nothrow get_opener_window_handle; 6070 6071 /// 6072 // Returns true (1) if this browser is wrapped in a cef_browser_view_t. 6073 /// 6074 extern(System) int function (cef_browser_host_t* self) nothrow has_view; 6075 6076 /// 6077 // Returns the client for this browser. 6078 /// 6079 extern(System) cef_client_t* function (cef_browser_host_t* self) nothrow get_client; 6080 6081 /// 6082 // Returns the request context for this browser. 6083 /// 6084 extern(System) cef_request_context_t* function ( 6085 cef_browser_host_t* self) nothrow get_request_context; 6086 6087 /// 6088 // Get the current zoom level. The default zoom level is 0.0. This function 6089 // can only be called on the UI thread. 6090 /// 6091 extern(System) double function (cef_browser_host_t* self) nothrow get_zoom_level; 6092 6093 /// 6094 // Change the zoom level to the specified value. Specify 0.0 to reset the zoom 6095 // level. If called on the UI thread the change will be applied immediately. 6096 // Otherwise, the change will be applied asynchronously on the UI thread. 6097 /// 6098 extern(System) void function (cef_browser_host_t* self, double zoomLevel) nothrow set_zoom_level; 6099 6100 /// 6101 // Call to run a file chooser dialog. Only a single file chooser dialog may be 6102 // pending at any given time. |mode| represents the type of dialog to display. 6103 // |title| to the title to be used for the dialog and may be NULL to show the 6104 // default title ("Open" or "Save" depending on the mode). |default_file_path| 6105 // is the path with optional directory and/or file name component that will be 6106 // initially selected in the dialog. |accept_filters| are used to restrict the 6107 // selectable file types and may any combination of (a) valid lower-cased MIME 6108 // types (e.g. "text/*" or "image/*"), (b) individual file extensions (e.g. 6109 // ".txt" or ".png"), or (c) combined description and file extension delimited 6110 // using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg"). 6111 // |selected_accept_filter| is the 0-based index of the filter that will be 6112 // selected by default. |callback| will be executed after the dialog is 6113 // dismissed or immediately if another dialog is already pending. The dialog 6114 // will be initiated asynchronously on the UI thread. 6115 /// 6116 extern(System) void function ( 6117 cef_browser_host_t* self, 6118 cef_file_dialog_mode_t mode, 6119 const(cef_string_t)* title, 6120 const(cef_string_t)* default_file_path, 6121 cef_string_list_t accept_filters, 6122 int selected_accept_filter, 6123 cef_run_file_dialog_callback_t* callback) nothrow run_file_dialog; 6124 6125 /// 6126 // Download the file at |url| using cef_download_handler_t. 6127 /// 6128 extern(System) void function ( 6129 cef_browser_host_t* self, 6130 const(cef_string_t)* url) nothrow start_download; 6131 6132 /// 6133 // Download |image_url| and execute |callback| on completion with the images 6134 // received from the renderer. If |is_favicon| is true (1) then cookies are 6135 // not sent and not accepted during download. Images with density independent 6136 // pixel (DIP) sizes larger than |max_image_size| are filtered out from the 6137 // image results. Versions of the image at different scale factors may be 6138 // downloaded up to the maximum scale factor supported by the system. If there 6139 // are no image results <= |max_image_size| then the smallest image is resized 6140 // to |max_image_size| and is the only result. A |max_image_size| of 0 means 6141 // unlimited. If |bypass_cache| is true (1) then |image_url| is requested from 6142 // the server even if it is present in the browser cache. 6143 /// 6144 extern(System) void function ( 6145 cef_browser_host_t* self, 6146 const(cef_string_t)* image_url, 6147 int is_favicon, 6148 uint32 max_image_size, 6149 int bypass_cache, 6150 cef_download_image_callback_t* callback) nothrow download_image; 6151 6152 /// 6153 // Print the current browser contents. 6154 /// 6155 extern(System) void function (cef_browser_host_t* self) nothrow print; 6156 6157 /// 6158 // Print the current browser contents to the PDF file specified by |path| and 6159 // execute |callback| on completion. The caller is responsible for deleting 6160 // |path| when done. For PDF printing to work on Linux you must implement the 6161 // cef_print_handler_t::GetPdfPaperSize function. 6162 /// 6163 extern(System) void function ( 6164 cef_browser_host_t* self, 6165 const(cef_string_t)* path, 6166 const(cef_pdf_print_settings_t)* settings, 6167 cef_pdf_print_callback_t* callback) nothrow print_to_pdf; 6168 6169 /// 6170 // Search for |searchText|. |identifier| must be a unique ID and these IDs 6171 // must strictly increase so that newer requests always have greater IDs than 6172 // older requests. If |identifier| is zero or less than the previous ID value 6173 // then it will be automatically assigned a new valid ID. |forward| indicates 6174 // whether to search forward or backward within the page. |matchCase| 6175 // indicates whether the search should be case-sensitive. |findNext| indicates 6176 // whether this is the first request or a follow-up. The cef_find_handler_t 6177 // instance, if any, returned via cef_client_t::GetFindHandler will be called 6178 // to report find results. 6179 /// 6180 extern(System) void function ( 6181 cef_browser_host_t* self, 6182 int identifier, 6183 const(cef_string_t)* searchText, 6184 int forward, 6185 int matchCase, 6186 int findNext) nothrow find; 6187 6188 /// 6189 // Cancel all searches that are currently going on. 6190 /// 6191 extern(System) void function (cef_browser_host_t* self, int clearSelection) nothrow stop_finding; 6192 6193 /// 6194 // Open developer tools (DevTools) in its own browser. The DevTools browser 6195 // will remain associated with this browser. If the DevTools browser is 6196 // already open then it will be focused, in which case the |windowInfo|, 6197 // |client| and |settings| parameters will be ignored. If |inspect_element_at| 6198 // is non-NULL then the element at the specified (x,y) location will be 6199 // inspected. The |windowInfo| parameter will be ignored if this browser is 6200 // wrapped in a cef_browser_view_t. 6201 /// 6202 extern(System) void function ( 6203 cef_browser_host_t* self, 6204 const(cef_window_info_t)* windowInfo, 6205 cef_client_t* client, 6206 const(cef_browser_settings_t)* settings, 6207 const(cef_point_t)* inspect_element_at) nothrow show_dev_tools; 6208 6209 /// 6210 // Explicitly close the associated DevTools browser, if any. 6211 /// 6212 extern(System) void function (cef_browser_host_t* self) nothrow close_dev_tools; 6213 6214 /// 6215 // Returns true (1) if this browser currently has an associated DevTools 6216 // browser. Must be called on the browser process UI thread. 6217 /// 6218 extern(System) int function (cef_browser_host_t* self) nothrow has_dev_tools; 6219 6220 /// 6221 // Send a function call message over the DevTools protocol. |message| must be 6222 // a UTF8-encoded JSON dictionary that contains "id" (int), "function" 6223 // (string) and "params" (dictionary, optional) values. See the DevTools 6224 // protocol documentation at https://chromedevtools.github.io/devtools- 6225 // protocol/ for details of supported functions and the expected "params" 6226 // dictionary contents. |message| will be copied if necessary. This function 6227 // will return true (1) if called on the UI thread and the message was 6228 // successfully submitted for validation, otherwise false (0). Validation will 6229 // be applied asynchronously and any messages that fail due to formatting 6230 // errors or missing parameters may be discarded without notification. Prefer 6231 // ExecuteDevToolsMethod if a more structured approach to message formatting 6232 // is desired. 6233 // 6234 // Every valid function call will result in an asynchronous function result or 6235 // error message that references the sent message "id". Event messages are 6236 // received while notifications are enabled (for example, between function 6237 // calls for "Page.enable" and "Page.disable"). All received messages will be 6238 // delivered to the observer(s) registered with AddDevToolsMessageObserver. 6239 // See cef_dev_tools_message_observer_t::OnDevToolsMessage documentation for 6240 // details of received message contents. 6241 // 6242 // Usage of the SendDevToolsMessage, ExecuteDevToolsMethod and 6243 // AddDevToolsMessageObserver functions does not require an active DevTools 6244 // front-end or remote-debugging session. Other active DevTools sessions will 6245 // continue to function independently. However, any modification of global 6246 // browser state by one session may not be reflected in the UI of other 6247 // sessions. 6248 // 6249 // Communication with the DevTools front-end (when displayed) can be logged 6250 // for development purposes by passing the `--devtools-protocol-log- 6251 // file=<path>` command-line flag. 6252 /// 6253 extern(System) int function ( 6254 cef_browser_host_t* self, 6255 const(void)* message, 6256 size_t message_size) nothrow send_dev_tools_message; 6257 6258 /// 6259 // Execute a function call over the DevTools protocol. This is a more 6260 // structured version of SendDevToolsMessage. |message_id| is an incremental 6261 // number that uniquely identifies the message (pass 0 to have the next number 6262 // assigned automatically based on previous values). |function| is the 6263 // function name. |params| are the function parameters, which may be NULL. See 6264 // the DevTools protocol documentation (linked above) for details of supported 6265 // functions and the expected |params| dictionary contents. This function will 6266 // return the assigned message ID if called on the UI thread and the message 6267 // was successfully submitted for validation, otherwise 0. See the 6268 // SendDevToolsMessage documentation for additional usage information. 6269 /// 6270 extern(System) int function ( 6271 cef_browser_host_t* self, 6272 int message_id, 6273 const(cef_string_t)* method, 6274 cef_dictionary_value_t* params) nothrow execute_dev_tools_method; 6275 6276 /// 6277 // Add an observer for DevTools protocol messages (function results and 6278 // events). The observer will remain registered until the returned 6279 // Registration object is destroyed. See the SendDevToolsMessage documentation 6280 // for additional usage information. 6281 /// 6282 extern(System) cef_registration_t* function ( 6283 cef_browser_host_t* self, 6284 cef_dev_tools_message_observer_t* observer) nothrow add_dev_tools_message_observer; 6285 6286 /// 6287 // Retrieve a snapshot of current navigation entries as values sent to the 6288 // specified visitor. If |current_only| is true (1) only the current 6289 // navigation entry will be sent, otherwise all navigation entries will be 6290 // sent. 6291 /// 6292 extern(System) void function ( 6293 cef_browser_host_t* self, 6294 cef_navigation_entry_visitor_t* visitor, 6295 int current_only) nothrow get_navigation_entries; 6296 6297 /// 6298 // If a misspelled word is currently selected in an editable node calling this 6299 // function will replace it with the specified |word|. 6300 /// 6301 extern(System) void function ( 6302 cef_browser_host_t* self, 6303 const(cef_string_t)* word) nothrow replace_misspelling; 6304 6305 /// 6306 // Add the specified |word| to the spelling dictionary. 6307 /// 6308 extern(System) void function ( 6309 cef_browser_host_t* self, 6310 const(cef_string_t)* word) nothrow add_word_to_dictionary; 6311 6312 /// 6313 // Returns true (1) if window rendering is disabled. 6314 /// 6315 extern(System) int function (cef_browser_host_t* self) nothrow is_window_rendering_disabled; 6316 6317 /// 6318 // Notify the browser that the widget has been resized. The browser will first 6319 // call cef_render_handler_t::GetViewRect to get the new size and then call 6320 // cef_render_handler_t::OnPaint asynchronously with the updated regions. This 6321 // function is only used when window rendering is disabled. 6322 /// 6323 extern(System) void function (cef_browser_host_t* self) nothrow was_resized; 6324 6325 /// 6326 // Notify the browser that it has been hidden or shown. Layouting and 6327 // cef_render_handler_t::OnPaint notification will stop when the browser is 6328 // hidden. This function is only used when window rendering is disabled. 6329 /// 6330 extern(System) void function (cef_browser_host_t* self, int hidden) nothrow was_hidden; 6331 6332 /// 6333 // Send a notification to the browser that the screen info has changed. The 6334 // browser will then call cef_render_handler_t::GetScreenInfo to update the 6335 // screen information with the new values. This simulates moving the webview 6336 // window from one display to another, or changing the properties of the 6337 // current display. This function is only used when window rendering is 6338 // disabled. 6339 /// 6340 extern(System) void function (cef_browser_host_t* self) nothrow notify_screen_info_changed; 6341 6342 /// 6343 // Invalidate the view. The browser will call cef_render_handler_t::OnPaint 6344 // asynchronously. This function is only used when window rendering is 6345 // disabled. 6346 /// 6347 extern(System) void function ( 6348 cef_browser_host_t* self, 6349 cef_paint_element_type_t type) nothrow invalidate; 6350 6351 /// 6352 // Issue a BeginFrame request to Chromium. Only valid when 6353 // cef_window_tInfo::external_begin_frame_enabled is set to true (1). 6354 /// 6355 extern(System) void function (cef_browser_host_t* self) nothrow send_external_begin_frame; 6356 6357 /// 6358 // Send a key event to the browser. 6359 /// 6360 extern(System) void function ( 6361 cef_browser_host_t* self, 6362 const(cef_key_event_t)* event) nothrow send_key_event; 6363 6364 /// 6365 // Send a mouse click event to the browser. The |x| and |y| coordinates are 6366 // relative to the upper-left corner of the view. 6367 /// 6368 extern(System) void function ( 6369 cef_browser_host_t* self, 6370 const(cef_mouse_event_t)* event, 6371 cef_mouse_button_type_t type, 6372 int mouseUp, 6373 int clickCount) nothrow send_mouse_click_event; 6374 6375 /// 6376 // Send a mouse move event to the browser. The |x| and |y| coordinates are 6377 // relative to the upper-left corner of the view. 6378 /// 6379 extern(System) void function ( 6380 cef_browser_host_t* self, 6381 const(cef_mouse_event_t)* event, 6382 int mouseLeave) nothrow send_mouse_move_event; 6383 6384 /// 6385 // Send a mouse wheel event to the browser. The |x| and |y| coordinates are 6386 // relative to the upper-left corner of the view. The |deltaX| and |deltaY| 6387 // values represent the movement delta in the X and Y directions respectively. 6388 // In order to scroll inside select popups with window rendering disabled 6389 // cef_render_handler_t::GetScreenPoint should be implemented properly. 6390 /// 6391 extern(System) void function ( 6392 cef_browser_host_t* self, 6393 const(cef_mouse_event_t)* event, 6394 int deltaX, 6395 int deltaY) nothrow send_mouse_wheel_event; 6396 6397 /// 6398 // Send a touch event to the browser for a windowless browser. 6399 /// 6400 extern(System) void function ( 6401 cef_browser_host_t* self, 6402 const(cef_touch_event_t)* event) nothrow send_touch_event; 6403 6404 /// 6405 // Send a capture lost event to the browser. 6406 /// 6407 extern(System) void function (cef_browser_host_t* self) nothrow send_capture_lost_event; 6408 6409 /// 6410 // Notify the browser that the window hosting it is about to be moved or 6411 // resized. This function is only used on Windows and Linux. 6412 /// 6413 extern(System) void function (cef_browser_host_t* self) nothrow notify_move_or_resize_started; 6414 6415 /// 6416 // Returns the maximum rate in frames per second (fps) that 6417 // cef_render_handler_t:: OnPaint will be called for a windowless browser. The 6418 // actual fps may be lower if the browser cannot generate frames at the 6419 // requested rate. The minimum value is 1 and the maximum value is 60 (default 6420 // 30). This function can only be called on the UI thread. 6421 /// 6422 extern(System) int function (cef_browser_host_t* self) nothrow get_windowless_frame_rate; 6423 6424 /// 6425 // Set the maximum rate in frames per second (fps) that cef_render_handler_t:: 6426 // OnPaint will be called for a windowless browser. The actual fps may be 6427 // lower if the browser cannot generate frames at the requested rate. The 6428 // minimum value is 1 and the maximum value is 60 (default 30). Can also be 6429 // set at browser creation via cef_browser_tSettings.windowless_frame_rate. 6430 /// 6431 extern(System) void function ( 6432 cef_browser_host_t* self, 6433 int frame_rate) nothrow set_windowless_frame_rate; 6434 6435 /// 6436 // Begins a new composition or updates the existing composition. Blink has a 6437 // special node (a composition node) that allows the input function to change 6438 // text without affecting other DOM nodes. |text| is the optional text that 6439 // will be inserted into the composition node. |underlines| is an optional set 6440 // of ranges that will be underlined in the resulting text. 6441 // |replacement_range| is an optional range of the existing text that will be 6442 // replaced. |selection_range| is an optional range of the resulting text that 6443 // will be selected after insertion or replacement. The |replacement_range| 6444 // value is only used on OS X. 6445 // 6446 // This function may be called multiple times as the composition changes. When 6447 // the client is done making changes the composition should either be canceled 6448 // or completed. To cancel the composition call ImeCancelComposition. To 6449 // complete the composition call either ImeCommitText or 6450 // ImeFinishComposingText. Completion is usually signaled when: 6451 // A. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR 6452 // flag (on Windows), or; 6453 // B. The client receives a "commit" signal of GtkIMContext (on Linux), or; 6454 // C. insertText of NSTextInput is called (on Mac). 6455 // 6456 // This function is only used when window rendering is disabled. 6457 /// 6458 extern(System) void function ( 6459 cef_browser_host_t* self, 6460 const(cef_string_t)* text, 6461 size_t underlinesCount, 6462 const(cef_composition_underline_t)* underlines, 6463 const(cef_range_t)* replacement_range, 6464 const(cef_range_t)* selection_range) nothrow ime_set_composition; 6465 6466 /// 6467 // Completes the existing composition by optionally inserting the specified 6468 // |text| into the composition node. |replacement_range| is an optional range 6469 // of the existing text that will be replaced. |relative_cursor_pos| is where 6470 // the cursor will be positioned relative to the current cursor position. See 6471 // comments on ImeSetComposition for usage. The |replacement_range| and 6472 // |relative_cursor_pos| values are only used on OS X. This function is only 6473 // used when window rendering is disabled. 6474 /// 6475 extern(System) void function ( 6476 cef_browser_host_t* self, 6477 const(cef_string_t)* text, 6478 const(cef_range_t)* replacement_range, 6479 int relative_cursor_pos) nothrow ime_commit_text; 6480 6481 /// 6482 // Completes the existing composition by applying the current composition node 6483 // contents. If |keep_selection| is false (0) the current selection, if any, 6484 // will be discarded. See comments on ImeSetComposition for usage. This 6485 // function is only used when window rendering is disabled. 6486 /// 6487 extern(System) void function ( 6488 cef_browser_host_t* self, 6489 int keep_selection) nothrow ime_finish_composing_text; 6490 6491 /// 6492 // Cancels the existing composition and discards the composition node contents 6493 // without applying them. See comments on ImeSetComposition for usage. This 6494 // function is only used when window rendering is disabled. 6495 /// 6496 extern(System) void function (cef_browser_host_t* self) nothrow ime_cancel_composition; 6497 6498 /// 6499 // Call this function when the user drags the mouse into the web view (before 6500 // calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). |drag_data| 6501 // should not contain file contents as this type of data is not allowed to be 6502 // dragged into the web view. File contents can be removed using 6503 // cef_drag_data_t::ResetFileContents (for example, if |drag_data| comes from 6504 // cef_render_handler_t::StartDragging). This function is only used when 6505 // window rendering is disabled. 6506 /// 6507 extern(System) void function ( 6508 cef_browser_host_t* self, 6509 cef_drag_data_t* drag_data, 6510 const(cef_mouse_event_t)* event, 6511 cef_drag_operations_mask_t allowed_ops) nothrow drag_target_drag_enter; 6512 6513 /// 6514 // Call this function each time the mouse is moved across the web view during 6515 // a drag operation (after calling DragTargetDragEnter and before calling 6516 // DragTargetDragLeave/DragTargetDrop). This function is only used when window 6517 // rendering is disabled. 6518 /// 6519 extern(System) void function ( 6520 cef_browser_host_t* self, 6521 const(cef_mouse_event_t)* event, 6522 cef_drag_operations_mask_t allowed_ops) nothrow drag_target_drag_over; 6523 6524 /// 6525 // Call this function when the user drags the mouse out of the web view (after 6526 // calling DragTargetDragEnter). This function is only used when window 6527 // rendering is disabled. 6528 /// 6529 extern(System) void function (cef_browser_host_t* self) nothrow drag_target_drag_leave; 6530 6531 /// 6532 // Call this function when the user completes the drag operation by dropping 6533 // the object onto the web view (after calling DragTargetDragEnter). The 6534 // object being dropped is |drag_data|, given as an argument to the previous 6535 // DragTargetDragEnter call. This function is only used when window rendering 6536 // is disabled. 6537 /// 6538 extern(System) void function ( 6539 cef_browser_host_t* self, 6540 const(cef_mouse_event_t)* event) nothrow drag_target_drop; 6541 6542 /// 6543 // Call this function when the drag operation started by a 6544 // cef_render_handler_t::StartDragging call has ended either in a drop or by 6545 // being cancelled. |x| and |y| are mouse coordinates relative to the upper- 6546 // left corner of the view. If the web view is both the drag source and the 6547 // drag target then all DragTarget* functions should be called before 6548 // DragSource* mthods. This function is only used when window rendering is 6549 // disabled. 6550 /// 6551 extern(System) void function ( 6552 cef_browser_host_t* self, 6553 int x, 6554 int y, 6555 cef_drag_operations_mask_t op) nothrow drag_source_ended_at; 6556 6557 /// 6558 // Call this function when the drag operation started by a 6559 // cef_render_handler_t::StartDragging call has completed. This function may 6560 // be called immediately without first calling DragSourceEndedAt to cancel a 6561 // drag operation. If the web view is both the drag source and the drag target 6562 // then all DragTarget* functions should be called before DragSource* mthods. 6563 // This function is only used when window rendering is disabled. 6564 /// 6565 extern(System) void function (cef_browser_host_t* self) nothrow drag_source_system_drag_ended; 6566 6567 /// 6568 // Returns the current visible navigation entry for this browser. This 6569 // function can only be called on the UI thread. 6570 /// 6571 extern(System) cef_navigation_entry_t* function ( 6572 cef_browser_host_t* self) nothrow get_visible_navigation_entry; 6573 6574 /// 6575 // Set accessibility state for all frames. |accessibility_state| may be 6576 // default, enabled or disabled. If |accessibility_state| is STATE_DEFAULT 6577 // then accessibility will be disabled by default and the state may be further 6578 // controlled with the "force-renderer-accessibility" and "disable-renderer- 6579 // accessibility" command-line switches. If |accessibility_state| is 6580 // STATE_ENABLED then accessibility will be enabled. If |accessibility_state| 6581 // is STATE_DISABLED then accessibility will be completely disabled. 6582 // 6583 // For windowed browsers accessibility will be enabled in Complete mode (which 6584 // corresponds to kAccessibilityModeComplete in Chromium). In this mode all 6585 // platform accessibility objects will be created and managed by Chromium's 6586 // internal implementation. The client needs only to detect the screen reader 6587 // and call this function appropriately. For example, on macOS the client can 6588 // handle the @"AXEnhancedUserStructure" accessibility attribute to detect 6589 // VoiceOver state changes and on Windows the client can handle WM_GETOBJECT 6590 // with OBJID_CLIENT to detect accessibility readers. 6591 // 6592 // For windowless browsers accessibility will be enabled in TreeOnly mode 6593 // (which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In 6594 // this mode renderer accessibility is enabled, the full tree is computed, and 6595 // events are passed to CefAccessibiltyHandler, but platform accessibility 6596 // objects are not created. The client may implement platform accessibility 6597 // objects using CefAccessibiltyHandler callbacks if desired. 6598 /// 6599 extern(System) void function ( 6600 cef_browser_host_t* self, 6601 cef_state_t accessibility_state) nothrow set_accessibility_state; 6602 6603 /// 6604 // Enable notifications of auto resize via 6605 // cef_display_handler_t::OnAutoResize. Notifications are disabled by default. 6606 // |min_size| and |max_size| define the range of allowed sizes. 6607 /// 6608 extern(System) void function ( 6609 cef_browser_host_t* self, 6610 int enabled, 6611 const(cef_size_t)* min_size, 6612 const(cef_size_t)* max_size) nothrow set_auto_resize_enabled; 6613 6614 /// 6615 // Returns the extension hosted in this browser or NULL if no extension is 6616 // hosted. See cef_request_context_t::LoadExtension for details. 6617 /// 6618 extern(System) cef_extension_t* function (cef_browser_host_t* self) nothrow get_extension; 6619 6620 /// 6621 // Returns true (1) if this browser is hosting an extension background script. 6622 // Background hosts do not have a window and are not displayable. See 6623 // cef_request_context_t::LoadExtension for details. 6624 /// 6625 extern(System) int function (cef_browser_host_t* self) nothrow is_background_host; 6626 6627 /// 6628 // Set whether the browser's audio is muted. 6629 /// 6630 extern(System) void function (cef_browser_host_t* self, int mute) nothrow set_audio_muted; 6631 6632 /// 6633 // Returns true (1) if the browser's audio is muted. This function can only 6634 // be called on the UI thread. 6635 /// 6636 extern(System) int function (cef_browser_host_t* self) nothrow is_audio_muted; 6637 } 6638 6639 6640 6641 /// 6642 // Create a new browser using the window parameters specified by |windowInfo|. 6643 // All values will be copied internally and the actual window (if any) will be 6644 // created on the UI thread. If |request_context| is NULL the global request 6645 // context will be used. This function can be called on any browser process 6646 // thread and will not block. The optional |extra_info| parameter provides an 6647 // opportunity to specify extra information specific to the created browser that 6648 // will be passed to cef_render_process_handler_t::on_browser_created() in the 6649 // render process. 6650 /// 6651 int cef_browser_host_create_browser ( 6652 const(cef_window_info_t)* windowInfo, 6653 cef_client_t* client, 6654 const(cef_string_t)* url, 6655 const(cef_browser_settings_t)* settings, 6656 cef_dictionary_value_t* extra_info, 6657 cef_request_context_t* request_context); 6658 6659 /// 6660 // Create a new browser using the window parameters specified by |windowInfo|. 6661 // If |request_context| is NULL the global request context will be used. This 6662 // function can only be called on the browser process UI thread. The optional 6663 // |extra_info| parameter provides an opportunity to specify extra information 6664 // specific to the created browser that will be passed to 6665 // cef_render_process_handler_t::on_browser_created() in the render process. 6666 /// 6667 cef_browser_t* cef_browser_host_create_browser_sync ( 6668 const(cef_window_info_t)* windowInfo, 6669 cef_client_t* client, 6670 const(cef_string_t)* url, 6671 const(cef_browser_settings_t)* settings, 6672 cef_dictionary_value_t* extra_info, 6673 cef_request_context_t* request_context); 6674 6675 // CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_ 6676 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 6677 // 6678 // Redistribution and use in source and binary forms, with or without 6679 // modification, are permitted provided that the following conditions are 6680 // met: 6681 // 6682 // * Redistributions of source code must retain the above copyright 6683 // notice, this list of conditions and the following disclaimer. 6684 // * Redistributions in binary form must reproduce the above 6685 // copyright notice, this list of conditions and the following disclaimer 6686 // in the documentation and/or other materials provided with the 6687 // distribution. 6688 // * Neither the name of Google Inc. nor the name Chromium Embedded 6689 // Framework nor the names of its contributors may be used to endorse 6690 // or promote products derived from this software without specific prior 6691 // written permission. 6692 // 6693 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 6694 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 6695 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 6696 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 6697 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 6698 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 6699 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 6700 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 6701 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 6702 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 6703 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 6704 // 6705 // --------------------------------------------------------------------------- 6706 // 6707 // This file was generated by the CEF translator tool and should not edited 6708 // by hand. See the translator.README.txt file in the tools directory for 6709 // more information. 6710 // 6711 // $hash=ade537f836add7fe0b5fd94ceba26d678abb3e43$ 6712 // 6713 6714 extern (C): 6715 6716 /// 6717 // Structure used to implement browser process callbacks. The functions of this 6718 // structure will be called on the browser process main thread unless otherwise 6719 // indicated. 6720 /// 6721 struct cef_browser_process_handler_t 6722 { 6723 /// 6724 // Base structure. 6725 /// 6726 cef_base_ref_counted_t base; 6727 6728 /// 6729 // Called on the browser process UI thread immediately after the CEF context 6730 // has been initialized. 6731 /// 6732 extern(System) void function ( 6733 cef_browser_process_handler_t* self) nothrow on_context_initialized; 6734 6735 /// 6736 // Called before a child process is launched. Will be called on the browser 6737 // process UI thread when launching a render process and on the browser 6738 // process IO thread when launching a GPU or plugin process. Provides an 6739 // opportunity to modify the child process command line. Do not keep a 6740 // reference to |command_line| outside of this function. 6741 /// 6742 extern(System) void function ( 6743 cef_browser_process_handler_t* self, 6744 cef_command_line_t* command_line) nothrow on_before_child_process_launch; 6745 6746 /// 6747 // Called from any thread when work has been scheduled for the browser process 6748 // main (UI) thread. This callback is used in combination with CefSettings. 6749 // external_message_pump and cef_do_message_loop_work() in cases where the CEF 6750 // message loop must be integrated into an existing application message loop 6751 // (see additional comments and warnings on CefDoMessageLoopWork). This 6752 // callback should schedule a cef_do_message_loop_work() call to happen on the 6753 // main (UI) thread. |delay_ms| is the requested delay in milliseconds. If 6754 // |delay_ms| is <= 0 then the call should happen reasonably soon. If 6755 // |delay_ms| is > 0 then the call should be scheduled to happen after the 6756 // specified delay and any currently pending scheduled call should be 6757 // cancelled. 6758 /// 6759 extern(System) void function ( 6760 cef_browser_process_handler_t* self, 6761 int64 delay_ms) nothrow on_schedule_message_pump_work; 6762 6763 /// 6764 // Return the default client for use with a newly created browser window. If 6765 // null is returned the browser will be unmanaged (no callbacks will be 6766 // executed for that browser) and application shutdown will be blocked until 6767 // the browser window is closed manually. This function is currently only used 6768 // with the chrome runtime. 6769 /// 6770 extern(System) cef_client_t* function ( 6771 cef_browser_process_handler_t* self) nothrow get_default_client; 6772 } 6773 6774 6775 6776 // CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_ 6777 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 6778 // 6779 // Redistribution and use in source and binary forms, with or without 6780 // modification, are permitted provided that the following conditions are 6781 // met: 6782 // 6783 // * Redistributions of source code must retain the above copyright 6784 // notice, this list of conditions and the following disclaimer. 6785 // * Redistributions in binary form must reproduce the above 6786 // copyright notice, this list of conditions and the following disclaimer 6787 // in the documentation and/or other materials provided with the 6788 // distribution. 6789 // * Neither the name of Google Inc. nor the name Chromium Embedded 6790 // Framework nor the names of its contributors may be used to endorse 6791 // or promote products derived from this software without specific prior 6792 // written permission. 6793 // 6794 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 6795 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 6796 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 6797 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 6798 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 6799 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 6800 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 6801 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 6802 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 6803 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 6804 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 6805 // 6806 // --------------------------------------------------------------------------- 6807 // 6808 // This file was generated by the CEF translator tool and should not edited 6809 // by hand. See the translator.README.txt file in the tools directory for 6810 // more information. 6811 // 6812 // $hash=cd8c183355a6808abd763ecc0396b5da6c15b3f9$ 6813 // 6814 6815 extern (C): 6816 6817 /// 6818 // Generic callback structure used for asynchronous continuation. 6819 /// 6820 struct cef_callback_t 6821 { 6822 /// 6823 // Base structure. 6824 /// 6825 cef_base_ref_counted_t base; 6826 6827 /// 6828 // Continue processing. 6829 /// 6830 extern(System) void function (cef_callback_t* self) nothrow cont; 6831 6832 /// 6833 // Cancel processing. 6834 /// 6835 extern(System) void function (cef_callback_t* self) nothrow cancel; 6836 } 6837 6838 6839 6840 /// 6841 // Generic callback structure used for asynchronous completion. 6842 /// 6843 struct cef_completion_callback_t 6844 { 6845 /// 6846 // Base structure. 6847 /// 6848 cef_base_ref_counted_t base; 6849 6850 /// 6851 // Method that will be called once the task is complete. 6852 /// 6853 extern(System) void function (cef_completion_callback_t* self) nothrow on_complete; 6854 } 6855 6856 6857 6858 // CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ 6859 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 6860 // 6861 // Redistribution and use in source and binary forms, with or without 6862 // modification, are permitted provided that the following conditions are 6863 // met: 6864 // 6865 // * Redistributions of source code must retain the above copyright 6866 // notice, this list of conditions and the following disclaimer. 6867 // * Redistributions in binary form must reproduce the above 6868 // copyright notice, this list of conditions and the following disclaimer 6869 // in the documentation and/or other materials provided with the 6870 // distribution. 6871 // * Neither the name of Google Inc. nor the name Chromium Embedded 6872 // Framework nor the names of its contributors may be used to endorse 6873 // or promote products derived from this software without specific prior 6874 // written permission. 6875 // 6876 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 6877 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 6878 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 6879 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 6880 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 6881 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 6882 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 6883 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 6884 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 6885 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 6886 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 6887 // 6888 // --------------------------------------------------------------------------- 6889 // 6890 // This file was generated by the CEF translator tool and should not edited 6891 // by hand. See the translator.README.txt file in the tools directory for 6892 // more information. 6893 // 6894 // $hash=845a1d1dda63a06f4ae33ed39acfd2599b46a885$ 6895 // 6896 6897 extern (C): 6898 6899 /// 6900 // Implement this structure to provide handler implementations. 6901 /// 6902 struct cef_client_t 6903 { 6904 /// 6905 // Base structure. 6906 /// 6907 cef_base_ref_counted_t base; 6908 6909 /// 6910 // Return the handler for audio rendering events. 6911 /// 6912 extern(System) cef_audio_handler_t* function (cef_client_t* self) nothrow get_audio_handler; 6913 6914 /// 6915 // Return the handler for context menus. If no handler is provided the default 6916 // implementation will be used. 6917 /// 6918 extern(System) cef_context_menu_handler_t* function ( 6919 cef_client_t* self) nothrow get_context_menu_handler; 6920 6921 /// 6922 // Return the handler for dialogs. If no handler is provided the default 6923 // implementation will be used. 6924 /// 6925 extern(System) cef_dialog_handler_t* function (cef_client_t* self) nothrow get_dialog_handler; 6926 6927 /// 6928 // Return the handler for browser display state events. 6929 /// 6930 extern(System) cef_display_handler_t* function (cef_client_t* self) nothrow get_display_handler; 6931 6932 /// 6933 // Return the handler for download events. If no handler is returned downloads 6934 // will not be allowed. 6935 /// 6936 extern(System) cef_download_handler_t* function ( 6937 cef_client_t* self) nothrow get_download_handler; 6938 6939 /// 6940 // Return the handler for drag events. 6941 /// 6942 extern(System) cef_drag_handler_t* function (cef_client_t* self) nothrow get_drag_handler; 6943 6944 /// 6945 // Return the handler for find result events. 6946 /// 6947 extern(System) cef_find_handler_t* function (cef_client_t* self) nothrow get_find_handler; 6948 6949 /// 6950 // Return the handler for focus events. 6951 /// 6952 extern(System) cef_focus_handler_t* function (cef_client_t* self) nothrow get_focus_handler; 6953 6954 /// 6955 // Return the handler for events related to cef_frame_t lifespan. This 6956 // function will be called once during cef_browser_t creation and the result 6957 // will be cached for performance reasons. 6958 /// 6959 extern(System) cef_frame_handler_t* function (cef_client_t* self) nothrow get_frame_handler; 6960 6961 /// 6962 // Return the handler for JavaScript dialogs. If no handler is provided the 6963 // default implementation will be used. 6964 /// 6965 extern(System) cef_jsdialog_handler_t* function ( 6966 cef_client_t* self) nothrow get_jsdialog_handler; 6967 6968 /// 6969 // Return the handler for keyboard events. 6970 /// 6971 extern(System) cef_keyboard_handler_t* function ( 6972 cef_client_t* self) nothrow get_keyboard_handler; 6973 6974 /// 6975 // Return the handler for browser life span events. 6976 /// 6977 extern(System) cef_life_span_handler_t* function ( 6978 cef_client_t* self) nothrow get_life_span_handler; 6979 6980 /// 6981 // Return the handler for browser load status events. 6982 /// 6983 extern(System) cef_load_handler_t* function (cef_client_t* self) nothrow get_load_handler; 6984 6985 /// 6986 // Return the handler for printing on Linux. If a print handler is not 6987 // provided then printing will not be supported on the Linux platform. 6988 /// 6989 extern(System) cef_print_handler_t* function (cef_client_t* self) nothrow get_print_handler; 6990 6991 /// 6992 // Return the handler for off-screen rendering events. 6993 /// 6994 extern(System) cef_render_handler_t* function (cef_client_t* self) nothrow get_render_handler; 6995 6996 /// 6997 // Return the handler for browser request events. 6998 /// 6999 extern(System) cef_request_handler_t* function (cef_client_t* self) nothrow get_request_handler; 7000 7001 /// 7002 // Called when a new message is received from a different process. Return true 7003 // (1) if the message was handled or false (0) otherwise. It is safe to keep 7004 // a reference to |message| outside of this callback. 7005 /// 7006 extern(System) int function ( 7007 cef_client_t* self, 7008 cef_browser_t* browser, 7009 cef_frame_t* frame, 7010 cef_process_id_t source_process, 7011 cef_process_message_t* message) nothrow on_process_message_received; 7012 } 7013 7014 7015 7016 // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ 7017 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 7018 // 7019 // Redistribution and use in source and binary forms, with or without 7020 // modification, are permitted provided that the following conditions are 7021 // met: 7022 // 7023 // * Redistributions of source code must retain the above copyright 7024 // notice, this list of conditions and the following disclaimer. 7025 // * Redistributions in binary form must reproduce the above 7026 // copyright notice, this list of conditions and the following disclaimer 7027 // in the documentation and/or other materials provided with the 7028 // distribution. 7029 // * Neither the name of Google Inc. nor the name Chromium Embedded 7030 // Framework nor the names of its contributors may be used to endorse 7031 // or promote products derived from this software without specific prior 7032 // written permission. 7033 // 7034 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7035 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7036 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7037 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7038 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7039 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7040 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7041 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7042 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7043 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7044 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7045 // 7046 // --------------------------------------------------------------------------- 7047 // 7048 // This file was generated by the CEF translator tool and should not edited 7049 // by hand. See the translator.README.txt file in the tools directory for 7050 // more information. 7051 // 7052 // $hash=3ecebd6b30bb8fb837e062eacd021c1a1ff3620a$ 7053 // 7054 7055 extern (C): 7056 7057 /// 7058 // Structure used to create and/or parse command line arguments. Arguments with 7059 // '--', '-' and, on Windows, '/' prefixes are considered switches. Switches 7060 // will always precede any arguments without switch prefixes. Switches can 7061 // optionally have a value specified using the '=' delimiter (e.g. 7062 // "-switch=value"). An argument of "--" will terminate switch parsing with all 7063 // subsequent tokens, regardless of prefix, being interpreted as non-switch 7064 // arguments. Switch names should be lowercase ASCII and will be converted to 7065 // such if necessary. Switch values will retain the original case and UTF8 7066 // encoding. This structure can be used before cef_initialize() is called. 7067 /// 7068 struct cef_command_line_t 7069 { 7070 /// 7071 // Base structure. 7072 /// 7073 cef_base_ref_counted_t base; 7074 7075 /// 7076 // Returns true (1) if this object is valid. Do not call any other functions 7077 // if this function returns false (0). 7078 /// 7079 extern(System) int function (cef_command_line_t* self) nothrow is_valid; 7080 7081 /// 7082 // Returns true (1) if the values of this object are read-only. Some APIs may 7083 // expose read-only objects. 7084 /// 7085 extern(System) int function (cef_command_line_t* self) nothrow is_read_only; 7086 7087 /// 7088 // Returns a writable copy of this object. 7089 /// 7090 extern(System) cef_command_line_t* function (cef_command_line_t* self) nothrow copy; 7091 7092 /// 7093 // Initialize the command line with the specified |argc| and |argv| values. 7094 // The first argument must be the name of the program. This function is only 7095 // supported on non-Windows platforms. 7096 /// 7097 extern(System) void function ( 7098 cef_command_line_t* self, 7099 int argc, 7100 const(char*)* argv) nothrow init_from_argv; 7101 7102 /// 7103 // Initialize the command line with the string returned by calling 7104 // GetCommandLineW(). This function is only supported on Windows. 7105 /// 7106 extern(System) void function ( 7107 cef_command_line_t* self, 7108 const(cef_string_t)* command_line) nothrow init_from_string; 7109 7110 /// 7111 // Reset the command-line switches and arguments but leave the program 7112 // component unchanged. 7113 /// 7114 extern(System) void function (cef_command_line_t* self) nothrow reset; 7115 7116 /// 7117 // Retrieve the original command line string as a vector of strings. The argv 7118 // array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* } 7119 /// 7120 extern(System) void function (cef_command_line_t* self, cef_string_list_t argv) nothrow get_argv; 7121 7122 /// 7123 // Constructs and returns the represented command line string. Use this 7124 // function cautiously because quoting behavior is unclear. 7125 /// 7126 // The resulting string must be freed by calling cef_string_userfree_free(). 7127 extern(System) cef_string_userfree_t function ( 7128 cef_command_line_t* self) nothrow get_command_line_string; 7129 7130 /// 7131 // Get the program part of the command line string (the first item). 7132 /// 7133 // The resulting string must be freed by calling cef_string_userfree_free(). 7134 extern(System) cef_string_userfree_t function (cef_command_line_t* self) nothrow get_program; 7135 7136 /// 7137 // Set the program part of the command line string (the first item). 7138 /// 7139 extern(System) void function ( 7140 cef_command_line_t* self, 7141 const(cef_string_t)* program) nothrow set_program; 7142 7143 /// 7144 // Returns true (1) if the command line has switches. 7145 /// 7146 extern(System) int function (cef_command_line_t* self) nothrow has_switches; 7147 7148 /// 7149 // Returns true (1) if the command line contains the given switch. 7150 /// 7151 extern(System) int function ( 7152 cef_command_line_t* self, 7153 const(cef_string_t)* name) nothrow has_switch; 7154 7155 /// 7156 // Returns the value associated with the given switch. If the switch has no 7157 // value or isn't present this function returns the NULL string. 7158 /// 7159 // The resulting string must be freed by calling cef_string_userfree_free(). 7160 extern(System) cef_string_userfree_t function ( 7161 cef_command_line_t* self, 7162 const(cef_string_t)* name) nothrow get_switch_value; 7163 7164 /// 7165 // Returns the map of switch names and values. If a switch has no value an 7166 // NULL string is returned. 7167 /// 7168 extern(System) void function ( 7169 cef_command_line_t* self, 7170 cef_string_map_t switches) nothrow get_switches; 7171 7172 /// 7173 // Add a switch to the end of the command line. If the switch has no value 7174 // pass an NULL value string. 7175 /// 7176 extern(System) void function ( 7177 cef_command_line_t* self, 7178 const(cef_string_t)* name) nothrow append_switch; 7179 7180 /// 7181 // Add a switch with the specified value to the end of the command line. 7182 /// 7183 extern(System) void function ( 7184 cef_command_line_t* self, 7185 const(cef_string_t)* name, 7186 const(cef_string_t)* value) nothrow append_switch_with_value; 7187 7188 /// 7189 // True if there are remaining command line arguments. 7190 /// 7191 extern(System) int function (cef_command_line_t* self) nothrow has_arguments; 7192 7193 /// 7194 // Get the remaining command line arguments. 7195 /// 7196 extern(System) void function ( 7197 cef_command_line_t* self, 7198 cef_string_list_t arguments) nothrow get_arguments; 7199 7200 /// 7201 // Add an argument to the end of the command line. 7202 /// 7203 extern(System) void function ( 7204 cef_command_line_t* self, 7205 const(cef_string_t)* argument) nothrow append_argument; 7206 7207 /// 7208 // Insert a command before the current command. Common for debuggers, like 7209 // "valgrind" or "gdb --args". 7210 /// 7211 extern(System) void function ( 7212 cef_command_line_t* self, 7213 const(cef_string_t)* wrapper) nothrow prepend_wrapper; 7214 } 7215 7216 7217 7218 /// 7219 // Create a new cef_command_line_t instance. 7220 /// 7221 cef_command_line_t* cef_command_line_create (); 7222 7223 /// 7224 // Returns the singleton global cef_command_line_t object. The returned object 7225 // will be read-only. 7226 /// 7227 cef_command_line_t* cef_command_line_get_global (); 7228 7229 // CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_ 7230 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 7231 // 7232 // Redistribution and use in source and binary forms, with or without 7233 // modification, are permitted provided that the following conditions are 7234 // met: 7235 // 7236 // * Redistributions of source code must retain the above copyright 7237 // notice, this list of conditions and the following disclaimer. 7238 // * Redistributions in binary form must reproduce the above 7239 // copyright notice, this list of conditions and the following disclaimer 7240 // in the documentation and/or other materials provided with the 7241 // distribution. 7242 // * Neither the name of Google Inc. nor the name Chromium Embedded 7243 // Framework nor the names of its contributors may be used to endorse 7244 // or promote products derived from this software without specific prior 7245 // written permission. 7246 // 7247 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7248 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7249 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7250 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7251 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7252 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7253 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7254 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7255 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7256 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7257 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7258 // 7259 // --------------------------------------------------------------------------- 7260 // 7261 // This file was generated by the CEF translator tool and should not edited 7262 // by hand. See the translator.README.txt file in the tools directory for 7263 // more information. 7264 // 7265 // $hash=175779df75a1405fcc5c337a09e6322c556698ba$ 7266 // 7267 7268 extern (C): 7269 7270 /// 7271 // Callback structure used for continuation of custom context menu display. 7272 /// 7273 struct cef_run_context_menu_callback_t 7274 { 7275 /// 7276 // Base structure. 7277 /// 7278 cef_base_ref_counted_t base; 7279 7280 /// 7281 // Complete context menu display by selecting the specified |command_id| and 7282 // |event_flags|. 7283 /// 7284 extern(System) void function ( 7285 cef_run_context_menu_callback_t* self, 7286 int command_id, 7287 cef_event_flags_t event_flags) nothrow cont; 7288 7289 /// 7290 // Cancel context menu display. 7291 /// 7292 extern(System) void function (cef_run_context_menu_callback_t* self) nothrow cancel; 7293 } 7294 7295 7296 7297 /// 7298 // Implement this structure to handle context menu events. The functions of this 7299 // structure will be called on the UI thread. 7300 /// 7301 struct cef_context_menu_handler_t 7302 { 7303 /// 7304 // Base structure. 7305 /// 7306 cef_base_ref_counted_t base; 7307 7308 /// 7309 // Called before a context menu is displayed. |params| provides information 7310 // about the context menu state. |model| initially contains the default 7311 // context menu. The |model| can be cleared to show no context menu or 7312 // modified to show a custom menu. Do not keep references to |params| or 7313 // |model| outside of this callback. 7314 /// 7315 extern(System) void function ( 7316 cef_context_menu_handler_t* self, 7317 cef_browser_t* browser, 7318 cef_frame_t* frame, 7319 cef_context_menu_params_t* params, 7320 cef_menu_model_t* model) nothrow on_before_context_menu; 7321 7322 /// 7323 // Called to allow custom display of the context menu. |params| provides 7324 // information about the context menu state. |model| contains the context menu 7325 // model resulting from OnBeforeContextMenu. For custom display return true 7326 // (1) and execute |callback| either synchronously or asynchronously with the 7327 // selected command ID. For default display return false (0). Do not keep 7328 // references to |params| or |model| outside of this callback. 7329 /// 7330 extern(System) int function ( 7331 cef_context_menu_handler_t* self, 7332 cef_browser_t* browser, 7333 cef_frame_t* frame, 7334 cef_context_menu_params_t* params, 7335 cef_menu_model_t* model, 7336 cef_run_context_menu_callback_t* callback) nothrow run_context_menu; 7337 7338 /// 7339 // Called to execute a command selected from the context menu. Return true (1) 7340 // if the command was handled or false (0) for the default implementation. See 7341 // cef_menu_id_t for the command ids that have default implementations. All 7342 // user-defined command ids should be between MENU_ID_USER_FIRST and 7343 // MENU_ID_USER_LAST. |params| will have the same values as what was passed to 7344 // on_before_context_menu(). Do not keep a reference to |params| outside of 7345 // this callback. 7346 /// 7347 extern(System) int function ( 7348 cef_context_menu_handler_t* self, 7349 cef_browser_t* browser, 7350 cef_frame_t* frame, 7351 cef_context_menu_params_t* params, 7352 int command_id, 7353 cef_event_flags_t event_flags) nothrow on_context_menu_command; 7354 7355 /// 7356 // Called when the context menu is dismissed irregardless of whether the menu 7357 // was NULL or a command was selected. 7358 /// 7359 extern(System) void function ( 7360 cef_context_menu_handler_t* self, 7361 cef_browser_t* browser, 7362 cef_frame_t* frame) nothrow on_context_menu_dismissed; 7363 } 7364 7365 7366 7367 /// 7368 // Provides information about the context menu state. The ethods of this 7369 // structure can only be accessed on browser process the UI thread. 7370 /// 7371 struct cef_context_menu_params_t 7372 { 7373 /// 7374 // Base structure. 7375 /// 7376 cef_base_ref_counted_t base; 7377 7378 /// 7379 // Returns the X coordinate of the mouse where the context menu was invoked. 7380 // Coords are relative to the associated RenderView's origin. 7381 /// 7382 extern(System) int function (cef_context_menu_params_t* self) nothrow get_xcoord; 7383 7384 /// 7385 // Returns the Y coordinate of the mouse where the context menu was invoked. 7386 // Coords are relative to the associated RenderView's origin. 7387 /// 7388 extern(System) int function (cef_context_menu_params_t* self) nothrow get_ycoord; 7389 7390 /// 7391 // Returns flags representing the type of node that the context menu was 7392 // invoked on. 7393 /// 7394 extern(System) cef_context_menu_type_flags_t function ( 7395 cef_context_menu_params_t* self) nothrow get_type_flags; 7396 7397 /// 7398 // Returns the URL of the link, if any, that encloses the node that the 7399 // context menu was invoked on. 7400 /// 7401 // The resulting string must be freed by calling cef_string_userfree_free(). 7402 extern(System) cef_string_userfree_t function ( 7403 cef_context_menu_params_t* self) nothrow get_link_url; 7404 7405 /// 7406 // Returns the link URL, if any, to be used ONLY for "copy link address". We 7407 // don't validate this field in the frontend process. 7408 /// 7409 // The resulting string must be freed by calling cef_string_userfree_free(). 7410 extern(System) cef_string_userfree_t function ( 7411 cef_context_menu_params_t* self) nothrow get_unfiltered_link_url; 7412 7413 /// 7414 // Returns the source URL, if any, for the element that the context menu was 7415 // invoked on. Example of elements with source URLs are img, audio, and video. 7416 /// 7417 // The resulting string must be freed by calling cef_string_userfree_free(). 7418 extern(System) cef_string_userfree_t function ( 7419 cef_context_menu_params_t* self) nothrow get_source_url; 7420 7421 /// 7422 // Returns true (1) if the context menu was invoked on an image which has non- 7423 // NULL contents. 7424 /// 7425 extern(System) int function (cef_context_menu_params_t* self) nothrow has_image_contents; 7426 7427 /// 7428 // Returns the title text or the alt text if the context menu was invoked on 7429 // an image. 7430 /// 7431 // The resulting string must be freed by calling cef_string_userfree_free(). 7432 extern(System) cef_string_userfree_t function ( 7433 cef_context_menu_params_t* self) nothrow get_title_text; 7434 7435 /// 7436 // Returns the URL of the top level page that the context menu was invoked on. 7437 /// 7438 // The resulting string must be freed by calling cef_string_userfree_free(). 7439 extern(System) cef_string_userfree_t function ( 7440 cef_context_menu_params_t* self) nothrow get_page_url; 7441 7442 /// 7443 // Returns the URL of the subframe that the context menu was invoked on. 7444 /// 7445 // The resulting string must be freed by calling cef_string_userfree_free(). 7446 extern(System) cef_string_userfree_t function ( 7447 cef_context_menu_params_t* self) nothrow get_frame_url; 7448 7449 /// 7450 // Returns the character encoding of the subframe that the context menu was 7451 // invoked on. 7452 /// 7453 // The resulting string must be freed by calling cef_string_userfree_free(). 7454 extern(System) cef_string_userfree_t function ( 7455 cef_context_menu_params_t* self) nothrow get_frame_charset; 7456 7457 /// 7458 // Returns the type of context node that the context menu was invoked on. 7459 /// 7460 extern(System) cef_context_menu_media_type_t function ( 7461 cef_context_menu_params_t* self) nothrow get_media_type; 7462 7463 /// 7464 // Returns flags representing the actions supported by the media element, if 7465 // any, that the context menu was invoked on. 7466 /// 7467 extern(System) cef_context_menu_media_state_flags_t function ( 7468 cef_context_menu_params_t* self) nothrow get_media_state_flags; 7469 7470 /// 7471 // Returns the text of the selection, if any, that the context menu was 7472 // invoked on. 7473 /// 7474 // The resulting string must be freed by calling cef_string_userfree_free(). 7475 extern(System) cef_string_userfree_t function ( 7476 cef_context_menu_params_t* self) nothrow get_selection_text; 7477 7478 /// 7479 // Returns the text of the misspelled word, if any, that the context menu was 7480 // invoked on. 7481 /// 7482 // The resulting string must be freed by calling cef_string_userfree_free(). 7483 extern(System) cef_string_userfree_t function ( 7484 cef_context_menu_params_t* self) nothrow get_misspelled_word; 7485 7486 /// 7487 // Returns true (1) if suggestions exist, false (0) otherwise. Fills in 7488 // |suggestions| from the spell check service for the misspelled word if there 7489 // is one. 7490 /// 7491 extern(System) int function ( 7492 cef_context_menu_params_t* self, 7493 cef_string_list_t suggestions) nothrow get_dictionary_suggestions; 7494 7495 /// 7496 // Returns true (1) if the context menu was invoked on an editable node. 7497 /// 7498 extern(System) int function (cef_context_menu_params_t* self) nothrow is_editable; 7499 7500 /// 7501 // Returns true (1) if the context menu was invoked on an editable node where 7502 // spell-check is enabled. 7503 /// 7504 extern(System) int function (cef_context_menu_params_t* self) nothrow is_spell_check_enabled; 7505 7506 /// 7507 // Returns flags representing the actions supported by the editable node, if 7508 // any, that the context menu was invoked on. 7509 /// 7510 extern(System) cef_context_menu_edit_state_flags_t function ( 7511 cef_context_menu_params_t* self) nothrow get_edit_state_flags; 7512 7513 /// 7514 // Returns true (1) if the context menu contains items specified by the 7515 // renderer process (for example, plugin placeholder or pepper plugin menu 7516 // items). 7517 /// 7518 extern(System) int function (cef_context_menu_params_t* self) nothrow is_custom_menu; 7519 } 7520 7521 7522 7523 // CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_ 7524 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 7525 // 7526 // Redistribution and use in source and binary forms, with or without 7527 // modification, are permitted provided that the following conditions are 7528 // met: 7529 // 7530 // * Redistributions of source code must retain the above copyright 7531 // notice, this list of conditions and the following disclaimer. 7532 // * Redistributions in binary form must reproduce the above 7533 // copyright notice, this list of conditions and the following disclaimer 7534 // in the documentation and/or other materials provided with the 7535 // distribution. 7536 // * Neither the name of Google Inc. nor the name Chromium Embedded 7537 // Framework nor the names of its contributors may be used to endorse 7538 // or promote products derived from this software without specific prior 7539 // written permission. 7540 // 7541 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7542 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7543 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7544 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7545 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7546 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7547 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7548 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7549 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7550 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7551 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7552 // 7553 // --------------------------------------------------------------------------- 7554 // 7555 // This file was generated by the CEF translator tool and should not edited 7556 // by hand. See the translator.README.txt file in the tools directory for 7557 // more information. 7558 // 7559 // $hash=b19ef1c8a781f8d59276357609fe64370bb8a107$ 7560 // 7561 7562 extern (C): 7563 7564 /// 7565 // Structure used for managing cookies. The functions of this structure may be 7566 // called on any thread unless otherwise indicated. 7567 /// 7568 struct cef_cookie_manager_t 7569 { 7570 /// 7571 // Base structure. 7572 /// 7573 cef_base_ref_counted_t base; 7574 7575 /// 7576 // Visit all cookies on the UI thread. The returned cookies are ordered by 7577 // longest path, then by earliest creation date. Returns false (0) if cookies 7578 // cannot be accessed. 7579 /// 7580 extern(System) int function ( 7581 cef_cookie_manager_t* self, 7582 cef_cookie_visitor_t* visitor) nothrow visit_all_cookies; 7583 7584 /// 7585 // Visit a subset of cookies on the UI thread. The results are filtered by the 7586 // given url scheme, host, domain and path. If |includeHttpOnly| is true (1) 7587 // HTTP-only cookies will also be included in the results. The returned 7588 // cookies are ordered by longest path, then by earliest creation date. 7589 // Returns false (0) if cookies cannot be accessed. 7590 /// 7591 extern(System) int function ( 7592 cef_cookie_manager_t* self, 7593 const(cef_string_t)* url, 7594 int includeHttpOnly, 7595 cef_cookie_visitor_t* visitor) nothrow visit_url_cookies; 7596 7597 /// 7598 // Sets a cookie given a valid URL and explicit user-provided cookie 7599 // attributes. This function expects each attribute to be well-formed. It will 7600 // check for disallowed characters (e.g. the ';' character is disallowed 7601 // within the cookie value attribute) and fail without setting the cookie if 7602 // such characters are found. If |callback| is non-NULL it will be executed 7603 // asnychronously on the UI thread after the cookie has been set. Returns 7604 // false (0) if an invalid URL is specified or if cookies cannot be accessed. 7605 /// 7606 extern(System) int function ( 7607 cef_cookie_manager_t* self, 7608 const(cef_string_t)* url, 7609 const(cef_cookie_t)* cookie, 7610 cef_set_cookie_callback_t* callback) nothrow set_cookie; 7611 7612 /// 7613 // Delete all cookies that match the specified parameters. If both |url| and 7614 // |cookie_name| values are specified all host and domain cookies matching 7615 // both will be deleted. If only |url| is specified all host cookies (but not 7616 // domain cookies) irrespective of path will be deleted. If |url| is NULL all 7617 // cookies for all hosts and domains will be deleted. If |callback| is non- 7618 // NULL it will be executed asnychronously on the UI thread after the cookies 7619 // have been deleted. Returns false (0) if a non-NULL invalid URL is specified 7620 // or if cookies cannot be accessed. Cookies can alternately be deleted using 7621 // the Visit*Cookies() functions. 7622 /// 7623 extern(System) int function ( 7624 cef_cookie_manager_t* self, 7625 const(cef_string_t)* url, 7626 const(cef_string_t)* cookie_name, 7627 cef_delete_cookies_callback_t* callback) nothrow delete_cookies; 7628 7629 /// 7630 // Flush the backing store (if any) to disk. If |callback| is non-NULL it will 7631 // be executed asnychronously on the UI thread after the flush is complete. 7632 // Returns false (0) if cookies cannot be accessed. 7633 /// 7634 extern(System) int function ( 7635 cef_cookie_manager_t* self, 7636 cef_completion_callback_t* callback) nothrow flush_store; 7637 } 7638 7639 7640 7641 /// 7642 // Returns the global cookie manager. By default data will be stored at 7643 // CefSettings.cache_path if specified or in memory otherwise. If |callback| is 7644 // non-NULL it will be executed asnychronously on the UI thread after the 7645 // manager's storage has been initialized. Using this function is equivalent to 7646 // calling cef_request_context_t::cef_request_context_get_global_context()->GetD 7647 // efaultCookieManager(). 7648 /// 7649 cef_cookie_manager_t* cef_cookie_manager_get_global_manager ( 7650 cef_completion_callback_t* callback); 7651 7652 /// 7653 // Structure to implement for visiting cookie values. The functions of this 7654 // structure will always be called on the UI thread. 7655 /// 7656 struct cef_cookie_visitor_t 7657 { 7658 /// 7659 // Base structure. 7660 /// 7661 cef_base_ref_counted_t base; 7662 7663 /// 7664 // Method that will be called once for each cookie. |count| is the 0-based 7665 // index for the current cookie. |total| is the total number of cookies. Set 7666 // |deleteCookie| to true (1) to delete the cookie currently being visited. 7667 // Return false (0) to stop visiting cookies. This function may never be 7668 // called if no cookies are found. 7669 /// 7670 extern(System) int function ( 7671 cef_cookie_visitor_t* self, 7672 const(cef_cookie_t)* cookie, 7673 int count, 7674 int total, 7675 int* deleteCookie) nothrow visit; 7676 } 7677 7678 7679 7680 /// 7681 // Structure to implement to be notified of asynchronous completion via 7682 // cef_cookie_manager_t::set_cookie(). 7683 /// 7684 struct cef_set_cookie_callback_t 7685 { 7686 /// 7687 // Base structure. 7688 /// 7689 cef_base_ref_counted_t base; 7690 7691 /// 7692 // Method that will be called upon completion. |success| will be true (1) if 7693 // the cookie was set successfully. 7694 /// 7695 extern(System) void function (cef_set_cookie_callback_t* self, int success) nothrow on_complete; 7696 } 7697 7698 7699 7700 /// 7701 // Structure to implement to be notified of asynchronous completion via 7702 // cef_cookie_manager_t::delete_cookies(). 7703 /// 7704 struct cef_delete_cookies_callback_t 7705 { 7706 /// 7707 // Base structure. 7708 /// 7709 cef_base_ref_counted_t base; 7710 7711 /// 7712 // Method that will be called upon completion. |num_deleted| will be the 7713 // number of cookies that were deleted. 7714 /// 7715 extern(System) void function ( 7716 cef_delete_cookies_callback_t* self, 7717 int num_deleted) nothrow on_complete; 7718 } 7719 7720 7721 7722 // CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_ 7723 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 7724 // 7725 // Redistribution and use in source and binary forms, with or without 7726 // modification, are permitted provided that the following conditions are 7727 // met: 7728 // 7729 // * Redistributions of source code must retain the above copyright 7730 // notice, this list of conditions and the following disclaimer. 7731 // * Redistributions in binary form must reproduce the above 7732 // copyright notice, this list of conditions and the following disclaimer 7733 // in the documentation and/or other materials provided with the 7734 // distribution. 7735 // * Neither the name of Google Inc. nor the name Chromium Embedded 7736 // Framework nor the names of its contributors may be used to endorse 7737 // or promote products derived from this software without specific prior 7738 // written permission. 7739 // 7740 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7741 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7742 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7743 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7744 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7745 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7746 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7747 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7748 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7749 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7750 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7751 // 7752 // --------------------------------------------------------------------------- 7753 // 7754 // This file was generated by the CEF translator tool and should not edited 7755 // by hand. See the translator.README.txt file in the tools directory for 7756 // more information. 7757 // 7758 // $hash=5e19231e3476eef376c2742e8d375bee7bd4ea2d$ 7759 // 7760 7761 extern (C): 7762 7763 /// 7764 // Crash reporting is configured using an INI-style config file named 7765 // "crash_reporter.cfg". On Windows and Linux this file must be placed next to 7766 // the main application executable. On macOS this file must be placed in the 7767 // top-level app bundle Resources directory (e.g. 7768 // "<appname>.app/Contents/Resources"). File contents are as follows: 7769 // 7770 // # Comments start with a hash character and must be on their own line. 7771 // 7772 // [Config] 7773 // ProductName=<Value of the "prod" crash key; defaults to "cef"> 7774 // ProductVersion=<Value of the "ver" crash key; defaults to the CEF version> 7775 // AppName=<Windows only; App-specific folder name component for storing crash 7776 // information; default to "CEF"> 7777 // ExternalHandler=<Windows only; Name of the external handler exe to use 7778 // instead of re-launching the main exe; default to empty> 7779 // BrowserCrashForwardingEnabled=<macOS only; True if browser process crashes 7780 // should be forwarded to the system crash 7781 // reporter; default to false> 7782 // ServerURL=<crash server URL; default to empty> 7783 // RateLimitEnabled=<True if uploads should be rate limited; default to true> 7784 // MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled; 7785 // default to 5> 7786 // MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value 7787 // will cause older reports to be deleted; default to 20> 7788 // MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted; 7789 // default to 5> 7790 // 7791 // [CrashKeys] 7792 // my_key1=<small|medium|large> 7793 // my_key2=<small|medium|large> 7794 // 7795 // Config section: 7796 // 7797 // If "ProductName" and/or "ProductVersion" are set then the specified values 7798 // will be included in the crash dump metadata. On macOS if these values are set 7799 // to NULL then they will be retrieved from the Info.plist file using the 7800 // "CFBundleName" and "CFBundleShortVersionString" keys respectively. 7801 // 7802 // If "AppName" is set on Windows then crash report information (metrics, 7803 // database and dumps) will be stored locally on disk under the 7804 // "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other 7805 // platforms the CefSettings.user_data_path value will be used. 7806 // 7807 // If "ExternalHandler" is set on Windows then the specified exe will be 7808 // launched as the crashpad-handler instead of re-launching the main process 7809 // exe. The value can be an absolute path or a path relative to the main exe 7810 // directory. On Linux the CefSettings.browser_subprocess_path value will be 7811 // used. On macOS the existing subprocess app bundle will be used. 7812 // 7813 // If "BrowserCrashForwardingEnabled" is set to true (1) on macOS then browser 7814 // process crashes will be forwarded to the system crash reporter. This results 7815 // in the crash UI dialog being displayed to the user and crash reports being 7816 // logged under "~/Library/Logs/DiagnosticReports". Forwarding of crash reports 7817 // from non-browser processes and Debug builds is always disabled. 7818 // 7819 // If "ServerURL" is set then crashes will be uploaded as a multi-part POST 7820 // request to the specified URL. Otherwise, reports will only be stored locally 7821 // on disk. 7822 // 7823 // If "RateLimitEnabled" is set to true (1) then crash report uploads will be 7824 // rate limited as follows: 7825 // 1. If "MaxUploadsPerDay" is set to a positive value then at most the 7826 // specified number of crashes will be uploaded in each 24 hour period. 7827 // 2. If crash upload fails due to a network or server error then an 7828 // incremental backoff delay up to a maximum of 24 hours will be applied for 7829 // retries. 7830 // 3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the 7831 // "MaxUploadsPerDay" value will be reduced to 1 until the client is 7832 // restarted. This helps to avoid an upload flood when the network or 7833 // server error is resolved. 7834 // Rate limiting is not supported on Linux. 7835 // 7836 // If "MaxDatabaseSizeInMb" is set to a positive value then crash report storage 7837 // on disk will be limited to that size in megabytes. For example, on Windows 7838 // each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20 equates to 7839 // about 34 crash reports stored on disk. Not supported on Linux. 7840 // 7841 // If "MaxDatabaseAgeInDays" is set to a positive value then crash reports older 7842 // than the specified age in days will be deleted. Not supported on Linux. 7843 // 7844 // CrashKeys section: 7845 // 7846 // A maximum of 26 crash keys of each size can be specified for use by the 7847 // application. Crash key values will be truncated based on the specified size 7848 // (small = 64 bytes, medium = 256 bytes, large = 1024 bytes). The value of 7849 // crash keys can be set from any thread or process using the 7850 // CefSetCrashKeyValue function. These key/value pairs will be sent to the crash 7851 // server along with the crash dump file. 7852 /// 7853 int cef_crash_reporting_enabled (); 7854 7855 /// 7856 // Sets or clears a specific key-value pair from the crash metadata. 7857 /// 7858 void cef_set_crash_key_value ( 7859 const(cef_string_t)* key, 7860 const(cef_string_t)* value); 7861 7862 // CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_ 7863 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 7864 // 7865 // Redistribution and use in source and binary forms, with or without 7866 // modification, are permitted provided that the following conditions are 7867 // met: 7868 // 7869 // * Redistributions of source code must retain the above copyright 7870 // notice, this list of conditions and the following disclaimer. 7871 // * Redistributions in binary form must reproduce the above 7872 // copyright notice, this list of conditions and the following disclaimer 7873 // in the documentation and/or other materials provided with the 7874 // distribution. 7875 // * Neither the name of Google Inc. nor the name Chromium Embedded 7876 // Framework nor the names of its contributors may be used to endorse 7877 // or promote products derived from this software without specific prior 7878 // written permission. 7879 // 7880 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7881 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7882 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7883 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7884 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7885 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7886 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7887 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7888 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7889 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7890 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7891 // 7892 // --------------------------------------------------------------------------- 7893 // 7894 // This file was generated by the CEF translator tool and should not edited 7895 // by hand. See the translator.README.txt file in the tools directory for 7896 // more information. 7897 // 7898 // $hash=1a256c04042ebd4867f39e1c31def558871b2bab$ 7899 // 7900 7901 extern (C): 7902 7903 7904 7905 /// 7906 // Callback structure for cef_browser_host_t::AddDevToolsMessageObserver. The 7907 // functions of this structure will be called on the browser process UI thread. 7908 /// 7909 struct cef_dev_tools_message_observer_t 7910 { 7911 /// 7912 // Base structure. 7913 /// 7914 cef_base_ref_counted_t base; 7915 7916 /// 7917 // Method that will be called on receipt of a DevTools protocol message. 7918 // |browser| is the originating browser instance. |message| is a UTF8-encoded 7919 // JSON dictionary representing either a function result or an event. 7920 // |message| is only valid for the scope of this callback and should be copied 7921 // if necessary. Return true (1) if the message was handled or false (0) if 7922 // the message should be further processed and passed to the 7923 // OnDevToolsMethodResult or OnDevToolsEvent functions as appropriate. 7924 // 7925 // Method result dictionaries include an "id" (int) value that identifies the 7926 // orginating function call sent from cef_browser_host_t::SendDevToolsMessage, 7927 // and optionally either a "result" (dictionary) or "error" (dictionary) 7928 // value. The "error" dictionary will contain "code" (int) and "message" 7929 // (string) values. Event dictionaries include a "function" (string) value and 7930 // optionally a "params" (dictionary) value. See the DevTools protocol 7931 // documentation at https://chromedevtools.github.io/devtools-protocol/ for 7932 // details of supported function calls and the expected "result" or "params" 7933 // dictionary contents. JSON dictionaries can be parsed using the CefParseJSON 7934 // function if desired, however be aware of performance considerations when 7935 // parsing large messages (some of which may exceed 1MB in size). 7936 /// 7937 extern(System) int function ( 7938 cef_dev_tools_message_observer_t* self, 7939 cef_browser_t* browser, 7940 const(void)* message, 7941 size_t message_size) nothrow on_dev_tools_message; 7942 7943 /// 7944 // Method that will be called after attempted execution of a DevTools protocol 7945 // function. |browser| is the originating browser instance. |message_id| is 7946 // the "id" value that identifies the originating function call message. If 7947 // the function succeeded |success| will be true (1) and |result| will be the 7948 // UTF8-encoded JSON "result" dictionary value (which may be NULL). If the 7949 // function failed |success| will be false (0) and |result| will be the 7950 // UTF8-encoded JSON "error" dictionary value. |result| is only valid for the 7951 // scope of this callback and should be copied if necessary. See the 7952 // OnDevToolsMessage documentation for additional details on |result| 7953 // contents. 7954 /// 7955 extern(System) void function ( 7956 cef_dev_tools_message_observer_t* self, 7957 cef_browser_t* browser, 7958 int message_id, 7959 int success, 7960 const(void)* result, 7961 size_t result_size) nothrow on_dev_tools_method_result; 7962 7963 /// 7964 // Method that will be called on receipt of a DevTools protocol event. 7965 // |browser| is the originating browser instance. |function| is the "function" 7966 // value. |params| is the UTF8-encoded JSON "params" dictionary value (which 7967 // may be NULL). |params| is only valid for the scope of this callback and 7968 // should be copied if necessary. See the OnDevToolsMessage documentation for 7969 // additional details on |params| contents. 7970 /// 7971 extern(System) void function ( 7972 cef_dev_tools_message_observer_t* self, 7973 cef_browser_t* browser, 7974 const(cef_string_t)* method, 7975 const(void)* params, 7976 size_t params_size) nothrow on_dev_tools_event; 7977 7978 /// 7979 // Method that will be called when the DevTools agent has attached. |browser| 7980 // is the originating browser instance. This will generally occur in response 7981 // to the first message sent while the agent is detached. 7982 /// 7983 extern(System) void function ( 7984 cef_dev_tools_message_observer_t* self, 7985 cef_browser_t* browser) nothrow on_dev_tools_agent_attached; 7986 7987 /// 7988 // Method that will be called when the DevTools agent has detached. |browser| 7989 // is the originating browser instance. Any function results that were pending 7990 // before the agent became detached will not be delivered, and any active 7991 // event subscriptions will be canceled. 7992 /// 7993 extern(System) void function ( 7994 cef_dev_tools_message_observer_t* self, 7995 cef_browser_t* browser) nothrow on_dev_tools_agent_detached; 7996 } 7997 7998 7999 8000 // CEF_INCLUDE_CAPI_CEF_DEVTOOLS_MESSAGE_OBSERVER_CAPI_H_ 8001 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 8002 // 8003 // Redistribution and use in source and binary forms, with or without 8004 // modification, are permitted provided that the following conditions are 8005 // met: 8006 // 8007 // * Redistributions of source code must retain the above copyright 8008 // notice, this list of conditions and the following disclaimer. 8009 // * Redistributions in binary form must reproduce the above 8010 // copyright notice, this list of conditions and the following disclaimer 8011 // in the documentation and/or other materials provided with the 8012 // distribution. 8013 // * Neither the name of Google Inc. nor the name Chromium Embedded 8014 // Framework nor the names of its contributors may be used to endorse 8015 // or promote products derived from this software without specific prior 8016 // written permission. 8017 // 8018 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8019 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8020 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8021 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8022 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8023 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8024 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8025 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8026 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8027 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8028 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8029 // 8030 // --------------------------------------------------------------------------- 8031 // 8032 // This file was generated by the CEF translator tool and should not edited 8033 // by hand. See the translator.README.txt file in the tools directory for 8034 // more information. 8035 // 8036 // $hash=5ae5556e4085faf8cf17ee757f5eeac9197f75c0$ 8037 // 8038 8039 extern (C): 8040 8041 /// 8042 // Callback structure for asynchronous continuation of file dialog requests. 8043 /// 8044 struct cef_file_dialog_callback_t 8045 { 8046 /// 8047 // Base structure. 8048 /// 8049 cef_base_ref_counted_t base; 8050 8051 /// 8052 // Continue the file selection. |selected_accept_filter| should be the 0-based 8053 // index of the value selected from the accept filters array passed to 8054 // cef_dialog_handler_t::OnFileDialog. |file_paths| should be a single value 8055 // or a list of values depending on the dialog mode. An NULL |file_paths| 8056 // value is treated the same as calling cancel(). 8057 /// 8058 extern(System) void function ( 8059 cef_file_dialog_callback_t* self, 8060 int selected_accept_filter, 8061 cef_string_list_t file_paths) nothrow cont; 8062 8063 /// 8064 // Cancel the file selection. 8065 /// 8066 extern(System) void function (cef_file_dialog_callback_t* self) nothrow cancel; 8067 } 8068 8069 8070 8071 /// 8072 // Implement this structure to handle dialog events. The functions of this 8073 // structure will be called on the browser process UI thread. 8074 /// 8075 struct cef_dialog_handler_t 8076 { 8077 /// 8078 // Base structure. 8079 /// 8080 cef_base_ref_counted_t base; 8081 8082 /// 8083 // Called to run a file chooser dialog. |mode| represents the type of dialog 8084 // to display. |title| to the title to be used for the dialog and may be NULL 8085 // to show the default title ("Open" or "Save" depending on the mode). 8086 // |default_file_path| is the path with optional directory and/or file name 8087 // component that should be initially selected in the dialog. |accept_filters| 8088 // are used to restrict the selectable file types and may any combination of 8089 // (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b) 8090 // individual file extensions (e.g. ".txt" or ".png"), or (c) combined 8091 // description and file extension delimited using "|" and ";" (e.g. "Image 8092 // Types|.png;.gif;.jpg"). |selected_accept_filter| is the 0-based index of 8093 // the filter that should be selected by default. To display a custom dialog 8094 // return true (1) and execute |callback| either inline or at a later time. To 8095 // display the default dialog return false (0). 8096 /// 8097 extern(System) int function ( 8098 cef_dialog_handler_t* self, 8099 cef_browser_t* browser, 8100 cef_file_dialog_mode_t mode, 8101 const(cef_string_t)* title, 8102 const(cef_string_t)* default_file_path, 8103 cef_string_list_t accept_filters, 8104 int selected_accept_filter, 8105 cef_file_dialog_callback_t* callback) nothrow on_file_dialog; 8106 } 8107 8108 8109 8110 // CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_ 8111 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 8112 // 8113 // Redistribution and use in source and binary forms, with or without 8114 // modification, are permitted provided that the following conditions are 8115 // met: 8116 // 8117 // * Redistributions of source code must retain the above copyright 8118 // notice, this list of conditions and the following disclaimer. 8119 // * Redistributions in binary form must reproduce the above 8120 // copyright notice, this list of conditions and the following disclaimer 8121 // in the documentation and/or other materials provided with the 8122 // distribution. 8123 // * Neither the name of Google Inc. nor the name Chromium Embedded 8124 // Framework nor the names of its contributors may be used to endorse 8125 // or promote products derived from this software without specific prior 8126 // written permission. 8127 // 8128 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8129 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8130 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8131 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8132 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8133 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8134 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8135 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8136 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8137 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8138 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8139 // 8140 // --------------------------------------------------------------------------- 8141 // 8142 // This file was generated by the CEF translator tool and should not edited 8143 // by hand. See the translator.README.txt file in the tools directory for 8144 // more information. 8145 // 8146 // $hash=067fd169a30bec1ad8eeacc5ab1ac750cf59640e$ 8147 // 8148 8149 import core.stdc.config; 8150 8151 extern (C): 8152 8153 /// 8154 // Implement this structure to handle events related to browser display state. 8155 // The functions of this structure will be called on the UI thread. 8156 /// 8157 struct cef_display_handler_t 8158 { 8159 /// 8160 // Base structure. 8161 /// 8162 cef_base_ref_counted_t base; 8163 8164 /// 8165 // Called when a frame's address has changed. 8166 /// 8167 extern(System) void function ( 8168 cef_display_handler_t* self, 8169 cef_browser_t* browser, 8170 cef_frame_t* frame, 8171 const(cef_string_t)* url) nothrow on_address_change; 8172 8173 /// 8174 // Called when the page title changes. 8175 /// 8176 extern(System) void function ( 8177 cef_display_handler_t* self, 8178 cef_browser_t* browser, 8179 const(cef_string_t)* title) nothrow on_title_change; 8180 8181 /// 8182 // Called when the page icon changes. 8183 /// 8184 extern(System) void function ( 8185 cef_display_handler_t* self, 8186 cef_browser_t* browser, 8187 cef_string_list_t icon_urls) nothrow on_favicon_urlchange; 8188 8189 /// 8190 // Called when web content in the page has toggled fullscreen mode. If 8191 // |fullscreen| is true (1) the content will automatically be sized to fill 8192 // the browser content area. If |fullscreen| is false (0) the content will 8193 // automatically return to its original size and position. The client is 8194 // responsible for resizing the browser if desired. 8195 /// 8196 extern(System) void function ( 8197 cef_display_handler_t* self, 8198 cef_browser_t* browser, 8199 int fullscreen) nothrow on_fullscreen_mode_change; 8200 8201 /// 8202 // Called when the browser is about to display a tooltip. |text| contains the 8203 // text that will be displayed in the tooltip. To handle the display of the 8204 // tooltip yourself return true (1). Otherwise, you can optionally modify 8205 // |text| and then return false (0) to allow the browser to display the 8206 // tooltip. When window rendering is disabled the application is responsible 8207 // for drawing tooltips and the return value is ignored. 8208 /// 8209 extern(System) int function ( 8210 cef_display_handler_t* self, 8211 cef_browser_t* browser, 8212 cef_string_t* text) nothrow on_tooltip; 8213 8214 /// 8215 // Called when the browser receives a status message. |value| contains the 8216 // text that will be displayed in the status message. 8217 /// 8218 extern(System) void function ( 8219 cef_display_handler_t* self, 8220 cef_browser_t* browser, 8221 const(cef_string_t)* value) nothrow on_status_message; 8222 8223 /// 8224 // Called to display a console message. Return true (1) to stop the message 8225 // from being output to the console. 8226 /// 8227 extern(System) int function ( 8228 cef_display_handler_t* self, 8229 cef_browser_t* browser, 8230 cef_log_severity_t level, 8231 const(cef_string_t)* message, 8232 const(cef_string_t)* source, 8233 int line) nothrow on_console_message; 8234 8235 /// 8236 // Called when auto-resize is enabled via 8237 // cef_browser_host_t::SetAutoResizeEnabled and the contents have auto- 8238 // resized. |new_size| will be the desired size in view coordinates. Return 8239 // true (1) if the resize was handled or false (0) for default handling. 8240 /// 8241 extern(System) int function ( 8242 cef_display_handler_t* self, 8243 cef_browser_t* browser, 8244 const(cef_size_t)* new_size) nothrow on_auto_resize; 8245 8246 /// 8247 // Called when the overall page loading progress has changed. |progress| 8248 // ranges from 0.0 to 1.0. 8249 /// 8250 extern(System) void function ( 8251 cef_display_handler_t* self, 8252 cef_browser_t* browser, 8253 double progress) nothrow on_loading_progress_change; 8254 8255 /// 8256 // Called when the browser's cursor has changed. If |type| is CT_CUSTOM then 8257 // |custom_cursor_info| will be populated with the custom cursor information. 8258 // Return true (1) if the cursor change was handled or false (0) for default 8259 // handling. 8260 /// 8261 extern(System) int function ( 8262 cef_display_handler_t* self, 8263 cef_browser_t* browser, 8264 c_ulong cursor, 8265 cef_cursor_type_t type, 8266 const(cef_cursor_info_t)* custom_cursor_info) nothrow on_cursor_change; 8267 } 8268 8269 8270 8271 // CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_ 8272 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 8273 // 8274 // Redistribution and use in source and binary forms, with or without 8275 // modification, are permitted provided that the following conditions are 8276 // met: 8277 // 8278 // * Redistributions of source code must retain the above copyright 8279 // notice, this list of conditions and the following disclaimer. 8280 // * Redistributions in binary form must reproduce the above 8281 // copyright notice, this list of conditions and the following disclaimer 8282 // in the documentation and/or other materials provided with the 8283 // distribution. 8284 // * Neither the name of Google Inc. nor the name Chromium Embedded 8285 // Framework nor the names of its contributors may be used to endorse 8286 // or promote products derived from this software without specific prior 8287 // written permission. 8288 // 8289 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8290 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8291 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8292 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8293 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8294 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8295 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8296 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8297 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8298 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8299 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8300 // 8301 // --------------------------------------------------------------------------- 8302 // 8303 // This file was generated by the CEF translator tool and should not edited 8304 // by hand. See the translator.README.txt file in the tools directory for 8305 // more information. 8306 // 8307 // $hash=0517dc6c42fdde9fecfc4549fab1ea12b614e143$ 8308 // 8309 8310 extern (C): 8311 8312 /// 8313 // Structure to implement for visiting the DOM. The functions of this structure 8314 // will be called on the render process main thread. 8315 /// 8316 struct cef_domvisitor_t 8317 { 8318 /// 8319 // Base structure. 8320 /// 8321 cef_base_ref_counted_t base; 8322 8323 /// 8324 // Method executed for visiting the DOM. The document object passed to this 8325 // function represents a snapshot of the DOM at the time this function is 8326 // executed. DOM objects are only valid for the scope of this function. Do not 8327 // keep references to or attempt to access any DOM objects outside the scope 8328 // of this function. 8329 /// 8330 extern(System) void function ( 8331 cef_domvisitor_t* self, 8332 cef_domdocument_t* document) nothrow visit; 8333 } 8334 8335 8336 8337 /// 8338 // Structure used to represent a DOM document. The functions of this structure 8339 // should only be called on the render process main thread thread. 8340 /// 8341 struct cef_domdocument_t 8342 { 8343 /// 8344 // Base structure. 8345 /// 8346 cef_base_ref_counted_t base; 8347 8348 /// 8349 // Returns the document type. 8350 /// 8351 extern(System) cef_dom_document_type_t function (cef_domdocument_t* self) nothrow get_type; 8352 8353 /// 8354 // Returns the root document node. 8355 /// 8356 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_document; 8357 8358 /// 8359 // Returns the BODY node of an HTML document. 8360 /// 8361 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_body; 8362 8363 /// 8364 // Returns the HEAD node of an HTML document. 8365 /// 8366 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_head; 8367 8368 /// 8369 // Returns the title of an HTML document. 8370 /// 8371 // The resulting string must be freed by calling cef_string_userfree_free(). 8372 extern(System) cef_string_userfree_t function (cef_domdocument_t* self) nothrow get_title; 8373 8374 /// 8375 // Returns the document element with the specified ID value. 8376 /// 8377 extern(System) cef_domnode_t* function ( 8378 cef_domdocument_t* self, 8379 const(cef_string_t)* id) nothrow get_element_by_id; 8380 8381 /// 8382 // Returns the node that currently has keyboard focus. 8383 /// 8384 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_focused_node; 8385 8386 /// 8387 // Returns true (1) if a portion of the document is selected. 8388 /// 8389 extern(System) int function (cef_domdocument_t* self) nothrow has_selection; 8390 8391 /// 8392 // Returns the selection offset within the start node. 8393 /// 8394 extern(System) int function (cef_domdocument_t* self) nothrow get_selection_start_offset; 8395 8396 /// 8397 // Returns the selection offset within the end node. 8398 /// 8399 extern(System) int function (cef_domdocument_t* self) nothrow get_selection_end_offset; 8400 8401 /// 8402 // Returns the contents of this selection as markup. 8403 /// 8404 // The resulting string must be freed by calling cef_string_userfree_free(). 8405 extern(System) cef_string_userfree_t function ( 8406 cef_domdocument_t* self) nothrow get_selection_as_markup; 8407 8408 /// 8409 // Returns the contents of this selection as text. 8410 /// 8411 // The resulting string must be freed by calling cef_string_userfree_free(). 8412 extern(System) cef_string_userfree_t function ( 8413 cef_domdocument_t* self) nothrow get_selection_as_text; 8414 8415 /// 8416 // Returns the base URL for the document. 8417 /// 8418 // The resulting string must be freed by calling cef_string_userfree_free(). 8419 extern(System) cef_string_userfree_t function (cef_domdocument_t* self) nothrow get_base_url; 8420 8421 /// 8422 // Returns a complete URL based on the document base URL and the specified 8423 // partial URL. 8424 /// 8425 // The resulting string must be freed by calling cef_string_userfree_free(). 8426 extern(System) cef_string_userfree_t function ( 8427 cef_domdocument_t* self, 8428 const(cef_string_t)* partialURL) nothrow get_complete_url; 8429 } 8430 8431 8432 8433 /// 8434 // Structure used to represent a DOM node. The functions of this structure 8435 // should only be called on the render process main thread. 8436 /// 8437 struct cef_domnode_t 8438 { 8439 /// 8440 // Base structure. 8441 /// 8442 cef_base_ref_counted_t base; 8443 8444 /// 8445 // Returns the type for this node. 8446 /// 8447 extern(System) cef_dom_node_type_t function (cef_domnode_t* self) nothrow get_type; 8448 8449 /// 8450 // Returns true (1) if this is a text node. 8451 /// 8452 extern(System) int function (cef_domnode_t* self) nothrow is_text; 8453 8454 /// 8455 // Returns true (1) if this is an element node. 8456 /// 8457 extern(System) int function (cef_domnode_t* self) nothrow is_element; 8458 8459 /// 8460 // Returns true (1) if this is an editable node. 8461 /// 8462 extern(System) int function (cef_domnode_t* self) nothrow is_editable; 8463 8464 /// 8465 // Returns true (1) if this is a form control element node. 8466 /// 8467 extern(System) int function (cef_domnode_t* self) nothrow is_form_control_element; 8468 8469 /// 8470 // Returns the type of this form control element node. 8471 /// 8472 // The resulting string must be freed by calling cef_string_userfree_free(). 8473 extern(System) cef_string_userfree_t function ( 8474 cef_domnode_t* self) nothrow get_form_control_element_type; 8475 8476 /// 8477 // Returns true (1) if this object is pointing to the same handle as |that| 8478 // object. 8479 /// 8480 extern(System) int function (cef_domnode_t* self, cef_domnode_t* that) nothrow is_same; 8481 8482 /// 8483 // Returns the name of this node. 8484 /// 8485 // The resulting string must be freed by calling cef_string_userfree_free(). 8486 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_name; 8487 8488 /// 8489 // Returns the value of this node. 8490 /// 8491 // The resulting string must be freed by calling cef_string_userfree_free(). 8492 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_value; 8493 8494 /// 8495 // Set the value of this node. Returns true (1) on success. 8496 /// 8497 extern(System) int function (cef_domnode_t* self, const(cef_string_t)* value) nothrow set_value; 8498 8499 /// 8500 // Returns the contents of this node as markup. 8501 /// 8502 // The resulting string must be freed by calling cef_string_userfree_free(). 8503 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_as_markup; 8504 8505 /// 8506 // Returns the document associated with this node. 8507 /// 8508 extern(System) cef_domdocument_t* function (cef_domnode_t* self) nothrow get_document; 8509 8510 /// 8511 // Returns the parent node. 8512 /// 8513 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_parent; 8514 8515 /// 8516 // Returns the previous sibling node. 8517 /// 8518 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_previous_sibling; 8519 8520 /// 8521 // Returns the next sibling node. 8522 /// 8523 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_next_sibling; 8524 8525 /// 8526 // Returns true (1) if this node has child nodes. 8527 /// 8528 extern(System) int function (cef_domnode_t* self) nothrow has_children; 8529 8530 /// 8531 // Return the first child node. 8532 /// 8533 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_first_child; 8534 8535 /// 8536 // Returns the last child node. 8537 /// 8538 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_last_child; 8539 8540 // The following functions are valid only for element nodes. 8541 8542 /// 8543 // Returns the tag name of this element. 8544 /// 8545 // The resulting string must be freed by calling cef_string_userfree_free(). 8546 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_element_tag_name; 8547 8548 /// 8549 // Returns true (1) if this element has attributes. 8550 /// 8551 extern(System) int function (cef_domnode_t* self) nothrow has_element_attributes; 8552 8553 /// 8554 // Returns true (1) if this element has an attribute named |attrName|. 8555 /// 8556 extern(System) int function ( 8557 cef_domnode_t* self, 8558 const(cef_string_t)* attrName) nothrow has_element_attribute; 8559 8560 /// 8561 // Returns the element attribute named |attrName|. 8562 /// 8563 // The resulting string must be freed by calling cef_string_userfree_free(). 8564 extern(System) cef_string_userfree_t function ( 8565 cef_domnode_t* self, 8566 const(cef_string_t)* attrName) nothrow get_element_attribute; 8567 8568 /// 8569 // Returns a map of all element attributes. 8570 /// 8571 extern(System) void function ( 8572 cef_domnode_t* self, 8573 cef_string_map_t attrMap) nothrow get_element_attributes; 8574 8575 /// 8576 // Set the value for the element attribute named |attrName|. Returns true (1) 8577 // on success. 8578 /// 8579 extern(System) int function ( 8580 cef_domnode_t* self, 8581 const(cef_string_t)* attrName, 8582 const(cef_string_t)* value) nothrow set_element_attribute; 8583 8584 /// 8585 // Returns the inner text of the element. 8586 /// 8587 // The resulting string must be freed by calling cef_string_userfree_free(). 8588 extern(System) cef_string_userfree_t function ( 8589 cef_domnode_t* self) nothrow get_element_inner_text; 8590 8591 /// 8592 // Returns the bounds of the element. 8593 /// 8594 extern(System) cef_rect_t function (cef_domnode_t* self) nothrow get_element_bounds; 8595 } 8596 8597 8598 8599 // CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_ 8600 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 8601 // 8602 // Redistribution and use in source and binary forms, with or without 8603 // modification, are permitted provided that the following conditions are 8604 // met: 8605 // 8606 // * Redistributions of source code must retain the above copyright 8607 // notice, this list of conditions and the following disclaimer. 8608 // * Redistributions in binary form must reproduce the above 8609 // copyright notice, this list of conditions and the following disclaimer 8610 // in the documentation and/or other materials provided with the 8611 // distribution. 8612 // * Neither the name of Google Inc. nor the name Chromium Embedded 8613 // Framework nor the names of its contributors may be used to endorse 8614 // or promote products derived from this software without specific prior 8615 // written permission. 8616 // 8617 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8618 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8619 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8620 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8621 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8622 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8623 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8624 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8625 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8626 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8627 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8628 // 8629 // --------------------------------------------------------------------------- 8630 // 8631 // This file was generated by the CEF translator tool and should not edited 8632 // by hand. See the translator.README.txt file in the tools directory for 8633 // more information. 8634 // 8635 // $hash=f0ceb73b289072a01c45c6e7abf339a4ec924d29$ 8636 // 8637 8638 extern (C): 8639 8640 /// 8641 // Callback structure used to asynchronously continue a download. 8642 /// 8643 struct cef_before_download_callback_t 8644 { 8645 /// 8646 // Base structure. 8647 /// 8648 cef_base_ref_counted_t base; 8649 8650 /// 8651 // Call to continue the download. Set |download_path| to the full file path 8652 // for the download including the file name or leave blank to use the 8653 // suggested name and the default temp directory. Set |show_dialog| to true 8654 // (1) if you do wish to show the default "Save As" dialog. 8655 /// 8656 extern(System) void function ( 8657 cef_before_download_callback_t* self, 8658 const(cef_string_t)* download_path, 8659 int show_dialog) nothrow cont; 8660 } 8661 8662 8663 8664 /// 8665 // Callback structure used to asynchronously cancel a download. 8666 /// 8667 struct cef_download_item_callback_t 8668 { 8669 /// 8670 // Base structure. 8671 /// 8672 cef_base_ref_counted_t base; 8673 8674 /// 8675 // Call to cancel the download. 8676 /// 8677 extern(System) void function (cef_download_item_callback_t* self) nothrow cancel; 8678 8679 /// 8680 // Call to pause the download. 8681 /// 8682 extern(System) void function (cef_download_item_callback_t* self) nothrow pause; 8683 8684 /// 8685 // Call to resume the download. 8686 /// 8687 extern(System) void function (cef_download_item_callback_t* self) nothrow resume; 8688 } 8689 8690 8691 8692 /// 8693 // Structure used to handle file downloads. The functions of this structure will 8694 // called on the browser process UI thread. 8695 /// 8696 struct cef_download_handler_t 8697 { 8698 /// 8699 // Base structure. 8700 /// 8701 cef_base_ref_counted_t base; 8702 8703 /// 8704 // Called before a download begins. |suggested_name| is the suggested name for 8705 // the download file. By default the download will be canceled. Execute 8706 // |callback| either asynchronously or in this function to continue the 8707 // download if desired. Do not keep a reference to |download_item| outside of 8708 // this function. 8709 /// 8710 extern(System) void function ( 8711 cef_download_handler_t* self, 8712 cef_browser_t* browser, 8713 cef_download_item_t* download_item, 8714 const(cef_string_t)* suggested_name, 8715 cef_before_download_callback_t* callback) nothrow on_before_download; 8716 8717 /// 8718 // Called when a download's status or progress information has been updated. 8719 // This may be called multiple times before and after on_before_download(). 8720 // Execute |callback| either asynchronously or in this function to cancel the 8721 // download if desired. Do not keep a reference to |download_item| outside of 8722 // this function. 8723 /// 8724 extern(System) void function ( 8725 cef_download_handler_t* self, 8726 cef_browser_t* browser, 8727 cef_download_item_t* download_item, 8728 cef_download_item_callback_t* callback) nothrow on_download_updated; 8729 } 8730 8731 8732 8733 // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_ 8734 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 8735 // 8736 // Redistribution and use in source and binary forms, with or without 8737 // modification, are permitted provided that the following conditions are 8738 // met: 8739 // 8740 // * Redistributions of source code must retain the above copyright 8741 // notice, this list of conditions and the following disclaimer. 8742 // * Redistributions in binary form must reproduce the above 8743 // copyright notice, this list of conditions and the following disclaimer 8744 // in the documentation and/or other materials provided with the 8745 // distribution. 8746 // * Neither the name of Google Inc. nor the name Chromium Embedded 8747 // Framework nor the names of its contributors may be used to endorse 8748 // or promote products derived from this software without specific prior 8749 // written permission. 8750 // 8751 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8752 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8753 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8754 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8755 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8756 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8757 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8758 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8759 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8760 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8761 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8762 // 8763 // --------------------------------------------------------------------------- 8764 // 8765 // This file was generated by the CEF translator tool and should not edited 8766 // by hand. See the translator.README.txt file in the tools directory for 8767 // more information. 8768 // 8769 // $hash=d84044bb582b029af5fa46c75f35b3da948dffd2$ 8770 // 8771 8772 extern (C): 8773 8774 /// 8775 // Structure used to represent a download item. 8776 /// 8777 struct cef_download_item_t 8778 { 8779 /// 8780 // Base structure. 8781 /// 8782 cef_base_ref_counted_t base; 8783 8784 /// 8785 // Returns true (1) if this object is valid. Do not call any other functions 8786 // if this function returns false (0). 8787 /// 8788 extern(System) int function (cef_download_item_t* self) nothrow is_valid; 8789 8790 /// 8791 // Returns true (1) if the download is in progress. 8792 /// 8793 extern(System) int function (cef_download_item_t* self) nothrow is_in_progress; 8794 8795 /// 8796 // Returns true (1) if the download is complete. 8797 /// 8798 extern(System) int function (cef_download_item_t* self) nothrow is_complete; 8799 8800 /// 8801 // Returns true (1) if the download has been canceled or interrupted. 8802 /// 8803 extern(System) int function (cef_download_item_t* self) nothrow is_canceled; 8804 8805 /// 8806 // Returns a simple speed estimate in bytes/s. 8807 /// 8808 extern(System) int64 function (cef_download_item_t* self) nothrow get_current_speed; 8809 8810 /// 8811 // Returns the rough percent complete or -1 if the receive total size is 8812 // unknown. 8813 /// 8814 extern(System) int function (cef_download_item_t* self) nothrow get_percent_complete; 8815 8816 /// 8817 // Returns the total number of bytes. 8818 /// 8819 extern(System) int64 function (cef_download_item_t* self) nothrow get_total_bytes; 8820 8821 /// 8822 // Returns the number of received bytes. 8823 /// 8824 extern(System) int64 function (cef_download_item_t* self) nothrow get_received_bytes; 8825 8826 /// 8827 // Returns the time that the download started. 8828 /// 8829 extern(System) cef_time_t function (cef_download_item_t* self) nothrow get_start_time; 8830 8831 /// 8832 // Returns the time that the download ended. 8833 /// 8834 extern(System) cef_time_t function (cef_download_item_t* self) nothrow get_end_time; 8835 8836 /// 8837 // Returns the full path to the downloaded or downloading file. 8838 /// 8839 // The resulting string must be freed by calling cef_string_userfree_free(). 8840 extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_full_path; 8841 8842 /// 8843 // Returns the unique identifier for this download. 8844 /// 8845 extern(System) uint32 function (cef_download_item_t* self) nothrow get_id; 8846 8847 /// 8848 // Returns the URL. 8849 /// 8850 // The resulting string must be freed by calling cef_string_userfree_free(). 8851 extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_url; 8852 8853 /// 8854 // Returns the original URL before any redirections. 8855 /// 8856 // The resulting string must be freed by calling cef_string_userfree_free(). 8857 extern(System) cef_string_userfree_t function ( 8858 cef_download_item_t* self) nothrow get_original_url; 8859 8860 /// 8861 // Returns the suggested file name. 8862 /// 8863 // The resulting string must be freed by calling cef_string_userfree_free(). 8864 extern(System) cef_string_userfree_t function ( 8865 cef_download_item_t* self) nothrow get_suggested_file_name; 8866 8867 /// 8868 // Returns the content disposition. 8869 /// 8870 // The resulting string must be freed by calling cef_string_userfree_free(). 8871 extern(System) cef_string_userfree_t function ( 8872 cef_download_item_t* self) nothrow get_content_disposition; 8873 8874 /// 8875 // Returns the mime type. 8876 /// 8877 // The resulting string must be freed by calling cef_string_userfree_free(). 8878 extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_mime_type; 8879 } 8880 8881 8882 8883 // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_ 8884 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 8885 // 8886 // Redistribution and use in source and binary forms, with or without 8887 // modification, are permitted provided that the following conditions are 8888 // met: 8889 // 8890 // * Redistributions of source code must retain the above copyright 8891 // notice, this list of conditions and the following disclaimer. 8892 // * Redistributions in binary form must reproduce the above 8893 // copyright notice, this list of conditions and the following disclaimer 8894 // in the documentation and/or other materials provided with the 8895 // distribution. 8896 // * Neither the name of Google Inc. nor the name Chromium Embedded 8897 // Framework nor the names of its contributors may be used to endorse 8898 // or promote products derived from this software without specific prior 8899 // written permission. 8900 // 8901 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8902 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8903 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8904 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8905 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8906 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8907 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8908 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8909 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8910 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8911 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8912 // 8913 // --------------------------------------------------------------------------- 8914 // 8915 // This file was generated by the CEF translator tool and should not edited 8916 // by hand. See the translator.README.txt file in the tools directory for 8917 // more information. 8918 // 8919 // $hash=9663321e2be1d000ac54e195c81f210ae40773d1$ 8920 // 8921 8922 extern (C): 8923 8924 /// 8925 // Structure used to represent drag data. The functions of this structure may be 8926 // called on any thread. 8927 /// 8928 struct cef_drag_data_t 8929 { 8930 /// 8931 // Base structure. 8932 /// 8933 cef_base_ref_counted_t base; 8934 8935 /// 8936 // Returns a copy of the current object. 8937 /// 8938 extern(System) cef_drag_data_t* function (cef_drag_data_t* self) nothrow clone; 8939 8940 /// 8941 // Returns true (1) if this object is read-only. 8942 /// 8943 extern(System) int function (cef_drag_data_t* self) nothrow is_read_only; 8944 8945 /// 8946 // Returns true (1) if the drag data is a link. 8947 /// 8948 extern(System) int function (cef_drag_data_t* self) nothrow is_link; 8949 8950 /// 8951 // Returns true (1) if the drag data is a text or html fragment. 8952 /// 8953 extern(System) int function (cef_drag_data_t* self) nothrow is_fragment; 8954 8955 /// 8956 // Returns true (1) if the drag data is a file. 8957 /// 8958 extern(System) int function (cef_drag_data_t* self) nothrow is_file; 8959 8960 /// 8961 // Return the link URL that is being dragged. 8962 /// 8963 // The resulting string must be freed by calling cef_string_userfree_free(). 8964 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_url; 8965 8966 /// 8967 // Return the title associated with the link being dragged. 8968 /// 8969 // The resulting string must be freed by calling cef_string_userfree_free(). 8970 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_title; 8971 8972 /// 8973 // Return the metadata, if any, associated with the link being dragged. 8974 /// 8975 // The resulting string must be freed by calling cef_string_userfree_free(). 8976 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_metadata; 8977 8978 /// 8979 // Return the plain text fragment that is being dragged. 8980 /// 8981 // The resulting string must be freed by calling cef_string_userfree_free(). 8982 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_fragment_text; 8983 8984 /// 8985 // Return the text/html fragment that is being dragged. 8986 /// 8987 // The resulting string must be freed by calling cef_string_userfree_free(). 8988 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_fragment_html; 8989 8990 /// 8991 // Return the base URL that the fragment came from. This value is used for 8992 // resolving relative URLs and may be NULL. 8993 /// 8994 // The resulting string must be freed by calling cef_string_userfree_free(). 8995 extern(System) cef_string_userfree_t function ( 8996 cef_drag_data_t* self) nothrow get_fragment_base_url; 8997 8998 /// 8999 // Return the name of the file being dragged out of the browser window. 9000 /// 9001 // The resulting string must be freed by calling cef_string_userfree_free(). 9002 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_file_name; 9003 9004 /// 9005 // Write the contents of the file being dragged out of the web view into 9006 // |writer|. Returns the number of bytes sent to |writer|. If |writer| is NULL 9007 // this function will return the size of the file contents in bytes. Call 9008 // get_file_name() to get a suggested name for the file. 9009 /// 9010 extern(System) size_t function ( 9011 cef_drag_data_t* self, 9012 cef_stream_writer_t* writer) nothrow get_file_contents; 9013 9014 /// 9015 // Retrieve the list of file names that are being dragged into the browser 9016 // window. 9017 /// 9018 extern(System) int function ( 9019 cef_drag_data_t* self, 9020 cef_string_list_t names) nothrow get_file_names; 9021 9022 /// 9023 // Set the link URL that is being dragged. 9024 /// 9025 extern(System) void function ( 9026 cef_drag_data_t* self, 9027 const(cef_string_t)* url) nothrow set_link_url; 9028 9029 /// 9030 // Set the title associated with the link being dragged. 9031 /// 9032 extern(System) void function ( 9033 cef_drag_data_t* self, 9034 const(cef_string_t)* title) nothrow set_link_title; 9035 9036 /// 9037 // Set the metadata associated with the link being dragged. 9038 /// 9039 extern(System) void function ( 9040 cef_drag_data_t* self, 9041 const(cef_string_t)* data) nothrow set_link_metadata; 9042 9043 /// 9044 // Set the plain text fragment that is being dragged. 9045 /// 9046 extern(System) void function ( 9047 cef_drag_data_t* self, 9048 const(cef_string_t)* text) nothrow set_fragment_text; 9049 9050 /// 9051 // Set the text/html fragment that is being dragged. 9052 /// 9053 extern(System) void function ( 9054 cef_drag_data_t* self, 9055 const(cef_string_t)* html) nothrow set_fragment_html; 9056 9057 /// 9058 // Set the base URL that the fragment came from. 9059 /// 9060 extern(System) void function ( 9061 cef_drag_data_t* self, 9062 const(cef_string_t)* base_url) nothrow set_fragment_base_url; 9063 9064 /// 9065 // Reset the file contents. You should do this before calling 9066 // cef_browser_host_t::DragTargetDragEnter as the web view does not allow us 9067 // to drag in this kind of data. 9068 /// 9069 extern(System) void function (cef_drag_data_t* self) nothrow reset_file_contents; 9070 9071 /// 9072 // Add a file that is being dragged into the webview. 9073 /// 9074 extern(System) void function ( 9075 cef_drag_data_t* self, 9076 const(cef_string_t)* path, 9077 const(cef_string_t)* display_name) nothrow add_file; 9078 9079 /// 9080 // Get the image representation of drag data. May return NULL if no image 9081 // representation is available. 9082 /// 9083 extern(System) cef_image_t* function (cef_drag_data_t* self) nothrow get_image; 9084 9085 /// 9086 // Get the image hotspot (drag start location relative to image dimensions). 9087 /// 9088 extern(System) cef_point_t function (cef_drag_data_t* self) nothrow get_image_hotspot; 9089 9090 /// 9091 // Returns true (1) if an image representation of drag data is available. 9092 /// 9093 extern(System) int function (cef_drag_data_t* self) nothrow has_image; 9094 } 9095 9096 9097 9098 /// 9099 // Create a new cef_drag_data_t object. 9100 /// 9101 cef_drag_data_t* cef_drag_data_create (); 9102 9103 // CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_ 9104 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 9105 // 9106 // Redistribution and use in source and binary forms, with or without 9107 // modification, are permitted provided that the following conditions are 9108 // met: 9109 // 9110 // * Redistributions of source code must retain the above copyright 9111 // notice, this list of conditions and the following disclaimer. 9112 // * Redistributions in binary form must reproduce the above 9113 // copyright notice, this list of conditions and the following disclaimer 9114 // in the documentation and/or other materials provided with the 9115 // distribution. 9116 // * Neither the name of Google Inc. nor the name Chromium Embedded 9117 // Framework nor the names of its contributors may be used to endorse 9118 // or promote products derived from this software without specific prior 9119 // written permission. 9120 // 9121 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9122 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9123 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9124 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9125 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9126 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9127 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9128 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9129 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9130 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9131 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9132 // 9133 // --------------------------------------------------------------------------- 9134 // 9135 // This file was generated by the CEF translator tool and should not edited 9136 // by hand. See the translator.README.txt file in the tools directory for 9137 // more information. 9138 // 9139 // $hash=1cc1f134e68406ae3b05f7e181e12f27262772f0$ 9140 // 9141 9142 extern (C): 9143 9144 /// 9145 // Implement this structure to handle events related to dragging. The functions 9146 // of this structure will be called on the UI thread. 9147 /// 9148 struct cef_drag_handler_t 9149 { 9150 /// 9151 // Base structure. 9152 /// 9153 cef_base_ref_counted_t base; 9154 9155 /// 9156 // Called when an external drag event enters the browser window. |dragData| 9157 // contains the drag event data and |mask| represents the type of drag 9158 // operation. Return false (0) for default drag handling behavior or true (1) 9159 // to cancel the drag event. 9160 /// 9161 extern(System) int function ( 9162 cef_drag_handler_t* self, 9163 cef_browser_t* browser, 9164 cef_drag_data_t* dragData, 9165 cef_drag_operations_mask_t mask) nothrow on_drag_enter; 9166 9167 /// 9168 // Called whenever draggable regions for the browser window change. These can 9169 // be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If 9170 // draggable regions are never defined in a document this function will also 9171 // never be called. If the last draggable region is removed from a document 9172 // this function will be called with an NULL vector. 9173 /// 9174 extern(System) void function ( 9175 cef_drag_handler_t* self, 9176 cef_browser_t* browser, 9177 cef_frame_t* frame, 9178 size_t regionsCount, 9179 const(cef_draggable_region_t)* regions) nothrow on_draggable_regions_changed; 9180 } 9181 9182 9183 9184 // CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_ 9185 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 9186 // 9187 // Redistribution and use in source and binary forms, with or without 9188 // modification, are permitted provided that the following conditions are 9189 // met: 9190 // 9191 // * Redistributions of source code must retain the above copyright 9192 // notice, this list of conditions and the following disclaimer. 9193 // * Redistributions in binary form must reproduce the above 9194 // copyright notice, this list of conditions and the following disclaimer 9195 // in the documentation and/or other materials provided with the 9196 // distribution. 9197 // * Neither the name of Google Inc. nor the name Chromium Embedded 9198 // Framework nor the names of its contributors may be used to endorse 9199 // or promote products derived from this software without specific prior 9200 // written permission. 9201 // 9202 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9203 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9204 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9205 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9206 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9207 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9208 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9209 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9210 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9211 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9212 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9213 // 9214 // --------------------------------------------------------------------------- 9215 // 9216 // This file was generated by the CEF translator tool and should not edited 9217 // by hand. See the translator.README.txt file in the tools directory for 9218 // more information. 9219 // 9220 // $hash=5d5251098be1477705de2a21502dec2d8338ce00$ 9221 // 9222 9223 extern (C): 9224 9225 9226 9227 9228 /// 9229 // Object representing an extension. Methods may be called on any thread unless 9230 // otherwise indicated. 9231 /// 9232 struct cef_extension_t 9233 { 9234 /// 9235 // Base structure. 9236 /// 9237 cef_base_ref_counted_t base; 9238 9239 /// 9240 // Returns the unique extension identifier. This is calculated based on the 9241 // extension public key, if available, or on the extension path. See 9242 // https://developer.chrome.com/extensions/manifest/key for details. 9243 /// 9244 // The resulting string must be freed by calling cef_string_userfree_free(). 9245 extern(System) cef_string_userfree_t function (cef_extension_t* self) nothrow get_identifier; 9246 9247 /// 9248 // Returns the absolute path to the extension directory on disk. This value 9249 // will be prefixed with PK_DIR_RESOURCES if a relative path was passed to 9250 // cef_request_context_t::LoadExtension. 9251 /// 9252 // The resulting string must be freed by calling cef_string_userfree_free(). 9253 extern(System) cef_string_userfree_t function (cef_extension_t* self) nothrow get_path; 9254 9255 /// 9256 // Returns the extension manifest contents as a cef_dictionary_value_t object. 9257 // See https://developer.chrome.com/extensions/manifest for details. 9258 /// 9259 extern(System) cef_dictionary_value_t* function (cef_extension_t* self) nothrow get_manifest; 9260 9261 /// 9262 // Returns true (1) if this object is the same extension as |that| object. 9263 // Extensions are considered the same if identifier, path and loader context 9264 // match. 9265 /// 9266 extern(System) int function (cef_extension_t* self, cef_extension_t* that) nothrow is_same; 9267 9268 /// 9269 // Returns the handler for this extension. Will return NULL for internal 9270 // extensions or if no handler was passed to 9271 // cef_request_context_t::LoadExtension. 9272 /// 9273 extern(System) cef_extension_handler_t* function (cef_extension_t* self) nothrow get_handler; 9274 9275 /// 9276 // Returns the request context that loaded this extension. Will return NULL 9277 // for internal extensions or if the extension has been unloaded. See the 9278 // cef_request_context_t::LoadExtension documentation for more information 9279 // about loader contexts. Must be called on the browser process UI thread. 9280 /// 9281 extern(System) cef_request_context_t* function ( 9282 cef_extension_t* self) nothrow get_loader_context; 9283 9284 /// 9285 // Returns true (1) if this extension is currently loaded. Must be called on 9286 // the browser process UI thread. 9287 /// 9288 extern(System) int function (cef_extension_t* self) nothrow is_loaded; 9289 9290 /// 9291 // Unload this extension if it is not an internal extension and is currently 9292 // loaded. Will result in a call to 9293 // cef_extension_handler_t::OnExtensionUnloaded on success. 9294 /// 9295 extern(System) void function (cef_extension_t* self) nothrow unload; 9296 } 9297 9298 9299 9300 // CEF_INCLUDE_CAPI_CEF_EXTENSION_CAPI_H_ 9301 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 9302 // 9303 // Redistribution and use in source and binary forms, with or without 9304 // modification, are permitted provided that the following conditions are 9305 // met: 9306 // 9307 // * Redistributions of source code must retain the above copyright 9308 // notice, this list of conditions and the following disclaimer. 9309 // * Redistributions in binary form must reproduce the above 9310 // copyright notice, this list of conditions and the following disclaimer 9311 // in the documentation and/or other materials provided with the 9312 // distribution. 9313 // * Neither the name of Google Inc. nor the name Chromium Embedded 9314 // Framework nor the names of its contributors may be used to endorse 9315 // or promote products derived from this software without specific prior 9316 // written permission. 9317 // 9318 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9319 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9320 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9321 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9322 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9323 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9324 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9325 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9326 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9327 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9328 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9329 // 9330 // --------------------------------------------------------------------------- 9331 // 9332 // This file was generated by the CEF translator tool and should not edited 9333 // by hand. See the translator.README.txt file in the tools directory for 9334 // more information. 9335 // 9336 // $hash=c952241dabb9d99109ebb64acba0124e43150628$ 9337 // 9338 9339 extern (C): 9340 9341 9342 9343 /// 9344 // Callback structure used for asynchronous continuation of 9345 // cef_extension_handler_t::GetExtensionResource. 9346 /// 9347 struct cef_get_extension_resource_callback_t 9348 { 9349 /// 9350 // Base structure. 9351 /// 9352 cef_base_ref_counted_t base; 9353 9354 /// 9355 // Continue the request. Read the resource contents from |stream|. 9356 /// 9357 extern(System) void function ( 9358 cef_get_extension_resource_callback_t* self, 9359 cef_stream_reader_t* stream) nothrow cont; 9360 9361 /// 9362 // Cancel the request. 9363 /// 9364 extern(System) void function (cef_get_extension_resource_callback_t* self) nothrow cancel; 9365 } 9366 9367 9368 9369 /// 9370 // Implement this structure to handle events related to browser extensions. The 9371 // functions of this structure will be called on the UI thread. See 9372 // cef_request_context_t::LoadExtension for information about extension loading. 9373 /// 9374 struct cef_extension_handler_t 9375 { 9376 /// 9377 // Base structure. 9378 /// 9379 cef_base_ref_counted_t base; 9380 9381 /// 9382 // Called if the cef_request_context_t::LoadExtension request fails. |result| 9383 // will be the error code. 9384 /// 9385 extern(System) void function ( 9386 cef_extension_handler_t* self, 9387 cef_errorcode_t result) nothrow on_extension_load_failed; 9388 9389 /// 9390 // Called if the cef_request_context_t::LoadExtension request succeeds. 9391 // |extension| is the loaded extension. 9392 /// 9393 extern(System) void function ( 9394 cef_extension_handler_t* self, 9395 cef_extension_t* extension) nothrow on_extension_loaded; 9396 9397 /// 9398 // Called after the cef_extension_t::Unload request has completed. 9399 /// 9400 extern(System) void function ( 9401 cef_extension_handler_t* self, 9402 cef_extension_t* extension) nothrow on_extension_unloaded; 9403 9404 /// 9405 // Called when an extension needs a browser to host a background script 9406 // specified via the "background" manifest key. The browser will have no 9407 // visible window and cannot be displayed. |extension| is the extension that 9408 // is loading the background script. |url| is an internally generated 9409 // reference to an HTML page that will be used to load the background script 9410 // via a <script> src attribute. To allow creation of the browser optionally 9411 // modify |client| and |settings| and return false (0). To cancel creation of 9412 // the browser (and consequently cancel load of the background script) return 9413 // true (1). Successful creation will be indicated by a call to 9414 // cef_life_span_handler_t::OnAfterCreated, and 9415 // cef_browser_host_t::IsBackgroundHost will return true (1) for the resulting 9416 // browser. See https://developer.chrome.com/extensions/event_pages for more 9417 // information about extension background script usage. 9418 /// 9419 extern(System) int function ( 9420 cef_extension_handler_t* self, 9421 cef_extension_t* extension, 9422 const(cef_string_t)* url, 9423 cef_client_t** client, 9424 cef_browser_settings_t* settings) nothrow on_before_background_browser; 9425 9426 /// 9427 // Called when an extension API (e.g. chrome.tabs.create) requests creation of 9428 // a new browser. |extension| and |browser| are the source of the API call. 9429 // |active_browser| may optionally be specified via the windowId property or 9430 // returned via the get_active_browser() callback and provides the default 9431 // |client| and |settings| values for the new browser. |index| is the position 9432 // value optionally specified via the index property. |url| is the URL that 9433 // will be loaded in the browser. |active| is true (1) if the new browser 9434 // should be active when opened. To allow creation of the browser optionally 9435 // modify |windowInfo|, |client| and |settings| and return false (0). To 9436 // cancel creation of the browser return true (1). Successful creation will be 9437 // indicated by a call to cef_life_span_handler_t::OnAfterCreated. Any 9438 // modifications to |windowInfo| will be ignored if |active_browser| is 9439 // wrapped in a cef_browser_view_t. 9440 /// 9441 extern(System) int function ( 9442 cef_extension_handler_t* self, 9443 cef_extension_t* extension, 9444 cef_browser_t* browser, 9445 cef_browser_t* active_browser, 9446 int index, 9447 const(cef_string_t)* url, 9448 int active, 9449 cef_window_info_t* windowInfo, 9450 cef_client_t** client, 9451 cef_browser_settings_t* settings) nothrow on_before_browser; 9452 9453 /// 9454 // Called when no tabId is specified to an extension API call that accepts a 9455 // tabId parameter (e.g. chrome.tabs.*). |extension| and |browser| are the 9456 // source of the API call. Return the browser that will be acted on by the API 9457 // call or return NULL to act on |browser|. The returned browser must share 9458 // the same cef_request_context_t as |browser|. Incognito browsers should not 9459 // be considered unless the source extension has incognito access enabled, in 9460 // which case |include_incognito| will be true (1). 9461 /// 9462 extern(System) cef_browser_t* function ( 9463 cef_extension_handler_t* self, 9464 cef_extension_t* extension, 9465 cef_browser_t* browser, 9466 int include_incognito) nothrow get_active_browser; 9467 9468 /// 9469 // Called when the tabId associated with |target_browser| is specified to an 9470 // extension API call that accepts a tabId parameter (e.g. chrome.tabs.*). 9471 // |extension| and |browser| are the source of the API call. Return true (1) 9472 // to allow access of false (0) to deny access. Access to incognito browsers 9473 // should not be allowed unless the source extension has incognito access 9474 // enabled, in which case |include_incognito| will be true (1). 9475 /// 9476 extern(System) int function ( 9477 cef_extension_handler_t* self, 9478 cef_extension_t* extension, 9479 cef_browser_t* browser, 9480 int include_incognito, 9481 cef_browser_t* target_browser) nothrow can_access_browser; 9482 9483 /// 9484 // Called to retrieve an extension resource that would normally be loaded from 9485 // disk (e.g. if a file parameter is specified to chrome.tabs.executeScript). 9486 // |extension| and |browser| are the source of the resource request. |file| is 9487 // the requested relative file path. To handle the resource request return 9488 // true (1) and execute |callback| either synchronously or asynchronously. For 9489 // the default behavior which reads the resource from the extension directory 9490 // on disk return false (0). Localization substitutions will not be applied to 9491 // resources handled via this function. 9492 /// 9493 extern(System) int function ( 9494 cef_extension_handler_t* self, 9495 cef_extension_t* extension, 9496 cef_browser_t* browser, 9497 const(cef_string_t)* file, 9498 cef_get_extension_resource_callback_t* callback) nothrow get_extension_resource; 9499 } 9500 9501 9502 9503 // CEF_INCLUDE_CAPI_CEF_EXTENSION_HANDLER_CAPI_H_ 9504 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 9505 // 9506 // Redistribution and use in source and binary forms, with or without 9507 // modification, are permitted provided that the following conditions are 9508 // met: 9509 // 9510 // * Redistributions of source code must retain the above copyright 9511 // notice, this list of conditions and the following disclaimer. 9512 // * Redistributions in binary form must reproduce the above 9513 // copyright notice, this list of conditions and the following disclaimer 9514 // in the documentation and/or other materials provided with the 9515 // distribution. 9516 // * Neither the name of Google Inc. nor the name Chromium Embedded 9517 // Framework nor the names of its contributors may be used to endorse 9518 // or promote products derived from this software without specific prior 9519 // written permission. 9520 // 9521 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9522 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9523 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9524 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9525 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9526 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9527 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9528 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9529 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9530 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9531 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9532 // 9533 // --------------------------------------------------------------------------- 9534 // 9535 // This file was generated by the CEF translator tool and should not edited 9536 // by hand. See the translator.README.txt file in the tools directory for 9537 // more information. 9538 // 9539 // $hash=00d75d4f1968686cec7db84a59df89d98d8fe146$ 9540 // 9541 9542 extern (C): 9543 9544 /// 9545 // Creates a directory and all parent directories if they don't already exist. 9546 // Returns true (1) on successful creation or if the directory already exists. 9547 // The directory is only readable by the current user. Calling this function on 9548 // the browser process UI or IO threads is not allowed. 9549 /// 9550 int cef_create_directory (const(cef_string_t)* full_path); 9551 9552 /// 9553 // Get the temporary directory provided by the system. 9554 // 9555 // WARNING: In general, you should use the temp directory variants below instead 9556 // of this function. Those variants will ensure that the proper permissions are 9557 // set so that other users on the system can't edit them while they're open 9558 // (which could lead to security issues). 9559 /// 9560 int cef_get_temp_directory (cef_string_t* temp_dir); 9561 9562 /// 9563 // Creates a new directory. On Windows if |prefix| is provided the new directory 9564 // name is in the format of "prefixyyyy". Returns true (1) on success and sets 9565 // |new_temp_path| to the full path of the directory that was created. The 9566 // directory is only readable by the current user. Calling this function on the 9567 // browser process UI or IO threads is not allowed. 9568 /// 9569 int cef_create_new_temp_directory ( 9570 const(cef_string_t)* prefix, 9571 cef_string_t* new_temp_path); 9572 9573 /// 9574 // Creates a directory within another directory. Extra characters will be 9575 // appended to |prefix| to ensure that the new directory does not have the same 9576 // name as an existing directory. Returns true (1) on success and sets |new_dir| 9577 // to the full path of the directory that was created. The directory is only 9578 // readable by the current user. Calling this function on the browser process UI 9579 // or IO threads is not allowed. 9580 /// 9581 int cef_create_temp_directory_in_directory ( 9582 const(cef_string_t)* base_dir, 9583 const(cef_string_t)* prefix, 9584 cef_string_t* new_dir); 9585 9586 /// 9587 // Returns true (1) if the given path exists and is a directory. Calling this 9588 // function on the browser process UI or IO threads is not allowed. 9589 /// 9590 int cef_directory_exists (const(cef_string_t)* path); 9591 9592 /// 9593 // Deletes the given path whether it's a file or a directory. If |path| is a 9594 // directory all contents will be deleted. If |recursive| is true (1) any sub- 9595 // directories and their contents will also be deleted (equivalent to executing 9596 // "rm -rf", so use with caution). On POSIX environments if |path| is a symbolic 9597 // link then only the symlink will be deleted. Returns true (1) on successful 9598 // deletion or if |path| does not exist. Calling this function on the browser 9599 // process UI or IO threads is not allowed. 9600 /// 9601 int cef_delete_file (const(cef_string_t)* path, int recursive); 9602 9603 /// 9604 // Writes the contents of |src_dir| into a zip archive at |dest_file|. If 9605 // |include_hidden_files| is true (1) files starting with "." will be included. 9606 // Returns true (1) on success. Calling this function on the browser process UI 9607 // or IO threads is not allowed. 9608 /// 9609 int cef_zip_directory ( 9610 const(cef_string_t)* src_dir, 9611 const(cef_string_t)* dest_file, 9612 int include_hidden_files); 9613 9614 /// 9615 // Loads the existing "Certificate Revocation Lists" file that is managed by 9616 // Google Chrome. This file can generally be found in Chrome's User Data 9617 // directory (e.g. "C:\Users\[User]\AppData\Local\Google\Chrome\User Data\" on 9618 // Windows) and is updated periodically by Chrome's component updater service. 9619 // Must be called in the browser process after the context has been initialized. 9620 // See https://dev.chromium.org/Home/chromium-security/crlsets for background. 9621 /// 9622 void cef_load_crlsets_file (const(cef_string_t)* path); 9623 9624 // CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_ 9625 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 9626 // 9627 // Redistribution and use in source and binary forms, with or without 9628 // modification, are permitted provided that the following conditions are 9629 // met: 9630 // 9631 // * Redistributions of source code must retain the above copyright 9632 // notice, this list of conditions and the following disclaimer. 9633 // * Redistributions in binary form must reproduce the above 9634 // copyright notice, this list of conditions and the following disclaimer 9635 // in the documentation and/or other materials provided with the 9636 // distribution. 9637 // * Neither the name of Google Inc. nor the name Chromium Embedded 9638 // Framework nor the names of its contributors may be used to endorse 9639 // or promote products derived from this software without specific prior 9640 // written permission. 9641 // 9642 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9643 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9644 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9645 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9646 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9647 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9648 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9649 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9650 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9651 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9652 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9653 // 9654 // --------------------------------------------------------------------------- 9655 // 9656 // This file was generated by the CEF translator tool and should not edited 9657 // by hand. See the translator.README.txt file in the tools directory for 9658 // more information. 9659 // 9660 // $hash=03bb69a14868a95abf3bf7b1608dc351480e307f$ 9661 // 9662 9663 extern (C): 9664 9665 /// 9666 // Implement this structure to handle events related to find results. The 9667 // functions of this structure will be called on the UI thread. 9668 /// 9669 struct cef_find_handler_t 9670 { 9671 /// 9672 // Base structure. 9673 /// 9674 cef_base_ref_counted_t base; 9675 9676 /// 9677 // Called to report find results returned by cef_browser_host_t::find(). 9678 // |identifer| is the identifier passed to find(), |count| is the number of 9679 // matches currently identified, |selectionRect| is the location of where the 9680 // match was found (in window coordinates), |activeMatchOrdinal| is the 9681 // current position in the search results, and |finalUpdate| is true (1) if 9682 // this is the last find notification. 9683 /// 9684 extern(System) void function ( 9685 cef_find_handler_t* self, 9686 cef_browser_t* browser, 9687 int identifier, 9688 int count, 9689 const(cef_rect_t)* selectionRect, 9690 int activeMatchOrdinal, 9691 int finalUpdate) nothrow on_find_result; 9692 } 9693 9694 9695 9696 // CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_ 9697 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 9698 // 9699 // Redistribution and use in source and binary forms, with or without 9700 // modification, are permitted provided that the following conditions are 9701 // met: 9702 // 9703 // * Redistributions of source code must retain the above copyright 9704 // notice, this list of conditions and the following disclaimer. 9705 // * Redistributions in binary form must reproduce the above 9706 // copyright notice, this list of conditions and the following disclaimer 9707 // in the documentation and/or other materials provided with the 9708 // distribution. 9709 // * Neither the name of Google Inc. nor the name Chromium Embedded 9710 // Framework nor the names of its contributors may be used to endorse 9711 // or promote products derived from this software without specific prior 9712 // written permission. 9713 // 9714 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9715 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9716 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9717 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9718 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9719 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9720 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9721 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9722 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9723 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9724 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9725 // 9726 // --------------------------------------------------------------------------- 9727 // 9728 // This file was generated by the CEF translator tool and should not edited 9729 // by hand. See the translator.README.txt file in the tools directory for 9730 // more information. 9731 // 9732 // $hash=0fccb41381e922e9d9545ae45ba3e6cf1916c4b0$ 9733 // 9734 9735 extern (C): 9736 9737 /// 9738 // Implement this structure to handle events related to focus. The functions of 9739 // this structure will be called on the UI thread. 9740 /// 9741 struct cef_focus_handler_t 9742 { 9743 /// 9744 // Base structure. 9745 /// 9746 cef_base_ref_counted_t base; 9747 9748 /// 9749 // Called when the browser component is about to loose focus. For instance, if 9750 // focus was on the last HTML element and the user pressed the TAB key. |next| 9751 // will be true (1) if the browser is giving focus to the next component and 9752 // false (0) if the browser is giving focus to the previous component. 9753 /// 9754 extern(System) void function ( 9755 cef_focus_handler_t* self, 9756 cef_browser_t* browser, 9757 int next) nothrow on_take_focus; 9758 9759 /// 9760 // Called when the browser component is requesting focus. |source| indicates 9761 // where the focus request is originating from. Return false (0) to allow the 9762 // focus to be set or true (1) to cancel setting the focus. 9763 /// 9764 extern(System) int function ( 9765 cef_focus_handler_t* self, 9766 cef_browser_t* browser, 9767 cef_focus_source_t source) nothrow on_set_focus; 9768 9769 /// 9770 // Called when the browser component has received focus. 9771 /// 9772 extern(System) void function ( 9773 cef_focus_handler_t* self, 9774 cef_browser_t* browser) nothrow on_got_focus; 9775 } 9776 9777 9778 9779 // CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_ 9780 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 9781 // 9782 // Redistribution and use in source and binary forms, with or without 9783 // modification, are permitted provided that the following conditions are 9784 // met: 9785 // 9786 // * Redistributions of source code must retain the above copyright 9787 // notice, this list of conditions and the following disclaimer. 9788 // * Redistributions in binary form must reproduce the above 9789 // copyright notice, this list of conditions and the following disclaimer 9790 // in the documentation and/or other materials provided with the 9791 // distribution. 9792 // * Neither the name of Google Inc. nor the name Chromium Embedded 9793 // Framework nor the names of its contributors may be used to endorse 9794 // or promote products derived from this software without specific prior 9795 // written permission. 9796 // 9797 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9798 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9799 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9800 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9801 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9802 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9803 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9804 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9805 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9806 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9807 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9808 // 9809 // --------------------------------------------------------------------------- 9810 // 9811 // This file was generated by the CEF translator tool and should not edited 9812 // by hand. See the translator.README.txt file in the tools directory for 9813 // more information. 9814 // 9815 // $hash=872fd1e811d41f56f03da0da75a8f2e89cad40cd$ 9816 // 9817 9818 extern (C): 9819 9820 9821 9822 9823 9824 9825 /// 9826 // Structure used to represent a frame in the browser window. When used in the 9827 // browser process the functions of this structure may be called on any thread 9828 // unless otherwise indicated in the comments. When used in the render process 9829 // the functions of this structure may only be called on the main thread. 9830 /// 9831 struct cef_frame_t 9832 { 9833 /// 9834 // Base structure. 9835 /// 9836 cef_base_ref_counted_t base; 9837 9838 /// 9839 // True if this object is currently attached to a valid frame. 9840 /// 9841 extern(System) int function (cef_frame_t* self) nothrow is_valid; 9842 9843 /// 9844 // Execute undo in this frame. 9845 /// 9846 extern(System) void function (cef_frame_t* self) nothrow undo; 9847 9848 /// 9849 // Execute redo in this frame. 9850 /// 9851 extern(System) void function (cef_frame_t* self) nothrow redo; 9852 9853 /// 9854 // Execute cut in this frame. 9855 /// 9856 extern(System) void function (cef_frame_t* self) nothrow cut; 9857 9858 /// 9859 // Execute copy in this frame. 9860 /// 9861 extern(System) void function (cef_frame_t* self) nothrow copy; 9862 9863 /// 9864 // Execute paste in this frame. 9865 /// 9866 extern(System) void function (cef_frame_t* self) nothrow paste; 9867 9868 /// 9869 // Execute delete in this frame. 9870 /// 9871 extern(System) void function (cef_frame_t* self) nothrow del; 9872 9873 /// 9874 // Execute select all in this frame. 9875 /// 9876 extern(System) void function (cef_frame_t* self) nothrow select_all; 9877 9878 /// 9879 // Save this frame's HTML source to a temporary file and open it in the 9880 // default text viewing application. This function can only be called from the 9881 // browser process. 9882 /// 9883 extern(System) void function (cef_frame_t* self) nothrow view_source; 9884 9885 /// 9886 // Retrieve this frame's HTML source as a string sent to the specified 9887 // visitor. 9888 /// 9889 extern(System) void function ( 9890 cef_frame_t* self, 9891 cef_string_visitor_t* visitor) nothrow get_source; 9892 9893 /// 9894 // Retrieve this frame's display text as a string sent to the specified 9895 // visitor. 9896 /// 9897 extern(System) void function ( 9898 cef_frame_t* self, 9899 cef_string_visitor_t* visitor) nothrow get_text; 9900 9901 /// 9902 // Load the request represented by the |request| object. 9903 // 9904 // WARNING: This function will fail with "bad IPC message" reason 9905 // INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request 9906 // origin using some other mechanism (LoadURL, link click, etc). 9907 /// 9908 extern(System) void function (cef_frame_t* self, cef_request_t* request) nothrow load_request; 9909 9910 /// 9911 // Load the specified |url|. 9912 /// 9913 extern(System) void function (cef_frame_t* self, const(cef_string_t)* url) nothrow load_url; 9914 9915 /// 9916 // Execute a string of JavaScript code in this frame. The |script_url| 9917 // parameter is the URL where the script in question can be found, if any. The 9918 // renderer may request this URL to show the developer the source of the 9919 // error. The |start_line| parameter is the base line number to use for error 9920 // reporting. 9921 /// 9922 extern(System) void function ( 9923 cef_frame_t* self, 9924 const(cef_string_t)* code, 9925 const(cef_string_t)* script_url, 9926 int start_line) nothrow execute_java_script; 9927 9928 /// 9929 // Returns true (1) if this is the main (top-level) frame. 9930 /// 9931 extern(System) int function (cef_frame_t* self) nothrow is_main; 9932 9933 /// 9934 // Returns true (1) if this is the focused frame. 9935 /// 9936 extern(System) int function (cef_frame_t* self) nothrow is_focused; 9937 9938 /// 9939 // Returns the name for this frame. If the frame has an assigned name (for 9940 // example, set via the iframe "name" attribute) then that value will be 9941 // returned. Otherwise a unique name will be constructed based on the frame 9942 // parent hierarchy. The main (top-level) frame will always have an NULL name 9943 // value. 9944 /// 9945 // The resulting string must be freed by calling cef_string_userfree_free(). 9946 extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_name; 9947 9948 /// 9949 // Returns the globally unique identifier for this frame or < 0 if the 9950 // underlying frame does not yet exist. 9951 /// 9952 extern(System) int64 function (cef_frame_t* self) nothrow get_identifier; 9953 9954 /// 9955 // Returns the parent of this frame or NULL if this is the main (top-level) 9956 // frame. 9957 /// 9958 extern(System) cef_frame_t* function (cef_frame_t* self) nothrow get_parent; 9959 9960 /// 9961 // Returns the URL currently loaded in this frame. 9962 /// 9963 // The resulting string must be freed by calling cef_string_userfree_free(). 9964 extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_url; 9965 9966 /// 9967 // Returns the browser that this frame belongs to. 9968 /// 9969 extern(System) cef_browser_t* function (cef_frame_t* self) nothrow get_browser; 9970 9971 /// 9972 // Get the V8 context associated with the frame. This function can only be 9973 // called from the render process. 9974 /// 9975 extern(System) cef_v8context_t* function (cef_frame_t* self) nothrow get_v8context; 9976 9977 /// 9978 // Visit the DOM document. This function can only be called from the render 9979 // process. 9980 /// 9981 extern(System) void function (cef_frame_t* self, cef_domvisitor_t* visitor) nothrow visit_dom; 9982 9983 /// 9984 // Create a new URL request that will be treated as originating from this 9985 // frame and the associated browser. This request may be intercepted by the 9986 // client via cef_resource_request_handler_t or cef_scheme_handler_factory_t. 9987 // Use cef_urlrequest_t::Create instead if you do not want the request to have 9988 // this association, in which case it may be handled differently (see 9989 // documentation on that function). Requests may originate from both the 9990 // browser process and the render process. 9991 // 9992 // For requests originating from the browser process: 9993 // - POST data may only contain a single element of type PDE_TYPE_FILE or 9994 // PDE_TYPE_BYTES. 9995 // For requests originating from the render process: 9996 // - POST data may only contain a single element of type PDE_TYPE_BYTES. 9997 // - If the response contains Content-Disposition or Mime-Type header values 9998 // that would not normally be rendered then the response may receive 9999 // special handling inside the browser (for example, via the file download 10000 // code path instead of the URL request code path). 10001 // 10002 // The |request| object will be marked as read-only after calling this 10003 // function. 10004 /// 10005 extern(System) cef_urlrequest_t* function ( 10006 cef_frame_t* self, 10007 cef_request_t* request, 10008 cef_urlrequest_client_t* client) nothrow create_urlrequest; 10009 10010 /// 10011 // Send a message to the specified |target_process|. Ownership of the message 10012 // contents will be transferred and the |message| reference will be 10013 // invalidated. Message delivery is not guaranteed in all cases (for example, 10014 // if the browser is closing, navigating, or if the target process crashes). 10015 // Send an ACK message back from the target process if confirmation is 10016 // required. 10017 /// 10018 extern(System) void function ( 10019 cef_frame_t* self, 10020 cef_process_id_t target_process, 10021 cef_process_message_t* message) nothrow send_process_message; 10022 } 10023 10024 10025 10026 // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_ 10027 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 10028 // 10029 // Redistribution and use in source and binary forms, with or without 10030 // modification, are permitted provided that the following conditions are 10031 // met: 10032 // 10033 // * Redistributions of source code must retain the above copyright 10034 // notice, this list of conditions and the following disclaimer. 10035 // * Redistributions in binary form must reproduce the above 10036 // copyright notice, this list of conditions and the following disclaimer 10037 // in the documentation and/or other materials provided with the 10038 // distribution. 10039 // * Neither the name of Google Inc. nor the name Chromium Embedded 10040 // Framework nor the names of its contributors may be used to endorse 10041 // or promote products derived from this software without specific prior 10042 // written permission. 10043 // 10044 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10045 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10046 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10047 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10048 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10049 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10050 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10051 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10052 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10053 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10054 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10055 // 10056 // --------------------------------------------------------------------------- 10057 // 10058 // This file was generated by the CEF translator tool and should not edited 10059 // by hand. See the translator.README.txt file in the tools directory for 10060 // more information. 10061 // 10062 // $hash=f6be5f7509ee3ccfe16f226470897223cc131014$ 10063 // 10064 10065 extern (C): 10066 10067 /// 10068 // Implement this structure to handle events related to cef_frame_t life span. 10069 // The order of callbacks is: 10070 // 10071 // (1) During initial cef_browser_host_t creation and navigation of the main 10072 // frame: - cef_frame_handler_t::OnFrameCreated => The initial main frame object 10073 // has been 10074 // created. Any commands will be queued until the frame is attached. 10075 // - cef_frame_handler_t::OnMainFrameChanged => The initial main frame object 10076 // has 10077 // been assigned to the browser. 10078 // - cef_life_span_handler_t::OnAfterCreated => The browser is now valid and can 10079 // be 10080 // used. 10081 // - cef_frame_handler_t::OnFrameAttached => The initial main frame object is 10082 // now 10083 // connected to its peer in the renderer process. Commands can be routed. 10084 // 10085 // (2) During further cef_browser_host_t navigation/loading of the main frame 10086 // and/or sub-frames: - cef_frame_handler_t::OnFrameCreated => A new main frame 10087 // or sub-frame object has 10088 // been created. Any commands will be queued until the frame is attached. 10089 // - cef_frame_handler_t::OnFrameAttached => A new main frame or sub-frame 10090 // object is 10091 // now connected to its peer in the renderer process. Commands can be routed. 10092 // - cef_frame_handler_t::OnFrameDetached => An existing main frame or sub-frame 10093 // object has lost its connection to the renderer process. If multiple objects 10094 // are detached at the same time then notifications will be sent for any 10095 // sub-frame objects before the main frame object. Commands can no longer be 10096 // routed and will be discarded. 10097 // - cef_frame_handler_t::OnMainFrameChanged => A new main frame object has been 10098 // assigned to the browser. This will only occur with cross-origin navigation 10099 // or re-navigation after renderer process termination (due to crashes, etc). 10100 // 10101 // (3) During final cef_browser_host_t destruction of the main frame: - 10102 // cef_frame_handler_t::OnFrameDetached => Any sub-frame objects have lost their 10103 // connection to the renderer process. Commands can no longer be routed and 10104 // will be discarded. 10105 // - cef_life_span_handler_t::OnBeforeClose => The browser has been destroyed. - 10106 // cef_frame_handler_t::OnFrameDetached => The main frame object have lost its 10107 // connection to the renderer process. Notifications will be sent for any 10108 // sub-frame objects before the main frame object. Commands can no longer be 10109 // routed and will be discarded. 10110 // - cef_frame_handler_t::OnMainFrameChanged => The final main frame object has 10111 // been 10112 // removed from the browser. 10113 // 10114 // Cross-origin navigation and/or loading receives special handling. 10115 // 10116 // When the main frame navigates to a different origin the OnMainFrameChanged 10117 // callback (2) will be executed with the old and new main frame objects. 10118 // 10119 // When a new sub-frame is loaded in, or an existing sub-frame is navigated to, 10120 // a different origin from the parent frame, a temporary sub-frame object will 10121 // first be created in the parent's renderer process. That temporary sub-frame 10122 // will then be discarded after the real cross-origin sub-frame is created in 10123 // the new/target renderer process. The client will receive cross-origin 10124 // navigation callbacks (2) for the transition from the temporary sub-frame to 10125 // the real sub-frame. The temporary sub-frame will not recieve or execute 10126 // commands during this transitional period (any sent commands will be 10127 // discarded). 10128 // 10129 // When a new popup browser is created in a different origin from the parent 10130 // browser, a temporary main frame object for the popup will first be created in 10131 // the parent's renderer process. That temporary main frame will then be 10132 // discarded after the real cross-origin main frame is created in the new/target 10133 // renderer process. The client will recieve creation and initial navigation 10134 // callbacks (1) for the temporary main frame, followed by cross-origin 10135 // navigation callbacks (2) for the transition from the temporary main frame to 10136 // the real main frame. The temporary main frame may receive and execute 10137 // commands during this transitional period (any sent commands may be executed, 10138 // but the behavior is potentially undesirable since they execute in the parent 10139 // browser's renderer process and not the new/target renderer process). 10140 // 10141 // Callbacks will not be executed for placeholders that may be created during 10142 // pre-commit navigation for sub-frames that do not yet exist in the renderer 10143 // process. Placeholders will have cef_frame_t::get_identifier() == -4. 10144 // 10145 // The functions of this structure will be called on the UI thread unless 10146 // otherwise indicated. 10147 /// 10148 struct cef_frame_handler_t 10149 { 10150 /// 10151 // Base structure. 10152 /// 10153 cef_base_ref_counted_t base; 10154 10155 /// 10156 // Called when a new frame is created. This will be the first notification 10157 // that references |frame|. Any commands that require transport to the 10158 // associated renderer process (LoadRequest, SendProcessMessage, GetSource, 10159 // etc.) will be queued until OnFrameAttached is called for |frame|. 10160 /// 10161 extern(System) void function ( 10162 cef_frame_handler_t* self, 10163 cef_browser_t* browser, 10164 cef_frame_t* frame) nothrow on_frame_created; 10165 10166 /// 10167 // Called when a frame can begin routing commands to/from the associated 10168 // renderer process. |reattached| will be true (1) if the frame was re- 10169 // attached after exiting the BackForwardCache. Any commands that were queued 10170 // have now been dispatched. 10171 /// 10172 extern(System) void function ( 10173 cef_frame_handler_t* self, 10174 cef_browser_t* browser, 10175 cef_frame_t* frame, 10176 int reattached) nothrow on_frame_attached; 10177 10178 /// 10179 // Called when a frame loses its connection to the renderer process and will 10180 // be destroyed. Any pending or future commands will be discarded and 10181 // cef_frame_t::is_valid() will now return false (0) for |frame|. If called 10182 // after cef_life_span_handler_t::on_before_close() during browser destruction 10183 // then cef_browser_t::is_valid() will return false (0) for |browser|. 10184 /// 10185 extern(System) void function ( 10186 cef_frame_handler_t* self, 10187 cef_browser_t* browser, 10188 cef_frame_t* frame) nothrow on_frame_detached; 10189 10190 /// 10191 // Called when the main frame changes due to (a) initial browser creation, (b) 10192 // final browser destruction, (c) cross-origin navigation or (d) re-navigation 10193 // after renderer process termination (due to crashes, etc). |old_frame| will 10194 // be NULL and |new_frame| will be non-NULL when a main frame is assigned to 10195 // |browser| for the first time. |old_frame| will be non-NULL and |new_frame| 10196 // will be NULL and when a main frame is removed from |browser| for the last 10197 // time. Both |old_frame| and |new_frame| will be non-NULL for cross-origin 10198 // navigations or re-navigation after renderer process termination. This 10199 // function will be called after on_frame_created() for |new_frame| and/or 10200 // after on_frame_detached() for |old_frame|. If called after 10201 // cef_life_span_handler_t::on_before_close() during browser destruction then 10202 // cef_browser_t::is_valid() will return false (0) for |browser|. 10203 /// 10204 extern(System) void function ( 10205 cef_frame_handler_t* self, 10206 cef_browser_t* browser, 10207 cef_frame_t* old_frame, 10208 cef_frame_t* new_frame) nothrow on_main_frame_changed; 10209 } 10210 10211 10212 10213 // CEF_INCLUDE_CAPI_CEF_FRAME_HANDLER_CAPI_H_ 10214 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 10215 // 10216 // Redistribution and use in source and binary forms, with or without 10217 // modification, are permitted provided that the following conditions are 10218 // met: 10219 // 10220 // * Redistributions of source code must retain the above copyright 10221 // notice, this list of conditions and the following disclaimer. 10222 // * Redistributions in binary form must reproduce the above 10223 // copyright notice, this list of conditions and the following disclaimer 10224 // in the documentation and/or other materials provided with the 10225 // distribution. 10226 // * Neither the name of Google Inc. nor the name Chromium Embedded 10227 // Framework nor the names of its contributors may be used to endorse 10228 // or promote products derived from this software without specific prior 10229 // written permission. 10230 // 10231 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10232 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10233 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10234 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10235 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10236 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10237 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10238 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10239 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10240 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10241 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10242 // 10243 // --------------------------------------------------------------------------- 10244 // 10245 // This file was generated by the CEF translator tool and should not edited 10246 // by hand. See the translator.README.txt file in the tools directory for 10247 // more information. 10248 // 10249 // $hash=bf890f7b8e8edd423d71ad5a4d5bd43d81f1eb01$ 10250 // 10251 10252 extern (C): 10253 10254 /// 10255 // Returns true (1) if the application text direction is right-to-left. 10256 /// 10257 int cef_is_rtl (); 10258 10259 // CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_ 10260 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 10261 // 10262 // Redistribution and use in source and binary forms, with or without 10263 // modification, are permitted provided that the following conditions are 10264 // met: 10265 // 10266 // * Redistributions of source code must retain the above copyright 10267 // notice, this list of conditions and the following disclaimer. 10268 // * Redistributions in binary form must reproduce the above 10269 // copyright notice, this list of conditions and the following disclaimer 10270 // in the documentation and/or other materials provided with the 10271 // distribution. 10272 // * Neither the name of Google Inc. nor the name Chromium Embedded 10273 // Framework nor the names of its contributors may be used to endorse 10274 // or promote products derived from this software without specific prior 10275 // written permission. 10276 // 10277 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10278 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10279 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10280 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10281 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10282 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10283 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10284 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10285 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10286 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10287 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10288 // 10289 // --------------------------------------------------------------------------- 10290 // 10291 // This file was generated by the CEF translator tool and should not edited 10292 // by hand. See the translator.README.txt file in the tools directory for 10293 // more information. 10294 // 10295 // $hash=d9da8862142742e780086714bbd4fb44ac95cf2c$ 10296 // 10297 10298 extern (C): 10299 10300 /// 10301 // Container for a single image represented at different scale factors. All 10302 // image representations should be the same size in density independent pixel 10303 // (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels 10304 // then the image at scale factor 2.0 should be 200x200 pixels -- both images 10305 // will display with a DIP size of 100x100 units. The functions of this 10306 // structure can be called on any browser process thread. 10307 /// 10308 struct cef_image_t 10309 { 10310 /// 10311 // Base structure. 10312 /// 10313 cef_base_ref_counted_t base; 10314 10315 /// 10316 // Returns true (1) if this Image is NULL. 10317 /// 10318 extern(System) int function (cef_image_t* self) nothrow is_empty; 10319 10320 /// 10321 // Returns true (1) if this Image and |that| Image share the same underlying 10322 // storage. Will also return true (1) if both images are NULL. 10323 /// 10324 extern(System) int function (cef_image_t* self, cef_image_t* that) nothrow is_same; 10325 10326 /// 10327 // Add a bitmap image representation for |scale_factor|. Only 32-bit RGBA/BGRA 10328 // formats are supported. |pixel_width| and |pixel_height| are the bitmap 10329 // representation size in pixel coordinates. |pixel_data| is the array of 10330 // pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in size. 10331 // |color_type| and |alpha_type| values specify the pixel format. 10332 /// 10333 extern(System) int function ( 10334 cef_image_t* self, 10335 float scale_factor, 10336 int pixel_width, 10337 int pixel_height, 10338 cef_color_type_t color_type, 10339 cef_alpha_type_t alpha_type, 10340 const(void)* pixel_data, 10341 size_t pixel_data_size) nothrow add_bitmap; 10342 10343 /// 10344 // Add a PNG image representation for |scale_factor|. |png_data| is the image 10345 // data of size |png_data_size|. Any alpha transparency in the PNG data will 10346 // be maintained. 10347 /// 10348 extern(System) int function ( 10349 cef_image_t* self, 10350 float scale_factor, 10351 const(void)* png_data, 10352 size_t png_data_size) nothrow add_png; 10353 10354 /// 10355 // Create a JPEG image representation for |scale_factor|. |jpeg_data| is the 10356 // image data of size |jpeg_data_size|. The JPEG format does not support 10357 // transparency so the alpha byte will be set to 0xFF for all pixels. 10358 /// 10359 extern(System) int function ( 10360 cef_image_t* self, 10361 float scale_factor, 10362 const(void)* jpeg_data, 10363 size_t jpeg_data_size) nothrow add_jpeg; 10364 10365 /// 10366 // Returns the image width in density independent pixel (DIP) units. 10367 /// 10368 extern(System) size_t function (cef_image_t* self) nothrow get_width; 10369 10370 /// 10371 // Returns the image height in density independent pixel (DIP) units. 10372 /// 10373 extern(System) size_t function (cef_image_t* self) nothrow get_height; 10374 10375 /// 10376 // Returns true (1) if this image contains a representation for 10377 // |scale_factor|. 10378 /// 10379 extern(System) int function (cef_image_t* self, float scale_factor) nothrow has_representation; 10380 10381 /// 10382 // Removes the representation for |scale_factor|. Returns true (1) on success. 10383 /// 10384 extern(System) int function ( 10385 cef_image_t* self, 10386 float scale_factor) nothrow remove_representation; 10387 10388 /// 10389 // Returns information for the representation that most closely matches 10390 // |scale_factor|. |actual_scale_factor| is the actual scale factor for the 10391 // representation. |pixel_width| and |pixel_height| are the representation 10392 // size in pixel coordinates. Returns true (1) on success. 10393 /// 10394 extern(System) int function ( 10395 cef_image_t* self, 10396 float scale_factor, 10397 float* actual_scale_factor, 10398 int* pixel_width, 10399 int* pixel_height) nothrow get_representation_info; 10400 10401 /// 10402 // Returns the bitmap representation that most closely matches |scale_factor|. 10403 // Only 32-bit RGBA/BGRA formats are supported. |color_type| and |alpha_type| 10404 // values specify the desired output pixel format. |pixel_width| and 10405 // |pixel_height| are the output representation size in pixel coordinates. 10406 // Returns a cef_binary_value_t containing the pixel data on success or NULL 10407 // on failure. 10408 /// 10409 extern(System) cef_binary_value_t* function ( 10410 cef_image_t* self, 10411 float scale_factor, 10412 cef_color_type_t color_type, 10413 cef_alpha_type_t alpha_type, 10414 int* pixel_width, 10415 int* pixel_height) nothrow get_as_bitmap; 10416 10417 /// 10418 // Returns the PNG representation that most closely matches |scale_factor|. If 10419 // |with_transparency| is true (1) any alpha transparency in the image will be 10420 // represented in the resulting PNG data. |pixel_width| and |pixel_height| are 10421 // the output representation size in pixel coordinates. Returns a 10422 // cef_binary_value_t containing the PNG image data on success or NULL on 10423 // failure. 10424 /// 10425 extern(System) cef_binary_value_t* function ( 10426 cef_image_t* self, 10427 float scale_factor, 10428 int with_transparency, 10429 int* pixel_width, 10430 int* pixel_height) nothrow get_as_png; 10431 10432 /// 10433 // Returns the JPEG representation that most closely matches |scale_factor|. 10434 // |quality| determines the compression level with 0 == lowest and 100 == 10435 // highest. The JPEG format does not support alpha transparency and the alpha 10436 // channel, if any, will be discarded. |pixel_width| and |pixel_height| are 10437 // the output representation size in pixel coordinates. Returns a 10438 // cef_binary_value_t containing the JPEG image data on success or NULL on 10439 // failure. 10440 /// 10441 extern(System) cef_binary_value_t* function ( 10442 cef_image_t* self, 10443 float scale_factor, 10444 int quality, 10445 int* pixel_width, 10446 int* pixel_height) nothrow get_as_jpeg; 10447 } 10448 10449 10450 10451 /// 10452 // Create a new cef_image_t. It will initially be NULL. Use the Add*() functions 10453 // to add representations at different scale factors. 10454 /// 10455 cef_image_t* cef_image_create (); 10456 10457 // CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_ 10458 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 10459 // 10460 // Redistribution and use in source and binary forms, with or without 10461 // modification, are permitted provided that the following conditions are 10462 // met: 10463 // 10464 // * Redistributions of source code must retain the above copyright 10465 // notice, this list of conditions and the following disclaimer. 10466 // * Redistributions in binary form must reproduce the above 10467 // copyright notice, this list of conditions and the following disclaimer 10468 // in the documentation and/or other materials provided with the 10469 // distribution. 10470 // * Neither the name of Google Inc. nor the name Chromium Embedded 10471 // Framework nor the names of its contributors may be used to endorse 10472 // or promote products derived from this software without specific prior 10473 // written permission. 10474 // 10475 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10476 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10477 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10478 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10479 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10480 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10481 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10482 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10483 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10484 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10485 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10486 // 10487 // --------------------------------------------------------------------------- 10488 // 10489 // This file was generated by the CEF translator tool and should not edited 10490 // by hand. See the translator.README.txt file in the tools directory for 10491 // more information. 10492 // 10493 // $hash=d991e2a7d1a58a013e4d3a963361fed6918f4ec3$ 10494 // 10495 10496 extern (C): 10497 10498 /// 10499 // Callback structure used for asynchronous continuation of JavaScript dialog 10500 // requests. 10501 /// 10502 struct cef_jsdialog_callback_t 10503 { 10504 /// 10505 // Base structure. 10506 /// 10507 cef_base_ref_counted_t base; 10508 10509 /// 10510 // Continue the JS dialog request. Set |success| to true (1) if the OK button 10511 // was pressed. The |user_input| value should be specified for prompt dialogs. 10512 /// 10513 extern(System) void function ( 10514 cef_jsdialog_callback_t* self, 10515 int success, 10516 const(cef_string_t)* user_input) nothrow cont; 10517 } 10518 10519 10520 10521 /// 10522 // Implement this structure to handle events related to JavaScript dialogs. The 10523 // functions of this structure will be called on the UI thread. 10524 /// 10525 struct cef_jsdialog_handler_t 10526 { 10527 /// 10528 // Base structure. 10529 /// 10530 cef_base_ref_counted_t base; 10531 10532 /// 10533 // Called to run a JavaScript dialog. If |origin_url| is non-NULL it can be 10534 // passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure 10535 // and user-friendly display string. The |default_prompt_text| value will be 10536 // specified for prompt dialogs only. Set |suppress_message| to true (1) and 10537 // return false (0) to suppress the message (suppressing messages is 10538 // preferable to immediately executing the callback as this is used to detect 10539 // presumably malicious behavior like spamming alert messages in 10540 // onbeforeunload). Set |suppress_message| to false (0) and return false (0) 10541 // to use the default implementation (the default implementation will show one 10542 // modal dialog at a time and suppress any additional dialog requests until 10543 // the displayed dialog is dismissed). Return true (1) if the application will 10544 // use a custom dialog or if the callback has been executed immediately. 10545 // Custom dialogs may be either modal or modeless. If a custom dialog is used 10546 // the application must execute |callback| once the custom dialog is 10547 // dismissed. 10548 /// 10549 extern(System) int function ( 10550 cef_jsdialog_handler_t* self, 10551 cef_browser_t* browser, 10552 const(cef_string_t)* origin_url, 10553 cef_jsdialog_type_t dialog_type, 10554 const(cef_string_t)* message_text, 10555 const(cef_string_t)* default_prompt_text, 10556 cef_jsdialog_callback_t* callback, 10557 int* suppress_message) nothrow on_jsdialog; 10558 10559 /// 10560 // Called to run a dialog asking the user if they want to leave a page. Return 10561 // false (0) to use the default dialog implementation. Return true (1) if the 10562 // application will use a custom dialog or if the callback has been executed 10563 // immediately. Custom dialogs may be either modal or modeless. If a custom 10564 // dialog is used the application must execute |callback| once the custom 10565 // dialog is dismissed. 10566 /// 10567 extern(System) int function ( 10568 cef_jsdialog_handler_t* self, 10569 cef_browser_t* browser, 10570 const(cef_string_t)* message_text, 10571 int is_reload, 10572 cef_jsdialog_callback_t* callback) nothrow on_before_unload_dialog; 10573 10574 /// 10575 // Called to cancel any pending dialogs and reset any saved dialog state. Will 10576 // be called due to events like page navigation irregardless of whether any 10577 // dialogs are currently pending. 10578 /// 10579 extern(System) void function ( 10580 cef_jsdialog_handler_t* self, 10581 cef_browser_t* browser) nothrow on_reset_dialog_state; 10582 10583 /// 10584 // Called when the default implementation dialog is closed. 10585 /// 10586 extern(System) void function ( 10587 cef_jsdialog_handler_t* self, 10588 cef_browser_t* browser) nothrow on_dialog_closed; 10589 } 10590 10591 10592 10593 // CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_ 10594 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 10595 // 10596 // Redistribution and use in source and binary forms, with or without 10597 // modification, are permitted provided that the following conditions are 10598 // met: 10599 // 10600 // * Redistributions of source code must retain the above copyright 10601 // notice, this list of conditions and the following disclaimer. 10602 // * Redistributions in binary form must reproduce the above 10603 // copyright notice, this list of conditions and the following disclaimer 10604 // in the documentation and/or other materials provided with the 10605 // distribution. 10606 // * Neither the name of Google Inc. nor the name Chromium Embedded 10607 // Framework nor the names of its contributors may be used to endorse 10608 // or promote products derived from this software without specific prior 10609 // written permission. 10610 // 10611 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10612 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10613 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10614 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10615 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10616 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10617 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10618 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10619 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10620 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10621 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10622 // 10623 // --------------------------------------------------------------------------- 10624 // 10625 // This file was generated by the CEF translator tool and should not edited 10626 // by hand. See the translator.README.txt file in the tools directory for 10627 // more information. 10628 // 10629 // $hash=d804a2db0f9ac13afd249407c85cb8d5852508ac$ 10630 // 10631 10632 extern (C): 10633 10634 /// 10635 // Implement this structure to handle events related to keyboard input. The 10636 // functions of this structure will be called on the UI thread. 10637 /// 10638 struct cef_keyboard_handler_t 10639 { 10640 /// 10641 // Base structure. 10642 /// 10643 cef_base_ref_counted_t base; 10644 10645 /// 10646 // Called before a keyboard event is sent to the renderer. |event| contains 10647 // information about the keyboard event. |os_event| is the operating system 10648 // event message, if any. Return true (1) if the event was handled or false 10649 // (0) otherwise. If the event will be handled in on_key_event() as a keyboard 10650 // shortcut set |is_keyboard_shortcut| to true (1) and return false (0). 10651 /// 10652 extern(System) int function ( 10653 cef_keyboard_handler_t* self, 10654 cef_browser_t* browser, 10655 const(cef_key_event_t)* event, 10656 XEvent* os_event, 10657 int* is_keyboard_shortcut) nothrow on_pre_key_event; 10658 10659 /// 10660 // Called after the renderer and JavaScript in the page has had a chance to 10661 // handle the event. |event| contains information about the keyboard event. 10662 // |os_event| is the operating system event message, if any. Return true (1) 10663 // if the keyboard event was handled or false (0) otherwise. 10664 /// 10665 extern(System) int function ( 10666 cef_keyboard_handler_t* self, 10667 cef_browser_t* browser, 10668 const(cef_key_event_t)* event, 10669 XEvent* os_event) nothrow on_key_event; 10670 } 10671 10672 10673 10674 // CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_ 10675 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 10676 // 10677 // Redistribution and use in source and binary forms, with or without 10678 // modification, are permitted provided that the following conditions are 10679 // met: 10680 // 10681 // * Redistributions of source code must retain the above copyright 10682 // notice, this list of conditions and the following disclaimer. 10683 // * Redistributions in binary form must reproduce the above 10684 // copyright notice, this list of conditions and the following disclaimer 10685 // in the documentation and/or other materials provided with the 10686 // distribution. 10687 // * Neither the name of Google Inc. nor the name Chromium Embedded 10688 // Framework nor the names of its contributors may be used to endorse 10689 // or promote products derived from this software without specific prior 10690 // written permission. 10691 // 10692 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10693 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10694 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10695 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10696 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10697 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10698 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10699 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10700 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10701 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10702 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10703 // 10704 // --------------------------------------------------------------------------- 10705 // 10706 // This file was generated by the CEF translator tool and should not edited 10707 // by hand. See the translator.README.txt file in the tools directory for 10708 // more information. 10709 // 10710 // $hash=e44bb89a337942c82bfa246275b4b033821b2782$ 10711 // 10712 10713 extern (C): 10714 10715 10716 10717 /// 10718 // Implement this structure to handle events related to browser life span. The 10719 // functions of this structure will be called on the UI thread unless otherwise 10720 // indicated. 10721 /// 10722 struct cef_life_span_handler_t 10723 { 10724 /// 10725 // Base structure. 10726 /// 10727 cef_base_ref_counted_t base; 10728 10729 /// 10730 // Called on the UI thread before a new popup browser is created. The 10731 // |browser| and |frame| values represent the source of the popup request. The 10732 // |target_url| and |target_frame_name| values indicate where the popup 10733 // browser should navigate and may be NULL if not specified with the request. 10734 // The |target_disposition| value indicates where the user intended to open 10735 // the popup (e.g. current tab, new tab, etc). The |user_gesture| value will 10736 // be true (1) if the popup was opened via explicit user gesture (e.g. 10737 // clicking a link) or false (0) if the popup opened automatically (e.g. via 10738 // the DomContentLoaded event). The |popupFeatures| structure contains 10739 // additional information about the requested popup window. To allow creation 10740 // of the popup browser optionally modify |windowInfo|, |client|, |settings| 10741 // and |no_javascript_access| and return false (0). To cancel creation of the 10742 // popup browser return true (1). The |client| and |settings| values will 10743 // default to the source browser's values. If the |no_javascript_access| value 10744 // is set to false (0) the new browser will not be scriptable and may not be 10745 // hosted in the same renderer process as the source browser. Any 10746 // modifications to |windowInfo| will be ignored if the parent browser is 10747 // wrapped in a cef_browser_view_t. Popup browser creation will be canceled if 10748 // the parent browser is destroyed before the popup browser creation completes 10749 // (indicated by a call to OnAfterCreated for the popup browser). The 10750 // |extra_info| parameter provides an opportunity to specify extra information 10751 // specific to the created popup browser that will be passed to 10752 // cef_render_process_handler_t::on_browser_created() in the render process. 10753 /// 10754 extern(System) int function ( 10755 cef_life_span_handler_t* self, 10756 cef_browser_t* browser, 10757 cef_frame_t* frame, 10758 const(cef_string_t)* target_url, 10759 const(cef_string_t)* target_frame_name, 10760 cef_window_open_disposition_t target_disposition, 10761 int user_gesture, 10762 const(cef_popup_features_t)* popupFeatures, 10763 cef_window_info_t* windowInfo, 10764 cef_client_t** client, 10765 cef_browser_settings_t* settings, 10766 cef_dictionary_value_t** extra_info, 10767 int* no_javascript_access) nothrow on_before_popup; 10768 10769 /// 10770 // Called after a new browser is created. It is now safe to begin performing 10771 // actions with |browser|. cef_frame_handler_t callbacks related to initial 10772 // main frame creation will arrive before this callback. See 10773 // cef_frame_handler_t documentation for additional usage information. 10774 /// 10775 extern(System) void function ( 10776 cef_life_span_handler_t* self, 10777 cef_browser_t* browser) nothrow on_after_created; 10778 10779 /// 10780 // Called when a browser has recieved a request to close. This may result 10781 // directly from a call to cef_browser_host_t::*close_browser() or indirectly 10782 // if the browser is parented to a top-level window created by CEF and the 10783 // user attempts to close that window (by clicking the 'X', for example). The 10784 // do_close() function will be called after the JavaScript 'onunload' event 10785 // has been fired. 10786 // 10787 // An application should handle top-level owner window close notifications by 10788 // calling cef_browser_host_t::try_close_browser() or 10789 // cef_browser_host_t::CloseBrowser(false (0)) instead of allowing the window 10790 // to close immediately (see the examples below). This gives CEF an 10791 // opportunity to process the 'onbeforeunload' event and optionally cancel the 10792 // close before do_close() is called. 10793 // 10794 // When windowed rendering is enabled CEF will internally create a window or 10795 // view to host the browser. In that case returning false (0) from do_close() 10796 // will send the standard close notification to the browser's top-level owner 10797 // window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on 10798 // Linux or cef_window_delegate_t::can_close() callback from Views). If the 10799 // browser's host window/view has already been destroyed (via view hierarchy 10800 // tear-down, for example) then do_close() will not be called for that browser 10801 // since is no longer possible to cancel the close. 10802 // 10803 // When windowed rendering is disabled returning false (0) from do_close() 10804 // will cause the browser object to be destroyed immediately. 10805 // 10806 // If the browser's top-level owner window requires a non-standard close 10807 // notification then send that notification from do_close() and return true 10808 // (1). 10809 // 10810 // The cef_life_span_handler_t::on_before_close() function will be called 10811 // after do_close() (if do_close() is called) and immediately before the 10812 // browser object is destroyed. The application should only exit after 10813 // on_before_close() has been called for all existing browsers. 10814 // 10815 // The below examples describe what should happen during window close when the 10816 // browser is parented to an application-provided top-level window. 10817 // 10818 // Example 1: Using cef_browser_host_t::try_close_browser(). This is 10819 // recommended for clients using standard close handling and windows created 10820 // on the browser process UI thread. 1. User clicks the window close button 10821 // which sends a close notification to 10822 // the application's top-level window. 10823 // 2. Application's top-level window receives the close notification and 10824 // calls TryCloseBrowser() (which internally calls CloseBrowser(false)). 10825 // TryCloseBrowser() returns false so the client cancels the window close. 10826 // 3. JavaScript 'onbeforeunload' handler executes and shows the close 10827 // confirmation dialog (which can be overridden via 10828 // CefJSDialogHandler::OnBeforeUnloadDialog()). 10829 // 4. User approves the close. 5. JavaScript 'onunload' handler executes. 6. 10830 // CEF sends a close notification to the application's top-level window 10831 // (because DoClose() returned false by default). 10832 // 7. Application's top-level window receives the close notification and 10833 // calls TryCloseBrowser(). TryCloseBrowser() returns true so the client 10834 // allows the window close. 10835 // 8. Application's top-level window is destroyed. 9. Application's 10836 // on_before_close() handler is called and the browser object 10837 // is destroyed. 10838 // 10. Application exits by calling cef_quit_message_loop() if no other 10839 // browsers 10840 // exist. 10841 // 10842 // Example 2: Using cef_browser_host_t::CloseBrowser(false (0)) and 10843 // implementing the do_close() callback. This is recommended for clients using 10844 // non-standard close handling or windows that were not created on the browser 10845 // process UI thread. 1. User clicks the window close button which sends a 10846 // close notification to 10847 // the application's top-level window. 10848 // 2. Application's top-level window receives the close notification and: 10849 // A. Calls CefBrowserHost::CloseBrowser(false). 10850 // B. Cancels the window close. 10851 // 3. JavaScript 'onbeforeunload' handler executes and shows the close 10852 // confirmation dialog (which can be overridden via 10853 // CefJSDialogHandler::OnBeforeUnloadDialog()). 10854 // 4. User approves the close. 5. JavaScript 'onunload' handler executes. 6. 10855 // Application's do_close() handler is called. Application will: 10856 // A. Set a flag to indicate that the next close attempt will be allowed. 10857 // B. Return false. 10858 // 7. CEF sends an close notification to the application's top-level window. 10859 // 8. Application's top-level window receives the close notification and 10860 // allows the window to close based on the flag from #6B. 10861 // 9. Application's top-level window is destroyed. 10. Application's 10862 // on_before_close() handler is called and the browser object 10863 // is destroyed. 10864 // 11. Application exits by calling cef_quit_message_loop() if no other 10865 // browsers 10866 // exist. 10867 /// 10868 extern(System) int function ( 10869 cef_life_span_handler_t* self, 10870 cef_browser_t* browser) nothrow do_close; 10871 10872 /// 10873 // Called just before a browser is destroyed. Release all references to the 10874 // browser object and do not attempt to execute any functions on the browser 10875 // object (other than IsValid, GetIdentifier or IsSame) after this callback 10876 // returns. cef_frame_handler_t callbacks related to final main frame 10877 // destruction will arrive after this callback and cef_browser_t::IsValid will 10878 // return false (0) at that time. Any in-progress network requests associated 10879 // with |browser| will be aborted when the browser is destroyed, and 10880 // cef_resource_request_handler_t callbacks related to those requests may 10881 // still arrive on the IO thread after this callback. See cef_frame_handler_t 10882 // and do_close() documentation for additional usage information. 10883 /// 10884 extern(System) void function ( 10885 cef_life_span_handler_t* self, 10886 cef_browser_t* browser) nothrow on_before_close; 10887 } 10888 10889 10890 10891 // CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_ 10892 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 10893 // 10894 // Redistribution and use in source and binary forms, with or without 10895 // modification, are permitted provided that the following conditions are 10896 // met: 10897 // 10898 // * Redistributions of source code must retain the above copyright 10899 // notice, this list of conditions and the following disclaimer. 10900 // * Redistributions in binary form must reproduce the above 10901 // copyright notice, this list of conditions and the following disclaimer 10902 // in the documentation and/or other materials provided with the 10903 // distribution. 10904 // * Neither the name of Google Inc. nor the name Chromium Embedded 10905 // Framework nor the names of its contributors may be used to endorse 10906 // or promote products derived from this software without specific prior 10907 // written permission. 10908 // 10909 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10910 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10911 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10912 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10913 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10914 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10915 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10916 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10917 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10918 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10919 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10920 // 10921 // --------------------------------------------------------------------------- 10922 // 10923 // This file was generated by the CEF translator tool and should not edited 10924 // by hand. See the translator.README.txt file in the tools directory for 10925 // more information. 10926 // 10927 // $hash=6c6a719d7cbbc01adfdc9bbe0dff6da10e06e3f3$ 10928 // 10929 10930 extern (C): 10931 10932 /// 10933 // Implement this structure to handle events related to browser load status. The 10934 // functions of this structure will be called on the browser process UI thread 10935 // or render process main thread (TID_RENDERER). 10936 /// 10937 struct cef_load_handler_t 10938 { 10939 /// 10940 // Base structure. 10941 /// 10942 cef_base_ref_counted_t base; 10943 10944 /// 10945 // Called when the loading state has changed. This callback will be executed 10946 // twice -- once when loading is initiated either programmatically or by user 10947 // action, and once when loading is terminated due to completion, cancellation 10948 // of failure. It will be called before any calls to OnLoadStart and after all 10949 // calls to OnLoadError and/or OnLoadEnd. 10950 /// 10951 extern(System) void function ( 10952 cef_load_handler_t* self, 10953 cef_browser_t* browser, 10954 int isLoading, 10955 int canGoBack, 10956 int canGoForward) nothrow on_loading_state_change; 10957 10958 /// 10959 // Called after a navigation has been committed and before the browser begins 10960 // loading contents in the frame. The |frame| value will never be NULL -- call 10961 // the is_main() function to check if this frame is the main frame. 10962 // |transition_type| provides information about the source of the navigation 10963 // and an accurate value is only available in the browser process. Multiple 10964 // frames may be loading at the same time. Sub-frames may start or continue 10965 // loading after the main frame load has ended. This function will not be 10966 // called for same page navigations (fragments, history state, etc.) or for 10967 // navigations that fail or are canceled before commit. For notification of 10968 // overall browser load status use OnLoadingStateChange instead. 10969 /// 10970 extern(System) void function ( 10971 cef_load_handler_t* self, 10972 cef_browser_t* browser, 10973 cef_frame_t* frame, 10974 cef_transition_type_t transition_type) nothrow on_load_start; 10975 10976 /// 10977 // Called when the browser is done loading a frame. The |frame| value will 10978 // never be NULL -- call the is_main() function to check if this frame is the 10979 // main frame. Multiple frames may be loading at the same time. Sub-frames may 10980 // start or continue loading after the main frame load has ended. This 10981 // function will not be called for same page navigations (fragments, history 10982 // state, etc.) or for navigations that fail or are canceled before commit. 10983 // For notification of overall browser load status use OnLoadingStateChange 10984 // instead. 10985 /// 10986 extern(System) void function ( 10987 cef_load_handler_t* self, 10988 cef_browser_t* browser, 10989 cef_frame_t* frame, 10990 int httpStatusCode) nothrow on_load_end; 10991 10992 /// 10993 // Called when a navigation fails or is canceled. This function may be called 10994 // by itself if before commit or in combination with OnLoadStart/OnLoadEnd if 10995 // after commit. |errorCode| is the error code number, |errorText| is the 10996 // error text and |failedUrl| is the URL that failed to load. See 10997 // net\base\net_error_list.h for complete descriptions of the error codes. 10998 /// 10999 extern(System) void function ( 11000 cef_load_handler_t* self, 11001 cef_browser_t* browser, 11002 cef_frame_t* frame, 11003 cef_errorcode_t errorCode, 11004 const(cef_string_t)* errorText, 11005 const(cef_string_t)* failedUrl) nothrow on_load_error; 11006 } 11007 11008 11009 11010 // CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_ 11011 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 11012 // 11013 // Redistribution and use in source and binary forms, with or without 11014 // modification, are permitted provided that the following conditions are 11015 // met: 11016 // 11017 // * Redistributions of source code must retain the above copyright 11018 // notice, this list of conditions and the following disclaimer. 11019 // * Redistributions in binary form must reproduce the above 11020 // copyright notice, this list of conditions and the following disclaimer 11021 // in the documentation and/or other materials provided with the 11022 // distribution. 11023 // * Neither the name of Google Inc. nor the name Chromium Embedded 11024 // Framework nor the names of its contributors may be used to endorse 11025 // or promote products derived from this software without specific prior 11026 // written permission. 11027 // 11028 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11029 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11030 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11031 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11032 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11033 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11034 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11035 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11036 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11037 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11038 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11039 // 11040 // --------------------------------------------------------------------------- 11041 // 11042 // This file was generated by the CEF translator tool and should not edited 11043 // by hand. See the translator.README.txt file in the tools directory for 11044 // more information. 11045 // 11046 // $hash=79e4e38c732c0cfeef495c8a9726e105054012bb$ 11047 // 11048 11049 extern (C): 11050 11051 /// 11052 // Supports discovery of and communication with media devices on the local 11053 // network via the Cast and DIAL protocols. The functions of this structure may 11054 // be called on any browser process thread unless otherwise indicated. 11055 /// 11056 struct cef_media_router_t 11057 { 11058 /// 11059 // Base structure. 11060 /// 11061 cef_base_ref_counted_t base; 11062 11063 /// 11064 // Add an observer for MediaRouter events. The observer will remain registered 11065 // until the returned Registration object is destroyed. 11066 /// 11067 extern(System) cef_registration_t* function ( 11068 cef_media_router_t* self, 11069 cef_media_observer_t* observer) nothrow add_observer; 11070 11071 /// 11072 // Returns a MediaSource object for the specified media source URN. Supported 11073 // URN schemes include "cast:" and "dial:", and will be already known by the 11074 // client application (e.g. "cast:<appId>?clientId=<clientId>"). 11075 /// 11076 extern(System) cef_media_source_t* function ( 11077 cef_media_router_t* self, 11078 const(cef_string_t)* urn) nothrow get_source; 11079 11080 /// 11081 // Trigger an asynchronous call to cef_media_observer_t::OnSinks on all 11082 // registered observers. 11083 /// 11084 extern(System) void function (cef_media_router_t* self) nothrow notify_current_sinks; 11085 11086 /// 11087 // Create a new route between |source| and |sink|. Source and sink must be 11088 // valid, compatible (as reported by cef_media_sink_t::IsCompatibleWith), and 11089 // a route between them must not already exist. |callback| will be executed on 11090 // success or failure. If route creation succeeds it will also trigger an 11091 // asynchronous call to cef_media_observer_t::OnRoutes on all registered 11092 // observers. 11093 /// 11094 extern(System) void function ( 11095 cef_media_router_t* self, 11096 cef_media_source_t* source, 11097 cef_media_sink_t* sink, 11098 cef_media_route_create_callback_t* callback) nothrow create_route; 11099 11100 /// 11101 // Trigger an asynchronous call to cef_media_observer_t::OnRoutes on all 11102 // registered observers. 11103 /// 11104 extern(System) void function (cef_media_router_t* self) nothrow notify_current_routes; 11105 } 11106 11107 11108 11109 /// 11110 // Returns the MediaRouter object associated with the global request context. If 11111 // |callback| is non-NULL it will be executed asnychronously on the UI thread 11112 // after the manager's storage has been initialized. Equivalent to calling cef_r 11113 // equest_context_t::cef_request_context_get_global_context()->get_media_router( 11114 // ). 11115 /// 11116 cef_media_router_t* cef_media_router_get_global ( 11117 cef_completion_callback_t* callback); 11118 11119 /// 11120 // Implemented by the client to observe MediaRouter events and registered via 11121 // cef_media_router_t::AddObserver. The functions of this structure will be 11122 // called on the browser process UI thread. 11123 /// 11124 struct cef_media_observer_t 11125 { 11126 /// 11127 // Base structure. 11128 /// 11129 cef_base_ref_counted_t base; 11130 11131 /// 11132 // The list of available media sinks has changed or 11133 // cef_media_router_t::NotifyCurrentSinks was called. 11134 /// 11135 extern(System) void function ( 11136 cef_media_observer_t* self, 11137 size_t sinksCount, 11138 cef_media_sink_t** sinks) nothrow on_sinks; 11139 11140 /// 11141 // The list of available media routes has changed or 11142 // cef_media_router_t::NotifyCurrentRoutes was called. 11143 /// 11144 extern(System) void function ( 11145 cef_media_observer_t* self, 11146 size_t routesCount, 11147 cef_media_route_t** routes) nothrow on_routes; 11148 11149 /// 11150 // The connection state of |route| has changed. 11151 /// 11152 extern(System) void function ( 11153 cef_media_observer_t* self, 11154 cef_media_route_t* route, 11155 cef_media_route_connection_state_t state) nothrow on_route_state_changed; 11156 11157 /// 11158 // A message was recieved over |route|. |message| is only valid for the scope 11159 // of this callback and should be copied if necessary. 11160 /// 11161 extern(System) void function ( 11162 cef_media_observer_t* self, 11163 cef_media_route_t* route, 11164 const(void)* message, 11165 size_t message_size) nothrow on_route_message_received; 11166 } 11167 11168 11169 11170 /// 11171 // Represents the route between a media source and sink. Instances of this 11172 // object are created via cef_media_router_t::CreateRoute and retrieved via 11173 // cef_media_observer_t::OnRoutes. Contains the status and metadata of a routing 11174 // operation. The functions of this structure may be called on any browser 11175 // process thread unless otherwise indicated. 11176 /// 11177 struct cef_media_route_t 11178 { 11179 /// 11180 // Base structure. 11181 /// 11182 cef_base_ref_counted_t base; 11183 11184 /// 11185 // Returns the ID for this route. 11186 /// 11187 // The resulting string must be freed by calling cef_string_userfree_free(). 11188 extern(System) cef_string_userfree_t function (cef_media_route_t* self) nothrow get_id; 11189 11190 /// 11191 // Returns the source associated with this route. 11192 /// 11193 extern(System) cef_media_source_t* function (cef_media_route_t* self) nothrow get_source; 11194 11195 /// 11196 // Returns the sink associated with this route. 11197 /// 11198 extern(System) cef_media_sink_t* function (cef_media_route_t* self) nothrow get_sink; 11199 11200 /// 11201 // Send a message over this route. |message| will be copied if necessary. 11202 /// 11203 extern(System) void function ( 11204 cef_media_route_t* self, 11205 const(void)* message, 11206 size_t message_size) nothrow send_route_message; 11207 11208 /// 11209 // Terminate this route. Will result in an asynchronous call to 11210 // cef_media_observer_t::OnRoutes on all registered observers. 11211 /// 11212 extern(System) void function (cef_media_route_t* self) nothrow terminate; 11213 } 11214 11215 11216 11217 /// 11218 // Callback structure for cef_media_router_t::CreateRoute. The functions of this 11219 // structure will be called on the browser process UI thread. 11220 /// 11221 struct cef_media_route_create_callback_t 11222 { 11223 /// 11224 // Base structure. 11225 /// 11226 cef_base_ref_counted_t base; 11227 11228 /// 11229 // Method that will be executed when the route creation has finished. |result| 11230 // will be CEF_MRCR_OK if the route creation succeeded. |error| will be a 11231 // description of the error if the route creation failed. |route| is the 11232 // resulting route, or NULL if the route creation failed. 11233 /// 11234 extern(System) void function ( 11235 cef_media_route_create_callback_t* self, 11236 cef_media_route_create_result_t result, 11237 const(cef_string_t)* error, 11238 cef_media_route_t* route) nothrow on_media_route_create_finished; 11239 } 11240 11241 11242 11243 /// 11244 // Represents a sink to which media can be routed. Instances of this object are 11245 // retrieved via cef_media_observer_t::OnSinks. The functions of this structure 11246 // may be called on any browser process thread unless otherwise indicated. 11247 /// 11248 struct cef_media_sink_t 11249 { 11250 /// 11251 // Base structure. 11252 /// 11253 cef_base_ref_counted_t base; 11254 11255 /// 11256 // Returns the ID for this sink. 11257 /// 11258 // The resulting string must be freed by calling cef_string_userfree_free(). 11259 extern(System) cef_string_userfree_t function (cef_media_sink_t* self) nothrow get_id; 11260 11261 /// 11262 // Returns the name of this sink. 11263 /// 11264 // The resulting string must be freed by calling cef_string_userfree_free(). 11265 extern(System) cef_string_userfree_t function (cef_media_sink_t* self) nothrow get_name; 11266 11267 /// 11268 // Returns the description of this sink. 11269 /// 11270 // The resulting string must be freed by calling cef_string_userfree_free(). 11271 extern(System) cef_string_userfree_t function (cef_media_sink_t* self) nothrow get_description; 11272 11273 /// 11274 // Returns the icon type for this sink. 11275 /// 11276 extern(System) cef_media_sink_icon_type_t function ( 11277 cef_media_sink_t* self) nothrow get_icon_type; 11278 11279 /// 11280 // Asynchronously retrieves device info. 11281 /// 11282 extern(System) void function ( 11283 cef_media_sink_t* self, 11284 cef_media_sink_device_info_callback_t* callback) nothrow get_device_info; 11285 11286 /// 11287 // Returns true (1) if this sink accepts content via Cast. 11288 /// 11289 extern(System) int function (cef_media_sink_t* self) nothrow is_cast_sink; 11290 11291 /// 11292 // Returns true (1) if this sink accepts content via DIAL. 11293 /// 11294 extern(System) int function (cef_media_sink_t* self) nothrow is_dial_sink; 11295 11296 /// 11297 // Returns true (1) if this sink is compatible with |source|. 11298 /// 11299 extern(System) int function ( 11300 cef_media_sink_t* self, 11301 cef_media_source_t* source) nothrow is_compatible_with; 11302 } 11303 11304 11305 11306 /// 11307 // Callback structure for cef_media_sink_t::GetDeviceInfo. The functions of this 11308 // structure will be called on the browser process UI thread. 11309 /// 11310 struct cef_media_sink_device_info_callback_t 11311 { 11312 /// 11313 // Base structure. 11314 /// 11315 cef_base_ref_counted_t base; 11316 11317 /// 11318 // Method that will be executed asyncronously once device information has been 11319 // retrieved. 11320 /// 11321 extern(System) void function ( 11322 cef_media_sink_device_info_callback_t* self, 11323 const(cef_media_sink_device_info_t)* device_info) nothrow on_media_sink_device_info; 11324 } 11325 11326 11327 11328 /// 11329 // Represents a source from which media can be routed. Instances of this object 11330 // are retrieved via cef_media_router_t::GetSource. The functions of this 11331 // structure may be called on any browser process thread unless otherwise 11332 // indicated. 11333 /// 11334 struct cef_media_source_t 11335 { 11336 /// 11337 // Base structure. 11338 /// 11339 cef_base_ref_counted_t base; 11340 11341 /// 11342 // Returns the ID (media source URN or URL) for this source. 11343 /// 11344 // The resulting string must be freed by calling cef_string_userfree_free(). 11345 extern(System) cef_string_userfree_t function (cef_media_source_t* self) nothrow get_id; 11346 11347 /// 11348 // Returns true (1) if this source outputs its content via Cast. 11349 /// 11350 extern(System) int function (cef_media_source_t* self) nothrow is_cast_source; 11351 11352 /// 11353 // Returns true (1) if this source outputs its content via DIAL. 11354 /// 11355 extern(System) int function (cef_media_source_t* self) nothrow is_dial_source; 11356 } 11357 11358 11359 11360 // CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_ 11361 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 11362 // 11363 // Redistribution and use in source and binary forms, with or without 11364 // modification, are permitted provided that the following conditions are 11365 // met: 11366 // 11367 // * Redistributions of source code must retain the above copyright 11368 // notice, this list of conditions and the following disclaimer. 11369 // * Redistributions in binary form must reproduce the above 11370 // copyright notice, this list of conditions and the following disclaimer 11371 // in the documentation and/or other materials provided with the 11372 // distribution. 11373 // * Neither the name of Google Inc. nor the name Chromium Embedded 11374 // Framework nor the names of its contributors may be used to endorse 11375 // or promote products derived from this software without specific prior 11376 // written permission. 11377 // 11378 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11379 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11380 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11381 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11382 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11383 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11384 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11385 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11386 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11387 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11388 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11389 // 11390 // --------------------------------------------------------------------------- 11391 // 11392 // This file was generated by the CEF translator tool and should not edited 11393 // by hand. See the translator.README.txt file in the tools directory for 11394 // more information. 11395 // 11396 // $hash=28fa978051bd3ddff69d58e0dc8f445f64a61480$ 11397 // 11398 11399 extern (C): 11400 11401 /// 11402 // Supports creation and modification of menus. See cef_menu_id_t for the 11403 // command ids that have default implementations. All user-defined command ids 11404 // should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of 11405 // this structure can only be accessed on the browser process the UI thread. 11406 /// 11407 struct cef_menu_model_t 11408 { 11409 /// 11410 // Base structure. 11411 /// 11412 cef_base_ref_counted_t base; 11413 11414 /// 11415 // Returns true (1) if this menu is a submenu. 11416 /// 11417 extern(System) int function (cef_menu_model_t* self) nothrow is_sub_menu; 11418 11419 /// 11420 // Clears the menu. Returns true (1) on success. 11421 /// 11422 extern(System) int function (cef_menu_model_t* self) nothrow clear; 11423 11424 /// 11425 // Returns the number of items in this menu. 11426 /// 11427 extern(System) int function (cef_menu_model_t* self) nothrow get_count; 11428 11429 /// 11430 // Add a separator to the menu. Returns true (1) on success. 11431 /// 11432 extern(System) int function (cef_menu_model_t* self) nothrow add_separator; 11433 11434 /// 11435 // Add an item to the menu. Returns true (1) on success. 11436 /// 11437 extern(System) int function ( 11438 cef_menu_model_t* self, 11439 int command_id, 11440 const(cef_string_t)* label) nothrow add_item; 11441 11442 /// 11443 // Add a check item to the menu. Returns true (1) on success. 11444 /// 11445 extern(System) int function ( 11446 cef_menu_model_t* self, 11447 int command_id, 11448 const(cef_string_t)* label) nothrow add_check_item; 11449 11450 /// 11451 // Add a radio item to the menu. Only a single item with the specified 11452 // |group_id| can be checked at a time. Returns true (1) on success. 11453 /// 11454 extern(System) int function ( 11455 cef_menu_model_t* self, 11456 int command_id, 11457 const(cef_string_t)* label, 11458 int group_id) nothrow add_radio_item; 11459 11460 /// 11461 // Add a sub-menu to the menu. The new sub-menu is returned. 11462 /// 11463 extern(System) cef_menu_model_t* function ( 11464 cef_menu_model_t* self, 11465 int command_id, 11466 const(cef_string_t)* label) nothrow add_sub_menu; 11467 11468 /// 11469 // Insert a separator in the menu at the specified |index|. Returns true (1) 11470 // on success. 11471 /// 11472 extern(System) int function (cef_menu_model_t* self, int index) nothrow insert_separator_at; 11473 11474 /// 11475 // Insert an item in the menu at the specified |index|. Returns true (1) on 11476 // success. 11477 /// 11478 extern(System) int function ( 11479 cef_menu_model_t* self, 11480 int index, 11481 int command_id, 11482 const(cef_string_t)* label) nothrow insert_item_at; 11483 11484 /// 11485 // Insert a check item in the menu at the specified |index|. Returns true (1) 11486 // on success. 11487 /// 11488 extern(System) int function ( 11489 cef_menu_model_t* self, 11490 int index, 11491 int command_id, 11492 const(cef_string_t)* label) nothrow insert_check_item_at; 11493 11494 /// 11495 // Insert a radio item in the menu at the specified |index|. Only a single 11496 // item with the specified |group_id| can be checked at a time. Returns true 11497 // (1) on success. 11498 /// 11499 extern(System) int function ( 11500 cef_menu_model_t* self, 11501 int index, 11502 int command_id, 11503 const(cef_string_t)* label, 11504 int group_id) nothrow insert_radio_item_at; 11505 11506 /// 11507 // Insert a sub-menu in the menu at the specified |index|. The new sub-menu is 11508 // returned. 11509 /// 11510 extern(System) cef_menu_model_t* function ( 11511 cef_menu_model_t* self, 11512 int index, 11513 int command_id, 11514 const(cef_string_t)* label) nothrow insert_sub_menu_at; 11515 11516 /// 11517 // Removes the item with the specified |command_id|. Returns true (1) on 11518 // success. 11519 /// 11520 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow remove; 11521 11522 /// 11523 // Removes the item at the specified |index|. Returns true (1) on success. 11524 /// 11525 extern(System) int function (cef_menu_model_t* self, int index) nothrow remove_at; 11526 11527 /// 11528 // Returns the index associated with the specified |command_id| or -1 if not 11529 // found due to the command id not existing in the menu. 11530 /// 11531 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow get_index_of; 11532 11533 /// 11534 // Returns the command id at the specified |index| or -1 if not found due to 11535 // invalid range or the index being a separator. 11536 /// 11537 extern(System) int function (cef_menu_model_t* self, int index) nothrow get_command_id_at; 11538 11539 /// 11540 // Sets the command id at the specified |index|. Returns true (1) on success. 11541 /// 11542 extern(System) int function ( 11543 cef_menu_model_t* self, 11544 int index, 11545 int command_id) nothrow set_command_id_at; 11546 11547 /// 11548 // Returns the label for the specified |command_id| or NULL if not found. 11549 /// 11550 // The resulting string must be freed by calling cef_string_userfree_free(). 11551 extern(System) cef_string_userfree_t function ( 11552 cef_menu_model_t* self, 11553 int command_id) nothrow get_label; 11554 11555 /// 11556 // Returns the label at the specified |index| or NULL if not found due to 11557 // invalid range or the index being a separator. 11558 /// 11559 // The resulting string must be freed by calling cef_string_userfree_free(). 11560 extern(System) cef_string_userfree_t function ( 11561 cef_menu_model_t* self, 11562 int index) nothrow get_label_at; 11563 11564 /// 11565 // Sets the label for the specified |command_id|. Returns true (1) on success. 11566 /// 11567 extern(System) int function ( 11568 cef_menu_model_t* self, 11569 int command_id, 11570 const(cef_string_t)* label) nothrow set_label; 11571 11572 /// 11573 // Set the label at the specified |index|. Returns true (1) on success. 11574 /// 11575 extern(System) int function ( 11576 cef_menu_model_t* self, 11577 int index, 11578 const(cef_string_t)* label) nothrow set_label_at; 11579 11580 /// 11581 // Returns the item type for the specified |command_id|. 11582 /// 11583 extern(System) cef_menu_item_type_t function ( 11584 cef_menu_model_t* self, 11585 int command_id) nothrow get_type; 11586 11587 /// 11588 // Returns the item type at the specified |index|. 11589 /// 11590 extern(System) cef_menu_item_type_t function ( 11591 cef_menu_model_t* self, 11592 int index) nothrow get_type_at; 11593 11594 /// 11595 // Returns the group id for the specified |command_id| or -1 if invalid. 11596 /// 11597 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow get_group_id; 11598 11599 /// 11600 // Returns the group id at the specified |index| or -1 if invalid. 11601 /// 11602 extern(System) int function (cef_menu_model_t* self, int index) nothrow get_group_id_at; 11603 11604 /// 11605 // Sets the group id for the specified |command_id|. Returns true (1) on 11606 // success. 11607 /// 11608 extern(System) int function ( 11609 cef_menu_model_t* self, 11610 int command_id, 11611 int group_id) nothrow set_group_id; 11612 11613 /// 11614 // Sets the group id at the specified |index|. Returns true (1) on success. 11615 /// 11616 extern(System) int function ( 11617 cef_menu_model_t* self, 11618 int index, 11619 int group_id) nothrow set_group_id_at; 11620 11621 /// 11622 // Returns the submenu for the specified |command_id| or NULL if invalid. 11623 /// 11624 extern(System) cef_menu_model_t* function ( 11625 cef_menu_model_t* self, 11626 int command_id) nothrow get_sub_menu; 11627 11628 /// 11629 // Returns the submenu at the specified |index| or NULL if invalid. 11630 /// 11631 extern(System) cef_menu_model_t* function ( 11632 cef_menu_model_t* self, 11633 int index) nothrow get_sub_menu_at; 11634 11635 /// 11636 // Returns true (1) if the specified |command_id| is visible. 11637 /// 11638 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_visible; 11639 11640 /// 11641 // Returns true (1) if the specified |index| is visible. 11642 /// 11643 extern(System) int function (cef_menu_model_t* self, int index) nothrow is_visible_at; 11644 11645 /// 11646 // Change the visibility of the specified |command_id|. Returns true (1) on 11647 // success. 11648 /// 11649 extern(System) int function ( 11650 cef_menu_model_t* self, 11651 int command_id, 11652 int visible) nothrow set_visible; 11653 11654 /// 11655 // Change the visibility at the specified |index|. Returns true (1) on 11656 // success. 11657 /// 11658 extern(System) int function ( 11659 cef_menu_model_t* self, 11660 int index, 11661 int visible) nothrow set_visible_at; 11662 11663 /// 11664 // Returns true (1) if the specified |command_id| is enabled. 11665 /// 11666 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_enabled; 11667 11668 /// 11669 // Returns true (1) if the specified |index| is enabled. 11670 /// 11671 extern(System) int function (cef_menu_model_t* self, int index) nothrow is_enabled_at; 11672 11673 /// 11674 // Change the enabled status of the specified |command_id|. Returns true (1) 11675 // on success. 11676 /// 11677 extern(System) int function ( 11678 cef_menu_model_t* self, 11679 int command_id, 11680 int enabled) nothrow set_enabled; 11681 11682 /// 11683 // Change the enabled status at the specified |index|. Returns true (1) on 11684 // success. 11685 /// 11686 extern(System) int function ( 11687 cef_menu_model_t* self, 11688 int index, 11689 int enabled) nothrow set_enabled_at; 11690 11691 /// 11692 // Returns true (1) if the specified |command_id| is checked. Only applies to 11693 // check and radio items. 11694 /// 11695 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_checked; 11696 11697 /// 11698 // Returns true (1) if the specified |index| is checked. Only applies to check 11699 // and radio items. 11700 /// 11701 extern(System) int function (cef_menu_model_t* self, int index) nothrow is_checked_at; 11702 11703 /// 11704 // Check the specified |command_id|. Only applies to check and radio items. 11705 // Returns true (1) on success. 11706 /// 11707 extern(System) int function ( 11708 cef_menu_model_t* self, 11709 int command_id, 11710 int checked) nothrow set_checked; 11711 11712 /// 11713 // Check the specified |index|. Only applies to check and radio items. Returns 11714 // true (1) on success. 11715 /// 11716 extern(System) int function ( 11717 cef_menu_model_t* self, 11718 int index, 11719 int checked) nothrow set_checked_at; 11720 11721 /// 11722 // Returns true (1) if the specified |command_id| has a keyboard accelerator 11723 // assigned. 11724 /// 11725 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow has_accelerator; 11726 11727 /// 11728 // Returns true (1) if the specified |index| has a keyboard accelerator 11729 // assigned. 11730 /// 11731 extern(System) int function (cef_menu_model_t* self, int index) nothrow has_accelerator_at; 11732 11733 /// 11734 // Set the keyboard accelerator for the specified |command_id|. |key_code| can 11735 // be any virtual key or character value. Returns true (1) on success. 11736 /// 11737 extern(System) int function ( 11738 cef_menu_model_t* self, 11739 int command_id, 11740 int key_code, 11741 int shift_pressed, 11742 int ctrl_pressed, 11743 int alt_pressed) nothrow set_accelerator; 11744 11745 /// 11746 // Set the keyboard accelerator at the specified |index|. |key_code| can be 11747 // any virtual key or character value. Returns true (1) on success. 11748 /// 11749 extern(System) int function ( 11750 cef_menu_model_t* self, 11751 int index, 11752 int key_code, 11753 int shift_pressed, 11754 int ctrl_pressed, 11755 int alt_pressed) nothrow set_accelerator_at; 11756 11757 /// 11758 // Remove the keyboard accelerator for the specified |command_id|. Returns 11759 // true (1) on success. 11760 /// 11761 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow remove_accelerator; 11762 11763 /// 11764 // Remove the keyboard accelerator at the specified |index|. Returns true (1) 11765 // on success. 11766 /// 11767 extern(System) int function (cef_menu_model_t* self, int index) nothrow remove_accelerator_at; 11768 11769 /// 11770 // Retrieves the keyboard accelerator for the specified |command_id|. Returns 11771 // true (1) on success. 11772 /// 11773 extern(System) int function ( 11774 cef_menu_model_t* self, 11775 int command_id, 11776 int* key_code, 11777 int* shift_pressed, 11778 int* ctrl_pressed, 11779 int* alt_pressed) nothrow get_accelerator; 11780 11781 /// 11782 // Retrieves the keyboard accelerator for the specified |index|. Returns true 11783 // (1) on success. 11784 /// 11785 extern(System) int function ( 11786 cef_menu_model_t* self, 11787 int index, 11788 int* key_code, 11789 int* shift_pressed, 11790 int* ctrl_pressed, 11791 int* alt_pressed) nothrow get_accelerator_at; 11792 11793 /// 11794 // Set the explicit color for |command_id| and |color_type| to |color|. 11795 // Specify a |color| value of 0 to remove the explicit color. If no explicit 11796 // color or default color is set for |color_type| then the system color will 11797 // be used. Returns true (1) on success. 11798 /// 11799 extern(System) int function ( 11800 cef_menu_model_t* self, 11801 int command_id, 11802 cef_menu_color_type_t color_type, 11803 cef_color_t color) nothrow set_color; 11804 11805 /// 11806 // Set the explicit color for |command_id| and |index| to |color|. Specify a 11807 // |color| value of 0 to remove the explicit color. Specify an |index| value 11808 // of -1 to set the default color for items that do not have an explicit color 11809 // set. If no explicit color or default color is set for |color_type| then the 11810 // system color will be used. Returns true (1) on success. 11811 /// 11812 extern(System) int function ( 11813 cef_menu_model_t* self, 11814 int index, 11815 cef_menu_color_type_t color_type, 11816 cef_color_t color) nothrow set_color_at; 11817 11818 /// 11819 // Returns in |color| the color that was explicitly set for |command_id| and 11820 // |color_type|. If a color was not set then 0 will be returned in |color|. 11821 // Returns true (1) on success. 11822 /// 11823 extern(System) int function ( 11824 cef_menu_model_t* self, 11825 int command_id, 11826 cef_menu_color_type_t color_type, 11827 cef_color_t* color) nothrow get_color; 11828 11829 /// 11830 // Returns in |color| the color that was explicitly set for |command_id| and 11831 // |color_type|. Specify an |index| value of -1 to return the default color in 11832 // |color|. If a color was not set then 0 will be returned in |color|. Returns 11833 // true (1) on success. 11834 /// 11835 extern(System) int function ( 11836 cef_menu_model_t* self, 11837 int index, 11838 cef_menu_color_type_t color_type, 11839 cef_color_t* color) nothrow get_color_at; 11840 11841 /// 11842 // Sets the font list for the specified |command_id|. If |font_list| is NULL 11843 // the system font will be used. Returns true (1) on success. The format is 11844 // "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where: - FONT_FAMILY_LIST is a comma- 11845 // separated list of font family names, - STYLES is an optional space- 11846 // separated list of style names (case-sensitive 11847 // "Bold" and "Italic" are supported), and 11848 // - SIZE is an integer font size in pixels with the suffix "px". 11849 // 11850 // Here are examples of valid font description strings: - "Arial, Helvetica, 11851 // Bold Italic 14px" - "Arial, 14px" 11852 /// 11853 extern(System) int function ( 11854 cef_menu_model_t* self, 11855 int command_id, 11856 const(cef_string_t)* font_list) nothrow set_font_list; 11857 11858 /// 11859 // Sets the font list for the specified |index|. Specify an |index| value of 11860 // -1 to set the default font. If |font_list| is NULL the system font will be 11861 // used. Returns true (1) on success. The format is 11862 // "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where: - FONT_FAMILY_LIST is a comma- 11863 // separated list of font family names, - STYLES is an optional space- 11864 // separated list of style names (case-sensitive 11865 // "Bold" and "Italic" are supported), and 11866 // - SIZE is an integer font size in pixels with the suffix "px". 11867 // 11868 // Here are examples of valid font description strings: - "Arial, Helvetica, 11869 // Bold Italic 14px" - "Arial, 14px" 11870 /// 11871 extern(System) int function ( 11872 cef_menu_model_t* self, 11873 int index, 11874 const(cef_string_t)* font_list) nothrow set_font_list_at; 11875 } 11876 11877 11878 11879 /// 11880 // Create a new MenuModel with the specified |delegate|. 11881 /// 11882 cef_menu_model_t* cef_menu_model_create (cef_menu_model_delegate_t* delegate_); 11883 11884 // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_ 11885 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 11886 // 11887 // Redistribution and use in source and binary forms, with or without 11888 // modification, are permitted provided that the following conditions are 11889 // met: 11890 // 11891 // * Redistributions of source code must retain the above copyright 11892 // notice, this list of conditions and the following disclaimer. 11893 // * Redistributions in binary form must reproduce the above 11894 // copyright notice, this list of conditions and the following disclaimer 11895 // in the documentation and/or other materials provided with the 11896 // distribution. 11897 // * Neither the name of Google Inc. nor the name Chromium Embedded 11898 // Framework nor the names of its contributors may be used to endorse 11899 // or promote products derived from this software without specific prior 11900 // written permission. 11901 // 11902 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11903 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11904 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11905 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11906 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11907 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11908 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11909 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11910 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11911 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11912 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11913 // 11914 // --------------------------------------------------------------------------- 11915 // 11916 // This file was generated by the CEF translator tool and should not edited 11917 // by hand. See the translator.README.txt file in the tools directory for 11918 // more information. 11919 // 11920 // $hash=edc411cb0447a6c2965cdeb5f709fe56c43ec2bb$ 11921 // 11922 11923 extern (C): 11924 11925 11926 11927 /// 11928 // Implement this structure to handle menu model events. The functions of this 11929 // structure will be called on the browser process UI thread unless otherwise 11930 // indicated. 11931 /// 11932 struct cef_menu_model_delegate_t 11933 { 11934 /// 11935 // Base structure. 11936 /// 11937 cef_base_ref_counted_t base; 11938 11939 /// 11940 // Perform the action associated with the specified |command_id| and optional 11941 // |event_flags|. 11942 /// 11943 extern(System) void function ( 11944 cef_menu_model_delegate_t* self, 11945 cef_menu_model_t* menu_model, 11946 int command_id, 11947 cef_event_flags_t event_flags) nothrow execute_command; 11948 11949 /// 11950 // Called when the user moves the mouse outside the menu and over the owning 11951 // window. 11952 /// 11953 extern(System) void function ( 11954 cef_menu_model_delegate_t* self, 11955 cef_menu_model_t* menu_model, 11956 const(cef_point_t)* screen_point) nothrow mouse_outside_menu; 11957 11958 /// 11959 // Called on unhandled open submenu keyboard commands. |is_rtl| will be true 11960 // (1) if the menu is displaying a right-to-left language. 11961 /// 11962 extern(System) void function ( 11963 cef_menu_model_delegate_t* self, 11964 cef_menu_model_t* menu_model, 11965 int is_rtl) nothrow unhandled_open_submenu; 11966 11967 /// 11968 // Called on unhandled close submenu keyboard commands. |is_rtl| will be true 11969 // (1) if the menu is displaying a right-to-left language. 11970 /// 11971 extern(System) void function ( 11972 cef_menu_model_delegate_t* self, 11973 cef_menu_model_t* menu_model, 11974 int is_rtl) nothrow unhandled_close_submenu; 11975 11976 /// 11977 // The menu is about to show. 11978 /// 11979 extern(System) void function ( 11980 cef_menu_model_delegate_t* self, 11981 cef_menu_model_t* menu_model) nothrow menu_will_show; 11982 11983 /// 11984 // The menu has closed. 11985 /// 11986 extern(System) void function ( 11987 cef_menu_model_delegate_t* self, 11988 cef_menu_model_t* menu_model) nothrow menu_closed; 11989 11990 /// 11991 // Optionally modify a menu item label. Return true (1) if |label| was 11992 // modified. 11993 /// 11994 extern(System) int function ( 11995 cef_menu_model_delegate_t* self, 11996 cef_menu_model_t* menu_model, 11997 cef_string_t* label) nothrow format_label; 11998 } 11999 12000 12001 12002 // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_ 12003 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 12004 // 12005 // Redistribution and use in source and binary forms, with or without 12006 // modification, are permitted provided that the following conditions are 12007 // met: 12008 // 12009 // * Redistributions of source code must retain the above copyright 12010 // notice, this list of conditions and the following disclaimer. 12011 // * Redistributions in binary form must reproduce the above 12012 // copyright notice, this list of conditions and the following disclaimer 12013 // in the documentation and/or other materials provided with the 12014 // distribution. 12015 // * Neither the name of Google Inc. nor the name Chromium Embedded 12016 // Framework nor the names of its contributors may be used to endorse 12017 // or promote products derived from this software without specific prior 12018 // written permission. 12019 // 12020 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12021 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12022 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12023 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12024 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12025 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12026 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12027 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12028 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12029 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12030 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12031 // 12032 // --------------------------------------------------------------------------- 12033 // 12034 // This file was generated by the CEF translator tool and should not edited 12035 // by hand. See the translator.README.txt file in the tools directory for 12036 // more information. 12037 // 12038 // $hash=f14afbd6941bcb37b14cce81569882512c3d7194$ 12039 // 12040 12041 extern (C): 12042 12043 /// 12044 // Structure used to represent an entry in navigation history. 12045 /// 12046 struct cef_navigation_entry_t 12047 { 12048 /// 12049 // Base structure. 12050 /// 12051 cef_base_ref_counted_t base; 12052 12053 /// 12054 // Returns true (1) if this object is valid. Do not call any other functions 12055 // if this function returns false (0). 12056 /// 12057 extern(System) int function (cef_navigation_entry_t* self) nothrow is_valid; 12058 12059 /// 12060 // Returns the actual URL of the page. For some pages this may be data: URL or 12061 // similar. Use get_display_url() to return a display-friendly version. 12062 /// 12063 // The resulting string must be freed by calling cef_string_userfree_free(). 12064 extern(System) cef_string_userfree_t function (cef_navigation_entry_t* self) nothrow get_url; 12065 12066 /// 12067 // Returns a display-friendly version of the URL. 12068 /// 12069 // The resulting string must be freed by calling cef_string_userfree_free(). 12070 extern(System) cef_string_userfree_t function ( 12071 cef_navigation_entry_t* self) nothrow get_display_url; 12072 12073 /// 12074 // Returns the original URL that was entered by the user before any redirects. 12075 /// 12076 // The resulting string must be freed by calling cef_string_userfree_free(). 12077 extern(System) cef_string_userfree_t function ( 12078 cef_navigation_entry_t* self) nothrow get_original_url; 12079 12080 /// 12081 // Returns the title set by the page. This value may be NULL. 12082 /// 12083 // The resulting string must be freed by calling cef_string_userfree_free(). 12084 extern(System) cef_string_userfree_t function (cef_navigation_entry_t* self) nothrow get_title; 12085 12086 /// 12087 // Returns the transition type which indicates what the user did to move to 12088 // this page from the previous page. 12089 /// 12090 extern(System) cef_transition_type_t function ( 12091 cef_navigation_entry_t* self) nothrow get_transition_type; 12092 12093 /// 12094 // Returns true (1) if this navigation includes post data. 12095 /// 12096 extern(System) int function (cef_navigation_entry_t* self) nothrow has_post_data; 12097 12098 /// 12099 // Returns the time for the last known successful navigation completion. A 12100 // navigation may be completed more than once if the page is reloaded. May be 12101 // 0 if the navigation has not yet completed. 12102 /// 12103 extern(System) cef_time_t function (cef_navigation_entry_t* self) nothrow get_completion_time; 12104 12105 /// 12106 // Returns the HTTP status code for the last known successful navigation 12107 // response. May be 0 if the response has not yet been received or if the 12108 // navigation has not yet completed. 12109 /// 12110 extern(System) int function (cef_navigation_entry_t* self) nothrow get_http_status_code; 12111 12112 /// 12113 // Returns the SSL information for this navigation entry. 12114 /// 12115 extern(System) cef_sslstatus_t* function (cef_navigation_entry_t* self) nothrow get_sslstatus; 12116 } 12117 12118 12119 12120 // CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_ 12121 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 12122 // 12123 // Redistribution and use in source and binary forms, with or without 12124 // modification, are permitted provided that the following conditions are 12125 // met: 12126 // 12127 // * Redistributions of source code must retain the above copyright 12128 // notice, this list of conditions and the following disclaimer. 12129 // * Redistributions in binary form must reproduce the above 12130 // copyright notice, this list of conditions and the following disclaimer 12131 // in the documentation and/or other materials provided with the 12132 // distribution. 12133 // * Neither the name of Google Inc. nor the name Chromium Embedded 12134 // Framework nor the names of its contributors may be used to endorse 12135 // or promote products derived from this software without specific prior 12136 // written permission. 12137 // 12138 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12139 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12140 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12141 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12142 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12143 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12144 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12145 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12146 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12147 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12148 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12149 // 12150 // --------------------------------------------------------------------------- 12151 // 12152 // This file was generated by the CEF translator tool and should not edited 12153 // by hand. See the translator.README.txt file in the tools directory for 12154 // more information. 12155 // 12156 // $hash=6798e6147540596c1abac8c7457d9d1d4d99bd54$ 12157 // 12158 12159 extern (C): 12160 12161 /// 12162 // Add an entry to the cross-origin access whitelist. 12163 // 12164 // The same-origin policy restricts how scripts hosted from different origins 12165 // (scheme + domain + port) can communicate. By default, scripts can only access 12166 // resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes 12167 // (but no other schemes) can use the "Access-Control-Allow-Origin" header to 12168 // allow cross-origin requests. For example, https://source.example.com can make 12169 // XMLHttpRequest requests on http://target.example.com if the 12170 // http://target.example.com request returns an "Access-Control-Allow-Origin: 12171 // https://source.example.com" response header. 12172 // 12173 // Scripts in separate frames or iframes and hosted from the same protocol and 12174 // domain suffix can execute cross-origin JavaScript if both pages set the 12175 // document.domain value to the same domain suffix. For example, 12176 // scheme://foo.example.com and scheme://bar.example.com can communicate using 12177 // JavaScript if both domains set document.domain="example.com". 12178 // 12179 // This function is used to allow access to origins that would otherwise violate 12180 // the same-origin policy. Scripts hosted underneath the fully qualified 12181 // |source_origin| URL (like http://www.example.com) will be allowed access to 12182 // all resources hosted on the specified |target_protocol| and |target_domain|. 12183 // If |target_domain| is non-NULL and |allow_target_subdomains| if false (0) 12184 // only exact domain matches will be allowed. If |target_domain| contains a top- 12185 // level domain component (like "example.com") and |allow_target_subdomains| is 12186 // true (1) sub-domain matches will be allowed. If |target_domain| is NULL and 12187 // |allow_target_subdomains| if true (1) all domains and IP addresses will be 12188 // allowed. 12189 // 12190 // This function cannot be used to bypass the restrictions on local or display 12191 // isolated schemes. See the comments on CefRegisterCustomScheme for more 12192 // information. 12193 // 12194 // This function may be called on any thread. Returns false (0) if 12195 // |source_origin| is invalid or the whitelist cannot be accessed. 12196 /// 12197 int cef_add_cross_origin_whitelist_entry ( 12198 const(cef_string_t)* source_origin, 12199 const(cef_string_t)* target_protocol, 12200 const(cef_string_t)* target_domain, 12201 int allow_target_subdomains); 12202 12203 /// 12204 // Remove an entry from the cross-origin access whitelist. Returns false (0) if 12205 // |source_origin| is invalid or the whitelist cannot be accessed. 12206 /// 12207 int cef_remove_cross_origin_whitelist_entry ( 12208 const(cef_string_t)* source_origin, 12209 const(cef_string_t)* target_protocol, 12210 const(cef_string_t)* target_domain, 12211 int allow_target_subdomains); 12212 12213 /// 12214 // Remove all entries from the cross-origin access whitelist. Returns false (0) 12215 // if the whitelist cannot be accessed. 12216 /// 12217 int cef_clear_cross_origin_whitelist (); 12218 12219 // CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_ 12220 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 12221 // 12222 // Redistribution and use in source and binary forms, with or without 12223 // modification, are permitted provided that the following conditions are 12224 // met: 12225 // 12226 // * Redistributions of source code must retain the above copyright 12227 // notice, this list of conditions and the following disclaimer. 12228 // * Redistributions in binary form must reproduce the above 12229 // copyright notice, this list of conditions and the following disclaimer 12230 // in the documentation and/or other materials provided with the 12231 // distribution. 12232 // * Neither the name of Google Inc. nor the name Chromium Embedded 12233 // Framework nor the names of its contributors may be used to endorse 12234 // or promote products derived from this software without specific prior 12235 // written permission. 12236 // 12237 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12238 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12239 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12240 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12241 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12242 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12243 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12244 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12245 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12246 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12247 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12248 // 12249 // --------------------------------------------------------------------------- 12250 // 12251 // This file was generated by the CEF translator tool and should not edited 12252 // by hand. See the translator.README.txt file in the tools directory for 12253 // more information. 12254 // 12255 // $hash=84149324b177c47287b935dcb3d5900a33acfdf5$ 12256 // 12257 12258 extern (C): 12259 12260 /// 12261 // Parse the specified |url| into its component parts. Returns false (0) if the 12262 // URL is NULL or invalid. 12263 /// 12264 int cef_parse_url (const(cef_string_t)* url, cef_urlparts_t* parts); 12265 12266 /// 12267 // Creates a URL from the specified |parts|, which must contain a non-NULL spec 12268 // or a non-NULL host and path (at a minimum), but not both. Returns false (0) 12269 // if |parts| isn't initialized as described. 12270 /// 12271 int cef_create_url (const(cef_urlparts_t)* parts, cef_string_t* url); 12272 12273 /// 12274 // This is a convenience function for formatting a URL in a concise and human- 12275 // friendly way to help users make security-related decisions (or in other 12276 // circumstances when people need to distinguish sites, origins, or otherwise- 12277 // simplified URLs from each other). Internationalized domain names (IDN) may be 12278 // presented in Unicode if the conversion is considered safe. The returned value 12279 // will (a) omit the path for standard schemes, excepting file and filesystem, 12280 // and (b) omit the port if it is the default for the scheme. Do not use this 12281 // for URLs which will be parsed or sent to other applications. 12282 /// 12283 // The resulting string must be freed by calling cef_string_userfree_free(). 12284 cef_string_userfree_t cef_format_url_for_security_display ( 12285 const(cef_string_t)* origin_url); 12286 12287 /// 12288 // Returns the mime type for the specified file extension or an NULL string if 12289 // unknown. 12290 /// 12291 // The resulting string must be freed by calling cef_string_userfree_free(). 12292 cef_string_userfree_t cef_get_mime_type (const(cef_string_t)* extension); 12293 12294 /// 12295 // Get the extensions associated with the given mime type. This should be passed 12296 // in lower case. There could be multiple extensions for a given mime type, like 12297 // "html,htm" for "text/html", or "txt,text,html,..." for "text/*". Any existing 12298 // elements in the provided vector will not be erased. 12299 /// 12300 void cef_get_extensions_for_mime_type ( 12301 const(cef_string_t)* mime_type, 12302 cef_string_list_t extensions); 12303 12304 /// 12305 // Encodes |data| as a base64 string. 12306 /// 12307 // The resulting string must be freed by calling cef_string_userfree_free(). 12308 cef_string_userfree_t cef_base64encode (const(void)* data, size_t data_size); 12309 12310 /// 12311 // Decodes the base64 encoded string |data|. The returned value will be NULL if 12312 // the decoding fails. 12313 /// 12314 12315 cef_binary_value_t* cef_base64decode (const(cef_string_t)* data); 12316 12317 /// 12318 // Escapes characters in |text| which are unsuitable for use as a query 12319 // parameter value. Everything except alphanumerics and -_.!~*'() will be 12320 // converted to "%XX". If |use_plus| is true (1) spaces will change to "+". The 12321 // result is basically the same as encodeURIComponent in Javacript. 12322 /// 12323 // The resulting string must be freed by calling cef_string_userfree_free(). 12324 cef_string_userfree_t cef_uriencode (const(cef_string_t)* text, int use_plus); 12325 12326 /// 12327 // Unescapes |text| and returns the result. Unescaping consists of looking for 12328 // the exact pattern "%XX" where each X is a hex digit and converting to the 12329 // character with the numerical value of those digits (e.g. "i%20=%203%3b" 12330 // unescapes to "i = 3;"). If |convert_to_utf8| is true (1) this function will 12331 // attempt to interpret the initial decoded result as UTF-8. If the result is 12332 // convertable into UTF-8 it will be returned as converted. Otherwise the 12333 // initial decoded result will be returned. The |unescape_rule| parameter 12334 // supports further customization the decoding process. 12335 /// 12336 // The resulting string must be freed by calling cef_string_userfree_free(). 12337 cef_string_userfree_t cef_uridecode ( 12338 const(cef_string_t)* text, 12339 int convert_to_utf8, 12340 cef_uri_unescape_rule_t unescape_rule); 12341 12342 /// 12343 // Parses the specified |json_string| and returns a dictionary or list 12344 // representation. If JSON parsing fails this function returns NULL. 12345 /// 12346 12347 cef_value_t* cef_parse_json ( 12348 const(cef_string_t)* json_string, 12349 cef_json_parser_options_t options); 12350 12351 /// 12352 // Parses the specified UTF8-encoded |json| buffer of size |json_size| and 12353 // returns a dictionary or list representation. If JSON parsing fails this 12354 // function returns NULL. 12355 /// 12356 cef_value_t* cef_parse_json_buffer ( 12357 const(void)* json, 12358 size_t json_size, 12359 cef_json_parser_options_t options); 12360 12361 /// 12362 // Parses the specified |json_string| and returns a dictionary or list 12363 // representation. If JSON parsing fails this function returns NULL and 12364 // populates |error_msg_out| with a formatted error message. 12365 /// 12366 cef_value_t* cef_parse_jsonand_return_error ( 12367 const(cef_string_t)* json_string, 12368 cef_json_parser_options_t options, 12369 cef_string_t* error_msg_out); 12370 12371 /// 12372 // Generates a JSON string from the specified root |node| which should be a 12373 // dictionary or list value. Returns an NULL string on failure. This function 12374 // requires exclusive access to |node| including any underlying data. 12375 /// 12376 // The resulting string must be freed by calling cef_string_userfree_free(). 12377 cef_string_userfree_t cef_write_json ( 12378 cef_value_t* node, 12379 cef_json_writer_options_t options); 12380 12381 // CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_ 12382 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 12383 // 12384 // Redistribution and use in source and binary forms, with or without 12385 // modification, are permitted provided that the following conditions are 12386 // met: 12387 // 12388 // * Redistributions of source code must retain the above copyright 12389 // notice, this list of conditions and the following disclaimer. 12390 // * Redistributions in binary form must reproduce the above 12391 // copyright notice, this list of conditions and the following disclaimer 12392 // in the documentation and/or other materials provided with the 12393 // distribution. 12394 // * Neither the name of Google Inc. nor the name Chromium Embedded 12395 // Framework nor the names of its contributors may be used to endorse 12396 // or promote products derived from this software without specific prior 12397 // written permission. 12398 // 12399 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12400 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12401 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12402 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12403 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12404 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12405 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12406 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12407 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12408 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12409 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12410 // 12411 // --------------------------------------------------------------------------- 12412 // 12413 // This file was generated by the CEF translator tool and should not edited 12414 // by hand. See the translator.README.txt file in the tools directory for 12415 // more information. 12416 // 12417 // $hash=0ae1fe7f7141eb05eb7fd44c2d41e4c576afae1e$ 12418 // 12419 12420 extern (C): 12421 12422 /// 12423 // Retrieve the path associated with the specified |key|. Returns true (1) on 12424 // success. Can be called on any thread in the browser process. 12425 /// 12426 int cef_get_path (cef_path_key_t key, cef_string_t* path); 12427 12428 // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 12429 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 12430 // 12431 // Redistribution and use in source and binary forms, with or without 12432 // modification, are permitted provided that the following conditions are 12433 // met: 12434 // 12435 // * Redistributions of source code must retain the above copyright 12436 // notice, this list of conditions and the following disclaimer. 12437 // * Redistributions in binary form must reproduce the above 12438 // copyright notice, this list of conditions and the following disclaimer 12439 // in the documentation and/or other materials provided with the 12440 // distribution. 12441 // * Neither the name of Google Inc. nor the name Chromium Embedded 12442 // Framework nor the names of its contributors may be used to endorse 12443 // or promote products derived from this software without specific prior 12444 // written permission. 12445 // 12446 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12447 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12448 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12449 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12450 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12451 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12452 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12453 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12454 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12455 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12456 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12457 // 12458 // --------------------------------------------------------------------------- 12459 // 12460 // This file was generated by the CEF translator tool and should not edited 12461 // by hand. See the translator.README.txt file in the tools directory for 12462 // more information. 12463 // 12464 // $hash=84fc58b3898f25476d9cdd260553390ba5e0b30b$ 12465 // 12466 12467 extern (C): 12468 12469 /// 12470 // Callback structure for asynchronous continuation of print dialog requests. 12471 /// 12472 struct cef_print_dialog_callback_t 12473 { 12474 /// 12475 // Base structure. 12476 /// 12477 cef_base_ref_counted_t base; 12478 12479 /// 12480 // Continue printing with the specified |settings|. 12481 /// 12482 extern(System) void function ( 12483 cef_print_dialog_callback_t* self, 12484 cef_print_settings_t* settings) nothrow cont; 12485 12486 /// 12487 // Cancel the printing. 12488 /// 12489 extern(System) void function (cef_print_dialog_callback_t* self) nothrow cancel; 12490 } 12491 12492 12493 12494 /// 12495 // Callback structure for asynchronous continuation of print job requests. 12496 /// 12497 struct cef_print_job_callback_t 12498 { 12499 /// 12500 // Base structure. 12501 /// 12502 cef_base_ref_counted_t base; 12503 12504 /// 12505 // Indicate completion of the print job. 12506 /// 12507 extern(System) void function (cef_print_job_callback_t* self) nothrow cont; 12508 } 12509 12510 12511 12512 /// 12513 // Implement this structure to handle printing on Linux. Each browser will have 12514 // only one print job in progress at a time. The functions of this structure 12515 // will be called on the browser process UI thread. 12516 /// 12517 struct cef_print_handler_t 12518 { 12519 /// 12520 // Base structure. 12521 /// 12522 cef_base_ref_counted_t base; 12523 12524 /// 12525 // Called when printing has started for the specified |browser|. This function 12526 // will be called before the other OnPrint*() functions and irrespective of 12527 // how printing was initiated (e.g. cef_browser_host_t::print(), JavaScript 12528 // window.print() or PDF extension print button). 12529 /// 12530 extern(System) void function ( 12531 cef_print_handler_t* self, 12532 cef_browser_t* browser) nothrow on_print_start; 12533 12534 /// 12535 // Synchronize |settings| with client state. If |get_defaults| is true (1) 12536 // then populate |settings| with the default print settings. Do not keep a 12537 // reference to |settings| outside of this callback. 12538 /// 12539 extern(System) void function ( 12540 cef_print_handler_t* self, 12541 cef_browser_t* browser, 12542 cef_print_settings_t* settings, 12543 int get_defaults) nothrow on_print_settings; 12544 12545 /// 12546 // Show the print dialog. Execute |callback| once the dialog is dismissed. 12547 // Return true (1) if the dialog will be displayed or false (0) to cancel the 12548 // printing immediately. 12549 /// 12550 extern(System) int function ( 12551 cef_print_handler_t* self, 12552 cef_browser_t* browser, 12553 int has_selection, 12554 cef_print_dialog_callback_t* callback) nothrow on_print_dialog; 12555 12556 /// 12557 // Send the print job to the printer. Execute |callback| once the job is 12558 // completed. Return true (1) if the job will proceed or false (0) to cancel 12559 // the job immediately. 12560 /// 12561 extern(System) int function ( 12562 cef_print_handler_t* self, 12563 cef_browser_t* browser, 12564 const(cef_string_t)* document_name, 12565 const(cef_string_t)* pdf_file_path, 12566 cef_print_job_callback_t* callback) nothrow on_print_job; 12567 12568 /// 12569 // Reset client state related to printing. 12570 /// 12571 extern(System) void function ( 12572 cef_print_handler_t* self, 12573 cef_browser_t* browser) nothrow on_print_reset; 12574 12575 /// 12576 // Return the PDF paper size in device units. Used in combination with 12577 // cef_browser_host_t::print_to_pdf(). 12578 /// 12579 extern(System) cef_size_t function ( 12580 cef_print_handler_t* self, 12581 cef_browser_t* browser, 12582 int device_units_per_inch) nothrow get_pdf_paper_size; 12583 } 12584 12585 12586 12587 // CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_ 12588 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 12589 // 12590 // Redistribution and use in source and binary forms, with or without 12591 // modification, are permitted provided that the following conditions are 12592 // met: 12593 // 12594 // * Redistributions of source code must retain the above copyright 12595 // notice, this list of conditions and the following disclaimer. 12596 // * Redistributions in binary form must reproduce the above 12597 // copyright notice, this list of conditions and the following disclaimer 12598 // in the documentation and/or other materials provided with the 12599 // distribution. 12600 // * Neither the name of Google Inc. nor the name Chromium Embedded 12601 // Framework nor the names of its contributors may be used to endorse 12602 // or promote products derived from this software without specific prior 12603 // written permission. 12604 // 12605 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12606 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12607 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12608 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12609 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12610 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12611 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12612 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12613 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12614 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12615 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12616 // 12617 // --------------------------------------------------------------------------- 12618 // 12619 // This file was generated by the CEF translator tool and should not edited 12620 // by hand. See the translator.README.txt file in the tools directory for 12621 // more information. 12622 // 12623 // $hash=4b52323c4ce2d0ebcc3438e16fc9a9b181a58adc$ 12624 // 12625 12626 extern (C): 12627 12628 /// 12629 // Structure representing print settings. 12630 /// 12631 struct cef_print_settings_t 12632 { 12633 /// 12634 // Base structure. 12635 /// 12636 cef_base_ref_counted_t base; 12637 12638 /// 12639 // Returns true (1) if this object is valid. Do not call any other functions 12640 // if this function returns false (0). 12641 /// 12642 extern(System) int function (cef_print_settings_t* self) nothrow is_valid; 12643 12644 /// 12645 // Returns true (1) if the values of this object are read-only. Some APIs may 12646 // expose read-only objects. 12647 /// 12648 extern(System) int function (cef_print_settings_t* self) nothrow is_read_only; 12649 12650 /// 12651 // Set the page orientation. 12652 /// 12653 extern(System) void function (cef_print_settings_t* self, int landscape) nothrow set_orientation; 12654 12655 /// 12656 // Returns true (1) if the orientation is landscape. 12657 /// 12658 extern(System) int function (cef_print_settings_t* self) nothrow is_landscape; 12659 12660 /// 12661 // Set the printer printable area in device units. Some platforms already 12662 // provide flipped area. Set |landscape_needs_flip| to false (0) on those 12663 // platforms to avoid double flipping. 12664 /// 12665 extern(System) void function ( 12666 cef_print_settings_t* self, 12667 const(cef_size_t)* physical_size_device_units, 12668 const(cef_rect_t)* printable_area_device_units, 12669 int landscape_needs_flip) nothrow set_printer_printable_area; 12670 12671 /// 12672 // Set the device name. 12673 /// 12674 extern(System) void function ( 12675 cef_print_settings_t* self, 12676 const(cef_string_t)* name) nothrow set_device_name; 12677 12678 /// 12679 // Get the device name. 12680 /// 12681 // The resulting string must be freed by calling cef_string_userfree_free(). 12682 extern(System) cef_string_userfree_t function ( 12683 cef_print_settings_t* self) nothrow get_device_name; 12684 12685 /// 12686 // Set the DPI (dots per inch). 12687 /// 12688 extern(System) void function (cef_print_settings_t* self, int dpi) nothrow set_dpi; 12689 12690 /// 12691 // Get the DPI (dots per inch). 12692 /// 12693 extern(System) int function (cef_print_settings_t* self) nothrow get_dpi; 12694 12695 /// 12696 // Set the page ranges. 12697 /// 12698 extern(System) void function ( 12699 cef_print_settings_t* self, 12700 size_t rangesCount, 12701 const(cef_range_t)* ranges) nothrow set_page_ranges; 12702 12703 /// 12704 // Returns the number of page ranges that currently exist. 12705 /// 12706 extern(System) size_t function (cef_print_settings_t* self) nothrow get_page_ranges_count; 12707 12708 /// 12709 // Retrieve the page ranges. 12710 /// 12711 extern(System) void function ( 12712 cef_print_settings_t* self, 12713 size_t* rangesCount, 12714 cef_range_t* ranges) nothrow get_page_ranges; 12715 12716 /// 12717 // Set whether only the selection will be printed. 12718 /// 12719 extern(System) void function ( 12720 cef_print_settings_t* self, 12721 int selection_only) nothrow set_selection_only; 12722 12723 /// 12724 // Returns true (1) if only the selection will be printed. 12725 /// 12726 extern(System) int function (cef_print_settings_t* self) nothrow is_selection_only; 12727 12728 /// 12729 // Set whether pages will be collated. 12730 /// 12731 extern(System) void function (cef_print_settings_t* self, int collate) nothrow set_collate; 12732 12733 /// 12734 // Returns true (1) if pages will be collated. 12735 /// 12736 extern(System) int function (cef_print_settings_t* self) nothrow will_collate; 12737 12738 /// 12739 // Set the color model. 12740 /// 12741 extern(System) void function ( 12742 cef_print_settings_t* self, 12743 cef_color_model_t model) nothrow set_color_model; 12744 12745 /// 12746 // Get the color model. 12747 /// 12748 extern(System) cef_color_model_t function (cef_print_settings_t* self) nothrow get_color_model; 12749 12750 /// 12751 // Set the number of copies. 12752 /// 12753 extern(System) void function (cef_print_settings_t* self, int copies) nothrow set_copies; 12754 12755 /// 12756 // Get the number of copies. 12757 /// 12758 extern(System) int function (cef_print_settings_t* self) nothrow get_copies; 12759 12760 /// 12761 // Set the duplex mode. 12762 /// 12763 extern(System) void function ( 12764 cef_print_settings_t* self, 12765 cef_duplex_mode_t mode) nothrow set_duplex_mode; 12766 12767 /// 12768 // Get the duplex mode. 12769 /// 12770 extern(System) cef_duplex_mode_t function (cef_print_settings_t* self) nothrow get_duplex_mode; 12771 } 12772 12773 12774 12775 /// 12776 // Create a new cef_print_settings_t object. 12777 /// 12778 cef_print_settings_t* cef_print_settings_create (); 12779 12780 // CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_ 12781 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 12782 // 12783 // Redistribution and use in source and binary forms, with or without 12784 // modification, are permitted provided that the following conditions are 12785 // met: 12786 // 12787 // * Redistributions of source code must retain the above copyright 12788 // notice, this list of conditions and the following disclaimer. 12789 // * Redistributions in binary form must reproduce the above 12790 // copyright notice, this list of conditions and the following disclaimer 12791 // in the documentation and/or other materials provided with the 12792 // distribution. 12793 // * Neither the name of Google Inc. nor the name Chromium Embedded 12794 // Framework nor the names of its contributors may be used to endorse 12795 // or promote products derived from this software without specific prior 12796 // written permission. 12797 // 12798 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12799 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12800 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12801 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12802 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12803 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12804 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12805 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12806 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12807 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12808 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12809 // 12810 // --------------------------------------------------------------------------- 12811 // 12812 // This file was generated by the CEF translator tool and should not edited 12813 // by hand. See the translator.README.txt file in the tools directory for 12814 // more information. 12815 // 12816 // $hash=53ff22b73527aa331d2bd96e008f4cb4f0413042$ 12817 // 12818 12819 extern (C): 12820 12821 /// 12822 // Structure representing a message. Can be used on any process and thread. 12823 /// 12824 struct cef_process_message_t 12825 { 12826 /// 12827 // Base structure. 12828 /// 12829 cef_base_ref_counted_t base; 12830 12831 /// 12832 // Returns true (1) if this object is valid. Do not call any other functions 12833 // if this function returns false (0). 12834 /// 12835 extern(System) int function (cef_process_message_t* self) nothrow is_valid; 12836 12837 /// 12838 // Returns true (1) if the values of this object are read-only. Some APIs may 12839 // expose read-only objects. 12840 /// 12841 extern(System) int function (cef_process_message_t* self) nothrow is_read_only; 12842 12843 /// 12844 // Returns a writable copy of this object. 12845 /// 12846 extern(System) cef_process_message_t* function (cef_process_message_t* self) nothrow copy; 12847 12848 /// 12849 // Returns the message name. 12850 /// 12851 // The resulting string must be freed by calling cef_string_userfree_free(). 12852 extern(System) cef_string_userfree_t function (cef_process_message_t* self) nothrow get_name; 12853 12854 /// 12855 // Returns the list of arguments. 12856 /// 12857 extern(System) cef_list_value_t* function ( 12858 cef_process_message_t* self) nothrow get_argument_list; 12859 } 12860 12861 12862 12863 /// 12864 // Create a new cef_process_message_t object with the specified name. 12865 /// 12866 cef_process_message_t* cef_process_message_create (const(cef_string_t)* name); 12867 12868 // CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_ 12869 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 12870 // 12871 // Redistribution and use in source and binary forms, with or without 12872 // modification, are permitted provided that the following conditions are 12873 // met: 12874 // 12875 // * Redistributions of source code must retain the above copyright 12876 // notice, this list of conditions and the following disclaimer. 12877 // * Redistributions in binary form must reproduce the above 12878 // copyright notice, this list of conditions and the following disclaimer 12879 // in the documentation and/or other materials provided with the 12880 // distribution. 12881 // * Neither the name of Google Inc. nor the name Chromium Embedded 12882 // Framework nor the names of its contributors may be used to endorse 12883 // or promote products derived from this software without specific prior 12884 // written permission. 12885 // 12886 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12887 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12888 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12889 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12890 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12891 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12892 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12893 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12894 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12895 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12896 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12897 // 12898 // --------------------------------------------------------------------------- 12899 // 12900 // This file was generated by the CEF translator tool and should not edited 12901 // by hand. See the translator.README.txt file in the tools directory for 12902 // more information. 12903 // 12904 // $hash=c476a8d22852994d9d9695db901efaef13bbfc9d$ 12905 // 12906 12907 extern (C): 12908 12909 /// 12910 // Launches the process specified via |command_line|. Returns true (1) upon 12911 // success. Must be called on the browser process TID_PROCESS_LAUNCHER thread. 12912 // 12913 // Unix-specific notes: - All file descriptors open in the parent process will 12914 // be closed in the 12915 // child process except for stdin, stdout, and stderr. 12916 // - If the first argument on the command line does not contain a slash, 12917 // PATH will be searched. (See man execvp.) 12918 /// 12919 int cef_launch_process (cef_command_line_t* command_line); 12920 12921 // CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ 12922 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 12923 // 12924 // Redistribution and use in source and binary forms, with or without 12925 // modification, are permitted provided that the following conditions are 12926 // met: 12927 // 12928 // * Redistributions of source code must retain the above copyright 12929 // notice, this list of conditions and the following disclaimer. 12930 // * Redistributions in binary form must reproduce the above 12931 // copyright notice, this list of conditions and the following disclaimer 12932 // in the documentation and/or other materials provided with the 12933 // distribution. 12934 // * Neither the name of Google Inc. nor the name Chromium Embedded 12935 // Framework nor the names of its contributors may be used to endorse 12936 // or promote products derived from this software without specific prior 12937 // written permission. 12938 // 12939 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12940 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12941 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12942 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12943 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12944 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12945 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12946 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12947 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12948 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12949 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12950 // 12951 // --------------------------------------------------------------------------- 12952 // 12953 // This file was generated by the CEF translator tool and should not edited 12954 // by hand. See the translator.README.txt file in the tools directory for 12955 // more information. 12956 // 12957 // $hash=8cde223bdb8d25ff163edd95da0d9e238b298016$ 12958 // 12959 12960 extern (C): 12961 12962 /// 12963 // Generic callback structure used for managing the lifespan of a registration. 12964 /// 12965 struct cef_registration_t 12966 { 12967 /// 12968 // Base structure. 12969 /// 12970 cef_base_ref_counted_t base; 12971 } 12972 12973 12974 12975 // CEF_INCLUDE_CAPI_CEF_REGISTRATION_CAPI_H_ 12976 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 12977 // 12978 // Redistribution and use in source and binary forms, with or without 12979 // modification, are permitted provided that the following conditions are 12980 // met: 12981 // 12982 // * Redistributions of source code must retain the above copyright 12983 // notice, this list of conditions and the following disclaimer. 12984 // * Redistributions in binary form must reproduce the above 12985 // copyright notice, this list of conditions and the following disclaimer 12986 // in the documentation and/or other materials provided with the 12987 // distribution. 12988 // * Neither the name of Google Inc. nor the name Chromium Embedded 12989 // Framework nor the names of its contributors may be used to endorse 12990 // or promote products derived from this software without specific prior 12991 // written permission. 12992 // 12993 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12994 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12995 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12996 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12997 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12998 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12999 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13000 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13001 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13002 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13003 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13004 // 13005 // --------------------------------------------------------------------------- 13006 // 13007 // This file was generated by the CEF translator tool and should not edited 13008 // by hand. See the translator.README.txt file in the tools directory for 13009 // more information. 13010 // 13011 // $hash=e4bdab963041a270edabc0954b415eb4cae8e5cb$ 13012 // 13013 13014 extern (C): 13015 13016 /// 13017 // Implement this structure to handle events when window rendering is disabled. 13018 // The functions of this structure will be called on the UI thread. 13019 /// 13020 struct cef_render_handler_t 13021 { 13022 /// 13023 // Base structure. 13024 /// 13025 cef_base_ref_counted_t base; 13026 13027 /// 13028 // Return the handler for accessibility notifications. If no handler is 13029 // provided the default implementation will be used. 13030 /// 13031 extern(System) cef_accessibility_handler_t* function ( 13032 cef_render_handler_t* self) nothrow get_accessibility_handler; 13033 13034 /// 13035 // Called to retrieve the root window rectangle in screen coordinates. Return 13036 // true (1) if the rectangle was provided. If this function returns false (0) 13037 // the rectangle from GetViewRect will be used. 13038 /// 13039 extern(System) int function ( 13040 cef_render_handler_t* self, 13041 cef_browser_t* browser, 13042 cef_rect_t* rect) nothrow get_root_screen_rect; 13043 13044 /// 13045 // Called to retrieve the view rectangle which is relative to screen 13046 // coordinates. This function must always provide a non-NULL rectangle. 13047 /// 13048 extern(System) void function ( 13049 cef_render_handler_t* self, 13050 cef_browser_t* browser, 13051 cef_rect_t* rect) nothrow get_view_rect; 13052 13053 /// 13054 // Called to retrieve the translation from view coordinates to actual screen 13055 // coordinates. Return true (1) if the screen coordinates were provided. 13056 /// 13057 extern(System) int function ( 13058 cef_render_handler_t* self, 13059 cef_browser_t* browser, 13060 int viewX, 13061 int viewY, 13062 int* screenX, 13063 int* screenY) nothrow get_screen_point; 13064 13065 /// 13066 // Called to allow the client to fill in the CefScreenInfo object with 13067 // appropriate values. Return true (1) if the |screen_info| structure has been 13068 // modified. 13069 // 13070 // If the screen info rectangle is left NULL the rectangle from GetViewRect 13071 // will be used. If the rectangle is still NULL or invalid popups may not be 13072 // drawn correctly. 13073 /// 13074 extern(System) int function ( 13075 cef_render_handler_t* self, 13076 cef_browser_t* browser, 13077 cef_screen_info_t* screen_info) nothrow get_screen_info; 13078 13079 /// 13080 // Called when the browser wants to show or hide the popup widget. The popup 13081 // should be shown if |show| is true (1) and hidden if |show| is false (0). 13082 /// 13083 extern(System) void function ( 13084 cef_render_handler_t* self, 13085 cef_browser_t* browser, 13086 int show) nothrow on_popup_show; 13087 13088 /// 13089 // Called when the browser wants to move or resize the popup widget. |rect| 13090 // contains the new location and size in view coordinates. 13091 /// 13092 extern(System) void function ( 13093 cef_render_handler_t* self, 13094 cef_browser_t* browser, 13095 const(cef_rect_t)* rect) nothrow on_popup_size; 13096 13097 /// 13098 // Called when an element should be painted. Pixel values passed to this 13099 // function are scaled relative to view coordinates based on the value of 13100 // CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type| 13101 // indicates whether the element is the view or the popup widget. |buffer| 13102 // contains the pixel data for the whole image. |dirtyRects| contains the set 13103 // of rectangles in pixel coordinates that need to be repainted. |buffer| will 13104 // be |width|*|height|*4 bytes in size and represents a BGRA image with an 13105 // upper-left origin. This function is only called when 13106 // cef_window_tInfo::shared_texture_enabled is set to false (0). 13107 /// 13108 extern(System) void function ( 13109 cef_render_handler_t* self, 13110 cef_browser_t* browser, 13111 cef_paint_element_type_t type, 13112 size_t dirtyRectsCount, 13113 const(cef_rect_t)* dirtyRects, 13114 const(void)* buffer, 13115 int width, 13116 int height) nothrow on_paint; 13117 13118 /// 13119 // Called when an element has been rendered to the shared texture handle. 13120 // |type| indicates whether the element is the view or the popup widget. 13121 // |dirtyRects| contains the set of rectangles in pixel coordinates that need 13122 // to be repainted. |shared_handle| is the handle for a D3D11 Texture2D that 13123 // can be accessed via ID3D11Device using the OpenSharedResource function. 13124 // This function is only called when cef_window_tInfo::shared_texture_enabled 13125 // is set to true (1), and is currently only supported on Windows. 13126 /// 13127 extern(System) void function ( 13128 cef_render_handler_t* self, 13129 cef_browser_t* browser, 13130 cef_paint_element_type_t type, 13131 size_t dirtyRectsCount, 13132 const(cef_rect_t)* dirtyRects, 13133 void* shared_handle) nothrow on_accelerated_paint; 13134 13135 /// 13136 // Called when the user starts dragging content in the web view. Contextual 13137 // information about the dragged content is supplied by |drag_data|. (|x|, 13138 // |y|) is the drag start location in screen coordinates. OS APIs that run a 13139 // system message loop may be used within the StartDragging call. 13140 // 13141 // Return false (0) to abort the drag operation. Don't call any of 13142 // cef_browser_host_t::DragSource*Ended* functions after returning false (0). 13143 // 13144 // Return true (1) to handle the drag operation. Call 13145 // cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either 13146 // synchronously or asynchronously to inform the web view that the drag 13147 // operation has ended. 13148 /// 13149 extern(System) int function ( 13150 cef_render_handler_t* self, 13151 cef_browser_t* browser, 13152 cef_drag_data_t* drag_data, 13153 cef_drag_operations_mask_t allowed_ops, 13154 int x, 13155 int y) nothrow start_dragging; 13156 13157 /// 13158 // Called when the web view wants to update the mouse cursor during a drag & 13159 // drop operation. |operation| describes the allowed operation (none, move, 13160 // copy, link). 13161 /// 13162 extern(System) void function ( 13163 cef_render_handler_t* self, 13164 cef_browser_t* browser, 13165 cef_drag_operations_mask_t operation) nothrow update_drag_cursor; 13166 13167 /// 13168 // Called when the scroll offset has changed. 13169 /// 13170 extern(System) void function ( 13171 cef_render_handler_t* self, 13172 cef_browser_t* browser, 13173 double x, 13174 double y) nothrow on_scroll_offset_changed; 13175 13176 /// 13177 // Called when the IME composition range has changed. |selected_range| is the 13178 // range of characters that have been selected. |character_bounds| is the 13179 // bounds of each character in view coordinates. 13180 /// 13181 extern(System) void function ( 13182 cef_render_handler_t* self, 13183 cef_browser_t* browser, 13184 const(cef_range_t)* selected_range, 13185 size_t character_boundsCount, 13186 const(cef_rect_t)* character_bounds) nothrow on_ime_composition_range_changed; 13187 13188 /// 13189 // Called when text selection has changed for the specified |browser|. 13190 // |selected_text| is the currently selected text and |selected_range| is the 13191 // character range. 13192 /// 13193 extern(System) void function ( 13194 cef_render_handler_t* self, 13195 cef_browser_t* browser, 13196 const(cef_string_t)* selected_text, 13197 const(cef_range_t)* selected_range) nothrow on_text_selection_changed; 13198 13199 /// 13200 // Called when an on-screen keyboard should be shown or hidden for the 13201 // specified |browser|. |input_mode| specifies what kind of keyboard should be 13202 // opened. If |input_mode| is CEF_TEXT_INPUT_MODE_NONE, any existing keyboard 13203 // for this browser should be hidden. 13204 /// 13205 extern(System) void function ( 13206 cef_render_handler_t* self, 13207 cef_browser_t* browser, 13208 cef_text_input_mode_t input_mode) nothrow on_virtual_keyboard_requested; 13209 } 13210 13211 13212 13213 // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_ 13214 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 13215 // 13216 // Redistribution and use in source and binary forms, with or without 13217 // modification, are permitted provided that the following conditions are 13218 // met: 13219 // 13220 // * Redistributions of source code must retain the above copyright 13221 // notice, this list of conditions and the following disclaimer. 13222 // * Redistributions in binary form must reproduce the above 13223 // copyright notice, this list of conditions and the following disclaimer 13224 // in the documentation and/or other materials provided with the 13225 // distribution. 13226 // * Neither the name of Google Inc. nor the name Chromium Embedded 13227 // Framework nor the names of its contributors may be used to endorse 13228 // or promote products derived from this software without specific prior 13229 // written permission. 13230 // 13231 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13232 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13233 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13234 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13235 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13236 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13237 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13238 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13239 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13240 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13241 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13242 // 13243 // --------------------------------------------------------------------------- 13244 // 13245 // This file was generated by the CEF translator tool and should not edited 13246 // by hand. See the translator.README.txt file in the tools directory for 13247 // more information. 13248 // 13249 // $hash=4ebf99611a11cc8714d710c37417fbd9f50f0618$ 13250 // 13251 13252 extern (C): 13253 13254 /// 13255 // Structure used to implement render process callbacks. The functions of this 13256 // structure will be called on the render process main thread (TID_RENDERER) 13257 // unless otherwise indicated. 13258 /// 13259 struct cef_render_process_handler_t 13260 { 13261 /// 13262 // Base structure. 13263 /// 13264 cef_base_ref_counted_t base; 13265 13266 /// 13267 // Called after WebKit has been initialized. 13268 /// 13269 extern(System) void function (cef_render_process_handler_t* self) nothrow on_web_kit_initialized; 13270 13271 /// 13272 // Called after a browser has been created. When browsing cross-origin a new 13273 // browser will be created before the old browser with the same identifier is 13274 // destroyed. |extra_info| is an optional read-only value originating from 13275 // cef_browser_host_t::cef_browser_host_create_browser(), 13276 // cef_browser_host_t::cef_browser_host_create_browser_sync(), 13277 // cef_life_span_handler_t::on_before_popup() or 13278 // cef_browser_view_t::cef_browser_view_create(). 13279 /// 13280 extern(System) void function ( 13281 cef_render_process_handler_t* self, 13282 cef_browser_t* browser, 13283 cef_dictionary_value_t* extra_info) nothrow on_browser_created; 13284 13285 /// 13286 // Called before a browser is destroyed. 13287 /// 13288 extern(System) void function ( 13289 cef_render_process_handler_t* self, 13290 cef_browser_t* browser) nothrow on_browser_destroyed; 13291 13292 /// 13293 // Return the handler for browser load status events. 13294 /// 13295 extern(System) cef_load_handler_t* function ( 13296 cef_render_process_handler_t* self) nothrow get_load_handler; 13297 13298 /// 13299 // Called immediately after the V8 context for a frame has been created. To 13300 // retrieve the JavaScript 'window' object use the 13301 // cef_v8context_t::get_global() function. V8 handles can only be accessed 13302 // from the thread on which they are created. A task runner for posting tasks 13303 // on the associated thread can be retrieved via the 13304 // cef_v8context_t::get_task_runner() function. 13305 /// 13306 extern(System) void function ( 13307 cef_render_process_handler_t* self, 13308 cef_browser_t* browser, 13309 cef_frame_t* frame, 13310 cef_v8context_t* context) nothrow on_context_created; 13311 13312 /// 13313 // Called immediately before the V8 context for a frame is released. No 13314 // references to the context should be kept after this function is called. 13315 /// 13316 extern(System) void function ( 13317 cef_render_process_handler_t* self, 13318 cef_browser_t* browser, 13319 cef_frame_t* frame, 13320 cef_v8context_t* context) nothrow on_context_released; 13321 13322 /// 13323 // Called for global uncaught exceptions in a frame. Execution of this 13324 // callback is disabled by default. To enable set 13325 // CefSettings.uncaught_exception_stack_size > 0. 13326 /// 13327 extern(System) void function ( 13328 cef_render_process_handler_t* self, 13329 cef_browser_t* browser, 13330 cef_frame_t* frame, 13331 cef_v8context_t* context, 13332 cef_v8exception_t* exception, 13333 cef_v8stack_trace_t* stackTrace) nothrow on_uncaught_exception; 13334 13335 /// 13336 // Called when a new node in the the browser gets focus. The |node| value may 13337 // be NULL if no specific node has gained focus. The node object passed to 13338 // this function represents a snapshot of the DOM at the time this function is 13339 // executed. DOM objects are only valid for the scope of this function. Do not 13340 // keep references to or attempt to access any DOM objects outside the scope 13341 // of this function. 13342 /// 13343 extern(System) void function ( 13344 cef_render_process_handler_t* self, 13345 cef_browser_t* browser, 13346 cef_frame_t* frame, 13347 cef_domnode_t* node) nothrow on_focused_node_changed; 13348 13349 /// 13350 // Called when a new message is received from a different process. Return true 13351 // (1) if the message was handled or false (0) otherwise. It is safe to keep a 13352 // reference to |message| outside of this callback. 13353 /// 13354 extern(System) int function ( 13355 cef_render_process_handler_t* self, 13356 cef_browser_t* browser, 13357 cef_frame_t* frame, 13358 cef_process_id_t source_process, 13359 cef_process_message_t* message) nothrow on_process_message_received; 13360 } 13361 13362 13363 13364 // CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_ 13365 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 13366 // 13367 // Redistribution and use in source and binary forms, with or without 13368 // modification, are permitted provided that the following conditions are 13369 // met: 13370 // 13371 // * Redistributions of source code must retain the above copyright 13372 // notice, this list of conditions and the following disclaimer. 13373 // * Redistributions in binary form must reproduce the above 13374 // copyright notice, this list of conditions and the following disclaimer 13375 // in the documentation and/or other materials provided with the 13376 // distribution. 13377 // * Neither the name of Google Inc. nor the name Chromium Embedded 13378 // Framework nor the names of its contributors may be used to endorse 13379 // or promote products derived from this software without specific prior 13380 // written permission. 13381 // 13382 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13383 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13384 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13385 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13386 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13387 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13388 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13389 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13390 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13391 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13392 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13393 // 13394 // --------------------------------------------------------------------------- 13395 // 13396 // This file was generated by the CEF translator tool and should not edited 13397 // by hand. See the translator.README.txt file in the tools directory for 13398 // more information. 13399 // 13400 // $hash=a5e9055958c3588d583d4d128a5d7c8639f39946$ 13401 // 13402 13403 extern (C): 13404 13405 /// 13406 // Structure used to represent a web request. The functions of this structure 13407 // may be called on any thread. 13408 /// 13409 struct cef_request_t 13410 { 13411 /// 13412 // Base structure. 13413 /// 13414 cef_base_ref_counted_t base; 13415 13416 /// 13417 // Returns true (1) if this object is read-only. 13418 /// 13419 extern(System) int function (cef_request_t* self) nothrow is_read_only; 13420 13421 /// 13422 // Get the fully qualified URL. 13423 /// 13424 // The resulting string must be freed by calling cef_string_userfree_free(). 13425 extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_url; 13426 13427 /// 13428 // Set the fully qualified URL. 13429 /// 13430 extern(System) void function (cef_request_t* self, const(cef_string_t)* url) nothrow set_url; 13431 13432 /// 13433 // Get the request function type. The value will default to POST if post data 13434 // is provided and GET otherwise. 13435 /// 13436 // The resulting string must be freed by calling cef_string_userfree_free(). 13437 extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_method; 13438 13439 /// 13440 // Set the request function type. 13441 /// 13442 extern(System) void function ( 13443 cef_request_t* self, 13444 const(cef_string_t)* method) nothrow set_method; 13445 13446 /// 13447 // Set the referrer URL and policy. If non-NULL the referrer URL must be fully 13448 // qualified with an HTTP or HTTPS scheme component. Any username, password or 13449 // ref component will be removed. 13450 /// 13451 extern(System) void function ( 13452 cef_request_t* self, 13453 const(cef_string_t)* referrer_url, 13454 cef_referrer_policy_t policy) nothrow set_referrer; 13455 13456 /// 13457 // Get the referrer URL. 13458 /// 13459 // The resulting string must be freed by calling cef_string_userfree_free(). 13460 extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_referrer_url; 13461 13462 /// 13463 // Get the referrer policy. 13464 /// 13465 extern(System) cef_referrer_policy_t function (cef_request_t* self) nothrow get_referrer_policy; 13466 13467 /// 13468 // Get the post data. 13469 /// 13470 extern(System) cef_post_data_t* function (cef_request_t* self) nothrow get_post_data; 13471 13472 /// 13473 // Set the post data. 13474 /// 13475 extern(System) void function ( 13476 cef_request_t* self, 13477 cef_post_data_t* postData) nothrow set_post_data; 13478 13479 /// 13480 // Get the header values. Will not include the Referer value if any. 13481 /// 13482 extern(System) void function ( 13483 cef_request_t* self, 13484 cef_string_multimap_t headerMap) nothrow get_header_map; 13485 13486 /// 13487 // Set the header values. If a Referer value exists in the header map it will 13488 // be removed and ignored. 13489 /// 13490 extern(System) void function ( 13491 cef_request_t* self, 13492 cef_string_multimap_t headerMap) nothrow set_header_map; 13493 13494 /// 13495 // Returns the first header value for |name| or an NULL string if not found. 13496 // Will not return the Referer value if any. Use GetHeaderMap instead if 13497 // |name| might have multiple values. 13498 /// 13499 // The resulting string must be freed by calling cef_string_userfree_free(). 13500 extern(System) cef_string_userfree_t function ( 13501 cef_request_t* self, 13502 const(cef_string_t)* name) nothrow get_header_by_name; 13503 13504 /// 13505 // Set the header |name| to |value|. If |overwrite| is true (1) any existing 13506 // values will be replaced with the new value. If |overwrite| is false (0) any 13507 // existing values will not be overwritten. The Referer value cannot be set 13508 // using this function. 13509 /// 13510 extern(System) void function ( 13511 cef_request_t* self, 13512 const(cef_string_t)* name, 13513 const(cef_string_t)* value, 13514 int overwrite) nothrow set_header_by_name; 13515 13516 /// 13517 // Set all values at one time. 13518 /// 13519 extern(System) void function ( 13520 cef_request_t* self, 13521 const(cef_string_t)* url, 13522 const(cef_string_t)* method, 13523 cef_post_data_t* postData, 13524 cef_string_multimap_t headerMap) nothrow set; 13525 13526 /// 13527 // Get the flags used in combination with cef_urlrequest_t. See 13528 // cef_urlrequest_flags_t for supported values. 13529 /// 13530 extern(System) int function (cef_request_t* self) nothrow get_flags; 13531 13532 /// 13533 // Set the flags used in combination with cef_urlrequest_t. See 13534 // cef_urlrequest_flags_t for supported values. 13535 /// 13536 extern(System) void function (cef_request_t* self, int flags) nothrow set_flags; 13537 13538 /// 13539 // Get the URL to the first party for cookies used in combination with 13540 // cef_urlrequest_t. 13541 /// 13542 // The resulting string must be freed by calling cef_string_userfree_free(). 13543 extern(System) cef_string_userfree_t function ( 13544 cef_request_t* self) nothrow get_first_party_for_cookies; 13545 13546 /// 13547 // Set the URL to the first party for cookies used in combination with 13548 // cef_urlrequest_t. 13549 /// 13550 extern(System) void function ( 13551 cef_request_t* self, 13552 const(cef_string_t)* url) nothrow set_first_party_for_cookies; 13553 13554 /// 13555 // Get the resource type for this request. Only available in the browser 13556 // process. 13557 /// 13558 extern(System) cef_resource_type_t function (cef_request_t* self) nothrow get_resource_type; 13559 13560 /// 13561 // Get the transition type for this request. Only available in the browser 13562 // process and only applies to requests that represent a main frame or sub- 13563 // frame navigation. 13564 /// 13565 extern(System) cef_transition_type_t function (cef_request_t* self) nothrow get_transition_type; 13566 13567 /// 13568 // Returns the globally unique identifier for this request or 0 if not 13569 // specified. Can be used by cef_resource_request_handler_t implementations in 13570 // the browser process to track a single request across multiple callbacks. 13571 /// 13572 extern(System) uint64 function (cef_request_t* self) nothrow get_identifier; 13573 } 13574 13575 13576 13577 /// 13578 // Create a new cef_request_t object. 13579 /// 13580 cef_request_t* cef_request_create (); 13581 13582 /// 13583 // Structure used to represent post data for a web request. The functions of 13584 // this structure may be called on any thread. 13585 /// 13586 struct cef_post_data_t 13587 { 13588 /// 13589 // Base structure. 13590 /// 13591 cef_base_ref_counted_t base; 13592 13593 /// 13594 // Returns true (1) if this object is read-only. 13595 /// 13596 extern(System) int function (cef_post_data_t* self) nothrow is_read_only; 13597 13598 /// 13599 // Returns true (1) if the underlying POST data includes elements that are not 13600 // represented by this cef_post_data_t object (for example, multi-part file 13601 // upload data). Modifying cef_post_data_t objects with excluded elements may 13602 // result in the request failing. 13603 /// 13604 extern(System) int function (cef_post_data_t* self) nothrow has_excluded_elements; 13605 13606 /// 13607 // Returns the number of existing post data elements. 13608 /// 13609 extern(System) size_t function (cef_post_data_t* self) nothrow get_element_count; 13610 13611 /// 13612 // Retrieve the post data elements. 13613 /// 13614 extern(System) void function ( 13615 cef_post_data_t* self, 13616 size_t* elementsCount, 13617 cef_post_data_element_t** elements) nothrow get_elements; 13618 13619 /// 13620 // Remove the specified post data element. Returns true (1) if the removal 13621 // succeeds. 13622 /// 13623 extern(System) int function ( 13624 cef_post_data_t* self, 13625 cef_post_data_element_t* element) nothrow remove_element; 13626 13627 /// 13628 // Add the specified post data element. Returns true (1) if the add succeeds. 13629 /// 13630 extern(System) int function ( 13631 cef_post_data_t* self, 13632 cef_post_data_element_t* element) nothrow add_element; 13633 13634 /// 13635 // Remove all existing post data elements. 13636 /// 13637 extern(System) void function (cef_post_data_t* self) nothrow remove_elements; 13638 } 13639 13640 13641 13642 /// 13643 // Create a new cef_post_data_t object. 13644 /// 13645 cef_post_data_t* cef_post_data_create (); 13646 13647 /// 13648 // Structure used to represent a single element in the request post data. The 13649 // functions of this structure may be called on any thread. 13650 /// 13651 struct cef_post_data_element_t 13652 { 13653 /// 13654 // Base structure. 13655 /// 13656 cef_base_ref_counted_t base; 13657 13658 /// 13659 // Returns true (1) if this object is read-only. 13660 /// 13661 extern(System) int function (cef_post_data_element_t* self) nothrow is_read_only; 13662 13663 /// 13664 // Remove all contents from the post data element. 13665 /// 13666 extern(System) void function (cef_post_data_element_t* self) nothrow set_to_empty; 13667 13668 /// 13669 // The post data element will represent a file. 13670 /// 13671 extern(System) void function ( 13672 cef_post_data_element_t* self, 13673 const(cef_string_t)* fileName) nothrow set_to_file; 13674 13675 /// 13676 // The post data element will represent bytes. The bytes passed in will be 13677 // copied. 13678 /// 13679 extern(System) void function ( 13680 cef_post_data_element_t* self, 13681 size_t size, 13682 const(void)* bytes) nothrow set_to_bytes; 13683 13684 /// 13685 // Return the type of this post data element. 13686 /// 13687 extern(System) cef_postdataelement_type_t function ( 13688 cef_post_data_element_t* self) nothrow get_type; 13689 13690 /// 13691 // Return the file name. 13692 /// 13693 // The resulting string must be freed by calling cef_string_userfree_free(). 13694 extern(System) cef_string_userfree_t function (cef_post_data_element_t* self) nothrow get_file; 13695 13696 /// 13697 // Return the number of bytes. 13698 /// 13699 extern(System) size_t function (cef_post_data_element_t* self) nothrow get_bytes_count; 13700 13701 /// 13702 // Read up to |size| bytes into |bytes| and return the number of bytes 13703 // actually read. 13704 /// 13705 extern(System) size_t function ( 13706 cef_post_data_element_t* self, 13707 size_t size, 13708 void* bytes) nothrow get_bytes; 13709 } 13710 13711 13712 13713 /// 13714 // Create a new cef_post_data_element_t object. 13715 /// 13716 cef_post_data_element_t* cef_post_data_element_create (); 13717 13718 // CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_ 13719 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 13720 // 13721 // Redistribution and use in source and binary forms, with or without 13722 // modification, are permitted provided that the following conditions are 13723 // met: 13724 // 13725 // * Redistributions of source code must retain the above copyright 13726 // notice, this list of conditions and the following disclaimer. 13727 // * Redistributions in binary form must reproduce the above 13728 // copyright notice, this list of conditions and the following disclaimer 13729 // in the documentation and/or other materials provided with the 13730 // distribution. 13731 // * Neither the name of Google Inc. nor the name Chromium Embedded 13732 // Framework nor the names of its contributors may be used to endorse 13733 // or promote products derived from this software without specific prior 13734 // written permission. 13735 // 13736 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13737 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13738 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13739 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13740 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13741 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13742 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13743 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13744 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13745 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13746 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13747 // 13748 // --------------------------------------------------------------------------- 13749 // 13750 // This file was generated by the CEF translator tool and should not edited 13751 // by hand. See the translator.README.txt file in the tools directory for 13752 // more information. 13753 // 13754 // $hash=2e42334fc22050e207e5a0af6fe290a592e4105f$ 13755 // 13756 13757 extern (C): 13758 13759 13760 13761 13762 /// 13763 // Callback structure for cef_request_context_t::ResolveHost. 13764 /// 13765 struct cef_resolve_callback_t 13766 { 13767 /// 13768 // Base structure. 13769 /// 13770 cef_base_ref_counted_t base; 13771 13772 /// 13773 // Called on the UI thread after the ResolveHost request has completed. 13774 // |result| will be the result code. |resolved_ips| will be the list of 13775 // resolved IP addresses or NULL if the resolution failed. 13776 /// 13777 extern(System) void function ( 13778 cef_resolve_callback_t* self, 13779 cef_errorcode_t result, 13780 cef_string_list_t resolved_ips) nothrow on_resolve_completed; 13781 } 13782 13783 13784 13785 /// 13786 // A request context provides request handling for a set of related browser or 13787 // URL request objects. A request context can be specified when creating a new 13788 // browser via the cef_browser_host_t static factory functions or when creating 13789 // a new URL request via the cef_urlrequest_t static factory functions. Browser 13790 // objects with different request contexts will never be hosted in the same 13791 // render process. Browser objects with the same request context may or may not 13792 // be hosted in the same render process depending on the process model. Browser 13793 // objects created indirectly via the JavaScript window.open function or 13794 // targeted links will share the same render process and the same request 13795 // context as the source browser. When running in single-process mode there is 13796 // only a single render process (the main process) and so all browsers created 13797 // in single-process mode will share the same request context. This will be the 13798 // first request context passed into a cef_browser_host_t static factory 13799 // function and all other request context objects will be ignored. 13800 /// 13801 struct cef_request_context_t 13802 { 13803 /// 13804 // Base structure. 13805 /// 13806 cef_base_ref_counted_t base; 13807 13808 /// 13809 // Returns true (1) if this object is pointing to the same context as |that| 13810 // object. 13811 /// 13812 extern(System) int function ( 13813 cef_request_context_t* self, 13814 cef_request_context_t* other) nothrow is_same; 13815 13816 /// 13817 // Returns true (1) if this object is sharing the same storage as |that| 13818 // object. 13819 /// 13820 extern(System) int function ( 13821 cef_request_context_t* self, 13822 cef_request_context_t* other) nothrow is_sharing_with; 13823 13824 /// 13825 // Returns true (1) if this object is the global context. The global context 13826 // is used by default when creating a browser or URL request with a NULL 13827 // context argument. 13828 /// 13829 extern(System) int function (cef_request_context_t* self) nothrow is_global; 13830 13831 /// 13832 // Returns the handler for this context if any. 13833 /// 13834 extern(System) cef_request_context_handler_t* function ( 13835 cef_request_context_t* self) nothrow get_handler; 13836 13837 /// 13838 // Returns the cache path for this object. If NULL an "incognito mode" in- 13839 // memory cache is being used. 13840 /// 13841 // The resulting string must be freed by calling cef_string_userfree_free(). 13842 extern(System) cef_string_userfree_t function ( 13843 cef_request_context_t* self) nothrow get_cache_path; 13844 13845 /// 13846 // Returns the cookie manager for this object. If |callback| is non-NULL it 13847 // will be executed asnychronously on the UI thread after the manager's 13848 // storage has been initialized. 13849 /// 13850 extern(System) cef_cookie_manager_t* function ( 13851 cef_request_context_t* self, 13852 cef_completion_callback_t* callback) nothrow get_cookie_manager; 13853 13854 /// 13855 // Register a scheme handler factory for the specified |scheme_name| and 13856 // optional |domain_name|. An NULL |domain_name| value for a standard scheme 13857 // will cause the factory to match all domain names. The |domain_name| value 13858 // will be ignored for non-standard schemes. If |scheme_name| is a built-in 13859 // scheme and no handler is returned by |factory| then the built-in scheme 13860 // handler factory will be called. If |scheme_name| is a custom scheme then 13861 // you must also implement the cef_app_t::on_register_custom_schemes() 13862 // function in all processes. This function may be called multiple times to 13863 // change or remove the factory that matches the specified |scheme_name| and 13864 // optional |domain_name|. Returns false (0) if an error occurs. This function 13865 // may be called on any thread in the browser process. 13866 /// 13867 extern(System) int function ( 13868 cef_request_context_t* self, 13869 const(cef_string_t)* scheme_name, 13870 const(cef_string_t)* domain_name, 13871 cef_scheme_handler_factory_t* factory) nothrow register_scheme_handler_factory; 13872 13873 /// 13874 // Clear all registered scheme handler factories. Returns false (0) on error. 13875 // This function may be called on any thread in the browser process. 13876 /// 13877 extern(System) int function (cef_request_context_t* self) nothrow clear_scheme_handler_factories; 13878 13879 /// 13880 // Tells all renderer processes associated with this context to throw away 13881 // their plugin list cache. If |reload_pages| is true (1) they will also 13882 // reload all pages with plugins. 13883 // cef_request_context_handler_t::OnBeforePluginLoad may be called to rebuild 13884 // the plugin list cache. 13885 /// 13886 extern(System) void function ( 13887 cef_request_context_t* self, 13888 int reload_pages) nothrow purge_plugin_list_cache; 13889 13890 /// 13891 // Returns true (1) if a preference with the specified |name| exists. This 13892 // function must be called on the browser process UI thread. 13893 /// 13894 extern(System) int function ( 13895 cef_request_context_t* self, 13896 const(cef_string_t)* name) nothrow has_preference; 13897 13898 /// 13899 // Returns the value for the preference with the specified |name|. Returns 13900 // NULL if the preference does not exist. The returned object contains a copy 13901 // of the underlying preference value and modifications to the returned object 13902 // will not modify the underlying preference value. This function must be 13903 // called on the browser process UI thread. 13904 /// 13905 extern(System) cef_value_t* function ( 13906 cef_request_context_t* self, 13907 const(cef_string_t)* name) nothrow get_preference; 13908 13909 /// 13910 // Returns all preferences as a dictionary. If |include_defaults| is true (1) 13911 // then preferences currently at their default value will be included. The 13912 // returned object contains a copy of the underlying preference values and 13913 // modifications to the returned object will not modify the underlying 13914 // preference values. This function must be called on the browser process UI 13915 // thread. 13916 /// 13917 extern(System) cef_dictionary_value_t* function ( 13918 cef_request_context_t* self, 13919 int include_defaults) nothrow get_all_preferences; 13920 13921 /// 13922 // Returns true (1) if the preference with the specified |name| can be 13923 // modified using SetPreference. As one example preferences set via the 13924 // command-line usually cannot be modified. This function must be called on 13925 // the browser process UI thread. 13926 /// 13927 extern(System) int function ( 13928 cef_request_context_t* self, 13929 const(cef_string_t)* name) nothrow can_set_preference; 13930 13931 /// 13932 // Set the |value| associated with preference |name|. Returns true (1) if the 13933 // value is set successfully and false (0) otherwise. If |value| is NULL the 13934 // preference will be restored to its default value. If setting the preference 13935 // fails then |error| will be populated with a detailed description of the 13936 // problem. This function must be called on the browser process UI thread. 13937 /// 13938 extern(System) int function ( 13939 cef_request_context_t* self, 13940 const(cef_string_t)* name, 13941 cef_value_t* value, 13942 cef_string_t* error) nothrow set_preference; 13943 13944 /// 13945 // Clears all certificate exceptions that were added as part of handling 13946 // cef_request_handler_t::on_certificate_error(). If you call this it is 13947 // recommended that you also call close_all_connections() or you risk not 13948 // being prompted again for server certificates if you reconnect quickly. If 13949 // |callback| is non-NULL it will be executed on the UI thread after 13950 // completion. 13951 /// 13952 extern(System) void function ( 13953 cef_request_context_t* self, 13954 cef_completion_callback_t* callback) nothrow clear_certificate_exceptions; 13955 13956 /// 13957 // Clears all HTTP authentication credentials that were added as part of 13958 // handling GetAuthCredentials. If |callback| is non-NULL it will be executed 13959 // on the UI thread after completion. 13960 /// 13961 extern(System) void function ( 13962 cef_request_context_t* self, 13963 cef_completion_callback_t* callback) nothrow clear_http_auth_credentials; 13964 13965 /// 13966 // Clears all active and idle connections that Chromium currently has. This is 13967 // only recommended if you have released all other CEF objects but don't yet 13968 // want to call cef_shutdown(). If |callback| is non-NULL it will be executed 13969 // on the UI thread after completion. 13970 /// 13971 extern(System) void function ( 13972 cef_request_context_t* self, 13973 cef_completion_callback_t* callback) nothrow close_all_connections; 13974 13975 /// 13976 // Attempts to resolve |origin| to a list of associated IP addresses. 13977 // |callback| will be executed on the UI thread after completion. 13978 /// 13979 extern(System) void function ( 13980 cef_request_context_t* self, 13981 const(cef_string_t)* origin, 13982 cef_resolve_callback_t* callback) nothrow resolve_host; 13983 13984 /// 13985 // Load an extension. 13986 // 13987 // If extension resources will be read from disk using the default load 13988 // implementation then |root_directory| should be the absolute path to the 13989 // extension resources directory and |manifest| should be NULL. If extension 13990 // resources will be provided by the client (e.g. via cef_request_handler_t 13991 // and/or cef_extension_handler_t) then |root_directory| should be a path 13992 // component unique to the extension (if not absolute this will be internally 13993 // prefixed with the PK_DIR_RESOURCES path) and |manifest| should contain the 13994 // contents that would otherwise be read from the "manifest.json" file on 13995 // disk. 13996 // 13997 // The loaded extension will be accessible in all contexts sharing the same 13998 // storage (HasExtension returns true (1)). However, only the context on which 13999 // this function was called is considered the loader (DidLoadExtension returns 14000 // true (1)) and only the loader will receive cef_request_context_handler_t 14001 // callbacks for the extension. 14002 // 14003 // cef_extension_handler_t::OnExtensionLoaded will be called on load success 14004 // or cef_extension_handler_t::OnExtensionLoadFailed will be called on load 14005 // failure. 14006 // 14007 // If the extension specifies a background script via the "background" 14008 // manifest key then cef_extension_handler_t::OnBeforeBackgroundBrowser will 14009 // be called to create the background browser. See that function for 14010 // additional information about background scripts. 14011 // 14012 // For visible extension views the client application should evaluate the 14013 // manifest to determine the correct extension URL to load and then pass that 14014 // URL to the cef_browser_host_t::CreateBrowser* function after the extension 14015 // has loaded. For example, the client can look for the "browser_action" 14016 // manifest key as documented at 14017 // https://developer.chrome.com/extensions/browserAction. Extension URLs take 14018 // the form "chrome-extension://<extension_id>/<path>". 14019 // 14020 // Browsers that host extensions differ from normal browsers as follows: 14021 // - Can access chrome.* JavaScript APIs if allowed by the manifest. Visit 14022 // chrome://extensions-support for the list of extension APIs currently 14023 // supported by CEF. 14024 // - Main frame navigation to non-extension content is blocked. 14025 // - Pinch-zooming is disabled. 14026 // - CefBrowserHost::GetExtension returns the hosted extension. 14027 // - CefBrowserHost::IsBackgroundHost returns true for background hosts. 14028 // 14029 // See https://developer.chrome.com/extensions for extension implementation 14030 // and usage documentation. 14031 /// 14032 extern(System) void function ( 14033 cef_request_context_t* self, 14034 const(cef_string_t)* root_directory, 14035 cef_dictionary_value_t* manifest, 14036 cef_extension_handler_t* handler) nothrow load_extension; 14037 14038 /// 14039 // Returns true (1) if this context was used to load the extension identified 14040 // by |extension_id|. Other contexts sharing the same storage will also have 14041 // access to the extension (see HasExtension). This function must be called on 14042 // the browser process UI thread. 14043 /// 14044 extern(System) int function ( 14045 cef_request_context_t* self, 14046 const(cef_string_t)* extension_id) nothrow did_load_extension; 14047 14048 /// 14049 // Returns true (1) if this context has access to the extension identified by 14050 // |extension_id|. This may not be the context that was used to load the 14051 // extension (see DidLoadExtension). This function must be called on the 14052 // browser process UI thread. 14053 /// 14054 extern(System) int function ( 14055 cef_request_context_t* self, 14056 const(cef_string_t)* extension_id) nothrow has_extension; 14057 14058 /// 14059 // Retrieve the list of all extensions that this context has access to (see 14060 // HasExtension). |extension_ids| will be populated with the list of extension 14061 // ID values. Returns true (1) on success. This function must be called on the 14062 // browser process UI thread. 14063 /// 14064 extern(System) int function ( 14065 cef_request_context_t* self, 14066 cef_string_list_t extension_ids) nothrow get_extensions; 14067 14068 /// 14069 // Returns the extension matching |extension_id| or NULL if no matching 14070 // extension is accessible in this context (see HasExtension). This function 14071 // must be called on the browser process UI thread. 14072 /// 14073 extern(System) cef_extension_t* function ( 14074 cef_request_context_t* self, 14075 const(cef_string_t)* extension_id) nothrow get_extension; 14076 14077 /// 14078 // Returns the MediaRouter object associated with this context. If |callback| 14079 // is non-NULL it will be executed asnychronously on the UI thread after the 14080 // manager's context has been initialized. 14081 /// 14082 extern(System) cef_media_router_t* function ( 14083 cef_request_context_t* self, 14084 cef_completion_callback_t* callback) nothrow get_media_router; 14085 } 14086 14087 14088 14089 /// 14090 // Returns the global context object. 14091 /// 14092 cef_request_context_t* cef_request_context_get_global_context (); 14093 14094 /// 14095 // Creates a new context object with the specified |settings| and optional 14096 // |handler|. 14097 /// 14098 cef_request_context_t* cef_request_context_create_context ( 14099 const(cef_request_context_settings_t)* settings, 14100 cef_request_context_handler_t* handler); 14101 14102 /// 14103 // Creates a new context object that shares storage with |other| and uses an 14104 // optional |handler|. 14105 /// 14106 cef_request_context_t* cef_create_context_shared ( 14107 cef_request_context_t* other, 14108 cef_request_context_handler_t* handler); 14109 14110 // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_ 14111 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 14112 // 14113 // Redistribution and use in source and binary forms, with or without 14114 // modification, are permitted provided that the following conditions are 14115 // met: 14116 // 14117 // * Redistributions of source code must retain the above copyright 14118 // notice, this list of conditions and the following disclaimer. 14119 // * Redistributions in binary form must reproduce the above 14120 // copyright notice, this list of conditions and the following disclaimer 14121 // in the documentation and/or other materials provided with the 14122 // distribution. 14123 // * Neither the name of Google Inc. nor the name Chromium Embedded 14124 // Framework nor the names of its contributors may be used to endorse 14125 // or promote products derived from this software without specific prior 14126 // written permission. 14127 // 14128 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14129 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14130 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14131 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14132 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14133 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14134 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14135 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14136 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14137 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14138 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14139 // 14140 // --------------------------------------------------------------------------- 14141 // 14142 // This file was generated by the CEF translator tool and should not edited 14143 // by hand. See the translator.README.txt file in the tools directory for 14144 // more information. 14145 // 14146 // $hash=fa148db8a0ecd79966814086fb92e439687be701$ 14147 // 14148 14149 extern (C): 14150 14151 /// 14152 // Implement this structure to provide handler implementations. The handler 14153 // instance will not be released until all objects related to the context have 14154 // been destroyed. 14155 /// 14156 struct cef_request_context_handler_t 14157 { 14158 /// 14159 // Base structure. 14160 /// 14161 cef_base_ref_counted_t base; 14162 14163 /// 14164 // Called on the browser process UI thread immediately after the request 14165 // context has been initialized. 14166 /// 14167 extern(System) void function ( 14168 cef_request_context_handler_t* self, 14169 cef_request_context_t* request_context) nothrow on_request_context_initialized; 14170 14171 /// 14172 // Called on multiple browser process threads before a plugin instance is 14173 // loaded. |mime_type| is the mime type of the plugin that will be loaded. 14174 // |plugin_url| is the content URL that the plugin will load and may be NULL. 14175 // |is_main_frame| will be true (1) if the plugin is being loaded in the main 14176 // (top-level) frame, |top_origin_url| is the URL for the top-level frame that 14177 // contains the plugin when loading a specific plugin instance or NULL when 14178 // building the initial list of enabled plugins for 'navigator.plugins' 14179 // JavaScript state. |plugin_info| includes additional information about the 14180 // plugin that will be loaded. |plugin_policy| is the recommended policy. 14181 // Modify |plugin_policy| and return true (1) to change the policy. Return 14182 // false (0) to use the recommended policy. The default plugin policy can be 14183 // set at runtime using the `--plugin-policy=[allow|detect|block]` command- 14184 // line flag. Decisions to mark a plugin as disabled by setting 14185 // |plugin_policy| to PLUGIN_POLICY_DISABLED may be cached when 14186 // |top_origin_url| is NULL. To purge the plugin list cache and potentially 14187 // trigger new calls to this function call 14188 // cef_request_context_t::PurgePluginListCache. 14189 /// 14190 extern(System) int function ( 14191 cef_request_context_handler_t* self, 14192 const(cef_string_t)* mime_type, 14193 const(cef_string_t)* plugin_url, 14194 int is_main_frame, 14195 const(cef_string_t)* top_origin_url, 14196 cef_web_plugin_info_t* plugin_info, 14197 cef_plugin_policy_t* plugin_policy) nothrow on_before_plugin_load; 14198 14199 /// 14200 // Called on the browser process IO thread before a resource request is 14201 // initiated. The |browser| and |frame| values represent the source of the 14202 // request, and may be NULL for requests originating from service workers or 14203 // cef_urlrequest_t. |request| represents the request contents and cannot be 14204 // modified in this callback. |is_navigation| will be true (1) if the resource 14205 // request is a navigation. |is_download| will be true (1) if the resource 14206 // request is a download. |request_initiator| is the origin (scheme + domain) 14207 // of the page that initiated the request. Set |disable_default_handling| to 14208 // true (1) to disable default handling of the request, in which case it will 14209 // need to be handled via cef_resource_request_handler_t::GetResourceHandler 14210 // or it will be canceled. To allow the resource load to proceed with default 14211 // handling return NULL. To specify a handler for the resource return a 14212 // cef_resource_request_handler_t object. This function will not be called if 14213 // the client associated with |browser| returns a non-NULL value from 14214 // cef_request_handler_t::GetResourceRequestHandler for the same request 14215 // (identified by cef_request_t::GetIdentifier). 14216 /// 14217 extern(System) cef_resource_request_handler_t* function ( 14218 cef_request_context_handler_t* self, 14219 cef_browser_t* browser, 14220 cef_frame_t* frame, 14221 cef_request_t* request, 14222 int is_navigation, 14223 int is_download, 14224 const(cef_string_t)* request_initiator, 14225 int* disable_default_handling) nothrow get_resource_request_handler; 14226 } 14227 14228 14229 14230 // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_ 14231 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 14232 // 14233 // Redistribution and use in source and binary forms, with or without 14234 // modification, are permitted provided that the following conditions are 14235 // met: 14236 // 14237 // * Redistributions of source code must retain the above copyright 14238 // notice, this list of conditions and the following disclaimer. 14239 // * Redistributions in binary form must reproduce the above 14240 // copyright notice, this list of conditions and the following disclaimer 14241 // in the documentation and/or other materials provided with the 14242 // distribution. 14243 // * Neither the name of Google Inc. nor the name Chromium Embedded 14244 // Framework nor the names of its contributors may be used to endorse 14245 // or promote products derived from this software without specific prior 14246 // written permission. 14247 // 14248 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14249 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14250 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14251 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14252 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14253 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14254 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14255 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14256 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14257 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14258 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14259 // 14260 // --------------------------------------------------------------------------- 14261 // 14262 // This file was generated by the CEF translator tool and should not edited 14263 // by hand. See the translator.README.txt file in the tools directory for 14264 // more information. 14265 // 14266 // $hash=83ff671e8a4db001029be8a02a414333fe4354af$ 14267 // 14268 14269 extern (C): 14270 14271 /// 14272 // Callback structure used to select a client certificate for authentication. 14273 /// 14274 struct cef_select_client_certificate_callback_t 14275 { 14276 /// 14277 // Base structure. 14278 /// 14279 cef_base_ref_counted_t base; 14280 14281 /// 14282 // Chooses the specified certificate for client certificate authentication. 14283 // NULL value means that no client certificate should be used. 14284 /// 14285 extern(System) void function ( 14286 cef_select_client_certificate_callback_t* self, 14287 cef_x509certificate_t* cert) nothrow select; 14288 } 14289 14290 14291 14292 /// 14293 // Implement this structure to handle events related to browser requests. The 14294 // functions of this structure will be called on the thread indicated. 14295 /// 14296 struct cef_request_handler_t 14297 { 14298 /// 14299 // Base structure. 14300 /// 14301 cef_base_ref_counted_t base; 14302 14303 /// 14304 // Called on the UI thread before browser navigation. Return true (1) to 14305 // cancel the navigation or false (0) to allow the navigation to proceed. The 14306 // |request| object cannot be modified in this callback. 14307 // cef_load_handler_t::OnLoadingStateChange will be called twice in all cases. 14308 // If the navigation is allowed cef_load_handler_t::OnLoadStart and 14309 // cef_load_handler_t::OnLoadEnd will be called. If the navigation is canceled 14310 // cef_load_handler_t::OnLoadError will be called with an |errorCode| value of 14311 // ERR_ABORTED. The |user_gesture| value will be true (1) if the browser 14312 // navigated via explicit user gesture (e.g. clicking a link) or false (0) if 14313 // it navigated automatically (e.g. via the DomContentLoaded event). 14314 /// 14315 extern(System) int function ( 14316 cef_request_handler_t* self, 14317 cef_browser_t* browser, 14318 cef_frame_t* frame, 14319 cef_request_t* request, 14320 int user_gesture, 14321 int is_redirect) nothrow on_before_browse; 14322 14323 /// 14324 // Called on the UI thread before OnBeforeBrowse in certain limited cases 14325 // where navigating a new or different browser might be desirable. This 14326 // includes user-initiated navigation that might open in a special way (e.g. 14327 // links clicked via middle-click or ctrl + left-click) and certain types of 14328 // cross-origin navigation initiated from the renderer process (e.g. 14329 // navigating the top-level frame to/from a file URL). The |browser| and 14330 // |frame| values represent the source of the navigation. The 14331 // |target_disposition| value indicates where the user intended to navigate 14332 // the browser based on standard Chromium behaviors (e.g. current tab, new 14333 // tab, etc). The |user_gesture| value will be true (1) if the browser 14334 // navigated via explicit user gesture (e.g. clicking a link) or false (0) if 14335 // it navigated automatically (e.g. via the DomContentLoaded event). Return 14336 // true (1) to cancel the navigation or false (0) to allow the navigation to 14337 // proceed in the source browser's top-level frame. 14338 /// 14339 extern(System) int function ( 14340 cef_request_handler_t* self, 14341 cef_browser_t* browser, 14342 cef_frame_t* frame, 14343 const(cef_string_t)* target_url, 14344 cef_window_open_disposition_t target_disposition, 14345 int user_gesture) nothrow on_open_urlfrom_tab; 14346 14347 /// 14348 // Called on the browser process IO thread before a resource request is 14349 // initiated. The |browser| and |frame| values represent the source of the 14350 // request. |request| represents the request contents and cannot be modified 14351 // in this callback. |is_navigation| will be true (1) if the resource request 14352 // is a navigation. |is_download| will be true (1) if the resource request is 14353 // a download. |request_initiator| is the origin (scheme + domain) of the page 14354 // that initiated the request. Set |disable_default_handling| to true (1) to 14355 // disable default handling of the request, in which case it will need to be 14356 // handled via cef_resource_request_handler_t::GetResourceHandler or it will 14357 // be canceled. To allow the resource load to proceed with default handling 14358 // return NULL. To specify a handler for the resource return a 14359 // cef_resource_request_handler_t object. If this callback returns NULL the 14360 // same function will be called on the associated 14361 // cef_request_context_handler_t, if any. 14362 /// 14363 extern(System) cef_resource_request_handler_t* function ( 14364 cef_request_handler_t* self, 14365 cef_browser_t* browser, 14366 cef_frame_t* frame, 14367 cef_request_t* request, 14368 int is_navigation, 14369 int is_download, 14370 const(cef_string_t)* request_initiator, 14371 int* disable_default_handling) nothrow get_resource_request_handler; 14372 14373 /// 14374 // Called on the IO thread when the browser needs credentials from the user. 14375 // |origin_url| is the origin making this authentication request. |isProxy| 14376 // indicates whether the host is a proxy server. |host| contains the hostname 14377 // and |port| contains the port number. |realm| is the realm of the challenge 14378 // and may be NULL. |scheme| is the authentication scheme used, such as 14379 // "basic" or "digest", and will be NULL if the source of the request is an 14380 // FTP server. Return true (1) to continue the request and call 14381 // cef_auth_callback_t::cont() either in this function or at a later time when 14382 // the authentication information is available. Return false (0) to cancel the 14383 // request immediately. 14384 /// 14385 extern(System) int function ( 14386 cef_request_handler_t* self, 14387 cef_browser_t* browser, 14388 const(cef_string_t)* origin_url, 14389 int isProxy, 14390 const(cef_string_t)* host, 14391 int port, 14392 const(cef_string_t)* realm, 14393 const(cef_string_t)* scheme, 14394 cef_auth_callback_t* callback) nothrow get_auth_credentials; 14395 14396 /// 14397 // Called on the IO thread when JavaScript requests a specific storage quota 14398 // size via the webkitStorageInfo.requestQuota function. |origin_url| is the 14399 // origin of the page making the request. |new_size| is the requested quota 14400 // size in bytes. Return true (1) to continue the request and call 14401 // cef_callback_t functions either in this function or at a later time to 14402 // grant or deny the request. Return false (0) to cancel the request 14403 // immediately. 14404 /// 14405 extern(System) int function ( 14406 cef_request_handler_t* self, 14407 cef_browser_t* browser, 14408 const(cef_string_t)* origin_url, 14409 int64 new_size, 14410 cef_callback_t* callback) nothrow on_quota_request; 14411 14412 /// 14413 // Called on the UI thread to handle requests for URLs with an invalid SSL 14414 // certificate. Return true (1) and call cef_callback_t functions either in 14415 // this function or at a later time to continue or cancel the request. Return 14416 // false (0) to cancel the request immediately. If 14417 // CefSettings.ignore_certificate_errors is set all invalid certificates will 14418 // be accepted without calling this function. 14419 /// 14420 extern(System) int function ( 14421 cef_request_handler_t* self, 14422 cef_browser_t* browser, 14423 cef_errorcode_t cert_error, 14424 const(cef_string_t)* request_url, 14425 cef_sslinfo_t* ssl_info, 14426 cef_callback_t* callback) nothrow on_certificate_error; 14427 14428 /// 14429 // Called on the UI thread when a client certificate is being requested for 14430 // authentication. Return false (0) to use the default behavior and 14431 // automatically select the first certificate available. Return true (1) and 14432 // call cef_select_client_certificate_callback_t::Select either in this 14433 // function or at a later time to select a certificate. Do not call Select or 14434 // call it with NULL to continue without using any certificate. |isProxy| 14435 // indicates whether the host is an HTTPS proxy or the origin server. |host| 14436 // and |port| contains the hostname and port of the SSL server. |certificates| 14437 // is the list of certificates to choose from; this list has already been 14438 // pruned by Chromium so that it only contains certificates from issuers that 14439 // the server trusts. 14440 /// 14441 extern(System) int function ( 14442 cef_request_handler_t* self, 14443 cef_browser_t* browser, 14444 int isProxy, 14445 const(cef_string_t)* host, 14446 int port, 14447 size_t certificatesCount, 14448 cef_x509certificate_t** certificates, 14449 cef_select_client_certificate_callback_t* callback) nothrow on_select_client_certificate; 14450 14451 /// 14452 // Called on the browser process UI thread when a plugin has crashed. 14453 // |plugin_path| is the path of the plugin that crashed. 14454 /// 14455 extern(System) void function ( 14456 cef_request_handler_t* self, 14457 cef_browser_t* browser, 14458 const(cef_string_t)* plugin_path) nothrow on_plugin_crashed; 14459 14460 /// 14461 // Called on the browser process UI thread when the render view associated 14462 // with |browser| is ready to receive/handle IPC messages in the render 14463 // process. 14464 /// 14465 extern(System) void function ( 14466 cef_request_handler_t* self, 14467 cef_browser_t* browser) nothrow on_render_view_ready; 14468 14469 /// 14470 // Called on the browser process UI thread when the render process terminates 14471 // unexpectedly. |status| indicates how the process terminated. 14472 /// 14473 extern(System) void function ( 14474 cef_request_handler_t* self, 14475 cef_browser_t* browser, 14476 cef_termination_status_t status) nothrow on_render_process_terminated; 14477 14478 /// 14479 // Called on the browser process UI thread when the window.document object of 14480 // the main frame has been created. 14481 /// 14482 extern(System) void function ( 14483 cef_request_handler_t* self, 14484 cef_browser_t* browser) nothrow on_document_available_in_main_frame; 14485 } 14486 14487 14488 14489 // CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_ 14490 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 14491 // 14492 // Redistribution and use in source and binary forms, with or without 14493 // modification, are permitted provided that the following conditions are 14494 // met: 14495 // 14496 // * Redistributions of source code must retain the above copyright 14497 // notice, this list of conditions and the following disclaimer. 14498 // * Redistributions in binary form must reproduce the above 14499 // copyright notice, this list of conditions and the following disclaimer 14500 // in the documentation and/or other materials provided with the 14501 // distribution. 14502 // * Neither the name of Google Inc. nor the name Chromium Embedded 14503 // Framework nor the names of its contributors may be used to endorse 14504 // or promote products derived from this software without specific prior 14505 // written permission. 14506 // 14507 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14508 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14509 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14510 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14511 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14512 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14513 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14514 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14515 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14516 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14517 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14518 // 14519 // --------------------------------------------------------------------------- 14520 // 14521 // This file was generated by the CEF translator tool and should not edited 14522 // by hand. See the translator.README.txt file in the tools directory for 14523 // more information. 14524 // 14525 // $hash=ffe0de3b50e0a612bd1b055b873c265b030e721d$ 14526 // 14527 14528 extern (C): 14529 14530 /// 14531 // Structure used for retrieving resources from the resource bundle (*.pak) 14532 // files loaded by CEF during startup or via the cef_resource_bundle_handler_t 14533 // returned from cef_app_t::GetResourceBundleHandler. See CefSettings for 14534 // additional options related to resource bundle loading. The functions of this 14535 // structure may be called on any thread unless otherwise indicated. 14536 /// 14537 struct cef_resource_bundle_t 14538 { 14539 /// 14540 // Base structure. 14541 /// 14542 cef_base_ref_counted_t base; 14543 14544 /// 14545 // Returns the localized string for the specified |string_id| or an NULL 14546 // string if the value is not found. Include cef_pack_strings.h for a listing 14547 // of valid string ID values. 14548 /// 14549 // The resulting string must be freed by calling cef_string_userfree_free(). 14550 extern(System) cef_string_userfree_t function ( 14551 cef_resource_bundle_t* self, 14552 int string_id) nothrow get_localized_string; 14553 14554 /// 14555 // Returns a cef_binary_value_t containing the decompressed contents of the 14556 // specified scale independent |resource_id| or NULL if not found. Include 14557 // cef_pack_resources.h for a listing of valid resource ID values. 14558 /// 14559 extern(System) cef_binary_value_t* function ( 14560 cef_resource_bundle_t* self, 14561 int resource_id) nothrow get_data_resource; 14562 14563 /// 14564 // Returns a cef_binary_value_t containing the decompressed contents of the 14565 // specified |resource_id| nearest the scale factor |scale_factor| or NULL if 14566 // not found. Use a |scale_factor| value of SCALE_FACTOR_NONE for scale 14567 // independent resources or call GetDataResource instead.Include 14568 // cef_pack_resources.h for a listing of valid resource ID values. 14569 /// 14570 extern(System) cef_binary_value_t* function ( 14571 cef_resource_bundle_t* self, 14572 int resource_id, 14573 cef_scale_factor_t scale_factor) nothrow get_data_resource_for_scale; 14574 } 14575 14576 14577 14578 /// 14579 // Returns the global resource bundle instance. 14580 /// 14581 cef_resource_bundle_t* cef_resource_bundle_get_global (); 14582 14583 // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_ 14584 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 14585 // 14586 // Redistribution and use in source and binary forms, with or without 14587 // modification, are permitted provided that the following conditions are 14588 // met: 14589 // 14590 // * Redistributions of source code must retain the above copyright 14591 // notice, this list of conditions and the following disclaimer. 14592 // * Redistributions in binary form must reproduce the above 14593 // copyright notice, this list of conditions and the following disclaimer 14594 // in the documentation and/or other materials provided with the 14595 // distribution. 14596 // * Neither the name of Google Inc. nor the name Chromium Embedded 14597 // Framework nor the names of its contributors may be used to endorse 14598 // or promote products derived from this software without specific prior 14599 // written permission. 14600 // 14601 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14602 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14603 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14604 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14605 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14606 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14607 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14608 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14609 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14610 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14611 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14612 // 14613 // --------------------------------------------------------------------------- 14614 // 14615 // This file was generated by the CEF translator tool and should not edited 14616 // by hand. See the translator.README.txt file in the tools directory for 14617 // more information. 14618 // 14619 // $hash=b9723e0dfe6d03c24665eac2264396743a5254df$ 14620 // 14621 14622 extern (C): 14623 14624 /// 14625 // Structure used to implement a custom resource bundle structure. See 14626 // CefSettings for additional options related to resource bundle loading. The 14627 // functions of this structure may be called on multiple threads. 14628 /// 14629 struct cef_resource_bundle_handler_t 14630 { 14631 /// 14632 // Base structure. 14633 /// 14634 cef_base_ref_counted_t base; 14635 14636 /// 14637 // Called to retrieve a localized translation for the specified |string_id|. 14638 // To provide the translation set |string| to the translation string and 14639 // return true (1). To use the default translation return false (0). Include 14640 // cef_pack_strings.h for a listing of valid string ID values. 14641 /// 14642 extern(System) int function ( 14643 cef_resource_bundle_handler_t* self, 14644 int string_id, 14645 cef_string_t* string) nothrow get_localized_string; 14646 14647 /// 14648 // Called to retrieve data for the specified scale independent |resource_id|. 14649 // To provide the resource data set |data| and |data_size| to the data pointer 14650 // and size respectively and return true (1). To use the default resource data 14651 // return false (0). The resource data will not be copied and must remain 14652 // resident in memory. Include cef_pack_resources.h for a listing of valid 14653 // resource ID values. 14654 /// 14655 extern(System) int function ( 14656 cef_resource_bundle_handler_t* self, 14657 int resource_id, 14658 void** data, 14659 size_t* data_size) nothrow get_data_resource; 14660 14661 /// 14662 // Called to retrieve data for the specified |resource_id| nearest the scale 14663 // factor |scale_factor|. To provide the resource data set |data| and 14664 // |data_size| to the data pointer and size respectively and return true (1). 14665 // To use the default resource data return false (0). The resource data will 14666 // not be copied and must remain resident in memory. Include 14667 // cef_pack_resources.h for a listing of valid resource ID values. 14668 /// 14669 extern(System) int function ( 14670 cef_resource_bundle_handler_t* self, 14671 int resource_id, 14672 cef_scale_factor_t scale_factor, 14673 void** data, 14674 size_t* data_size) nothrow get_data_resource_for_scale; 14675 } 14676 14677 14678 14679 // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_ 14680 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 14681 // 14682 // Redistribution and use in source and binary forms, with or without 14683 // modification, are permitted provided that the following conditions are 14684 // met: 14685 // 14686 // * Redistributions of source code must retain the above copyright 14687 // notice, this list of conditions and the following disclaimer. 14688 // * Redistributions in binary form must reproduce the above 14689 // copyright notice, this list of conditions and the following disclaimer 14690 // in the documentation and/or other materials provided with the 14691 // distribution. 14692 // * Neither the name of Google Inc. nor the name Chromium Embedded 14693 // Framework nor the names of its contributors may be used to endorse 14694 // or promote products derived from this software without specific prior 14695 // written permission. 14696 // 14697 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14698 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14699 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14700 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14701 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14702 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14703 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14704 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14705 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14706 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14707 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14708 // 14709 // --------------------------------------------------------------------------- 14710 // 14711 // This file was generated by the CEF translator tool and should not edited 14712 // by hand. See the translator.README.txt file in the tools directory for 14713 // more information. 14714 // 14715 // $hash=a9598f4e94a864e749b425aa62bc519589f5753e$ 14716 // 14717 14718 extern (C): 14719 14720 /// 14721 // Callback for asynchronous continuation of cef_resource_handler_t::skip(). 14722 /// 14723 struct cef_resource_skip_callback_t 14724 { 14725 /// 14726 // Base structure. 14727 /// 14728 cef_base_ref_counted_t base; 14729 14730 /// 14731 // Callback for asynchronous continuation of skip(). If |bytes_skipped| > 0 14732 // then either skip() will be called again until the requested number of bytes 14733 // have been skipped or the request will proceed. If |bytes_skipped| <= 0 the 14734 // request will fail with ERR_REQUEST_RANGE_NOT_SATISFIABLE. 14735 /// 14736 extern(System) void function ( 14737 cef_resource_skip_callback_t* self, 14738 int64 bytes_skipped) nothrow cont; 14739 } 14740 14741 14742 14743 /// 14744 // Callback for asynchronous continuation of cef_resource_handler_t::read(). 14745 /// 14746 struct cef_resource_read_callback_t 14747 { 14748 /// 14749 // Base structure. 14750 /// 14751 cef_base_ref_counted_t base; 14752 14753 /// 14754 // Callback for asynchronous continuation of read(). If |bytes_read| == 0 the 14755 // response will be considered complete. If |bytes_read| > 0 then read() will 14756 // be called again until the request is complete (based on either the result 14757 // or the expected content length). If |bytes_read| < 0 then the request will 14758 // fail and the |bytes_read| value will be treated as the error code. 14759 /// 14760 extern(System) void function (cef_resource_read_callback_t* self, int bytes_read) nothrow cont; 14761 } 14762 14763 14764 14765 /// 14766 // Structure used to implement a custom request handler structure. The functions 14767 // of this structure will be called on the IO thread unless otherwise indicated. 14768 /// 14769 struct cef_resource_handler_t 14770 { 14771 /// 14772 // Base structure. 14773 /// 14774 cef_base_ref_counted_t base; 14775 14776 /// 14777 // Open the response stream. To handle the request immediately set 14778 // |handle_request| to true (1) and return true (1). To decide at a later time 14779 // set |handle_request| to false (0), return true (1), and execute |callback| 14780 // to continue or cancel the request. To cancel the request immediately set 14781 // |handle_request| to true (1) and return false (0). This function will be 14782 // called in sequence but not from a dedicated thread. For backwards 14783 // compatibility set |handle_request| to false (0) and return false (0) and 14784 // the ProcessRequest function will be called. 14785 /// 14786 extern(System) int function ( 14787 cef_resource_handler_t* self, 14788 cef_request_t* request, 14789 int* handle_request, 14790 cef_callback_t* callback) nothrow open; 14791 14792 /// 14793 // Begin processing the request. To handle the request return true (1) and 14794 // call cef_callback_t::cont() once the response header information is 14795 // available (cef_callback_t::cont() can also be called from inside this 14796 // function if header information is available immediately). To cancel the 14797 // request return false (0). 14798 // 14799 // WARNING: This function is deprecated. Use Open instead. 14800 /// 14801 extern(System) int function ( 14802 cef_resource_handler_t* self, 14803 cef_request_t* request, 14804 cef_callback_t* callback) nothrow process_request; 14805 14806 /// 14807 // Retrieve response header information. If the response length is not known 14808 // set |response_length| to -1 and read_response() will be called until it 14809 // returns false (0). If the response length is known set |response_length| to 14810 // a positive value and read_response() will be called until it returns false 14811 // (0) or the specified number of bytes have been read. Use the |response| 14812 // object to set the mime type, http status code and other optional header 14813 // values. To redirect the request to a new URL set |redirectUrl| to the new 14814 // URL. |redirectUrl| can be either a relative or fully qualified URL. It is 14815 // also possible to set |response| to a redirect http status code and pass the 14816 // new URL via a Location header. Likewise with |redirectUrl| it is valid to 14817 // set a relative or fully qualified URL as the Location header value. If an 14818 // error occured while setting up the request you can call set_error() on 14819 // |response| to indicate the error condition. 14820 /// 14821 extern(System) void function ( 14822 cef_resource_handler_t* self, 14823 cef_response_t* response, 14824 int64* response_length, 14825 cef_string_t* redirectUrl) nothrow get_response_headers; 14826 14827 /// 14828 // Skip response data when requested by a Range header. Skip over and discard 14829 // |bytes_to_skip| bytes of response data. If data is available immediately 14830 // set |bytes_skipped| to the number of bytes skipped and return true (1). To 14831 // read the data at a later time set |bytes_skipped| to 0, return true (1) and 14832 // execute |callback| when the data is available. To indicate failure set 14833 // |bytes_skipped| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This 14834 // function will be called in sequence but not from a dedicated thread. 14835 /// 14836 extern(System) int function ( 14837 cef_resource_handler_t* self, 14838 int64 bytes_to_skip, 14839 int64* bytes_skipped, 14840 cef_resource_skip_callback_t* callback) nothrow skip; 14841 14842 /// 14843 // Read response data. If data is available immediately copy up to 14844 // |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of 14845 // bytes copied, and return true (1). To read the data at a later time keep a 14846 // pointer to |data_out|, set |bytes_read| to 0, return true (1) and execute 14847 // |callback| when the data is available (|data_out| will remain valid until 14848 // the callback is executed). To indicate response completion set |bytes_read| 14849 // to 0 and return false (0). To indicate failure set |bytes_read| to < 0 14850 // (e.g. -2 for ERR_FAILED) and return false (0). This function will be called 14851 // in sequence but not from a dedicated thread. For backwards compatibility 14852 // set |bytes_read| to -1 and return false (0) and the ReadResponse function 14853 // will be called. 14854 /// 14855 extern(System) int function ( 14856 cef_resource_handler_t* self, 14857 void* data_out, 14858 int bytes_to_read, 14859 int* bytes_read, 14860 cef_resource_read_callback_t* callback) nothrow read; 14861 14862 /// 14863 // Read response data. If data is available immediately copy up to 14864 // |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of 14865 // bytes copied, and return true (1). To read the data at a later time set 14866 // |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when the 14867 // data is available. To indicate response completion return false (0). 14868 // 14869 // WARNING: This function is deprecated. Use Skip and Read instead. 14870 /// 14871 extern(System) int function ( 14872 cef_resource_handler_t* self, 14873 void* data_out, 14874 int bytes_to_read, 14875 int* bytes_read, 14876 cef_callback_t* callback) nothrow read_response; 14877 14878 /// 14879 // Request processing has been canceled. 14880 /// 14881 extern(System) void function (cef_resource_handler_t* self) nothrow cancel; 14882 } 14883 14884 14885 14886 // CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_ 14887 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 14888 // 14889 // Redistribution and use in source and binary forms, with or without 14890 // modification, are permitted provided that the following conditions are 14891 // met: 14892 // 14893 // * Redistributions of source code must retain the above copyright 14894 // notice, this list of conditions and the following disclaimer. 14895 // * Redistributions in binary form must reproduce the above 14896 // copyright notice, this list of conditions and the following disclaimer 14897 // in the documentation and/or other materials provided with the 14898 // distribution. 14899 // * Neither the name of Google Inc. nor the name Chromium Embedded 14900 // Framework nor the names of its contributors may be used to endorse 14901 // or promote products derived from this software without specific prior 14902 // written permission. 14903 // 14904 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14905 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14906 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14907 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14908 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14909 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14910 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14911 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14912 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14913 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14914 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14915 // 14916 // --------------------------------------------------------------------------- 14917 // 14918 // This file was generated by the CEF translator tool and should not edited 14919 // by hand. See the translator.README.txt file in the tools directory for 14920 // more information. 14921 // 14922 // $hash=7276396521b8b61cf856050244f558baa3a52e04$ 14923 // 14924 14925 extern (C): 14926 14927 /// 14928 // Implement this structure to handle events related to browser requests. The 14929 // functions of this structure will be called on the IO thread unless otherwise 14930 // indicated. 14931 /// 14932 struct cef_resource_request_handler_t 14933 { 14934 /// 14935 // Base structure. 14936 /// 14937 cef_base_ref_counted_t base; 14938 14939 /// 14940 // Called on the IO thread before a resource request is loaded. The |browser| 14941 // and |frame| values represent the source of the request, and may be NULL for 14942 // requests originating from service workers or cef_urlrequest_t. To 14943 // optionally filter cookies for the request return a 14944 // cef_cookie_access_filter_t object. The |request| object cannot not be 14945 // modified in this callback. 14946 /// 14947 extern(System) cef_cookie_access_filter_t* function ( 14948 cef_resource_request_handler_t* self, 14949 cef_browser_t* browser, 14950 cef_frame_t* frame, 14951 cef_request_t* request) nothrow get_cookie_access_filter; 14952 14953 /// 14954 // Called on the IO thread before a resource request is loaded. The |browser| 14955 // and |frame| values represent the source of the request, and may be NULL for 14956 // requests originating from service workers or cef_urlrequest_t. To redirect 14957 // or change the resource load optionally modify |request|. Modification of 14958 // the request URL will be treated as a redirect. Return RV_CONTINUE to 14959 // continue the request immediately. Return RV_CONTINUE_ASYNC and call 14960 // cef_callback_t functions at a later time to continue or cancel the request 14961 // asynchronously. Return RV_CANCEL to cancel the request immediately. 14962 // 14963 /// 14964 extern(System) cef_return_value_t function ( 14965 cef_resource_request_handler_t* self, 14966 cef_browser_t* browser, 14967 cef_frame_t* frame, 14968 cef_request_t* request, 14969 cef_callback_t* callback) nothrow on_before_resource_load; 14970 14971 /// 14972 // Called on the IO thread before a resource is loaded. The |browser| and 14973 // |frame| values represent the source of the request, and may be NULL for 14974 // requests originating from service workers or cef_urlrequest_t. To allow the 14975 // resource to load using the default network loader return NULL. To specify a 14976 // handler for the resource return a cef_resource_handler_t object. The 14977 // |request| object cannot not be modified in this callback. 14978 /// 14979 extern(System) cef_resource_handler_t* function ( 14980 cef_resource_request_handler_t* self, 14981 cef_browser_t* browser, 14982 cef_frame_t* frame, 14983 cef_request_t* request) nothrow get_resource_handler; 14984 14985 /// 14986 // Called on the IO thread when a resource load is redirected. The |browser| 14987 // and |frame| values represent the source of the request, and may be NULL for 14988 // requests originating from service workers or cef_urlrequest_t. The 14989 // |request| parameter will contain the old URL and other request-related 14990 // information. The |response| parameter will contain the response that 14991 // resulted in the redirect. The |new_url| parameter will contain the new URL 14992 // and can be changed if desired. The |request| and |response| objects cannot 14993 // be modified in this callback. 14994 /// 14995 extern(System) void function ( 14996 cef_resource_request_handler_t* self, 14997 cef_browser_t* browser, 14998 cef_frame_t* frame, 14999 cef_request_t* request, 15000 cef_response_t* response, 15001 cef_string_t* new_url) nothrow on_resource_redirect; 15002 15003 /// 15004 // Called on the IO thread when a resource response is received. The |browser| 15005 // and |frame| values represent the source of the request, and may be NULL for 15006 // requests originating from service workers or cef_urlrequest_t. To allow the 15007 // resource load to proceed without modification return false (0). To redirect 15008 // or retry the resource load optionally modify |request| and return true (1). 15009 // Modification of the request URL will be treated as a redirect. Requests 15010 // handled using the default network loader cannot be redirected in this 15011 // callback. The |response| object cannot be modified in this callback. 15012 // 15013 // WARNING: Redirecting using this function is deprecated. Use 15014 // OnBeforeResourceLoad or GetResourceHandler to perform redirects. 15015 /// 15016 extern(System) int function ( 15017 cef_resource_request_handler_t* self, 15018 cef_browser_t* browser, 15019 cef_frame_t* frame, 15020 cef_request_t* request, 15021 cef_response_t* response) nothrow on_resource_response; 15022 15023 /// 15024 // Called on the IO thread to optionally filter resource response content. The 15025 // |browser| and |frame| values represent the source of the request, and may 15026 // be NULL for requests originating from service workers or cef_urlrequest_t. 15027 // |request| and |response| represent the request and response respectively 15028 // and cannot be modified in this callback. 15029 /// 15030 extern(System) cef_response_filter_t* function ( 15031 cef_resource_request_handler_t* self, 15032 cef_browser_t* browser, 15033 cef_frame_t* frame, 15034 cef_request_t* request, 15035 cef_response_t* response) nothrow get_resource_response_filter; 15036 15037 /// 15038 // Called on the IO thread when a resource load has completed. The |browser| 15039 // and |frame| values represent the source of the request, and may be NULL for 15040 // requests originating from service workers or cef_urlrequest_t. |request| 15041 // and |response| represent the request and response respectively and cannot 15042 // be modified in this callback. |status| indicates the load completion 15043 // status. |received_content_length| is the number of response bytes actually 15044 // read. This function will be called for all requests, including requests 15045 // that are aborted due to CEF shutdown or destruction of the associated 15046 // browser. In cases where the associated browser is destroyed this callback 15047 // may arrive after the cef_life_span_handler_t::OnBeforeClose callback for 15048 // that browser. The cef_frame_t::IsValid function can be used to test for 15049 // this situation, and care should be taken not to call |browser| or |frame| 15050 // functions that modify state (like LoadURL, SendProcessMessage, etc.) if the 15051 // frame is invalid. 15052 /// 15053 extern(System) void function ( 15054 cef_resource_request_handler_t* self, 15055 cef_browser_t* browser, 15056 cef_frame_t* frame, 15057 cef_request_t* request, 15058 cef_response_t* response, 15059 cef_urlrequest_status_t status, 15060 int64 received_content_length) nothrow on_resource_load_complete; 15061 15062 /// 15063 // Called on the IO thread to handle requests for URLs with an unknown 15064 // protocol component. The |browser| and |frame| values represent the source 15065 // of the request, and may be NULL for requests originating from service 15066 // workers or cef_urlrequest_t. |request| cannot be modified in this callback. 15067 // Set |allow_os_execution| to true (1) to attempt execution via the 15068 // registered OS protocol handler, if any. SECURITY WARNING: YOU SHOULD USE 15069 // THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL 15070 // ANALYSIS BEFORE ALLOWING OS EXECUTION. 15071 /// 15072 extern(System) void function ( 15073 cef_resource_request_handler_t* self, 15074 cef_browser_t* browser, 15075 cef_frame_t* frame, 15076 cef_request_t* request, 15077 int* allow_os_execution) nothrow on_protocol_execution; 15078 } 15079 15080 15081 15082 /// 15083 // Implement this structure to filter cookies that may be sent or received from 15084 // resource requests. The functions of this structure will be called on the IO 15085 // thread unless otherwise indicated. 15086 /// 15087 struct cef_cookie_access_filter_t 15088 { 15089 /// 15090 // Base structure. 15091 /// 15092 cef_base_ref_counted_t base; 15093 15094 /// 15095 // Called on the IO thread before a resource request is sent. The |browser| 15096 // and |frame| values represent the source of the request, and may be NULL for 15097 // requests originating from service workers or cef_urlrequest_t. |request| 15098 // cannot be modified in this callback. Return true (1) if the specified 15099 // cookie can be sent with the request or false (0) otherwise. 15100 /// 15101 extern(System) int function ( 15102 cef_cookie_access_filter_t* self, 15103 cef_browser_t* browser, 15104 cef_frame_t* frame, 15105 cef_request_t* request, 15106 const(cef_cookie_t)* cookie) nothrow can_send_cookie; 15107 15108 /// 15109 // Called on the IO thread after a resource response is received. The 15110 // |browser| and |frame| values represent the source of the request, and may 15111 // be NULL for requests originating from service workers or cef_urlrequest_t. 15112 // |request| cannot be modified in this callback. Return true (1) if the 15113 // specified cookie returned with the response can be saved or false (0) 15114 // otherwise. 15115 /// 15116 extern(System) int function ( 15117 cef_cookie_access_filter_t* self, 15118 cef_browser_t* browser, 15119 cef_frame_t* frame, 15120 cef_request_t* request, 15121 cef_response_t* response, 15122 const(cef_cookie_t)* cookie) nothrow can_save_cookie; 15123 } 15124 15125 15126 15127 // CEF_INCLUDE_CAPI_CEF_RESOURCE_REQUEST_HANDLER_CAPI_H_ 15128 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 15129 // 15130 // Redistribution and use in source and binary forms, with or without 15131 // modification, are permitted provided that the following conditions are 15132 // met: 15133 // 15134 // * Redistributions of source code must retain the above copyright 15135 // notice, this list of conditions and the following disclaimer. 15136 // * Redistributions in binary form must reproduce the above 15137 // copyright notice, this list of conditions and the following disclaimer 15138 // in the documentation and/or other materials provided with the 15139 // distribution. 15140 // * Neither the name of Google Inc. nor the name Chromium Embedded 15141 // Framework nor the names of its contributors may be used to endorse 15142 // or promote products derived from this software without specific prior 15143 // written permission. 15144 // 15145 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15146 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15147 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15148 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15149 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15150 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15151 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15152 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15153 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15154 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15155 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15156 // 15157 // --------------------------------------------------------------------------- 15158 // 15159 // This file was generated by the CEF translator tool and should not edited 15160 // by hand. See the translator.README.txt file in the tools directory for 15161 // more information. 15162 // 15163 // $hash=8202bbf8e7f7ae474182c483f0f599b13f6914eb$ 15164 // 15165 15166 extern (C): 15167 15168 /// 15169 // Structure used to represent a web response. The functions of this structure 15170 // may be called on any thread. 15171 /// 15172 struct cef_response_t 15173 { 15174 /// 15175 // Base structure. 15176 /// 15177 cef_base_ref_counted_t base; 15178 15179 /// 15180 // Returns true (1) if this object is read-only. 15181 /// 15182 extern(System) int function (cef_response_t* self) nothrow is_read_only; 15183 15184 /// 15185 // Get the response error code. Returns ERR_NONE if there was no error. 15186 /// 15187 extern(System) cef_errorcode_t function (cef_response_t* self) nothrow get_error; 15188 15189 /// 15190 // Set the response error code. This can be used by custom scheme handlers to 15191 // return errors during initial request processing. 15192 /// 15193 extern(System) void function (cef_response_t* self, cef_errorcode_t error) nothrow set_error; 15194 15195 /// 15196 // Get the response status code. 15197 /// 15198 extern(System) int function (cef_response_t* self) nothrow get_status; 15199 15200 /// 15201 // Set the response status code. 15202 /// 15203 extern(System) void function (cef_response_t* self, int status) nothrow set_status; 15204 15205 /// 15206 // Get the response status text. 15207 /// 15208 // The resulting string must be freed by calling cef_string_userfree_free(). 15209 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_status_text; 15210 15211 /// 15212 // Set the response status text. 15213 /// 15214 extern(System) void function ( 15215 cef_response_t* self, 15216 const(cef_string_t)* statusText) nothrow set_status_text; 15217 15218 /// 15219 // Get the response mime type. 15220 /// 15221 // The resulting string must be freed by calling cef_string_userfree_free(). 15222 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_mime_type; 15223 15224 /// 15225 // Set the response mime type. 15226 /// 15227 extern(System) void function ( 15228 cef_response_t* self, 15229 const(cef_string_t)* mimeType) nothrow set_mime_type; 15230 15231 /// 15232 // Get the response charset. 15233 /// 15234 // The resulting string must be freed by calling cef_string_userfree_free(). 15235 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_charset; 15236 15237 /// 15238 // Set the response charset. 15239 /// 15240 extern(System) void function ( 15241 cef_response_t* self, 15242 const(cef_string_t)* charset) nothrow set_charset; 15243 15244 /// 15245 // Get the value for the specified response header field. 15246 /// 15247 // The resulting string must be freed by calling cef_string_userfree_free(). 15248 extern(System) cef_string_userfree_t function ( 15249 cef_response_t* self, 15250 const(cef_string_t)* name) nothrow get_header_by_name; 15251 15252 /// 15253 // Set the header |name| to |value|. If |overwrite| is true (1) any existing 15254 // values will be replaced with the new value. If |overwrite| is false (0) any 15255 // existing values will not be overwritten. 15256 /// 15257 extern(System) void function ( 15258 cef_response_t* self, 15259 const(cef_string_t)* name, 15260 const(cef_string_t)* value, 15261 int overwrite) nothrow set_header_by_name; 15262 15263 /// 15264 // Get all response header fields. 15265 /// 15266 extern(System) void function ( 15267 cef_response_t* self, 15268 cef_string_multimap_t headerMap) nothrow get_header_map; 15269 15270 /// 15271 // Set all response header fields. 15272 /// 15273 extern(System) void function ( 15274 cef_response_t* self, 15275 cef_string_multimap_t headerMap) nothrow set_header_map; 15276 15277 /// 15278 // Get the resolved URL after redirects or changed as a result of HSTS. 15279 /// 15280 // The resulting string must be freed by calling cef_string_userfree_free(). 15281 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_url; 15282 15283 /// 15284 // Set the resolved URL after redirects or changed as a result of HSTS. 15285 /// 15286 extern(System) void function (cef_response_t* self, const(cef_string_t)* url) nothrow set_url; 15287 } 15288 15289 15290 15291 /// 15292 // Create a new cef_response_t object. 15293 /// 15294 cef_response_t* cef_response_create (); 15295 15296 // CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_ 15297 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 15298 // 15299 // Redistribution and use in source and binary forms, with or without 15300 // modification, are permitted provided that the following conditions are 15301 // met: 15302 // 15303 // * Redistributions of source code must retain the above copyright 15304 // notice, this list of conditions and the following disclaimer. 15305 // * Redistributions in binary form must reproduce the above 15306 // copyright notice, this list of conditions and the following disclaimer 15307 // in the documentation and/or other materials provided with the 15308 // distribution. 15309 // * Neither the name of Google Inc. nor the name Chromium Embedded 15310 // Framework nor the names of its contributors may be used to endorse 15311 // or promote products derived from this software without specific prior 15312 // written permission. 15313 // 15314 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15315 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15316 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15317 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15318 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15319 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15320 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15321 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15322 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15323 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15324 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15325 // 15326 // --------------------------------------------------------------------------- 15327 // 15328 // This file was generated by the CEF translator tool and should not edited 15329 // by hand. See the translator.README.txt file in the tools directory for 15330 // more information. 15331 // 15332 // $hash=cdadf516dc77455c5a3d6633bfb12e1cb276b9bb$ 15333 // 15334 15335 extern (C): 15336 15337 /// 15338 // Implement this structure to filter resource response content. The functions 15339 // of this structure will be called on the browser process IO thread. 15340 /// 15341 struct cef_response_filter_t 15342 { 15343 /// 15344 // Base structure. 15345 /// 15346 cef_base_ref_counted_t base; 15347 15348 /// 15349 // Initialize the response filter. Will only be called a single time. The 15350 // filter will not be installed if this function returns false (0). 15351 /// 15352 extern(System) int function (cef_response_filter_t* self) nothrow init_filter; 15353 15354 /// 15355 // Called to filter a chunk of data. Expected usage is as follows: 15356 // 15357 // A. Read input data from |data_in| and set |data_in_read| to the number of 15358 // bytes that were read up to a maximum of |data_in_size|. |data_in| will 15359 // be NULL if |data_in_size| is zero. 15360 // B. Write filtered output data to |data_out| and set |data_out_written| to 15361 // the number of bytes that were written up to a maximum of 15362 // |data_out_size|. If no output data was written then all data must be 15363 // read from |data_in| (user must set |data_in_read| = |data_in_size|). 15364 // C. Return RESPONSE_FILTER_DONE if all output data was written or 15365 // RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending. 15366 // 15367 // This function will be called repeatedly until the input buffer has been 15368 // fully read (user sets |data_in_read| = |data_in_size|) and there is no more 15369 // input data to filter (the resource response is complete). This function may 15370 // then be called an additional time with an NULL input buffer if the user 15371 // filled the output buffer (set |data_out_written| = |data_out_size|) and 15372 // returned RESPONSE_FILTER_NEED_MORE_DATA to indicate that output data is 15373 // still pending. 15374 // 15375 // Calls to this function will stop when one of the following conditions is 15376 // met: 15377 // 15378 // A. There is no more input data to filter (the resource response is 15379 // complete) and the user sets |data_out_written| = 0 or returns 15380 // RESPONSE_FILTER_DONE to indicate that all data has been written, or; 15381 // B. The user returns RESPONSE_FILTER_ERROR to indicate an error. 15382 // 15383 // Do not keep a reference to the buffers passed to this function. 15384 /// 15385 extern(System) cef_response_filter_status_t function ( 15386 cef_response_filter_t* self, 15387 void* data_in, 15388 size_t data_in_size, 15389 size_t* data_in_read, 15390 void* data_out, 15391 size_t data_out_size, 15392 size_t* data_out_written) nothrow filter; 15393 } 15394 15395 15396 15397 // CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_ 15398 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 15399 // 15400 // Redistribution and use in source and binary forms, with or without 15401 // modification, are permitted provided that the following conditions are 15402 // met: 15403 // 15404 // * Redistributions of source code must retain the above copyright 15405 // notice, this list of conditions and the following disclaimer. 15406 // * Redistributions in binary form must reproduce the above 15407 // copyright notice, this list of conditions and the following disclaimer 15408 // in the documentation and/or other materials provided with the 15409 // distribution. 15410 // * Neither the name of Google Inc. nor the name Chromium Embedded 15411 // Framework nor the names of its contributors may be used to endorse 15412 // or promote products derived from this software without specific prior 15413 // written permission. 15414 // 15415 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15416 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15417 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15418 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15419 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15420 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15421 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15422 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15423 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15424 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15425 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15426 // 15427 // --------------------------------------------------------------------------- 15428 // 15429 // This file was generated by the CEF translator tool and should not edited 15430 // by hand. See the translator.README.txt file in the tools directory for 15431 // more information. 15432 // 15433 // $hash=9384e0b2bc27ccbdd7ebb1a86f213c28fd2784a1$ 15434 // 15435 15436 extern (C): 15437 15438 /// 15439 // Structure that manages custom scheme registrations. 15440 /// 15441 struct cef_scheme_registrar_t 15442 { 15443 /// 15444 // Base structure. 15445 /// 15446 cef_base_scoped_t base; 15447 15448 /// 15449 // Register a custom scheme. This function should not be called for the built- 15450 // in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes. 15451 // 15452 // See cef_scheme_options_t for possible values for |options|. 15453 // 15454 // This function may be called on any thread. It should only be called once 15455 // per unique |scheme_name| value. If |scheme_name| is already registered or 15456 // if an error occurs this function will return false (0). 15457 /// 15458 extern(System) int function ( 15459 cef_scheme_registrar_t* self, 15460 const(cef_string_t)* scheme_name, 15461 int options) nothrow add_custom_scheme; 15462 } 15463 15464 15465 15466 /// 15467 // Structure that creates cef_resource_handler_t instances for handling scheme 15468 // requests. The functions of this structure will always be called on the IO 15469 // thread. 15470 /// 15471 struct cef_scheme_handler_factory_t 15472 { 15473 /// 15474 // Base structure. 15475 /// 15476 cef_base_ref_counted_t base; 15477 15478 /// 15479 // Return a new resource handler instance to handle the request or an NULL 15480 // reference to allow default handling of the request. |browser| and |frame| 15481 // will be the browser window and frame respectively that originated the 15482 // request or NULL if the request did not originate from a browser window (for 15483 // example, if the request came from cef_urlrequest_t). The |request| object 15484 // passed to this function cannot be modified. 15485 /// 15486 extern(System) cef_resource_handler_t* function ( 15487 cef_scheme_handler_factory_t* self, 15488 cef_browser_t* browser, 15489 cef_frame_t* frame, 15490 const(cef_string_t)* scheme_name, 15491 cef_request_t* request) nothrow create; 15492 } 15493 15494 15495 15496 /// 15497 // Register a scheme handler factory with the global request context. An NULL 15498 // |domain_name| value for a standard scheme will cause the factory to match all 15499 // domain names. The |domain_name| value will be ignored for non-standard 15500 // schemes. If |scheme_name| is a built-in scheme and no handler is returned by 15501 // |factory| then the built-in scheme handler factory will be called. If 15502 // |scheme_name| is a custom scheme then you must also implement the 15503 // cef_app_t::on_register_custom_schemes() function in all processes. This 15504 // function may be called multiple times to change or remove the factory that 15505 // matches the specified |scheme_name| and optional |domain_name|. Returns false 15506 // (0) if an error occurs. This function may be called on any thread in the 15507 // browser process. Using this function is equivalent to calling cef_request_con 15508 // text_t::cef_request_context_get_global_context()->register_scheme_handler_fac 15509 // tory(). 15510 /// 15511 int cef_register_scheme_handler_factory ( 15512 const(cef_string_t)* scheme_name, 15513 const(cef_string_t)* domain_name, 15514 cef_scheme_handler_factory_t* factory); 15515 15516 /// 15517 // Clear all scheme handler factories registered with the global request 15518 // context. Returns false (0) on error. This function may be called on any 15519 // thread in the browser process. Using this function is equivalent to calling c 15520 // ef_request_context_t::cef_request_context_get_global_context()->clear_scheme_ 15521 // handler_factories(). 15522 /// 15523 int cef_clear_scheme_handler_factories (); 15524 15525 // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_ 15526 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 15527 // 15528 // Redistribution and use in source and binary forms, with or without 15529 // modification, are permitted provided that the following conditions are 15530 // met: 15531 // 15532 // * Redistributions of source code must retain the above copyright 15533 // notice, this list of conditions and the following disclaimer. 15534 // * Redistributions in binary form must reproduce the above 15535 // copyright notice, this list of conditions and the following disclaimer 15536 // in the documentation and/or other materials provided with the 15537 // distribution. 15538 // * Neither the name of Google Inc. nor the name Chromium Embedded 15539 // Framework nor the names of its contributors may be used to endorse 15540 // or promote products derived from this software without specific prior 15541 // written permission. 15542 // 15543 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15544 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15545 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15546 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15547 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15548 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15549 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15550 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15551 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15552 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15553 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15554 // 15555 // --------------------------------------------------------------------------- 15556 // 15557 // This file was generated by the CEF translator tool and should not edited 15558 // by hand. See the translator.README.txt file in the tools directory for 15559 // more information. 15560 // 15561 // $hash=37b3332057dbcf705b61a51cf14640d171d18a74$ 15562 // 15563 15564 extern (C): 15565 15566 /// 15567 // Structure representing a server that supports HTTP and WebSocket requests. 15568 // Server capacity is limited and is intended to handle only a small number of 15569 // simultaneous connections (e.g. for communicating between applications on 15570 // localhost). The functions of this structure are safe to call from any thread 15571 // in the brower process unless otherwise indicated. 15572 /// 15573 struct cef_server_t 15574 { 15575 /// 15576 // Base structure. 15577 /// 15578 cef_base_ref_counted_t base; 15579 15580 /// 15581 // Returns the task runner for the dedicated server thread. 15582 /// 15583 extern(System) cef_task_runner_t* function (cef_server_t* self) nothrow get_task_runner; 15584 15585 /// 15586 // Stop the server and shut down the dedicated server thread. See 15587 // cef_server_handler_t::OnServerCreated documentation for a description of 15588 // server lifespan. 15589 /// 15590 extern(System) void function (cef_server_t* self) nothrow shutdown; 15591 15592 /// 15593 // Returns true (1) if the server is currently running and accepting incoming 15594 // connections. See cef_server_handler_t::OnServerCreated documentation for a 15595 // description of server lifespan. This function must be called on the 15596 // dedicated server thread. 15597 /// 15598 extern(System) int function (cef_server_t* self) nothrow is_running; 15599 15600 /// 15601 // Returns the server address including the port number. 15602 /// 15603 // The resulting string must be freed by calling cef_string_userfree_free(). 15604 extern(System) cef_string_userfree_t function (cef_server_t* self) nothrow get_address; 15605 15606 /// 15607 // Returns true (1) if the server currently has a connection. This function 15608 // must be called on the dedicated server thread. 15609 /// 15610 extern(System) int function (cef_server_t* self) nothrow has_connection; 15611 15612 /// 15613 // Returns true (1) if |connection_id| represents a valid connection. This 15614 // function must be called on the dedicated server thread. 15615 /// 15616 extern(System) int function (cef_server_t* self, int connection_id) nothrow is_valid_connection; 15617 15618 /// 15619 // Send an HTTP 200 "OK" response to the connection identified by 15620 // |connection_id|. |content_type| is the response content type (e.g. 15621 // "text/html"), |data| is the response content, and |data_size| is the size 15622 // of |data| in bytes. The contents of |data| will be copied. The connection 15623 // will be closed automatically after the response is sent. 15624 /// 15625 extern(System) void function ( 15626 cef_server_t* self, 15627 int connection_id, 15628 const(cef_string_t)* content_type, 15629 const(void)* data, 15630 size_t data_size) nothrow send_http200response; 15631 15632 /// 15633 // Send an HTTP 404 "Not Found" response to the connection identified by 15634 // |connection_id|. The connection will be closed automatically after the 15635 // response is sent. 15636 /// 15637 extern(System) void function ( 15638 cef_server_t* self, 15639 int connection_id) nothrow send_http404response; 15640 15641 /// 15642 // Send an HTTP 500 "Internal Server Error" response to the connection 15643 // identified by |connection_id|. |error_message| is the associated error 15644 // message. The connection will be closed automatically after the response is 15645 // sent. 15646 /// 15647 extern(System) void function ( 15648 cef_server_t* self, 15649 int connection_id, 15650 const(cef_string_t)* error_message) nothrow send_http500response; 15651 15652 /// 15653 // Send a custom HTTP response to the connection identified by 15654 // |connection_id|. |response_code| is the HTTP response code sent in the 15655 // status line (e.g. 200), |content_type| is the response content type sent as 15656 // the "Content-Type" header (e.g. "text/html"), |content_length| is the 15657 // expected content length, and |extra_headers| is the map of extra response 15658 // headers. If |content_length| is >= 0 then the "Content-Length" header will 15659 // be sent. If |content_length| is 0 then no content is expected and the 15660 // connection will be closed automatically after the response is sent. If 15661 // |content_length| is < 0 then no "Content-Length" header will be sent and 15662 // the client will continue reading until the connection is closed. Use the 15663 // SendRawData function to send the content, if applicable, and call 15664 // CloseConnection after all content has been sent. 15665 /// 15666 extern(System) void function ( 15667 cef_server_t* self, 15668 int connection_id, 15669 int response_code, 15670 const(cef_string_t)* content_type, 15671 int64 content_length, 15672 cef_string_multimap_t extra_headers) nothrow send_http_response; 15673 15674 /// 15675 // Send raw data directly to the connection identified by |connection_id|. 15676 // |data| is the raw data and |data_size| is the size of |data| in bytes. The 15677 // contents of |data| will be copied. No validation of |data| is performed 15678 // internally so the client should be careful to send the amount indicated by 15679 // the "Content-Length" header, if specified. See SendHttpResponse 15680 // documentation for intended usage. 15681 /// 15682 extern(System) void function ( 15683 cef_server_t* self, 15684 int connection_id, 15685 const(void)* data, 15686 size_t data_size) nothrow send_raw_data; 15687 15688 /// 15689 // Close the connection identified by |connection_id|. See SendHttpResponse 15690 // documentation for intended usage. 15691 /// 15692 extern(System) void function (cef_server_t* self, int connection_id) nothrow close_connection; 15693 15694 /// 15695 // Send a WebSocket message to the connection identified by |connection_id|. 15696 // |data| is the response content and |data_size| is the size of |data| in 15697 // bytes. The contents of |data| will be copied. See 15698 // cef_server_handler_t::OnWebSocketRequest documentation for intended usage. 15699 /// 15700 extern(System) void function ( 15701 cef_server_t* self, 15702 int connection_id, 15703 const(void)* data, 15704 size_t data_size) nothrow send_web_socket_message; 15705 } 15706 15707 15708 15709 /// 15710 // Create a new server that binds to |address| and |port|. |address| must be a 15711 // valid IPv4 or IPv6 address (e.g. 127.0.0.1 or ::1) and |port| must be a port 15712 // number outside of the reserved range (e.g. between 1025 and 65535 on most 15713 // platforms). |backlog| is the maximum number of pending connections. A new 15714 // thread will be created for each CreateServer call (the "dedicated server 15715 // thread"). It is therefore recommended to use a different cef_server_handler_t 15716 // instance for each CreateServer call to avoid thread safety issues in the 15717 // cef_server_handler_t implementation. The 15718 // cef_server_handler_t::OnServerCreated function will be called on the 15719 // dedicated server thread to report success or failure. See 15720 // cef_server_handler_t::OnServerCreated documentation for a description of 15721 // server lifespan. 15722 /// 15723 void cef_server_create ( 15724 const(cef_string_t)* address, 15725 uint16 port, 15726 int backlog, 15727 cef_server_handler_t* handler); 15728 15729 /// 15730 // Implement this structure to handle HTTP server requests. A new thread will be 15731 // created for each cef_server_t::CreateServer call (the "dedicated server 15732 // thread"), and the functions of this structure will be called on that thread. 15733 // It is therefore recommended to use a different cef_server_handler_t instance 15734 // for each cef_server_t::CreateServer call to avoid thread safety issues in the 15735 // cef_server_handler_t implementation. 15736 /// 15737 struct cef_server_handler_t 15738 { 15739 /// 15740 // Base structure. 15741 /// 15742 cef_base_ref_counted_t base; 15743 15744 /// 15745 // Called when |server| is created. If the server was started successfully 15746 // then cef_server_t::IsRunning will return true (1). The server will continue 15747 // running until cef_server_t::Shutdown is called, after which time 15748 // OnServerDestroyed will be called. If the server failed to start then 15749 // OnServerDestroyed will be called immediately after this function returns. 15750 /// 15751 extern(System) void function ( 15752 cef_server_handler_t* self, 15753 cef_server_t* server) nothrow on_server_created; 15754 15755 /// 15756 // Called when |server| is destroyed. The server thread will be stopped after 15757 // this function returns. The client should release any references to |server| 15758 // when this function is called. See OnServerCreated documentation for a 15759 // description of server lifespan. 15760 /// 15761 extern(System) void function ( 15762 cef_server_handler_t* self, 15763 cef_server_t* server) nothrow on_server_destroyed; 15764 15765 /// 15766 // Called when a client connects to |server|. |connection_id| uniquely 15767 // identifies the connection. Each call to this function will have a matching 15768 // call to OnClientDisconnected. 15769 /// 15770 extern(System) void function ( 15771 cef_server_handler_t* self, 15772 cef_server_t* server, 15773 int connection_id) nothrow on_client_connected; 15774 15775 /// 15776 // Called when a client disconnects from |server|. |connection_id| uniquely 15777 // identifies the connection. The client should release any data associated 15778 // with |connection_id| when this function is called and |connection_id| 15779 // should no longer be passed to cef_server_t functions. Disconnects can 15780 // originate from either the client or the server. For example, the server 15781 // will disconnect automatically after a cef_server_t::SendHttpXXXResponse 15782 // function is called. 15783 /// 15784 extern(System) void function ( 15785 cef_server_handler_t* self, 15786 cef_server_t* server, 15787 int connection_id) nothrow on_client_disconnected; 15788 15789 /// 15790 // Called when |server| receives an HTTP request. |connection_id| uniquely 15791 // identifies the connection, |client_address| is the requesting IPv4 or IPv6 15792 // client address including port number, and |request| contains the request 15793 // contents (URL, function, headers and optional POST data). Call cef_server_t 15794 // functions either synchronously or asynchronusly to send a response. 15795 /// 15796 extern(System) void function ( 15797 cef_server_handler_t* self, 15798 cef_server_t* server, 15799 int connection_id, 15800 const(cef_string_t)* client_address, 15801 cef_request_t* request) nothrow on_http_request; 15802 15803 /// 15804 // Called when |server| receives a WebSocket request. |connection_id| uniquely 15805 // identifies the connection, |client_address| is the requesting IPv4 or IPv6 15806 // client address including port number, and |request| contains the request 15807 // contents (URL, function, headers and optional POST data). Execute 15808 // |callback| either synchronously or asynchronously to accept or decline the 15809 // WebSocket connection. If the request is accepted then OnWebSocketConnected 15810 // will be called after the WebSocket has connected and incoming messages will 15811 // be delivered to the OnWebSocketMessage callback. If the request is declined 15812 // then the client will be disconnected and OnClientDisconnected will be 15813 // called. Call the cef_server_t::SendWebSocketMessage function after 15814 // receiving the OnWebSocketConnected callback to respond with WebSocket 15815 // messages. 15816 /// 15817 extern(System) void function ( 15818 cef_server_handler_t* self, 15819 cef_server_t* server, 15820 int connection_id, 15821 const(cef_string_t)* client_address, 15822 cef_request_t* request, 15823 cef_callback_t* callback) nothrow on_web_socket_request; 15824 15825 /// 15826 // Called after the client has accepted the WebSocket connection for |server| 15827 // and |connection_id| via the OnWebSocketRequest callback. See 15828 // OnWebSocketRequest documentation for intended usage. 15829 /// 15830 extern(System) void function ( 15831 cef_server_handler_t* self, 15832 cef_server_t* server, 15833 int connection_id) nothrow on_web_socket_connected; 15834 15835 /// 15836 // Called when |server| receives an WebSocket message. |connection_id| 15837 // uniquely identifies the connection, |data| is the message content and 15838 // |data_size| is the size of |data| in bytes. Do not keep a reference to 15839 // |data| outside of this function. See OnWebSocketRequest documentation for 15840 // intended usage. 15841 /// 15842 extern(System) void function ( 15843 cef_server_handler_t* self, 15844 cef_server_t* server, 15845 int connection_id, 15846 const(void)* data, 15847 size_t data_size) nothrow on_web_socket_message; 15848 } 15849 15850 15851 15852 // CEF_INCLUDE_CAPI_CEF_SERVER_CAPI_H_ 15853 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 15854 // 15855 // Redistribution and use in source and binary forms, with or without 15856 // modification, are permitted provided that the following conditions are 15857 // met: 15858 // 15859 // * Redistributions of source code must retain the above copyright 15860 // notice, this list of conditions and the following disclaimer. 15861 // * Redistributions in binary form must reproduce the above 15862 // copyright notice, this list of conditions and the following disclaimer 15863 // in the documentation and/or other materials provided with the 15864 // distribution. 15865 // * Neither the name of Google Inc. nor the name Chromium Embedded 15866 // Framework nor the names of its contributors may be used to endorse 15867 // or promote products derived from this software without specific prior 15868 // written permission. 15869 // 15870 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15871 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15872 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15873 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15874 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15875 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15876 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15877 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15878 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15879 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15880 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15881 // 15882 // --------------------------------------------------------------------------- 15883 // 15884 // This file was generated by the CEF translator tool and should not edited 15885 // by hand. See the translator.README.txt file in the tools directory for 15886 // more information. 15887 // 15888 // $hash=aefb3b63aba8f5df6ab6dc11e2029820c75c36cf$ 15889 // 15890 15891 extern (C): 15892 15893 /// 15894 // Structure representing SSL information. 15895 /// 15896 struct cef_sslinfo_t 15897 { 15898 /// 15899 // Base structure. 15900 /// 15901 cef_base_ref_counted_t base; 15902 15903 /// 15904 // Returns a bitmask containing any and all problems verifying the server 15905 // certificate. 15906 /// 15907 extern(System) cef_cert_status_t function (cef_sslinfo_t* self) nothrow get_cert_status; 15908 15909 /// 15910 // Returns the X.509 certificate. 15911 /// 15912 extern(System) cef_x509certificate_t* function ( 15913 cef_sslinfo_t* self) nothrow get_x509certificate; 15914 } 15915 15916 15917 15918 /// 15919 // Returns true (1) if the certificate status represents an error. 15920 /// 15921 int cef_is_cert_status_error (cef_cert_status_t status); 15922 15923 // CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_ 15924 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 15925 // 15926 // Redistribution and use in source and binary forms, with or without 15927 // modification, are permitted provided that the following conditions are 15928 // met: 15929 // 15930 // * Redistributions of source code must retain the above copyright 15931 // notice, this list of conditions and the following disclaimer. 15932 // * Redistributions in binary form must reproduce the above 15933 // copyright notice, this list of conditions and the following disclaimer 15934 // in the documentation and/or other materials provided with the 15935 // distribution. 15936 // * Neither the name of Google Inc. nor the name Chromium Embedded 15937 // Framework nor the names of its contributors may be used to endorse 15938 // or promote products derived from this software without specific prior 15939 // written permission. 15940 // 15941 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15942 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15943 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15944 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15945 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15946 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15947 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15948 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15949 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15950 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15951 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15952 // 15953 // --------------------------------------------------------------------------- 15954 // 15955 // This file was generated by the CEF translator tool and should not edited 15956 // by hand. See the translator.README.txt file in the tools directory for 15957 // more information. 15958 // 15959 // $hash=93eb2bc0f51da08a41fb906436654b3452b74fb3$ 15960 // 15961 15962 extern (C): 15963 15964 /// 15965 // Structure representing the SSL information for a navigation entry. 15966 /// 15967 struct cef_sslstatus_t 15968 { 15969 /// 15970 // Base structure. 15971 /// 15972 cef_base_ref_counted_t base; 15973 15974 /// 15975 // Returns true (1) if the status is related to a secure SSL/TLS connection. 15976 /// 15977 extern(System) int function (cef_sslstatus_t* self) nothrow is_secure_connection; 15978 15979 /// 15980 // Returns a bitmask containing any and all problems verifying the server 15981 // certificate. 15982 /// 15983 extern(System) cef_cert_status_t function (cef_sslstatus_t* self) nothrow get_cert_status; 15984 15985 /// 15986 // Returns the SSL version used for the SSL connection. 15987 /// 15988 extern(System) cef_ssl_version_t function (cef_sslstatus_t* self) nothrow get_sslversion; 15989 15990 /// 15991 // Returns a bitmask containing the page security content status. 15992 /// 15993 extern(System) cef_ssl_content_status_t function ( 15994 cef_sslstatus_t* self) nothrow get_content_status; 15995 15996 /// 15997 // Returns the X.509 certificate. 15998 /// 15999 extern(System) cef_x509certificate_t* function ( 16000 cef_sslstatus_t* self) nothrow get_x509certificate; 16001 } 16002 16003 16004 16005 // CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_ 16006 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 16007 // 16008 // Redistribution and use in source and binary forms, with or without 16009 // modification, are permitted provided that the following conditions are 16010 // met: 16011 // 16012 // * Redistributions of source code must retain the above copyright 16013 // notice, this list of conditions and the following disclaimer. 16014 // * Redistributions in binary form must reproduce the above 16015 // copyright notice, this list of conditions and the following disclaimer 16016 // in the documentation and/or other materials provided with the 16017 // distribution. 16018 // * Neither the name of Google Inc. nor the name Chromium Embedded 16019 // Framework nor the names of its contributors may be used to endorse 16020 // or promote products derived from this software without specific prior 16021 // written permission. 16022 // 16023 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16024 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16025 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16026 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16027 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16028 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16029 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16030 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16031 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16032 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16033 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16034 // 16035 // --------------------------------------------------------------------------- 16036 // 16037 // This file was generated by the CEF translator tool and should not edited 16038 // by hand. See the translator.README.txt file in the tools directory for 16039 // more information. 16040 // 16041 // $hash=61ff7a4ebc917482bad5daba7089b92cc62bada8$ 16042 // 16043 16044 extern (C): 16045 16046 /// 16047 // Structure the client can implement to provide a custom stream reader. The 16048 // functions of this structure may be called on any thread. 16049 /// 16050 struct cef_read_handler_t 16051 { 16052 /// 16053 // Base structure. 16054 /// 16055 cef_base_ref_counted_t base; 16056 16057 /// 16058 // Read raw binary data. 16059 /// 16060 extern(System) size_t function ( 16061 cef_read_handler_t* self, 16062 void* ptr, 16063 size_t size, 16064 size_t n) nothrow read; 16065 16066 /// 16067 // Seek to the specified offset position. |whence| may be any one of SEEK_CUR, 16068 // SEEK_END or SEEK_SET. Return zero on success and non-zero on failure. 16069 /// 16070 extern(System) int function (cef_read_handler_t* self, int64 offset, int whence) nothrow seek; 16071 16072 /// 16073 // Return the current offset position. 16074 /// 16075 extern(System) int64 function (cef_read_handler_t* self) nothrow tell; 16076 16077 /// 16078 // Return non-zero if at end of file. 16079 /// 16080 extern(System) int function (cef_read_handler_t* self) nothrow eof; 16081 16082 /// 16083 // Return true (1) if this handler performs work like accessing the file 16084 // system which may block. Used as a hint for determining the thread to access 16085 // the handler from. 16086 /// 16087 extern(System) int function (cef_read_handler_t* self) nothrow may_block; 16088 } 16089 16090 16091 16092 /// 16093 // Structure used to read data from a stream. The functions of this structure 16094 // may be called on any thread. 16095 /// 16096 struct cef_stream_reader_t 16097 { 16098 /// 16099 // Base structure. 16100 /// 16101 cef_base_ref_counted_t base; 16102 16103 /// 16104 // Read raw binary data. 16105 /// 16106 extern(System) size_t function ( 16107 cef_stream_reader_t* self, 16108 void* ptr, 16109 size_t size, 16110 size_t n) nothrow read; 16111 16112 /// 16113 // Seek to the specified offset position. |whence| may be any one of SEEK_CUR, 16114 // SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure. 16115 /// 16116 extern(System) int function (cef_stream_reader_t* self, int64 offset, int whence) nothrow seek; 16117 16118 /// 16119 // Return the current offset position. 16120 /// 16121 extern(System) int64 function (cef_stream_reader_t* self) nothrow tell; 16122 16123 /// 16124 // Return non-zero if at end of file. 16125 /// 16126 extern(System) int function (cef_stream_reader_t* self) nothrow eof; 16127 16128 /// 16129 // Returns true (1) if this reader performs work like accessing the file 16130 // system which may block. Used as a hint for determining the thread to access 16131 // the reader from. 16132 /// 16133 extern(System) int function (cef_stream_reader_t* self) nothrow may_block; 16134 } 16135 16136 16137 16138 /// 16139 // Create a new cef_stream_reader_t object from a file. 16140 /// 16141 cef_stream_reader_t* cef_stream_reader_create_for_file ( 16142 const(cef_string_t)* fileName); 16143 16144 /// 16145 // Create a new cef_stream_reader_t object from data. 16146 /// 16147 cef_stream_reader_t* cef_stream_reader_create_for_data ( 16148 void* data, 16149 size_t size); 16150 16151 /// 16152 // Create a new cef_stream_reader_t object from a custom handler. 16153 /// 16154 cef_stream_reader_t* cef_stream_reader_create_for_handler ( 16155 cef_read_handler_t* handler); 16156 16157 /// 16158 // Structure the client can implement to provide a custom stream writer. The 16159 // functions of this structure may be called on any thread. 16160 /// 16161 struct cef_write_handler_t 16162 { 16163 /// 16164 // Base structure. 16165 /// 16166 cef_base_ref_counted_t base; 16167 16168 /// 16169 // Write raw binary data. 16170 /// 16171 extern(System) size_t function ( 16172 cef_write_handler_t* self, 16173 const(void)* ptr, 16174 size_t size, 16175 size_t n) nothrow write; 16176 16177 /// 16178 // Seek to the specified offset position. |whence| may be any one of SEEK_CUR, 16179 // SEEK_END or SEEK_SET. Return zero on success and non-zero on failure. 16180 /// 16181 extern(System) int function (cef_write_handler_t* self, int64 offset, int whence) nothrow seek; 16182 16183 /// 16184 // Return the current offset position. 16185 /// 16186 extern(System) int64 function (cef_write_handler_t* self) nothrow tell; 16187 16188 /// 16189 // Flush the stream. 16190 /// 16191 extern(System) int function (cef_write_handler_t* self) nothrow flush; 16192 16193 /// 16194 // Return true (1) if this handler performs work like accessing the file 16195 // system which may block. Used as a hint for determining the thread to access 16196 // the handler from. 16197 /// 16198 extern(System) int function (cef_write_handler_t* self) nothrow may_block; 16199 } 16200 16201 16202 16203 /// 16204 // Structure used to write data to a stream. The functions of this structure may 16205 // be called on any thread. 16206 /// 16207 struct cef_stream_writer_t 16208 { 16209 /// 16210 // Base structure. 16211 /// 16212 cef_base_ref_counted_t base; 16213 16214 /// 16215 // Write raw binary data. 16216 /// 16217 extern(System) size_t function ( 16218 cef_stream_writer_t* self, 16219 const(void)* ptr, 16220 size_t size, 16221 size_t n) nothrow write; 16222 16223 /// 16224 // Seek to the specified offset position. |whence| may be any one of SEEK_CUR, 16225 // SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure. 16226 /// 16227 extern(System) int function (cef_stream_writer_t* self, int64 offset, int whence) nothrow seek; 16228 16229 /// 16230 // Return the current offset position. 16231 /// 16232 extern(System) int64 function (cef_stream_writer_t* self) nothrow tell; 16233 16234 /// 16235 // Flush the stream. 16236 /// 16237 extern(System) int function (cef_stream_writer_t* self) nothrow flush; 16238 16239 /// 16240 // Returns true (1) if this writer performs work like accessing the file 16241 // system which may block. Used as a hint for determining the thread to access 16242 // the writer from. 16243 /// 16244 extern(System) int function (cef_stream_writer_t* self) nothrow may_block; 16245 } 16246 16247 16248 16249 /// 16250 // Create a new cef_stream_writer_t object for a file. 16251 /// 16252 cef_stream_writer_t* cef_stream_writer_create_for_file ( 16253 const(cef_string_t)* fileName); 16254 16255 /// 16256 // Create a new cef_stream_writer_t object for a custom handler. 16257 /// 16258 cef_stream_writer_t* cef_stream_writer_create_for_handler ( 16259 cef_write_handler_t* handler); 16260 16261 // CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_ 16262 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 16263 // 16264 // Redistribution and use in source and binary forms, with or without 16265 // modification, are permitted provided that the following conditions are 16266 // met: 16267 // 16268 // * Redistributions of source code must retain the above copyright 16269 // notice, this list of conditions and the following disclaimer. 16270 // * Redistributions in binary form must reproduce the above 16271 // copyright notice, this list of conditions and the following disclaimer 16272 // in the documentation and/or other materials provided with the 16273 // distribution. 16274 // * Neither the name of Google Inc. nor the name Chromium Embedded 16275 // Framework nor the names of its contributors may be used to endorse 16276 // or promote products derived from this software without specific prior 16277 // written permission. 16278 // 16279 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16280 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16281 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16282 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16283 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16284 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16285 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16286 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16287 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16288 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16289 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16290 // 16291 // --------------------------------------------------------------------------- 16292 // 16293 // This file was generated by the CEF translator tool and should not edited 16294 // by hand. See the translator.README.txt file in the tools directory for 16295 // more information. 16296 // 16297 // $hash=30d4a63d53bce310ad641cbe5096ae126a664076$ 16298 // 16299 16300 extern (C): 16301 16302 /// 16303 // Implement this structure to receive string values asynchronously. 16304 /// 16305 struct cef_string_visitor_t 16306 { 16307 /// 16308 // Base structure. 16309 /// 16310 cef_base_ref_counted_t base; 16311 16312 /// 16313 // Method that will be executed. 16314 /// 16315 extern(System) void function ( 16316 cef_string_visitor_t* self, 16317 const(cef_string_t)* string) nothrow visit; 16318 } 16319 16320 16321 16322 // CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ 16323 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 16324 // 16325 // Redistribution and use in source and binary forms, with or without 16326 // modification, are permitted provided that the following conditions are 16327 // met: 16328 // 16329 // * Redistributions of source code must retain the above copyright 16330 // notice, this list of conditions and the following disclaimer. 16331 // * Redistributions in binary form must reproduce the above 16332 // copyright notice, this list of conditions and the following disclaimer 16333 // in the documentation and/or other materials provided with the 16334 // distribution. 16335 // * Neither the name of Google Inc. nor the name Chromium Embedded 16336 // Framework nor the names of its contributors may be used to endorse 16337 // or promote products derived from this software without specific prior 16338 // written permission. 16339 // 16340 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16341 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16342 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16343 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16344 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16345 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16346 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16347 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16348 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16349 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16350 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16351 // 16352 // --------------------------------------------------------------------------- 16353 // 16354 // This file was generated by the CEF translator tool and should not edited 16355 // by hand. See the translator.README.txt file in the tools directory for 16356 // more information. 16357 // 16358 // $hash=a8b2162b7c3b7cede392e8531c46a1277e990689$ 16359 // 16360 16361 extern (C): 16362 16363 /// 16364 // Implement this structure for asynchronous task execution. If the task is 16365 // posted successfully and if the associated message loop is still running then 16366 // the execute() function will be called on the target thread. If the task fails 16367 // to post then the task object may be destroyed on the source thread instead of 16368 // the target thread. For this reason be cautious when performing work in the 16369 // task object destructor. 16370 /// 16371 struct cef_task_t 16372 { 16373 /// 16374 // Base structure. 16375 /// 16376 cef_base_ref_counted_t base; 16377 16378 /// 16379 // Method that will be executed on the target thread. 16380 /// 16381 extern(System) void function (cef_task_t* self) nothrow execute; 16382 } 16383 16384 16385 16386 /// 16387 // Structure that asynchronously executes tasks on the associated thread. It is 16388 // safe to call the functions of this structure on any thread. 16389 // 16390 // CEF maintains multiple internal threads that are used for handling different 16391 // types of tasks in different processes. The cef_thread_id_t definitions in 16392 // cef_types.h list the common CEF threads. Task runners are also available for 16393 // other CEF threads as appropriate (for example, V8 WebWorker threads). 16394 /// 16395 struct cef_task_runner_t 16396 { 16397 /// 16398 // Base structure. 16399 /// 16400 cef_base_ref_counted_t base; 16401 16402 /// 16403 // Returns true (1) if this object is pointing to the same task runner as 16404 // |that| object. 16405 /// 16406 extern(System) int function (cef_task_runner_t* self, cef_task_runner_t* that) nothrow is_same; 16407 16408 /// 16409 // Returns true (1) if this task runner belongs to the current thread. 16410 /// 16411 extern(System) int function (cef_task_runner_t* self) nothrow belongs_to_current_thread; 16412 16413 /// 16414 // Returns true (1) if this task runner is for the specified CEF thread. 16415 /// 16416 extern(System) int function ( 16417 cef_task_runner_t* self, 16418 cef_thread_id_t threadId) nothrow belongs_to_thread; 16419 16420 /// 16421 // Post a task for execution on the thread associated with this task runner. 16422 // Execution will occur asynchronously. 16423 /// 16424 extern(System) int function (cef_task_runner_t* self, cef_task_t* task) nothrow post_task; 16425 16426 /// 16427 // Post a task for delayed execution on the thread associated with this task 16428 // runner. Execution will occur asynchronously. Delayed tasks are not 16429 // supported on V8 WebWorker threads and will be executed without the 16430 // specified delay. 16431 /// 16432 extern(System) int function ( 16433 cef_task_runner_t* self, 16434 cef_task_t* task, 16435 int64 delay_ms) nothrow post_delayed_task; 16436 } 16437 16438 16439 16440 /// 16441 // Returns the task runner for the current thread. Only CEF threads will have 16442 // task runners. An NULL reference will be returned if this function is called 16443 // on an invalid thread. 16444 /// 16445 cef_task_runner_t* cef_task_runner_get_for_current_thread (); 16446 16447 /// 16448 // Returns the task runner for the specified CEF thread. 16449 /// 16450 cef_task_runner_t* cef_task_runner_get_for_thread (cef_thread_id_t threadId); 16451 16452 /// 16453 // Returns true (1) if called on the specified thread. Equivalent to using 16454 // cef_task_runner_t::GetForThread(threadId)->belongs_to_current_thread(). 16455 /// 16456 int cef_currently_on (cef_thread_id_t threadId); 16457 16458 /// 16459 // Post a task for execution on the specified thread. Equivalent to using 16460 // cef_task_runner_t::GetForThread(threadId)->PostTask(task). 16461 /// 16462 int cef_post_task (cef_thread_id_t threadId, cef_task_t* task); 16463 16464 /// 16465 // Post a task for delayed execution on the specified thread. Equivalent to 16466 // using cef_task_runner_t::GetForThread(threadId)->PostDelayedTask(task, 16467 // delay_ms). 16468 /// 16469 int cef_post_delayed_task ( 16470 cef_thread_id_t threadId, 16471 cef_task_t* task, 16472 int64 delay_ms); 16473 16474 // CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_ 16475 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 16476 // 16477 // Redistribution and use in source and binary forms, with or without 16478 // modification, are permitted provided that the following conditions are 16479 // met: 16480 // 16481 // * Redistributions of source code must retain the above copyright 16482 // notice, this list of conditions and the following disclaimer. 16483 // * Redistributions in binary form must reproduce the above 16484 // copyright notice, this list of conditions and the following disclaimer 16485 // in the documentation and/or other materials provided with the 16486 // distribution. 16487 // * Neither the name of Google Inc. nor the name Chromium Embedded 16488 // Framework nor the names of its contributors may be used to endorse 16489 // or promote products derived from this software without specific prior 16490 // written permission. 16491 // 16492 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16493 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16494 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16495 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16496 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16497 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16498 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16499 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16500 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16501 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16502 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16503 // 16504 // --------------------------------------------------------------------------- 16505 // 16506 // This file was generated by the CEF translator tool and should not edited 16507 // by hand. See the translator.README.txt file in the tools directory for 16508 // more information. 16509 // 16510 // $hash=9a471c97e43ad3d1d042ba3dc6d887f2f4b0d851$ 16511 // 16512 16513 extern (C): 16514 16515 /// 16516 // A simple thread abstraction that establishes a message loop on a new thread. 16517 // The consumer uses cef_task_runner_t to execute code on the thread's message 16518 // loop. The thread is terminated when the cef_thread_t object is destroyed or 16519 // stop() is called. All pending tasks queued on the thread's message loop will 16520 // run to completion before the thread is terminated. cef_thread_create() can be 16521 // called on any valid CEF thread in either the browser or render process. This 16522 // structure should only be used for tasks that require a dedicated thread. In 16523 // most cases you can post tasks to an existing CEF thread instead of creating a 16524 // new one; see cef_task.h for details. 16525 /// 16526 struct cef_thread_t 16527 { 16528 /// 16529 // Base structure. 16530 /// 16531 cef_base_ref_counted_t base; 16532 16533 /// 16534 // Returns the cef_task_runner_t that will execute code on this thread's 16535 // message loop. This function is safe to call from any thread. 16536 /// 16537 extern(System) cef_task_runner_t* function (cef_thread_t* self) nothrow get_task_runner; 16538 16539 /// 16540 // Returns the platform thread ID. It will return the same value after stop() 16541 // is called. This function is safe to call from any thread. 16542 /// 16543 extern(System) cef_platform_thread_id_t function ( 16544 cef_thread_t* self) nothrow get_platform_thread_id; 16545 16546 /// 16547 // Stop and join the thread. This function must be called from the same thread 16548 // that called cef_thread_create(). Do not call this function if 16549 // cef_thread_create() was called with a |stoppable| value of false (0). 16550 /// 16551 extern(System) void function (cef_thread_t* self) nothrow stop; 16552 16553 /// 16554 // Returns true (1) if the thread is currently running. This function must be 16555 // called from the same thread that called cef_thread_create(). 16556 /// 16557 extern(System) int function (cef_thread_t* self) nothrow is_running; 16558 } 16559 16560 16561 16562 /// 16563 // Create and start a new thread. This function does not block waiting for the 16564 // thread to run initialization. |display_name| is the name that will be used to 16565 // identify the thread. |priority| is the thread execution priority. 16566 // |message_loop_type| indicates the set of asynchronous events that the thread 16567 // can process. If |stoppable| is true (1) the thread will stopped and joined on 16568 // destruction or when stop() is called; otherwise, the thread cannot be stopped 16569 // and will be leaked on shutdown. On Windows the |com_init_mode| value 16570 // specifies how COM will be initialized for the thread. If |com_init_mode| is 16571 // set to COM_INIT_MODE_STA then |message_loop_type| must be set to ML_TYPE_UI. 16572 /// 16573 cef_thread_t* cef_thread_create ( 16574 const(cef_string_t)* display_name, 16575 cef_thread_priority_t priority, 16576 cef_message_loop_type_t message_loop_type, 16577 int stoppable, 16578 cef_com_init_mode_t com_init_mode); 16579 16580 // CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_ 16581 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 16582 // 16583 // Redistribution and use in source and binary forms, with or without 16584 // modification, are permitted provided that the following conditions are 16585 // met: 16586 // 16587 // * Redistributions of source code must retain the above copyright 16588 // notice, this list of conditions and the following disclaimer. 16589 // * Redistributions in binary form must reproduce the above 16590 // copyright notice, this list of conditions and the following disclaimer 16591 // in the documentation and/or other materials provided with the 16592 // distribution. 16593 // * Neither the name of Google Inc. nor the name Chromium Embedded 16594 // Framework nor the names of its contributors may be used to endorse 16595 // or promote products derived from this software without specific prior 16596 // written permission. 16597 // 16598 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16599 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16600 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16601 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16602 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16603 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16604 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16605 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16606 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16607 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16608 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16609 // 16610 // --------------------------------------------------------------------------- 16611 // 16612 // This file was generated by the CEF translator tool and should not edited 16613 // by hand. See the translator.README.txt file in the tools directory for 16614 // more information. 16615 // 16616 // $hash=99779f8a728d2e1a0b87d6d6b89bd28e5da16d4c$ 16617 // 16618 16619 extern (C): 16620 16621 /// 16622 // Implement this structure to receive notification when tracing has completed. 16623 // The functions of this structure will be called on the browser process UI 16624 // thread. 16625 /// 16626 struct cef_end_tracing_callback_t 16627 { 16628 /// 16629 // Base structure. 16630 /// 16631 cef_base_ref_counted_t base; 16632 16633 /// 16634 // Called after all processes have sent their trace data. |tracing_file| is 16635 // the path at which tracing data was written. The client is responsible for 16636 // deleting |tracing_file|. 16637 /// 16638 extern(System) void function ( 16639 cef_end_tracing_callback_t* self, 16640 const(cef_string_t)* tracing_file) nothrow on_end_tracing_complete; 16641 } 16642 16643 16644 16645 /// 16646 // Start tracing events on all processes. Tracing is initialized asynchronously 16647 // and |callback| will be executed on the UI thread after initialization is 16648 // complete. 16649 // 16650 // If CefBeginTracing was called previously, or if a CefEndTracingAsync call is 16651 // pending, CefBeginTracing will fail and return false (0). 16652 // 16653 // |categories| is a comma-delimited list of category wildcards. A category can 16654 // have an optional '-' prefix to make it an excluded category. Having both 16655 // included and excluded categories in the same list is not supported. 16656 // 16657 // Example: "test_MyTest*" Example: "test_MyTest*,test_OtherStuff" Example: 16658 // "-excluded_category1,-excluded_category2" 16659 // 16660 // This function must be called on the browser process UI thread. 16661 /// 16662 int cef_begin_tracing ( 16663 const(cef_string_t)* categories, 16664 cef_completion_callback_t* callback); 16665 16666 /// 16667 // Stop tracing events on all processes. 16668 // 16669 // This function will fail and return false (0) if a previous call to 16670 // CefEndTracingAsync is already pending or if CefBeginTracing was not called. 16671 // 16672 // |tracing_file| is the path at which tracing data will be written and 16673 // |callback| is the callback that will be executed once all processes have sent 16674 // their trace data. If |tracing_file| is NULL a new temporary file path will be 16675 // used. If |callback| is NULL no trace data will be written. 16676 // 16677 // This function must be called on the browser process UI thread. 16678 /// 16679 int cef_end_tracing ( 16680 const(cef_string_t)* tracing_file, 16681 cef_end_tracing_callback_t* callback); 16682 16683 /// 16684 // Returns the current system trace time or, if none is defined, the current 16685 // high-res time. Can be used by clients to synchronize with the time 16686 // information in trace events. 16687 /// 16688 int64 cef_now_from_system_trace_time (); 16689 16690 // CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_ 16691 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 16692 // 16693 // Redistribution and use in source and binary forms, with or without 16694 // modification, are permitted provided that the following conditions are 16695 // met: 16696 // 16697 // * Redistributions of source code must retain the above copyright 16698 // notice, this list of conditions and the following disclaimer. 16699 // * Redistributions in binary form must reproduce the above 16700 // copyright notice, this list of conditions and the following disclaimer 16701 // in the documentation and/or other materials provided with the 16702 // distribution. 16703 // * Neither the name of Google Inc. nor the name Chromium Embedded 16704 // Framework nor the names of its contributors may be used to endorse 16705 // or promote products derived from this software without specific prior 16706 // written permission. 16707 // 16708 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16709 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16710 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16711 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16712 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16713 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16714 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16715 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16716 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16717 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16718 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16719 // 16720 // --------------------------------------------------------------------------- 16721 // 16722 // This file was generated by the CEF translator tool and should not edited 16723 // by hand. See the translator.README.txt file in the tools directory for 16724 // more information. 16725 // 16726 // $hash=11c227079ec0687adeaa8a085aeec37c89346ee7$ 16727 // 16728 16729 extern (C): 16730 16731 /// 16732 // Structure used to make a URL request. URL requests are not associated with a 16733 // browser instance so no cef_client_t callbacks will be executed. URL requests 16734 // can be created on any valid CEF thread in either the browser or render 16735 // process. Once created the functions of the URL request object must be 16736 // accessed on the same thread that created it. 16737 /// 16738 struct cef_urlrequest_t 16739 { 16740 /// 16741 // Base structure. 16742 /// 16743 cef_base_ref_counted_t base; 16744 16745 /// 16746 // Returns the request object used to create this URL request. The returned 16747 // object is read-only and should not be modified. 16748 /// 16749 extern(System) cef_request_t* function (cef_urlrequest_t* self) nothrow get_request; 16750 16751 /// 16752 // Returns the client. 16753 /// 16754 extern(System) cef_urlrequest_client_t* function (cef_urlrequest_t* self) nothrow get_client; 16755 16756 /// 16757 // Returns the request status. 16758 /// 16759 extern(System) cef_urlrequest_status_t function ( 16760 cef_urlrequest_t* self) nothrow get_request_status; 16761 16762 /// 16763 // Returns the request error if status is UR_CANCELED or UR_FAILED, or 0 16764 // otherwise. 16765 /// 16766 extern(System) cef_errorcode_t function (cef_urlrequest_t* self) nothrow get_request_error; 16767 16768 /// 16769 // Returns the response, or NULL if no response information is available. 16770 // Response information will only be available after the upload has completed. 16771 // The returned object is read-only and should not be modified. 16772 /// 16773 extern(System) cef_response_t* function (cef_urlrequest_t* self) nothrow get_response; 16774 16775 /// 16776 // Returns true (1) if the response body was served from the cache. This 16777 // includes responses for which revalidation was required. 16778 /// 16779 extern(System) int function (cef_urlrequest_t* self) nothrow response_was_cached; 16780 16781 /// 16782 // Cancel the request. 16783 /// 16784 extern(System) void function (cef_urlrequest_t* self) nothrow cancel; 16785 } 16786 16787 16788 16789 /// 16790 // Create a new URL request that is not associated with a specific browser or 16791 // frame. Use cef_frame_t::CreateURLRequest instead if you want the request to 16792 // have this association, in which case it may be handled differently (see 16793 // documentation on that function). A request created with this function may 16794 // only originate from the browser process, and will behave as follows: 16795 // - It may be intercepted by the client via CefResourceRequestHandler or 16796 // CefSchemeHandlerFactory. 16797 // - POST data may only contain only a single element of type PDE_TYPE_FILE 16798 // or PDE_TYPE_BYTES. 16799 // - If |request_context| is empty the global request context will be used. 16800 // 16801 // The |request| object will be marked as read-only after calling this function. 16802 /// 16803 cef_urlrequest_t* cef_urlrequest_create ( 16804 cef_request_t* request, 16805 cef_urlrequest_client_t* client, 16806 cef_request_context_t* request_context); 16807 16808 /// 16809 // Structure that should be implemented by the cef_urlrequest_t client. The 16810 // functions of this structure will be called on the same thread that created 16811 // the request unless otherwise documented. 16812 /// 16813 struct cef_urlrequest_client_t 16814 { 16815 /// 16816 // Base structure. 16817 /// 16818 cef_base_ref_counted_t base; 16819 16820 /// 16821 // Notifies the client that the request has completed. Use the 16822 // cef_urlrequest_t::GetRequestStatus function to determine if the request was 16823 // successful or not. 16824 /// 16825 extern(System) void function ( 16826 cef_urlrequest_client_t* self, 16827 cef_urlrequest_t* request) nothrow on_request_complete; 16828 16829 /// 16830 // Notifies the client of upload progress. |current| denotes the number of 16831 // bytes sent so far and |total| is the total size of uploading data (or -1 if 16832 // chunked upload is enabled). This function will only be called if the 16833 // UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request. 16834 /// 16835 extern(System) void function ( 16836 cef_urlrequest_client_t* self, 16837 cef_urlrequest_t* request, 16838 int64 current, 16839 int64 total) nothrow on_upload_progress; 16840 16841 /// 16842 // Notifies the client of download progress. |current| denotes the number of 16843 // bytes received up to the call and |total| is the expected total size of the 16844 // response (or -1 if not determined). 16845 /// 16846 extern(System) void function ( 16847 cef_urlrequest_client_t* self, 16848 cef_urlrequest_t* request, 16849 int64 current, 16850 int64 total) nothrow on_download_progress; 16851 16852 /// 16853 // Called when some part of the response is read. |data| contains the current 16854 // bytes received since the last call. This function will not be called if the 16855 // UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request. 16856 /// 16857 extern(System) void function ( 16858 cef_urlrequest_client_t* self, 16859 cef_urlrequest_t* request, 16860 const(void)* data, 16861 size_t data_length) nothrow on_download_data; 16862 16863 /// 16864 // Called on the IO thread when the browser needs credentials from the user. 16865 // |isProxy| indicates whether the host is a proxy server. |host| contains the 16866 // hostname and |port| contains the port number. Return true (1) to continue 16867 // the request and call cef_auth_callback_t::cont() when the authentication 16868 // information is available. If the request has an associated browser/frame 16869 // then returning false (0) will result in a call to GetAuthCredentials on the 16870 // cef_request_handler_t associated with that browser, if any. Otherwise, 16871 // returning false (0) will cancel the request immediately. This function will 16872 // only be called for requests initiated from the browser process. 16873 /// 16874 extern(System) int function ( 16875 cef_urlrequest_client_t* self, 16876 int isProxy, 16877 const(cef_string_t)* host, 16878 int port, 16879 const(cef_string_t)* realm, 16880 const(cef_string_t)* scheme, 16881 cef_auth_callback_t* callback) nothrow get_auth_credentials; 16882 } 16883 16884 16885 16886 // CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_ 16887 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 16888 // 16889 // Redistribution and use in source and binary forms, with or without 16890 // modification, are permitted provided that the following conditions are 16891 // met: 16892 // 16893 // * Redistributions of source code must retain the above copyright 16894 // notice, this list of conditions and the following disclaimer. 16895 // * Redistributions in binary form must reproduce the above 16896 // copyright notice, this list of conditions and the following disclaimer 16897 // in the documentation and/or other materials provided with the 16898 // distribution. 16899 // * Neither the name of Google Inc. nor the name Chromium Embedded 16900 // Framework nor the names of its contributors may be used to endorse 16901 // or promote products derived from this software without specific prior 16902 // written permission. 16903 // 16904 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16905 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16906 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16907 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16908 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16909 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16910 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16911 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16912 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16913 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16914 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16915 // 16916 // --------------------------------------------------------------------------- 16917 // 16918 // This file was generated by the CEF translator tool and should not edited 16919 // by hand. See the translator.README.txt file in the tools directory for 16920 // more information. 16921 // 16922 // $hash=23dc3ab761547687a491e5d7303b73b2d0d54e7a$ 16923 // 16924 16925 extern (C): 16926 16927 /// 16928 // Structure representing a V8 context handle. V8 handles can only be accessed 16929 // from the thread on which they are created. Valid threads for creating a V8 16930 // handle include the render process main thread (TID_RENDERER) and WebWorker 16931 // threads. A task runner for posting tasks on the associated thread can be 16932 // retrieved via the cef_v8context_t::get_task_runner() function. 16933 /// 16934 struct cef_v8context_t 16935 { 16936 /// 16937 // Base structure. 16938 /// 16939 cef_base_ref_counted_t base; 16940 16941 /// 16942 // Returns the task runner associated with this context. V8 handles can only 16943 // be accessed from the thread on which they are created. This function can be 16944 // called on any render process thread. 16945 /// 16946 extern(System) cef_task_runner_t* function (cef_v8context_t* self) nothrow get_task_runner; 16947 16948 /// 16949 // Returns true (1) if the underlying handle is valid and it can be accessed 16950 // on the current thread. Do not call any other functions if this function 16951 // returns false (0). 16952 /// 16953 extern(System) int function (cef_v8context_t* self) nothrow is_valid; 16954 16955 /// 16956 // Returns the browser for this context. This function will return an NULL 16957 // reference for WebWorker contexts. 16958 /// 16959 extern(System) cef_browser_t* function (cef_v8context_t* self) nothrow get_browser; 16960 16961 /// 16962 // Returns the frame for this context. This function will return an NULL 16963 // reference for WebWorker contexts. 16964 /// 16965 extern(System) cef_frame_t* function (cef_v8context_t* self) nothrow get_frame; 16966 16967 /// 16968 // Returns the global object for this context. The context must be entered 16969 // before calling this function. 16970 /// 16971 extern(System) cef_v8value_t* function (cef_v8context_t* self) nothrow get_global; 16972 16973 /// 16974 // Enter this context. A context must be explicitly entered before creating a 16975 // V8 Object, Array, Function or Date asynchronously. exit() must be called 16976 // the same number of times as enter() before releasing this context. V8 16977 // objects belong to the context in which they are created. Returns true (1) 16978 // if the scope was entered successfully. 16979 /// 16980 extern(System) int function (cef_v8context_t* self) nothrow enter; 16981 16982 /// 16983 // Exit this context. Call this function only after calling enter(). Returns 16984 // true (1) if the scope was exited successfully. 16985 /// 16986 extern(System) int function (cef_v8context_t* self) nothrow exit; 16987 16988 /// 16989 // Returns true (1) if this object is pointing to the same handle as |that| 16990 // object. 16991 /// 16992 extern(System) int function (cef_v8context_t* self, cef_v8context_t* that) nothrow is_same; 16993 16994 /// 16995 // Execute a string of JavaScript code in this V8 context. The |script_url| 16996 // parameter is the URL where the script in question can be found, if any. The 16997 // |start_line| parameter is the base line number to use for error reporting. 16998 // On success |retval| will be set to the return value, if any, and the 16999 // function will return true (1). On failure |exception| will be set to the 17000 // exception, if any, and the function will return false (0). 17001 /// 17002 extern(System) int function ( 17003 cef_v8context_t* self, 17004 const(cef_string_t)* code, 17005 const(cef_string_t)* script_url, 17006 int start_line, 17007 cef_v8value_t** retval, 17008 cef_v8exception_t** exception) nothrow eval; 17009 } 17010 17011 17012 17013 /// 17014 // Returns the current (top) context object in the V8 context stack. 17015 /// 17016 cef_v8context_t* cef_v8context_get_current_context (); 17017 17018 /// 17019 // Returns the entered (bottom) context object in the V8 context stack. 17020 /// 17021 cef_v8context_t* cef_v8context_get_entered_context (); 17022 17023 /// 17024 // Returns true (1) if V8 is currently inside a context. 17025 /// 17026 int cef_v8context_in_context (); 17027 17028 /// 17029 // Structure that should be implemented to handle V8 function calls. The 17030 // functions of this structure will be called on the thread associated with the 17031 // V8 function. 17032 /// 17033 struct cef_v8handler_t 17034 { 17035 /// 17036 // Base structure. 17037 /// 17038 cef_base_ref_counted_t base; 17039 17040 /// 17041 // Handle execution of the function identified by |name|. |object| is the 17042 // receiver ('this' object) of the function. |arguments| is the list of 17043 // arguments passed to the function. If execution succeeds set |retval| to the 17044 // function return value. If execution fails set |exception| to the exception 17045 // that will be thrown. Return true (1) if execution was handled. 17046 /// 17047 extern(System) int function ( 17048 cef_v8handler_t* self, 17049 const(cef_string_t)* name, 17050 cef_v8value_t* object, 17051 size_t argumentsCount, 17052 cef_v8value_t** arguments, 17053 cef_v8value_t** retval, 17054 cef_string_t* exception) nothrow execute; 17055 } 17056 17057 17058 17059 /// 17060 // Structure that should be implemented to handle V8 accessor calls. Accessor 17061 // identifiers are registered by calling cef_v8value_t::set_value(). The 17062 // functions of this structure will be called on the thread associated with the 17063 // V8 accessor. 17064 /// 17065 struct cef_v8accessor_t 17066 { 17067 /// 17068 // Base structure. 17069 /// 17070 cef_base_ref_counted_t base; 17071 17072 /// 17073 // Handle retrieval the accessor value identified by |name|. |object| is the 17074 // receiver ('this' object) of the accessor. If retrieval succeeds set 17075 // |retval| to the return value. If retrieval fails set |exception| to the 17076 // exception that will be thrown. Return true (1) if accessor retrieval was 17077 // handled. 17078 /// 17079 extern(System) int function ( 17080 cef_v8accessor_t* self, 17081 const(cef_string_t)* name, 17082 cef_v8value_t* object, 17083 cef_v8value_t** retval, 17084 cef_string_t* exception) nothrow get; 17085 17086 /// 17087 // Handle assignment of the accessor value identified by |name|. |object| is 17088 // the receiver ('this' object) of the accessor. |value| is the new value 17089 // being assigned to the accessor. If assignment fails set |exception| to the 17090 // exception that will be thrown. Return true (1) if accessor assignment was 17091 // handled. 17092 /// 17093 extern(System) int function ( 17094 cef_v8accessor_t* self, 17095 const(cef_string_t)* name, 17096 cef_v8value_t* object, 17097 cef_v8value_t* value, 17098 cef_string_t* exception) nothrow set; 17099 } 17100 17101 17102 17103 /// 17104 // Structure that should be implemented to handle V8 interceptor calls. The 17105 // functions of this structure will be called on the thread associated with the 17106 // V8 interceptor. Interceptor's named property handlers (with first argument of 17107 // type CefString) are called when object is indexed by string. Indexed property 17108 // handlers (with first argument of type int) are called when object is indexed 17109 // by integer. 17110 /// 17111 struct cef_v8interceptor_t 17112 { 17113 /// 17114 // Base structure. 17115 /// 17116 cef_base_ref_counted_t base; 17117 17118 /// 17119 // Handle retrieval of the interceptor value identified by |name|. |object| is 17120 // the receiver ('this' object) of the interceptor. If retrieval succeeds, set 17121 // |retval| to the return value. If the requested value does not exist, don't 17122 // set either |retval| or |exception|. If retrieval fails, set |exception| to 17123 // the exception that will be thrown. If the property has an associated 17124 // accessor, it will be called only if you don't set |retval|. Return true (1) 17125 // if interceptor retrieval was handled, false (0) otherwise. 17126 /// 17127 extern(System) int function ( 17128 cef_v8interceptor_t* self, 17129 const(cef_string_t)* name, 17130 cef_v8value_t* object, 17131 cef_v8value_t** retval, 17132 cef_string_t* exception) nothrow get_byname; 17133 17134 /// 17135 // Handle retrieval of the interceptor value identified by |index|. |object| 17136 // is the receiver ('this' object) of the interceptor. If retrieval succeeds, 17137 // set |retval| to the return value. If the requested value does not exist, 17138 // don't set either |retval| or |exception|. If retrieval fails, set 17139 // |exception| to the exception that will be thrown. Return true (1) if 17140 // interceptor retrieval was handled, false (0) otherwise. 17141 /// 17142 extern(System) int function ( 17143 cef_v8interceptor_t* self, 17144 int index, 17145 cef_v8value_t* object, 17146 cef_v8value_t** retval, 17147 cef_string_t* exception) nothrow get_byindex; 17148 17149 /// 17150 // Handle assignment of the interceptor value identified by |name|. |object| 17151 // is the receiver ('this' object) of the interceptor. |value| is the new 17152 // value being assigned to the interceptor. If assignment fails, set 17153 // |exception| to the exception that will be thrown. This setter will always 17154 // be called, even when the property has an associated accessor. Return true 17155 // (1) if interceptor assignment was handled, false (0) otherwise. 17156 /// 17157 extern(System) int function ( 17158 cef_v8interceptor_t* self, 17159 const(cef_string_t)* name, 17160 cef_v8value_t* object, 17161 cef_v8value_t* value, 17162 cef_string_t* exception) nothrow set_byname; 17163 17164 /// 17165 // Handle assignment of the interceptor value identified by |index|. |object| 17166 // is the receiver ('this' object) of the interceptor. |value| is the new 17167 // value being assigned to the interceptor. If assignment fails, set 17168 // |exception| to the exception that will be thrown. Return true (1) if 17169 // interceptor assignment was handled, false (0) otherwise. 17170 /// 17171 extern(System) int function ( 17172 cef_v8interceptor_t* self, 17173 int index, 17174 cef_v8value_t* object, 17175 cef_v8value_t* value, 17176 cef_string_t* exception) nothrow set_byindex; 17177 } 17178 17179 17180 17181 /// 17182 // Structure representing a V8 exception. The functions of this structure may be 17183 // called on any render process thread. 17184 /// 17185 struct cef_v8exception_t 17186 { 17187 /// 17188 // Base structure. 17189 /// 17190 cef_base_ref_counted_t base; 17191 17192 /// 17193 // Returns the exception message. 17194 /// 17195 // The resulting string must be freed by calling cef_string_userfree_free(). 17196 extern(System) cef_string_userfree_t function (cef_v8exception_t* self) nothrow get_message; 17197 17198 /// 17199 // Returns the line of source code that the exception occurred within. 17200 /// 17201 // The resulting string must be freed by calling cef_string_userfree_free(). 17202 extern(System) cef_string_userfree_t function (cef_v8exception_t* self) nothrow get_source_line; 17203 17204 /// 17205 // Returns the resource name for the script from where the function causing 17206 // the error originates. 17207 /// 17208 // The resulting string must be freed by calling cef_string_userfree_free(). 17209 extern(System) cef_string_userfree_t function ( 17210 cef_v8exception_t* self) nothrow get_script_resource_name; 17211 17212 /// 17213 // Returns the 1-based number of the line where the error occurred or 0 if the 17214 // line number is unknown. 17215 /// 17216 extern(System) int function (cef_v8exception_t* self) nothrow get_line_number; 17217 17218 /// 17219 // Returns the index within the script of the first character where the error 17220 // occurred. 17221 /// 17222 extern(System) int function (cef_v8exception_t* self) nothrow get_start_position; 17223 17224 /// 17225 // Returns the index within the script of the last character where the error 17226 // occurred. 17227 /// 17228 extern(System) int function (cef_v8exception_t* self) nothrow get_end_position; 17229 17230 /// 17231 // Returns the index within the line of the first character where the error 17232 // occurred. 17233 /// 17234 extern(System) int function (cef_v8exception_t* self) nothrow get_start_column; 17235 17236 /// 17237 // Returns the index within the line of the last character where the error 17238 // occurred. 17239 /// 17240 extern(System) int function (cef_v8exception_t* self) nothrow get_end_column; 17241 } 17242 17243 17244 17245 /// 17246 // Callback structure that is passed to cef_v8value_t::CreateArrayBuffer. 17247 /// 17248 struct cef_v8array_buffer_release_callback_t 17249 { 17250 /// 17251 // Base structure. 17252 /// 17253 cef_base_ref_counted_t base; 17254 17255 /// 17256 // Called to release |buffer| when the ArrayBuffer JS object is garbage 17257 // collected. |buffer| is the value that was passed to CreateArrayBuffer along 17258 // with this object. 17259 /// 17260 extern(System) void function ( 17261 cef_v8array_buffer_release_callback_t* self, 17262 void* buffer) nothrow release_buffer; 17263 } 17264 17265 17266 17267 /// 17268 // Structure representing a V8 value handle. V8 handles can only be accessed 17269 // from the thread on which they are created. Valid threads for creating a V8 17270 // handle include the render process main thread (TID_RENDERER) and WebWorker 17271 // threads. A task runner for posting tasks on the associated thread can be 17272 // retrieved via the cef_v8context_t::get_task_runner() function. 17273 /// 17274 struct cef_v8value_t 17275 { 17276 /// 17277 // Base structure. 17278 /// 17279 cef_base_ref_counted_t base; 17280 17281 /// 17282 // Returns true (1) if the underlying handle is valid and it can be accessed 17283 // on the current thread. Do not call any other functions if this function 17284 // returns false (0). 17285 /// 17286 extern(System) int function (cef_v8value_t* self) nothrow is_valid; 17287 17288 /// 17289 // True if the value type is undefined. 17290 /// 17291 extern(System) int function (cef_v8value_t* self) nothrow is_undefined; 17292 17293 /// 17294 // True if the value type is null. 17295 /// 17296 extern(System) int function (cef_v8value_t* self) nothrow is_null; 17297 17298 /// 17299 // True if the value type is bool. 17300 /// 17301 extern(System) int function (cef_v8value_t* self) nothrow is_bool; 17302 17303 /// 17304 // True if the value type is int. 17305 /// 17306 extern(System) int function (cef_v8value_t* self) nothrow is_int; 17307 17308 /// 17309 // True if the value type is unsigned int. 17310 /// 17311 extern(System) int function (cef_v8value_t* self) nothrow is_uint; 17312 17313 /// 17314 // True if the value type is double. 17315 /// 17316 extern(System) int function (cef_v8value_t* self) nothrow is_double; 17317 17318 /// 17319 // True if the value type is Date. 17320 /// 17321 extern(System) int function (cef_v8value_t* self) nothrow is_date; 17322 17323 /// 17324 // True if the value type is string. 17325 /// 17326 extern(System) int function (cef_v8value_t* self) nothrow is_string; 17327 17328 /// 17329 // True if the value type is object. 17330 /// 17331 extern(System) int function (cef_v8value_t* self) nothrow is_object; 17332 17333 /// 17334 // True if the value type is array. 17335 /// 17336 extern(System) int function (cef_v8value_t* self) nothrow is_array; 17337 17338 /// 17339 // True if the value type is an ArrayBuffer. 17340 /// 17341 extern(System) int function (cef_v8value_t* self) nothrow is_array_buffer; 17342 17343 /// 17344 // True if the value type is function. 17345 /// 17346 extern(System) int function (cef_v8value_t* self) nothrow is_function; 17347 17348 /// 17349 // Returns true (1) if this object is pointing to the same handle as |that| 17350 // object. 17351 /// 17352 extern(System) int function (cef_v8value_t* self, cef_v8value_t* that) nothrow is_same; 17353 17354 /// 17355 // Return a bool value. 17356 /// 17357 extern(System) int function (cef_v8value_t* self) nothrow get_bool_value; 17358 17359 /// 17360 // Return an int value. 17361 /// 17362 extern(System) int32 function (cef_v8value_t* self) nothrow get_int_value; 17363 17364 /// 17365 // Return an unsigned int value. 17366 /// 17367 extern(System) uint32 function (cef_v8value_t* self) nothrow get_uint_value; 17368 17369 /// 17370 // Return a double value. 17371 /// 17372 extern(System) double function (cef_v8value_t* self) nothrow get_double_value; 17373 17374 /// 17375 // Return a Date value. 17376 /// 17377 extern(System) cef_time_t function (cef_v8value_t* self) nothrow get_date_value; 17378 17379 /// 17380 // Return a string value. 17381 /// 17382 // The resulting string must be freed by calling cef_string_userfree_free(). 17383 extern(System) cef_string_userfree_t function (cef_v8value_t* self) nothrow get_string_value; 17384 17385 // OBJECT METHODS - These functions are only available on objects. Arrays and 17386 // functions are also objects. String- and integer-based keys can be used 17387 // interchangably with the framework converting between them as necessary. 17388 17389 /// 17390 // Returns true (1) if this is a user created object. 17391 /// 17392 extern(System) int function (cef_v8value_t* self) nothrow is_user_created; 17393 17394 /// 17395 // Returns true (1) if the last function call resulted in an exception. This 17396 // attribute exists only in the scope of the current CEF value object. 17397 /// 17398 extern(System) int function (cef_v8value_t* self) nothrow has_exception; 17399 17400 /// 17401 // Returns the exception resulting from the last function call. This attribute 17402 // exists only in the scope of the current CEF value object. 17403 /// 17404 extern(System) cef_v8exception_t* function (cef_v8value_t* self) nothrow get_exception; 17405 17406 /// 17407 // Clears the last exception and returns true (1) on success. 17408 /// 17409 extern(System) int function (cef_v8value_t* self) nothrow clear_exception; 17410 17411 /// 17412 // Returns true (1) if this object will re-throw future exceptions. This 17413 // attribute exists only in the scope of the current CEF value object. 17414 /// 17415 extern(System) int function (cef_v8value_t* self) nothrow will_rethrow_exceptions; 17416 17417 /// 17418 // Set whether this object will re-throw future exceptions. By default 17419 // exceptions are not re-thrown. If a exception is re-thrown the current 17420 // context should not be accessed again until after the exception has been 17421 // caught and not re-thrown. Returns true (1) on success. This attribute 17422 // exists only in the scope of the current CEF value object. 17423 /// 17424 extern(System) int function (cef_v8value_t* self, int rethrow) nothrow set_rethrow_exceptions; 17425 17426 /// 17427 // Returns true (1) if the object has a value with the specified identifier. 17428 /// 17429 extern(System) int function ( 17430 cef_v8value_t* self, 17431 const(cef_string_t)* key) nothrow has_value_bykey; 17432 17433 /// 17434 // Returns true (1) if the object has a value with the specified identifier. 17435 /// 17436 extern(System) int function (cef_v8value_t* self, int index) nothrow has_value_byindex; 17437 17438 /// 17439 // Deletes the value with the specified identifier and returns true (1) on 17440 // success. Returns false (0) if this function is called incorrectly or an 17441 // exception is thrown. For read-only and don't-delete values this function 17442 // will return true (1) even though deletion failed. 17443 /// 17444 extern(System) int function ( 17445 cef_v8value_t* self, 17446 const(cef_string_t)* key) nothrow delete_value_bykey; 17447 17448 /// 17449 // Deletes the value with the specified identifier and returns true (1) on 17450 // success. Returns false (0) if this function is called incorrectly, deletion 17451 // fails or an exception is thrown. For read-only and don't-delete values this 17452 // function will return true (1) even though deletion failed. 17453 /// 17454 extern(System) int function (cef_v8value_t* self, int index) nothrow delete_value_byindex; 17455 17456 /// 17457 // Returns the value with the specified identifier on success. Returns NULL if 17458 // this function is called incorrectly or an exception is thrown. 17459 /// 17460 extern(System) cef_v8value_t* function ( 17461 cef_v8value_t* self, 17462 const(cef_string_t)* key) nothrow get_value_bykey; 17463 17464 /// 17465 // Returns the value with the specified identifier on success. Returns NULL if 17466 // this function is called incorrectly or an exception is thrown. 17467 /// 17468 extern(System) cef_v8value_t* function ( 17469 cef_v8value_t* self, 17470 int index) nothrow get_value_byindex; 17471 17472 /// 17473 // Associates a value with the specified identifier and returns true (1) on 17474 // success. Returns false (0) if this function is called incorrectly or an 17475 // exception is thrown. For read-only values this function will return true 17476 // (1) even though assignment failed. 17477 /// 17478 extern(System) int function ( 17479 cef_v8value_t* self, 17480 const(cef_string_t)* key, 17481 cef_v8value_t* value, 17482 cef_v8_propertyattribute_t attribute) nothrow set_value_bykey; 17483 17484 /// 17485 // Associates a value with the specified identifier and returns true (1) on 17486 // success. Returns false (0) if this function is called incorrectly or an 17487 // exception is thrown. For read-only values this function will return true 17488 // (1) even though assignment failed. 17489 /// 17490 extern(System) int function ( 17491 cef_v8value_t* self, 17492 int index, 17493 cef_v8value_t* value) nothrow set_value_byindex; 17494 17495 /// 17496 // Registers an identifier and returns true (1) on success. Access to the 17497 // identifier will be forwarded to the cef_v8accessor_t instance passed to 17498 // cef_v8value_t::cef_v8value_create_object(). Returns false (0) if this 17499 // function is called incorrectly or an exception is thrown. For read-only 17500 // values this function will return true (1) even though assignment failed. 17501 /// 17502 extern(System) int function ( 17503 cef_v8value_t* self, 17504 const(cef_string_t)* key, 17505 cef_v8_accesscontrol_t settings, 17506 cef_v8_propertyattribute_t attribute) nothrow set_value_byaccessor; 17507 17508 /// 17509 // Read the keys for the object's values into the specified vector. Integer- 17510 // based keys will also be returned as strings. 17511 /// 17512 extern(System) int function (cef_v8value_t* self, cef_string_list_t keys) nothrow get_keys; 17513 17514 /// 17515 // Sets the user data for this object and returns true (1) on success. Returns 17516 // false (0) if this function is called incorrectly. This function can only be 17517 // called on user created objects. 17518 /// 17519 extern(System) int function ( 17520 cef_v8value_t* self, 17521 cef_base_ref_counted_t* user_data) nothrow set_user_data; 17522 17523 /// 17524 // Returns the user data, if any, assigned to this object. 17525 /// 17526 extern(System) cef_base_ref_counted_t* function (cef_v8value_t* self) nothrow get_user_data; 17527 17528 /// 17529 // Returns the amount of externally allocated memory registered for the 17530 // object. 17531 /// 17532 extern(System) int function (cef_v8value_t* self) nothrow get_externally_allocated_memory; 17533 17534 /// 17535 // Adjusts the amount of registered external memory for the object. Used to 17536 // give V8 an indication of the amount of externally allocated memory that is 17537 // kept alive by JavaScript objects. V8 uses this information to decide when 17538 // to perform global garbage collection. Each cef_v8value_t tracks the amount 17539 // of external memory associated with it and automatically decreases the 17540 // global total by the appropriate amount on its destruction. 17541 // |change_in_bytes| specifies the number of bytes to adjust by. This function 17542 // returns the number of bytes associated with the object after the 17543 // adjustment. This function can only be called on user created objects. 17544 /// 17545 extern(System) int function ( 17546 cef_v8value_t* self, 17547 int change_in_bytes) nothrow adjust_externally_allocated_memory; 17548 17549 // ARRAY METHODS - These functions are only available on arrays. 17550 17551 /// 17552 // Returns the number of elements in the array. 17553 /// 17554 extern(System) int function (cef_v8value_t* self) nothrow get_array_length; 17555 17556 // ARRAY BUFFER METHODS - These functions are only available on ArrayBuffers. 17557 17558 /// 17559 // Returns the ReleaseCallback object associated with the ArrayBuffer or NULL 17560 // if the ArrayBuffer was not created with CreateArrayBuffer. 17561 /// 17562 extern(System) cef_v8array_buffer_release_callback_t* function ( 17563 cef_v8value_t* self) nothrow get_array_buffer_release_callback; 17564 17565 /// 17566 // Prevent the ArrayBuffer from using it's memory block by setting the length 17567 // to zero. This operation cannot be undone. If the ArrayBuffer was created 17568 // with CreateArrayBuffer then 17569 // cef_v8array_buffer_release_callback_t::ReleaseBuffer will be called to 17570 // release the underlying buffer. 17571 /// 17572 extern(System) int function (cef_v8value_t* self) nothrow neuter_array_buffer; 17573 17574 // FUNCTION METHODS - These functions are only available on functions. 17575 17576 /// 17577 // Returns the function name. 17578 /// 17579 // The resulting string must be freed by calling cef_string_userfree_free(). 17580 extern(System) cef_string_userfree_t function (cef_v8value_t* self) nothrow get_function_name; 17581 17582 /// 17583 // Returns the function handler or NULL if not a CEF-created function. 17584 /// 17585 extern(System) cef_v8handler_t* function (cef_v8value_t* self) nothrow get_function_handler; 17586 17587 /// 17588 // Execute the function using the current V8 context. This function should 17589 // only be called from within the scope of a cef_v8handler_t or 17590 // cef_v8accessor_t callback, or in combination with calling enter() and 17591 // exit() on a stored cef_v8context_t reference. |object| is the receiver 17592 // ('this' object) of the function. If |object| is NULL the current context's 17593 // global object will be used. |arguments| is the list of arguments that will 17594 // be passed to the function. Returns the function return value on success. 17595 // Returns NULL if this function is called incorrectly or an exception is 17596 // thrown. 17597 /// 17598 extern(System) cef_v8value_t* function ( 17599 cef_v8value_t* self, 17600 cef_v8value_t* object, 17601 size_t argumentsCount, 17602 cef_v8value_t** arguments) nothrow execute_function; 17603 17604 /// 17605 // Execute the function using the specified V8 context. |object| is the 17606 // receiver ('this' object) of the function. If |object| is NULL the specified 17607 // context's global object will be used. |arguments| is the list of arguments 17608 // that will be passed to the function. Returns the function return value on 17609 // success. Returns NULL if this function is called incorrectly or an 17610 // exception is thrown. 17611 /// 17612 extern(System) cef_v8value_t* function ( 17613 cef_v8value_t* self, 17614 cef_v8context_t* context, 17615 cef_v8value_t* object, 17616 size_t argumentsCount, 17617 cef_v8value_t** arguments) nothrow execute_function_with_context; 17618 } 17619 17620 17621 17622 /// 17623 // Create a new cef_v8value_t object of type undefined. 17624 /// 17625 cef_v8value_t* cef_v8value_create_undefined (); 17626 17627 /// 17628 // Create a new cef_v8value_t object of type null. 17629 /// 17630 cef_v8value_t* cef_v8value_create_null (); 17631 17632 /// 17633 // Create a new cef_v8value_t object of type bool. 17634 /// 17635 cef_v8value_t* cef_v8value_create_bool (int value); 17636 17637 /// 17638 // Create a new cef_v8value_t object of type int. 17639 /// 17640 cef_v8value_t* cef_v8value_create_int (int32 value); 17641 17642 /// 17643 // Create a new cef_v8value_t object of type unsigned int. 17644 /// 17645 cef_v8value_t* cef_v8value_create_uint (uint32 value); 17646 17647 /// 17648 // Create a new cef_v8value_t object of type double. 17649 /// 17650 cef_v8value_t* cef_v8value_create_double (double value); 17651 17652 /// 17653 // Create a new cef_v8value_t object of type Date. This function should only be 17654 // called from within the scope of a cef_render_process_handler_t, 17655 // cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling 17656 // enter() and exit() on a stored cef_v8context_t reference. 17657 /// 17658 cef_v8value_t* cef_v8value_create_date (const(cef_time_t)* date); 17659 17660 /// 17661 // Create a new cef_v8value_t object of type string. 17662 /// 17663 cef_v8value_t* cef_v8value_create_string (const(cef_string_t)* value); 17664 17665 /// 17666 // Create a new cef_v8value_t object of type object with optional accessor 17667 // and/or interceptor. This function should only be called from within the scope 17668 // of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t 17669 // callback, or in combination with calling enter() and exit() on a stored 17670 // cef_v8context_t reference. 17671 /// 17672 cef_v8value_t* cef_v8value_create_object ( 17673 cef_v8accessor_t* accessor, 17674 cef_v8interceptor_t* interceptor); 17675 17676 /// 17677 // Create a new cef_v8value_t object of type array with the specified |length|. 17678 // If |length| is negative the returned array will have length 0. This function 17679 // should only be called from within the scope of a 17680 // cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, 17681 // or in combination with calling enter() and exit() on a stored cef_v8context_t 17682 // reference. 17683 /// 17684 cef_v8value_t* cef_v8value_create_array (int length); 17685 17686 /// 17687 // Create a new cef_v8value_t object of type ArrayBuffer which wraps the 17688 // provided |buffer| of size |length| bytes. The ArrayBuffer is externalized, 17689 // meaning that it does not own |buffer|. The caller is responsible for freeing 17690 // |buffer| when requested via a call to cef_v8array_buffer_release_callback_t:: 17691 // ReleaseBuffer. This function should only be called from within the scope of a 17692 // cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, 17693 // or in combination with calling enter() and exit() on a stored cef_v8context_t 17694 // reference. 17695 /// 17696 cef_v8value_t* cef_v8value_create_array_buffer ( 17697 void* buffer, 17698 size_t length, 17699 cef_v8array_buffer_release_callback_t* release_callback); 17700 17701 /// 17702 // Create a new cef_v8value_t object of type function. This function should only 17703 // be called from within the scope of a cef_render_process_handler_t, 17704 // cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling 17705 // enter() and exit() on a stored cef_v8context_t reference. 17706 /// 17707 extern(System) cef_v8value_t* cef_v8value_create_function ( 17708 const(cef_string_t)* name, 17709 cef_v8handler_t* handler) nothrow; 17710 17711 /// 17712 // Structure representing a V8 stack trace handle. V8 handles can only be 17713 // accessed from the thread on which they are created. Valid threads for 17714 // creating a V8 handle include the render process main thread (TID_RENDERER) 17715 // and WebWorker threads. A task runner for posting tasks on the associated 17716 // thread can be retrieved via the cef_v8context_t::get_task_runner() function. 17717 /// 17718 struct cef_v8stack_trace_t 17719 { 17720 /// 17721 // Base structure. 17722 /// 17723 cef_base_ref_counted_t base; 17724 17725 /// 17726 // Returns true (1) if the underlying handle is valid and it can be accessed 17727 // on the current thread. Do not call any other functions if this function 17728 // returns false (0). 17729 /// 17730 extern(System) int function (cef_v8stack_trace_t* self) nothrow is_valid; 17731 17732 /// 17733 // Returns the number of stack frames. 17734 /// 17735 extern(System) int function (cef_v8stack_trace_t* self) nothrow get_frame_count; 17736 17737 /// 17738 // Returns the stack frame at the specified 0-based index. 17739 /// 17740 extern(System) cef_v8stack_frame_t* function ( 17741 cef_v8stack_trace_t* self, 17742 int index) nothrow get_frame; 17743 } 17744 17745 17746 17747 /// 17748 // Returns the stack trace for the currently active context. |frame_limit| is 17749 // the maximum number of frames that will be captured. 17750 /// 17751 cef_v8stack_trace_t* cef_v8stack_trace_get_current (int frame_limit); 17752 17753 /// 17754 // Structure representing a V8 stack frame handle. V8 handles can only be 17755 // accessed from the thread on which they are created. Valid threads for 17756 // creating a V8 handle include the render process main thread (TID_RENDERER) 17757 // and WebWorker threads. A task runner for posting tasks on the associated 17758 // thread can be retrieved via the cef_v8context_t::get_task_runner() function. 17759 /// 17760 struct cef_v8stack_frame_t 17761 { 17762 /// 17763 // Base structure. 17764 /// 17765 cef_base_ref_counted_t base; 17766 17767 /// 17768 // Returns true (1) if the underlying handle is valid and it can be accessed 17769 // on the current thread. Do not call any other functions if this function 17770 // returns false (0). 17771 /// 17772 extern(System) int function (cef_v8stack_frame_t* self) nothrow is_valid; 17773 17774 /// 17775 // Returns the name of the resource script that contains the function. 17776 /// 17777 // The resulting string must be freed by calling cef_string_userfree_free(). 17778 extern(System) cef_string_userfree_t function ( 17779 cef_v8stack_frame_t* self) nothrow get_script_name; 17780 17781 /// 17782 // Returns the name of the resource script that contains the function or the 17783 // sourceURL value if the script name is undefined and its source ends with a 17784 // "//@ sourceURL=..." string. 17785 /// 17786 // The resulting string must be freed by calling cef_string_userfree_free(). 17787 extern(System) cef_string_userfree_t function ( 17788 cef_v8stack_frame_t* self) nothrow get_script_name_or_source_url; 17789 17790 /// 17791 // Returns the name of the function. 17792 /// 17793 // The resulting string must be freed by calling cef_string_userfree_free(). 17794 extern(System) cef_string_userfree_t function ( 17795 cef_v8stack_frame_t* self) nothrow get_function_name; 17796 17797 /// 17798 // Returns the 1-based line number for the function call or 0 if unknown. 17799 /// 17800 extern(System) int function (cef_v8stack_frame_t* self) nothrow get_line_number; 17801 17802 /// 17803 // Returns the 1-based column offset on the line for the function call or 0 if 17804 // unknown. 17805 /// 17806 extern(System) int function (cef_v8stack_frame_t* self) nothrow get_column; 17807 17808 /// 17809 // Returns true (1) if the function was compiled using eval(). 17810 /// 17811 extern(System) int function (cef_v8stack_frame_t* self) nothrow is_eval; 17812 17813 /// 17814 // Returns true (1) if the function was called as a constructor via "new". 17815 /// 17816 extern(System) int function (cef_v8stack_frame_t* self) nothrow is_constructor; 17817 } 17818 17819 17820 17821 /// 17822 // Register a new V8 extension with the specified JavaScript extension code and 17823 // handler. Functions implemented by the handler are prototyped using the 17824 // keyword 'native'. The calling of a native function is restricted to the scope 17825 // in which the prototype of the native function is defined. This function may 17826 // only be called on the render process main thread. 17827 // 17828 // Example JavaScript extension code: <pre> 17829 // // create the 'example' global object if it doesn't already exist. 17830 // if (!example) 17831 // example = {}; 17832 // // create the 'example.test' global object if it doesn't already exist. 17833 // if (!example.test) 17834 // example.test = {}; 17835 // (function() { 17836 // // Define the function 'example.test.myfunction'. 17837 // example.test.myfunction = function() { 17838 // // Call CefV8Handler::Execute() with the function name 'MyFunction' 17839 // // and no arguments. 17840 // native function MyFunction(); 17841 // return MyFunction(); 17842 // }; 17843 // // Define the getter function for parameter 'example.test.myparam'. 17844 // example.test.__defineGetter__('myparam', function() { 17845 // // Call CefV8Handler::Execute() with the function name 'GetMyParam' 17846 // // and no arguments. 17847 // native function GetMyParam(); 17848 // return GetMyParam(); 17849 // }); 17850 // // Define the setter function for parameter 'example.test.myparam'. 17851 // example.test.__defineSetter__('myparam', function(b) { 17852 // // Call CefV8Handler::Execute() with the function name 'SetMyParam' 17853 // // and a single argument. 17854 // native function SetMyParam(); 17855 // if(b) SetMyParam(b); 17856 // }); 17857 // 17858 // // Extension definitions can also contain normal JavaScript variables 17859 // // and functions. 17860 // var myint = 0; 17861 // example.test.increment = function() { 17862 // myint += 1; 17863 // return myint; 17864 // }; 17865 // })(); 17866 // </pre> Example usage in the page: <pre> 17867 // // Call the function. 17868 // example.test.myfunction(); 17869 // // Set the parameter. 17870 // example.test.myparam = value; 17871 // // Get the parameter. 17872 // value = example.test.myparam; 17873 // // Call another function. 17874 // example.test.increment(); 17875 // </pre> 17876 /// 17877 int cef_register_extension ( 17878 const(cef_string_t)* extension_name, 17879 const(cef_string_t)* javascript_code, 17880 cef_v8handler_t* handler); 17881 17882 // CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_ 17883 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 17884 // 17885 // Redistribution and use in source and binary forms, with or without 17886 // modification, are permitted provided that the following conditions are 17887 // met: 17888 // 17889 // * Redistributions of source code must retain the above copyright 17890 // notice, this list of conditions and the following disclaimer. 17891 // * Redistributions in binary form must reproduce the above 17892 // copyright notice, this list of conditions and the following disclaimer 17893 // in the documentation and/or other materials provided with the 17894 // distribution. 17895 // * Neither the name of Google Inc. nor the name Chromium Embedded 17896 // Framework nor the names of its contributors may be used to endorse 17897 // or promote products derived from this software without specific prior 17898 // written permission. 17899 // 17900 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17901 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17902 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17903 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17904 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17905 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17906 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17907 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17908 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17909 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17910 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17911 // 17912 // --------------------------------------------------------------------------- 17913 // 17914 // This file was generated by the CEF translator tool and should not edited 17915 // by hand. See the translator.README.txt file in the tools directory for 17916 // more information. 17917 // 17918 // $hash=d9074be0e6960c69cfe2c39b92b4dd6f529210d1$ 17919 // 17920 17921 extern (C): 17922 17923 /// 17924 // Structure that wraps other data value types. Complex types (binary, 17925 // dictionary and list) will be referenced but not owned by this object. Can be 17926 // used on any process and thread. 17927 /// 17928 struct cef_value_t 17929 { 17930 /// 17931 // Base structure. 17932 /// 17933 cef_base_ref_counted_t base; 17934 17935 /// 17936 // Returns true (1) if the underlying data is valid. This will always be true 17937 // (1) for simple types. For complex types (binary, dictionary and list) the 17938 // underlying data may become invalid if owned by another object (e.g. list or 17939 // dictionary) and that other object is then modified or destroyed. This value 17940 // object can be re-used by calling Set*() even if the underlying data is 17941 // invalid. 17942 /// 17943 extern(System) int function (cef_value_t* self) nothrow is_valid; 17944 17945 /// 17946 // Returns true (1) if the underlying data is owned by another object. 17947 /// 17948 extern(System) int function (cef_value_t* self) nothrow is_owned; 17949 17950 /// 17951 // Returns true (1) if the underlying data is read-only. Some APIs may expose 17952 // read-only objects. 17953 /// 17954 extern(System) int function (cef_value_t* self) nothrow is_read_only; 17955 17956 /// 17957 // Returns true (1) if this object and |that| object have the same underlying 17958 // data. If true (1) modifications to this object will also affect |that| 17959 // object and vice-versa. 17960 /// 17961 extern(System) int function (cef_value_t* self, cef_value_t* that) nothrow is_same; 17962 17963 /// 17964 // Returns true (1) if this object and |that| object have an equivalent 17965 // underlying value but are not necessarily the same object. 17966 /// 17967 extern(System) int function (cef_value_t* self, cef_value_t* that) nothrow is_equal; 17968 17969 /// 17970 // Returns a copy of this object. The underlying data will also be copied. 17971 /// 17972 extern(System) cef_value_t* function (cef_value_t* self) nothrow copy; 17973 17974 /// 17975 // Returns the underlying value type. 17976 /// 17977 extern(System) cef_value_type_t function (cef_value_t* self) nothrow get_type; 17978 17979 /// 17980 // Returns the underlying value as type bool. 17981 /// 17982 extern(System) int function (cef_value_t* self) nothrow get_bool; 17983 17984 /// 17985 // Returns the underlying value as type int. 17986 /// 17987 extern(System) int function (cef_value_t* self) nothrow get_int; 17988 17989 /// 17990 // Returns the underlying value as type double. 17991 /// 17992 extern(System) double function (cef_value_t* self) nothrow get_double; 17993 17994 /// 17995 // Returns the underlying value as type string. 17996 /// 17997 // The resulting string must be freed by calling cef_string_userfree_free(). 17998 extern(System) cef_string_userfree_t function (cef_value_t* self) nothrow get_string; 17999 18000 /// 18001 // Returns the underlying value as type binary. The returned reference may 18002 // become invalid if the value is owned by another object or if ownership is 18003 // transferred to another object in the future. To maintain a reference to the 18004 // value after assigning ownership to a dictionary or list pass this object to 18005 // the set_value() function instead of passing the returned reference to 18006 // set_binary(). 18007 /// 18008 extern(System) cef_binary_value_t* function (cef_value_t* self) nothrow get_binary; 18009 18010 /// 18011 // Returns the underlying value as type dictionary. The returned reference may 18012 // become invalid if the value is owned by another object or if ownership is 18013 // transferred to another object in the future. To maintain a reference to the 18014 // value after assigning ownership to a dictionary or list pass this object to 18015 // the set_value() function instead of passing the returned reference to 18016 // set_dictionary(). 18017 /// 18018 extern(System) cef_dictionary_value_t* function (cef_value_t* self) nothrow get_dictionary; 18019 18020 /// 18021 // Returns the underlying value as type list. The returned reference may 18022 // become invalid if the value is owned by another object or if ownership is 18023 // transferred to another object in the future. To maintain a reference to the 18024 // value after assigning ownership to a dictionary or list pass this object to 18025 // the set_value() function instead of passing the returned reference to 18026 // set_list(). 18027 /// 18028 extern(System) cef_list_value_t* function (cef_value_t* self) nothrow get_list; 18029 18030 /// 18031 // Sets the underlying value as type null. Returns true (1) if the value was 18032 // set successfully. 18033 /// 18034 extern(System) int function (cef_value_t* self) nothrow set_null; 18035 18036 /// 18037 // Sets the underlying value as type bool. Returns true (1) if the value was 18038 // set successfully. 18039 /// 18040 extern(System) int function (cef_value_t* self, int value) nothrow set_bool; 18041 18042 /// 18043 // Sets the underlying value as type int. Returns true (1) if the value was 18044 // set successfully. 18045 /// 18046 extern(System) int function (cef_value_t* self, int value) nothrow set_int; 18047 18048 /// 18049 // Sets the underlying value as type double. Returns true (1) if the value was 18050 // set successfully. 18051 /// 18052 extern(System) int function (cef_value_t* self, double value) nothrow set_double; 18053 18054 /// 18055 // Sets the underlying value as type string. Returns true (1) if the value was 18056 // set successfully. 18057 /// 18058 extern(System) int function (cef_value_t* self, const(cef_string_t)* value) nothrow set_string; 18059 18060 /// 18061 // Sets the underlying value as type binary. Returns true (1) if the value was 18062 // set successfully. This object keeps a reference to |value| and ownership of 18063 // the underlying data remains unchanged. 18064 /// 18065 extern(System) int function (cef_value_t* self, cef_binary_value_t* value) nothrow set_binary; 18066 18067 /// 18068 // Sets the underlying value as type dict. Returns true (1) if the value was 18069 // set successfully. This object keeps a reference to |value| and ownership of 18070 // the underlying data remains unchanged. 18071 /// 18072 extern(System) int function ( 18073 cef_value_t* self, 18074 cef_dictionary_value_t* value) nothrow set_dictionary; 18075 18076 /// 18077 // Sets the underlying value as type list. Returns true (1) if the value was 18078 // set successfully. This object keeps a reference to |value| and ownership of 18079 // the underlying data remains unchanged. 18080 /// 18081 extern(System) int function (cef_value_t* self, cef_list_value_t* value) nothrow set_list; 18082 } 18083 18084 18085 18086 /// 18087 // Creates a new object. 18088 /// 18089 cef_value_t* cef_value_create (); 18090 18091 /// 18092 // Structure representing a binary value. Can be used on any process and thread. 18093 /// 18094 struct cef_binary_value_t 18095 { 18096 /// 18097 // Base structure. 18098 /// 18099 cef_base_ref_counted_t base; 18100 18101 /// 18102 // Returns true (1) if this object is valid. This object may become invalid if 18103 // the underlying data is owned by another object (e.g. list or dictionary) 18104 // and that other object is then modified or destroyed. Do not call any other 18105 // functions if this function returns false (0). 18106 /// 18107 extern(System) int function (cef_binary_value_t* self) nothrow is_valid; 18108 18109 /// 18110 // Returns true (1) if this object is currently owned by another object. 18111 /// 18112 extern(System) int function (cef_binary_value_t* self) nothrow is_owned; 18113 18114 /// 18115 // Returns true (1) if this object and |that| object have the same underlying 18116 // data. 18117 /// 18118 extern(System) int function ( 18119 cef_binary_value_t* self, 18120 cef_binary_value_t* that) nothrow is_same; 18121 18122 /// 18123 // Returns true (1) if this object and |that| object have an equivalent 18124 // underlying value but are not necessarily the same object. 18125 /// 18126 extern(System) int function ( 18127 cef_binary_value_t* self, 18128 cef_binary_value_t* that) nothrow is_equal; 18129 18130 /// 18131 // Returns a copy of this object. The data in this object will also be copied. 18132 /// 18133 extern(System) cef_binary_value_t* function (cef_binary_value_t* self) nothrow copy; 18134 18135 /// 18136 // Returns the data size. 18137 /// 18138 extern(System) size_t function (cef_binary_value_t* self) nothrow get_size; 18139 18140 /// 18141 // Read up to |buffer_size| number of bytes into |buffer|. Reading begins at 18142 // the specified byte |data_offset|. Returns the number of bytes read. 18143 /// 18144 extern(System) size_t function ( 18145 cef_binary_value_t* self, 18146 void* buffer, 18147 size_t buffer_size, 18148 size_t data_offset) nothrow get_data; 18149 } 18150 18151 18152 18153 /// 18154 // Creates a new object that is not owned by any other object. The specified 18155 // |data| will be copied. 18156 /// 18157 cef_binary_value_t* cef_binary_value_create ( 18158 const(void)* data, 18159 size_t data_size); 18160 18161 /// 18162 // Structure representing a dictionary value. Can be used on any process and 18163 // thread. 18164 /// 18165 struct cef_dictionary_value_t 18166 { 18167 /// 18168 // Base structure. 18169 /// 18170 cef_base_ref_counted_t base; 18171 18172 /// 18173 // Returns true (1) if this object is valid. This object may become invalid if 18174 // the underlying data is owned by another object (e.g. list or dictionary) 18175 // and that other object is then modified or destroyed. Do not call any other 18176 // functions if this function returns false (0). 18177 /// 18178 extern(System) int function (cef_dictionary_value_t* self) nothrow is_valid; 18179 18180 /// 18181 // Returns true (1) if this object is currently owned by another object. 18182 /// 18183 extern(System) int function (cef_dictionary_value_t* self) nothrow is_owned; 18184 18185 /// 18186 // Returns true (1) if the values of this object are read-only. Some APIs may 18187 // expose read-only objects. 18188 /// 18189 extern(System) int function (cef_dictionary_value_t* self) nothrow is_read_only; 18190 18191 /// 18192 // Returns true (1) if this object and |that| object have the same underlying 18193 // data. If true (1) modifications to this object will also affect |that| 18194 // object and vice-versa. 18195 /// 18196 extern(System) int function ( 18197 cef_dictionary_value_t* self, 18198 cef_dictionary_value_t* that) nothrow is_same; 18199 18200 /// 18201 // Returns true (1) if this object and |that| object have an equivalent 18202 // underlying value but are not necessarily the same object. 18203 /// 18204 extern(System) int function ( 18205 cef_dictionary_value_t* self, 18206 cef_dictionary_value_t* that) nothrow is_equal; 18207 18208 /// 18209 // Returns a writable copy of this object. If |exclude_NULL_children| is true 18210 // (1) any NULL dictionaries or lists will be excluded from the copy. 18211 /// 18212 extern(System) cef_dictionary_value_t* function ( 18213 cef_dictionary_value_t* self, 18214 int exclude_empty_children) nothrow copy; 18215 18216 /// 18217 // Returns the number of values. 18218 /// 18219 extern(System) size_t function (cef_dictionary_value_t* self) nothrow get_size; 18220 18221 /// 18222 // Removes all values. Returns true (1) on success. 18223 /// 18224 extern(System) int function (cef_dictionary_value_t* self) nothrow clear; 18225 18226 /// 18227 // Returns true (1) if the current dictionary has a value for the given key. 18228 /// 18229 extern(System) int function ( 18230 cef_dictionary_value_t* self, 18231 const(cef_string_t)* key) nothrow has_key; 18232 18233 /// 18234 // Reads all keys for this dictionary into the specified vector. 18235 /// 18236 extern(System) int function ( 18237 cef_dictionary_value_t* self, 18238 cef_string_list_t keys) nothrow get_keys; 18239 18240 /// 18241 // Removes the value at the specified key. Returns true (1) is the value was 18242 // removed successfully. 18243 /// 18244 extern(System) int function ( 18245 cef_dictionary_value_t* self, 18246 const(cef_string_t)* key) nothrow remove; 18247 18248 /// 18249 // Returns the value type for the specified key. 18250 /// 18251 extern(System) cef_value_type_t function ( 18252 cef_dictionary_value_t* self, 18253 const(cef_string_t)* key) nothrow get_type; 18254 18255 /// 18256 // Returns the value at the specified key. For simple types the returned value 18257 // will copy existing data and modifications to the value will not modify this 18258 // object. For complex types (binary, dictionary and list) the returned value 18259 // will reference existing data and modifications to the value will modify 18260 // this object. 18261 /// 18262 extern(System) cef_value_t* function ( 18263 cef_dictionary_value_t* self, 18264 const(cef_string_t)* key) nothrow get_value; 18265 18266 /// 18267 // Returns the value at the specified key as type bool. 18268 /// 18269 extern(System) int function ( 18270 cef_dictionary_value_t* self, 18271 const(cef_string_t)* key) nothrow get_bool; 18272 18273 /// 18274 // Returns the value at the specified key as type int. 18275 /// 18276 extern(System) int function ( 18277 cef_dictionary_value_t* self, 18278 const(cef_string_t)* key) nothrow get_int; 18279 18280 /// 18281 // Returns the value at the specified key as type double. 18282 /// 18283 extern(System) double function ( 18284 cef_dictionary_value_t* self, 18285 const(cef_string_t)* key) nothrow get_double; 18286 18287 /// 18288 // Returns the value at the specified key as type string. 18289 /// 18290 // The resulting string must be freed by calling cef_string_userfree_free(). 18291 extern(System) cef_string_userfree_t function ( 18292 cef_dictionary_value_t* self, 18293 const(cef_string_t)* key) nothrow get_string; 18294 18295 /// 18296 // Returns the value at the specified key as type binary. The returned value 18297 // will reference existing data. 18298 /// 18299 extern(System) cef_binary_value_t* function ( 18300 cef_dictionary_value_t* self, 18301 const(cef_string_t)* key) nothrow get_binary; 18302 18303 /// 18304 // Returns the value at the specified key as type dictionary. The returned 18305 // value will reference existing data and modifications to the value will 18306 // modify this object. 18307 /// 18308 extern(System) cef_dictionary_value_t* function ( 18309 cef_dictionary_value_t* self, 18310 const(cef_string_t)* key) nothrow get_dictionary; 18311 18312 /// 18313 // Returns the value at the specified key as type list. The returned value 18314 // will reference existing data and modifications to the value will modify 18315 // this object. 18316 /// 18317 extern(System) cef_list_value_t* function ( 18318 cef_dictionary_value_t* self, 18319 const(cef_string_t)* key) nothrow get_list; 18320 18321 /// 18322 // Sets the value at the specified key. Returns true (1) if the value was set 18323 // successfully. If |value| represents simple data then the underlying data 18324 // will be copied and modifications to |value| will not modify this object. If 18325 // |value| represents complex data (binary, dictionary or list) then the 18326 // underlying data will be referenced and modifications to |value| will modify 18327 // this object. 18328 /// 18329 extern(System) int function ( 18330 cef_dictionary_value_t* self, 18331 const(cef_string_t)* key, 18332 cef_value_t* value) nothrow set_value; 18333 18334 /// 18335 // Sets the value at the specified key as type null. Returns true (1) if the 18336 // value was set successfully. 18337 /// 18338 extern(System) int function ( 18339 cef_dictionary_value_t* self, 18340 const(cef_string_t)* key) nothrow set_null; 18341 18342 /// 18343 // Sets the value at the specified key as type bool. Returns true (1) if the 18344 // value was set successfully. 18345 /// 18346 extern(System) int function ( 18347 cef_dictionary_value_t* self, 18348 const(cef_string_t)* key, 18349 int value) nothrow set_bool; 18350 18351 /// 18352 // Sets the value at the specified key as type int. Returns true (1) if the 18353 // value was set successfully. 18354 /// 18355 extern(System) int function ( 18356 cef_dictionary_value_t* self, 18357 const(cef_string_t)* key, 18358 int value) nothrow set_int; 18359 18360 /// 18361 // Sets the value at the specified key as type double. Returns true (1) if the 18362 // value was set successfully. 18363 /// 18364 extern(System) int function ( 18365 cef_dictionary_value_t* self, 18366 const(cef_string_t)* key, 18367 double value) nothrow set_double; 18368 18369 /// 18370 // Sets the value at the specified key as type string. Returns true (1) if the 18371 // value was set successfully. 18372 /// 18373 extern(System) int function ( 18374 cef_dictionary_value_t* self, 18375 const(cef_string_t)* key, 18376 const(cef_string_t)* value) nothrow set_string; 18377 18378 /// 18379 // Sets the value at the specified key as type binary. Returns true (1) if the 18380 // value was set successfully. If |value| is currently owned by another object 18381 // then the value will be copied and the |value| reference will not change. 18382 // Otherwise, ownership will be transferred to this object and the |value| 18383 // reference will be invalidated. 18384 /// 18385 extern(System) int function ( 18386 cef_dictionary_value_t* self, 18387 const(cef_string_t)* key, 18388 cef_binary_value_t* value) nothrow set_binary; 18389 18390 /// 18391 // Sets the value at the specified key as type dict. Returns true (1) if the 18392 // value was set successfully. If |value| is currently owned by another object 18393 // then the value will be copied and the |value| reference will not change. 18394 // Otherwise, ownership will be transferred to this object and the |value| 18395 // reference will be invalidated. 18396 /// 18397 extern(System) int function ( 18398 cef_dictionary_value_t* self, 18399 const(cef_string_t)* key, 18400 cef_dictionary_value_t* value) nothrow set_dictionary; 18401 18402 /// 18403 // Sets the value at the specified key as type list. Returns true (1) if the 18404 // value was set successfully. If |value| is currently owned by another object 18405 // then the value will be copied and the |value| reference will not change. 18406 // Otherwise, ownership will be transferred to this object and the |value| 18407 // reference will be invalidated. 18408 /// 18409 extern(System) int function ( 18410 cef_dictionary_value_t* self, 18411 const(cef_string_t)* key, 18412 cef_list_value_t* value) nothrow set_list; 18413 } 18414 18415 18416 18417 /// 18418 // Creates a new object that is not owned by any other object. 18419 /// 18420 cef_dictionary_value_t* cef_dictionary_value_create (); 18421 18422 /// 18423 // Structure representing a list value. Can be used on any process and thread. 18424 /// 18425 struct cef_list_value_t 18426 { 18427 /// 18428 // Base structure. 18429 /// 18430 cef_base_ref_counted_t base; 18431 18432 /// 18433 // Returns true (1) if this object is valid. This object may become invalid if 18434 // the underlying data is owned by another object (e.g. list or dictionary) 18435 // and that other object is then modified or destroyed. Do not call any other 18436 // functions if this function returns false (0). 18437 /// 18438 extern(System) int function (cef_list_value_t* self) nothrow is_valid; 18439 18440 /// 18441 // Returns true (1) if this object is currently owned by another object. 18442 /// 18443 extern(System) int function (cef_list_value_t* self) nothrow is_owned; 18444 18445 /// 18446 // Returns true (1) if the values of this object are read-only. Some APIs may 18447 // expose read-only objects. 18448 /// 18449 extern(System) int function (cef_list_value_t* self) nothrow is_read_only; 18450 18451 /// 18452 // Returns true (1) if this object and |that| object have the same underlying 18453 // data. If true (1) modifications to this object will also affect |that| 18454 // object and vice-versa. 18455 /// 18456 extern(System) int function (cef_list_value_t* self, cef_list_value_t* that) nothrow is_same; 18457 18458 /// 18459 // Returns true (1) if this object and |that| object have an equivalent 18460 // underlying value but are not necessarily the same object. 18461 /// 18462 extern(System) int function (cef_list_value_t* self, cef_list_value_t* that) nothrow is_equal; 18463 18464 /// 18465 // Returns a writable copy of this object. 18466 /// 18467 extern(System) cef_list_value_t* function (cef_list_value_t* self) nothrow copy; 18468 18469 /// 18470 // Sets the number of values. If the number of values is expanded all new 18471 // value slots will default to type null. Returns true (1) on success. 18472 /// 18473 extern(System) int function (cef_list_value_t* self, size_t size) nothrow set_size; 18474 18475 /// 18476 // Returns the number of values. 18477 /// 18478 extern(System) size_t function (cef_list_value_t* self) nothrow get_size; 18479 18480 /// 18481 // Removes all values. Returns true (1) on success. 18482 /// 18483 extern(System) int function (cef_list_value_t* self) nothrow clear; 18484 18485 /// 18486 // Removes the value at the specified index. 18487 /// 18488 extern(System) int function (cef_list_value_t* self, size_t index) nothrow remove; 18489 18490 /// 18491 // Returns the value type at the specified index. 18492 /// 18493 extern(System) cef_value_type_t function (cef_list_value_t* self, size_t index) nothrow get_type; 18494 18495 /// 18496 // Returns the value at the specified index. For simple types the returned 18497 // value will copy existing data and modifications to the value will not 18498 // modify this object. For complex types (binary, dictionary and list) the 18499 // returned value will reference existing data and modifications to the value 18500 // will modify this object. 18501 /// 18502 extern(System) cef_value_t* function (cef_list_value_t* self, size_t index) nothrow get_value; 18503 18504 /// 18505 // Returns the value at the specified index as type bool. 18506 /// 18507 extern(System) int function (cef_list_value_t* self, size_t index) nothrow get_bool; 18508 18509 /// 18510 // Returns the value at the specified index as type int. 18511 /// 18512 extern(System) int function (cef_list_value_t* self, size_t index) nothrow get_int; 18513 18514 /// 18515 // Returns the value at the specified index as type double. 18516 /// 18517 extern(System) double function (cef_list_value_t* self, size_t index) nothrow get_double; 18518 18519 /// 18520 // Returns the value at the specified index as type string. 18521 /// 18522 // The resulting string must be freed by calling cef_string_userfree_free(). 18523 extern(System) cef_string_userfree_t function ( 18524 cef_list_value_t* self, 18525 size_t index) nothrow get_string; 18526 18527 /// 18528 // Returns the value at the specified index as type binary. The returned value 18529 // will reference existing data. 18530 /// 18531 extern(System) cef_binary_value_t* function ( 18532 cef_list_value_t* self, 18533 size_t index) nothrow get_binary; 18534 18535 /// 18536 // Returns the value at the specified index as type dictionary. The returned 18537 // value will reference existing data and modifications to the value will 18538 // modify this object. 18539 /// 18540 extern(System) cef_dictionary_value_t* function ( 18541 cef_list_value_t* self, 18542 size_t index) nothrow get_dictionary; 18543 18544 /// 18545 // Returns the value at the specified index as type list. The returned value 18546 // will reference existing data and modifications to the value will modify 18547 // this object. 18548 /// 18549 extern(System) cef_list_value_t* function ( 18550 cef_list_value_t* self, 18551 size_t index) nothrow get_list; 18552 18553 /// 18554 // Sets the value at the specified index. Returns true (1) if the value was 18555 // set successfully. If |value| represents simple data then the underlying 18556 // data will be copied and modifications to |value| will not modify this 18557 // object. If |value| represents complex data (binary, dictionary or list) 18558 // then the underlying data will be referenced and modifications to |value| 18559 // will modify this object. 18560 /// 18561 extern(System) int function ( 18562 cef_list_value_t* self, 18563 size_t index, 18564 cef_value_t* value) nothrow set_value; 18565 18566 /// 18567 // Sets the value at the specified index as type null. Returns true (1) if the 18568 // value was set successfully. 18569 /// 18570 extern(System) int function (cef_list_value_t* self, size_t index) nothrow set_null; 18571 18572 /// 18573 // Sets the value at the specified index as type bool. Returns true (1) if the 18574 // value was set successfully. 18575 /// 18576 extern(System) int function (cef_list_value_t* self, size_t index, int value) nothrow set_bool; 18577 18578 /// 18579 // Sets the value at the specified index as type int. Returns true (1) if the 18580 // value was set successfully. 18581 /// 18582 extern(System) int function (cef_list_value_t* self, size_t index, int value) nothrow set_int; 18583 18584 /// 18585 // Sets the value at the specified index as type double. Returns true (1) if 18586 // the value was set successfully. 18587 /// 18588 extern(System) int function ( 18589 cef_list_value_t* self, 18590 size_t index, 18591 double value) nothrow set_double; 18592 18593 /// 18594 // Sets the value at the specified index as type string. Returns true (1) if 18595 // the value was set successfully. 18596 /// 18597 extern(System) int function ( 18598 cef_list_value_t* self, 18599 size_t index, 18600 const(cef_string_t)* value) nothrow set_string; 18601 18602 /// 18603 // Sets the value at the specified index as type binary. Returns true (1) if 18604 // the value was set successfully. If |value| is currently owned by another 18605 // object then the value will be copied and the |value| reference will not 18606 // change. Otherwise, ownership will be transferred to this object and the 18607 // |value| reference will be invalidated. 18608 /// 18609 extern(System) int function ( 18610 cef_list_value_t* self, 18611 size_t index, 18612 cef_binary_value_t* value) nothrow set_binary; 18613 18614 /// 18615 // Sets the value at the specified index as type dict. Returns true (1) if the 18616 // value was set successfully. If |value| is currently owned by another object 18617 // then the value will be copied and the |value| reference will not change. 18618 // Otherwise, ownership will be transferred to this object and the |value| 18619 // reference will be invalidated. 18620 /// 18621 extern(System) int function ( 18622 cef_list_value_t* self, 18623 size_t index, 18624 cef_dictionary_value_t* value) nothrow set_dictionary; 18625 18626 /// 18627 // Sets the value at the specified index as type list. Returns true (1) if the 18628 // value was set successfully. If |value| is currently owned by another object 18629 // then the value will be copied and the |value| reference will not change. 18630 // Otherwise, ownership will be transferred to this object and the |value| 18631 // reference will be invalidated. 18632 /// 18633 extern(System) int function ( 18634 cef_list_value_t* self, 18635 size_t index, 18636 cef_list_value_t* value) nothrow set_list; 18637 } 18638 18639 18640 18641 /// 18642 // Creates a new object that is not owned by any other object. 18643 /// 18644 cef_list_value_t* cef_list_value_create (); 18645 18646 // CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ 18647 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 18648 // 18649 // Redistribution and use in source and binary forms, with or without 18650 // modification, are permitted provided that the following conditions are 18651 // met: 18652 // 18653 // * Redistributions of source code must retain the above copyright 18654 // notice, this list of conditions and the following disclaimer. 18655 // * Redistributions in binary form must reproduce the above 18656 // copyright notice, this list of conditions and the following disclaimer 18657 // in the documentation and/or other materials provided with the 18658 // distribution. 18659 // * Neither the name of Google Inc. nor the name Chromium Embedded 18660 // Framework nor the names of its contributors may be used to endorse 18661 // or promote products derived from this software without specific prior 18662 // written permission. 18663 // 18664 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18665 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18666 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18667 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18668 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18669 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18670 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18671 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18672 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18673 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18674 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18675 // 18676 // --------------------------------------------------------------------------- 18677 // 18678 // This file was generated by the CEF translator tool and should not edited 18679 // by hand. See the translator.README.txt file in the tools directory for 18680 // more information. 18681 // 18682 // $hash=ed698ff6cb09ee2ed87614e2733c742db827ed4f$ 18683 // 18684 18685 extern (C): 18686 18687 /// 18688 // WaitableEvent is a thread synchronization tool that allows one thread to wait 18689 // for another thread to finish some work. This is equivalent to using a 18690 // Lock+ConditionVariable to protect a simple boolean value. However, using 18691 // WaitableEvent in conjunction with a Lock to wait for a more complex state 18692 // change (e.g., for an item to be added to a queue) is not recommended. In that 18693 // case consider using a ConditionVariable instead of a WaitableEvent. It is 18694 // safe to create and/or signal a WaitableEvent from any thread. Blocking on a 18695 // WaitableEvent by calling the *wait() functions is not allowed on the browser 18696 // process UI or IO threads. 18697 /// 18698 struct cef_waitable_event_t 18699 { 18700 /// 18701 // Base structure. 18702 /// 18703 cef_base_ref_counted_t base; 18704 18705 /// 18706 // Put the event in the un-signaled state. 18707 /// 18708 extern(System) void function (cef_waitable_event_t* self) nothrow reset; 18709 18710 /// 18711 // Put the event in the signaled state. This causes any thread blocked on Wait 18712 // to be woken up. 18713 /// 18714 extern(System) void function (cef_waitable_event_t* self) nothrow signal; 18715 18716 /// 18717 // Returns true (1) if the event is in the signaled state, else false (0). If 18718 // the event was created with |automatic_reset| set to true (1) then calling 18719 // this function will also cause a reset. 18720 /// 18721 extern(System) int function (cef_waitable_event_t* self) nothrow is_signaled; 18722 18723 /// 18724 // Wait indefinitely for the event to be signaled. This function will not 18725 // return until after the call to signal() has completed. This function cannot 18726 // be called on the browser process UI or IO threads. 18727 /// 18728 extern(System) void function (cef_waitable_event_t* self) nothrow wait; 18729 18730 /// 18731 // Wait up to |max_ms| milliseconds for the event to be signaled. Returns true 18732 // (1) if the event was signaled. A return value of false (0) does not 18733 // necessarily mean that |max_ms| was exceeded. This function will not return 18734 // until after the call to signal() has completed. This function cannot be 18735 // called on the browser process UI or IO threads. 18736 /// 18737 extern(System) int function (cef_waitable_event_t* self, int64 max_ms) nothrow timed_wait; 18738 } 18739 18740 18741 18742 /// 18743 // Create a new waitable event. If |automatic_reset| is true (1) then the event 18744 // state is automatically reset to un-signaled after a single waiting thread has 18745 // been released; otherwise, the state remains signaled until reset() is called 18746 // manually. If |initially_signaled| is true (1) then the event will start in 18747 // the signaled state. 18748 /// 18749 cef_waitable_event_t* cef_waitable_event_create ( 18750 int automatic_reset, 18751 int initially_signaled); 18752 18753 // CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_ 18754 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 18755 // 18756 // Redistribution and use in source and binary forms, with or without 18757 // modification, are permitted provided that the following conditions are 18758 // met: 18759 // 18760 // * Redistributions of source code must retain the above copyright 18761 // notice, this list of conditions and the following disclaimer. 18762 // * Redistributions in binary form must reproduce the above 18763 // copyright notice, this list of conditions and the following disclaimer 18764 // in the documentation and/or other materials provided with the 18765 // distribution. 18766 // * Neither the name of Google Inc. nor the name Chromium Embedded 18767 // Framework nor the names of its contributors may be used to endorse 18768 // or promote products derived from this software without specific prior 18769 // written permission. 18770 // 18771 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18772 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18773 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18774 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18775 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18776 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18777 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18778 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18779 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18780 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18781 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18782 // 18783 // --------------------------------------------------------------------------- 18784 // 18785 // This file was generated by the CEF translator tool and should not edited 18786 // by hand. See the translator.README.txt file in the tools directory for 18787 // more information. 18788 // 18789 // $hash=f51ad9ffc67d94b9cbfad154e7f224111c2a96fa$ 18790 // 18791 18792 extern (C): 18793 18794 18795 18796 /// 18797 // Information about a specific web plugin. 18798 /// 18799 struct cef_web_plugin_info_t 18800 { 18801 /// 18802 // Base structure. 18803 /// 18804 cef_base_ref_counted_t base; 18805 18806 /// 18807 // Returns the plugin name. 18808 /// 18809 // The resulting string must be freed by calling cef_string_userfree_free(). 18810 extern(System) cef_string_userfree_t function (cef_web_plugin_info_t* self) nothrow get_name; 18811 18812 /// 18813 // Returns the plugin file path (DLL/bundle/library). 18814 /// 18815 // The resulting string must be freed by calling cef_string_userfree_free(). 18816 extern(System) cef_string_userfree_t function (cef_web_plugin_info_t* self) nothrow get_path; 18817 18818 /// 18819 // Returns the version of the plugin (may be OS-specific). 18820 /// 18821 // The resulting string must be freed by calling cef_string_userfree_free(). 18822 extern(System) cef_string_userfree_t function (cef_web_plugin_info_t* self) nothrow get_version; 18823 18824 /// 18825 // Returns a description of the plugin from the version information. 18826 /// 18827 // The resulting string must be freed by calling cef_string_userfree_free(). 18828 extern(System) cef_string_userfree_t function ( 18829 cef_web_plugin_info_t* self) nothrow get_description; 18830 } 18831 18832 18833 18834 /// 18835 // Structure to implement for visiting web plugin information. The functions of 18836 // this structure will be called on the browser process UI thread. 18837 /// 18838 struct cef_web_plugin_info_visitor_t 18839 { 18840 /// 18841 // Base structure. 18842 /// 18843 cef_base_ref_counted_t base; 18844 18845 /// 18846 // Method that will be called once for each plugin. |count| is the 0-based 18847 // index for the current plugin. |total| is the total number of plugins. 18848 // Return false (0) to stop visiting plugins. This function may never be 18849 // called if no plugins are found. 18850 /// 18851 extern(System) int function ( 18852 cef_web_plugin_info_visitor_t* self, 18853 cef_web_plugin_info_t* info, 18854 int count, 18855 int total) nothrow visit; 18856 } 18857 18858 18859 18860 /// 18861 // Structure to implement for receiving unstable plugin information. The 18862 // functions of this structure will be called on the browser process IO thread. 18863 /// 18864 struct cef_web_plugin_unstable_callback_t 18865 { 18866 /// 18867 // Base structure. 18868 /// 18869 cef_base_ref_counted_t base; 18870 18871 /// 18872 // Method that will be called for the requested plugin. |unstable| will be 18873 // true (1) if the plugin has reached the crash count threshold of 3 times in 18874 // 120 seconds. 18875 /// 18876 extern(System) void function ( 18877 cef_web_plugin_unstable_callback_t* self, 18878 const(cef_string_t)* path, 18879 int unstable) nothrow is_unstable; 18880 } 18881 18882 18883 18884 /// 18885 // Visit web plugin information. Can be called on any thread in the browser 18886 // process. 18887 /// 18888 void cef_visit_web_plugin_info (cef_web_plugin_info_visitor_t* visitor); 18889 18890 /// 18891 // Cause the plugin list to refresh the next time it is accessed regardless of 18892 // whether it has already been loaded. Can be called on any thread in the 18893 // browser process. 18894 /// 18895 void cef_refresh_web_plugins (); 18896 18897 /// 18898 // Unregister an internal plugin. This may be undone the next time 18899 // cef_refresh_web_plugins() is called. Can be called on any thread in the 18900 // browser process. 18901 /// 18902 void cef_unregister_internal_web_plugin (const(cef_string_t)* path); 18903 18904 /// 18905 // Register a plugin crash. Can be called on any thread in the browser process 18906 // but will be executed on the IO thread. 18907 /// 18908 void cef_register_web_plugin_crash (const(cef_string_t)* path); 18909 18910 /// 18911 // Query if a plugin is unstable. Can be called on any thread in the browser 18912 // process. 18913 /// 18914 void cef_is_web_plugin_unstable ( 18915 const(cef_string_t)* path, 18916 cef_web_plugin_unstable_callback_t* callback); 18917 18918 // CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_ 18919 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 18920 // 18921 // Redistribution and use in source and binary forms, with or without 18922 // modification, are permitted provided that the following conditions are 18923 // met: 18924 // 18925 // * Redistributions of source code must retain the above copyright 18926 // notice, this list of conditions and the following disclaimer. 18927 // * Redistributions in binary form must reproduce the above 18928 // copyright notice, this list of conditions and the following disclaimer 18929 // in the documentation and/or other materials provided with the 18930 // distribution. 18931 // * Neither the name of Google Inc. nor the name Chromium Embedded 18932 // Framework nor the names of its contributors may be used to endorse 18933 // or promote products derived from this software without specific prior 18934 // written permission. 18935 // 18936 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18937 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18938 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18939 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18940 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18941 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18942 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18943 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18944 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18945 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18946 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18947 // 18948 // --------------------------------------------------------------------------- 18949 // 18950 // This file was generated by the CEF translator tool and should not edited 18951 // by hand. See the translator.README.txt file in the tools directory for 18952 // more information. 18953 // 18954 // $hash=e06ad8a1e173edd1e888ce6a8f8a9d95394e6a44$ 18955 // 18956 18957 extern (C): 18958 18959 /// 18960 // Structure representing the issuer or subject field of an X.509 certificate. 18961 /// 18962 struct cef_x509cert_principal_t 18963 { 18964 /// 18965 // Base structure. 18966 /// 18967 cef_base_ref_counted_t base; 18968 18969 /// 18970 // Returns a name that can be used to represent the issuer. It tries in this 18971 // order: Common Name (CN), Organization Name (O) and Organizational Unit Name 18972 // (OU) and returns the first non-NULL one found. 18973 /// 18974 // The resulting string must be freed by calling cef_string_userfree_free(). 18975 extern(System) cef_string_userfree_t function ( 18976 cef_x509cert_principal_t* self) nothrow get_display_name; 18977 18978 /// 18979 // Returns the common name. 18980 /// 18981 // The resulting string must be freed by calling cef_string_userfree_free(). 18982 extern(System) cef_string_userfree_t function ( 18983 cef_x509cert_principal_t* self) nothrow get_common_name; 18984 18985 /// 18986 // Returns the locality name. 18987 /// 18988 // The resulting string must be freed by calling cef_string_userfree_free(). 18989 extern(System) cef_string_userfree_t function ( 18990 cef_x509cert_principal_t* self) nothrow get_locality_name; 18991 18992 /// 18993 // Returns the state or province name. 18994 /// 18995 // The resulting string must be freed by calling cef_string_userfree_free(). 18996 extern(System) cef_string_userfree_t function ( 18997 cef_x509cert_principal_t* self) nothrow get_state_or_province_name; 18998 18999 /// 19000 // Returns the country name. 19001 /// 19002 // The resulting string must be freed by calling cef_string_userfree_free(). 19003 extern(System) cef_string_userfree_t function ( 19004 cef_x509cert_principal_t* self) nothrow get_country_name; 19005 19006 /// 19007 // Retrieve the list of street addresses. 19008 /// 19009 extern(System) void function ( 19010 cef_x509cert_principal_t* self, 19011 cef_string_list_t addresses) nothrow get_street_addresses; 19012 19013 /// 19014 // Retrieve the list of organization names. 19015 /// 19016 extern(System) void function ( 19017 cef_x509cert_principal_t* self, 19018 cef_string_list_t names) nothrow get_organization_names; 19019 19020 /// 19021 // Retrieve the list of organization unit names. 19022 /// 19023 extern(System) void function ( 19024 cef_x509cert_principal_t* self, 19025 cef_string_list_t names) nothrow get_organization_unit_names; 19026 19027 /// 19028 // Retrieve the list of domain components. 19029 /// 19030 extern(System) void function ( 19031 cef_x509cert_principal_t* self, 19032 cef_string_list_t components) nothrow get_domain_components; 19033 } 19034 19035 19036 19037 /// 19038 // Structure representing a X.509 certificate. 19039 /// 19040 struct cef_x509certificate_t 19041 { 19042 /// 19043 // Base structure. 19044 /// 19045 cef_base_ref_counted_t base; 19046 19047 /// 19048 // Returns the subject of the X.509 certificate. For HTTPS server certificates 19049 // this represents the web server. The common name of the subject should 19050 // match the host name of the web server. 19051 /// 19052 extern(System) cef_x509cert_principal_t* function ( 19053 cef_x509certificate_t* self) nothrow get_subject; 19054 19055 /// 19056 // Returns the issuer of the X.509 certificate. 19057 /// 19058 extern(System) cef_x509cert_principal_t* function ( 19059 cef_x509certificate_t* self) nothrow get_issuer; 19060 19061 /// 19062 // Returns the DER encoded serial number for the X.509 certificate. The value 19063 // possibly includes a leading 00 byte. 19064 /// 19065 extern(System) cef_binary_value_t* function ( 19066 cef_x509certificate_t* self) nothrow get_serial_number; 19067 19068 /// 19069 // Returns the date before which the X.509 certificate is invalid. 19070 // CefTime.GetTimeT() will return 0 if no date was specified. 19071 /// 19072 extern(System) cef_time_t function (cef_x509certificate_t* self) nothrow get_valid_start; 19073 19074 /// 19075 // Returns the date after which the X.509 certificate is invalid. 19076 // CefTime.GetTimeT() will return 0 if no date was specified. 19077 /// 19078 extern(System) cef_time_t function (cef_x509certificate_t* self) nothrow get_valid_expiry; 19079 19080 /// 19081 // Returns the DER encoded data for the X.509 certificate. 19082 /// 19083 extern(System) cef_binary_value_t* function ( 19084 cef_x509certificate_t* self) nothrow get_derencoded; 19085 19086 /// 19087 // Returns the PEM encoded data for the X.509 certificate. 19088 /// 19089 extern(System) cef_binary_value_t* function ( 19090 cef_x509certificate_t* self) nothrow get_pemencoded; 19091 19092 /// 19093 // Returns the number of certificates in the issuer chain. If 0, the 19094 // certificate is self-signed. 19095 /// 19096 extern(System) size_t function (cef_x509certificate_t* self) nothrow get_issuer_chain_size; 19097 19098 /// 19099 // Returns the DER encoded data for the certificate issuer chain. If we failed 19100 // to encode a certificate in the chain it is still present in the array but 19101 // is an NULL string. 19102 /// 19103 extern(System) void function ( 19104 cef_x509certificate_t* self, 19105 size_t* chainCount, 19106 cef_binary_value_t** chain) nothrow get_derencoded_issuer_chain; 19107 19108 /// 19109 // Returns the PEM encoded data for the certificate issuer chain. If we failed 19110 // to encode a certificate in the chain it is still present in the array but 19111 // is an NULL string. 19112 /// 19113 extern(System) void function ( 19114 cef_x509certificate_t* self, 19115 size_t* chainCount, 19116 cef_binary_value_t** chain) nothrow get_pemencoded_issuer_chain; 19117 } 19118 19119 19120 19121 // CEF_INCLUDE_CAPI_CEF_X509_CERTIFICATE_CAPI_H_ 19122 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 19123 // 19124 // Redistribution and use in source and binary forms, with or without 19125 // modification, are permitted provided that the following conditions are 19126 // met: 19127 // 19128 // * Redistributions of source code must retain the above copyright 19129 // notice, this list of conditions and the following disclaimer. 19130 // * Redistributions in binary form must reproduce the above 19131 // copyright notice, this list of conditions and the following disclaimer 19132 // in the documentation and/or other materials provided with the 19133 // distribution. 19134 // * Neither the name of Google Inc. nor the name Chromium Embedded 19135 // Framework nor the names of its contributors may be used to endorse 19136 // or promote products derived from this software without specific prior 19137 // written permission. 19138 // 19139 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19140 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19141 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19142 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19143 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19144 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19145 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19146 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19147 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19148 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19149 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19150 // 19151 // --------------------------------------------------------------------------- 19152 // 19153 // This file was generated by the CEF translator tool and should not edited 19154 // by hand. See the translator.README.txt file in the tools directory for 19155 // more information. 19156 // 19157 // $hash=76de25a0d0f0a2cc4657f46c26ec44b6d7d937e8$ 19158 // 19159 19160 extern (C): 19161 19162 /// 19163 // Structure that supports the reading of XML data via the libxml streaming API. 19164 // The functions of this structure should only be called on the thread that 19165 // creates the object. 19166 /// 19167 struct cef_xml_reader_t 19168 { 19169 /// 19170 // Base structure. 19171 /// 19172 cef_base_ref_counted_t base; 19173 19174 /// 19175 // Moves the cursor to the next node in the document. This function must be 19176 // called at least once to set the current cursor position. Returns true (1) 19177 // if the cursor position was set successfully. 19178 /// 19179 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_next_node; 19180 19181 /// 19182 // Close the document. This should be called directly to ensure that cleanup 19183 // occurs on the correct thread. 19184 /// 19185 extern(System) int function (cef_xml_reader_t* self) nothrow close; 19186 19187 /// 19188 // Returns true (1) if an error has been reported by the XML parser. 19189 /// 19190 extern(System) int function (cef_xml_reader_t* self) nothrow has_error; 19191 19192 /// 19193 // Returns the error string. 19194 /// 19195 // The resulting string must be freed by calling cef_string_userfree_free(). 19196 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_error; 19197 19198 // The below functions retrieve data for the node at the current cursor 19199 // position. 19200 19201 /// 19202 // Returns the node type. 19203 /// 19204 extern(System) cef_xml_node_type_t function (cef_xml_reader_t* self) nothrow get_type; 19205 19206 /// 19207 // Returns the node depth. Depth starts at 0 for the root node. 19208 /// 19209 extern(System) int function (cef_xml_reader_t* self) nothrow get_depth; 19210 19211 /// 19212 // Returns the local name. See http://www.w3.org/TR/REC-xml-names/#NT- 19213 // LocalPart for additional details. 19214 /// 19215 // The resulting string must be freed by calling cef_string_userfree_free(). 19216 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_local_name; 19217 19218 /// 19219 // Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for 19220 // additional details. 19221 /// 19222 // The resulting string must be freed by calling cef_string_userfree_free(). 19223 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_prefix; 19224 19225 /// 19226 // Returns the qualified name, equal to (Prefix:)LocalName. See 19227 // http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details. 19228 /// 19229 // The resulting string must be freed by calling cef_string_userfree_free(). 19230 extern(System) cef_string_userfree_t function ( 19231 cef_xml_reader_t* self) nothrow get_qualified_name; 19232 19233 /// 19234 // Returns the URI defining the namespace associated with the node. See 19235 // http://www.w3.org/TR/REC-xml-names/ for additional details. 19236 /// 19237 // The resulting string must be freed by calling cef_string_userfree_free(). 19238 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_namespace_uri; 19239 19240 /// 19241 // Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for 19242 // additional details. 19243 /// 19244 // The resulting string must be freed by calling cef_string_userfree_free(). 19245 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_base_uri; 19246 19247 /// 19248 // Returns the xml:lang scope within which the node resides. See 19249 // http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details. 19250 /// 19251 // The resulting string must be freed by calling cef_string_userfree_free(). 19252 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_xml_lang; 19253 19254 /// 19255 // Returns true (1) if the node represents an NULL element. <a/> is considered 19256 // NULL but <a></a> is not. 19257 /// 19258 extern(System) int function (cef_xml_reader_t* self) nothrow is_empty_element; 19259 19260 /// 19261 // Returns true (1) if the node has a text value. 19262 /// 19263 extern(System) int function (cef_xml_reader_t* self) nothrow has_value; 19264 19265 /// 19266 // Returns the text value. 19267 /// 19268 // The resulting string must be freed by calling cef_string_userfree_free(). 19269 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_value; 19270 19271 /// 19272 // Returns true (1) if the node has attributes. 19273 /// 19274 extern(System) int function (cef_xml_reader_t* self) nothrow has_attributes; 19275 19276 /// 19277 // Returns the number of attributes. 19278 /// 19279 extern(System) size_t function (cef_xml_reader_t* self) nothrow get_attribute_count; 19280 19281 /// 19282 // Returns the value of the attribute at the specified 0-based index. 19283 /// 19284 // The resulting string must be freed by calling cef_string_userfree_free(). 19285 extern(System) cef_string_userfree_t function ( 19286 cef_xml_reader_t* self, 19287 int index) nothrow get_attribute_byindex; 19288 19289 /// 19290 // Returns the value of the attribute with the specified qualified name. 19291 /// 19292 // The resulting string must be freed by calling cef_string_userfree_free(). 19293 extern(System) cef_string_userfree_t function ( 19294 cef_xml_reader_t* self, 19295 const(cef_string_t)* qualifiedName) nothrow get_attribute_byqname; 19296 19297 /// 19298 // Returns the value of the attribute with the specified local name and 19299 // namespace URI. 19300 /// 19301 // The resulting string must be freed by calling cef_string_userfree_free(). 19302 extern(System) cef_string_userfree_t function ( 19303 cef_xml_reader_t* self, 19304 const(cef_string_t)* localName, 19305 const(cef_string_t)* namespaceURI) nothrow get_attribute_bylname; 19306 19307 /// 19308 // Returns an XML representation of the current node's children. 19309 /// 19310 // The resulting string must be freed by calling cef_string_userfree_free(). 19311 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_inner_xml; 19312 19313 /// 19314 // Returns an XML representation of the current node including its children. 19315 /// 19316 // The resulting string must be freed by calling cef_string_userfree_free(). 19317 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_outer_xml; 19318 19319 /// 19320 // Returns the line number for the current node. 19321 /// 19322 extern(System) int function (cef_xml_reader_t* self) nothrow get_line_number; 19323 19324 // Attribute nodes are not traversed by default. The below functions can be 19325 // used to move the cursor to an attribute node. move_to_carrying_element() 19326 // can be called afterwards to return the cursor to the carrying element. The 19327 // depth of an attribute node will be 1 + the depth of the carrying element. 19328 19329 /// 19330 // Moves the cursor to the attribute at the specified 0-based index. Returns 19331 // true (1) if the cursor position was set successfully. 19332 /// 19333 extern(System) int function ( 19334 cef_xml_reader_t* self, 19335 int index) nothrow move_to_attribute_byindex; 19336 19337 /// 19338 // Moves the cursor to the attribute with the specified qualified name. 19339 // Returns true (1) if the cursor position was set successfully. 19340 /// 19341 extern(System) int function ( 19342 cef_xml_reader_t* self, 19343 const(cef_string_t)* qualifiedName) nothrow move_to_attribute_byqname; 19344 19345 /// 19346 // Moves the cursor to the attribute with the specified local name and 19347 // namespace URI. Returns true (1) if the cursor position was set 19348 // successfully. 19349 /// 19350 extern(System) int function ( 19351 cef_xml_reader_t* self, 19352 const(cef_string_t)* localName, 19353 const(cef_string_t)* namespaceURI) nothrow move_to_attribute_bylname; 19354 19355 /// 19356 // Moves the cursor to the first attribute in the current element. Returns 19357 // true (1) if the cursor position was set successfully. 19358 /// 19359 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_first_attribute; 19360 19361 /// 19362 // Moves the cursor to the next attribute in the current element. Returns true 19363 // (1) if the cursor position was set successfully. 19364 /// 19365 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_next_attribute; 19366 19367 /// 19368 // Moves the cursor back to the carrying element. Returns true (1) if the 19369 // cursor position was set successfully. 19370 /// 19371 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_carrying_element; 19372 } 19373 19374 19375 19376 /// 19377 // Create a new cef_xml_reader_t object. The returned object's functions can 19378 // only be called from the thread that created the object. 19379 /// 19380 cef_xml_reader_t* cef_xml_reader_create ( 19381 cef_stream_reader_t* stream, 19382 cef_xml_encoding_type_t encodingType, 19383 const(cef_string_t)* URI); 19384 19385 // CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_ 19386 // Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. 19387 // 19388 // Redistribution and use in source and binary forms, with or without 19389 // modification, are permitted provided that the following conditions are 19390 // met: 19391 // 19392 // * Redistributions of source code must retain the above copyright 19393 // notice, this list of conditions and the following disclaimer. 19394 // * Redistributions in binary form must reproduce the above 19395 // copyright notice, this list of conditions and the following disclaimer 19396 // in the documentation and/or other materials provided with the 19397 // distribution. 19398 // * Neither the name of Google Inc. nor the name Chromium Embedded 19399 // Framework nor the names of its contributors may be used to endorse 19400 // or promote products derived from this software without specific prior 19401 // written permission. 19402 // 19403 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19404 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19405 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19406 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19407 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19408 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19409 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19410 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19411 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19412 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19413 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19414 // 19415 // --------------------------------------------------------------------------- 19416 // 19417 // This file was generated by the CEF translator tool and should not edited 19418 // by hand. See the translator.README.txt file in the tools directory for 19419 // more information. 19420 // 19421 // $hash=d3d4ee91a69edd5f12785871b5c5a55e86c5c675$ 19422 // 19423 19424 extern (C): 19425 19426 /// 19427 // Structure that supports the reading of zip archives via the zlib unzip API. 19428 // The functions of this structure should only be called on the thread that 19429 // creates the object. 19430 /// 19431 struct cef_zip_reader_t 19432 { 19433 /// 19434 // Base structure. 19435 /// 19436 cef_base_ref_counted_t base; 19437 19438 /// 19439 // Moves the cursor to the first file in the archive. Returns true (1) if the 19440 // cursor position was set successfully. 19441 /// 19442 extern(System) int function (cef_zip_reader_t* self) nothrow move_to_first_file; 19443 19444 /// 19445 // Moves the cursor to the next file in the archive. Returns true (1) if the 19446 // cursor position was set successfully. 19447 /// 19448 extern(System) int function (cef_zip_reader_t* self) nothrow move_to_next_file; 19449 19450 /// 19451 // Moves the cursor to the specified file in the archive. If |caseSensitive| 19452 // is true (1) then the search will be case sensitive. Returns true (1) if the 19453 // cursor position was set successfully. 19454 /// 19455 extern(System) int function ( 19456 cef_zip_reader_t* self, 19457 const(cef_string_t)* fileName, 19458 int caseSensitive) nothrow move_to_file; 19459 19460 /// 19461 // Closes the archive. This should be called directly to ensure that cleanup 19462 // occurs on the correct thread. 19463 /// 19464 extern(System) int function (cef_zip_reader_t* self) nothrow close; 19465 19466 // The below functions act on the file at the current cursor position. 19467 19468 /// 19469 // Returns the name of the file. 19470 /// 19471 // The resulting string must be freed by calling cef_string_userfree_free(). 19472 extern(System) cef_string_userfree_t function (cef_zip_reader_t* self) nothrow get_file_name; 19473 19474 /// 19475 // Returns the uncompressed size of the file. 19476 /// 19477 extern(System) int64 function (cef_zip_reader_t* self) nothrow get_file_size; 19478 19479 /// 19480 // Returns the last modified timestamp for the file. 19481 /// 19482 extern(System) cef_time_t function (cef_zip_reader_t* self) nothrow get_file_last_modified; 19483 19484 /// 19485 // Opens the file for reading of uncompressed data. A read password may 19486 // optionally be specified. 19487 /// 19488 extern(System) int function ( 19489 cef_zip_reader_t* self, 19490 const(cef_string_t)* password) nothrow open_file; 19491 19492 /// 19493 // Closes the file. 19494 /// 19495 extern(System) int function (cef_zip_reader_t* self) nothrow close_file; 19496 19497 /// 19498 // Read uncompressed file contents into the specified buffer. Returns < 0 if 19499 // an error occurred, 0 if at the end of file, or the number of bytes read. 19500 /// 19501 extern(System) int function ( 19502 cef_zip_reader_t* self, 19503 void* buffer, 19504 size_t bufferSize) nothrow read_file; 19505 19506 /// 19507 // Returns the current offset in the uncompressed file contents. 19508 /// 19509 extern(System) int64 function (cef_zip_reader_t* self) nothrow tell; 19510 19511 /// 19512 // Returns true (1) if at end of the file contents. 19513 /// 19514 extern(System) int function (cef_zip_reader_t* self) nothrow eof; 19515 } 19516 19517 19518 19519 /// 19520 // Create a new cef_zip_reader_t object. The returned object's functions can 19521 // only be called from the thread that created the object. 19522 /// 19523 cef_zip_reader_t* cef_zip_reader_create (cef_stream_reader_t* stream); 19524 19525 // CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_ 19526 } 19527 19528 } 19529 19530 19531 version(Windows) { 19532 19533 /* ************************************ */ 19534 19535 // File generated by idl2d from 19536 // C:\Users\me\source\repos\webviewtest\packages\Microsoft.Web.WebView2.1.0.664.37\WebView2.idl 19537 //module webview2; 19538 19539 public import core.sys.windows.windows; 19540 public import core.sys.windows.unknwn; 19541 public import core.sys.windows.oaidl; 19542 public import core.sys.windows.objidl; 19543 19544 alias EventRegistrationToken = long; 19545 19546 // Copyright (C) Microsoft Corporation. All rights reserved. 19547 // Use of this source code is governed by a BSD-style license that can be 19548 // found in the LICENSE file. 19549 19550 /+ 19551 Copyright (C) Microsoft Corporation. All rights reserved. 19552 19553 Redistribution and use in source and binary forms, with or without 19554 modification, are permitted provided that the following conditions are 19555 met: 19556 19557 * Redistributions of source code must retain the above copyright 19558 notice, this list of conditions and the following disclaimer. 19559 * Redistributions in binary form must reproduce the above 19560 copyright notice, this list of conditions and the following disclaimer 19561 in the documentation and/or other materials provided with the 19562 distribution. 19563 * The name of Microsoft Corporation, or the names of its contributors 19564 may not be used to endorse or promote products derived from this 19565 software without specific prior written permission. 19566 19567 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19568 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19569 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19570 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19571 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19572 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19573 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19574 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19575 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19576 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19577 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19578 +/ 19579 19580 // # API Review 19581 // All APIs need API review. List API review documents here with the URI to the 19582 // doc and the change ID of the IDL when the document was created. 19583 // API documents: 19584 // * 916246ec [WebView2 API Specification](https://aka.ms/WebView2APISpecification) 19585 // 19586 // # Style 19587 // Follow the [Win32 API Design Guidelines](https://aka.ms/Win32APIDesignGuidelines) 19588 // while editing this file. For any style rules unspecified follow the Anaheim 19589 // style. Specifically, follow Anaheim indenting and line limit style rules in 19590 // this file. 19591 // 19592 // # Documentation 19593 // Please ensure that any new API includes complete documentation in its 19594 // JavaDoc comments in this file and sample usage in the Sample App. 19595 // Comments intended for public API documentation should start with 3 slashes. 19596 // The first sentence is the brief the brief description of the API and 19597 // shouldn't include the name of the API. Use markdown to style your public API 19598 // documentation. 19599 // 19600 // # WebView and JavaScript capitalization 19601 // camel case | webViewExample | javaScriptExample 19602 // Pascal case | WebViewExample | JavaScriptExample 19603 // Upper case | WEBVIEW_EXAMPLE | JAVASCRIPT_EXAMPLE 19604 // 19605 // That said, in API names use the term 'script' rather than 'JavaScript'. 19606 // Script is shorter and there is only one supported scripting language on the 19607 // web so the specificity of JavaScript is unnecessary. 19608 // 19609 // # URI (not URL) 19610 // We use Uri in parameter names and type names 19611 // throughout. URIs identify resources while URLs (a subset of URIs) also 19612 // locates resources. This difference is not generally well understood. Because 19613 // all URLs are URIs we can ignore the conversation of trying to explain the 19614 // difference between the two and still be technically accurate by always using 19615 // the term URI. Additionally, whether a URI is locatable depends on the context 19616 // since end developers can at runtime specify custom URI scheme resolvers. 19617 // 19618 // # Event pattern 19619 // Events have a method to add and to remove event handlers: 19620 // ``` 19621 // HRESULT add_{EventName}( 19622 // ICoreWebView2{EventName}EventHandler* eventHandler, 19623 // EventRegistrationToken* token); 19624 // 19625 // HRESULT remove_{EventName}(EventRegistrationToken token); 19626 // ``` 19627 // Add takes an event handler delegate interface with a single Invoke method. 19628 // ``` 19629 // ICoreWebView2{EventName}EventHandler::Invoke( 19630 // {SenderType}* sender, 19631 // ICoreWebView2{EventHandler}EventArgs* args); 19632 // ``` 19633 // The Invoke method has two parameters. The first is the sender, the object 19634 // which is firing the event. The second is the EventArgs type. It doesn't take 19635 // the event arg parameters directly so we can version interfaces correctly. 19636 // If the event has no properties on its event args type, then the Invoke method 19637 // should take IUnknown* as its event args parameter so it is possible to add 19638 // event args interfaces in the future without requiring a new event. For events 19639 // with no sender (a static event), the Invoke method has only the event args 19640 // parameter. 19641 // 19642 // # Deferrable event pattern 19643 // Generally, events should be deferrable when their event args have settable 19644 // properties. In order for the caller to use asynchronous methods to produce 19645 // the value for those settable properties we must allow the caller to defer 19646 // the WebView reading those properties until asynchronously later. A deferrable 19647 // event should have the following method on its event args interface: 19648 // `HRESULT GetDeferral([out, retval] ICoreWebView2Deferral** deferral);` 19649 // If called, the event is deferred and calling Complete on the 19650 // ICoreWebView2Deferral ends the deferral. 19651 // 19652 // # Asynchronous method pattern 19653 // Async methods take a final parameter that is the completed handler: 19654 // `{MethodName}(..., ICoreWebView2{MethodName}CompletedHandler* handler)` 19655 // The handler has a single Invoke method: 19656 // `ICoreWebView2{MethodName}CompletedHandler::Invoke( 19657 // HRESULT errorCode, {AsyncReturnType});` 19658 // 19659 // # Property pattern 19660 // For properties with getters in IDL you have 19661 // `[propget] HRESULT {PropertyName}([out, retval] {PropertyType}*)` 19662 // And for properties which also have setters in IDL you have 19663 // `[propput] HRESULT {PropertyName}([in] {PropertyType});` 19664 // 19665 // # Versioning 19666 // The loader DLL may be older or newer than the client DLL. We have to deal 19667 // with compatibility across several dimensions: 19668 // * There's the DLL export contract between the loader DLL and the client 19669 // DLL as well as the interfaces defined in this IDL that are built into both 19670 // the app code and the client DLL. 19671 // * There are two kinds of versioned changes we need to be able to make: 19672 // compatible changes and breaking changes. In both cases we need to make the 19673 // change in a safe manner. For compatible that means everything continues to 19674 // work unchanged despite the loader and client being different versions. For 19675 // breaking changes this means the host app is unable to create a 19676 // WebView using the different version browser and receives an associated 19677 // error message (doesn't crash). 19678 // * We also need to consider when the loader and host app is using a newer 19679 // version than the browser and when the loader and host app is using an 19680 // older version than the browser. 19681 // 19682 // ## Scenario 1: Older SDK in host app, Newer browser, Compatible change 19683 // In order to be compatible the newer client DLL must still support the older 19684 // client DLL exports. Similarly for the interfaces - they must all be exactly 19685 // the same with no modified IIDs, no reordered methods, no modified method 19686 // parameters and so on. The client DLL may have more DLL exports and more interfaces 19687 // but no changes to the older shipped DLL export or interfaces. 19688 // App code doesn't need to do anything special in this case. 19689 // 19690 // ## Scenario 2: Older SDK in host app, Newer browser, Breaking change 19691 // For breaking changes in the DLL export, the client DLL must change the DLL 19692 // export name. The old loader will attempt to use the old client DLL export. 19693 // When the loader finds the export missing it will fail. 19694 // For breaking changes in the interface, we must change the IID of the modified 19695 // interface. Additionally the loader DLL must validate that the returned object 19696 // supports the IID it expects and fail otherwise. 19697 // The app code must ensure that WebView objects succeed in their QueryInterface 19698 // calls. Basically the app code must have error handling for objects failing 19699 // QueryInterface and for the initial creation failing in order to handle 19700 // breaking changes gracefully. 19701 // 19702 // ## Scenario 3: Newer SDK in host app, Older browser, Compatible change 19703 // In order to be compatible, the newer loader DLL must fallback to calling the 19704 // older client DLL exports if the client DLL doesn't have the most recent DLL 19705 // exports. 19706 // For interface versioning the loader DLL shouldn't be impacted. 19707 // The app code must not assume an object supports all newer versioned 19708 // interfaces. Ideally it checks the success of QueryInterface for newer 19709 // interfaces and if not supported turns off associated app features or 19710 // otherwise fails gracefully. 19711 // 19712 // ## Scenario 4: Newer SDK in host app, Older browser, Breaking change 19713 // For breaking changes in the DLL export, a new export name will be used after 19714 // a breaking change and the loader DLL will just not check for pre-breaking 19715 // change exports from the client DLL. If the client DLL doesn't have the 19716 // correct exports, then the loader returns failure to the caller. 19717 // For breaking changes in the interface, the IIDs of broken interfaces will 19718 // have been modified. The loader will validate that the 19719 // object returned supports the correct base interface IID and return failure to 19720 // the caller otherwise. 19721 // The app code must allow for QueryInterface calls to fail if the object 19722 // doesn't support the newer IIDs. 19723 // 19724 // ## Actions 19725 // * DLL export compatible changes: Create a new DLL export with a new name. 19726 // Ideally implement the existing DLL export as a call into the new DLL 19727 // export to reduce upkeep burden. 19728 // * DLL export breaking changes: Give the modified DLL export a new name and 19729 // remove all older DLL exports. 19730 // * Interface compatible changes: Don't modify shipped interfaces. Add a new 19731 // interface with an incremented version number suffix 19732 // (ICoreWebView2_3) or feature group name suffix 19733 // (ICoreWebView2WithNavigationHistory). 19734 // * Interface breaking changes: After modifying a shipped interface, give it 19735 // a new IID. 19736 // * Loader: When finding the client DLL export it must check its known range 19737 // of compatible exports in order from newest to oldest and use the newest 19738 // one found. It must not attempt to use an older export from before a 19739 // breaking change. Before returning objects to the caller, the loader must 19740 // validate that the object actually implements the expected interface. 19741 // * App code: Check for error from the DLL export methods as they can fail if 19742 // the loader is used with an old browser from before a breaking change or 19743 // with a newer browser that is after a breaking change. 19744 // Check for errors when calling QueryInterface on a WebView object. The 19745 // QueryInterface call may fail with E_NOINTERFACE if the object is from an 19746 // older browser version that doesn't support the newer interface or if 19747 // using a newer browser version that had a breaking change on that 19748 // interface. 19749 19750 /+[uuid(26d34152-879f-4065-bea2-3daa2cfadfb8), version(1.0)]+/ 19751 /+ library WebView2 +/ 19752 19753 // Interface forward declarations 19754 /+ interface ICoreWebView2AcceleratorKeyPressedEventArgs; +/ 19755 /+ interface ICoreWebView2AcceleratorKeyPressedEventHandler; +/ 19756 /+ interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler; +/ 19757 /+ interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler; +/ 19758 /+ interface ICoreWebView2CapturePreviewCompletedHandler; +/ 19759 /+ interface ICoreWebView2; +/ 19760 /+ interface ICoreWebView2Controller; +/ 19761 /+ interface ICoreWebView2ContentLoadingEventArgs; +/ 19762 /+ interface ICoreWebView2ContentLoadingEventHandler; +/ 19763 /+ interface ICoreWebView2DocumentTitleChangedEventHandler; +/ 19764 /+ interface ICoreWebView2ContainsFullScreenElementChangedEventHandler; +/ 19765 /+ interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler; +/ 19766 /+ interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler; +/ 19767 /+ interface ICoreWebView2Deferral; +/ 19768 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs; +/ 19769 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler; +/ 19770 /+ interface ICoreWebView2DevToolsProtocolEventReceiver; +/ 19771 /+ interface ICoreWebView2Environment; +/ 19772 /+ interface ICoreWebView2EnvironmentOptions; +/ 19773 /+ interface ICoreWebView2ExecuteScriptCompletedHandler; +/ 19774 /+ interface ICoreWebView2FocusChangedEventHandler; +/ 19775 /+ interface ICoreWebView2HistoryChangedEventHandler; +/ 19776 /+ interface ICoreWebView2HttpHeadersCollectionIterator; +/ 19777 /+ interface ICoreWebView2HttpRequestHeaders; +/ 19778 /+ interface ICoreWebView2HttpResponseHeaders; +/ 19779 /+ interface ICoreWebView2MoveFocusRequestedEventArgs; +/ 19780 /+ interface ICoreWebView2MoveFocusRequestedEventHandler; +/ 19781 /+ interface ICoreWebView2NavigationCompletedEventArgs; +/ 19782 /+ interface ICoreWebView2NavigationCompletedEventHandler; +/ 19783 /+ interface ICoreWebView2NavigationStartingEventArgs; +/ 19784 /+ interface ICoreWebView2NavigationStartingEventHandler; +/ 19785 /+ interface ICoreWebView2NewBrowserVersionAvailableEventHandler; +/ 19786 /+ interface ICoreWebView2NewWindowRequestedEventArgs; +/ 19787 /+ interface ICoreWebView2NewWindowRequestedEventHandler; +/ 19788 /+ interface ICoreWebView2PermissionRequestedEventArgs; +/ 19789 /+ interface ICoreWebView2PermissionRequestedEventHandler; +/ 19790 /+ interface ICoreWebView2ProcessFailedEventArgs; +/ 19791 /+ interface ICoreWebView2ProcessFailedEventHandler; +/ 19792 /+ interface ICoreWebView2ScriptDialogOpeningEventArgs; +/ 19793 /+ interface ICoreWebView2ScriptDialogOpeningEventHandler; +/ 19794 /+ interface ICoreWebView2Settings; +/ 19795 /+ interface ICoreWebView2SourceChangedEventArgs; +/ 19796 /+ interface ICoreWebView2SourceChangedEventHandler; +/ 19797 /+ interface ICoreWebView2WebMessageReceivedEventArgs; +/ 19798 /+ interface ICoreWebView2WebMessageReceivedEventHandler; +/ 19799 /+ interface ICoreWebView2WebResourceRequest; +/ 19800 /+ interface ICoreWebView2WebResourceRequestedEventArgs; +/ 19801 /+ interface ICoreWebView2WebResourceRequestedEventHandler; +/ 19802 /+ interface ICoreWebView2WebResourceResponse; +/ 19803 /+ interface ICoreWebView2WindowCloseRequestedEventHandler; +/ 19804 /+ interface ICoreWebView2WindowFeatures; +/ 19805 /+ interface ICoreWebView2ZoomFactorChangedEventHandler; +/ 19806 19807 // Enums and structs 19808 /// Image format used by the ICoreWebView2::CapturePreview method. 19809 /+[v1_enum]+/ 19810 enum /+ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT+/ 19811 { 19812 /// PNG image format. 19813 COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG, 19814 /// JPEG image format. 19815 COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_JPEG, 19816 } 19817 alias int COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT; 19818 19819 /// Kind of JavaScript dialog used in the 19820 /// ICoreWebView2ScriptDialogOpeningEventHandler interface. 19821 /+[v1_enum]+/ 19822 enum /+ COREWEBVIEW2_SCRIPT_DIALOG_KIND+/ 19823 { 19824 /// A dialog invoked via the window.alert JavaScript function. 19825 COREWEBVIEW2_SCRIPT_DIALOG_KIND_ALERT, 19826 /// A dialog invoked via the window.confirm JavaScript function. 19827 COREWEBVIEW2_SCRIPT_DIALOG_KIND_CONFIRM, 19828 /// A dialog invoked via the window.prompt JavaScript function. 19829 COREWEBVIEW2_SCRIPT_DIALOG_KIND_PROMPT, 19830 /// A dialog invoked via the beforeunload JavaScript event. 19831 COREWEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD, 19832 } 19833 alias int COREWEBVIEW2_SCRIPT_DIALOG_KIND; 19834 19835 /// Kind of process failure used in the ICoreWebView2ProcessFailedEventHandler 19836 /// interface. 19837 /+[v1_enum]+/ 19838 enum /+ COREWEBVIEW2_PROCESS_FAILED_KIND+/ 19839 { 19840 /// Indicates the browser process terminated unexpectedly. 19841 /// The WebView automatically goes into the Closed state. 19842 /// The app has to recreate a new WebView to recover from this failure. 19843 COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED, 19844 19845 /// Indicates the render process terminated unexpectedly. 19846 /// A new render process will be created automatically and navigated to an 19847 /// error page. 19848 /// The app can use Reload to try to recover from this failure. 19849 COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED, 19850 19851 /// Indicates the render process becomes unresponsive. 19852 // Note that this does not seem to work right now. 19853 // Does not fire for simple long running script case, the only related test 19854 // SitePerProcessBrowserTest::NoCommitTimeoutForInvisibleWebContents is 19855 // disabled. 19856 COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE, 19857 } 19858 alias int COREWEBVIEW2_PROCESS_FAILED_KIND; 19859 19860 /// The type of a permission request. 19861 /+[v1_enum]+/ 19862 enum /+ COREWEBVIEW2_PERMISSION_KIND+/ 19863 { 19864 /// Unknown permission. 19865 COREWEBVIEW2_PERMISSION_KIND_UNKNOWN_PERMISSION, 19866 19867 /// Permission to capture audio. 19868 COREWEBVIEW2_PERMISSION_KIND_MICROPHONE, 19869 19870 /// Permission to capture video. 19871 COREWEBVIEW2_PERMISSION_KIND_CAMERA, 19872 19873 /// Permission to access geolocation. 19874 COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION, 19875 19876 /// Permission to send web notifications. 19877 /// This permission request is currently auto rejected and 19878 /// no event is fired for it. 19879 COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS, 19880 19881 /// Permission to access generic sensor. 19882 /// Generic Sensor covering ambient-light-sensor, accelerometer, gyroscope 19883 /// and magnetometer. 19884 COREWEBVIEW2_PERMISSION_KIND_OTHER_SENSORS, 19885 19886 /// Permission to read system clipboard without a user gesture. 19887 COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ, 19888 } 19889 alias int COREWEBVIEW2_PERMISSION_KIND; 19890 19891 /// Response to a permission request. 19892 /+[v1_enum]+/ 19893 enum /+ COREWEBVIEW2_PERMISSION_STATE+/ 19894 { 19895 /// Use default browser behavior, which normally prompt users for decision. 19896 COREWEBVIEW2_PERMISSION_STATE_DEFAULT, 19897 19898 /// Grant the permission request. 19899 COREWEBVIEW2_PERMISSION_STATE_ALLOW, 19900 19901 /// Deny the permission request. 19902 COREWEBVIEW2_PERMISSION_STATE_DENY, 19903 } 19904 alias int COREWEBVIEW2_PERMISSION_STATE; 19905 19906 /// Error status values for web navigations. 19907 /+[v1_enum]+/ 19908 enum /+ COREWEBVIEW2_WEB_ERROR_STATUS+/ 19909 { 19910 /// An unknown error occurred. 19911 COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN, 19912 19913 /// The SSL certificate common name does not match the web address. 19914 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT, 19915 19916 /// The SSL certificate has expired. 19917 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED, 19918 19919 /// The SSL client certificate contains errors. 19920 COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS, 19921 19922 /// The SSL certificate has been revoked. 19923 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED, 19924 19925 /// The SSL certificate is invalid -- this could mean the certificate did not 19926 /// match the public key pins for the host name, the certificate is signed by 19927 /// an untrusted authority or using a weak sign algorithm, the certificate 19928 /// claimed DNS names violate name constraints, the certificate contains a 19929 /// weak key, the certificate's validity period is too long, lack of 19930 /// revocation information or revocation mechanism, non-unique host name, lack 19931 /// of certificate transparency information, or the certificate is chained to 19932 /// a [legacy Symantec 19933 /// root](https://security.googleblog.com/2018/03/distrust-of-symantec-pki-immediate.html). 19934 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID, 19935 19936 /// The host is unreachable. 19937 COREWEBVIEW2_WEB_ERROR_STATUS_SERVER_UNREACHABLE, 19938 19939 /// The connection has timed out. 19940 COREWEBVIEW2_WEB_ERROR_STATUS_TIMEOUT, 19941 19942 /// The server returned an invalid or unrecognized response. 19943 COREWEBVIEW2_WEB_ERROR_STATUS_ERROR_HTTP_INVALID_SERVER_RESPONSE, 19944 19945 /// The connection was aborted. 19946 COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED, 19947 19948 /// The connection was reset. 19949 COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_RESET, 19950 19951 /// The Internet connection has been lost. 19952 COREWEBVIEW2_WEB_ERROR_STATUS_DISCONNECTED, 19953 19954 /// Cannot connect to destination. 19955 COREWEBVIEW2_WEB_ERROR_STATUS_CANNOT_CONNECT, 19956 19957 /// Could not resolve provided host name. 19958 COREWEBVIEW2_WEB_ERROR_STATUS_HOST_NAME_NOT_RESOLVED, 19959 19960 /// The operation was canceled. 19961 COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED, 19962 19963 /// The request redirect failed. 19964 COREWEBVIEW2_WEB_ERROR_STATUS_REDIRECT_FAILED, 19965 19966 /// An unexpected error occurred. 19967 COREWEBVIEW2_WEB_ERROR_STATUS_UNEXPECTED_ERROR, 19968 } 19969 alias int COREWEBVIEW2_WEB_ERROR_STATUS; 19970 19971 /// Enum for web resource request contexts. 19972 /+[v1_enum]+/ 19973 enum /+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT+/ 19974 { 19975 /// All resources 19976 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL, 19977 /// Document resources 19978 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT, 19979 /// CSS resources 19980 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET, 19981 /// Image resources 19982 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE, 19983 /// Other media resources such as videos 19984 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA, 19985 /// Font resources 19986 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT, 19987 /// Script resources 19988 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT, 19989 /// XML HTTP requests 19990 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST, 19991 /// Fetch API communication 19992 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH, 19993 /// TextTrack resources 19994 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK, 19995 /// EventSource API communication 19996 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE, 19997 /// WebSocket API communication 19998 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET, 19999 /// Web App Manifests 20000 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST, 20001 /// Signed HTTP Exchanges 20002 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE, 20003 /// Ping requests 20004 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING, 20005 /// CSP Violation Reports 20006 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT, 20007 /// Other resources 20008 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER 20009 } 20010 alias int COREWEBVIEW2_WEB_RESOURCE_CONTEXT; 20011 20012 /// Reason for moving focus. 20013 /+[v1_enum]+/ 20014 enum /+ COREWEBVIEW2_MOVE_FOCUS_REASON+/ 20015 { 20016 /// Code setting focus into WebView. 20017 COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC, 20018 20019 /// Moving focus due to Tab traversal forward. 20020 COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT, 20021 20022 /// Moving focus due to Tab traversal backward. 20023 COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS, 20024 } 20025 alias int COREWEBVIEW2_MOVE_FOCUS_REASON; 20026 20027 /// The type of key event that triggered an AcceleratorKeyPressed event. 20028 /+[v1_enum]+/ 20029 enum /+ COREWEBVIEW2_KEY_EVENT_KIND+/ 20030 { 20031 /// Correspond to window message WM_KEYDOWN. 20032 COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN, 20033 20034 /// Correspond to window message WM_KEYUP. 20035 COREWEBVIEW2_KEY_EVENT_KIND_KEY_UP, 20036 20037 /// Correspond to window message WM_SYSKEYDOWN. 20038 COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN, 20039 20040 /// Correspond to window message WM_SYSKEYUP. 20041 COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_UP, 20042 } 20043 alias int COREWEBVIEW2_KEY_EVENT_KIND; 20044 20045 /// A structure representing the information packed into the LPARAM given 20046 /// to a Win32 key event. See the documentation for WM_KEYDOWN for details 20047 /// at https://docs.microsoft.com/windows/win32/inputdev/wm-keydown 20048 struct COREWEBVIEW2_PHYSICAL_KEY_STATUS 20049 { 20050 /// The repeat count for the current message. 20051 UINT32 RepeatCount; 20052 /// The scan code. 20053 UINT32 ScanCode; 20054 /// Indicates whether the key is an extended key. 20055 BOOL IsExtendedKey; 20056 /// The context code. 20057 BOOL IsMenuKeyDown; 20058 /// The previous key state. 20059 BOOL WasKeyDown; 20060 /// The transition state. 20061 BOOL IsKeyReleased; 20062 } 20063 // End of enums and structs 20064 20065 /// WebView2 enables you to host web content using the 20066 /// latest Edge web browser technology. 20067 /// 20068 /// ## Navigation events 20069 /// The normal sequence of navigation events is NavigationStarting, 20070 /// SourceChanged, ContentLoading and then NavigationCompleted. 20071 /// The following events describe the state of WebView during each navigation: 20072 /// NavigationStarting: WebView is starting to navigate and the navigation will 20073 /// result in a network request. The host can disallow the request at this time. 20074 /// SourceChanged: The source of WebView is changed to a new URL. This may also 20075 /// be due to a navigation that doesn't cause a network request such as a fragment 20076 /// navigation. 20077 /// HistoryChanged: WebView's history has been updated as a result of 20078 /// the navigation. 20079 /// ContentLoading: WebView has started loading new content. 20080 /// NavigationCompleted: WebView has completed loading content on the new page. 20081 /// Developers can track navigations to each new document by the navigation ID. 20082 /// WebView's navigation ID changes every time there is a successful navigation 20083 /// to a new document. 20084 /// 20085 /// 20086 /// \dot 20087 /// digraph NavigationEvents { 20088 /// node [fontname=Roboto, shape=rectangle] 20089 /// edge [fontname=Roboto] 20090 /// 20091 /// NewDocument -> NavigationStarting; 20092 /// NavigationStarting -> SourceChanged -> ContentLoading [label="New Document"]; 20093 /// ContentLoading -> HistoryChanged; 20094 /// SameDocument -> SourceChanged; 20095 /// SourceChanged -> HistoryChanged [label="Same Document"]; 20096 /// HistoryChanged -> NavigationCompleted; 20097 /// NavigationStarting -> NavigationStarting [label="Redirect"]; 20098 /// NavigationStarting -> NavigationCompleted [label="Failure"]; 20099 /// } 20100 /// \enddot 20101 /// 20102 /// Note that this is for navigation events with the same NavigationId event 20103 /// arg. Navigations events with different NavigationId event args may overlap. 20104 /// For instance, if you start a navigation wait for its NavigationStarting 20105 /// event and then start another navigation you'll see the NavigationStarting 20106 /// for the first navigate followed by the NavigationStarting of the second 20107 /// navigate, followed by the NavigationCompleted for the first navigation and 20108 /// then all the rest of the appropriate navigation events for the second 20109 /// navigation. 20110 /// In error cases there may or may not be a ContentLoading event depending 20111 /// on whether the navigation is continued to an error page. 20112 /// In case of an HTTP redirect, there will be multiple NavigationStarting 20113 /// events in a row, with ones following the first will have their IsRedirect 20114 /// flag set, however navigation ID remains the same. Same document navigations 20115 /// do not result in NavigationStarting event and also do not increment the 20116 /// navigation ID. 20117 /// 20118 /// To monitor or cancel navigations inside subframes in the WebView, use 20119 /// FrameNavigationStarting. 20120 /// 20121 /// ## Process model 20122 /// WebView2 uses the same process model as the Edge web 20123 /// browser. There is one Edge browser process per specified user data directory 20124 /// in a user session that will serve any WebView2 calling 20125 /// process that specifies that user data directory. This means one Edge browser 20126 /// process may be serving multiple calling processes and one calling 20127 /// process may be using multiple Edge browser processes. 20128 /// 20129 /// \dot 20130 /// digraph ProcessModelNClientsNServers { 20131 /// node [fontname=Roboto, shape=rectangle]; 20132 /// edge [fontname=Roboto]; 20133 /// 20134 /// Host1 [label="Calling\nprocess 1"]; 20135 /// Host2 [label="Calling\nprocess 2"]; 20136 /// Browser1 [label="Edge processes\ngroup 1"]; 20137 /// Browser2 [label="Edge processes\ngroup 2"]; 20138 /// 20139 /// Host1 -> Browser1; 20140 /// Host1 -> Browser2; 20141 /// Host2 -> Browser2; 20142 /// } 20143 /// \enddot 20144 /// 20145 /// Associated with each browser process there will be some number of 20146 /// render processes. 20147 /// These are created as 20148 /// necessary to service potentially multiple frames in different WebViews. The 20149 /// number of render processes varies based on the site isolation browser 20150 /// feature and the number of distinct disconnected origins rendered in 20151 /// associated WebViews. 20152 /// 20153 /// \dot 20154 /// digraph ProcessModelClientServer { 20155 /// node [fontname=Roboto, shape=rectangle]; 20156 /// edge [fontname=Roboto]; 20157 /// graph [fontname=Roboto]; 20158 /// 20159 /// Host [label="Calling process"]; 20160 /// subgraph cluster_0 { 20161 /// labeljust = "l"; 20162 /// label = "Edge processes group"; 20163 /// Browser [label="Edge browser\nprocess"]; 20164 /// Render1 [label="Edge render\nprocess 1"]; 20165 /// Render2 [label="Edge render\nprocess 2"]; 20166 /// RenderN [label="Edge render\nprocess N"]; 20167 /// GPU [label="Edge GPU\nprocess"]; 20168 /// } 20169 /// 20170 /// Host -> Browser; 20171 /// Browser -> Render1; 20172 /// Browser -> Render2; 20173 /// Browser -> RenderN; 20174 /// Browser -> GPU; 20175 /// } 20176 /// \enddot 20177 /// 20178 /// You can react to crashes and hangs in these browser and render processes 20179 /// using the ProcessFailure event. 20180 /// 20181 /// You can safely shutdown associated browser and render processes using the 20182 /// Close method. 20183 /// 20184 /// ## Threading model 20185 /// The WebView2 must be created on a UI thread. Specifically a 20186 /// thread with a message pump. All callbacks will occur on that thread and 20187 /// calls into the WebView must be done on that thread. It is not safe to use 20188 /// the WebView from another thread. 20189 /// 20190 /// Callbacks including event handlers and completion handlers execute serially. 20191 /// That is, if you have an event handler running and begin a message loop no 20192 /// other event handlers or completion callbacks will begin executing 20193 /// reentrantly. 20194 /// 20195 /// ## Security 20196 /// Always check the Source property of the WebView before using ExecuteScript, 20197 /// PostWebMessageAsJson, PostWebMessageAsString, or any other method to send 20198 /// information into the WebView. The WebView may have navigated to another page 20199 /// via the end user interacting with the page or script in the page causing 20200 /// navigation. Similarly, be very careful with 20201 /// AddScriptToExecuteOnDocumentCreated. All future navigations will run this 20202 /// script and if it provides access to information intended only for a certain 20203 /// origin, any HTML document may have access. 20204 /// 20205 /// When examining the result of an ExecuteScript method call, a 20206 /// WebMessageReceived event, always check the Source of the sender, or any 20207 /// other mechanism of receiving information from an HTML document in a WebView 20208 /// validate the URI of the HTML document is what you expect. 20209 /// 20210 /// When constructing a message to send into a WebView, prefer using 20211 /// PostWebMessageAsJson and construct the JSON string parameter using a JSON 20212 /// library. This will prevent accidentally encoding information into a JSON string 20213 /// or script, and ensure no attacker controlled input can 20214 /// modify the rest of the JSON message or run arbitrary script. 20215 /// 20216 /// ## String types 20217 /// String out parameters are LPWSTR null terminated strings. The callee 20218 /// allocates the string using CoTaskMemAlloc. Ownership is transferred to the 20219 /// caller and it is up to the caller to free the memory using CoTaskMemFree. 20220 /// 20221 /// String in parameters are LPCWSTR null terminated strings. The caller ensures 20222 /// the string is valid for the duration of the synchronous function call. 20223 /// If the callee needs to retain that value to some point after the function 20224 /// call completes, the callee must allocate its own copy of the string value. 20225 /// 20226 /// ## URI and JSON parsing 20227 /// Various methods provide or accept URIs and JSON as strings. Please use your 20228 /// own preferred library for parsing and generating these strings. 20229 /// 20230 /// If WinRT is available for your app you can use `Windows.Data.Json.JsonObject` 20231 /// and `IJsonObjectStatics` to parse or produce JSON strings or `Windows.Foundation.Uri` 20232 /// and `IUriRuntimeClassFactory` to parse and produce URIs. Both of these work 20233 /// in Win32 apps. 20234 /// 20235 /// If you use IUri and CreateUri to parse URIs you may want to use the 20236 /// following URI creation flags to have CreateUri behavior more closely match 20237 /// the URI parsing in the WebView: 20238 /// `Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME | Uri_CREATE_NO_DECODE_EXTRA_INFO` 20239 /// 20240 /// ## Debugging 20241 /// Open DevTools with the normal shortcuts: `F12` or `Ctrl+Shift+I`. 20242 /// You can use the `--auto-open-devtools-for-tabs` command argument switch to 20243 /// have the DevTools window open immediately when first creating a WebView. See 20244 /// CreateCoreWebView2Controller documentation for how to provide additional command 20245 /// line arguments to the browser process. 20246 /// Check out the LoaderOverride registry key in the CreateCoreWebView2Controller 20247 /// documentation. 20248 /// 20249 /// ## Versioning 20250 /// After you've used a particular version of the SDK to build your app, your 20251 /// app may end up running with an older or newer version of installed browser 20252 /// binaries. Until version 1.0.0.0 of WebView2 there may be breaking changes 20253 /// during updates that will prevent your SDK from working with different 20254 /// versions of installed browser binaries. After version 1.0.0.0 different 20255 /// versions of the SDK can work with different versions of the installed 20256 /// browser by following these best practices: 20257 /// 20258 /// To account for breaking changes to the API be sure to check for failure when 20259 /// calling the DLL export CreateCoreWebView2Environment and when 20260 /// calling QueryInterface on any CoreWebView2 object. A return value of 20261 /// E_NOINTERFACE can indicate the SDK is not compatible with the Edge 20262 /// browser binaries. 20263 /// 20264 /// Checking for failure from QueryInterface will also account for cases where 20265 /// the SDK is newer than the version of the Edge browser and your app attempts 20266 /// to use an interface of which the Edge browser is unaware. 20267 /// 20268 /// When an interface is unavailable, you can consider disabling the associated 20269 /// feature if possible, or otherwise informing the end user they need to update 20270 /// their browser. 20271 const GUID IID_ICoreWebView2 = ICoreWebView2.iid; 20272 20273 interface ICoreWebView2 : IUnknown 20274 { 20275 static const GUID iid = { 0x76eceacb,0x0462,0x4d94,[ 0xac,0x83,0x42,0x3a,0x67,0x93,0x77,0x5e ] }; 20276 extern(Windows): 20277 /// The ICoreWebView2Settings object contains various modifiable settings for 20278 /// the running WebView. 20279 /+[ propget]+/ 20280 HRESULT get_Settings(/+[out, retval]+/ ICoreWebView2Settings * settings); 20281 20282 /// The URI of the current top level document. This value potentially 20283 /// changes as a part of the SourceChanged event firing for some cases 20284 /// such as navigating to a different site or fragment navigations. It will 20285 /// remain the same for other types of navigations such as page reloads or 20286 /// history.pushState with the same URL as the current page. 20287 /// 20288 /// \snippet ControlComponent.cpp SourceChanged 20289 /+[ propget]+/ 20290 HRESULT get_Source(/+[out, retval]+/ LPWSTR* uri); 20291 20292 /// Cause a navigation of the top level document to the specified URI. See 20293 /// the navigation events for more information. Note that this starts a 20294 /// navigation and the corresponding NavigationStarting event will fire 20295 /// sometime after this Navigate call completes. 20296 /// 20297 /// \snippet ControlComponent.cpp Navigate 20298 HRESULT Navigate(in LPCWSTR uri); 20299 20300 /// Initiates a navigation to htmlContent as source HTML of a new 20301 /// document. The htmlContent parameter may not be larger than 2 MB 20302 /// in total size. The origin of the new page will be about:blank. 20303 /// 20304 /// \snippet SettingsComponent.cpp NavigateToString 20305 HRESULT NavigateToString(in LPCWSTR htmlContent); 20306 20307 /// Add an event handler for the NavigationStarting event. 20308 /// NavigationStarting fires when the WebView main frame is 20309 /// requesting permission to navigate to a different URI. This will fire for 20310 /// redirects as well. 20311 /// 20312 /// Corresponding navigations can be blocked until the event handler returns. 20313 /// 20314 /// \snippet SettingsComponent.cpp NavigationStarting 20315 HRESULT add_NavigationStarting( 20316 /+[in]+/ ICoreWebView2NavigationStartingEventHandler eventHandler, 20317 /+[out]+/ EventRegistrationToken* token); 20318 /// Remove an event handler previously added with add_NavigationStarting. 20319 HRESULT remove_NavigationStarting( 20320 in EventRegistrationToken token); 20321 20322 /// Add an event handler for the ContentLoading event. 20323 /// ContentLoading fires before any content is loaded, including scripts added 20324 /// with AddScriptToExecuteOnDocumentCreated. 20325 /// ContentLoading will not fire if a same page navigation occurs 20326 /// (such as through fragment navigations or history.pushState navigations). 20327 /// This follows the NavigationStarting and SourceChanged events and 20328 /// precedes the HistoryChanged and NavigationCompleted events. 20329 HRESULT add_ContentLoading( 20330 /+[in]+/ ICoreWebView2ContentLoadingEventHandler eventHandler, 20331 /+[out]+/ EventRegistrationToken* token); 20332 /// Remove an event handler previously added with add_ContentLoading. 20333 HRESULT remove_ContentLoading( 20334 in EventRegistrationToken token); 20335 20336 /// Add an event handler for the SourceChanged event. 20337 /// SourceChanged fires when the Source property changes. 20338 /// SourceChanged fires for navigating to a different site or fragment 20339 /// navigations. 20340 /// It will not fire for other types of navigations such as page reloads or 20341 /// history.pushState with the same URL as the current page. 20342 /// SourceChanged fires before ContentLoading for navigation to a new document. 20343 /// 20344 /// \snippet ControlComponent.cpp SourceChanged 20345 HRESULT add_SourceChanged( 20346 /+[in]+/ ICoreWebView2SourceChangedEventHandler eventHandler, 20347 /+[out]+/ EventRegistrationToken* token); 20348 /// Remove an event handler previously added with add_SourceChanged. 20349 HRESULT remove_SourceChanged( 20350 in EventRegistrationToken token); 20351 20352 /// Add an event handler for the HistoryChanged event. 20353 /// HistoryChanged listens to the change of navigation history for the top 20354 /// level document. Use HistoryChanged to check if CanGoBack/CanGoForward 20355 /// value has changed. HistoryChanged also fires for using GoBack/GoForward. 20356 /// HistoryChanged fires after SourceChanged and ContentLoading. 20357 /// 20358 /// \snippet ControlComponent.cpp HistoryChanged 20359 HRESULT add_HistoryChanged( 20360 /+[in]+/ ICoreWebView2HistoryChangedEventHandler eventHandler, 20361 /+[out]+/ EventRegistrationToken* token); 20362 /// Remove an event handler previously added with add_HistoryChanged. 20363 HRESULT remove_HistoryChanged( 20364 in EventRegistrationToken token); 20365 20366 /// Add an event handler for the NavigationCompleted event. 20367 /// NavigationCompleted fires when the WebView has completely loaded 20368 /// (body.onload has fired) or loading stopped with error. 20369 /// 20370 /// \snippet ControlComponent.cpp NavigationCompleted 20371 HRESULT add_NavigationCompleted( 20372 /+[in]+/ ICoreWebView2NavigationCompletedEventHandler eventHandler, 20373 /+[out]+/ EventRegistrationToken* token); 20374 /// Remove an event handler previously added with add_NavigationCompleted. 20375 HRESULT remove_NavigationCompleted( 20376 in EventRegistrationToken token); 20377 20378 /// Add an event handler for the FrameNavigationStarting event. 20379 /// FrameNavigationStarting fires when a child frame in the WebView 20380 /// requests permission to navigate to a different URI. This will fire for 20381 /// redirects as well. 20382 /// 20383 /// Corresponding navigations can be blocked until the event handler returns. 20384 /// 20385 /// \snippet SettingsComponent.cpp FrameNavigationStarting 20386 HRESULT add_FrameNavigationStarting( 20387 /+[in]+/ ICoreWebView2NavigationStartingEventHandler eventHandler, 20388 /+[out]+/ EventRegistrationToken* token); 20389 /// Remove an event handler previously added with add_FrameNavigationStarting. 20390 HRESULT remove_FrameNavigationStarting( 20391 in EventRegistrationToken token); 20392 20393 /// Add an event handler for the FrameNavigationCompleted event. 20394 /// FrameNavigationCompleted fires when a child frame has completely 20395 /// loaded (body.onload has fired) or loading stopped with error. 20396 /// 20397 /// \snippet ControlComponent.cpp FrameNavigationCompleted 20398 HRESULT add_FrameNavigationCompleted( 20399 /+[in]+/ ICoreWebView2NavigationCompletedEventHandler eventHandler, 20400 /+[out]+/ EventRegistrationToken* token); 20401 /// Remove an event handler previously added with add_FrameNavigationCompleted. 20402 HRESULT remove_FrameNavigationCompleted( 20403 in EventRegistrationToken token); 20404 20405 /// Add an event handler for the ScriptDialogOpening event. 20406 /// ScriptDialogOpening fires when a JavaScript dialog (alert, confirm, 20407 /// prompt, or beforeunload) will show for the webview. This event only fires 20408 /// if the ICoreWebView2Settings::AreDefaultScriptDialogsEnabled property is 20409 /// set to false. The ScriptDialogOpening event can be used to suppress 20410 /// dialogs or replace default dialogs with custom dialogs. 20411 /// 20412 /// If a deferral is not taken on the event args, the subsequent scripts can be 20413 /// blocked until the event handler returns. If a deferral is taken, then the 20414 /// scripts are blocked until the deferral is completed. 20415 /// 20416 /// \snippet SettingsComponent.cpp ScriptDialogOpening 20417 HRESULT add_ScriptDialogOpening( 20418 /+[in]+/ ICoreWebView2ScriptDialogOpeningEventHandler eventHandler, 20419 /+[out]+/ EventRegistrationToken* token); 20420 /// Remove an event handler previously added with add_ScriptDialogOpening. 20421 HRESULT remove_ScriptDialogOpening( 20422 in EventRegistrationToken token); 20423 20424 /// Add an event handler for the PermissionRequested event. 20425 /// PermissionRequested fires when content in a WebView requests permission to 20426 /// access some privileged resources. 20427 /// 20428 /// If a deferral is not taken on the event args, the subsequent scripts can 20429 /// be blocked until the event handler returns. If a deferral is taken, then 20430 /// the scripts are blocked until the deferral is completed. 20431 /// 20432 /// \snippet SettingsComponent.cpp PermissionRequested 20433 HRESULT add_PermissionRequested( 20434 /+[in]+/ ICoreWebView2PermissionRequestedEventHandler eventHandler, 20435 /+[out]+/ EventRegistrationToken* token); 20436 /// Remove an event handler previously added with add_PermissionRequested. 20437 HRESULT remove_PermissionRequested( 20438 in EventRegistrationToken token); 20439 20440 /// Add an event handler for the ProcessFailed event. 20441 /// ProcessFailed fires when a WebView process is terminated unexpectedly or 20442 /// becomes unresponsive. 20443 /// 20444 /// \snippet ProcessComponent.cpp ProcessFailed 20445 HRESULT add_ProcessFailed( 20446 /+[in]+/ ICoreWebView2ProcessFailedEventHandler eventHandler, 20447 /+[out]+/ EventRegistrationToken* token); 20448 /// Remove an event handler previously added with add_ProcessFailed. 20449 HRESULT remove_ProcessFailed( 20450 in EventRegistrationToken token); 20451 20452 /// Add the provided JavaScript to a list of scripts that should be executed 20453 /// after the global object has been created, but before the HTML document has 20454 /// been parsed and before any other script included by the HTML document is 20455 /// executed. This method injects a script that runs on all top-level document 20456 /// and child frame page navigations. 20457 /// This method runs asynchronously, and you must wait for the completion 20458 /// handler to finish before the injected script is ready to run. When this 20459 /// method completes, the handler's `Invoke` method is called with the `id` of 20460 /// the injected script. `id` is a string. To remove the injected script, use 20461 /// `RemoveScriptToExecuteOnDocumentCreated`. 20462 /// 20463 /// Note that if an HTML document has sandboxing of some kind via 20464 /// [sandbox](https://developer.mozilla.org/docs/Web/HTML/Element/iframe#attr-sandbox) 20465 /// properties or the [Content-Security-Policy HTTP 20466 /// header](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy) 20467 /// this will affect the script run here. So, for example, if the 20468 /// 'allow-modals' keyword is not set then calls to the `alert` function will 20469 /// be ignored. 20470 /// 20471 /// \snippet ScriptComponent.cpp AddScriptToExecuteOnDocumentCreated 20472 HRESULT AddScriptToExecuteOnDocumentCreated( 20473 in LPCWSTR javaScript, 20474 /+[in]+/ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler handler); 20475 20476 /// Remove the corresponding JavaScript added using `AddScriptToExecuteOnDocumentCreated` 20477 /// with the specified script id. 20478 HRESULT RemoveScriptToExecuteOnDocumentCreated(in LPCWSTR id); 20479 20480 /// Execute JavaScript code from the javascript parameter in the 20481 /// current top level document rendered in the WebView. This will execute 20482 /// asynchronously and when complete, if a handler is provided in the 20483 /// ExecuteScriptCompletedHandler parameter, its Invoke method will be 20484 /// called with the result of evaluating the provided JavaScript. The result 20485 /// value is a JSON encoded string. 20486 /// If the result is undefined, contains a reference cycle, or otherwise 20487 /// cannot be encoded into JSON, the JSON null value will be returned as the 20488 /// string 'null'. Note that a function that has no explicit return value 20489 /// returns undefined. 20490 /// If the executed script throws an unhandled exception, then the result is 20491 /// also 'null'. 20492 /// This method is applied asynchronously. If the method is called after 20493 /// NavigationStarting event during a navigation, the script will be executed 20494 /// in the new document when loading it, around the time ContentLoading is 20495 /// fired. ExecuteScript will work even if 20496 /// ICoreWebView2Settings::IsScriptEnabled is set to FALSE. 20497 /// 20498 /// \snippet ScriptComponent.cpp ExecuteScript 20499 HRESULT ExecuteScript( 20500 in LPCWSTR javaScript, 20501 /+[in]+/ ICoreWebView2ExecuteScriptCompletedHandler handler); 20502 20503 /// Capture an image of what WebView is displaying. Specify the 20504 /// format of the image with the imageFormat parameter. 20505 /// The resulting image binary data is written to the provided imageStream 20506 /// parameter. When CapturePreview finishes writing to the stream, the Invoke 20507 /// method on the provided handler parameter is called. 20508 /// 20509 /// \snippet FileComponent.cpp CapturePreview 20510 HRESULT CapturePreview( 20511 in COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT imageFormat, 20512 in IStream* imageStream, 20513 /+[in]+/ ICoreWebView2CapturePreviewCompletedHandler handler); 20514 20515 /// Reload the current page. This is similar to navigating to the URI of 20516 /// current top level document including all navigation events firing and 20517 /// respecting any entries in the HTTP cache. But, the back/forward history 20518 /// will not be modified. 20519 HRESULT Reload(); 20520 20521 /// Post the specified webMessage to the top level document in this WebView. 20522 /// The top level document's window.chrome.webview's message event fires. 20523 /// JavaScript in that document may subscribe and unsubscribe to the event 20524 /// via the following: 20525 /// 20526 /// ``` 20527 /// window.chrome.webview.addEventListener('message', handler) 20528 /// window.chrome.webview.removeEventListener('message', handler) 20529 /// ``` 20530 /// 20531 /// The event args is an instance of `MessageEvent`. 20532 /// The ICoreWebView2Settings::IsWebMessageEnabled setting must be true or 20533 /// this method will fail with E_INVALIDARG. 20534 /// The event arg's data property is the webMessage string parameter parsed 20535 /// as a JSON string into a JavaScript object. 20536 /// The event arg's source property is a reference to the 20537 /// `window.chrome.webview` object. 20538 /// See add_WebMessageReceived for information on sending messages from the 20539 /// HTML document in the WebView to the host. 20540 /// This message is sent asynchronously. If a navigation occurs before the 20541 /// message is posted to the page, then the message will not be sent. 20542 /// 20543 /// \snippet ScenarioWebMessage.cpp WebMessageReceived 20544 HRESULT PostWebMessageAsJson(in LPCWSTR webMessageAsJson); 20545 20546 /// This is a helper for posting a message that is a simple string 20547 /// rather than a JSON string representation of a JavaScript object. This 20548 /// behaves in exactly the same manner as PostWebMessageAsJson but the 20549 /// `window.chrome.webview` message event arg's data property will be a string 20550 /// with the same value as webMessageAsString. Use this instead of 20551 /// PostWebMessageAsJson if you want to communicate via simple strings rather 20552 /// than JSON objects. 20553 HRESULT PostWebMessageAsString(in LPCWSTR webMessageAsString); 20554 20555 /// Add an event handler for the WebMessageReceived event. 20556 /// WebMessageReceived fires when the 20557 /// ICoreWebView2Settings::IsWebMessageEnabled setting is set and the top 20558 /// level document of the WebView calls `window.chrome.webview.postMessage`. 20559 /// The postMessage function is `void postMessage(object)` where 20560 /// object is any object supported by JSON conversion. 20561 /// 20562 /// \snippet ScenarioWebMessage.html chromeWebView 20563 /// 20564 /// When postMessage is called, the handler's Invoke method will be called 20565 /// with the postMessage's object parameter converted to a JSON string. 20566 /// 20567 /// \snippet ScenarioWebMessage.cpp WebMessageReceived 20568 HRESULT add_WebMessageReceived( 20569 /+[in]+/ ICoreWebView2WebMessageReceivedEventHandler handler, 20570 /+[out]+/ EventRegistrationToken* token); 20571 /// Remove an event handler previously added with add_WebMessageReceived. 20572 HRESULT remove_WebMessageReceived( 20573 in EventRegistrationToken token); 20574 20575 /// Call an asynchronous DevToolsProtocol method. See the 20576 /// [DevTools Protocol Viewer](https://aka.ms/DevToolsProtocolDocs) 20577 /// for a list and description of available methods. 20578 /// The methodName parameter is the full name of the method in the format 20579 /// `{domain}.{method}`. 20580 /// The parametersAsJson parameter is a JSON formatted string containing 20581 /// the parameters for the corresponding method. 20582 /// The handler's Invoke method will be called when the method asynchronously 20583 /// completes. Invoke will be called with the method's return object as a 20584 /// JSON string. 20585 /// 20586 /// \snippet ScriptComponent.cpp CallDevToolsProtocolMethod 20587 HRESULT CallDevToolsProtocolMethod( 20588 in LPCWSTR methodName, 20589 in LPCWSTR parametersAsJson, 20590 /+[in]+/ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler handler); 20591 20592 /// The process id of the browser process that hosts the WebView. 20593 /+[ propget]+/ 20594 HRESULT get_BrowserProcessId(/+[out, retval]+/ UINT32* value); 20595 20596 /// Returns true if the WebView can navigate to a previous page in the 20597 /// navigation history. 20598 /// The HistoryChanged event will fire if CanGoBack changes value. 20599 /+[ propget]+/ 20600 HRESULT get_CanGoBack(/+[out, retval]+/ BOOL* canGoBack); 20601 /// Returns true if the WebView can navigate to a next page in the navigation 20602 /// history. 20603 /// The HistoryChanged event will fire if CanGoForward changes value. 20604 /+[ propget]+/ 20605 HRESULT get_CanGoForward(/+[out, retval]+/ BOOL* canGoForward); 20606 /// Navigates the WebView to the previous page in the navigation history. 20607 HRESULT GoBack(); 20608 /// Navigates the WebView to the next page in the navigation history. 20609 HRESULT GoForward(); 20610 20611 /// Get a DevTools Protocol event receiver that allows you to subscribe to 20612 /// a DevTools Protocol event. 20613 /// The eventName parameter is the full name of the event in the format 20614 /// `{domain}.{event}`. 20615 /// See the [DevTools Protocol Viewer](https://aka.ms/DevToolsProtocolDocs) 20616 /// for a list of DevTools Protocol events description, and event args. 20617 /// 20618 /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceived 20619 HRESULT GetDevToolsProtocolEventReceiver( 20620 in LPCWSTR eventName, 20621 /+[out, retval]+/ ICoreWebView2DevToolsProtocolEventReceiver * receiver); 20622 20623 /// Stop all navigations and pending resource fetches. Does not stop 20624 /// scripts. 20625 HRESULT Stop(); 20626 20627 /// Add an event handler for the NewWindowRequested event. 20628 /// NewWindowRequested fires when content inside the WebView requests to open 20629 /// a new window, such as through window.open. The app can pass a target 20630 /// WebView that will be considered the opened window. 20631 /// 20632 /// Scripts resulted in the new window requested can be blocked until the 20633 /// event handler returns if a deferral is not taken on the event args. If a 20634 /// deferral is taken, then scripts are blocked until the deferral is 20635 /// completed. 20636 /// 20637 /// \snippet AppWindow.cpp NewWindowRequested 20638 HRESULT add_NewWindowRequested( 20639 /+[in]+/ ICoreWebView2NewWindowRequestedEventHandler eventHandler, 20640 /+[out]+/ EventRegistrationToken* token); 20641 /// Remove an event handler previously added with add_NewWindowRequested. 20642 HRESULT remove_NewWindowRequested( 20643 in EventRegistrationToken token); 20644 20645 /// Add an event handler for the DocumentTitleChanged event. 20646 /// DocumentTitleChanged fires when the DocumentTitle property of the WebView 20647 /// changes and may fire before or after the NavigationCompleted event. 20648 /// 20649 /// \snippet FileComponent.cpp DocumentTitleChanged 20650 HRESULT add_DocumentTitleChanged( 20651 /+[in]+/ ICoreWebView2DocumentTitleChangedEventHandler eventHandler, 20652 /+[out]+/ EventRegistrationToken* token); 20653 /// Remove an event handler previously added with add_DocumentTitleChanged. 20654 HRESULT remove_DocumentTitleChanged( 20655 in EventRegistrationToken token); 20656 20657 /// The title for the current top level document. 20658 /// If the document has no explicit title or is otherwise empty, 20659 /// a default that may or may not match the URI of the document will be used. 20660 /+[ propget]+/ 20661 HRESULT get_DocumentTitle(/+[out, retval]+/ LPWSTR* title); 20662 20663 /// Add the provided host object to script running in the WebView with the 20664 /// specified name. 20665 /// Host objects are exposed as host object proxies via 20666 /// `window.chrome.webview.hostObjects.<name>`. 20667 /// Host object proxies are promises and will resolve to an object 20668 /// representing the host object. 20669 /// The promise is rejected if the app has not added an object with the name. 20670 /// When JavaScript code access a property or method of the object, a promise 20671 /// is return, which will resolve to the value returned from the host for the 20672 /// property or method, or rejected in case of error such as there is no such 20673 /// property or method on the object or parameters are invalid. 20674 /// For example, when the application code does the following: 20675 /// 20676 /// ``` 20677 /// VARIANT object; 20678 /// object.vt = VT_DISPATCH; 20679 /// object.pdispVal = appObject; 20680 /// webview->AddHostObjectToScript(L"host_object", &host); 20681 /// ``` 20682 /// 20683 /// JavaScript code in the WebView will be able to access appObject as 20684 /// following and then access attributes and methods of appObject: 20685 /// 20686 /// ``` 20687 /// let app_object = await window.chrome.webview.hostObjects.host_object; 20688 /// let attr1 = await app_object.attr1; 20689 /// let result = await app_object.method1(parameters); 20690 /// ``` 20691 /// 20692 /// Note that while simple types, IDispatch and array are supported, generic 20693 /// IUnknown, VT_DECIMAL, or VT_RECORD variant is not supported. 20694 /// Remote JavaScript objects like callback functions are represented as 20695 /// an VT_DISPATCH VARIANT with the object implementing IDispatch. The 20696 /// JavaScript callback method may be invoked using DISPID_VALUE for the 20697 /// DISPID. 20698 /// Nested arrays are supported up to a depth of 3. 20699 /// Arrays of by reference types are not supported. 20700 /// VT_EMPTY and VT_NULL are mapped into JavaScript as null. In JavaScript 20701 /// null and undefined are mapped to VT_EMPTY. 20702 /// 20703 /// Additionally, all host objects are exposed as 20704 /// `window.chrome.webview.hostObjects.sync.<name>`. Here the host 20705 /// objects are exposed as synchronous host object proxies. These are not 20706 /// promises and calls to functions or property access synchronously block 20707 /// running script waiting to communicate cross process for the host code to 20708 /// run. Accordingly this can result in reliability issues and it is 20709 /// recommended that you use the promise based asynchronous 20710 /// `window.chrome.webview.hostObjects.<name>` API described above. 20711 /// 20712 /// Synchronous host object proxies and asynchronous host object proxies 20713 /// can both proxy the same host object. Remote changes made by one proxy 20714 /// will be reflected in any other proxy of that same host object whether 20715 /// the other proxies and synchronous or asynchronous. 20716 /// 20717 /// While JavaScript is blocked on a synchronous call to native code, that 20718 /// native code is unable to call back to JavaScript. Attempts to do so will 20719 /// fail with HRESULT_FROM_WIN32(ERROR_POSSIBLE_DEADLOCK). 20720 /// 20721 /// Host object proxies are JavaScript Proxy objects that intercept all 20722 /// property get, property set, and method invocations. Properties or methods 20723 /// that are a part of the Function or Object prototype are run locally. 20724 /// Additionally any property or method in the array 20725 /// `chrome.webview.hostObjects.options.forceLocalProperties` will also be 20726 /// run locally. This defaults to including optional methods that have 20727 /// meaning in JavaScript like `toJSON` and `Symbol.toPrimitive`. You can add 20728 /// more to this array as required. 20729 /// 20730 /// There's a method `chrome.webview.hostObjects.cleanupSome` that will best 20731 /// effort garbage collect host object proxies. 20732 /// 20733 /// Host object proxies additionally have the following methods which run 20734 /// locally: 20735 /// * applyHostFunction, getHostProperty, setHostProperty: Perform a 20736 /// method invocation, property get, or property set on the host object. 20737 /// You can use these to explicitly force a method or property to run 20738 /// remotely if there is a conflicting local method or property. For 20739 /// instance, `proxy.toString()` will run the local toString method on the 20740 /// proxy object. But ``proxy.applyHostFunction('toString')`` runs 20741 /// `toString` on the host proxied object instead. 20742 /// * getLocalProperty, setLocalProperty: Perform property get, or property 20743 /// set locally. You can use these methods to force getting or setting a 20744 /// property on the host object proxy itself rather than on the host 20745 /// object it represents. For instance, `proxy.unknownProperty` will get the 20746 /// property named `unknownProperty` from the host proxied object. But 20747 /// ``proxy.getLocalProperty('unknownProperty')`` will get the value of the property 20748 /// `unknownProperty` on the proxy object itself. 20749 /// * sync: Asynchronous host object proxies expose a sync method which 20750 /// returns a promise for a synchronous host object proxy for the same 20751 /// host object. For example, 20752 /// `chrome.webview.hostObjects.sample.methodCall()` returns an 20753 /// asynchronous host object proxy. You can use the `sync` method to 20754 /// obtain a synchronous host object proxy instead: 20755 /// `const syncProxy = await chrome.webview.hostObjects.sample.methodCall().sync()` 20756 /// * async: Synchronous host object proxies expose an async method which 20757 /// blocks and returns an asynchronous host object proxy for the same 20758 /// host object. For example, `chrome.webview.hostObjects.sync.sample.methodCall()` returns a 20759 /// synchronous host object proxy. Calling the `async` method on this blocks 20760 /// and then returns an asynchronous host object proxy for the same host object: 20761 /// `const asyncProxy = chrome.webview.hostObjects.sync.sample.methodCall().async()` 20762 /// * then: Asynchronous host object proxies have a then method. This 20763 /// allows them to be awaitable. `then` will return a promise that resolves 20764 /// with a representation of the host object. If the proxy represents a 20765 /// JavaScript literal then a copy of that is returned locally. If 20766 /// the proxy represents a function then a non-awaitable proxy is returned. 20767 /// If the proxy represents a JavaScript object with a mix of literal 20768 /// properties and function properties, then the a copy of the object is 20769 /// returned with some properties as host object proxies. 20770 /// 20771 /// All other property and method invocations (other than the above Remote 20772 /// object proxy methods, forceLocalProperties list, and properties on 20773 /// Function and Object prototypes) are run remotely. Asynchronous host 20774 /// object proxies return a promise representing asynchronous completion of 20775 /// remotely invoking the method, or getting the property. 20776 /// The promise resolves after the remote operations complete and 20777 /// the promises resolve to the resulting value of the operation. 20778 /// Synchronous host object proxies work similarly but block JavaScript 20779 /// execution and wait for the remote operation to complete. 20780 /// 20781 /// Setting a property on an asynchronous host object proxy works slightly 20782 /// differently. The set returns immediately and the return value is the value 20783 /// that will be set. This is a requirement of the JavaScript Proxy object. 20784 /// If you need to asynchronously wait for the property set to complete, use 20785 /// the setHostProperty method which returns a promise as described above. 20786 /// Synchronous object property set property synchronously blocks until the 20787 /// property is set. 20788 /// 20789 /// For example, suppose you have a COM object with the following interface 20790 /// 20791 /// \snippet HostObjectSample.idl AddHostObjectInterface 20792 /// 20793 /// We can add an instance of this interface into our JavaScript with 20794 /// `AddHostObjectToScript`. In this case we name it `sample`: 20795 /// 20796 /// \snippet ScenarioAddHostObject.cpp AddHostObjectToScript 20797 /// 20798 /// Then in the HTML document we can use this COM object via `chrome.webview.hostObjects.sample`: 20799 /// 20800 /// \snippet ScenarioAddHostObject.html HostObjectUsage 20801 /// Exposing host objects to script has security risk. Please follow 20802 /// [best practices](https://docs.microsoft.com/microsoft-edge/webview2/concepts/security). 20803 HRESULT AddHostObjectToScript(in LPCWSTR name, in VARIANT* object); 20804 20805 /// Remove the host object specified by the name so that it is no longer 20806 /// accessible from JavaScript code in the WebView. 20807 /// While new access attempts will be denied, if the object is already 20808 /// obtained by JavaScript code in the WebView, the JavaScript code will 20809 /// continue to have access to that object. 20810 /// Calling this method for a name that is already removed or never added will 20811 /// fail. 20812 HRESULT RemoveHostObjectFromScript(in LPCWSTR name); 20813 20814 /// Opens the DevTools window for the current document in the WebView. 20815 /// Does nothing if called when the DevTools window is already open. 20816 HRESULT OpenDevToolsWindow(); 20817 20818 /// Add an event handler for the ContainsFullScreenElementChanged event. 20819 /// ContainsFullScreenElementChanged fires when the ContainsFullScreenElement 20820 /// property changes. This means that an HTML element inside the WebView is 20821 /// entering fullscreen to the size of the WebView or leaving fullscreen. This 20822 /// event is useful when, for example, a video element requests to go 20823 /// fullscreen. The listener of ContainsFullScreenElementChanged can then 20824 /// resize the WebView in response. 20825 /// 20826 /// \snippet AppWindow.cpp ContainsFullScreenElementChanged 20827 HRESULT add_ContainsFullScreenElementChanged( 20828 /+[in]+/ ICoreWebView2ContainsFullScreenElementChangedEventHandler eventHandler, 20829 /+[out]+/ EventRegistrationToken* token); 20830 /// Remove an event handler previously added with 20831 /// add_ContainsFullScreenElementChanged. 20832 HRESULT remove_ContainsFullScreenElementChanged( 20833 in EventRegistrationToken token); 20834 20835 /// Indicates if the WebView contains a fullscreen HTML element. 20836 /+[ propget]+/ 20837 HRESULT get_ContainsFullScreenElement( 20838 /+[out, retval]+/ BOOL* containsFullScreenElement); 20839 20840 /// Add an event handler for the WebResourceRequested event. 20841 /// WebResourceRequested fires when the WebView is performing a URL request to 20842 /// a matching URL and resource context filter that was added with 20843 /// AddWebResourceRequestedFilter. At least one filter must be added for the 20844 /// event to fire. 20845 /// 20846 /// The web resource requested can be blocked until the event handler returns 20847 /// if a deferral is not taken on the event args. If a deferral is taken, then 20848 /// the web resource requested is blocked until the deferral is completed. 20849 /// 20850 /// \snippet SettingsComponent.cpp WebResourceRequested 20851 HRESULT add_WebResourceRequested( 20852 /+[in]+/ ICoreWebView2WebResourceRequestedEventHandler eventHandler, 20853 /+[out]+/ EventRegistrationToken* token); 20854 /// Remove an event handler previously added with add_WebResourceRequested. 20855 HRESULT remove_WebResourceRequested( 20856 in EventRegistrationToken token); 20857 20858 /// Adds a URI and resource context filter to the WebResourceRequested event. 20859 /// The URI parameter can be a wildcard string ('*': zero or more, '?': 20860 /// exactly one). nullptr is equivalent to L"". 20861 /// See COREWEBVIEW2_WEB_RESOURCE_CONTEXT enum for description of resource 20862 /// context filters. 20863 HRESULT AddWebResourceRequestedFilter( 20864 in LPCWSTR uri, 20865 in COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext); 20866 /// Removes a matching WebResource filter that was previously added for the 20867 /// WebResourceRequested event. If the same filter was added multiple times, 20868 /// then it will need to be removed as many times as it was added for the 20869 /// removal to be effective. Returns E_INVALIDARG for a filter that was never 20870 /// added. 20871 HRESULT RemoveWebResourceRequestedFilter( 20872 in LPCWSTR uri, 20873 in COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext); 20874 20875 /// Add an event handler for the WindowCloseRequested event. 20876 /// WindowCloseRequested fires when content inside the WebView requested to 20877 /// close the window, such as after window.close is called. The app should 20878 /// close the WebView and related app window if that makes sense to the app. 20879 /// 20880 /// \snippet AppWindow.cpp WindowCloseRequested 20881 HRESULT add_WindowCloseRequested( 20882 /+[in]+/ ICoreWebView2WindowCloseRequestedEventHandler eventHandler, 20883 /+[out]+/ EventRegistrationToken* token); 20884 /// Remove an event handler previously added with add_WindowCloseRequested. 20885 HRESULT remove_WindowCloseRequested( 20886 in EventRegistrationToken token); 20887 } 20888 20889 /// This interface is the owner of the CoreWebView2 object, and provides support 20890 /// for resizing, showing and hiding, focusing, and other functionality related 20891 /// to windowing and composition. The CoreWebView2Controller owns the CoreWebView2, 20892 /// and if all references to the CoreWebView2Controller go away, the WebView will 20893 /// be closed. 20894 const GUID IID_ICoreWebView2Controller = ICoreWebView2Controller.iid; 20895 20896 interface ICoreWebView2Controller : IUnknown 20897 { 20898 static const GUID iid = { 0x4d00c0d1,0x9434,0x4eb6,[ 0x80,0x78,0x86,0x97,0xa5,0x60,0x33,0x4f ] }; 20899 extern(Windows): 20900 /// The IsVisible property determines whether to show or hide the WebView. 20901 /// If IsVisible is set to false, the WebView will be transparent and will 20902 /// not be rendered. However, this will not affect the window containing 20903 /// the WebView (the HWND parameter that was passed to CreateCoreWebView2Controller). 20904 /// If you want that window to disappear too, call ShowWindow on it directly 20905 /// in addition to modifying the IsVisible property. 20906 /// WebView as a child window won't get window messages when the top window 20907 /// is minimized or restored. For performance reason, developer should set 20908 /// IsVisible property of the WebView to false when the app window is 20909 /// minimized and back to true when app window is restored. App window can do 20910 /// this by handling SC_MINIMIZE and SC_RESTORE command upon receiving 20911 /// WM_SYSCOMMAND message. 20912 /// 20913 /// \snippet ViewComponent.cpp ToggleIsVisible 20914 /+[ propget]+/ 20915 HRESULT get_IsVisible(/+[out, retval]+/ BOOL* isVisible); 20916 /// Set the IsVisible property. 20917 /// 20918 /// \snippet ViewComponent.cpp ToggleIsVisibleOnMinimize 20919 /+[ propput]+/ 20920 HRESULT put_IsVisible(in BOOL isVisible); 20921 20922 /// The WebView bounds. 20923 /// Bounds are relative to the parent HWND. The app has two ways it can 20924 /// position a WebView: 20925 /// 1. Create a child HWND that is the WebView parent HWND. Position this 20926 /// window where the WebView should be. In this case, use (0, 0) for the 20927 /// WebView's Bound's top left corner (the offset). 20928 /// 2. Use the app's top most window as the WebView parent HWND. Set the 20929 /// WebView's Bound's top left corner so that the WebView is positioned 20930 /// correctly in the app. 20931 /// The Bound's values are in the host's coordinate space. 20932 /+[ propget]+/ 20933 HRESULT get_Bounds(/+[out, retval]+/ RECT* bounds); 20934 /// Set the Bounds property. 20935 /// 20936 /// \snippet ViewComponent.cpp ResizeWebView 20937 /+[ propput]+/ 20938 HRESULT put_Bounds(in RECT bounds); 20939 20940 /// The zoom factor for the WebView. 20941 /// Note that changing zoom factor could cause `window.innerWidth/innerHeight` 20942 /// and page layout to change. 20943 /// A zoom factor that is applied by the host by calling ZoomFactor 20944 /// becomes the new default zoom for the WebView. This zoom factor applies 20945 /// across navigations and is the zoom factor WebView is returned to when the 20946 /// user presses ctrl+0. When the zoom factor is changed by the user 20947 /// (resulting in the app receiving ZoomFactorChanged), that zoom applies 20948 /// only for the current page. Any user applied zoom is only for the current 20949 /// page and is reset on a navigation. 20950 /// Specifying a zoomFactor less than or equal to 0 is not allowed. 20951 /// WebView also has an internal supported zoom factor range. When a specified 20952 /// zoom factor is out of that range, it will be normalized to be within the 20953 /// range, and a ZoomFactorChanged event will be fired for the real 20954 /// applied zoom factor. When this range normalization happens, the 20955 /// ZoomFactor property will report the zoom factor specified during the 20956 /// previous modification of the ZoomFactor property until the 20957 /// ZoomFactorChanged event is received after WebView applies the normalized 20958 /// zoom factor. 20959 /+[ propget]+/ 20960 HRESULT get_ZoomFactor(/+[out, retval]+/ double* zoomFactor); 20961 /// Set the ZoomFactor property. 20962 /+[ propput]+/ 20963 HRESULT put_ZoomFactor(in double zoomFactor); 20964 20965 /// Add an event handler for the ZoomFactorChanged event. 20966 /// ZoomFactorChanged fires when the ZoomFactor property of the WebView changes. 20967 /// The event could fire because the caller modified the ZoomFactor property, 20968 /// or due to the user manually modifying the zoom. When it is modified by the 20969 /// caller via the ZoomFactor property, the internal zoom factor is updated 20970 /// immediately and there will be no ZoomFactorChanged event. 20971 /// WebView associates the last used zoom factor for each site. Therefore, it 20972 /// is possible for the zoom factor to change when navigating to a different 20973 /// page. When the zoom factor changes due to this, the ZoomFactorChanged 20974 /// event fires right after the ContentLoading event. 20975 /// 20976 /// \snippet ViewComponent.cpp ZoomFactorChanged 20977 HRESULT add_ZoomFactorChanged( 20978 /+[in]+/ ICoreWebView2ZoomFactorChangedEventHandler eventHandler, 20979 /+[out]+/ EventRegistrationToken* token); 20980 /// Remove an event handler previously added with add_ZoomFactorChanged. 20981 HRESULT remove_ZoomFactorChanged( 20982 in EventRegistrationToken token); 20983 20984 /// Update Bounds and ZoomFactor properties at the same time. This operation 20985 /// is atomic from the host's perspective. After returning from this function, 20986 /// the Bounds and ZoomFactor properties will have both been updated if the 20987 /// function is successful, or neither will be updated if the function fails. 20988 /// If Bounds and ZoomFactor are both updated by the same scale (i.e. Bounds 20989 /// and ZoomFactor are both doubled), then the page will not see a change in 20990 /// window.innerWidth/innerHeight and the WebView will render the content at 20991 /// the new size and zoom without intermediate renderings. 20992 /// This function can also be used to update just one of ZoomFactor or Bounds 20993 /// by passing in the new value for one and the current value for the other. 20994 /// 20995 /// \snippet ViewComponent.cpp SetBoundsAndZoomFactor 20996 HRESULT SetBoundsAndZoomFactor(in RECT bounds, in double zoomFactor); 20997 20998 /// Move focus into WebView. WebView will get focus and focus will be set to 20999 /// correspondent element in the page hosted in the WebView. 21000 /// For Programmatic reason, focus is set to previously focused element or 21001 /// the default element if there is no previously focused element. 21002 /// For Next reason, focus is set to the first element. 21003 /// For Previous reason, focus is set to the last element. 21004 /// WebView can also got focus through user interaction like clicking into 21005 /// WebView or Tab into it. 21006 /// For tabbing, the app can call MoveFocus with Next or Previous to align 21007 /// with tab and shift+tab respectively when it decides the WebView is the 21008 /// next tabbable element. Or, the app can call IsDialogMessage as part of 21009 /// its message loop to allow the platform to auto handle tabbing. The 21010 /// platform will rotate through all windows with WS_TABSTOP. When the 21011 /// WebView gets focus from IsDialogMessage, it will internally put the focus 21012 /// on the first or last element for tab and shift+tab respectively. 21013 /// 21014 /// \snippet App.cpp MoveFocus0 21015 /// 21016 /// \snippet ControlComponent.cpp MoveFocus1 21017 /// 21018 /// \snippet ControlComponent.cpp MoveFocus2 21019 HRESULT MoveFocus(in COREWEBVIEW2_MOVE_FOCUS_REASON reason); 21020 21021 /// Add an event handler for the MoveFocusRequested event. 21022 /// MoveFocusRequested fires when user tries to tab out of the WebView. 21023 /// The WebView's focus has not changed when this event is fired. 21024 /// 21025 /// \snippet ControlComponent.cpp MoveFocusRequested 21026 HRESULT add_MoveFocusRequested( 21027 /+[in]+/ ICoreWebView2MoveFocusRequestedEventHandler eventHandler, 21028 /+[out]+/ EventRegistrationToken* token); 21029 /// Remove an event handler previously added with add_MoveFocusRequested. 21030 HRESULT remove_MoveFocusRequested( 21031 in EventRegistrationToken token); 21032 21033 /// Add an event handler for the GotFocus event. 21034 /// GotFocus fires when WebView got focus. 21035 HRESULT add_GotFocus( 21036 /+[in]+/ ICoreWebView2FocusChangedEventHandler eventHandler, 21037 /+[out]+/ EventRegistrationToken* token); 21038 /// Remove an event handler previously added with add_GotFocus. 21039 HRESULT remove_GotFocus( 21040 in EventRegistrationToken token); 21041 21042 /// Add an event handler for the LostFocus event. 21043 /// LostFocus fires when WebView lost focus. 21044 /// In the case where MoveFocusRequested event is fired, the focus is still 21045 /// on WebView when MoveFocusRequested event fires. LostFocus only fires 21046 /// afterwards when app's code or default action of MoveFocusRequested event 21047 /// set focus away from WebView. 21048 HRESULT add_LostFocus( 21049 /+[in]+/ ICoreWebView2FocusChangedEventHandler eventHandler, 21050 /+[out]+/ EventRegistrationToken* token); 21051 /// Remove an event handler previously added with add_LostFocus. 21052 HRESULT remove_LostFocus( 21053 in EventRegistrationToken token); 21054 21055 /// Add an event handler for the AcceleratorKeyPressed event. 21056 /// AcceleratorKeyPressed fires when an accelerator key or key combo is 21057 /// pressed or released while the WebView is focused. A key is considered an 21058 /// accelerator if either: 21059 /// 1. Ctrl or Alt is currently being held, or 21060 /// 2. the pressed key does not map to a character. 21061 /// A few specific keys are never considered accelerators, such as Shift. 21062 /// The Escape key is always considered an accelerator. 21063 /// 21064 /// Autorepeated key events caused by holding the key down will also fire this 21065 /// event. You can filter these out by checking the event args' 21066 /// KeyEventLParam or PhysicalKeyStatus. 21067 /// 21068 /// In windowed mode, this event handler is called synchronously. Until you 21069 /// call Handled() on the event args or the event handler returns, the browser 21070 /// process will be blocked and outgoing cross-process COM calls will fail 21071 /// with RPC_E_CANTCALLOUT_ININPUTSYNCCALL. All CoreWebView2 API methods will 21072 /// work, however. 21073 /// 21074 /// In windowless mode, the event handler is called asynchronously. Further 21075 /// input will not reach the browser until the event handler returns or 21076 /// Handled() is called, but the browser process itself will not be blocked, 21077 /// and outgoing COM calls will work normally. 21078 /// 21079 /// It is recommended to call Handled(TRUE) as early as you can know that you want 21080 /// to handle the accelerator key. 21081 /// 21082 /// \snippet ControlComponent.cpp AcceleratorKeyPressed 21083 HRESULT add_AcceleratorKeyPressed( 21084 /+[in]+/ ICoreWebView2AcceleratorKeyPressedEventHandler eventHandler, 21085 /+[out]+/ EventRegistrationToken* token); 21086 /// Remove an event handler previously added with add_AcceleratorKeyPressed. 21087 HRESULT remove_AcceleratorKeyPressed( 21088 in EventRegistrationToken token); 21089 21090 /// The parent window provided by the app that this WebView is using to 21091 /// render content. This API initially returns the window passed into 21092 /// CreateCoreWebView2Controller. 21093 /+[ propget]+/ 21094 HRESULT get_ParentWindow(/+[out, retval]+/ HWND* parentWindow); 21095 21096 /// Set the parent window for the WebView. This will cause the WebView to 21097 /// reparent its window to the newly provided window. 21098 /+[ propput]+/ 21099 HRESULT put_ParentWindow(in HWND parentWindow); 21100 21101 /// This is a notification separate from Bounds that tells WebView its 21102 /// parent (or any ancestor) HWND moved. This is needed for accessibility and 21103 /// certain dialogs in WebView to work correctly. 21104 /// \snippet ViewComponent.cpp NotifyParentWindowPositionChanged 21105 HRESULT NotifyParentWindowPositionChanged(); 21106 21107 /// Closes the WebView and cleans up the underlying browser instance. 21108 /// Cleaning up the browser instance will release the resources powering the WebView. 21109 /// The browser instance will be shut down if there are no other WebViews using it. 21110 /// 21111 /// After calling Close, all method calls will fail and event handlers 21112 /// will stop firing. Specifically, the WebView will release its references 21113 /// to its event handlers when Close is called. 21114 /// 21115 /// Close is implicitly called when the CoreWebView2Controller loses its final 21116 /// reference and is destructed. But it is best practice to explicitly call 21117 /// Close to avoid any accidental cycle of references between the WebView 21118 /// and the app code. Specifically, if you capture a reference to the WebView 21119 /// in an event handler you will create a reference cycle between the WebView 21120 /// and the event handler. Calling Close will break this cycle by releasing 21121 /// all event handlers. But to avoid this situation it is best practice both 21122 /// to explicitly call Close on the WebView and to not capture a reference to 21123 /// the WebView to ensure the WebView can be cleaned up correctly. 21124 /// 21125 /// \snippet AppWindow.cpp Close 21126 HRESULT Close(); 21127 21128 /// Gets the CoreWebView2 associated with this CoreWebView2Controller. 21129 /+[ propget]+/ 21130 HRESULT get_CoreWebView2(/+[out, retval]+/ ICoreWebView2 * coreWebView2); 21131 } 21132 21133 /// This interface is used to complete deferrals on event args that 21134 /// support getting deferrals via their GetDeferral method. 21135 const GUID IID_ICoreWebView2Deferral = ICoreWebView2Deferral.iid; 21136 21137 interface ICoreWebView2Deferral : IUnknown 21138 { 21139 static const GUID iid = { 0xc10e7f7b,0xb585,0x46f0,[ 0xa6,0x23,0x8b,0xef,0xbf,0x3e,0x4e,0xe0 ] }; 21140 extern(Windows): 21141 /// Completes the associated deferred event. Complete should only be 21142 /// called once for each deferral taken. 21143 HRESULT Complete(); 21144 } 21145 21146 /// Defines properties that enable, disable, or modify WebView 21147 /// features. Setting changes made after NavigationStarting event will not 21148 /// apply until the next top level navigation. 21149 const GUID IID_ICoreWebView2Settings = ICoreWebView2Settings.iid; 21150 21151 interface ICoreWebView2Settings : IUnknown 21152 { 21153 static const GUID iid = { 0xe562e4f0,0xd7fa,0x43ac,[ 0x8d,0x71,0xc0,0x51,0x50,0x49,0x9f,0x00 ] }; 21154 extern(Windows): 21155 /// Controls if JavaScript execution is enabled in all future 21156 /// navigations in the WebView. This only affects scripts in the document; 21157 /// scripts injected with ExecuteScript will run even if script is disabled. 21158 /// It is true by default. 21159 /// 21160 /// \snippet SettingsComponent.cpp IsScriptEnabled 21161 /+[ propget]+/ 21162 HRESULT get_IsScriptEnabled( 21163 /+[out, retval]+/ BOOL* isScriptEnabled); 21164 /// Set the IsScriptEnabled property. 21165 /+[ propput]+/ 21166 HRESULT put_IsScriptEnabled(in BOOL isScriptEnabled); 21167 21168 /// The IsWebMessageEnabled property is used when loading a new 21169 /// HTML document. If set to true, communication from the host to the 21170 /// WebView's top level HTML document is allowed via PostWebMessageAsJson, 21171 /// PostWebMessageAsString, and window.chrome.webview's message event 21172 /// (see PostWebMessageAsJson documentation for details). 21173 /// Communication from the WebView's top level HTML document to the host is 21174 /// allowed via window.chrome.webview's postMessage function and 21175 /// add_WebMessageReceived method (see add_WebMessageReceived documentation 21176 /// for details). 21177 /// If set to false, then communication is disallowed. 21178 /// PostWebMessageAsJson and PostWebMessageAsString will 21179 /// fail with E_ACCESSDENIED and window.chrome.webview.postMessage will fail 21180 /// by throwing an instance of an Error object. 21181 /// It is true by default. 21182 /// 21183 /// \snippet ScenarioWebMessage.cpp IsWebMessageEnabled 21184 /+[ propget]+/ 21185 HRESULT get_IsWebMessageEnabled( 21186 /+[out, retval]+/ BOOL* isWebMessageEnabled); 21187 /// Set the IsWebMessageEnabled property. 21188 /+[ propput]+/ 21189 HRESULT put_IsWebMessageEnabled(in BOOL isWebMessageEnabled); 21190 21191 /// AreDefaultScriptDialogsEnabled is used when loading a new HTML document. 21192 /// If set to false, then WebView won't render the default JavaScript dialog 21193 /// box (Specifically those shown by the JavaScript alert, confirm, prompt 21194 /// functions and beforeunload event). Instead, if an event handler is set via 21195 /// add_ScriptDialogOpening, WebView will send an event that will contain all 21196 /// of the information for the dialog and allow the host app to show its own 21197 /// custom UI. It is true by default. 21198 /+[ propget]+/ 21199 HRESULT get_AreDefaultScriptDialogsEnabled( 21200 /+[out, retval]+/ BOOL* areDefaultScriptDialogsEnabled); 21201 /// Set the AreDefaultScriptDialogsEnabled property. 21202 /+[ propput]+/ 21203 HRESULT put_AreDefaultScriptDialogsEnabled( 21204 in BOOL areDefaultScriptDialogsEnabled); 21205 21206 /// IsStatusBarEnabled controls whether the status bar will be displayed. The 21207 /// status bar is usually displayed in the lower left of the WebView and shows 21208 /// things such as the URI of a link when the user hovers over it and other 21209 /// information. It is true by default. 21210 /+[ propget]+/ 21211 HRESULT get_IsStatusBarEnabled(/+[out, retval]+/ BOOL* isStatusBarEnabled); 21212 /// Set the IsStatusBarEnabled property. 21213 /+[ propput]+/ 21214 HRESULT put_IsStatusBarEnabled(in BOOL isStatusBarEnabled); 21215 21216 /// AreDevToolsEnabled controls whether the user is able to use the context 21217 /// menu or keyboard shortcuts to open the DevTools window. 21218 /// It is true by default. 21219 /+[ propget]+/ 21220 HRESULT get_AreDevToolsEnabled(/+[out, retval]+/ BOOL* areDevToolsEnabled); 21221 /// Set the AreDevToolsEnabled property. 21222 /+[ propput]+/ 21223 HRESULT put_AreDevToolsEnabled(in BOOL areDevToolsEnabled); 21224 21225 /// The AreDefaultContextMenusEnabled property is used to prevent 21226 /// default context menus from being shown to user in WebView. 21227 /// It is true by default. 21228 /// 21229 /// \snippet SettingsComponent.cpp DisableContextMenu 21230 /+[ propget]+/ 21231 HRESULT get_AreDefaultContextMenusEnabled(/+[out, retval]+/ BOOL* enabled); 21232 /// Set the AreDefaultContextMenusEnabled property. 21233 /+[ propput]+/ 21234 HRESULT put_AreDefaultContextMenusEnabled(in BOOL enabled); 21235 21236 /// The AreHostObjectsAllowed property is used to control whether 21237 /// host objects are accessible from the page in WebView. 21238 /// It is true by default. 21239 /// 21240 /// \snippet SettingsComponent.cpp HostObjectsAccess 21241 /+[ propget]+/ 21242 HRESULT get_AreHostObjectsAllowed(/+[out, retval]+/ BOOL* allowed); 21243 /// Set the AreHostObjectsAllowed property. 21244 /+[ propput]+/ 21245 HRESULT put_AreHostObjectsAllowed(in BOOL allowed); 21246 21247 /// The IsZoomControlEnabled property is used to prevent the user from 21248 /// impacting the zoom of the WebView. It is true by default. 21249 /// When disabled, user will not be able to zoom using ctrl+/- or 21250 /// ctrl+mouse wheel, but the zoom can be set via ZoomFactor API. 21251 /// 21252 /// \snippet SettingsComponent.cpp DisableZoomControl 21253 /+[ propget]+/ 21254 HRESULT get_IsZoomControlEnabled(/+[out, retval]+/ BOOL* enabled); 21255 /// Set the IsZoomControlEnabled property. 21256 /+[ propput]+/ 21257 HRESULT put_IsZoomControlEnabled(in BOOL enabled); 21258 21259 /// The IsBuiltInErrorPageEnabled property is used to disable built in error 21260 /// page for navigation failure and render process failure. It is true by 21261 /// default. 21262 /// When disabled, blank page will be shown when related error happens. 21263 /// 21264 /// \snippet SettingsComponent.cpp BuiltInErrorPageEnabled 21265 /+[ propget]+/ 21266 HRESULT get_IsBuiltInErrorPageEnabled(/+[out, retval]+/ BOOL* enabled); 21267 /// Set the IsBuiltInErrorPageEnabled property. 21268 /+[ propput]+/ 21269 HRESULT put_IsBuiltInErrorPageEnabled(in BOOL enabled); 21270 } 21271 21272 /// Event args for the ProcessFailed event. 21273 const GUID IID_ICoreWebView2ProcessFailedEventArgs = ICoreWebView2ProcessFailedEventArgs.iid; 21274 21275 interface ICoreWebView2ProcessFailedEventArgs : IUnknown 21276 { 21277 static const GUID iid = { 0x8155a9a4,0x1474,0x4a86,[ 0x8c,0xae,0x15,0x1b,0x0f,0xa6,0xb8,0xca ] }; 21278 extern(Windows): 21279 /// The kind of process failure that has occurred. 21280 /+[ propget]+/ 21281 HRESULT get_ProcessFailedKind( 21282 /+[out, retval]+/ COREWEBVIEW2_PROCESS_FAILED_KIND* processFailedKind); 21283 } 21284 21285 /// The caller implements this interface to receive ProcessFailed events. 21286 const GUID IID_ICoreWebView2ProcessFailedEventHandler = ICoreWebView2ProcessFailedEventHandler.iid; 21287 21288 interface ICoreWebView2ProcessFailedEventHandler : IUnknown 21289 { 21290 static const GUID iid = { 0x79e0aea4,0x990b,0x42d9,[ 0xaa,0x1d,0x0f,0xcc,0x2e,0x5b,0xc7,0xf1 ] }; 21291 extern(Windows): 21292 /// Called to provide the implementer with the event args for the 21293 /// corresponding event. 21294 HRESULT Invoke( 21295 /+[in]+/ ICoreWebView2 sender, 21296 /+[in]+/ ICoreWebView2ProcessFailedEventArgs args); 21297 } 21298 21299 /// The caller implements this interface to receive ZoomFactorChanged 21300 /// events. Use the ICoreWebView2Controller.ZoomFactor property to get the 21301 /// modified zoom factor. 21302 const GUID IID_ICoreWebView2ZoomFactorChangedEventHandler = ICoreWebView2ZoomFactorChangedEventHandler.iid; 21303 21304 interface ICoreWebView2ZoomFactorChangedEventHandler : IUnknown 21305 { 21306 static const GUID iid = { 0xb52d71d6,0xc4df,0x4543,[ 0xa9,0x0c,0x64,0xa3,0xe6,0x0f,0x38,0xcb ] }; 21307 extern(Windows): 21308 /// Called to provide the implementer with the event args for the 21309 /// corresponding event. There are no event args and the args 21310 /// parameter will be null. 21311 HRESULT Invoke(/+[in]+/ ICoreWebView2Controller sender, /+[in]+/ IUnknown args); 21312 } 21313 21314 /// Iterator for a collection of HTTP headers. See ICoreWebView2HttpRequestHeaders 21315 /// and ICoreWebView2HttpResponseHeaders. 21316 /// 21317 /// \snippet ScenarioWebViewEventMonitor.cpp HttpRequestHeaderIterator 21318 const GUID IID_ICoreWebView2HttpHeadersCollectionIterator = ICoreWebView2HttpHeadersCollectionIterator.iid; 21319 21320 interface ICoreWebView2HttpHeadersCollectionIterator : IUnknown 21321 { 21322 static const GUID iid = { 0x0702fc30,0xf43b,0x47bb,[ 0xab,0x52,0xa4,0x2c,0xb5,0x52,0xad,0x9f ] }; 21323 extern(Windows): 21324 /// Get the name and value of the current HTTP header of the iterator. This 21325 /// method will fail if the last call to MoveNext set hasNext to FALSE. 21326 HRESULT GetCurrentHeader(/+[out]+/ LPWSTR* name, 21327 /+[out]+/ LPWSTR* value); 21328 21329 /// True when the iterator hasn't run out of headers. If the collection over 21330 /// which the iterator is iterating is empty or if the iterator has gone past 21331 /// the end of the collection then this is false. 21332 /+[ propget]+/ 21333 HRESULT get_HasCurrentHeader(/+[out, retval]+/ BOOL* hasCurrent); 21334 21335 /// Move the iterator to the next HTTP header in the collection. The hasNext 21336 /// parameter will be set to FALSE if there are no more HTTP headers. After 21337 /// this occurs the GetCurrentHeader method will fail if called. 21338 HRESULT MoveNext(/+[out, retval]+/ BOOL* hasNext); 21339 } 21340 21341 /// HTTP request headers. Used to inspect the HTTP request on 21342 /// WebResourceRequested event and NavigationStarting event. 21343 /// Note, you can modify the HTTP request headers from a WebResourceRequested event, 21344 /// but not from a NavigationStarting event. 21345 const GUID IID_ICoreWebView2HttpRequestHeaders = ICoreWebView2HttpRequestHeaders.iid; 21346 21347 interface ICoreWebView2HttpRequestHeaders : IUnknown 21348 { 21349 static const GUID iid = { 0xe86cac0e,0x5523,0x465c,[ 0xb5,0x36,0x8f,0xb9,0xfc,0x8c,0x8c,0x60 ] }; 21350 extern(Windows): 21351 /// Gets the header value matching the name. 21352 HRESULT GetHeader(in LPCWSTR name, 21353 /+[out, retval]+/ LPWSTR* value); 21354 /// Gets the header value matching the name via an iterator. 21355 HRESULT GetHeaders(in LPCWSTR name, 21356 /+[out, retval]+/ ICoreWebView2HttpHeadersCollectionIterator * iterator); 21357 /// Checks whether the headers contain an entry matching the header name. 21358 HRESULT Contains(in LPCWSTR name, 21359 /+[out, retval]+/ BOOL* contains); 21360 /// Adds or updates header that matches the name. 21361 HRESULT SetHeader(in LPCWSTR name, in LPCWSTR value); 21362 /// Removes header that matches the name. 21363 HRESULT RemoveHeader(in LPCWSTR name); 21364 /// Gets an iterator over the collection of request headers. 21365 HRESULT GetIterator( 21366 /+[out, retval]+/ ICoreWebView2HttpHeadersCollectionIterator * iterator); 21367 } 21368 21369 /// HTTP response headers. Used to construct a WebResourceResponse for the 21370 /// WebResourceRequested event. 21371 const GUID IID_ICoreWebView2HttpResponseHeaders = ICoreWebView2HttpResponseHeaders.iid; 21372 21373 interface ICoreWebView2HttpResponseHeaders : IUnknown 21374 { 21375 static const GUID iid = { 0x03c5ff5a,0x9b45,0x4a88,[ 0x88,0x1c,0x89,0xa9,0xf3,0x28,0x61,0x9c ] }; 21376 extern(Windows): 21377 /// Appends header line with name and value. 21378 HRESULT AppendHeader(in LPCWSTR name, in LPCWSTR value); 21379 /// Checks whether the headers contain entries matching the header name. 21380 HRESULT Contains(in LPCWSTR name, 21381 /+[out, retval]+/ BOOL* contains); 21382 /// Gets the first header value in the collection matching the name. 21383 HRESULT GetHeader(in LPCWSTR name, 21384 /+[out, retval]+/ LPWSTR* value); 21385 /// Gets the header values matching the name. 21386 HRESULT GetHeaders(in LPCWSTR name, 21387 /+[out, retval]+/ ICoreWebView2HttpHeadersCollectionIterator * iterator); 21388 /// Gets an iterator over the collection of entire response headers. 21389 HRESULT GetIterator( 21390 /+[out, retval]+/ ICoreWebView2HttpHeadersCollectionIterator * iterator); 21391 } 21392 21393 /// An HTTP request used with the WebResourceRequested event. 21394 const GUID IID_ICoreWebView2WebResourceRequest = ICoreWebView2WebResourceRequest.iid; 21395 21396 interface ICoreWebView2WebResourceRequest : IUnknown 21397 { 21398 static const GUID iid = { 0x97055cd4,0x512c,0x4264,[ 0x8b,0x5f,0xe3,0xf4,0x46,0xce,0xa6,0xa5 ] }; 21399 extern(Windows): 21400 /// The request URI. 21401 /+[ propget]+/ 21402 HRESULT get_Uri(/+[out, retval]+/ LPWSTR* uri); 21403 /// Set the Uri property. 21404 /+[ propput]+/ 21405 HRESULT put_Uri(in LPCWSTR uri); 21406 21407 /// The HTTP request method. 21408 /+[ propget]+/ 21409 HRESULT get_Method(/+[out, retval]+/ LPWSTR* method); 21410 /// Set the Method property. 21411 /+[ propput]+/ 21412 HRESULT put_Method(in LPCWSTR method); 21413 21414 /// The HTTP request message body as stream. POST data would be here. 21415 /// If a stream is set, which will override the message body, the stream must 21416 /// have all the content data available by the time this 21417 /// response's WebResourceRequested event deferral is completed. Stream 21418 /// should be agile or be created from a background STA to prevent performance 21419 /// impact to the UI thread. Null means no content data. IStream semantics 21420 /// apply (return S_OK to Read calls until all data is exhausted). 21421 /+[ propget]+/ 21422 HRESULT get_Content(/+[out, retval]+/ IStream** content); 21423 /// Set the Content property. 21424 /+[ propput]+/ 21425 HRESULT put_Content(in IStream* content); 21426 21427 /// The mutable HTTP request headers 21428 /+[ propget]+/ 21429 HRESULT get_Headers(/+[out, retval]+/ ICoreWebView2HttpRequestHeaders * headers); 21430 } 21431 21432 /// An HTTP response used with the WebResourceRequested event. 21433 const GUID IID_ICoreWebView2WebResourceResponse = ICoreWebView2WebResourceResponse.iid; 21434 21435 interface ICoreWebView2WebResourceResponse : IUnknown 21436 { 21437 static const GUID iid = { 0xaafcc94f,0xfa27,0x48fd,[ 0x97,0xdf,0x83,0x0e,0xf7,0x5a,0xae,0xc9 ] }; 21438 extern(Windows): 21439 /// HTTP response content as stream. Stream must have all the 21440 /// content data available by the time this response's WebResourceRequested 21441 /// event deferral is completed. Stream should be agile or be created from 21442 /// a background thread to prevent performance impact to the UI thread. 21443 /// Null means no content data. IStream semantics 21444 /// apply (return S_OK to Read calls until all data is exhausted). 21445 /+[ propget]+/ 21446 HRESULT get_Content(/+[out, retval]+/ IStream** content); 21447 /// Set the Content property. 21448 /+[ propput]+/ 21449 HRESULT put_Content(in IStream* content); 21450 21451 /// Overridden HTTP response headers. 21452 /+[ propget]+/ 21453 HRESULT get_Headers(/+[out, retval]+/ ICoreWebView2HttpResponseHeaders * headers); 21454 21455 /// The HTTP response status code. 21456 /+[ propget]+/ 21457 HRESULT get_StatusCode(/+[out, retval]+/ int* statusCode); 21458 /// Set the StatusCode property. 21459 /+[ propput]+/ 21460 HRESULT put_StatusCode(in int statusCode); 21461 21462 /// The HTTP response reason phrase. 21463 /+[ propget]+/ 21464 HRESULT get_ReasonPhrase(/+[out, retval]+/ LPWSTR* reasonPhrase); 21465 /// Set the ReasonPhrase property. 21466 /+[ propput]+/ 21467 HRESULT put_ReasonPhrase(in LPCWSTR reasonPhrase); 21468 } 21469 21470 /// Event args for the NavigationStarting event. 21471 const GUID IID_ICoreWebView2NavigationStartingEventArgs = ICoreWebView2NavigationStartingEventArgs.iid; 21472 21473 interface ICoreWebView2NavigationStartingEventArgs : IUnknown 21474 { 21475 static const GUID iid = { 0x5b495469,0xe119,0x438a,[ 0x9b,0x18,0x76,0x04,0xf2,0x5f,0x2e,0x49 ] }; 21476 extern(Windows): 21477 /// The uri of the requested navigation. 21478 /+[ propget]+/ 21479 HRESULT get_Uri(/+[out, retval]+/ LPWSTR* uri); 21480 21481 /// True when the navigation was initiated through a user gesture as opposed 21482 /// to programmatic navigation. 21483 /+[ propget]+/ 21484 HRESULT get_IsUserInitiated(/+[out, retval]+/ BOOL* isUserInitiated); 21485 21486 /// True when the navigation is redirected. 21487 /+[ propget]+/ 21488 HRESULT get_IsRedirected(/+[out, retval]+/ BOOL* isRedirected); 21489 21490 /// The HTTP request headers for the navigation. 21491 /// Note, you cannot modify the HTTP request headers in a NavigationStarting event. 21492 /+[ propget]+/ 21493 HRESULT get_RequestHeaders(/+[out, retval]+/ ICoreWebView2HttpRequestHeaders * requestHeaders); 21494 21495 /// The host may set this flag to cancel the navigation. 21496 /// If set, it will be as if the navigation never happened and the current 21497 /// page's content will be intact. For performance reasons, GET HTTP requests 21498 /// may happen, while the host is responding. This means cookies can be set 21499 /// and used part of a request for the navigation. 21500 /// Cancellation for navigation to about:blank or frame navigation to srcdoc 21501 /// is not supported. Such attempts will be ignored. 21502 /+[ propget]+/ 21503 HRESULT get_Cancel(/+[out, retval]+/ BOOL* cancel); 21504 /// Set the Cancel property. 21505 /+[ propput]+/ 21506 HRESULT put_Cancel(in BOOL cancel); 21507 21508 /// The ID of the navigation. 21509 /+[ propget]+/ 21510 HRESULT get_NavigationId(/+[out, retval]+/ UINT64* navigationId); 21511 } 21512 21513 /// The caller implements this interface to receive the NavigationStarting 21514 /// event. 21515 const GUID IID_ICoreWebView2NavigationStartingEventHandler = ICoreWebView2NavigationStartingEventHandler.iid; 21516 21517 interface ICoreWebView2NavigationStartingEventHandler : IUnknown 21518 { 21519 static const GUID iid = { 0x9adbe429,0xf36d,0x432b,[ 0x9d,0xdc,0xf8,0x88,0x1f,0xbd,0x76,0xe3 ] }; 21520 extern(Windows): 21521 /// Called to provide the implementer with the event args for the 21522 /// corresponding event. 21523 HRESULT Invoke( 21524 /+[in]+/ ICoreWebView2 sender, 21525 /+[in]+/ ICoreWebView2NavigationStartingEventArgs args); 21526 } 21527 21528 /// Event args for the ContentLoading event. 21529 const GUID IID_ICoreWebView2ContentLoadingEventArgs = ICoreWebView2ContentLoadingEventArgs.iid; 21530 21531 interface ICoreWebView2ContentLoadingEventArgs : IUnknown 21532 { 21533 static const GUID iid = { 0x0c8a1275,0x9b6b,0x4901,[ 0x87,0xad,0x70,0xdf,0x25,0xba,0xfa,0x6e ] }; 21534 extern(Windows): 21535 /// True if the loaded content is an error page. 21536 /+[ propget]+/ 21537 HRESULT get_IsErrorPage(/+[out, retval]+/ BOOL* isErrorPage); 21538 21539 /// The ID of the navigation. 21540 /+[ propget]+/ 21541 HRESULT get_NavigationId(/+[out, retval]+/ UINT64* navigationId); 21542 } 21543 21544 /// The caller implements this interface to receive the ContentLoading event. 21545 const GUID IID_ICoreWebView2ContentLoadingEventHandler = ICoreWebView2ContentLoadingEventHandler.iid; 21546 21547 interface ICoreWebView2ContentLoadingEventHandler : IUnknown 21548 { 21549 static const GUID iid = { 0x364471e7,0xf2be,0x4910,[ 0xbd,0xba,0xd7,0x20,0x77,0xd5,0x1c,0x4b ] }; 21550 extern(Windows): 21551 /// Called to provide the implementer with the event args for the 21552 /// corresponding event. 21553 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ ICoreWebView2ContentLoadingEventArgs args); 21554 } 21555 21556 /// Event args for the SourceChanged event. 21557 const GUID IID_ICoreWebView2SourceChangedEventArgs = ICoreWebView2SourceChangedEventArgs.iid; 21558 21559 interface ICoreWebView2SourceChangedEventArgs : IUnknown 21560 { 21561 static const GUID iid = { 0x31e0e545,0x1dba,0x4266,[ 0x89,0x14,0xf6,0x38,0x48,0xa1,0xf7,0xd7 ] }; 21562 extern(Windows): 21563 /// True if the page being navigated to is a new document. 21564 /+[ propget]+/ 21565 HRESULT get_IsNewDocument(/+[out, retval]+/ BOOL* isNewDocument); 21566 } 21567 21568 /// The caller implements this interface to receive the SourceChanged event. 21569 const GUID IID_ICoreWebView2SourceChangedEventHandler = ICoreWebView2SourceChangedEventHandler.iid; 21570 21571 interface ICoreWebView2SourceChangedEventHandler : IUnknown 21572 { 21573 static const GUID iid = { 0x3c067f9f,0x5388,0x4772,[ 0x8b,0x48,0x79,0xf7,0xef,0x1a,0xb3,0x7c ] }; 21574 extern(Windows): 21575 /// Called to provide the implementer with the event args for the 21576 /// corresponding event. 21577 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ ICoreWebView2SourceChangedEventArgs args); 21578 } 21579 21580 /// The caller implements this interface to receive the HistoryChanged event. 21581 const GUID IID_ICoreWebView2HistoryChangedEventHandler = ICoreWebView2HistoryChangedEventHandler.iid; 21582 21583 interface ICoreWebView2HistoryChangedEventHandler : IUnknown 21584 { 21585 static const GUID iid = { 0xc79a420c,0xefd9,0x4058,[ 0x92,0x95,0x3e,0x8b,0x4b,0xca,0xb6,0x45 ] }; 21586 extern(Windows): 21587 /// There are no event args and the args parameter will be null. 21588 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 21589 } 21590 21591 /// Event args for the ScriptDialogOpening event. 21592 const GUID IID_ICoreWebView2ScriptDialogOpeningEventArgs = ICoreWebView2ScriptDialogOpeningEventArgs.iid; 21593 21594 interface ICoreWebView2ScriptDialogOpeningEventArgs : IUnknown 21595 { 21596 static const GUID iid = { 0x7390bb70,0xabe0,0x4843,[ 0x95,0x29,0xf1,0x43,0xb3,0x1b,0x03,0xd6 ] }; 21597 extern(Windows): 21598 /// The URI of the page that requested the dialog box. 21599 /+[ propget]+/ 21600 HRESULT get_Uri(/+[out, retval]+/ LPWSTR* uri); 21601 21602 /// The kind of JavaScript dialog box. Accept, confirm, prompt, or 21603 /// beforeunload. 21604 /+[ propget]+/ 21605 HRESULT get_Kind(/+[out, retval]+/ COREWEBVIEW2_SCRIPT_DIALOG_KIND* kind); 21606 21607 /// The message of the dialog box. From JavaScript this is the first parameter 21608 /// passed to alert, confirm, and prompt and is empty for beforeunload. 21609 /+[ propget]+/ 21610 HRESULT get_Message(/+[out, retval]+/ LPWSTR* message); 21611 21612 /// The host may call this to respond with OK to confirm, prompt, and 21613 /// beforeunload dialogs or not call this method to indicate cancel. From 21614 /// JavaScript, this means that the confirm and beforeunload function returns 21615 /// true if Accept is called. And for the prompt function it returns the value 21616 /// of ResultText if Accept is called and returns false otherwise. 21617 HRESULT Accept(); 21618 21619 /// The second parameter passed to the JavaScript prompt dialog. This is the 21620 /// default value to use for the result of the prompt JavaScript function. 21621 /+[ propget]+/ 21622 HRESULT get_DefaultText(/+[out, retval]+/ LPWSTR* defaultText); 21623 21624 /// The return value from the JavaScript prompt function if Accept is called. 21625 /// This is ignored for dialog kinds other than prompt. If Accept is not 21626 /// called this value is ignored and false is returned from prompt. 21627 /+[ propget]+/ 21628 HRESULT get_ResultText(/+[out, retval]+/ LPWSTR* resultText); 21629 /// Set the ResultText property. 21630 /+[ propput]+/ 21631 HRESULT put_ResultText(in LPCWSTR resultText); 21632 21633 /// GetDeferral can be called to return an ICoreWebView2Deferral object. 21634 /// You can use this to complete the event at a later time. 21635 HRESULT GetDeferral(/+[out, retval]+/ ICoreWebView2Deferral * deferral); 21636 } 21637 21638 /// The caller implements this interface to receive the ScriptDialogOpening 21639 /// event. 21640 const GUID IID_ICoreWebView2ScriptDialogOpeningEventHandler = ICoreWebView2ScriptDialogOpeningEventHandler.iid; 21641 21642 interface ICoreWebView2ScriptDialogOpeningEventHandler : IUnknown 21643 { 21644 static const GUID iid = { 0xef381bf9,0xafa8,0x4e37,[ 0x91,0xc4,0x8a,0xc4,0x85,0x24,0xbd,0xfb ] }; 21645 extern(Windows): 21646 /// Called to provide the implementer with the event args for the 21647 /// corresponding event. 21648 HRESULT Invoke( 21649 /+[in]+/ ICoreWebView2 sender, 21650 /+[in]+/ ICoreWebView2ScriptDialogOpeningEventArgs args); 21651 } 21652 21653 /// Event args for the NavigationCompleted event. 21654 const GUID IID_ICoreWebView2NavigationCompletedEventArgs = ICoreWebView2NavigationCompletedEventArgs.iid; 21655 21656 interface ICoreWebView2NavigationCompletedEventArgs : IUnknown 21657 { 21658 static const GUID iid = { 0x30d68b7d,0x20d9,0x4752,[ 0xa9,0xca,0xec,0x84,0x48,0xfb,0xb5,0xc1 ] }; 21659 extern(Windows): 21660 /// True when the navigation is successful. This 21661 /// is false for a navigation that ended up in an error page (failures due to 21662 /// no network, DNS lookup failure, HTTP server responds with 4xx), but could 21663 /// also be false for additional scenarios such as window.stop() called on 21664 /// navigated page. 21665 /+[ propget]+/ 21666 HRESULT get_IsSuccess(/+[out, retval]+/ BOOL* isSuccess); 21667 21668 /// The error code if the navigation failed. 21669 /+[ propget]+/ 21670 HRESULT get_WebErrorStatus(/+[out, retval]+/ COREWEBVIEW2_WEB_ERROR_STATUS* 21671 webErrorStatus); 21672 21673 /// The ID of the navigation. 21674 /+[ propget]+/ 21675 HRESULT get_NavigationId(/+[out, retval]+/ UINT64* navigationId); 21676 } 21677 21678 /// The caller implements this interface to receive the NavigationCompleted 21679 /// event. 21680 const GUID IID_ICoreWebView2NavigationCompletedEventHandler = ICoreWebView2NavigationCompletedEventHandler.iid; 21681 21682 interface ICoreWebView2NavigationCompletedEventHandler : IUnknown 21683 { 21684 static const GUID iid = { 0xd33a35bf,0x1c49,0x4f98,[ 0x93,0xab,0x00,0x6e,0x05,0x33,0xfe,0x1c ] }; 21685 extern(Windows): 21686 /// Called to provide the implementer with the event args for the 21687 /// corresponding event. 21688 HRESULT Invoke( 21689 /+[in]+/ ICoreWebView2 sender, 21690 /+[in]+/ ICoreWebView2NavigationCompletedEventArgs args); 21691 } 21692 21693 /// Event args for the PermissionRequested event. 21694 const GUID IID_ICoreWebView2PermissionRequestedEventArgs = ICoreWebView2PermissionRequestedEventArgs.iid; 21695 21696 interface ICoreWebView2PermissionRequestedEventArgs : IUnknown 21697 { 21698 static const GUID iid = { 0x973ae2ef,0xff18,0x4894,[ 0x8f,0xb2,0x3c,0x75,0x8f,0x04,0x68,0x10 ] }; 21699 extern(Windows): 21700 /// The origin of the web content that requests the permission. 21701 /+[ propget]+/ 21702 HRESULT get_Uri(/+[out, retval]+/ LPWSTR* uri); 21703 21704 /// The type of the permission that is requested. 21705 /+[ propget]+/ 21706 HRESULT get_PermissionKind(/+[out, retval]+/ COREWEBVIEW2_PERMISSION_KIND* permissionKind); 21707 21708 /// True when the permission request was initiated through a user gesture. 21709 /// Note that being initiated through a user gesture doesn't mean that user 21710 /// intended to access the associated resource. 21711 /+[ propget]+/ 21712 HRESULT get_IsUserInitiated(/+[out, retval]+/ BOOL* isUserInitiated); 21713 21714 /// The status of a permission request, i.e. whether the request is granted. 21715 /// Default value is COREWEBVIEW2_PERMISSION_STATE_DEFAULT. 21716 /+[ propget]+/ 21717 HRESULT get_State(/+[out, retval]+/ COREWEBVIEW2_PERMISSION_STATE* state); 21718 /// Set the State property. 21719 /+[ propput]+/ 21720 HRESULT put_State(in COREWEBVIEW2_PERMISSION_STATE state); 21721 21722 /// GetDeferral can be called to return an ICoreWebView2Deferral object. 21723 /// Developer can use the deferral object to make the permission decision 21724 /// at a later time. 21725 HRESULT GetDeferral(/+[out, retval]+/ ICoreWebView2Deferral * deferral); 21726 } 21727 21728 /// The caller implements this interface to receive the PermissionRequested 21729 /// event. 21730 const GUID IID_ICoreWebView2PermissionRequestedEventHandler = ICoreWebView2PermissionRequestedEventHandler.iid; 21731 21732 interface ICoreWebView2PermissionRequestedEventHandler : IUnknown 21733 { 21734 static const GUID iid = { 0x15e1c6a3,0xc72a,0x4df3,[ 0x91,0xd7,0xd0,0x97,0xfb,0xec,0x6b,0xfd ] }; 21735 extern(Windows): 21736 /// Called to provide the implementer with the event args for the 21737 /// corresponding event. 21738 HRESULT Invoke( 21739 /+[in]+/ ICoreWebView2 sender, 21740 /+[in]+/ ICoreWebView2PermissionRequestedEventArgs args); 21741 } 21742 21743 /// The caller implements this interface to receive the result of the 21744 /// AddScriptToExecuteOnDocumentCreated method. 21745 const GUID IID_ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler = ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler.iid; 21746 21747 interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler : IUnknown 21748 { 21749 static const GUID iid = { 0xb99369f3,0x9b11,0x47b5,[ 0xbc,0x6f,0x8e,0x78,0x95,0xfc,0xea,0x17 ] }; 21750 extern(Windows): 21751 /// Called to provide the implementer with the completion status and result 21752 /// of the corresponding asynchronous method call. 21753 HRESULT Invoke(in HRESULT errorCode, in LPCWSTR id); 21754 } 21755 21756 /// The caller implements this interface to receive the result of the 21757 /// ExecuteScript method. 21758 const GUID IID_ICoreWebView2ExecuteScriptCompletedHandler = ICoreWebView2ExecuteScriptCompletedHandler.iid; 21759 21760 interface ICoreWebView2ExecuteScriptCompletedHandler : IUnknown 21761 { 21762 static const GUID iid = { 0x49511172,0xcc67,0x4bca,[ 0x99,0x23,0x13,0x71,0x12,0xf4,0xc4,0xcc ] }; 21763 extern(Windows): 21764 /// Called to provide the implementer with the completion status and result 21765 /// of the corresponding asynchronous method call. 21766 HRESULT Invoke(in HRESULT errorCode, in LPCWSTR resultObjectAsJson); 21767 } 21768 21769 /// Event args for the WebResourceRequested event. 21770 const GUID IID_ICoreWebView2WebResourceRequestedEventArgs = ICoreWebView2WebResourceRequestedEventArgs.iid; 21771 21772 interface ICoreWebView2WebResourceRequestedEventArgs : IUnknown 21773 { 21774 static const GUID iid = { 0x453e667f,0x12c7,0x49d4,[ 0xbe,0x6d,0xdd,0xbe,0x79,0x56,0xf5,0x7a ] }; 21775 extern(Windows): 21776 /// The Web resource request. The request object may be missing some headers 21777 /// that are added by network stack later on. 21778 /+[ propget]+/ 21779 HRESULT get_Request(/+[out, retval]+/ ICoreWebView2WebResourceRequest * request); 21780 21781 /// A placeholder for the web resource response object. If this object is set, the 21782 /// web resource request will be completed with this response. 21783 /+[ propget]+/ 21784 HRESULT get_Response(/+[out, retval]+/ ICoreWebView2WebResourceResponse * response); 21785 /// Set the Response property. An empty Web resource response object can be 21786 /// created with CreateWebResourceResponse and then modified to construct the response. 21787 /+[ propput]+/ 21788 HRESULT put_Response(/+[in]+/ ICoreWebView2WebResourceResponse response); 21789 21790 /// Obtain an ICoreWebView2Deferral object and put the event into a deferred state. 21791 /// You can use the ICoreWebView2Deferral object to complete the request at a 21792 /// later time. 21793 HRESULT GetDeferral(/+[out, retval]+/ ICoreWebView2Deferral * deferral); 21794 21795 /// The web resource request context. 21796 /+[ propget]+/ 21797 HRESULT get_ResourceContext(/+[out, retval]+/ COREWEBVIEW2_WEB_RESOURCE_CONTEXT* context); 21798 } 21799 21800 /// Fires when a URL request (through network, file etc.) is made in the webview 21801 /// for a Web resource matching resource context filter and URL specified in 21802 /// AddWebResourceRequestedFilter. 21803 /// The host can view and modify the request or provide a response in a similar 21804 /// pattern to HTTP, in which case the request immediately completed. 21805 /// This may not contain any request headers that are added by the network 21806 /// stack, such as Authorization headers. 21807 const GUID IID_ICoreWebView2WebResourceRequestedEventHandler = ICoreWebView2WebResourceRequestedEventHandler.iid; 21808 21809 interface ICoreWebView2WebResourceRequestedEventHandler : IUnknown 21810 { 21811 static const GUID iid = { 0xab00b74c,0x15f1,0x4646,[ 0x80,0xe8,0xe7,0x63,0x41,0xd2,0x5d,0x71 ] }; 21812 extern(Windows): 21813 /// Called to provide the implementer with the event args for the 21814 /// corresponding event. 21815 HRESULT Invoke( 21816 /+[in]+/ ICoreWebView2 sender, 21817 /+[in]+/ ICoreWebView2WebResourceRequestedEventArgs args); 21818 } 21819 21820 /// The caller implements this method to receive the result of the 21821 /// CapturePreview method. The result is written to the stream provided in 21822 /// the CapturePreview method call. 21823 const GUID IID_ICoreWebView2CapturePreviewCompletedHandler = ICoreWebView2CapturePreviewCompletedHandler.iid; 21824 21825 interface ICoreWebView2CapturePreviewCompletedHandler : IUnknown 21826 { 21827 static const GUID iid = { 0x697e05e9,0x3d8f,0x45fa,[ 0x96,0xf4,0x8f,0xfe,0x1e,0xde,0xda,0xf5 ] }; 21828 extern(Windows): 21829 /// Called to provide the implementer with the completion status 21830 /// of the corresponding asynchronous method call. 21831 HRESULT Invoke(in HRESULT errorCode); 21832 } 21833 21834 /// The caller implements this method to receive the GotFocus and LostFocus 21835 /// events. There are no event args for this event. 21836 const GUID IID_ICoreWebView2FocusChangedEventHandler = ICoreWebView2FocusChangedEventHandler.iid; 21837 21838 interface ICoreWebView2FocusChangedEventHandler : IUnknown 21839 { 21840 static const GUID iid = { 0x05ea24bd,0x6452,0x4926,[ 0x90,0x14,0x4b,0x82,0xb4,0x98,0x13,0x5d ] }; 21841 extern(Windows): 21842 /// Called to provide the implementer with the event args for the 21843 /// corresponding event. There are no event args and the args 21844 /// parameter will be null. 21845 HRESULT Invoke( 21846 /+[in]+/ ICoreWebView2Controller sender, 21847 /+[in]+/ IUnknown args); 21848 } 21849 21850 /// Event args for the MoveFocusRequested event. 21851 const GUID IID_ICoreWebView2MoveFocusRequestedEventArgs = ICoreWebView2MoveFocusRequestedEventArgs.iid; 21852 21853 interface ICoreWebView2MoveFocusRequestedEventArgs : IUnknown 21854 { 21855 static const GUID iid = { 0x2d6aa13b,0x3839,0x4a15,[ 0x92,0xfc,0xd8,0x8b,0x3c,0x0d,0x9c,0x9d ] }; 21856 extern(Windows): 21857 /// The reason for WebView to fire the MoveFocus Requested event. 21858 /+[ propget]+/ 21859 HRESULT get_Reason(/+[out, retval]+/ COREWEBVIEW2_MOVE_FOCUS_REASON* reason); 21860 21861 /// Indicate whether the event has been handled by the app. 21862 /// If the app has moved the focus to its desired location, it should set 21863 /// Handled property to TRUE. 21864 /// When Handled property is false after the event handler returns, default 21865 /// action will be taken. The default action is to try to find the next tab 21866 /// stop child window in the app and try to move focus to that window. If 21867 /// there is no other such window to move focus to, focus will be cycled 21868 /// within the WebView's web content. 21869 /+[ propget]+/ 21870 HRESULT get_Handled(/+[out, retval]+/ BOOL* value); 21871 /// Set the Handled property. 21872 /+[ propput]+/ 21873 HRESULT put_Handled(in BOOL value); 21874 } 21875 21876 /// The caller implements this method to receive the MoveFocusRequested event. 21877 const GUID IID_ICoreWebView2MoveFocusRequestedEventHandler = ICoreWebView2MoveFocusRequestedEventHandler.iid; 21878 21879 interface ICoreWebView2MoveFocusRequestedEventHandler : IUnknown 21880 { 21881 static const GUID iid = { 0x69035451,0x6dc7,0x4cb8,[ 0x9b,0xce,0xb2,0xbd,0x70,0xad,0x28,0x9f ] }; 21882 extern(Windows): 21883 /// Called to provide the implementer with the event args for the 21884 /// corresponding event. 21885 HRESULT Invoke( 21886 /+[in]+/ ICoreWebView2Controller sender, 21887 /+[in]+/ ICoreWebView2MoveFocusRequestedEventArgs args); 21888 } 21889 21890 /// Event args for the WebMessageReceived event. 21891 const GUID IID_ICoreWebView2WebMessageReceivedEventArgs = ICoreWebView2WebMessageReceivedEventArgs.iid; 21892 21893 interface ICoreWebView2WebMessageReceivedEventArgs : IUnknown 21894 { 21895 static const GUID iid = { 0x0f99a40c,0xe962,0x4207,[ 0x9e,0x92,0xe3,0xd5,0x42,0xef,0xf8,0x49 ] }; 21896 extern(Windows): 21897 /// The URI of the document that sent this web message. 21898 /+[ propget]+/ 21899 HRESULT get_Source(/+[out, retval]+/ LPWSTR* source); 21900 21901 /// The message posted from the WebView content to the host converted to a 21902 /// JSON string. Use this to communicate via JavaScript objects. 21903 /// 21904 /// For example the following postMessage calls result in the 21905 /// following WebMessageAsJson values: 21906 /// 21907 /// ``` 21908 /// postMessage({'a': 'b'}) L"{\"a\": \"b\"}" 21909 /// postMessage(1.2) L"1.2" 21910 /// postMessage('example') L"\"example\"" 21911 /// ``` 21912 /+[ propget]+/ 21913 HRESULT get_WebMessageAsJson(/+[out, retval]+/ LPWSTR* webMessageAsJson); 21914 21915 /// If the message posted from the WebView content to the host is a 21916 /// string type, this method will return the value of that string. If the 21917 /// message posted is some other kind of JavaScript type this method will fail 21918 /// with E_INVALIDARG. Use this to communicate via simple strings. 21919 /// 21920 /// For example the following postMessage calls result in the 21921 /// following WebMessageAsString values: 21922 /// 21923 /// ``` 21924 /// postMessage({'a': 'b'}) E_INVALIDARG 21925 /// postMessage(1.2) E_INVALIDARG 21926 /// postMessage('example') L"example" 21927 /// ``` 21928 HRESULT TryGetWebMessageAsString(/+[out, retval]+/ LPWSTR* webMessageAsString); 21929 } 21930 21931 /// The caller implements this interface to receive the WebMessageReceived 21932 /// event. 21933 const GUID IID_ICoreWebView2WebMessageReceivedEventHandler = ICoreWebView2WebMessageReceivedEventHandler.iid; 21934 21935 interface ICoreWebView2WebMessageReceivedEventHandler : IUnknown 21936 { 21937 static const GUID iid = { 0x57213f19,0x00e6,0x49fa,[ 0x8e,0x07,0x89,0x8e,0xa0,0x1e,0xcb,0xd2 ] }; 21938 extern(Windows): 21939 /// Called to provide the implementer with the event args for the 21940 /// corresponding event. 21941 HRESULT Invoke( 21942 /+[in]+/ ICoreWebView2 sender, 21943 /+[in]+/ ICoreWebView2WebMessageReceivedEventArgs args); 21944 } 21945 21946 /// Event args for the DevToolsProtocolEventReceived event. 21947 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventArgs = ICoreWebView2DevToolsProtocolEventReceivedEventArgs.iid; 21948 21949 interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs : IUnknown 21950 { 21951 static const GUID iid = { 0x653c2959,0xbb3a,0x4377,[ 0x86,0x32,0xb5,0x8a,0xda,0x4e,0x66,0xc4 ] }; 21952 extern(Windows): 21953 /// The parameter object of the corresponding DevToolsProtocol event 21954 /// represented as a JSON string. 21955 /+[ propget]+/ 21956 HRESULT get_ParameterObjectAsJson(/+[out, retval]+/ LPWSTR* 21957 parameterObjectAsJson); 21958 } 21959 21960 /// The caller implements this interface to receive 21961 /// DevToolsProtocolEventReceived events from the WebView. 21962 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventHandler = ICoreWebView2DevToolsProtocolEventReceivedEventHandler.iid; 21963 21964 interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler : IUnknown 21965 { 21966 static const GUID iid = { 0xe2fda4be,0x5456,0x406c,[ 0xa2,0x61,0x3d,0x45,0x21,0x38,0x36,0x2c ] }; 21967 extern(Windows): 21968 /// Called to provide the implementer with the event args for the 21969 /// corresponding event. 21970 HRESULT Invoke( 21971 /+[in]+/ ICoreWebView2 sender, 21972 /+[in]+/ ICoreWebView2DevToolsProtocolEventReceivedEventArgs args); 21973 } 21974 21975 /// The caller implements this interface to receive CallDevToolsProtocolMethod 21976 /// completion results. 21977 const GUID IID_ICoreWebView2CallDevToolsProtocolMethodCompletedHandler = ICoreWebView2CallDevToolsProtocolMethodCompletedHandler.iid; 21978 21979 interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler : IUnknown 21980 { 21981 static const GUID iid = { 0x5c4889f0,0x5ef6,0x4c5a,[ 0x95,0x2c,0xd8,0xf1,0xb9,0x2d,0x05,0x74 ] }; 21982 extern(Windows): 21983 /// Called to provide the implementer with the completion status and result 21984 /// of the corresponding asynchronous method call. 21985 HRESULT Invoke(in HRESULT errorCode, in LPCWSTR returnObjectAsJson); 21986 } 21987 21988 /// The caller implements this interface to receive the CoreWebView2Controller created 21989 /// via CreateCoreWebView2Controller. 21990 const GUID IID_ICoreWebView2CreateCoreWebView2ControllerCompletedHandler = ICoreWebView2CreateCoreWebView2ControllerCompletedHandler.iid; 21991 21992 interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler : IUnknown 21993 { 21994 static const GUID iid = { 0x6c4819f3,0xc9b7,0x4260,[ 0x81,0x27,0xc9,0xf5,0xbd,0xe7,0xf6,0x8c ] }; 21995 extern(Windows): 21996 /// Called to provide the implementer with the completion status and result 21997 /// of the corresponding asynchronous method call. 21998 HRESULT Invoke(HRESULT errorCode, ICoreWebView2Controller createdController); 21999 } 22000 22001 /// Event args for the NewWindowRequested event. The event is fired when content 22002 /// inside webview requested to a open a new window (through window.open() and so on.) 22003 const GUID IID_ICoreWebView2NewWindowRequestedEventArgs = ICoreWebView2NewWindowRequestedEventArgs.iid; 22004 22005 interface ICoreWebView2NewWindowRequestedEventArgs : IUnknown 22006 { 22007 static const GUID iid = { 0x34acb11c,0xfc37,0x4418,[ 0x91,0x32,0xf9,0xc2,0x1d,0x1e,0xaf,0xb9 ] }; 22008 extern(Windows): 22009 /// The target uri of the NewWindowRequest. 22010 /+[ propget]+/ 22011 HRESULT get_Uri(/+[out, retval]+/ LPWSTR* uri); 22012 22013 /// Sets a WebView as a result of the NewWindowRequest. The target 22014 /// WebView should not be navigated. If the NewWindow is set, its top level 22015 /// window will return as the opened WindowProxy. 22016 /+[ propput]+/ 22017 HRESULT put_NewWindow(/+[in]+/ ICoreWebView2 newWindow); 22018 /// Gets the new window. 22019 /+[ propget]+/ 22020 HRESULT get_NewWindow(/+[out, retval]+/ ICoreWebView2 * newWindow); 22021 22022 /// Sets whether the NewWindowRequestedEvent is handled by host. If this is false 22023 /// and no NewWindow is set, the WebView will open a popup 22024 /// window and it will be returned as opened WindowProxy. 22025 /// If set to true and no NewWindow is set for a window.open call, the opened 22026 /// WindowProxy will be for an dummy window object and no window will load. 22027 /// Default is false. 22028 /+[ propput]+/ 22029 HRESULT put_Handled(in BOOL handled); 22030 /// Gets whether the NewWindowRequestedEvent is handled by host. 22031 /+[ propget]+/ 22032 HRESULT get_Handled(/+[out, retval]+/ BOOL* handled); 22033 22034 /// IsUserInitiated is true when the new window request was initiated through 22035 /// a user gesture such as clicking an anchor tag with target. The Edge 22036 /// popup blocker is disabled for WebView so the app can use this flag to 22037 /// block non-user initiated popups. 22038 /+[ propget]+/ 22039 HRESULT get_IsUserInitiated(/+[out, retval]+/ BOOL* isUserInitiated); 22040 22041 /// Obtain an ICoreWebView2Deferral object and put the event into a deferred state. 22042 /// You can use the ICoreWebView2Deferral object to complete the window open 22043 /// request at a later time. 22044 /// While this event is deferred the opener window will be returned a WindowProxy 22045 /// to an unnavigated window, which will navigate when the deferral is complete. 22046 HRESULT GetDeferral(/+[out, retval]+/ ICoreWebView2Deferral * deferral); 22047 22048 /// Window features specified by the window.open call. 22049 /// These features can be considered for positioning and sizing of 22050 /// new webview windows. 22051 /+[ propget]+/ 22052 HRESULT get_WindowFeatures(/+[out, retval]+/ ICoreWebView2WindowFeatures * value); 22053 } 22054 22055 /// Window features for a WebView popup window. These fields match the 22056 /// 'windowFeatures' passed to window.open as specified in 22057 /// https://developer.mozilla.org/en-US/docs/Web/API/Window/open#Window_features 22058 /// There is no requirement for you to respect these values. If your app doesn't 22059 /// have corresponding UI features, for example no toolbar, or if all webviews 22060 /// are opened in tabs and so cannot have distinct size or positions, then your 22061 /// app cannot respect these values. You may want to respect values but perhaps 22062 /// only some can apply to your app's UI. Accordingly, it is fine to respect 22063 /// all, some, or none of these properties as appropriate based on your app. 22064 /// For all numeric properties, if the value when passed to window.open is 22065 /// outside the range of an unsigned 32bit int, the value will be mod of the max 22066 /// of unsigned 32bit integer. If the value cannot be parsed as an integer it 22067 /// will be considered 0. If the value is a floating point value, it will be 22068 /// rounded down to an integer. 22069 const GUID IID_ICoreWebView2WindowFeatures = ICoreWebView2WindowFeatures.iid; 22070 22071 interface ICoreWebView2WindowFeatures : IUnknown 22072 { 22073 static const GUID iid = { 0x5eaf559f,0xb46e,0x4397,[ 0x88,0x60,0xe4,0x22,0xf2,0x87,0xff,0x1e ] }; 22074 extern(Windows): 22075 /// True if the Left and Top properties were specified. False if at least one 22076 /// was not specified. 22077 /+[ propget]+/ 22078 HRESULT get_HasPosition(/+[out, retval]+/ BOOL* value); 22079 /// True if the Width and Height properties were specified. False if at least 22080 /// one was not specified. 22081 /+[ propget]+/ 22082 HRESULT get_HasSize(/+[out, retval]+/ BOOL* value); 22083 /// The left position of the window. This will fail if HasPosition is false. 22084 /+[ propget]+/ 22085 HRESULT get_Left(/+[out, retval]+/ UINT32* value); 22086 /// The top position of the window. This will fail if HasPosition is false. 22087 /+[ propget]+/ 22088 HRESULT get_Top(/+[out, retval]+/ UINT32* value); 22089 /// The height of the window. This will fail if HasSize is false. 22090 /+[ propget]+/ 22091 HRESULT get_Height(/+[out, retval]+/ UINT32* value); 22092 /// The width of the window. This will fail if HasSize is false. 22093 /+[ propget]+/ 22094 HRESULT get_Width(/+[out, retval]+/ UINT32* value); 22095 /// Whether or not to display the menu bar. 22096 /+[ propget]+/ 22097 HRESULT get_ShouldDisplayMenuBar(/+[out, retval]+/ BOOL* value); 22098 /// Whether or not to display a status bar. 22099 /+[ propget]+/ 22100 HRESULT get_ShouldDisplayStatus(/+[out, retval]+/ BOOL* value); 22101 /// Whether or not to display a toolbar. 22102 /+[ propget]+/ 22103 HRESULT get_ShouldDisplayToolbar(/+[out, retval]+/ BOOL* value); 22104 /// Whether or not to display scroll bars. 22105 /+[ propget]+/ 22106 HRESULT get_ShouldDisplayScrollBars(/+[out, retval]+/ BOOL* value); 22107 } 22108 22109 /// The caller implements this interface to receive NewWindowRequested 22110 /// events. 22111 const GUID IID_ICoreWebView2NewWindowRequestedEventHandler = ICoreWebView2NewWindowRequestedEventHandler.iid; 22112 22113 interface ICoreWebView2NewWindowRequestedEventHandler : IUnknown 22114 { 22115 static const GUID iid = { 0xd4c185fe,0xc81c,0x4989,[ 0x97,0xaf,0x2d,0x3f,0xa7,0xab,0x56,0x51 ] }; 22116 extern(Windows): 22117 /// Called to provide the implementer with the event args for the 22118 /// corresponding event. 22119 HRESULT Invoke( 22120 /+[in]+/ ICoreWebView2 sender, 22121 /+[in]+/ ICoreWebView2NewWindowRequestedEventArgs args); 22122 } 22123 22124 /// The caller implements this interface to receive DocumentTitleChanged 22125 /// events. Use the DocumentTitle property to get the modified 22126 /// title. 22127 const GUID IID_ICoreWebView2DocumentTitleChangedEventHandler = ICoreWebView2DocumentTitleChangedEventHandler.iid; 22128 22129 interface ICoreWebView2DocumentTitleChangedEventHandler : IUnknown 22130 { 22131 static const GUID iid = { 0xf5f2b923,0x953e,0x4042,[ 0x9f,0x95,0xf3,0xa1,0x18,0xe1,0xaf,0xd4 ] }; 22132 extern(Windows): 22133 /// Called to provide the implementer with the event args for the 22134 /// corresponding event. There are no event args and the args 22135 /// parameter will be null. 22136 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 22137 } 22138 22139 /// Event args for the AcceleratorKeyPressed event. 22140 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventArgs = ICoreWebView2AcceleratorKeyPressedEventArgs.iid; 22141 22142 interface ICoreWebView2AcceleratorKeyPressedEventArgs : IUnknown 22143 { 22144 static const GUID iid = { 0x9f760f8a,0xfb79,0x42be,[ 0x99,0x90,0x7b,0x56,0x90,0x0f,0xa9,0xc7 ] }; 22145 extern(Windows): 22146 /// The key event type that caused the event to be fired. 22147 /+[ propget]+/ 22148 HRESULT get_KeyEventKind(/+[out, retval]+/ COREWEBVIEW2_KEY_EVENT_KIND* keyEventKind); 22149 /// The Win32 virtual key code of the key that was pressed or released. 22150 /// This will be one of the Win32 virtual key constants such as VK_RETURN or 22151 /// an (uppercase) ASCII value such as 'A'. You can check whether Ctrl or Alt 22152 /// are pressed by calling GetKeyState(VK_CONTROL) or GetKeyState(VK_MENU). 22153 /+[ propget]+/ 22154 HRESULT get_VirtualKey(/+[out, retval]+/ UINT* virtualKey); 22155 /// The LPARAM value that accompanied the window message. See the 22156 /// documentation for the WM_KEYDOWN and WM_KEYUP messages. 22157 /+[ propget]+/ 22158 HRESULT get_KeyEventLParam(/+[out, retval]+/ INT* lParam); 22159 /// A structure representing the information passed in the LPARAM of the 22160 /// window message. 22161 /+[ propget]+/ 22162 HRESULT get_PhysicalKeyStatus( 22163 /+[out, retval]+/ COREWEBVIEW2_PHYSICAL_KEY_STATUS* physicalKeyStatus); 22164 /// During AcceleratorKeyPressedEvent handler invocation the WebView is blocked 22165 /// waiting for the decision of if the accelerator will be handled by the host 22166 /// or not. If the Handled property is set to TRUE then this will 22167 /// prevent the WebView from performing the default action for this 22168 /// accelerator key. Otherwise the WebView will perform the default action for 22169 /// the accelerator key. 22170 /+[ propget]+/ 22171 HRESULT get_Handled(/+[out, retval]+/ BOOL* handled); 22172 /// Sets the Handled property. 22173 /+[ propput]+/ 22174 HRESULT put_Handled(in BOOL handled); 22175 } 22176 22177 /// The caller implements this interface to receive the AcceleratorKeyPressed 22178 /// event. 22179 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventHandler = ICoreWebView2AcceleratorKeyPressedEventHandler.iid; 22180 22181 interface ICoreWebView2AcceleratorKeyPressedEventHandler : IUnknown 22182 { 22183 static const GUID iid = { 0xb29c7e28,0xfa79,0x41a8,[ 0x8e,0x44,0x65,0x81,0x1c,0x76,0xdc,0xb2 ] }; 22184 extern(Windows): 22185 /// Called to provide the implementer with the event args for the 22186 /// corresponding event. 22187 HRESULT Invoke( 22188 /+[in]+/ ICoreWebView2Controller sender, 22189 /+[in]+/ ICoreWebView2AcceleratorKeyPressedEventArgs args); 22190 } 22191 22192 /// The caller implements this interface to receive NewBrowserVersionAvailable events. 22193 const GUID IID_ICoreWebView2NewBrowserVersionAvailableEventHandler = ICoreWebView2NewBrowserVersionAvailableEventHandler.iid; 22194 22195 interface ICoreWebView2NewBrowserVersionAvailableEventHandler : IUnknown 22196 { 22197 static const GUID iid = { 0xf9a2976e,0xd34e,0x44fc,[ 0xad,0xee,0x81,0xb6,0xb5,0x7c,0xa9,0x14 ] }; 22198 extern(Windows): 22199 /// Called to provide the implementer with the event args for the 22200 /// corresponding event. 22201 HRESULT Invoke(/+[in]+/ ICoreWebView2Environment webviewEnvironment, 22202 /+[in]+/ IUnknown args); 22203 } 22204 22205 /// The caller implements this method to receive the 22206 /// ContainsFullScreenElementChanged events. There are no event args for this 22207 /// event. 22208 const GUID IID_ICoreWebView2ContainsFullScreenElementChangedEventHandler = ICoreWebView2ContainsFullScreenElementChangedEventHandler.iid; 22209 22210 interface ICoreWebView2ContainsFullScreenElementChangedEventHandler : IUnknown 22211 { 22212 static const GUID iid = { 0xe45d98b1,0xafef,0x45be,[ 0x8b,0xaf,0x6c,0x77,0x28,0x86,0x7f,0x73 ] }; 22213 extern(Windows): 22214 /// Called to provide the implementer with the event args for the 22215 /// corresponding event. There are no event args and the args 22216 /// parameter will be null. 22217 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 22218 } 22219 22220 /// The caller implements this interface to receive NewWindowRequested 22221 /// events. 22222 const GUID IID_ICoreWebView2WindowCloseRequestedEventHandler = ICoreWebView2WindowCloseRequestedEventHandler.iid; 22223 22224 interface ICoreWebView2WindowCloseRequestedEventHandler : IUnknown 22225 { 22226 static const GUID iid = { 0x5c19e9e0,0x092f,0x486b,[ 0xaf,0xfa,0xca,0x82,0x31,0x91,0x30,0x39 ] }; 22227 extern(Windows): 22228 /// Called to provide the implementer with the event args for the 22229 /// corresponding event. There are no event args and the args 22230 /// parameter will be null. 22231 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 22232 } 22233 22234 /// This represents the WebView2 Environment. WebViews created from an 22235 /// environment run on the browser process specified with environment parameters 22236 /// and objects created from an environment should be used in the same environment. 22237 /// Using it in different environments are not guaranteed to be compatible and may fail. 22238 const GUID IID_ICoreWebView2Environment = ICoreWebView2Environment.iid; 22239 22240 interface ICoreWebView2Environment : IUnknown 22241 { 22242 static const GUID iid = { 0xb96d755e,0x0319,0x4e92,[ 0xa2,0x96,0x23,0x43,0x6f,0x46,0xa1,0xfc ] }; 22243 extern(Windows): 22244 /// Asynchronously create a new WebView. 22245 /// 22246 /// parentWindow is the HWND in which the WebView should be displayed and 22247 /// from which receive input. The WebView will add a child window to the 22248 /// provided window during WebView creation. Z-order and other things impacted 22249 /// by sibling window order will be affected accordingly. 22250 /// 22251 /// It is recommended that the application set Application User Model ID for 22252 /// the process or the application window. If none is set, during WebView 22253 /// creation a generated Application User Model ID is set to root window of 22254 /// parentWindow. 22255 /// \snippet AppWindow.cpp CreateCoreWebView2Controller 22256 /// 22257 /// It is recommended that the application handles restart manager messages 22258 /// so that it can be restarted gracefully in the case when the app is using 22259 /// Edge for WebView from a certain installation and that installation is being 22260 /// uninstalled. For example, if a user installs Edge from Dev channel and 22261 /// opts to use Edge from that channel for testing the app, and then uninstalls 22262 /// Edge from that channel without closing the app, the app will be restarted 22263 /// to allow uninstallation of the dev channel to succeed. 22264 /// \snippet AppWindow.cpp RestartManager 22265 /// 22266 /// When the application retries CreateCoreWebView2Controller upon failure, it is 22267 /// recommended that the application restarts from creating a new WebView2 22268 /// Environment. If an Edge update happens, the version associated with a WebView2 22269 /// Environment could have been removed and causing the object to no longer work. 22270 /// Creating a new WebView2 Environment will work as it uses the latest version. 22271 /// 22272 /// WebView creation will fail if there is already a running instance using the same 22273 /// user data folder, and the Environment objects have different EnvironmentOptions. 22274 /// For example, if there is already a WebView created with one language, trying to 22275 /// create a WebView with a different language using the same user data folder will 22276 /// fail. 22277 HRESULT CreateCoreWebView2Controller( 22278 HWND parentWindow, 22279 ICoreWebView2CreateCoreWebView2ControllerCompletedHandler handler); 22280 22281 /// Create a new web resource response object. The headers is the 22282 /// raw response header string delimited by newline. It's also possible to 22283 /// create this object with null headers string and then use the 22284 /// ICoreWebView2HttpResponseHeaders to construct the headers line by line. 22285 /// For information on other parameters see ICoreWebView2WebResourceResponse. 22286 /// 22287 /// \snippet SettingsComponent.cpp WebResourceRequested 22288 HRESULT CreateWebResourceResponse( 22289 in IStream* content, 22290 in int statusCode, 22291 in LPCWSTR reasonPhrase, 22292 in LPCWSTR headers, 22293 /+[out, retval]+/ ICoreWebView2WebResourceResponse * response); 22294 22295 /// The browser version info of the current ICoreWebView2Environment, 22296 /// including channel name if it is not the stable channel. 22297 /// This matches the format of the 22298 /// GetAvailableCoreWebView2BrowserVersionString API. 22299 /// Channel names are 'beta', 'dev', and 'canary'. 22300 /// 22301 /// \snippet AppWindow.cpp GetBrowserVersionString 22302 /+[ propget]+/ 22303 HRESULT get_BrowserVersionString(/+[out, retval]+/ LPWSTR* versionInfo); 22304 22305 /// Add an event handler for the NewBrowserVersionAvailable event. 22306 /// NewBrowserVersionAvailable fires when a newer version of the 22307 /// Edge browser is installed and available for use via WebView2. 22308 /// To use the newer version of the browser you must create a new 22309 /// environment and WebView. 22310 /// This event will only be fired for new version from the same Edge channel 22311 /// that the code is running from. When not running with installed Edge, 22312 /// no event will be fired. 22313 /// 22314 /// Because a user data folder can only be used by one browser process at 22315 /// a time, if you want to use the same user data folder in the WebViews 22316 /// using the new version of the browser, 22317 /// you must close the environment and WebViews that are using the older 22318 /// version of the browser first. Or simply prompt the user to restart the 22319 /// app. 22320 /// 22321 /// \snippet AppWindow.cpp NewBrowserVersionAvailable 22322 /// 22323 HRESULT add_NewBrowserVersionAvailable( 22324 /+[in]+/ ICoreWebView2NewBrowserVersionAvailableEventHandler eventHandler, 22325 /+[out]+/ EventRegistrationToken* token); 22326 22327 /// Remove an event handler previously added with add_NewBrowserVersionAvailable. 22328 HRESULT remove_NewBrowserVersionAvailable( 22329 in EventRegistrationToken token); 22330 } 22331 22332 /// Options used to create WebView2 Environment. 22333 /// 22334 /// \snippet AppWindow.cpp CreateCoreWebView2EnvironmentWithOptions 22335 /// 22336 const GUID IID_ICoreWebView2EnvironmentOptions = ICoreWebView2EnvironmentOptions.iid; 22337 22338 interface ICoreWebView2EnvironmentOptions : IUnknown 22339 { 22340 static const GUID iid = { 0x2fde08a8,0x1e9a,0x4766,[ 0x8c,0x05,0x95,0xa9,0xce,0xb9,0xd1,0xc5 ] }; 22341 extern(Windows): 22342 /// AdditionalBrowserArguments can be specified to change the behavior of the 22343 /// WebView. These will be passed to the browser process as part of 22344 /// the command line. See 22345 /// [Run Chromium with Flags](https://aka.ms/RunChromiumWithFlags) 22346 /// for more information about command line switches to browser 22347 /// process. If the app is launched with a command line switch 22348 /// `--edge-webview-switches=xxx` the value of that switch (xxx in 22349 /// the above example) will also be appended to the browser 22350 /// process command line. Certain switches like `--user-data-dir` are 22351 /// internal and important to WebView. Those switches will be 22352 /// ignored even if specified. If the same switches are specified 22353 /// multiple times, the last one wins. There is no attempt to 22354 /// merge the different values of the same switch, except for disabled 22355 /// and enabled features. The features specified by `--enable-features` 22356 /// and `--disable-features` will be merged with simple logic: the features 22357 /// will be the union of the specified features and built-in features, and if 22358 /// a feature is disabled, it will be removed from the enabled features list. 22359 /// App process's command line `--edge-webview-switches` value are processed 22360 /// after the additionalBrowserArguments parameter is processed. Certain 22361 /// features are disabled internally and can't be enabled. 22362 /// If parsing failed for the specified switches, they will be 22363 /// ignored. Default is to run browser process with no extra flags. 22364 /+[ propget]+/ 22365 HRESULT get_AdditionalBrowserArguments(/+[out, retval]+/ LPWSTR* value); 22366 /// Set the AdditionalBrowserArguments property. 22367 /+[ propput]+/ 22368 HRESULT put_AdditionalBrowserArguments(in LPCWSTR value); 22369 22370 /// The default language that WebView will run with. It applies to browser UIs 22371 /// like context menu and dialogs. It also applies to the accept-languages 22372 /// HTTP header that WebView sends to web sites. 22373 /// It is in the format of `language[-country]` where `language` is the 2 letter 22374 /// code from ISO 639 and `country` is the 2 letter code from ISO 3166. 22375 /+[ propget]+/ 22376 HRESULT get_Language(/+[out, retval]+/ LPWSTR* value); 22377 /// Set the Language property. 22378 /+[ propput]+/ 22379 HRESULT put_Language(in LPCWSTR value); 22380 22381 /// The version of the Edge WebView2 Runtime binaries required to be 22382 /// compatible with the calling application. This defaults to the Edge 22383 /// WebView2 Runtime version 22384 /// that corresponds with the version of the SDK the application is using. 22385 /// The format of this value is the same as the format of the 22386 /// BrowserVersionString property and other BrowserVersion values. 22387 /// Only the version part of the BrowserVersion value is respected. The 22388 /// channel suffix, if it exists, is ignored. 22389 /// The version of the Edge WebView2 Runtime binaries actually used may be 22390 /// different from the specified TargetCompatibleBrowserVersion. They are only 22391 /// guaranteed to be compatible. You can check the actual version on the 22392 /// BrowserVersionString property on the ICoreWebView2Environment. 22393 /+[ propget]+/ 22394 HRESULT get_TargetCompatibleBrowserVersion(/+[out, retval]+/ LPWSTR* value); 22395 /// Set the TargetCompatibleBrowserVersion property. 22396 /+[ propput]+/ 22397 HRESULT put_TargetCompatibleBrowserVersion(in LPCWSTR value); 22398 22399 /// The AllowSingleSignOnUsingOSPrimaryAccount property is used to enable 22400 /// single sign on with Azure Active Directory (AAD) resources inside WebView 22401 /// using the logged in Windows account and single sign on with web sites using 22402 /// Microsoft account associated with the login in Windows account. 22403 /// Default is disabled. 22404 /// Universal Windows Platform apps must also declare enterpriseCloudSSO 22405 /// [restricted capability](https://docs.microsoft.com/windows/uwp/packaging/app-capability-declarations#restricted-capabilities) 22406 /// for the single sign on to work. 22407 /+[ propget]+/ 22408 HRESULT get_AllowSingleSignOnUsingOSPrimaryAccount(/+[out, retval]+/ BOOL* allow); 22409 /// Set the AllowSingleSignOnUsingOSPrimaryAccount property. 22410 /+[ propput]+/ 22411 HRESULT put_AllowSingleSignOnUsingOSPrimaryAccount(in BOOL allow); 22412 } 22413 22414 /// The caller implements this interface to receive the WebView2Environment created 22415 /// via CreateCoreWebView2Environment. 22416 const GUID IID_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler = ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler.iid; 22417 22418 interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler : IUnknown 22419 { 22420 static const GUID iid = { 0x4e8a3389,0xc9d8,0x4bd2,[ 0xb6,0xb5,0x12,0x4f,0xee,0x6c,0xc1,0x4d ] }; 22421 extern(Windows): 22422 /// Called to provide the implementer with the completion status and result 22423 /// of the corresponding asynchronous method call. 22424 HRESULT Invoke(HRESULT errorCode, ICoreWebView2Environment createdEnvironment); 22425 } 22426 22427 /// A Receiver is created for a particular DevTools Protocol event and allows 22428 /// you to subscribe and unsubscribe from that event. 22429 /// Obtained from the WebView object via GetDevToolsProtocolEventReceiver. 22430 const GUID IID_ICoreWebView2DevToolsProtocolEventReceiver = ICoreWebView2DevToolsProtocolEventReceiver.iid; 22431 22432 interface ICoreWebView2DevToolsProtocolEventReceiver : IUnknown 22433 { 22434 static const GUID iid = { 0xb32ca51a,0x8371,0x45e9,[ 0x93,0x17,0xaf,0x02,0x1d,0x08,0x03,0x67 ] }; 22435 extern(Windows): 22436 /// Subscribe to a DevToolsProtocol event. 22437 /// The handler's Invoke method will be called whenever the corresponding 22438 /// DevToolsProtocol event fires. Invoke will be called with 22439 /// an event args object containing the DevTools Protocol event's parameter 22440 /// object as a JSON string. 22441 /// 22442 /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceived 22443 HRESULT add_DevToolsProtocolEventReceived( 22444 /+[in]+/ ICoreWebView2DevToolsProtocolEventReceivedEventHandler handler, 22445 /+[out]+/ EventRegistrationToken* token); 22446 /// Remove an event handler previously added with 22447 /// add_DevToolsProtocolEventReceived. 22448 HRESULT remove_DevToolsProtocolEventReceived( 22449 in EventRegistrationToken token); 22450 } 22451 22452 /// DLL export to create a WebView2 environment with a custom version of Edge, 22453 /// user data directory and/or additional options. 22454 /// 22455 /// The WebView2 environment and all other WebView2 objects are single threaded 22456 /// and have dependencies on Windows components that require COM to be 22457 /// initialized for a single-threaded apartment. The application is expected to 22458 /// call CoInitializeEx before calling CreateCoreWebView2EnvironmentWithOptions. 22459 /// 22460 /// ``` 22461 /// CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 22462 /// ``` 22463 /// 22464 /// If CoInitializeEx was not called or has been previously called with 22465 /// COINIT_MULTITHREADED, CreateCoreWebView2EnvironmentWithOptions will fail 22466 /// with one of the following errors. 22467 /// 22468 /// ``` 22469 /// CO_E_NOTINITIALIZED (if CoInitializeEx was not called) 22470 /// RPC_E_CHANGED_MODE (if CoInitializeEx was previously called with 22471 /// COINIT_MULTITHREADED) 22472 /// ``` 22473 /// 22474 /// Use `browserExecutableFolder` to specify whether WebView2 controls use a 22475 /// fixed or installed version of the WebView2 Runtime that exists on a client 22476 /// machine. To use a fixed version of the WebView2 Runtime, pass the relative 22477 /// path of the folder that contains the fixed version of the WebView2 Runtime 22478 /// to `browserExecutableFolder`. To create WebView2 controls that use the 22479 /// installed version of the WebView2 Runtime that exists on client machines, 22480 /// pass a null or empty string to `browserExecutableFolder`. In this scenario, 22481 /// the API tries to find a compatible version of the WebView2 Runtime that is 22482 /// installed on the client machine (first at the machine level, and then per 22483 /// user) using the selected channel preference. The path of fixed version of 22484 /// the WebView2 Runtime should not contain `\Edge\Application\`. When such a 22485 /// path is used, the API will fail with ERROR_NOT_SUPPORTED. 22486 /// 22487 /// The default channel search order is the WebView2 Runtime, Beta, Dev, and 22488 /// Canary. 22489 /// When there is an override WEBVIEW2_RELEASE_CHANNEL_PREFERENCE environment 22490 /// variable or applicable releaseChannelPreference registry value 22491 /// with the value of 1, the channel search order is reversed. 22492 /// 22493 /// userDataFolder can be 22494 /// specified to change the default user data folder location for 22495 /// WebView2. The path can be an absolute file path or a relative file path 22496 /// that is interpreted as relative to the current process's executable. 22497 /// Otherwise, for UWP apps, the default user data folder will be 22498 /// the app data folder for the package; for non-UWP apps, 22499 /// the default user data folder `{Executable File Name}.WebView2` 22500 /// will be created in the same directory next to the app executable. 22501 /// WebView2 creation can fail if the executable is running in a directory 22502 /// that the process doesn't have permission to create a new folder in. 22503 /// The app is responsible to clean up its user data folder 22504 /// when it is done. 22505 /// 22506 /// Note that as a browser process might be shared among WebViews, 22507 /// WebView creation will fail with HRESULT_FROM_WIN32(ERROR_INVALID_STATE) if 22508 /// the specified options does not match the options of the WebViews that are 22509 /// currently running in the shared browser process. 22510 /// 22511 /// environmentCreatedHandler is the handler result to the async operation 22512 /// which will contain the WebView2Environment that got created. 22513 /// 22514 /// The browserExecutableFolder, userDataFolder and additionalBrowserArguments 22515 /// of the environmentOptions may be overridden by 22516 /// values either specified in environment variables or in the registry. 22517 /// 22518 /// When creating a WebView2Environment the following environment variables 22519 /// are checked: 22520 /// 22521 /// ``` 22522 /// WEBVIEW2_BROWSER_EXECUTABLE_FOLDER 22523 /// WEBVIEW2_USER_DATA_FOLDER 22524 /// WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS 22525 /// WEBVIEW2_RELEASE_CHANNEL_PREFERENCE 22526 /// ``` 22527 /// 22528 /// If an override environment variable is found then we use the 22529 /// browserExecutableFolder and userDataFolder values as replacements for the 22530 /// corresponding values in CreateCoreWebView2EnvironmentWithOptions parameters. 22531 /// If additionalBrowserArguments specified in environment variable or in the 22532 /// registry, it will be appended to the correspinding values in 22533 /// CreateCoreWebView2EnvironmentWithOptions parameters. 22534 /// 22535 /// While not strictly overrides, there exists additional environment variables 22536 /// that can be set: 22537 /// 22538 /// ``` 22539 /// WEBVIEW2_WAIT_FOR_SCRIPT_DEBUGGER 22540 /// ``` 22541 /// 22542 /// When found with a non-empty value, this indicates that the WebView is being 22543 /// launched under a script debugger. In this case, the WebView will issue a 22544 /// `Page.waitForDebugger` CDP command that will cause script execution inside the 22545 /// WebView to pause on launch, until a debugger issues a corresponding 22546 /// `Runtime.runIfWaitingForDebugger` CDP command to resume execution. 22547 /// Note: There is no registry key equivalent of this environment variable. 22548 /// 22549 /// ``` 22550 /// WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER 22551 /// ``` 22552 /// 22553 /// When found with a non-empty value, this indicates that the WebView is being 22554 /// launched under a script debugger that also supports host applications that 22555 /// use multiple WebViews. The value is used as the identifier for a named pipe 22556 /// that will be opened and written to when a new WebView is created by the host 22557 /// application. The payload will match that of the remote-debugging-port JSON 22558 /// target and can be used by the external debugger to attach to a specific 22559 /// WebView instance. 22560 /// The format of the pipe created by the debugger should be: 22561 /// `\\.\pipe\WebView2\Debugger\{app_name}\{pipe_name}` 22562 /// where: 22563 /// 22564 /// - `{app_name}` is the host application exe filename, e.g. WebView2Example.exe 22565 /// - `{pipe_name}` is the value set for WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER. 22566 /// 22567 /// To enable debugging of the targets identified by the JSON you will also need 22568 /// to set the WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS environment variable to 22569 /// send `--remote-debugging-port={port_num}` 22570 /// where: 22571 /// 22572 /// - `{port_num}` is the port on which the CDP server will bind. 22573 /// 22574 /// Be aware that setting both the WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER and 22575 /// WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS environment variables will cause the 22576 /// WebViews hosted in your application and their contents to be exposed to 22577 /// 3rd party applications such as debuggers. 22578 /// 22579 /// Note: There is no registry key equivalent of this environment variable. 22580 /// 22581 /// If none of those environment variables exist, then the registry is examined next. 22582 /// The following registry values are checked: 22583 /// 22584 /// ``` 22585 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder 22586 /// "{AppId}"="" 22587 /// 22588 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannelPreference 22589 /// "{AppId}"="" 22590 /// 22591 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\AdditionalBrowserArguments 22592 /// "{AppId}"="" 22593 /// 22594 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\UserDataFolder 22595 /// "{AppId}"="" 22596 /// ``` 22597 /// 22598 /// browserExecutableFolder and releaseChannelPreference can be configured using 22599 /// group policy under Administrative Templates > Microsoft Edge WebView2. 22600 /// The old registry location will be deprecated soon: 22601 /// 22602 /// ``` 22603 /// [{Root}\Software\Policies\Microsoft\EmbeddedBrowserWebView\LoaderOverride\{AppId}] 22604 /// "ReleaseChannelPreference"=dword:00000000 22605 /// "BrowserExecutableFolder"="" 22606 /// "UserDataFolder"="" 22607 /// "AdditionalBrowserArguments"="" 22608 /// ``` 22609 /// 22610 /// In the unlikely scenario where some instances of WebView are open during 22611 /// a browser update we could end up blocking the deletion of old Edge browsers. 22612 /// To avoid running out of disk space a new WebView creation will fail 22613 /// with the next error if it detects that there are many old versions present. 22614 /// 22615 /// ``` 22616 /// ERROR_DISK_FULL 22617 /// ``` 22618 /// 22619 /// The default maximum number of Edge versions allowed is 20. 22620 /// 22621 /// The maximum number of old Edge versions allowed can be overwritten with the value 22622 /// of the following environment variable. 22623 /// 22624 /// ``` 22625 /// WEBVIEW2_MAX_INSTANCES 22626 /// ``` 22627 /// 22628 /// If the Webview depends on an installed Edge and it is uninstalled 22629 /// any subsequent creation will fail with the next error 22630 /// 22631 /// ``` 22632 /// ERROR_PRODUCT_UNINSTALLED 22633 /// ``` 22634 /// 22635 /// First we check with Root as HKLM and then HKCU. 22636 /// AppId is first set to the Application User Model ID of the caller's process, 22637 /// then if there's no corresponding registry key the AppId is set to the 22638 /// executable name of the caller's process, or if that isn't a registry key 22639 /// then '*'. If an override registry key is found, then we use the 22640 /// browserExecutableFolder and userDataFolder registry values as replacements 22641 /// and append additionalBrowserArguments registry values for the corresponding 22642 /// values in CreateCoreWebView2EnvironmentWithOptions parameters. 22643 extern(Windows) HRESULT CreateCoreWebView2EnvironmentWithOptions(PCWSTR browserExecutableFolder, PCWSTR userDataFolder, ICoreWebView2EnvironmentOptions environmentOptions, ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environmentCreatedHandler); 22644 22645 /// Creates an evergreen WebView2 Environment using the installed Edge version. 22646 /// This is equivalent to calling CreateCoreWebView2EnvironmentWithOptions with 22647 /// nullptr for browserExecutableFolder, userDataFolder, 22648 /// additionalBrowserArguments. See CreateCoreWebView2EnvironmentWithOptions for 22649 /// more details. 22650 extern(Windows) HRESULT CreateCoreWebView2Environment(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environmentCreatedHandler); 22651 22652 /// Get the browser version info including channel name if it is not the stable channel 22653 /// or the Embedded Edge. 22654 /// Channel names are beta, dev, and canary. 22655 /// If an override exists for the browserExecutableFolder or the channel preference, 22656 /// the override will be used. 22657 /// If there isn't an override, then the parameter passed to 22658 /// GetAvailableCoreWebView2BrowserVersionString is used. 22659 extern(Windows) HRESULT GetAvailableCoreWebView2BrowserVersionString(PCWSTR browserExecutableFolder, LPWSTR* versionInfo); 22660 22661 /// This method is for anyone want to compare version correctly to determine 22662 /// which version is newer, older or same. It can be used to determine whether 22663 /// to use webview2 or certain feature base on version. 22664 /// Sets the value of result to -1, 0 or 1 if version1 is less than, equal or 22665 /// greater than version2 respectively. 22666 /// Returns E_INVALIDARG if it fails to parse any of the version strings or any 22667 /// input parameter is null. 22668 /// Input can directly use the versionInfo obtained from 22669 /// GetAvailableCoreWebView2BrowserVersionString, channel info will be ignored. 22670 extern(Windows) HRESULT CompareBrowserVersions(PCWSTR version1, PCWSTR version2, int* result); 22671 22672 }