1 /++
2 	A web view wrapper. Uses CEF on Linux and WebView2 on Windows.
3 
4 	Microsoft WebView2 is fairly stable and is unlikely to break, but CEF
5 	is not remotely stable and likely to break every release. You'll have
6 	to get the same version as me to use this unless you want to generate
7 	your own bindings (procedure found in the file comments). Details below.
8 
9 
10 	I currently built against the version listed below and it uses UTF-16 strings.
11 
12 	November 2023-present: cef_binary_119.3.1+gf768881+chromium-119.0.6045.124_linux64_minimal.tar.bz2
13 
14 	November 2022: cef_binary_107.1.9+g1f0a21a+chromium-107.0.5304.110_linux64_minimal.tar.bz2
15 
16 	November 2021: 95.7.17+g4208276+chromium-95.0.4638.69
17 
18 	Note my ceftranslate.d for instructions to start the update process.
19 
20 	Then to install the cef put in the Resources in the Release directory (*.pak and *.dat
21 	out of Resources, failure to do this will cause an abort on ICU file descriptor things)
22 	and copy the locales to /opt/cef/Resources/Locales
23 
24 	You can download compatible builds from https://cef-builds.spotifycdn.com/index.html
25 	just make sure to put in the version filter and check "all builds" to match it.
26 
27 	You do NOT actually need the cef to build the application, but it must be
28 	on the user's machine to run it. It looks in /opt/cef/ on Linux.
29 
30 	Work in progress. DO NOT USE YET as I am prolly gonna break everything too.
31 
32 	On Windows, you need to distribute the WebView2Loader.dll with your exe. That
33 	is found in the web view 2 sdk. Furthermore, users will have to install the runtime.
34 
35 	Please note; the Microsoft terms and conditions say they may be able to collect
36 	information about your users if you use this on Windows.
37 	see: https://developer.microsoft.com/en-us/microsoft-edge/webview2/
38 
39 
40 +/
41 module arsd.webview;
42 
43 enum WebviewEngine {
44 	none,
45 	cef,
46 	wv2,
47 	webkit_gtk
48 }
49 // see activeEngine which is an enum you can static if on
50 
51 
52 // I might recover this gtk thing but i don't like gtk
53 // dmdi webview -version=linux_gtk -version=Demo
54 
55 // the setup link for Microsoft:
56 // https://go.microsoft.com/fwlink/p/?LinkId=2124703
57 
58 
59 version(Windows) {
60 import arsd.simpledisplay;
61 import arsd.com;
62 import core.atomic;
63 
64 //import std.stdio;
65 
66 private template InvokerArgFor(T, Context) {
67 	alias invoker = typeof(&T.init.Invoke);
68 	static if(is(invoker fntype == delegate)) {
69 		static if(is(fntype Params == __parameters))
70 			alias InvokerArgFor = HRESULT function(Params, Context);
71 		else
72 			static assert(0);
73 	}
74 }
75 
76 T callback(T, Context)(InvokerArgFor!(T, Context) dg, Context ctx) {
77 	return new class(dg, ctx) T {
78 		extern(Windows):
79 
80 		static if(is(typeof(T.init.Invoke) R == return))
81 		static if(is(typeof(T.init.Invoke) P == __parameters))
82   		override R Invoke(P _args_) {
83 			return dgMember(_args_, ctxMember);
84 		}
85 
86 		InvokerArgFor!(T, Context) dgMember;
87 		Context ctxMember;
88 
89 		this(typeof(dgMember) dg_, Context ctx_) {
90 			this.dgMember = dg_;
91 			this.ctxMember = ctx_;
92 			AddRef();
93 		}
94 
95 		override HRESULT QueryInterface(const (IID)*riid, LPVOID *ppv) {
96 			if (IID_IUnknown == *riid) {
97 				*ppv = cast(void*) cast(IUnknown) this;
98 			}
99 			else if (T.iid == *riid) {
100 				*ppv = cast(void*) cast(T) this;
101 			}
102 			else {
103 				*ppv = null;
104 				return E_NOINTERFACE;
105 			}
106 
107 			AddRef();
108 			return NOERROR;
109 		}
110 
111 		shared LONG count = 0;
112 		ULONG AddRef() {
113 			auto cnt = atomicOp!"+="(count, 1);
114 			if(cnt == 1) {
115 				import core.memory;
116 				GC.addRoot(cast(void*) this);
117 			}
118 			return cnt;
119 		}
120 		ULONG Release() {
121 			auto cnt = atomicOp!"-="(count, 1);
122 			if(cnt == 0) {
123 				import core.memory;
124 				GC.removeRoot(cast(void*) this);
125 			}
126 			return cnt;
127 		}
128 	};
129 }
130 
131 enum activeEngine = WebviewEngine.wv2;
132 
133 struct RC(T) {
134 	private T object;
135 	this(T t, bool addRef = true) {
136 		object = t;
137 		if(addRef && object)
138 			object.AddRef();
139 	}
140 	this(this) {
141 		if(object is null) return;
142 		object.AddRef();
143 	}
144 	~this() {
145 		if(object is null) return;
146 		object.Release();
147 		object = null;
148 	}
149 
150 	RC!I queryInterface(I)() {
151 		I i;
152 		auto err = object.QueryInterface(&I.iid, cast(void**) &i);
153 		if(err != S_OK)
154 			return RC!I(null, false);
155 		else
156 			return RC!I(i, false); // QueryInterface already calls AddRef
157 	}
158 
159 	bool opCast(T:bool)() nothrow {
160 		return object !is null;
161 	}
162 
163 	void opAssign(T obj) {
164 		obj.AddRef();
165 		if(object)
166 			object.Release();
167 		this.object = obj;
168 	}
169 
170 	T raw() { return object; }
171 
172 	T returnable() {
173 		if(object is null) return null;
174 		return object;
175 	}
176 
177 	T passable() {
178 		if(object is null) return null;
179 		object.AddRef();
180 		return object;
181 	}
182 
183 	static foreach(memberName; __traits(allMembers /*derivedMembers*/, T)) {
184 		mixin ForwardMethod!(memberName);
185 	}
186 }
187 
188 /+
189 // does NOT add ref, use after you queryInterface
190 RC!T makeRcd(T)(T t) {
191 	return RC!T(t, false);
192 }
193 +/
194 
195 extern(Windows)
196 alias StringMethod = int delegate(wchar**);
197 
198 string toGC(scope StringMethod dg) {
199 	wchar* t;
200 	auto res = dg(&t);
201 	if(res != S_OK)
202 		throw new ComException(res);
203 
204 	auto ot = t;
205 
206 	string s;
207 
208 	// FIXME: encode properly in UTF-8
209 	while(*t) {
210 		s ~= *t;
211 		t++;
212 	}
213 
214 	auto ret = s;
215 
216 	CoTaskMemFree(ot);
217 
218 	return ret;
219 }
220 
221 class ComException : Exception {
222 	HRESULT errorCode;
223 	this(HRESULT errorCode) {
224 		import std.format;
225 		super(format("HRESULT: 0x%08x", errorCode));
226 		// FIXME: call FormatMessage
227 	}
228 }
229 
230 mixin template ForwardMethod(string methodName) {
231 	static if(methodName.length > 4 && methodName[0 .. 4] == "put_") {
232 		static if(is(typeof(__traits(getMember, T, memberName)) Params == function))
233 			private alias Type = Params[0];
234 		mixin(q{ @property void } ~ memberName[4 .. $] ~ q{(Type v) {
235 			auto errorCode = __traits(getMember, object, memberName)(v);
236 			if(errorCode)
237 				throw new ComException(errorCode);
238 		}
239 		});
240 	} else
241 	static if(methodName.length > 4 && methodName[0 .. 4] == "get_") {
242 		static if(is(typeof(__traits(getMember, T, memberName)) Params == function))
243 			private alias Type = typeof(*(Params[0].init));
244 		mixin(q{ @property Type } ~ memberName[4 .. $] ~ q{() {
245 			Type response;
246 			auto errorCode = __traits(getMember, object, memberName)(&response);
247 			if(errorCode)
248 				throw new ComException(errorCode);
249 			return response;
250 		}
251 		});
252 	} else
253 	static if(methodName.length > 4 && methodName[0 .. 4] == "add_") {
254 		static if(is(typeof(__traits(getMember, T, memberName)) Params == function))
255 			alias Handler = Params[0];
256 		mixin(q{ EventRegistrationToken } ~ memberName ~ q{ (Context)(InvokerArgFor!(Handler, Context) handler, Context ctx) {
257 			EventRegistrationToken token;
258 			__traits(getMember, object, memberName)(callback!(Handler, Context)(handler, ctx), &token);
259 			return token;
260 		}});
261 	} else
262 	static if(methodName.length > 7 && methodName[0 .. 4] == "remove_") {
263 		mixin(q{ void } ~ memberName ~ q{ (EventRegistrationToken token) {
264 			__traits(getMember, object, memberName)(token);
265 		}});
266 	} else {
267 		// I could do the return value things by looking for these comments:
268 		// /+[out]+/ but be warned it is possible or a thing to have multiple out params (only one such function in here though i think)
269 		// /+[out, retval]+/
270 		// a find/replace could make them a UDA or something.
271 
272 		static if(is(typeof(__traits(getMember, T, memberName)) Params == function))
273 		static if(is(typeof(__traits(getMember, T, memberName)) Return == return))
274 
275 		mixin(q{ Return } ~ memberName ~ q{ (Params p) {
276 			// FIXME: check the return value and throw
277 			return __traits(getMember, object, memberName)(p);
278 		}
279 		});
280 
281 	}
282 }
283 
284 struct Wv2App {
285 	static bool active = false;
286 
287 	static HRESULT code;
288 	static bool initialized = false;
289 	static RC!ICoreWebView2Environment webview_env;
290 
291 	@disable this(this);
292 
293 	static void delegate(RC!ICoreWebView2Environment)[] pending;
294 	this(void delegate(RC!ICoreWebView2Environment) withEnvironment) {
295 		if(withEnvironment)
296 			pending ~= withEnvironment;
297 
298 		import core.sys.windows.com;
299 		CoInitializeEx(null, COINIT_APARTMENTTHREADED);
300 
301 		active = true;
302 
303 		auto lib = LoadLibraryW("WebView2Loader.dll"w.ptr);
304 		typeof(&CreateCoreWebView2EnvironmentWithOptions) func;
305 
306 		if(lib is null)
307 			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.");
308 		func = cast(typeof(func)) GetProcAddress(lib, CreateCoreWebView2EnvironmentWithOptions.mangleof);
309 		if(func is null)
310 			throw new Exception("CreateCoreWebView2EnvironmentWithOptions failed from WebView2Loader...");
311 
312 		auto result = func(null, null, null,
313 			callback!(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler, Wv2App*)(
314 				function(error, env, this_) {
315 					this_.initialized = true;
316 					this_.code = error;
317 
318 					if(error)
319 						return error;
320 
321 					this_.webview_env = env;
322 
323 					auto len = pending.length;
324 					foreach(item; this_.pending) {
325 						item(this_.webview_env);
326 					}
327 
328 					this_.pending = this_.pending[len .. $];
329 
330 					return S_OK;
331 				}
332 			, &this)
333 		);
334 
335 		if(result != S_OK) {
336 			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) {
337 				import std.process;
338 				browse("https://go.microsoft.com/fwlink/p/?LinkId=2124703");
339 			}
340 			throw new ComException(result);
341 		}
342 	}
343 
344 	@disable this();
345 
346 	~this() {
347 		active = false;
348 	}
349 
350 	static void useEnvironment(void delegate(RC!ICoreWebView2Environment) withEnvironment) {
351 		assert(active);
352 		assert(withEnvironment !is null);
353 		if(initialized) {
354 			if(code)
355 				throw new ComException(code);
356 			withEnvironment(webview_env);
357 		} else
358 			pending ~= withEnvironment;
359 	}
360 }
361 }
362 
363 
364 
365 /+
366 interface WebView {
367 	void refresh();
368 	void back();
369 	void forward();
370 	void stop();
371 
372 	void navigate(string url);
373 
374 	// the url and line are for error reporting purposes
375 	void executeJavascript(string code, string url = null, int line = 0);
376 
377 	void showDevTools();
378 
379 	// these are get/set properties that you can subscribe to with some system
380 
381 	mixin Observable!(string, "title");
382 	mixin Observable!(string, "url");
383 	mixin Observable!(string, "status");
384 	mixin Observable!(int, "loadingProgress");
385 }
386 +/
387 
388 
389 version(linux) {
390 version(linux_gtk) {} else
391 	version=cef;
392 }
393 
394 
395 version(cef) {
396 import arsd.simpledisplay;
397 
398 //pragma(lib, "cef");
399 
400 class BrowserProcessHandler : CEF!cef_browser_process_handler_t {
401 	override void on_context_initialized() { }
402 
403 	override void on_before_child_process_launch(RC!cef_command_line_t) { }
404 	override void on_schedule_message_pump_work(long delayMs) { }
405 	override cef_client_t* get_default_client() { return null; }
406 	override void on_register_custom_preferences(cef_preferences_type_t, cef_preference_registrar_t*) {}
407 }
408 
409 
410 int cefProcessHelper() {
411 	import core.runtime;
412 	import core.stdc.stdlib;
413 
414 	cef_main_args_t main_args;
415 	version(linux) {
416 		main_args.argc = Runtime.cArgs.argc;
417 		main_args.argv = Runtime.cArgs.argv;
418 	} else version(Windows) {
419 		main_args.instance = GetModuleHandle(null);
420 	}
421 
422 	if(libcef.loadDynamicLibrary()) {
423 		int code = libcef.execute_process(&main_args, null, null);
424 		if(code >= 0)
425 			exit(code);
426 		return code;
427 	}
428 	return -1;
429 }
430 
431 shared static this() {
432 	cefProcessHelper();
433 }
434 
435 public struct CefApp {
436 	static bool active() {
437 		return count > 0;
438 	}
439 
440 	private __gshared int count = 0;
441 
442 	@disable this(this);
443 	@disable new();
444 	this(void delegate(cef_settings_t* settings) setSettings) {
445 
446 		if(!libcef.loadDynamicLibrary())
447 			throw new Exception("failed to load cef dll");
448 
449 		count++;
450 
451 		import core.runtime;
452 		import core.stdc.stdlib;
453 
454 		cef_main_args_t main_args;
455 		version(linux) {
456 			main_args.argc = Runtime.cArgs.argc;
457 			main_args.argv = Runtime.cArgs.argv;
458 		} else version(Windows) {
459 			main_args.instance = GetModuleHandle(null);
460 		}
461 
462 		cef_settings_t settings;
463 		settings.size = cef_settings_t.sizeof;
464 		//settings.log_severity = cef_log_severity_t.LOGSEVERITY_DISABLE; // Show only warnings/errors
465 		settings.log_severity = cef_log_severity_t.LOGSEVERITY_INFO; // Show only warnings/errors
466 		settings.multi_threaded_message_loop = 1;
467 		settings.no_sandbox = 1;
468 
469 		version(linux)
470 		settings.locales_dir_path = cef_string_t("/opt/cef/Resources/locales");
471 
472 		if(setSettings !is null)
473 			setSettings(&settings);
474 
475 
476 		auto app = new class CEF!cef_app_t {
477 			BrowserProcessHandler bph;
478 			this() {
479 				bph = new BrowserProcessHandler();
480 			}
481 			override void on_before_command_line_processing(const(cef_string_t)*, RC!cef_command_line_t) {}
482 
483 			override cef_resource_bundle_handler_t* get_resource_bundle_handler() {
484 				return null;
485 			}
486 			override cef_browser_process_handler_t* get_browser_process_handler() {
487 				return bph.returnable;
488 			}
489 			override cef_render_process_handler_t* get_render_process_handler() {
490 				return null;
491 			}
492 			override void on_register_custom_schemes(cef_scheme_registrar_t*) {
493 
494 			}
495 		};
496 
497 		if(!libcef.initialize(&main_args, &settings, app.passable, null)) {
498 			throw new Exception("cef_initialize failed");
499 		}
500 	}
501 
502 	~this() {
503 		count--;
504 		// this call hangs and idk why.
505 		// FIXME
506 		//libcef.shutdown();
507 	}
508 }
509 
510 
511 version(Demo)
512 void main() {
513 	auto app = CefApp(null);
514 
515 	auto window = new SimpleWindow(640, 480, "D Browser", Resizability.allowResizing);
516 	flushGui;
517 
518 	cef_window_info_t window_info;
519 	/*
520 	window_info.x = 100;
521 	window_info.y = 100;
522 	window_info.width = 300;
523 	window_info.height = 300;
524 	*/
525 	//window_info.parent_window = window.nativeWindowHandle;
526 
527 	cef_string_t cef_url = cef_string_t("http://dpldocs.info/");//"http://youtube.com/"w);
528 
529 	//string url = "http://arsdnet.net/";
530 	//cef_string_utf8_to_utf16(url.ptr, url.length, &cef_url);
531 
532 	cef_browser_settings_t browser_settings;
533 	browser_settings.size = cef_browser_settings_t.sizeof;
534 
535 	auto client = new MyCefClient();
536 
537 	auto got = libcef.browser_host_create_browser(&window_info, client.passable, &cef_url, &browser_settings, null, null); // or _sync
538 
539 	window.eventLoop(0);
540 }
541 
542 
543 /++
544 	This gives access to the CEF functions. If you get a linker error for using an undefined function,
545 	it is probably because you did NOT go through this when dynamically loading.
546 
547 	(...similarly, if you get a segfault, it is probably because you DID go through this when static binding.)
548 +/
549 struct libcef {
550 	static __gshared:
551 
552 	bool isLoaded;
553 	bool loadAttempted;
554 	void* libHandle;
555 
556 	/// Make sure you call this only from one thread, probably at process startup. It caches internally and returns true if the load was successful.
557 	bool loadDynamicLibrary() {
558 		if(loadAttempted)
559 			return isLoaded;
560 
561 		loadAttempted = true;
562 
563 		version(linux) {
564 			import core.sys.posix.dlfcn;
565 			libHandle = dlopen("libcef.so", RTLD_NOW);
566 
567 			static void* loadsym(const char* name) {
568 				return dlsym(libHandle, name);
569 			}
570 		} else version(Windows) {
571 			import core.sys.windows.windows;
572 			libHandle = LoadLibrary("libcef.dll");
573 
574 			static void* loadsym(const char* name) {
575 				return GetProcAddress(libHandle, name);
576 			}
577 		}
578 
579 		//import std.stdio;
580 		if(libHandle is null) {
581 			// import std.stdio; writeln("libhandle null");
582 			import core.stdc.stdio; printf("%s\n", dlerror());
583 			// import core.stdc.errno; writeln(errno);
584 			return false;
585 		}
586 		foreach(memberName; __traits(allMembers, libcef)[4 .. $]) { // cutting off everything until the actual static foreach below; this trims off isLoaded to loadDynamicLibrary
587 			alias mem = __traits(getMember, libcef, memberName);
588 			mem = cast(typeof(mem)) loadsym("cef_" ~ memberName);
589 			if(mem is null) {
590 				 // import std.stdio; writeln(memberName); throw new Exception("cef_" ~ memberName ~ " failed to load");
591 				return false;
592 			}
593 		}
594 
595 		import core.stdc.string;
596 		if(strcmp(libcef.api_hash(1), CEF_API_HASH_UNIVERSAL) != 0)
597 			throw new Exception("libcef versions not matching bindings");
598 
599 		isLoaded = true;
600 		return true;
601 	}
602 
603 	static foreach(memberName; __traits(allMembers, arsd.webview))
604 	static if(is(typeof(__traits(getMember, arsd.webview, memberName)) == function))
605 	static if(memberName.length > 4 && memberName[0 .. 4] == "cef_") {
606 		mixin(q{ typeof(&__traits(getMember, arsd.webview, memberName)) } ~ memberName[4 .. $] ~ ";"); // = &" ~ memberName ~ ";");
607 	}
608 }
609 
610 }
611 
612 version(linux_gtk)
613 version(Demo)
614 void main() {
615 	auto wv = new WebView(true, null);
616 	wv.navigate("http://dpldocs.info/");
617 	wv.setTitle("omg a D webview");
618 	wv.setSize(500, 500, true);
619 	wv.eval("console.log('just testing');");
620 	wv.run();
621 }
622 
623 version(linux_gtk)
624 enum activeEngine = WebviewEngine.webkit_gtk;
625 
626 /++
627 
628 +/
629 version(linux_gtk)
630 class WebView : browser_engine {
631 
632 	/++
633 		Creates a new webview instance. If dbg is non-zero - developer tools will
634 		be enabled (if the platform supports them). Window parameter can be a
635 		pointer to the native window handle. If it's non-null - then child WebView
636 		is embedded into the given parent window. Otherwise a new window is created.
637 		Depending on the platform, a GtkWindow, NSWindow or HWND pointer can be
638 		passed here.
639 	+/
640 	this(bool dbg, void* window) {
641 		super(&on_message, dbg, window);
642 	}
643 
644 	extern(C)
645 	static void on_message(const char*) {}
646 
647 	/// Destroys a webview and closes the native window.
648 	void destroy() {
649 
650 	}
651 
652 	/// Runs the main loop until it's terminated. After this function exits - you
653 	/// must destroy the webview.
654 	override void run() { super.run(); }
655 
656 	/// Stops the main loop. It is safe to call this function from another other
657 	/// background thread.
658 	override void terminate() { super.terminate(); }
659 
660 	/+
661 	/// Posts a function to be executed on the main thread. You normally do not need
662 	/// to call this function, unless you want to tweak the native window.
663 	void dispatch(void function(WebView w, void *arg) fn, void *arg) {}
664 	+/
665 
666 	/// Returns a native window handle pointer. When using GTK backend the pointer
667 	/// is GtkWindow pointer, when using Cocoa backend the pointer is NSWindow
668 	/// pointer, when using Win32 backend the pointer is HWND pointer.
669 	void* getWindow() { return m_window; }
670 
671 	/// Updates the title of the native window. Must be called from the UI thread.
672 	override void setTitle(const char *title) { super.setTitle(title); }
673 
674 	/// Navigates webview to the given URL. URL may be a data URI.
675 	override void navigate(const char *url) { super.navigate(url); }
676 
677 	/// Injects JavaScript code at the initialization of the new page. Every time
678 	/// the webview will open a the new page - this initialization code will be
679 	/// executed. It is guaranteed that code is executed before window.onload.
680 	override void init(const char *js) { super.init(js); }
681 
682 	/// Evaluates arbitrary JavaScript code. Evaluation happens asynchronously, also
683 	/// the result of the expression is ignored. Use RPC bindings if you want to
684 	/// receive notifications about the results of the evaluation.
685 	override void eval(const char *js) { super.eval(js); }
686 
687 	/// Binds a native C callback so that it will appear under the given name as a
688 	/// global JavaScript function. Internally it uses webview_init(). Callback
689 	/// receives a request string and a user-provided argument pointer. Request
690 	/// string is a JSON array of all the arguments passed to the JavaScript
691 	/// function.
692 	void bind(const char *name, void function(const char *, void *) fn, void *arg) {}
693 
694 	/// Allows to return a value from the native binding. Original request pointer
695 	/// must be provided to help internal RPC engine match requests with responses.
696 	/// If status is zero - result is expected to be a valid JSON result value.
697 	/// If status is not zero - result is an error JSON object.
698 	void webview_return(const char *req, int status, const char *result) {}
699 
700   /*
701   void on_message(const char *msg) {
702     auto seq = json_parse(msg, "seq", 0);
703     auto name = json_parse(msg, "name", 0);
704     auto args = json_parse(msg, "args", 0);
705     auto fn = bindings[name];
706     if (fn == null) {
707       return;
708     }
709     std::async(std::launch::async, [=]() {
710       auto result = (*fn)(args);
711       dispatch([=]() {
712         eval(("var b = window['" + name + "'];b['callbacks'][" + seq + "](" +
713               result + ");b['callbacks'][" + seq +
714               "] = undefined;b['errors'][" + seq + "] = undefined;")
715                  .c_str());
716       });
717     });
718   }
719   std::map<std::string, binding_t *> bindings;
720 
721   alias binding_t = std::function<std::string(std::string)>;
722 
723   void bind(const char *name, binding_t f) {
724     auto js = "(function() { var name = '" + std::string(name) + "';" + R"(
725       window[name] = function() {
726         var me = window[name];
727         var errors = me['errors'];
728         var callbacks = me['callbacks'];
729         if (!callbacks) {
730           callbacks = {};
731           me['callbacks'] = callbacks;
732         }
733         if (!errors) {
734           errors = {};
735           me['errors'] = errors;
736         }
737         var seq = (me['lastSeq'] || 0) + 1;
738         me['lastSeq'] = seq;
739         var promise = new Promise(function(resolve, reject) {
740           callbacks[seq] = resolve;
741           errors[seq] = reject;
742         });
743         window.external.invoke(JSON.stringify({
744           name: name,
745           seq:seq,
746           args: Array.prototype.slice.call(arguments),
747         }));
748         return promise;
749       }
750     })())";
751     init(js.c_str());
752     bindings[name] = new binding_t(f);
753   }
754 
755 */
756 }
757 
758 private extern(C) {
759 	alias dispatch_fn_t = void function();
760 	alias msg_cb_t = void function(const char *msg);
761 }
762 
763 version(linux_gtk) {
764 
765 
766 /* Original https://github.com/zserge/webview notice below:
767  * MIT License
768  *
769  * Copyright (c) 2017 Serge Zaitsev
770  *
771  * Permission is hereby granted, free of charge, to any person obtaining a copy
772  * of this software and associated documentation files (the "Software"), to deal
773  * in the Software without restriction, including without limitation the rights
774  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
775  * copies of the Software, and to permit persons to whom the Software is
776  * furnished to do so, subject to the following conditions:
777  *
778  * The above copyright notice and this permission notice shall be included in
779  * all copies or substantial portions of the Software.
780  *
781  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
782  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
783  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
784  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
785  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
786  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
787  * SOFTWARE.
788  */
789 
790 /*
791 	Port to D by Adam D. Ruppe, November 30, 2019
792 */
793 
794 
795 	pragma(lib, "gtk-3");
796 	pragma(lib, "glib-2.0");
797 	pragma(lib, "gobject-2.0");
798 	pragma(lib, "webkit2gtk-4.0");
799 	pragma(lib, "javascriptcoregtk-4.0");
800 
801 	private extern(C) {
802 		import core.stdc.config;
803 		alias GtkWidget = void;
804 		enum GtkWindowType {
805 			GTK_WINDOW_TOPLEVEL = 0
806 		}
807 		bool gtk_init_check(int*, char***);
808 		GtkWidget* gtk_window_new(GtkWindowType);
809 		c_ulong g_signal_connect_data(void*, const char*, void* /* function pointer!!! */, void*, void*, int);
810 		GtkWidget* webkit_web_view_new();
811 		alias WebKitUserContentManager = void;
812 		WebKitUserContentManager* webkit_web_view_get_user_content_manager(GtkWidget*);
813 
814 		void gtk_container_add(GtkWidget*, GtkWidget*);
815 		void gtk_widget_grab_focus(GtkWidget*);
816 		void gtk_widget_show_all(GtkWidget*);
817 		void gtk_main();
818 		void gtk_main_quit();
819 		void webkit_web_view_load_uri(GtkWidget*, const char*);
820 		alias WebKitSettings = void;
821 		WebKitSettings* webkit_web_view_get_settings(GtkWidget*);
822 		void webkit_settings_set_enable_write_console_messages_to_stdout(WebKitSettings*, bool);
823 		void webkit_settings_set_enable_developer_extras(WebKitSettings*, bool);
824 		void webkit_user_content_manager_register_script_message_handler(WebKitUserContentManager*, const char*);
825 		alias JSCValue = void;
826 		alias WebKitJavascriptResult = void;
827 		JSCValue* webkit_javascript_result_get_js_value(WebKitJavascriptResult*);
828 		char* jsc_value_to_string(JSCValue*);
829 		void g_free(void*);
830 		void webkit_web_view_run_javascript(GtkWidget*, const char*, void*, void*, void*);
831 		alias WebKitUserScript = void;
832 		void webkit_user_content_manager_add_script(WebKitUserContentManager*, WebKitUserScript*);
833 		WebKitUserScript* webkit_user_script_new(const char*, WebKitUserContentInjectedFrames, WebKitUserScriptInjectionTime, const char*, const char*);
834 		enum WebKitUserContentInjectedFrames {
835 			WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES,
836 			WEBKIT_USER_CONTENT_INJECT_TOP_FRAME
837 		}
838 		enum WebKitUserScriptInjectionTime {
839 			WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START,
840 			WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_END
841 		}
842 		void gtk_window_set_title(GtkWidget*, const char*);
843 
844 		void gtk_window_set_resizable(GtkWidget*, bool);
845 		void gtk_window_set_default_size(GtkWidget*, int, int);
846 		void gtk_widget_set_size_request(GtkWidget*, int, int);
847 	}
848 
849 	private class browser_engine {
850 
851 		static extern(C)
852 		void ondestroy (GtkWidget *w, void* arg) {
853 			(cast(browser_engine) arg).terminate();
854 		}
855 
856 		static extern(C)
857 		void smr(WebKitUserContentManager* m, WebKitJavascriptResult* r, void* arg) {
858 			auto w = cast(browser_engine) arg;
859 			JSCValue *value = webkit_javascript_result_get_js_value(r);
860 			auto s = jsc_value_to_string(value);
861 			w.m_cb(s);
862 			g_free(s);
863 		}
864 
865 		this(msg_cb_t cb, bool dbg, void* window) {
866 			m_cb = cb;
867 
868 			gtk_init_check(null, null);
869 			m_window = cast(GtkWidget*) window;
870 			if (m_window == null)
871 				m_window = gtk_window_new(GtkWindowType.GTK_WINDOW_TOPLEVEL);
872 
873 			g_signal_connect_data(m_window, "destroy", &ondestroy, cast(void*) this, null, 0);
874 
875 			m_webview = webkit_web_view_new();
876 			WebKitUserContentManager* manager = webkit_web_view_get_user_content_manager(m_webview);
877 
878 			g_signal_connect_data(manager, "script-message-received::external", &smr, cast(void*) this, null, 0);
879 			webkit_user_content_manager_register_script_message_handler(manager, "external");
880 			init("window.external={invoke:function(s){window.webkit.messageHandlers.external.postMessage(s);}}");
881 
882 			gtk_container_add(m_window, m_webview);
883 			gtk_widget_grab_focus(m_webview);
884 
885 			if (dbg) {
886 				WebKitSettings *settings = webkit_web_view_get_settings(m_webview);
887 				webkit_settings_set_enable_write_console_messages_to_stdout(settings, true);
888 				webkit_settings_set_enable_developer_extras(settings, true);
889 			}
890 
891 			gtk_widget_show_all(m_window);
892 		}
893 		void run() { gtk_main(); }
894 		void terminate() { gtk_main_quit(); }
895 
896 		void navigate(const char *url) {
897 			webkit_web_view_load_uri(m_webview, url);
898 		}
899 
900 		void setTitle(const char* title) {
901 			gtk_window_set_title(m_window, title);
902 		}
903 
904 		/+
905 			void dispatch(std::function<void()> f) {
906 				g_idle_add_full(G_PRIORITY_HIGH_IDLE, (GSourceFunc)([](void *f) -> int {
907 							(*static_cast<dispatch_fn_t *>(f))();
908 							return G_SOURCE_REMOVE;
909 							}),
910 						new std::function<void()>(f),
911 						[](void *f) { delete static_cast<dispatch_fn_t *>(f); });
912 			}
913 		+/
914 
915 		void setSize(int width, int height, bool resizable) {
916 			gtk_window_set_resizable(m_window, resizable);
917 			if (resizable) {
918 				gtk_window_set_default_size(m_window, width, height);
919 			}
920 			gtk_widget_set_size_request(m_window, width, height);
921 		}
922 
923 		void init(const char *js) {
924 			WebKitUserContentManager *manager = webkit_web_view_get_user_content_manager(m_webview);
925 			webkit_user_content_manager_add_script(
926 				manager, webkit_user_script_new(
927 					js, WebKitUserContentInjectedFrames.WEBKIT_USER_CONTENT_INJECT_TOP_FRAME,
928 					WebKitUserScriptInjectionTime.WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START, null, null));
929 			}
930 
931 		void eval(const char *js) {
932 			webkit_web_view_run_javascript(m_webview, js, null, null, null);
933 		}
934 
935 		protected:
936 		GtkWidget* m_window;
937 		GtkWidget* m_webview;
938 		msg_cb_t m_cb;
939 	}
940 } else version(WEBVIEW_COCOA) {
941 /+
942 
943 //
944 // ====================================================================
945 //
946 // This implementation uses Cocoa WKWebView backend on macOS. It is
947 // written using ObjC runtime and uses WKWebView class as a browser runtime.
948 // You should pass "-framework Webkit" flag to the compiler.
949 //
950 // ====================================================================
951 //
952 
953 #define OBJC_OLD_DISPATCH_PROTOTYPES 1
954 #include <CoreGraphics/CoreGraphics.h>
955 #include <objc/objc-runtime.h>
956 
957 #define NSBackingStoreBuffered 2
958 
959 #define NSWindowStyleMaskResizable 8
960 #define NSWindowStyleMaskMiniaturizable 4
961 #define NSWindowStyleMaskTitled 1
962 #define NSWindowStyleMaskClosable 2
963 
964 #define NSApplicationActivationPolicyRegular 0
965 
966 #define WKUserScriptInjectionTimeAtDocumentStart 0
967 
968 id operator"" _cls(const char *s, std::size_t sz) {
969   return (id)objc_getClass(s);
970 }
971 SEL operator"" _sel(const char *s, std::size_t sz) {
972   return sel_registerName(s);
973 }
974 id operator"" _str(const char *s, std::size_t sz) {
975   return objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, s);
976 }
977 
978 class browser_engine {
979 public:
980   browser_engine(msg_cb_t cb, bool dbg, void *window) : m_cb(cb) {
981     // Application
982     id app = objc_msgSend("NSApplication"_cls, "sharedApplication"_sel);
983     objc_msgSend(app, "setActivationPolicy:"_sel,
984                  NSApplicationActivationPolicyRegular);
985 
986     // Delegate
987     auto cls = objc_allocateClassPair((Class) "NSObject"_cls, "AppDelegate", 0);
988     class_addProtocol(cls, objc_getProtocol("NSApplicationDelegate"));
989     class_addProtocol(cls, objc_getProtocol("WKScriptMessageHandler"));
990     class_addMethod(
991         cls, "applicationShouldTerminateAfterLastWindowClosed:"_sel,
992         (IMP)(+[](id self, SEL cmd, id notification) -> BOOL { return 1; }),
993         "c@:@");
994     class_addMethod(
995         cls, "userContentController:didReceiveScriptMessage:"_sel,
996         (IMP)(+[](id self, SEL cmd, id notification, id msg) {
997           auto w = (browser_engine *)objc_getAssociatedObject(self, "webview");
998           w->m_cb((const char *)objc_msgSend(objc_msgSend(msg, "body"_sel),
999                                              "UTF8String"_sel));
1000         }),
1001         "v@:@@");
1002     objc_registerClassPair(cls);
1003 
1004     auto delegate = objc_msgSend((id)cls, "new"_sel);
1005     objc_setAssociatedObject(delegate, "webview", (id)this,
1006                              OBJC_ASSOCIATION_ASSIGN);
1007     objc_msgSend(app, sel_registerName("setDelegate:"), delegate);
1008 
1009     // Main window
1010     if (window is null) {
1011       m_window = objc_msgSend("NSWindow"_cls, "alloc"_sel);
1012       m_window = objc_msgSend(
1013           m_window, "initWithContentRect:styleMask:backing:defer:"_sel,
1014           CGRectMake(0, 0, 0, 0), 0, NSBackingStoreBuffered, 0);
1015       setSize(480, 320, true);
1016     } else {
1017       m_window = (id)window;
1018     }
1019 
1020     // Webview
1021     auto config = objc_msgSend("WKWebViewConfiguration"_cls, "new"_sel);
1022     m_manager = objc_msgSend(config, "userContentController"_sel);
1023     m_webview = objc_msgSend("WKWebView"_cls, "alloc"_sel);
1024     objc_msgSend(m_webview, "initWithFrame:configuration:"_sel,
1025                  CGRectMake(0, 0, 0, 0), config);
1026     objc_msgSend(m_manager, "addScriptMessageHandler:name:"_sel, delegate,
1027                  "external"_str);
1028     init(R"script(
1029                       window.external = {
1030                         invoke: function(s) {
1031                           window.webkit.messageHandlers.external.postMessage(s);
1032                         },
1033                       };
1034                      )script");
1035     if (dbg) {
1036       objc_msgSend(objc_msgSend(config, "preferences"_sel),
1037                    "setValue:forKey:"_sel, 1, "developerExtrasEnabled"_str);
1038     }
1039     objc_msgSend(m_window, "setContentView:"_sel, m_webview);
1040     objc_msgSend(m_window, "makeKeyAndOrderFront:"_sel, null);
1041   }
1042   ~browser_engine() { close(); }
1043   void terminate() { close(); objc_msgSend("NSApp"_cls, "terminate:"_sel, null); }
1044   void run() {
1045     id app = objc_msgSend("NSApplication"_cls, "sharedApplication"_sel);
1046     dispatch([&]() { objc_msgSend(app, "activateIgnoringOtherApps:"_sel, 1); });
1047     objc_msgSend(app, "run"_sel);
1048   }
1049   void dispatch(std::function<void()> f) {
1050     dispatch_async_f(dispatch_get_main_queue(), new dispatch_fn_t(f),
1051                      (dispatch_function_t)([](void *arg) {
1052                        auto f = static_cast<dispatch_fn_t *>(arg);
1053                        (*f)();
1054                        delete f;
1055                      }));
1056   }
1057   void setTitle(const char *title) {
1058     objc_msgSend(
1059         m_window, "setTitle:"_sel,
1060         objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, title));
1061   }
1062   void setSize(int width, int height, bool resizable) {
1063     auto style = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |
1064                  NSWindowStyleMaskMiniaturizable;
1065     if (resizable) {
1066       style = style | NSWindowStyleMaskResizable;
1067     }
1068     objc_msgSend(m_window, "setStyleMask:"_sel, style);
1069     objc_msgSend(m_window, "setFrame:display:animate:"_sel,
1070                  CGRectMake(0, 0, width, height), 1, 0);
1071   }
1072   void navigate(const char *url) {
1073     auto nsurl = objc_msgSend(
1074         "NSURL"_cls, "URLWithString:"_sel,
1075         objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, url));
1076     objc_msgSend(
1077         m_webview, "loadRequest:"_sel,
1078         objc_msgSend("NSURLRequest"_cls, "requestWithURL:"_sel, nsurl));
1079   }
1080   void init(const char *js) {
1081     objc_msgSend(
1082         m_manager, "addUserScript:"_sel,
1083         objc_msgSend(
1084             objc_msgSend("WKUserScript"_cls, "alloc"_sel),
1085             "initWithSource:injectionTime:forMainFrameOnly:"_sel,
1086             objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, js),
1087             WKUserScriptInjectionTimeAtDocumentStart, 1));
1088   }
1089   void eval(const char *js) {
1090     objc_msgSend(m_webview, "evaluateJavaScript:completionHandler:"_sel,
1091                  objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, js),
1092                  null);
1093   }
1094 
1095 protected:
1096   void close() { objc_msgSend(m_window, "close"_sel); }
1097   id m_window;
1098   id m_webview;
1099   id m_manager;
1100   msg_cb_t m_cb;
1101 };
1102 
1103 +/
1104 
1105 }
1106 
1107 version(cef)  {
1108 
1109 /++
1110 	This creates a base class for a thing to help you implement the function pointers.
1111 
1112 	class MyApp : CEF!cef_app_t {
1113 
1114 	}
1115 +/
1116 abstract class CEF(Base) {
1117 	private struct Inner {
1118 		Base c;
1119 		CEF d_object;
1120 	}
1121 	private Inner inner;
1122 
1123 	this() nothrow {
1124 		if(!__ctfe) construct();
1125 	}
1126 
1127 	// ONLY call this if you did a ctfe construction
1128 	void construct() nothrow {
1129 		assert(inner.c.base.size == 0);
1130 
1131 		import core.memory;
1132 		GC.addRoot(cast(void*) this);
1133 		inner.c.base.size = Inner.sizeof;
1134 		inner.c.base.add_ref = &c_add_ref;
1135 		inner.c.base.release = &c_release;
1136 		inner.c.base.has_one_ref = &c_has_one_ref;
1137 		inner.c.base.has_at_least_one_ref = &c_has_at_least_one_ref;
1138 		inner.d_object = this;
1139 
1140 		static foreach(memberName; __traits(allMembers, Base)) {
1141 			static if(is(typeof(__traits(getMember, Base, memberName)) == return)) {
1142 				__traits(getMember, inner.c, memberName) = mixin("&c_" ~ memberName);
1143 			}
1144 		}
1145 	}
1146 
1147 	private static nothrow @nogc extern(System) {
1148 		void c_add_ref(cef_base_ref_counted_t* self) {
1149 			return ((cast(Inner*) self).d_object).add_ref();
1150 		}
1151 		int c_release(cef_base_ref_counted_t* self) {
1152 			return ((cast(Inner*) self).d_object).release();
1153 		}
1154 		int c_has_one_ref(cef_base_ref_counted_t* self) {
1155 			return ((cast(Inner*) self).d_object).has_one_ref();
1156 		}
1157 		int c_has_at_least_one_ref(cef_base_ref_counted_t* self) {
1158 			return ((cast(Inner*) self).d_object).has_at_least_one_ref();
1159 		}
1160 	}
1161 
1162 	private shared(int) refcount = 1;
1163 	final void add_ref() {
1164 		import core.atomic;
1165 		atomicOp!"+="(refcount, 1);
1166 	}
1167 	final int release() {
1168 		import core.atomic;
1169 		auto v = atomicOp!"-="(refcount, 1);
1170 		if(v == 0) {
1171 			import core.memory;
1172 			GC.removeRoot(cast(void*) this);
1173 			return 1;
1174 		}
1175 		return 0;
1176 	}
1177 	final int has_one_ref() {
1178 		return (cast() refcount) == 1;
1179 	}
1180 	final int has_at_least_one_ref() {
1181 		return (cast() refcount) >= 1;
1182 	}
1183 
1184 	/// Call this to pass to CEF. It will add ref for you.
1185 	final Base* passable() {
1186 		assert(inner.c.base.size);
1187 		add_ref();
1188 		return returnable();
1189 	}
1190 
1191 	final Base* returnable() {
1192 		assert(inner.c.base.size);
1193 		return &inner.c;
1194 	}
1195 
1196 	static foreach(memberName; __traits(allMembers, Base)) {
1197 		static if(is(typeof(__traits(getMember, Base, memberName)) == return)) {
1198 			mixin AbstractMethod!(memberName);
1199 		} else {
1200 			mixin(q{final ref @property } ~ memberName ~ q{() { return __traits(getMember, inner.c, memberName); }});
1201 		}
1202 	}
1203 }
1204 
1205 // you implement this in D...
1206 private mixin template AbstractMethod(string name) {
1207 	alias ptr = typeof(__traits(getMember, Base, name));
1208 	static if(is(ptr Return == return))
1209 	static if(is(typeof(*ptr) Params == function))
1210 	{
1211 		mixin(q{abstract nothrow Return } ~ name ~ q{(CefToD!(Params[1 .. $]) p);});
1212 		// mixin(q{abstract nothrow Return } ~ name ~ q{(Params[1 .. $] p);});
1213 
1214 		mixin(q{
1215 		private static nothrow extern(System)
1216 		Return c_}~name~q{(Params p) {
1217 			Base* self = p[0]; // a bit of a type check here...
1218 			auto dobj = (cast(Inner*) self).d_object; // ...before this cast.
1219 
1220 			//return __traits(getMember, dobj, name)(p[1 .. $]);
1221 			mixin(() {
1222 				string code = "return __traits(getMember, dobj, name)(";
1223 
1224 				static foreach(idx; 1 .. p.length) {
1225 					if(idx > 1)
1226 						code ~= ", ";
1227 					code ~= "cefToD(p[" ~ idx.stringof ~ "])";
1228 				}
1229 				code ~= ");";
1230 				return code;
1231 			}());
1232 		}
1233 		});
1234 	}
1235 	else static assert(0, name ~ " params");
1236 	else static assert(0, name ~ " return");
1237 }
1238 
1239 // you call this from D...
1240 private mixin template ForwardMethod(string name) {
1241 	alias ptr = typeof(__traits(getMember, Base, name));
1242 	static if(is(ptr Return == return))
1243 	static if(is(typeof(*ptr) Params == function))
1244 	{
1245 		mixin(q{nothrow auto } ~ name ~ q{(Params[1 .. $] p) {
1246 			Base* self = inner; // a bit of a type check here...
1247 			static if(is(Return == void))
1248 				return __traits(getMember, inner, name)(self, p);
1249 			else
1250 				return cefToD(__traits(getMember, inner, name)(self, p));
1251 		}});
1252 	}
1253 	else static assert(0, name ~ " params");
1254 	else static assert(0, name ~ " return");
1255 }
1256 
1257 
1258 private alias AliasSeq(T...) = T;
1259 
1260 private template CefToD(T...) {
1261 	static if(T.length == 0) {
1262 		alias CefToD = T;
1263 	} else static if(T.length == 1) {
1264 		static if(is(typeof(T[0].base) == cef_base_ref_counted_t)) {
1265 			alias CefToD = RC!(typeof(*T[0]));
1266 			/+
1267 			static if(is(T[0] == I*, I)) {
1268 				alias CefToD = CEF!(I);
1269 			} else static assert(0, T[0]);
1270 			+/
1271 		} else
1272 			alias CefToD = T[0];
1273 	} else {
1274 		alias CefToD = AliasSeq!(CefToD!(T[0]), CefToD!(T[1..$]));
1275 
1276 	}
1277 }
1278 
1279 enum activeEngine = WebviewEngine.cef;
1280 
1281 struct RC(Base) {
1282 	private Base* inner;
1283 
1284 	this(Base* t) nothrow {
1285 		inner = t;
1286 		// assuming the refcount is already set here
1287 	}
1288 	this(this) nothrow {
1289 		if(inner is null) return;
1290 		inner.base.add_ref(&inner.base);
1291 	}
1292 	~this() nothrow {
1293 		if(inner is null) return;
1294 		inner.base.release(&inner.base);
1295 		inner = null;
1296 		//sdpyPrintDebugString("omg release");
1297 	}
1298 	bool opCast(T:bool)() nothrow {
1299 		return inner !is null;
1300 	}
1301 
1302 	Base* getRawPointer() nothrow {
1303 		return inner;
1304 	}
1305 
1306 	Base* passable() nothrow {
1307 		if(inner is null)
1308 			return inner;
1309 
1310 		inner.base.add_ref(&inner.base);
1311 		return inner;
1312 	}
1313 
1314 	static foreach(memberName; __traits(allMembers, Base)) {
1315 		static if(is(typeof(__traits(getMember, Base, memberName)) == return)) {
1316 			mixin ForwardMethod!(memberName);
1317 		} else {
1318 			mixin(q{final ref @property } ~ memberName ~ q{() { return __traits(getMember, inner, memberName); }});
1319 		}
1320 	}
1321 }
1322 
1323 auto cefToD(T)(T t) {
1324 	static if(is(typeof(T.base) == cef_base_ref_counted_t)) {
1325 		return RC!(typeof(*T))(t);
1326 	} else {
1327 		return t;
1328 	}
1329 }
1330 
1331 
1332 string toGC(const cef_string_utf16_t str) nothrow {
1333 	if(str.str is null)
1334 		return null;
1335 
1336 	string s;
1337 	s.reserve(str.length);
1338 
1339 	try
1340 	foreach(char ch; str.str[0 .. str.length])
1341 		s ~= ch;
1342 	catch(Exception e) {}
1343 	return s;
1344 }
1345 
1346 string toGC(const cef_string_utf16_t* str) nothrow {
1347 	if(str is null)
1348 		return null;
1349 	return toGC(*str);
1350 }
1351 
1352 string toGCAndFree(const cef_string_userfree_t str) nothrow {
1353 	if(str is null)
1354 		return null;
1355 
1356 	string s = toGC(str);
1357 	libcef.string_userfree_utf16_free(str);
1358 	//str = null;
1359 	return s;
1360 }
1361 
1362 // bindings follow, first some hand-written ones for Linux, then some machine translated things. More comments about the machine translation when it comes.
1363 
1364 version(linux)
1365 struct cef_main_args_t {
1366 	int argc;
1367 	char** argv;
1368 }
1369 version(Windows)
1370 struct cef_main_args_t {
1371 	HINSTANCE instance;
1372 }
1373 
1374 // 0 - CEF_VERSION_MAJOR
1375 // 1 - CEF_VERSION_MINOR
1376 // 2 - CEF_VERSION_PATCH
1377 // 3 - CEF_COMMIT_NUMBER
1378 // 4 - CHROME_VERSION_MAJOR
1379 // 5 - CHROME_VERSION_MINOR
1380 // 6 - CHROME_VERSION_BUILD
1381 // 7 - CHROME_VERSION_PATCH
1382 
1383 extern(C) nothrow
1384 int cef_string_utf8_to_utf16(const char* src, size_t src_len, cef_string_utf16_t* output);
1385 
1386 struct cef_string_utf8_t {
1387   char* str;
1388   size_t length;
1389   void* dtor;// void (*dtor)(char* str);
1390 }
1391 
1392 struct cef_basetime_t {
1393 	long val;
1394 }
1395 
1396 
1397 struct cef_string_utf16_t {
1398   char16* str;
1399   size_t length;
1400   void* dtor; // voiod (*dtor)(char16* str);
1401 
1402   this(wstring s) nothrow {
1403 	this.str = cast(char16*) s.ptr;
1404 	this.length = s.length;
1405   }
1406 
1407   this(string s) nothrow {
1408 	libcef.string_utf8_to_utf16(s.ptr, s.length, &this);
1409   }
1410 }
1411 
1412 alias cef_string_t = cef_string_utf16_t;
1413 alias cef_window_handle_t = NativeWindowHandle;
1414 version(Windows)
1415 	alias cef_cursor_handle_t = HCURSOR;
1416 else
1417 	alias cef_cursor_handle_t = XID;
1418 
1419 struct cef_time_t {
1420   int year;          // Four or five digit year "2007" (1601 to 30827 on
1421                      //   Windows, 1970 to 2038 on 32-bit POSIX)
1422   int month;         // 1-based month (values 1 = January, etc.)
1423   int day_of_week;   // 0-based day of week (0 = Sunday, etc.)
1424   int day_of_month;  // 1-based day of month (1-31)
1425   int hour;          // Hour within the current day (0-23)
1426   int minute;        // Minute within the current hour (0-59)
1427   int second;        // Second within the current minute (0-59 plus leap
1428                      //   seconds which may take it up to 60).
1429   int millisecond;   // Milliseconds within the current second (0-999)
1430 }
1431 
1432 version(linux)
1433 struct cef_window_info_t {
1434   cef_string_t window_name;
1435 
1436   uint x;
1437   uint y;
1438   uint width;
1439   uint height;
1440 
1441   cef_window_handle_t parent_window;
1442 
1443   int windowless_rendering_enabled;
1444 
1445   int shared_texture_enabled;
1446 
1447   int external_begin_frame_enabled;
1448 
1449   cef_window_handle_t window;
1450 }
1451 
1452 version(Windows)
1453 struct cef_window_info_t {
1454 	DWORD ex_style;
1455 	cef_string_t window_name;
1456 	DWORD style;
1457 	cef_rect_t bounds;
1458 	cef_window_handle_t parent_window;
1459 	HMENU menu;
1460 	int windowless_rendering_enabled;
1461 	int shared_texture_enabled;
1462 	int external_begin_frame_enabled;
1463 	cef_window_handle_t window;
1464 }
1465 
1466 
1467 
1468 import core.stdc.config;
1469 alias int16 = short;
1470 alias uint16 = ushort;
1471 alias int32 = int;
1472 alias uint32 = uint;
1473 alias char16 = wchar;
1474 alias int64 = long;
1475 alias uint64 = ulong;
1476 
1477 // these are supposed to just be opaque pointers but i want some type safety. this same abi wise.......... RIGHT?
1478 struct cef_string_list_t { void* r; }
1479 struct cef_string_multimap_t { void* r; }
1480 struct cef_string_map_t { void* r; }
1481 
1482 
1483 extern(C) nothrow {
1484 	cef_string_list_t cef_string_list_alloc();
1485 	size_t cef_string_list_size(cef_string_list_t list);
1486 	int cef_string_list_value(cef_string_list_t list, size_t index, cef_string_t* value);
1487 	void cef_string_list_append(cef_string_list_t list, const cef_string_t* value);
1488 	void cef_string_list_clear(cef_string_list_t list);
1489 	void cef_string_list_free(cef_string_list_t list);
1490 	cef_string_list_t cef_string_list_copy(cef_string_list_t list);
1491 }
1492 
1493 
1494 version(linux) {
1495 	import core.sys.posix.sys.types;
1496 	alias pid_t cef_platform_thread_id_t;
1497 	alias OS_EVENT = XEvent;
1498 } else {
1499 	import core.sys.windows.windows;
1500 	alias HANDLE cef_platform_thread_id_t;
1501 	alias OS_EVENT = void;
1502 }
1503 
1504 nothrow @nogc extern(C) void cef_string_userfree_utf16_free(const cef_string_userfree_utf16_t str);
1505 struct cef_string_userfree_utf16_t { cef_string_utf16_t* it; alias it this; }
1506 alias cef_string_userfree_t = cef_string_userfree_utf16_t;
1507 
1508 // **************
1509 
1510 // cef/include/capi$ for i in *.h; do dstep -I../.. $i; done
1511 // also dstep include/cef_version.h
1512 // update the CEF_VERSION and the CEF_API_HASH_UNIVERSAL out of cef_version.h and cef_api_hash.h
1513 // then concatenate the bodies of them and delete the translated macros and `struct .*;` stuff
1514 // 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
1515 // then select all and global replace s/_cef/cef/g
1516 // 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.
1517 
1518 // and make sure version(linux) void cef_register_widevine_cdm ( if it is there.
1519 
1520 // and extern (C) is wrong on the callbacks, they should all be extern(System)
1521 // `/function (<ENTER>Oextern(System)<ESC>`
1522 
1523 
1524 version=embedded_cef_bindings;
1525 
1526 // everything inside these brackets are the bindings you can replace if update needed
1527 
1528 version(embedded_cef_bindings) {
1529 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
1530 //
1531 // Redistribution and use in source and binary forms, with or without
1532 // modification, are permitted provided that the following conditions are
1533 // met:
1534 //
1535 //    * Redistributions of source code must retain the above copyright
1536 // notice, this list of conditions and the following disclaimer.
1537 //    * Redistributions in binary form must reproduce the above
1538 // copyright notice, this list of conditions and the following disclaimer
1539 // in the documentation and/or other materials provided with the
1540 // distribution.
1541 //    * Neither the name of Google Inc. nor the name Chromium Embedded
1542 // Framework nor the names of its contributors may be used to endorse
1543 // or promote products derived from this software without specific prior
1544 // written permission.
1545 //
1546 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1547 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1548 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1549 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1550 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1551 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1552 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1553 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1554 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1555 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1556 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1557 //
1558 // ---------------------------------------------------------------------------
1559 //
1560 // This file was generated by the make_version_header.py tool.
1561 //
1562 
1563 extern (C):
1564 
1565 enum CEF_VERSION = "119.3.1+gf768881+chromium-119.0.6045.124";
1566 enum CEF_VERSION_MAJOR = 119;
1567 enum CEF_VERSION_MINOR = 3;
1568 enum CEF_VERSION_PATCH = 1;
1569 enum CEF_COMMIT_NUMBER = 2860;
1570 enum CEF_COMMIT_HASH = "f768881e641e15e42efe886babf41ed6a7fc45ca";
1571 enum COPYRIGHT_YEAR = 2023;
1572 
1573 enum CHROME_VERSION_MAJOR = 119;
1574 enum CHROME_VERSION_MINOR = 0;
1575 enum CHROME_VERSION_BUILD = 6045;
1576 enum CHROME_VERSION_PATCH = 124;
1577 
1578 
1579 // Returns CEF version information for the libcef library. The |entry|
1580 // parameter describes which version component will be returned:
1581 // 0 - CEF_VERSION_MAJOR
1582 // 1 - CEF_VERSION_MINOR
1583 // 2 - CEF_VERSION_PATCH
1584 // 3 - CEF_COMMIT_NUMBER
1585 // 4 - CHROME_VERSION_MAJOR
1586 // 5 - CHROME_VERSION_MINOR
1587 // 6 - CHROME_VERSION_BUILD
1588 // 7 - CHROME_VERSION_PATCH
1589 ///
1590 int cef_version_info (int entry);
1591 
1592 // APSTUDIO_HIDDEN_SYMBOLS
1593 
1594 
1595 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
1596 //
1597 // Redistribution and use in source and binary forms, with or without
1598 // modification, are permitted provided that the following conditions are
1599 // met:
1600 //
1601 //    * Redistributions of source code must retain the above copyright
1602 // notice, this list of conditions and the following disclaimer.
1603 //    * Redistributions in binary form must reproduce the above
1604 // copyright notice, this list of conditions and the following disclaimer
1605 // in the documentation and/or other materials provided with the
1606 // distribution.
1607 //    * Neither the name of Google Inc. nor the name Chromium Embedded
1608 // Framework nor the names of its contributors may be used to endorse
1609 // or promote products derived from this software without specific prior
1610 // written permission.
1611 //
1612 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1613 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1614 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1615 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1616 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1617 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1618 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1619 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1620 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1621 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1622 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1623 
1624 extern (C):
1625 
1626 ///
1627 /// Supported content setting types. Some types are platform-specific or only
1628 /// supported with the Chrome runtime. Should be kept in sync with Chromium's
1629 /// ContentSettingsType type.
1630 ///
1631 enum cef_content_setting_types_t
1632 {
1633     // This setting governs whether cookies are enabled by the user in the
1634     /// provided context. However, it may be overridden by other settings. This
1635     /// enum should NOT be read directly to determine whether cookies are enabled;
1636     /// the client should instead rely on the CookieSettings API.
1637     CEF_CONTENT_SETTING_TYPE_COOKIES = 0,
1638     CEF_CONTENT_SETTING_TYPE_IMAGES = 1,
1639     CEF_CONTENT_SETTING_TYPE_JAVASCRIPT = 2,
1640 
1641     /// This setting governs both popups and unwanted redirects like tab-unders
1642     /// and framebusting.
1643     CEF_CONTENT_SETTING_TYPE_POPUPS = 3,
1644 
1645     CEF_CONTENT_SETTING_TYPE_GEOLOCATION = 4,
1646     CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS = 5,
1647     CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE = 6,
1648     CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT = 7,
1649     CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC = 8,
1650     CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA = 9,
1651     CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS = 10,
1652     CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER = 11,
1653     CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS = 12,
1654 
1655     /// Advanced device-specific functions on MIDI devices. MIDI-SysEx
1656     /// communications can be used for changing the MIDI device's persistent state
1657     /// such as firmware.
1658     CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX = 13,
1659 
1660     CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS = 14,
1661     CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER = 15,
1662     CEF_CONTENT_SETTING_TYPE_APP_BANNER = 16,
1663     CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT = 17,
1664     CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE = 18,
1665     CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA = 19,
1666     CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD = 20,
1667     CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC = 21,
1668     CEF_CONTENT_SETTING_TYPE_AUTOPLAY = 22,
1669     CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO = 23,
1670     CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA = 24,
1671     CEF_CONTENT_SETTING_TYPE_ADS = 25,
1672 
1673     /// Website setting which stores metadata for the subresource filter to aid in
1674     /// decisions for whether or not to show the UI.
1675     CEF_CONTENT_SETTING_TYPE_ADS_DATA = 26,
1676 
1677     /// MIDI stands for Musical Instrument Digital Interface. It is a standard
1678     /// that allows electronic musical instruments, computers, and other devices
1679     /// to communicate with each other.
1680     CEF_CONTENT_SETTING_TYPE_MIDI = 27,
1681 
1682     /// This content setting type is for caching password protection service's
1683     /// verdicts of each origin.
1684     CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION = 28,
1685 
1686     /// Website setting which stores engagement data for media related to a
1687     /// specific origin.
1688     CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT = 29,
1689 
1690     /// Content setting which stores whether or not the site can play audible
1691     /// sound. This will not block playback but instead the user will not hear it.
1692     CEF_CONTENT_SETTING_TYPE_SOUND = 30,
1693 
1694     /// Website setting which stores the list of client hints that the origin
1695     /// requested the browser to remember. The browser is expected to send all
1696     /// client hints in the HTTP request headers for every resource requested
1697     /// from that origin.
1698     CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS = 31,
1699 
1700     /// Generic Sensor API covering ambient-light-sensor, accelerometer, gyroscope
1701     /// and magnetometer are all mapped to a single content_settings_type.
1702     /// Setting for the Generic Sensor API covering ambient-light-sensor,
1703     /// accelerometer, gyroscope and magnetometer. These are all mapped to a
1704     /// single ContentSettingsType.
1705     CEF_CONTENT_SETTING_TYPE_SENSORS = 32,
1706 
1707     /// Content setting which stores whether or not the user has granted the site
1708     /// permission to respond to accessibility events, which can be used to
1709     /// provide a custom accessibility experience. Requires explicit user consent
1710     /// because some users may not want sites to know they're using assistive
1711     /// technology.
1712     CEF_CONTENT_SETTING_TYPE_ACCESSIBILITY_EVENTS = 33,
1713 
1714     /// Used to store whether to allow a website to install a payment handler.
1715     CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER = 34,
1716 
1717     /// Content setting which stores whether to allow sites to ask for permission
1718     /// to access USB devices. If this is allowed specific device permissions are
1719     /// stored under USB_CHOOSER_DATA.
1720     CEF_CONTENT_SETTING_TYPE_USB_GUARD = 35,
1721 
1722     /// Nothing is stored in this setting at present. Please refer to
1723     /// BackgroundFetchPermissionContext for details on how this permission
1724     /// is ascertained.
1725     CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH = 36,
1726 
1727     /// Website setting which stores the amount of times the user has dismissed
1728     /// intent picker UI without explicitly choosing an option.
1729     CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY = 37,
1730 
1731     /// Used to store whether to allow a website to detect user active/idle state.
1732     CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION = 38,
1733 
1734     /// Content settings for access to serial ports. The "guard" content setting
1735     /// stores whether to allow sites to ask for permission to access a port. The
1736     /// permissions granted to access particular ports are stored in the "chooser
1737     /// data" website setting.
1738     CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD = 39,
1739     CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA = 40,
1740 
1741     /// Nothing is stored in this setting at present. Please refer to
1742     /// PeriodicBackgroundSyncPermissionContext for details on how this permission
1743     /// is ascertained.
1744     /// This content setting is not registered because it does not require access
1745     /// to any existing providers.
1746     CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC = 41,
1747 
1748     /// Content setting which stores whether to allow sites to ask for permission
1749     /// to do Bluetooth scanning.
1750     CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING = 42,
1751 
1752     /// Content settings for access to HID devices. The "guard" content setting
1753     /// stores whether to allow sites to ask for permission to access a device.
1754     /// The permissions granted to access particular devices are stored in the
1755     /// "chooser data" website setting.
1756     CEF_CONTENT_SETTING_TYPE_HID_GUARD = 43,
1757     CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA = 44,
1758 
1759     /// Wake Lock API, which has two lock types: screen and system locks.
1760     /// Currently, screen locks do not need any additional permission, and system
1761     /// locks are always denied while the right UI is worked out.
1762     CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN = 45,
1763     CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM = 46,
1764 
1765     /// Legacy SameSite cookie behavior. This disables SameSite=Lax-by-default,
1766     /// SameSite=None requires Secure, and Schemeful Same-Site, forcing the
1767     /// legacy behavior wherein 1) cookies that don't specify SameSite are treated
1768     /// as SameSite=None, 2) SameSite=None cookies are not required to be Secure,
1769     /// and 3) schemeful same-site is not active.
1770     ///
1771     /// This will also be used to revert to legacy behavior when future changes
1772     /// in cookie handling are introduced.
1773     CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS = 47,
1774 
1775     /// Content settings which stores whether to allow sites to ask for permission
1776     /// to save changes to an original file selected by the user through the
1777     /// File System Access API.
1778     CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD = 48,
1779 
1780     /// Used to store whether to allow a website to exchange data with NFC
1781     /// devices.
1782     CEF_CONTENT_SETTING_TYPE_NFC = 49,
1783 
1784     /// Website setting to store permissions granted to access particular
1785     /// Bluetooth devices.
1786     CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA = 50,
1787 
1788     /// Full access to the system clipboard (sanitized read without user gesture,
1789     /// and unsanitized read and write with user gesture).
1790     CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE = 51,
1791 
1792     /// This is special-cased in the permissions layer to always allow, and as
1793     /// such doesn't have associated prefs data.
1794     CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE = 52,
1795 
1796     /// This content setting type is for caching safe browsing real time url
1797     /// check's verdicts of each origin.
1798     CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA = 53,
1799 
1800     /// Used to store whether a site is allowed to request AR or VR sessions with
1801     /// the WebXr Device API.
1802     CEF_CONTENT_SETTING_TYPE_VR = 54,
1803     CEF_CONTENT_SETTING_TYPE_AR = 55,
1804 
1805     /// Content setting which stores whether to allow site to open and read files
1806     /// and directories selected through the File System Access API.
1807     CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD = 56,
1808 
1809     /// Access to first party storage in a third-party context. Exceptions are
1810     /// scoped to the combination of requesting/top-level origin, and are managed
1811     /// through the Storage Access API. For the time being, this content setting
1812     /// exists in parallel to third-party cookie rules stored in COOKIES.
1813     CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS = 57,
1814 
1815     /// Content setting which stores whether to allow a site to control camera
1816     /// movements. It does not give access to camera.
1817     CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM = 58,
1818 
1819     /// Content setting for Screen Enumeration and Screen Detail functionality.
1820     /// Permits access to detailed multi-screen information, like size and
1821     /// position. Permits placing fullscreen and windowed content on specific
1822     /// screens. See also: https://w3c.github.io/window-placement
1823     CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT = 59,
1824 
1825     /// Stores whether to allow insecure websites to make private network
1826     /// requests.
1827     /// See also: https://wicg.github.io/cors-rfc1918
1828     /// Set through enterprise policies only.
1829     CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK = 60,
1830 
1831     /// Content setting which stores whether or not a site can access low-level
1832     /// locally installed font data using the Local Fonts Access API.
1833     CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS = 61,
1834 
1835     /// Stores per-origin state for permission auto-revocation (for all permission
1836     /// types).
1837     CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA = 62,
1838 
1839     /// Stores per-origin state of the most recently selected directory for the
1840     /// use by the File System Access API.
1841     CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY = 63,
1842 
1843     /// Controls access to the getDisplayMedia API when {preferCurrentTab: true}
1844     /// is specified.
1845     CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE = 64,
1846 
1847     /// Website setting to store permissions metadata granted to paths on the
1848     /// local file system via the File System Access API.
1849     /// |FILE_SYSTEM_WRITE_GUARD| is the corresponding "guard" setting. The stored
1850     /// data represents valid permission only if
1851     /// |FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION| is enabled via user opt-in.
1852     /// Otherwise, they represent "recently granted but revoked permission", which
1853     /// are used to restore the permission.
1854     CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA = 65,
1855 
1856     /// Stores a grant that allows a relying party to send a request for identity
1857     /// information to specified identity providers, potentially through any
1858     /// anti-tracking measures that would otherwise prevent it. This setting is
1859     /// associated with the relying party's origin.
1860     CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING = 66,
1861 
1862     /// Whether to use the v8 optimized JIT for running JavaScript on the page.
1863     CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT = 67,
1864 
1865     /// Content setting which stores user decisions to allow loading a site over
1866     /// HTTP. Entries are added by hostname when a user bypasses the HTTPS-First
1867     /// Mode interstitial warning when a site does not support HTTPS. Allowed
1868     /// hosts are exact hostname matches -- subdomains of a host on the allowlist
1869     /// must be separately allowlisted.
1870     CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED = 68,
1871 
1872     /// Stores metadata related to form fill, such as e.g. whether user data was
1873     /// autofilled on a specific website.
1874     CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA = 69,
1875 
1876     /// Setting to indicate that there is an active federated sign-in session
1877     /// between a specified relying party and a specified identity provider for
1878     /// a specified account. When this is present it allows access to session
1879     /// management capabilities between the sites. This setting is associated
1880     /// with the relying party's origin.
1881     CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_ACTIVE_SESSION = 70,
1882 
1883     /// Setting to indicate whether Chrome should automatically apply darkening to
1884     /// web content.
1885     CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT = 71,
1886 
1887     /// Setting to indicate whether Chrome should request the desktop view of a
1888     /// site instead of the mobile one.
1889     CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE = 72,
1890 
1891     /// Setting to indicate whether browser should allow signing into a website
1892     /// via the browser FedCM API.
1893     CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API = 73,
1894 
1895     /// Stores notification interactions per origin for the past 90 days.
1896     /// Interactions per origin are pre-aggregated over seven-day windows: A
1897     /// notification interaction or display is assigned to the last Monday
1898     /// midnight in local time.
1899     CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS = 74,
1900 
1901     /// Website setting which stores the last reduced accept language negotiated
1902     /// for a given origin, to be used on future visits to the origin.
1903     CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE = 75,
1904 
1905     /// Website setting which is used for NotificationPermissionReviewService to
1906     /// store origin blocklist from review notification permissions feature.
1907     CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW = 76,
1908 
1909     /// Website setting to store permissions granted to access particular devices
1910     /// in private network.
1911     CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD = 77,
1912     CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA = 78,
1913 
1914     /// Website setting which stores whether the browser has observed the user
1915     /// signing into an identity-provider based on observing the IdP-SignIn-Status
1916     /// HTTP header.
1917     CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS = 79,
1918 
1919     /// Website setting which is used for UnusedSitePermissionsService to
1920     /// store revoked permissions of unused sites from unused site permissions
1921     /// feature.
1922     CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS = 80,
1923 
1924     /// Similar to STORAGE_ACCESS, but applicable at the page-level rather than
1925     /// being specific to a frame.
1926     CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS = 81,
1927 
1928     /// Setting to indicate whether user has opted in to allowing auto re-authn
1929     /// via the FedCM API.
1930     CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION = 82,
1931 
1932     /// Website setting which stores whether the user has explicitly registered
1933     /// a website as an identity-provider.
1934     CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION = 83,
1935 
1936     /// Content setting which is used to indicate whether anti-abuse functionality
1937     /// should be enabled.
1938     CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE = 84,
1939 
1940     /// Content setting used to indicate whether third-party storage partitioning
1941     /// should be enabled.
1942     CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING = 85,
1943 
1944     /// Used to indicate whether HTTPS-First Mode is enabled on the hostname.
1945     CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED = 86,
1946 
1947     /// Setting for enabling the `getAllScreensMedia` API. Spec link:
1948     /// https://github.com/screen-share/capture-all-screens
1949     CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE = 87,
1950 
1951     /// Stores per origin metadata for cookie controls.
1952     CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA = 88,
1953 
1954     /// Content Setting for 3PC accesses granted via 3PC deprecation trial.
1955     CEF_CONTENT_SETTING_TYPE_TPCD_SUPPORT = 89,
1956 
1957     /// Content setting used to indicate whether entering picture-in-picture
1958     /// automatically should be enabled.
1959     CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE = 90,
1960 
1961     /// Content Setting for 3PC accesses granted by metadata delivered via the
1962     /// component updater service. This type will only be used when
1963     /// `net::features::kTpcdMetadataGrants` is enabled.
1964     CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS = 91,
1965 
1966     /// Whether user has opted into keeping file/directory permissions persistent
1967     /// between visits for a given origin. When enabled, permission metadata
1968     /// stored under |FILE_SYSTEM_ACCESS_CHOOSER_DATA| can auto-grant incoming
1969     /// permission request.
1970     CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION = 92,
1971 
1972     CEF_CONTENT_SETTING_TYPE_NUM_TYPES = 93
1973 }
1974 
1975 alias CEF_CONTENT_SETTING_TYPE_COOKIES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_COOKIES;
1976 alias CEF_CONTENT_SETTING_TYPE_IMAGES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IMAGES;
1977 alias CEF_CONTENT_SETTING_TYPE_JAVASCRIPT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_JAVASCRIPT;
1978 alias CEF_CONTENT_SETTING_TYPE_POPUPS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_POPUPS;
1979 alias CEF_CONTENT_SETTING_TYPE_GEOLOCATION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_GEOLOCATION;
1980 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS;
1981 alias CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE;
1982 alias CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT;
1983 alias CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC;
1984 alias CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA;
1985 alias CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS;
1986 alias CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER;
1987 alias CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS;
1988 alias CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX;
1989 alias CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS;
1990 alias CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER;
1991 alias CEF_CONTENT_SETTING_TYPE_APP_BANNER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_APP_BANNER;
1992 alias CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT;
1993 alias CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE;
1994 alias CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA;
1995 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD;
1996 alias CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC;
1997 alias CEF_CONTENT_SETTING_TYPE_AUTOPLAY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTOPLAY;
1998 alias CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO;
1999 alias CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA;
2000 alias CEF_CONTENT_SETTING_TYPE_ADS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ADS;
2001 alias CEF_CONTENT_SETTING_TYPE_ADS_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ADS_DATA;
2002 alias CEF_CONTENT_SETTING_TYPE_MIDI = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIDI;
2003 alias CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION;
2004 alias CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT;
2005 alias CEF_CONTENT_SETTING_TYPE_SOUND = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SOUND;
2006 alias CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS;
2007 alias CEF_CONTENT_SETTING_TYPE_SENSORS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SENSORS;
2008 alias CEF_CONTENT_SETTING_TYPE_ACCESSIBILITY_EVENTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ACCESSIBILITY_EVENTS;
2009 alias CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER;
2010 alias CEF_CONTENT_SETTING_TYPE_USB_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_USB_GUARD;
2011 alias CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH;
2012 alias CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY;
2013 alias CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION;
2014 alias CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD;
2015 alias CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA;
2016 alias CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC;
2017 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING;
2018 alias CEF_CONTENT_SETTING_TYPE_HID_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HID_GUARD;
2019 alias CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA;
2020 alias CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN;
2021 alias CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM;
2022 alias CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS;
2023 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD;
2024 alias CEF_CONTENT_SETTING_TYPE_NFC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NFC;
2025 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA;
2026 alias CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE;
2027 alias CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE;
2028 alias CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA;
2029 alias CEF_CONTENT_SETTING_TYPE_VR = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_VR;
2030 alias CEF_CONTENT_SETTING_TYPE_AR = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AR;
2031 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD;
2032 alias CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS;
2033 alias CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM;
2034 alias CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT;
2035 alias CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK;
2036 alias CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS;
2037 alias CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA;
2038 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY;
2039 alias CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE;
2040 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA;
2041 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING;
2042 alias CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT;
2043 alias CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED;
2044 alias CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA;
2045 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_ACTIVE_SESSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_ACTIVE_SESSION;
2046 alias CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT;
2047 alias CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE;
2048 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API;
2049 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS;
2050 alias CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE;
2051 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW;
2052 alias CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD;
2053 alias CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA;
2054 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS;
2055 alias CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS;
2056 alias CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS;
2057 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION;
2058 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION;
2059 alias CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE;
2060 alias CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING;
2061 alias CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED;
2062 alias CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE;
2063 alias CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA;
2064 alias CEF_CONTENT_SETTING_TYPE_TPCD_SUPPORT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TPCD_SUPPORT;
2065 alias CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE;
2066 alias CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS;
2067 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION;
2068 alias CEF_CONTENT_SETTING_TYPE_NUM_TYPES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NUM_TYPES;
2069 
2070 ///
2071 /// Supported content setting values. Should be kept in sync with Chromium's
2072 /// ContentSetting type.
2073 ///
2074 enum cef_content_setting_values_t
2075 {
2076     CEF_CONTENT_SETTING_VALUE_DEFAULT = 0,
2077     CEF_CONTENT_SETTING_VALUE_ALLOW = 1,
2078     CEF_CONTENT_SETTING_VALUE_BLOCK = 2,
2079     CEF_CONTENT_SETTING_VALUE_ASK = 3,
2080     CEF_CONTENT_SETTING_VALUE_SESSION_ONLY = 4,
2081     CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT = 5,
2082 
2083     CEF_CONTENT_SETTING_VALUE_NUM_VALUES = 6
2084 }
2085 
2086 alias CEF_CONTENT_SETTING_VALUE_DEFAULT = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_DEFAULT;
2087 alias CEF_CONTENT_SETTING_VALUE_ALLOW = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_ALLOW;
2088 alias CEF_CONTENT_SETTING_VALUE_BLOCK = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_BLOCK;
2089 alias CEF_CONTENT_SETTING_VALUE_ASK = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_ASK;
2090 alias CEF_CONTENT_SETTING_VALUE_SESSION_ONLY = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_SESSION_ONLY;
2091 alias CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT;
2092 alias CEF_CONTENT_SETTING_VALUE_NUM_VALUES = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_NUM_VALUES;
2093 
2094 // CEF_INCLUDE_INTERNAL_CEF_TYPES_CONTENT_SETTINGS_H_
2095 
2096 // CEF_INCLUDE_CEF_VERSION_H_
2097 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
2098 //
2099 // Redistribution and use in source and binary forms, with or without
2100 // modification, are permitted provided that the following conditions are
2101 // met:
2102 //
2103 //    * Redistributions of source code must retain the above copyright
2104 // notice, this list of conditions and the following disclaimer.
2105 //    * Redistributions in binary form must reproduce the above
2106 // copyright notice, this list of conditions and the following disclaimer
2107 // in the documentation and/or other materials provided with the
2108 // distribution.
2109 //    * Neither the name of Google Inc. nor the name Chromium Embedded
2110 // Framework nor the names of its contributors may be used to endorse
2111 // or promote products derived from this software without specific prior
2112 // written permission.
2113 //
2114 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2115 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2116 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2117 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2118 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2119 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2120 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2121 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2122 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2123 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2124 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2125 //
2126 // ---------------------------------------------------------------------------
2127 //
2128 // This file was generated by the make_api_hash_header.py tool.
2129 //
2130 
2131 extern (C):
2132 
2133 // The API hash is created by analyzing CEF header files for C API type
2134 // definitions. The hash value will change when header files are modified in a
2135 // way that may cause binary incompatibility with other builds. The universal
2136 // hash value will change if any platform is affected whereas the platform hash
2137 // values will change only if that particular platform is affected.
2138 enum CEF_API_HASH_UNIVERSAL = "c0c754c1ca4f72f6ca6a80861b38b34a61ed5116";
2139 
2140 enum CEF_API_HASH_PLATFORM = "75cbf2876ee57cc093f9ab7905e19034754a4b8a";
2141 
2142 ///
2143 // Returns CEF API hashes for the libcef library. The returned string is owned
2144 // by the library and should not be freed. The |entry| parameter describes which
2145 // hash value will be returned:
2146 // 0 - CEF_API_HASH_PLATFORM
2147 // 1 - CEF_API_HASH_UNIVERSAL
2148 // 2 - CEF_COMMIT_HASH (from cef_version.h)
2149 ///
2150 const(char)* cef_api_hash (int entry);
2151 
2152 // CEF_INCLUDE_API_HASH_H_
2153 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
2154 //
2155 // Redistribution and use in source and binary forms, with or without
2156 // modification, are permitted provided that the following conditions are
2157 // met:
2158 //
2159 //    * Redistributions of source code must retain the above copyright
2160 // notice, this list of conditions and the following disclaimer.
2161 //    * Redistributions in binary form must reproduce the above
2162 // copyright notice, this list of conditions and the following disclaimer
2163 // in the documentation and/or other materials provided with the
2164 // distribution.
2165 //    * Neither the name of Google Inc. nor the name Chromium Embedded
2166 // Framework nor the names of its contributors may be used to endorse
2167 // or promote products derived from this software without specific prior
2168 // written permission.
2169 //
2170 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2171 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2172 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2173 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2174 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2175 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2176 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2177 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2178 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2179 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2180 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2181 
2182 extern (C):
2183 
2184 ///
2185 /// Structure representing a point.
2186 ///
2187 struct cef_point_t
2188 {
2189     int x;
2190     int y;
2191 }
2192 
2193 
2194 
2195 ///
2196 /// Structure representing a rectangle.
2197 ///
2198 struct cef_rect_t
2199 {
2200     int x;
2201     int y;
2202     int width;
2203     int height;
2204 }
2205 
2206 
2207 
2208 ///
2209 /// Structure representing a size.
2210 ///
2211 struct cef_size_t
2212 {
2213     int width;
2214     int height;
2215 }
2216 
2217 
2218 
2219 ///
2220 /// Structure representing insets.
2221 ///
2222 struct cef_insets_t
2223 {
2224     int top;
2225     int left;
2226     int bottom;
2227     int right;
2228 }
2229 
2230 
2231 
2232 // CEF_INCLUDE_INTERNAL_CEF_TYPES_GEOMETRY_H_
2233 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
2234 //
2235 // Redistribution and use in source and binary forms, with or without
2236 // modification, are permitted provided that the following conditions are
2237 // met:
2238 //
2239 //    * Redistributions of source code must retain the above copyright
2240 // notice, this list of conditions and the following disclaimer.
2241 //    * Redistributions in binary form must reproduce the above
2242 // copyright notice, this list of conditions and the following disclaimer
2243 // in the documentation and/or other materials provided with the
2244 // distribution.
2245 //    * Neither the name of Google Inc. nor the name Chromium Embedded
2246 // Framework nor the names of its contributors may be used to endorse
2247 // or promote products derived from this software without specific prior
2248 // written permission.
2249 //
2250 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2251 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2252 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2253 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2254 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2255 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2256 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2257 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2258 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2259 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2260 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2261 
2262 import core.stdc.config;
2263 import core.stdc.limits;
2264 
2265 extern (C):
2266 
2267 // Bring in platform-specific definitions.
2268 
2269 // 32-bit ARGB color value, not premultiplied. The color components are always
2270 // in a known order. Equivalent to the SkColor type.
2271 alias cef_color_t = uint;
2272 
2273 // Return the alpha byte from a cef_color_t value.
2274 
2275 
2276 // Return the red byte from a cef_color_t value.
2277 
2278 
2279 // Return the green byte from a cef_color_t value.
2280 
2281 
2282 // Return the blue byte from a cef_color_t value.
2283 
2284 
2285 // Return an cef_color_t value with the specified byte component values.
2286 
2287 
2288 // Return an int64_t value with the specified low and high int32_t component
2289 // values.
2290 
2291 
2292 // Return the low int32_t value from an int64_t value.
2293 
2294 
2295 // Return the high int32_t value from an int64_t value.
2296 
2297 
2298 ///
2299 /// Log severity levels.
2300 ///
2301 enum cef_log_severity_t
2302 {
2303     ///
2304     /// Default logging (currently INFO logging).
2305     ///
2306     LOGSEVERITY_DEFAULT = 0,
2307 
2308     ///
2309     /// Verbose logging.
2310     ///
2311     LOGSEVERITY_VERBOSE = 1,
2312 
2313     ///
2314     /// DEBUG logging.
2315     ///
2316     LOGSEVERITY_DEBUG = LOGSEVERITY_VERBOSE,
2317 
2318     ///
2319     /// INFO logging.
2320     ///
2321     LOGSEVERITY_INFO = 2,
2322 
2323     ///
2324     /// WARNING logging.
2325     ///
2326     LOGSEVERITY_WARNING = 3,
2327 
2328     ///
2329     /// ERROR logging.
2330     ///
2331     LOGSEVERITY_ERROR = 4,
2332 
2333     ///
2334     /// FATAL logging.
2335     ///
2336     LOGSEVERITY_FATAL = 5,
2337 
2338     ///
2339     /// Disable logging to file for all messages, and to stderr for messages with
2340     /// severity less than FATAL.
2341     ///
2342     LOGSEVERITY_DISABLE = 99
2343 }
2344 
2345 alias LOGSEVERITY_DEFAULT = cef_log_severity_t.LOGSEVERITY_DEFAULT;
2346 alias LOGSEVERITY_VERBOSE = cef_log_severity_t.LOGSEVERITY_VERBOSE;
2347 alias LOGSEVERITY_DEBUG = cef_log_severity_t.LOGSEVERITY_DEBUG;
2348 alias LOGSEVERITY_INFO = cef_log_severity_t.LOGSEVERITY_INFO;
2349 alias LOGSEVERITY_WARNING = cef_log_severity_t.LOGSEVERITY_WARNING;
2350 alias LOGSEVERITY_ERROR = cef_log_severity_t.LOGSEVERITY_ERROR;
2351 alias LOGSEVERITY_FATAL = cef_log_severity_t.LOGSEVERITY_FATAL;
2352 alias LOGSEVERITY_DISABLE = cef_log_severity_t.LOGSEVERITY_DISABLE;
2353 
2354 ///
2355 /// Log items prepended to each log line.
2356 ///
2357 enum cef_log_items_t
2358 {
2359     ///
2360     /// Prepend the default list of items.
2361     ///
2362     LOG_ITEMS_DEFAULT = 0,
2363 
2364     ///
2365     /// Prepend no items.
2366     ///
2367     LOG_ITEMS_NONE = 1,
2368 
2369     ///
2370     /// Prepend the process ID.
2371     ///
2372     LOG_ITEMS_FLAG_PROCESS_ID = 1 << 1,
2373 
2374     ///
2375     /// Prepend the thread ID.
2376     ///
2377     LOG_ITEMS_FLAG_THREAD_ID = 1 << 2,
2378 
2379     ///
2380     /// Prepend the timestamp.
2381     ///
2382     LOG_ITEMS_FLAG_TIME_STAMP = 1 << 3,
2383 
2384     ///
2385     /// Prepend the tickcount.
2386     ///
2387     LOG_ITEMS_FLAG_TICK_COUNT = 1 << 4
2388 }
2389 
2390 alias LOG_ITEMS_DEFAULT = cef_log_items_t.LOG_ITEMS_DEFAULT;
2391 alias LOG_ITEMS_NONE = cef_log_items_t.LOG_ITEMS_NONE;
2392 alias LOG_ITEMS_FLAG_PROCESS_ID = cef_log_items_t.LOG_ITEMS_FLAG_PROCESS_ID;
2393 alias LOG_ITEMS_FLAG_THREAD_ID = cef_log_items_t.LOG_ITEMS_FLAG_THREAD_ID;
2394 alias LOG_ITEMS_FLAG_TIME_STAMP = cef_log_items_t.LOG_ITEMS_FLAG_TIME_STAMP;
2395 alias LOG_ITEMS_FLAG_TICK_COUNT = cef_log_items_t.LOG_ITEMS_FLAG_TICK_COUNT;
2396 
2397 ///
2398 /// Represents the state of a setting.
2399 ///
2400 enum cef_state_t
2401 {
2402     ///
2403     /// Use the default state for the setting.
2404     ///
2405     STATE_DEFAULT = 0,
2406 
2407     ///
2408     /// Enable or allow the setting.
2409     ///
2410     STATE_ENABLED = 1,
2411 
2412     ///
2413     /// Disable or disallow the setting.
2414     ///
2415     STATE_DISABLED = 2
2416 }
2417 
2418 alias STATE_DEFAULT = cef_state_t.STATE_DEFAULT;
2419 alias STATE_ENABLED = cef_state_t.STATE_ENABLED;
2420 alias STATE_DISABLED = cef_state_t.STATE_DISABLED;
2421 
2422 ///
2423 /// Initialization settings. Specify NULL or 0 to get the recommended default
2424 /// values. Many of these and other settings can also configured using command-
2425 /// line switches.
2426 ///
2427 struct cef_settings_t
2428 {
2429     ///
2430     /// Size of this structure.
2431     ///
2432     alias size_t = c_ulong;
2433     size_t size;
2434 
2435     ///
2436     /// Set to true (1) to disable the sandbox for sub-processes. See
2437     /// cef_sandbox_win.h for requirements to enable the sandbox on Windows. Also
2438     /// configurable using the "no-sandbox" command-line switch.
2439     ///
2440     int no_sandbox;
2441 
2442     ///
2443     /// The path to a separate executable that will be launched for sub-processes.
2444     /// If this value is empty on Windows or Linux then the main process
2445     /// executable will be used. If this value is empty on macOS then a helper
2446     /// executable must exist at "Contents/Frameworks/<app>
2447     /// Helper.app/Contents/MacOS/<app> Helper" in the top-level app bundle. See
2448     /// the comments on CefExecuteProcess() for details. If this value is
2449     /// non-empty then it must be an absolute path. Also configurable using the
2450     /// "browser-subprocess-path" command-line switch.
2451     ///
2452     alias cef_string_t = cef_string_utf16_t;
2453     cef_string_t browser_subprocess_path;
2454 
2455     ///
2456     /// The path to the CEF framework directory on macOS. If this value is empty
2457     /// then the framework must exist at "Contents/Frameworks/Chromium Embedded
2458     /// Framework.framework" in the top-level app bundle. If this value is
2459     /// non-empty then it must be an absolute path. Also configurable using the
2460     /// "framework-dir-path" command-line switch.
2461     ///
2462     cef_string_t framework_dir_path;
2463 
2464     ///
2465     /// The path to the main bundle on macOS. If this value is empty then it
2466     /// defaults to the top-level app bundle. If this value is non-empty then it
2467     /// must be an absolute path. Also configurable using the "main-bundle-path"
2468     /// command-line switch.
2469     ///
2470     cef_string_t main_bundle_path;
2471 
2472     ///
2473     /// Set to true (1) to enable use of the Chrome runtime in CEF. This feature
2474     /// is considered experimental and is not recommended for most users at this
2475     /// time. See issue #2969 for details.
2476     ///
2477     int chrome_runtime;
2478 
2479     ///
2480     /// Set to true (1) to have the browser process message loop run in a separate
2481     /// thread. If false (0) then the CefDoMessageLoopWork() function must be
2482     /// called from your application message loop. This option is only supported
2483     /// on Windows and Linux.
2484     ///
2485     int multi_threaded_message_loop;
2486 
2487     ///
2488     /// Set to true (1) to control browser process main (UI) thread message pump
2489     /// scheduling via the CefBrowserProcessHandler::OnScheduleMessagePumpWork()
2490     /// callback. This option is recommended for use in combination with the
2491     /// CefDoMessageLoopWork() function in cases where the CEF message loop must
2492     /// be integrated into an existing application message loop (see additional
2493     /// comments and warnings on CefDoMessageLoopWork). Enabling this option is
2494     /// not recommended for most users; leave this option disabled and use either
2495     /// the CefRunMessageLoop() function or multi_threaded_message_loop if
2496     /// possible.
2497     ///
2498     int external_message_pump;
2499 
2500     ///
2501     /// Set to true (1) to enable windowless (off-screen) rendering support. Do
2502     /// not enable this value if the application does not use windowless rendering
2503     /// as it may reduce rendering performance on some systems.
2504     ///
2505     int windowless_rendering_enabled;
2506 
2507     ///
2508     /// Set to true (1) to disable configuration of browser process features using
2509     /// standard CEF and Chromium command-line arguments. Configuration can still
2510     /// be specified using CEF data structures or via the
2511     /// CefApp::OnBeforeCommandLineProcessing() method.
2512     ///
2513     int command_line_args_disabled;
2514 
2515     ///
2516     /// The location where data for the global browser cache will be stored on
2517     /// disk. If this value is non-empty then it must be an absolute path that is
2518     /// either equal to or a child directory of CefSettings.root_cache_path. If
2519     /// this value is empty then browsers will be created in "incognito mode"
2520     /// where in-memory caches are used for storage and no data is persisted to
2521     /// disk. HTML5 databases such as localStorage will only persist across
2522     /// sessions if a cache path is specified. Can be overridden for individual
2523     /// CefRequestContext instances via the CefRequestContextSettings.cache_path
2524     /// value. When using the Chrome runtime the "default" profile will be used if
2525     /// |cache_path| and |root_cache_path| have the same value.
2526     ///
2527     cef_string_t cache_path;
2528 
2529     ///
2530     /// The root directory that all CefSettings.cache_path and
2531     /// CefRequestContextSettings.cache_path values must have in common. If this
2532     /// value is empty and CefSettings.cache_path is non-empty then it will
2533     /// default to the CefSettings.cache_path value. If both values are empty
2534     /// then the default platform-specific directory will be used
2535     /// ("~/.config/cef_user_data" directory on Linux, "~/Library/Application
2536     /// Support/CEF/User Data" directory on MacOS, "AppData\Local\CEF\User Data"
2537     /// directory under the user profile directory on Windows). If this value is
2538     /// non-empty then it must be an absolute path. Failure to set this value
2539     /// correctly may result in the sandbox blocking read/write access to certain
2540     /// files.
2541     ///
2542     cef_string_t root_cache_path;
2543 
2544     ///
2545     /// To persist session cookies (cookies without an expiry date or validity
2546     /// interval) by default when using the global cookie manager set this value
2547     /// to true (1). Session cookies are generally intended to be transient and
2548     /// most Web browsers do not persist them. A |cache_path| value must also be
2549     /// specified to enable this feature. Also configurable using the
2550     /// "persist-session-cookies" command-line switch. Can be overridden for
2551     /// individual CefRequestContext instances via the
2552     /// CefRequestContextSettings.persist_session_cookies value.
2553     ///
2554     int persist_session_cookies;
2555 
2556     ///
2557     /// To persist user preferences as a JSON file in the cache path directory set
2558     /// this value to true (1). A |cache_path| value must also be specified
2559     /// to enable this feature. Also configurable using the
2560     /// "persist-user-preferences" command-line switch. Can be overridden for
2561     /// individual CefRequestContext instances via the
2562     /// CefRequestContextSettings.persist_user_preferences value.
2563     ///
2564     int persist_user_preferences;
2565 
2566     ///
2567     /// Value that will be returned as the User-Agent HTTP header. If empty the
2568     /// default User-Agent string will be used. Also configurable using the
2569     /// "user-agent" command-line switch.
2570     ///
2571     cef_string_t user_agent;
2572 
2573     ///
2574     /// Value that will be inserted as the product portion of the default
2575     /// User-Agent string. If empty the Chromium product version will be used. If
2576     /// |userAgent| is specified this value will be ignored. Also configurable
2577     /// using the "user-agent-product" command-line switch.
2578     ///
2579     cef_string_t user_agent_product;
2580 
2581     ///
2582     /// The locale string that will be passed to WebKit. If empty the default
2583     /// locale of "en-US" will be used. This value is ignored on Linux where
2584     /// locale is determined using environment variable parsing with the
2585     /// precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also
2586     /// configurable using the "lang" command-line switch.
2587     ///
2588     cef_string_t locale;
2589 
2590     ///
2591     /// The directory and file name to use for the debug log. If empty a default
2592     /// log file name and location will be used. On Windows and Linux a
2593     /// "debug.log" file will be written in the main executable directory. On
2594     /// MacOS a "~/Library/Logs/[app name]_debug.log" file will be written where
2595     /// [app name] is the name of the main app executable. Also configurable using
2596     /// the "log-file" command-line switch.
2597     ///
2598     cef_string_t log_file;
2599 
2600     ///
2601     /// The log severity. Only messages of this severity level or higher will be
2602     /// logged. When set to DISABLE no messages will be written to the log file,
2603     /// but FATAL messages will still be output to stderr. Also configurable using
2604     /// the "log-severity" command-line switch with a value of "verbose", "info",
2605     /// "warning", "error", "fatal" or "disable".
2606     ///
2607     cef_log_severity_t log_severity;
2608 
2609     ///
2610     /// The log items prepended to each log line. If not set the default log items
2611     /// will be used. Also configurable using the "log-items" command-line switch
2612     /// with a value of "none" for no log items, or a comma-delimited list of
2613     /// values "pid", "tid", "timestamp" or "tickcount" for custom log items.
2614     ///
2615     cef_log_items_t log_items;
2616 
2617     ///
2618     /// Custom flags that will be used when initializing the V8 JavaScript engine.
2619     /// The consequences of using custom flags may not be well tested. Also
2620     /// configurable using the "js-flags" command-line switch.
2621     ///
2622     cef_string_t javascript_flags;
2623 
2624     ///
2625     /// The fully qualified path for the resources directory. If this value is
2626     /// empty the *.pak files must be located in the module directory on
2627     /// Windows/Linux or the app bundle Resources directory on MacOS. If this
2628     /// value is non-empty then it must be an absolute path. Also configurable
2629     /// using the "resources-dir-path" command-line switch.
2630     ///
2631     cef_string_t resources_dir_path;
2632 
2633     ///
2634     /// The fully qualified path for the locales directory. If this value is empty
2635     /// the locales directory must be located in the module directory. If this
2636     /// value is non-empty then it must be an absolute path. This value is ignored
2637     /// on MacOS where pack files are always loaded from the app bundle Resources
2638     /// directory. Also configurable using the "locales-dir-path" command-line
2639     /// switch.
2640     ///
2641     cef_string_t locales_dir_path;
2642 
2643     ///
2644     /// Set to true (1) to disable loading of pack files for resources and
2645     /// locales. A resource bundle handler must be provided for the browser and
2646     /// render processes via CefApp::GetResourceBundleHandler() if loading of pack
2647     /// files is disabled. Also configurable using the "disable-pack-loading"
2648     /// command- line switch.
2649     ///
2650     int pack_loading_disabled;
2651 
2652     ///
2653     /// Set to a value between 1024 and 65535 to enable remote debugging on the
2654     /// specified port. Also configurable using the "remote-debugging-port"
2655     /// command-line switch. Remote debugging can be accessed by loading the
2656     /// chrome://inspect page in Google Chrome. Port numbers 9222 and 9229 are
2657     /// discoverable by default. Other port numbers may need to be configured via
2658     /// "Discover network targets" on the Devices tab.
2659     ///
2660     int remote_debugging_port;
2661 
2662     ///
2663     /// The number of stack trace frames to capture for uncaught exceptions.
2664     /// Specify a positive value to enable the
2665     /// CefRenderProcessHandler::OnUncaughtException() callback. Specify 0
2666     /// (default value) and OnUncaughtException() will not be called. Also
2667     /// configurable using the "uncaught-exception-stack-size" command-line
2668     /// switch.
2669     ///
2670     int uncaught_exception_stack_size;
2671 
2672     ///
2673     /// Background color used for the browser before a document is loaded and when
2674     /// no document color is specified. The alpha component must be either fully
2675     /// opaque (0xFF) or fully transparent (0x00). If the alpha component is fully
2676     /// opaque then the RGB components will be used as the background color. If
2677     /// the alpha component is fully transparent for a windowed browser then the
2678     /// default value of opaque white be used. If the alpha component is fully
2679     /// transparent for a windowless (off-screen) browser then transparent
2680     /// painting will be enabled.
2681     ///
2682     cef_color_t background_color;
2683 
2684     ///
2685     /// Comma delimited ordered list of language codes without any whitespace that
2686     /// will be used in the "Accept-Language" HTTP request header and
2687     /// "navigator.language" JS attribute. Can be overridden for individual
2688     /// CefRequestContext instances via the
2689     /// CefRequestContextSettings.accept_language_list value.
2690     ///
2691     cef_string_t accept_language_list;
2692 
2693     ///
2694     /// Comma delimited list of schemes supported by the associated
2695     /// CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0)
2696     /// the default schemes ("http", "https", "ws" and "wss") will also be
2697     /// supported. Not specifying a |cookieable_schemes_list| value and setting
2698     /// |cookieable_schemes_exclude_defaults| to true (1) will disable all loading
2699     /// and saving of cookies. These settings will only impact the global
2700     /// CefRequestContext. Individual CefRequestContext instances can be
2701     /// configured via the CefRequestContextSettings.cookieable_schemes_list and
2702     /// CefRequestContextSettings.cookieable_schemes_exclude_defaults values.
2703     ///
2704     cef_string_t cookieable_schemes_list;
2705     int cookieable_schemes_exclude_defaults;
2706 
2707     ///
2708     /// Specify an ID to enable Chrome policy management via Platform and OS-user
2709     /// policies. On Windows, this is a registry key like
2710     /// "SOFTWARE\\Policies\\Google\\Chrome". On MacOS, this is a bundle ID like
2711     /// "com.google.Chrome". On Linux, this is an absolute directory path like
2712     /// "/etc/opt/chrome/policies". Only supported with the Chrome runtime. See
2713     /// https://support.google.com/chrome/a/answer/9037717 for details.
2714     ///
2715     /// Chrome Browser Cloud Management integration, when enabled via the
2716     /// "enable-chrome-browser-cloud-management" command-line flag, will also use
2717     /// the specified ID. See https://support.google.com/chrome/a/answer/9116814
2718     /// for details.
2719     ///
2720     cef_string_t chrome_policy_id;
2721 }
2722 
2723 
2724 
2725 ///
2726 /// Request context initialization settings. Specify NULL or 0 to get the
2727 /// recommended default values.
2728 ///
2729 struct cef_request_context_settings_t
2730 {
2731     ///
2732     /// Size of this structure.
2733     ///
2734     size_t size;
2735 
2736     ///
2737     /// The location where cache data for this request context will be stored on
2738     /// disk. If this value is non-empty then it must be an absolute path that is
2739     /// either equal to or a child directory of CefSettings.root_cache_path. If
2740     /// this value is empty then browsers will be created in "incognito mode"
2741     /// where in-memory caches are used for storage and no data is persisted to
2742     /// disk. HTML5 databases such as localStorage will only persist across
2743     /// sessions if a cache path is specified. To share the global browser cache
2744     /// and related configuration set this value to match the
2745     /// CefSettings.cache_path value.
2746     ///
2747     cef_string_t cache_path;
2748 
2749     ///
2750     /// To persist session cookies (cookies without an expiry date or validity
2751     /// interval) by default when using the global cookie manager set this value
2752     /// to true (1). Session cookies are generally intended to be transient and
2753     /// most Web browsers do not persist them. Can be set globally using the
2754     /// CefSettings.persist_session_cookies value. This value will be ignored if
2755     /// |cache_path| is empty or if it matches the CefSettings.cache_path value.
2756     ///
2757     int persist_session_cookies;
2758 
2759     ///
2760     /// To persist user preferences as a JSON file in the cache path directory set
2761     /// this value to true (1). Can be set globally using the
2762     /// CefSettings.persist_user_preferences value. This value will be ignored if
2763     /// |cache_path| is empty or if it matches the CefSettings.cache_path value.
2764     ///
2765     int persist_user_preferences;
2766 
2767     ///
2768     /// Comma delimited ordered list of language codes without any whitespace that
2769     /// will be used in the "Accept-Language" HTTP request header and
2770     /// "navigator.language" JS attribute. Can be set globally using the
2771     /// CefSettings.accept_language_list value. If all values are empty then
2772     /// "en-US,en" will be used. This value will be ignored if |cache_path|
2773     /// matches the CefSettings.cache_path value.
2774     ///
2775     cef_string_t accept_language_list;
2776 
2777     ///
2778     /// Comma delimited list of schemes supported by the associated
2779     /// CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0)
2780     /// the default schemes ("http", "https", "ws" and "wss") will also be
2781     /// supported. Not specifying a |cookieable_schemes_list| value and setting
2782     /// |cookieable_schemes_exclude_defaults| to true (1) will disable all loading
2783     /// and saving of cookies. These values will be ignored if |cache_path|
2784     /// matches the CefSettings.cache_path value.
2785     ///
2786     cef_string_t cookieable_schemes_list;
2787     int cookieable_schemes_exclude_defaults;
2788 }
2789 
2790 
2791 
2792 ///
2793 /// Browser initialization settings. Specify NULL or 0 to get the recommended
2794 /// default values. The consequences of using custom values may not be well
2795 /// tested. Many of these and other settings can also configured using command-
2796 /// line switches.
2797 ///
2798 struct cef_browser_settings_t
2799 {
2800     ///
2801     /// Size of this structure.
2802     ///
2803     size_t size;
2804 
2805     ///
2806     /// The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint
2807     /// will be called for a windowless browser. The actual fps may be lower if
2808     /// the browser cannot generate frames at the requested rate. The minimum
2809     /// value is 1 and the maximum value is 60 (default 30). This value can also
2810     /// be changed dynamically via CefBrowserHost::SetWindowlessFrameRate.
2811     ///
2812     int windowless_frame_rate;
2813 
2814     /// BEGIN values that map to WebPreferences settings.
2815 
2816     ///
2817     /// Font settings.
2818     ///
2819     cef_string_t standard_font_family;
2820     cef_string_t fixed_font_family;
2821     cef_string_t serif_font_family;
2822     cef_string_t sans_serif_font_family;
2823     cef_string_t cursive_font_family;
2824     cef_string_t fantasy_font_family;
2825     int default_font_size;
2826     int default_fixed_font_size;
2827     int minimum_font_size;
2828     int minimum_logical_font_size;
2829 
2830     ///
2831     /// Default encoding for Web content. If empty "ISO-8859-1" will be used. Also
2832     /// configurable using the "default-encoding" command-line switch.
2833     ///
2834     cef_string_t default_encoding;
2835 
2836     ///
2837     /// Controls the loading of fonts from remote sources. Also configurable using
2838     /// the "disable-remote-fonts" command-line switch.
2839     ///
2840     cef_state_t remote_fonts;
2841 
2842     ///
2843     /// Controls whether JavaScript can be executed. Also configurable using the
2844     /// "disable-javascript" command-line switch.
2845     ///
2846     cef_state_t javascript;
2847 
2848     ///
2849     /// Controls whether JavaScript can be used to close windows that were not
2850     /// opened via JavaScript. JavaScript can still be used to close windows that
2851     /// were opened via JavaScript or that have no back/forward history. Also
2852     /// configurable using the "disable-javascript-close-windows" command-line
2853     /// switch.
2854     ///
2855     cef_state_t javascript_close_windows;
2856 
2857     ///
2858     /// Controls whether JavaScript can access the clipboard. Also configurable
2859     /// using the "disable-javascript-access-clipboard" command-line switch.
2860     ///
2861     cef_state_t javascript_access_clipboard;
2862 
2863     ///
2864     /// Controls whether DOM pasting is supported in the editor via
2865     /// execCommand("paste"). The |javascript_access_clipboard| setting must also
2866     /// be enabled. Also configurable using the "disable-javascript-dom-paste"
2867     /// command-line switch.
2868     ///
2869     cef_state_t javascript_dom_paste;
2870 
2871     ///
2872     /// Controls whether image URLs will be loaded from the network. A cached
2873     /// image will still be rendered if requested. Also configurable using the
2874     /// "disable-image-loading" command-line switch.
2875     ///
2876     cef_state_t image_loading;
2877 
2878     ///
2879     /// Controls whether standalone images will be shrunk to fit the page. Also
2880     /// configurable using the "image-shrink-standalone-to-fit" command-line
2881     /// switch.
2882     ///
2883     cef_state_t image_shrink_standalone_to_fit;
2884 
2885     ///
2886     /// Controls whether text areas can be resized. Also configurable using the
2887     /// "disable-text-area-resize" command-line switch.
2888     ///
2889     cef_state_t text_area_resize;
2890 
2891     ///
2892     /// Controls whether the tab key can advance focus to links. Also configurable
2893     /// using the "disable-tab-to-links" command-line switch.
2894     ///
2895     cef_state_t tab_to_links;
2896 
2897     ///
2898     /// Controls whether local storage can be used. Also configurable using the
2899     /// "disable-local-storage" command-line switch.
2900     ///
2901     cef_state_t local_storage;
2902 
2903     ///
2904     /// Controls whether databases can be used. Also configurable using the
2905     /// "disable-databases" command-line switch.
2906     ///
2907     cef_state_t databases;
2908 
2909     ///
2910     /// Controls whether WebGL can be used. Note that WebGL requires hardware
2911     /// support and may not work on all systems even when enabled. Also
2912     /// configurable using the "disable-webgl" command-line switch.
2913     ///
2914     cef_state_t webgl;
2915 
2916     /// END values that map to WebPreferences settings.
2917 
2918     ///
2919     /// Background color used for the browser before a document is loaded and when
2920     /// no document color is specified. The alpha component must be either fully
2921     /// opaque (0xFF) or fully transparent (0x00). If the alpha component is fully
2922     /// opaque then the RGB components will be used as the background color. If
2923     /// the alpha component is fully transparent for a windowed browser then the
2924     /// CefSettings.background_color value will be used. If the alpha component is
2925     /// fully transparent for a windowless (off-screen) browser then transparent
2926     /// painting will be enabled.
2927     ///
2928     cef_color_t background_color;
2929 
2930     ///
2931     /// Controls whether the Chrome status bubble will be used. Only supported
2932     /// with the Chrome runtime. For details about the status bubble see
2933     /// https://www.chromium.org/user-experience/status-bubble/
2934     ///
2935     cef_state_t chrome_status_bubble;
2936 
2937     ///
2938     /// Controls whether the Chrome zoom bubble will be shown when zooming. Only
2939     /// supported with the Chrome runtime.
2940     ///
2941     cef_state_t chrome_zoom_bubble;
2942 }
2943 
2944 
2945 
2946 ///
2947 /// Return value types.
2948 ///
2949 enum cef_return_value_t
2950 {
2951     ///
2952     /// Cancel immediately.
2953     ///
2954     RV_CANCEL = 0,
2955 
2956     ///
2957     /// Continue immediately.
2958     ///
2959     RV_CONTINUE = 1,
2960 
2961     ///
2962     /// Continue asynchronously (usually via a callback).
2963     ///
2964     RV_CONTINUE_ASYNC = 2
2965 }
2966 
2967 alias RV_CANCEL = cef_return_value_t.RV_CANCEL;
2968 alias RV_CONTINUE = cef_return_value_t.RV_CONTINUE;
2969 alias RV_CONTINUE_ASYNC = cef_return_value_t.RV_CONTINUE_ASYNC;
2970 
2971 ///
2972 /// URL component parts.
2973 ///
2974 struct cef_urlparts_t
2975 {
2976     ///
2977     /// The complete URL specification.
2978     ///
2979     cef_string_t spec;
2980 
2981     ///
2982     /// Scheme component not including the colon (e.g., "http").
2983     ///
2984     cef_string_t scheme;
2985 
2986     ///
2987     /// User name component.
2988     ///
2989     cef_string_t username;
2990 
2991     ///
2992     /// Password component.
2993     ///
2994     cef_string_t password;
2995 
2996     ///
2997     /// Host component. This may be a hostname, an IPv4 address or an IPv6 literal
2998     /// surrounded by square brackets (e.g., "[2001:db8::1]").
2999     ///
3000     cef_string_t host;
3001 
3002     ///
3003     /// Port number component.
3004     ///
3005     cef_string_t port;
3006 
3007     ///
3008     /// Origin contains just the scheme, host, and port from a URL. Equivalent to
3009     /// clearing any username and password, replacing the path with a slash, and
3010     /// clearing everything after that. This value will be empty for non-standard
3011     /// URLs.
3012     ///
3013     cef_string_t origin;
3014 
3015     ///
3016     /// Path component including the first slash following the host.
3017     ///
3018     cef_string_t path;
3019 
3020     ///
3021     /// Query string component (i.e., everything following the '?').
3022     ///
3023     cef_string_t query;
3024 
3025     ///
3026     /// Fragment (hash) identifier component (i.e., the string following the '#').
3027     ///
3028     cef_string_t fragment;
3029 }
3030 
3031 
3032 
3033 ///
3034 /// Cookie priority values.
3035 ///
3036 enum cef_cookie_priority_t
3037 {
3038     CEF_COOKIE_PRIORITY_LOW = -1,
3039     CEF_COOKIE_PRIORITY_MEDIUM = 0,
3040     CEF_COOKIE_PRIORITY_HIGH = 1
3041 }
3042 
3043 alias CEF_COOKIE_PRIORITY_LOW = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_LOW;
3044 alias CEF_COOKIE_PRIORITY_MEDIUM = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_MEDIUM;
3045 alias CEF_COOKIE_PRIORITY_HIGH = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_HIGH;
3046 
3047 ///
3048 /// Cookie same site values.
3049 ///
3050 enum cef_cookie_same_site_t
3051 {
3052     CEF_COOKIE_SAME_SITE_UNSPECIFIED = 0,
3053     CEF_COOKIE_SAME_SITE_NO_RESTRICTION = 1,
3054     CEF_COOKIE_SAME_SITE_LAX_MODE = 2,
3055     CEF_COOKIE_SAME_SITE_STRICT_MODE = 3
3056 }
3057 
3058 alias CEF_COOKIE_SAME_SITE_UNSPECIFIED = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_UNSPECIFIED;
3059 alias CEF_COOKIE_SAME_SITE_NO_RESTRICTION = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_NO_RESTRICTION;
3060 alias CEF_COOKIE_SAME_SITE_LAX_MODE = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_LAX_MODE;
3061 alias CEF_COOKIE_SAME_SITE_STRICT_MODE = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_STRICT_MODE;
3062 
3063 ///
3064 /// Cookie information.
3065 ///
3066 struct cef_cookie_t
3067 {
3068     ///
3069     /// The cookie name.
3070     ///
3071     cef_string_t name;
3072 
3073     ///
3074     /// The cookie value.
3075     ///
3076     cef_string_t value;
3077 
3078     ///
3079     /// If |domain| is empty a host cookie will be created instead of a domain
3080     /// cookie. Domain cookies are stored with a leading "." and are visible to
3081     /// sub-domains whereas host cookies are not.
3082     ///
3083     cef_string_t domain;
3084 
3085     ///
3086     /// If |path| is non-empty only URLs at or below the path will get the cookie
3087     /// value.
3088     ///
3089     cef_string_t path;
3090 
3091     ///
3092     /// If |secure| is true the cookie will only be sent for HTTPS requests.
3093     ///
3094     int secure;
3095 
3096     ///
3097     /// If |httponly| is true the cookie will only be sent for HTTP requests.
3098     ///
3099     int httponly;
3100 
3101     ///
3102     /// The cookie creation date. This is automatically populated by the system on
3103     /// cookie creation.
3104     ///
3105     cef_basetime_t creation;
3106 
3107     ///
3108     /// The cookie last access date. This is automatically populated by the system
3109     /// on access.
3110     ///
3111     cef_basetime_t last_access;
3112 
3113     ///
3114     /// The cookie expiration date is only valid if |has_expires| is true.
3115     ///
3116     int has_expires;
3117     cef_basetime_t expires;
3118 
3119     ///
3120     /// Same site.
3121     ///
3122     cef_cookie_same_site_t same_site;
3123 
3124     ///
3125     /// Priority.
3126     ///
3127     cef_cookie_priority_t priority;
3128 }
3129 
3130 
3131 
3132 ///
3133 /// Process termination status values.
3134 ///
3135 enum cef_termination_status_t
3136 {
3137     ///
3138     /// Non-zero exit status.
3139     ///
3140     TS_ABNORMAL_TERMINATION = 0,
3141 
3142     ///
3143     /// SIGKILL or task manager kill.
3144     ///
3145     TS_PROCESS_WAS_KILLED = 1,
3146 
3147     ///
3148     /// Segmentation fault.
3149     ///
3150     TS_PROCESS_CRASHED = 2,
3151 
3152     ///
3153     /// Out of memory. Some platforms may use TS_PROCESS_CRASHED instead.
3154     ///
3155     TS_PROCESS_OOM = 3
3156 }
3157 
3158 alias TS_ABNORMAL_TERMINATION = cef_termination_status_t.TS_ABNORMAL_TERMINATION;
3159 alias TS_PROCESS_WAS_KILLED = cef_termination_status_t.TS_PROCESS_WAS_KILLED;
3160 alias TS_PROCESS_CRASHED = cef_termination_status_t.TS_PROCESS_CRASHED;
3161 alias TS_PROCESS_OOM = cef_termination_status_t.TS_PROCESS_OOM;
3162 
3163 ///
3164 /// Path key values.
3165 ///
3166 enum cef_path_key_t
3167 {
3168     ///
3169     /// Current directory.
3170     ///
3171     PK_DIR_CURRENT = 0,
3172 
3173     ///
3174     /// Directory containing PK_FILE_EXE.
3175     ///
3176     PK_DIR_EXE = 1,
3177 
3178     ///
3179     /// Directory containing PK_FILE_MODULE.
3180     ///
3181     PK_DIR_MODULE = 2,
3182 
3183     ///
3184     /// Temporary directory.
3185     ///
3186     PK_DIR_TEMP = 3,
3187 
3188     ///
3189     /// Path and filename of the current executable.
3190     ///
3191     PK_FILE_EXE = 4,
3192 
3193     ///
3194     /// Path and filename of the module containing the CEF code (usually the
3195     /// libcef module).
3196     ///
3197     PK_FILE_MODULE = 5,
3198 
3199     ///
3200     /// "Local Settings\Application Data" directory under the user profile
3201     /// directory on Windows.
3202     ///
3203     PK_LOCAL_APP_DATA = 6,
3204 
3205     ///
3206     /// "Application Data" directory under the user profile directory on Windows
3207     /// and "~/Library/Application Support" directory on MacOS.
3208     ///
3209     PK_USER_DATA = 7,
3210 
3211     ///
3212     /// Directory containing application resources. Can be configured via
3213     /// CefSettings.resources_dir_path.
3214     ///
3215     PK_DIR_RESOURCES = 8
3216 }
3217 
3218 alias PK_DIR_CURRENT = cef_path_key_t.PK_DIR_CURRENT;
3219 alias PK_DIR_EXE = cef_path_key_t.PK_DIR_EXE;
3220 alias PK_DIR_MODULE = cef_path_key_t.PK_DIR_MODULE;
3221 alias PK_DIR_TEMP = cef_path_key_t.PK_DIR_TEMP;
3222 alias PK_FILE_EXE = cef_path_key_t.PK_FILE_EXE;
3223 alias PK_FILE_MODULE = cef_path_key_t.PK_FILE_MODULE;
3224 alias PK_LOCAL_APP_DATA = cef_path_key_t.PK_LOCAL_APP_DATA;
3225 alias PK_USER_DATA = cef_path_key_t.PK_USER_DATA;
3226 alias PK_DIR_RESOURCES = cef_path_key_t.PK_DIR_RESOURCES;
3227 
3228 ///
3229 /// Storage types.
3230 ///
3231 enum cef_storage_type_t
3232 {
3233     ST_LOCALSTORAGE = 0,
3234     ST_SESSIONSTORAGE = 1
3235 }
3236 
3237 alias ST_LOCALSTORAGE = cef_storage_type_t.ST_LOCALSTORAGE;
3238 alias ST_SESSIONSTORAGE = cef_storage_type_t.ST_SESSIONSTORAGE;
3239 
3240 ///
3241 /// Supported error code values. For the complete list of error values see
3242 /// "include/base/internal/cef_net_error_list.h".
3243 ///
3244 enum cef_errorcode_t
3245 {
3246     // No error.
3247     ERR_NONE = 0,
3248     ERR_IO_PENDING = -1,
3249     ERR_FAILED = -2,
3250     ERR_ABORTED = -3,
3251     ERR_INVALID_ARGUMENT = -4,
3252     ERR_INVALID_HANDLE = -5,
3253     ERR_FILE_NOT_FOUND = -6,
3254     ERR_TIMED_OUT = -7,
3255     ERR_FILE_TOO_BIG = -8,
3256     ERR_UNEXPECTED = -9,
3257     ERR_ACCESS_DENIED = -10,
3258     ERR_NOT_IMPLEMENTED = -11,
3259     ERR_INSUFFICIENT_RESOURCES = -12,
3260     ERR_OUT_OF_MEMORY = -13,
3261     ERR_UPLOAD_FILE_CHANGED = -14,
3262     ERR_SOCKET_NOT_CONNECTED = -15,
3263     ERR_FILE_EXISTS = -16,
3264     ERR_FILE_PATH_TOO_LONG = -17,
3265     ERR_FILE_NO_SPACE = -18,
3266     ERR_FILE_VIRUS_INFECTED = -19,
3267     ERR_BLOCKED_BY_CLIENT = -20,
3268     ERR_NETWORK_CHANGED = -21,
3269     ERR_BLOCKED_BY_ADMINISTRATOR = -22,
3270     ERR_SOCKET_IS_CONNECTED = -23,
3271     ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = -25,
3272     ERR_CONTEXT_SHUT_DOWN = -26,
3273     ERR_BLOCKED_BY_RESPONSE = -27,
3274     ERR_CLEARTEXT_NOT_PERMITTED = -29,
3275     ERR_BLOCKED_BY_CSP = -30,
3276     ERR_H2_OR_QUIC_REQUIRED = -31,
3277     ERR_BLOCKED_BY_ORB = -32,
3278     ERR_CONNECTION_CLOSED = -100,
3279     ERR_CONNECTION_RESET = -101,
3280     ERR_CONNECTION_REFUSED = -102,
3281     ERR_CONNECTION_ABORTED = -103,
3282     ERR_CONNECTION_FAILED = -104,
3283     ERR_NAME_NOT_RESOLVED = -105,
3284     ERR_INTERNET_DISCONNECTED = -106,
3285     ERR_SSL_PROTOCOL_ERROR = -107,
3286     ERR_ADDRESS_INVALID = -108,
3287     ERR_ADDRESS_UNREACHABLE = -109,
3288     ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110,
3289     ERR_TUNNEL_CONNECTION_FAILED = -111,
3290     ERR_NO_SSL_VERSIONS_ENABLED = -112,
3291     ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113,
3292     ERR_SSL_RENEGOTIATION_REQUESTED = -114,
3293     ERR_PROXY_AUTH_UNSUPPORTED = -115,
3294     ERR_BAD_SSL_CLIENT_AUTH_CERT = -117,
3295     ERR_CONNECTION_TIMED_OUT = -118,
3296     ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = -119,
3297     ERR_SOCKS_CONNECTION_FAILED = -120,
3298     ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = -121,
3299     ERR_ALPN_NEGOTIATION_FAILED = -122,
3300     ERR_SSL_NO_RENEGOTIATION = -123,
3301     ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = -124,
3302     ERR_SSL_DECOMPRESSION_FAILURE_ALERT = -125,
3303     ERR_SSL_BAD_RECORD_MAC_ALERT = -126,
3304     ERR_PROXY_AUTH_REQUESTED = -127,
3305     ERR_PROXY_CONNECTION_FAILED = -130,
3306     ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = -131,
3307     ERR_PRECONNECT_MAX_SOCKET_LIMIT = -133,
3308     ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = -134,
3309     ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = -135,
3310     ERR_PROXY_CERTIFICATE_INVALID = -136,
3311     ERR_NAME_RESOLUTION_FAILED = -137,
3312     ERR_NETWORK_ACCESS_DENIED = -138,
3313     ERR_TEMPORARILY_THROTTLED = -139,
3314     ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = -140,
3315     ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = -141,
3316     ERR_MSG_TOO_BIG = -142,
3317     ERR_WS_PROTOCOL_ERROR = -145,
3318     ERR_ADDRESS_IN_USE = -147,
3319     ERR_SSL_HANDSHAKE_NOT_COMPLETED = -148,
3320     ERR_SSL_BAD_PEER_PUBLIC_KEY = -149,
3321     ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = -150,
3322     ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = -151,
3323     ERR_SSL_DECRYPT_ERROR_ALERT = -153,
3324     ERR_WS_THROTTLE_QUEUE_TOO_LARGE = -154,
3325     ERR_SSL_SERVER_CERT_CHANGED = -156,
3326     ERR_SSL_UNRECOGNIZED_NAME_ALERT = -159,
3327     ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = -160,
3328     ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = -161,
3329     ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = -162,
3330     ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = -163,
3331     ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = -164,
3332     ERR_ICANN_NAME_COLLISION = -166,
3333     ERR_SSL_SERVER_CERT_BAD_FORMAT = -167,
3334     ERR_CT_STH_PARSING_FAILED = -168,
3335     ERR_CT_STH_INCOMPLETE = -169,
3336     ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = -170,
3337     ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = -171,
3338     ERR_SSL_OBSOLETE_CIPHER = -172,
3339     ERR_WS_UPGRADE = -173,
3340     ERR_READ_IF_READY_NOT_IMPLEMENTED = -174,
3341     ERR_NO_BUFFER_SPACE = -176,
3342     ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = -177,
3343     ERR_EARLY_DATA_REJECTED = -178,
3344     ERR_WRONG_VERSION_ON_EARLY_DATA = -179,
3345     ERR_TLS13_DOWNGRADE_DETECTED = -180,
3346     ERR_SSL_KEY_USAGE_INCOMPATIBLE = -181,
3347     ERR_INVALID_ECH_CONFIG_LIST = -182,
3348     ERR_ECH_NOT_NEGOTIATED = -183,
3349     ERR_ECH_FALLBACK_CERTIFICATE_INVALID = -184,
3350     ERR_CERT_COMMON_NAME_INVALID = -200,
3351     ERR_CERT_DATE_INVALID = -201,
3352     ERR_CERT_AUTHORITY_INVALID = -202,
3353     ERR_CERT_CONTAINS_ERRORS = -203,
3354     ERR_CERT_NO_REVOCATION_MECHANISM = -204,
3355     ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205,
3356     ERR_CERT_REVOKED = -206,
3357     ERR_CERT_INVALID = -207,
3358     ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208,
3359     ERR_CERT_NON_UNIQUE_NAME = -210,
3360     ERR_CERT_WEAK_KEY = -211,
3361     ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212,
3362     ERR_CERT_VALIDITY_TOO_LONG = -213,
3363     ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = -214,
3364     ERR_CERT_SYMANTEC_LEGACY = -215,
3365     ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = -217,
3366     ERR_CERT_END = -219,
3367     ERR_INVALID_URL = -300,
3368     ERR_DISALLOWED_URL_SCHEME = -301,
3369     ERR_UNKNOWN_URL_SCHEME = -302,
3370     ERR_INVALID_REDIRECT = -303,
3371     ERR_TOO_MANY_REDIRECTS = -310,
3372     ERR_UNSAFE_REDIRECT = -311,
3373     ERR_UNSAFE_PORT = -312,
3374     ERR_INVALID_RESPONSE = -320,
3375     ERR_INVALID_CHUNKED_ENCODING = -321,
3376     ERR_METHOD_NOT_SUPPORTED = -322,
3377     ERR_UNEXPECTED_PROXY_AUTH = -323,
3378     ERR_EMPTY_RESPONSE = -324,
3379     ERR_RESPONSE_HEADERS_TOO_BIG = -325,
3380     ERR_PAC_SCRIPT_FAILED = -327,
3381     ERR_REQUEST_RANGE_NOT_SATISFIABLE = -328,
3382     ERR_MALFORMED_IDENTITY = -329,
3383     ERR_CONTENT_DECODING_FAILED = -330,
3384     ERR_NETWORK_IO_SUSPENDED = -331,
3385     ERR_SYN_REPLY_NOT_RECEIVED = -332,
3386     ERR_ENCODING_CONVERSION_FAILED = -333,
3387     ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = -334,
3388     ERR_NO_SUPPORTED_PROXIES = -336,
3389     ERR_HTTP2_PROTOCOL_ERROR = -337,
3390     ERR_INVALID_AUTH_CREDENTIALS = -338,
3391     ERR_UNSUPPORTED_AUTH_SCHEME = -339,
3392     ERR_ENCODING_DETECTION_FAILED = -340,
3393     ERR_MISSING_AUTH_CREDENTIALS = -341,
3394     ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = -342,
3395     ERR_MISCONFIGURED_AUTH_ENVIRONMENT = -343,
3396     ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = -344,
3397     ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = -345,
3398     ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = -346,
3399     ERR_INCOMPLETE_HTTP2_HEADERS = -347,
3400     ERR_PAC_NOT_IN_DHCP = -348,
3401     ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = -349,
3402     ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = -350,
3403     ERR_HTTP2_SERVER_REFUSED_STREAM = -351,
3404     ERR_HTTP2_PING_FAILED = -352,
3405     ERR_CONTENT_LENGTH_MISMATCH = -354,
3406     ERR_INCOMPLETE_CHUNKED_ENCODING = -355,
3407     ERR_QUIC_PROTOCOL_ERROR = -356,
3408     ERR_RESPONSE_HEADERS_TRUNCATED = -357,
3409     ERR_QUIC_HANDSHAKE_FAILED = -358,
3410     ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = -360,
3411     ERR_HTTP2_FLOW_CONTROL_ERROR = -361,
3412     ERR_HTTP2_FRAME_SIZE_ERROR = -362,
3413     ERR_HTTP2_COMPRESSION_ERROR = -363,
3414     ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = -364,
3415     ERR_HTTP_1_1_REQUIRED = -365,
3416     ERR_PROXY_HTTP_1_1_REQUIRED = -366,
3417     ERR_PAC_SCRIPT_TERMINATED = -367,
3418     ERR_INVALID_HTTP_RESPONSE = -370,
3419     ERR_CONTENT_DECODING_INIT_FAILED = -371,
3420     ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = -372,
3421     ERR_TOO_MANY_RETRIES = -375,
3422     ERR_HTTP2_STREAM_CLOSED = -376,
3423     ERR_HTTP_RESPONSE_CODE_FAILURE = -379,
3424     ERR_QUIC_CERT_ROOT_NOT_KNOWN = -380,
3425     ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = -381,
3426     ERR_TOO_MANY_ACCEPT_CH_RESTARTS = -382,
3427     ERR_INCONSISTENT_IP_ADDRESS_SPACE = -383,
3428     ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_POLICY = -384,
3429     ERR_CACHE_MISS = -400,
3430     ERR_CACHE_READ_FAILURE = -401,
3431     ERR_CACHE_WRITE_FAILURE = -402,
3432     ERR_CACHE_OPERATION_NOT_SUPPORTED = -403,
3433     ERR_CACHE_OPEN_FAILURE = -404,
3434     ERR_CACHE_CREATE_FAILURE = -405,
3435     ERR_CACHE_RACE = -406,
3436     ERR_CACHE_CHECKSUM_READ_FAILURE = -407,
3437     ERR_CACHE_CHECKSUM_MISMATCH = -408,
3438     ERR_CACHE_LOCK_TIMEOUT = -409,
3439     ERR_CACHE_AUTH_FAILURE_AFTER_READ = -410,
3440 
3441     ///
3442     /// Supported certificate status code values. See net\cert\cert_status_flags.h
3443     /// for more information. CERT_STATUS_NONE is new in CEF because we use an
3444     /// enum while cert_status_flags.h uses a typedef and static const variables.
3445     ERR_CACHE_ENTRY_NOT_SUITABLE = -411,
3446     ///
3447     ERR_CACHE_DOOM_FAILURE = -412,
3448 
3449     // 1 << 3 is reserved for ERR_CERT_CONTAINS_ERRORS (not useful with WinHTTP).
3450     ERR_CACHE_OPEN_OR_CREATE_FAILURE = -413,
3451     ERR_INSECURE_RESPONSE = -501,
3452     ERR_NO_PRIVATE_KEY_FOR_CERT = -502,
3453 
3454     // 1 << 9 was used for CERT_STATUS_NOT_IN_DNS
3455     ERR_ADD_USER_CERT_FAILED = -503,
3456 
3457     // 1 << 12 was used for CERT_STATUS_WEAK_DH_KEY
3458     ERR_INVALID_SIGNED_EXCHANGE = -504,
3459     ERR_INVALID_WEB_BUNDLE = -505,
3460 
3461     // Bits 16 to 31 are for non-error statuses.
3462 
3463     // Bit 18 was CERT_STATUS_IS_DNSSEC
3464     ERR_TRUST_TOKEN_OPERATION_FAILED = -506,
3465 
3466     ///
3467     /// The manner in which a link click should be opened. These constants match
3468     /// their equivalents in Chromium's window_open_disposition.h and should not be
3469     /// renumbered.
3470     ///
3471 
3472     ///
3473     /// Current tab. This is the default in most cases.
3474     ///
3475 
3476     ///
3477     /// Indicates that only one tab with the url should exist in the same window.
3478     ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = -507,
3479     ///
3480 
3481     ///
3482     /// Shift key + Middle mouse button or meta/ctrl key while clicking.
3483     ///
3484 
3485     ///
3486     /// Middle mouse button or meta/ctrl key while clicking.
3487     ERR_FTP_FAILED = -601,
3488     ///
3489 
3490     ///
3491     /// New popup window.
3492     ///
3493 
3494     ///
3495     /// Shift key while clicking.
3496     ///
3497     ERR_FTP_SERVICE_UNAVAILABLE = -602,
3498 
3499     ///
3500     /// Alt key while clicking.
3501     ///
3502 
3503     ///
3504     /// New off-the-record (incognito) window.
3505     ERR_FTP_TRANSFER_ABORTED = -603,
3506     ///
3507 
3508     ///
3509     /// Special case error condition from the renderer.
3510     ///
3511 
3512     ///
3513     ERR_FTP_FILE_BUSY = -604,
3514     /// Activates an existing tab containing the url, rather than navigating.
3515     /// This is similar to SINGLETON_TAB, but searches across all windows from
3516     ERR_FTP_SYNTAX_ERROR = -605,
3517     /// the current profile and anonymity (instead of just the current one);
3518     /// closes the current tab on switching if the current tab was the NTP with
3519     ERR_FTP_COMMAND_NOT_SUPPORTED = -606,
3520     /// no session history; and behaves like CURRENT_TAB instead of
3521     /// NEW_FOREGROUND_TAB when no existing tab is found.
3522     ERR_FTP_BAD_COMMAND_SEQUENCE = -607,
3523     ///
3524 
3525     ///
3526     /// Creates a new document picture-in-picture window showing a child WebView.
3527     ERR_PKCS12_IMPORT_BAD_PASSWORD = -701,
3528     ///
3529     ERR_PKCS12_IMPORT_FAILED = -702,
3530 
3531     ///
3532     /// "Verb" of a drag-and-drop operation as negotiated between the source and
3533     ERR_IMPORT_CA_CERT_NOT_CA = -703,
3534     /// destination. These constants match their equivalents in WebCore's
3535     /// DragActions.h and should not be renumbered.
3536     ///
3537     ERR_IMPORT_CERT_ALREADY_EXISTS = -704,
3538     ERR_IMPORT_CA_CERT_FAILED = -705,
3539     ERR_IMPORT_SERVER_CERT_FAILED = -706,
3540 
3541     ///
3542     /// Input mode of a virtual keyboard. These constants match their equivalents
3543     ERR_PKCS12_IMPORT_INVALID_MAC = -707,
3544     /// in Chromium's text_input_mode.h and should not be renumbered.
3545     /// See https://html.spec.whatwg.org/#input-modalities:-the-inputmode-attribute
3546     ERR_PKCS12_IMPORT_INVALID_FILE = -708,
3547     ///
3548     ERR_PKCS12_IMPORT_UNSUPPORTED = -709,
3549     ERR_KEY_GENERATION_FAILED = -710,
3550     ERR_PRIVATE_KEY_EXPORT_FAILED = -712,
3551     ERR_SELF_SIGNED_CERT_GENERATION_FAILED = -713,
3552 
3553     ///
3554     /// V8 access control values.
3555     ///
3556     ERR_CERT_DATABASE_CHANGED = -714,
3557     ERR_CERT_VERIFIER_CHANGED = -716,
3558 
3559     ///
3560     /// V8 property attribute values.
3561     ///
3562 
3563     ///
3564     /// Writeable, Enumerable, Configurable
3565     ERR_DNS_MALFORMED_RESPONSE = -800,
3566     ///
3567 
3568     ///
3569     /// Not writeable
3570     ERR_DNS_SERVER_REQUIRES_TCP = -801,
3571     ///
3572 
3573     ///
3574     /// Not enumerable
3575     ///
3576 
3577     ///
3578     /// Not configurable
3579     ///
3580 
3581     ///
3582     /// Post data elements may represent either bytes or files.
3583     ///
3584 
3585     ///
3586     /// Resource type for a request. These constants match their equivalents in
3587     /// Chromium's ResourceType and should not be renumbered.
3588     ERR_DNS_SERVER_FAILED = -802,
3589     ///
3590 
3591     ///
3592     /// Top level page.
3593     ERR_DNS_TIMED_OUT = -803,
3594     ///
3595 
3596     ///
3597     /// Frame or iframe.
3598     ///
3599 
3600     ///
3601     /// CSS stylesheet.
3602     ///
3603 
3604     ///
3605     /// External script.
3606     ///
3607 
3608     ///
3609     /// Image (jpg/gif/png/etc).
3610     ///
3611 
3612     ///
3613     /// Font.
3614     ///
3615     ERR_DNS_CACHE_MISS = -804,
3616 
3617     ///
3618     /// Some other subresource. This is the default type if the actual type is
3619     /// unknown.
3620     ERR_DNS_SEARCH_EMPTY = -805,
3621     ///
3622 
3623     ///
3624     /// Object (or embed) tag for a plugin, or a resource that a plugin requested.
3625     ERR_DNS_SORT_ERROR = -806,
3626     ///
3627 
3628     ///
3629     /// Media resource.
3630     ///
3631 
3632     ///
3633     /// Main resource of a dedicated worker.
3634     ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = -808,
3635     ///
3636 
3637     ///
3638     /// Main resource of a shared worker.
3639     ///
3640 
3641     ///
3642     /// Explicitly requested prefetch.
3643     ///
3644 
3645     ///
3646     /// Favicon.
3647     ///
3648 
3649     ///
3650     /// XMLHttpRequest.
3651     ERR_DNS_NAME_HTTPS_ONLY = -809,
3652     ///
3653 
3654     ///
3655     /// A request for a "<ping>".
3656     ///
3657 
3658     ///
3659     /// Main resource of a service worker.
3660     ERR_DNS_REQUEST_CANCELLED = -810,
3661     ///
3662 
3663     ///
3664     /// A report of Content Security Policy violations.
3665     ///
3666 
3667     ///
3668     /// A resource that a plugin requested.
3669     ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = -811,
3670     ///
3671 
3672     ///
3673     /// A main-frame service worker navigation preload request.
3674     ERR_DICTIONARY_LOAD_FAILED = -812
3675 }
3676 
3677 alias ERR_NONE = cef_errorcode_t.ERR_NONE;
3678 alias ERR_IO_PENDING = cef_errorcode_t.ERR_IO_PENDING;
3679 alias ERR_FAILED = cef_errorcode_t.ERR_FAILED;
3680 alias ERR_ABORTED = cef_errorcode_t.ERR_ABORTED;
3681 alias ERR_INVALID_ARGUMENT = cef_errorcode_t.ERR_INVALID_ARGUMENT;
3682 alias ERR_INVALID_HANDLE = cef_errorcode_t.ERR_INVALID_HANDLE;
3683 alias ERR_FILE_NOT_FOUND = cef_errorcode_t.ERR_FILE_NOT_FOUND;
3684 alias ERR_TIMED_OUT = cef_errorcode_t.ERR_TIMED_OUT;
3685 alias ERR_FILE_TOO_BIG = cef_errorcode_t.ERR_FILE_TOO_BIG;
3686 alias ERR_UNEXPECTED = cef_errorcode_t.ERR_UNEXPECTED;
3687 alias ERR_ACCESS_DENIED = cef_errorcode_t.ERR_ACCESS_DENIED;
3688 alias ERR_NOT_IMPLEMENTED = cef_errorcode_t.ERR_NOT_IMPLEMENTED;
3689 alias ERR_INSUFFICIENT_RESOURCES = cef_errorcode_t.ERR_INSUFFICIENT_RESOURCES;
3690 alias ERR_OUT_OF_MEMORY = cef_errorcode_t.ERR_OUT_OF_MEMORY;
3691 alias ERR_UPLOAD_FILE_CHANGED = cef_errorcode_t.ERR_UPLOAD_FILE_CHANGED;
3692 alias ERR_SOCKET_NOT_CONNECTED = cef_errorcode_t.ERR_SOCKET_NOT_CONNECTED;
3693 alias ERR_FILE_EXISTS = cef_errorcode_t.ERR_FILE_EXISTS;
3694 alias ERR_FILE_PATH_TOO_LONG = cef_errorcode_t.ERR_FILE_PATH_TOO_LONG;
3695 alias ERR_FILE_NO_SPACE = cef_errorcode_t.ERR_FILE_NO_SPACE;
3696 alias ERR_FILE_VIRUS_INFECTED = cef_errorcode_t.ERR_FILE_VIRUS_INFECTED;
3697 alias ERR_BLOCKED_BY_CLIENT = cef_errorcode_t.ERR_BLOCKED_BY_CLIENT;
3698 alias ERR_NETWORK_CHANGED = cef_errorcode_t.ERR_NETWORK_CHANGED;
3699 alias ERR_BLOCKED_BY_ADMINISTRATOR = cef_errorcode_t.ERR_BLOCKED_BY_ADMINISTRATOR;
3700 alias ERR_SOCKET_IS_CONNECTED = cef_errorcode_t.ERR_SOCKET_IS_CONNECTED;
3701 alias ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = cef_errorcode_t.ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED;
3702 alias ERR_CONTEXT_SHUT_DOWN = cef_errorcode_t.ERR_CONTEXT_SHUT_DOWN;
3703 alias ERR_BLOCKED_BY_RESPONSE = cef_errorcode_t.ERR_BLOCKED_BY_RESPONSE;
3704 alias ERR_CLEARTEXT_NOT_PERMITTED = cef_errorcode_t.ERR_CLEARTEXT_NOT_PERMITTED;
3705 alias ERR_BLOCKED_BY_CSP = cef_errorcode_t.ERR_BLOCKED_BY_CSP;
3706 alias ERR_H2_OR_QUIC_REQUIRED = cef_errorcode_t.ERR_H2_OR_QUIC_REQUIRED;
3707 alias ERR_BLOCKED_BY_ORB = cef_errorcode_t.ERR_BLOCKED_BY_ORB;
3708 alias ERR_CONNECTION_CLOSED = cef_errorcode_t.ERR_CONNECTION_CLOSED;
3709 alias ERR_CONNECTION_RESET = cef_errorcode_t.ERR_CONNECTION_RESET;
3710 alias ERR_CONNECTION_REFUSED = cef_errorcode_t.ERR_CONNECTION_REFUSED;
3711 alias ERR_CONNECTION_ABORTED = cef_errorcode_t.ERR_CONNECTION_ABORTED;
3712 alias ERR_CONNECTION_FAILED = cef_errorcode_t.ERR_CONNECTION_FAILED;
3713 alias ERR_NAME_NOT_RESOLVED = cef_errorcode_t.ERR_NAME_NOT_RESOLVED;
3714 alias ERR_INTERNET_DISCONNECTED = cef_errorcode_t.ERR_INTERNET_DISCONNECTED;
3715 alias ERR_SSL_PROTOCOL_ERROR = cef_errorcode_t.ERR_SSL_PROTOCOL_ERROR;
3716 alias ERR_ADDRESS_INVALID = cef_errorcode_t.ERR_ADDRESS_INVALID;
3717 alias ERR_ADDRESS_UNREACHABLE = cef_errorcode_t.ERR_ADDRESS_UNREACHABLE;
3718 alias ERR_SSL_CLIENT_AUTH_CERT_NEEDED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_NEEDED;
3719 alias ERR_TUNNEL_CONNECTION_FAILED = cef_errorcode_t.ERR_TUNNEL_CONNECTION_FAILED;
3720 alias ERR_NO_SSL_VERSIONS_ENABLED = cef_errorcode_t.ERR_NO_SSL_VERSIONS_ENABLED;
3721 alias ERR_SSL_VERSION_OR_CIPHER_MISMATCH = cef_errorcode_t.ERR_SSL_VERSION_OR_CIPHER_MISMATCH;
3722 alias ERR_SSL_RENEGOTIATION_REQUESTED = cef_errorcode_t.ERR_SSL_RENEGOTIATION_REQUESTED;
3723 alias ERR_PROXY_AUTH_UNSUPPORTED = cef_errorcode_t.ERR_PROXY_AUTH_UNSUPPORTED;
3724 alias ERR_BAD_SSL_CLIENT_AUTH_CERT = cef_errorcode_t.ERR_BAD_SSL_CLIENT_AUTH_CERT;
3725 alias ERR_CONNECTION_TIMED_OUT = cef_errorcode_t.ERR_CONNECTION_TIMED_OUT;
3726 alias ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = cef_errorcode_t.ERR_HOST_RESOLVER_QUEUE_TOO_LARGE;
3727 alias ERR_SOCKS_CONNECTION_FAILED = cef_errorcode_t.ERR_SOCKS_CONNECTION_FAILED;
3728 alias ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = cef_errorcode_t.ERR_SOCKS_CONNECTION_HOST_UNREACHABLE;
3729 alias ERR_ALPN_NEGOTIATION_FAILED = cef_errorcode_t.ERR_ALPN_NEGOTIATION_FAILED;
3730 alias ERR_SSL_NO_RENEGOTIATION = cef_errorcode_t.ERR_SSL_NO_RENEGOTIATION;
3731 alias ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = cef_errorcode_t.ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES;
3732 alias ERR_SSL_DECOMPRESSION_FAILURE_ALERT = cef_errorcode_t.ERR_SSL_DECOMPRESSION_FAILURE_ALERT;
3733 alias ERR_SSL_BAD_RECORD_MAC_ALERT = cef_errorcode_t.ERR_SSL_BAD_RECORD_MAC_ALERT;
3734 alias ERR_PROXY_AUTH_REQUESTED = cef_errorcode_t.ERR_PROXY_AUTH_REQUESTED;
3735 alias ERR_PROXY_CONNECTION_FAILED = cef_errorcode_t.ERR_PROXY_CONNECTION_FAILED;
3736 alias ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = cef_errorcode_t.ERR_MANDATORY_PROXY_CONFIGURATION_FAILED;
3737 alias ERR_PRECONNECT_MAX_SOCKET_LIMIT = cef_errorcode_t.ERR_PRECONNECT_MAX_SOCKET_LIMIT;
3738 alias ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED;
3739 alias ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY;
3740 alias ERR_PROXY_CERTIFICATE_INVALID = cef_errorcode_t.ERR_PROXY_CERTIFICATE_INVALID;
3741 alias ERR_NAME_RESOLUTION_FAILED = cef_errorcode_t.ERR_NAME_RESOLUTION_FAILED;
3742 alias ERR_NETWORK_ACCESS_DENIED = cef_errorcode_t.ERR_NETWORK_ACCESS_DENIED;
3743 alias ERR_TEMPORARILY_THROTTLED = cef_errorcode_t.ERR_TEMPORARILY_THROTTLED;
3744 alias ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = cef_errorcode_t.ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT;
3745 alias ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
3746 alias ERR_MSG_TOO_BIG = cef_errorcode_t.ERR_MSG_TOO_BIG;
3747 alias ERR_WS_PROTOCOL_ERROR = cef_errorcode_t.ERR_WS_PROTOCOL_ERROR;
3748 alias ERR_ADDRESS_IN_USE = cef_errorcode_t.ERR_ADDRESS_IN_USE;
3749 alias ERR_SSL_HANDSHAKE_NOT_COMPLETED = cef_errorcode_t.ERR_SSL_HANDSHAKE_NOT_COMPLETED;
3750 alias ERR_SSL_BAD_PEER_PUBLIC_KEY = cef_errorcode_t.ERR_SSL_BAD_PEER_PUBLIC_KEY;
3751 alias ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = cef_errorcode_t.ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN;
3752 alias ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = cef_errorcode_t.ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED;
3753 alias ERR_SSL_DECRYPT_ERROR_ALERT = cef_errorcode_t.ERR_SSL_DECRYPT_ERROR_ALERT;
3754 alias ERR_WS_THROTTLE_QUEUE_TOO_LARGE = cef_errorcode_t.ERR_WS_THROTTLE_QUEUE_TOO_LARGE;
3755 alias ERR_SSL_SERVER_CERT_CHANGED = cef_errorcode_t.ERR_SSL_SERVER_CERT_CHANGED;
3756 alias ERR_SSL_UNRECOGNIZED_NAME_ALERT = cef_errorcode_t.ERR_SSL_UNRECOGNIZED_NAME_ALERT;
3757 alias ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = cef_errorcode_t.ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR;
3758 alias ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = cef_errorcode_t.ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR;
3759 alias ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = cef_errorcode_t.ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE;
3760 alias ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = cef_errorcode_t.ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE;
3761 alias ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT;
3762 alias ERR_ICANN_NAME_COLLISION = cef_errorcode_t.ERR_ICANN_NAME_COLLISION;
3763 alias ERR_SSL_SERVER_CERT_BAD_FORMAT = cef_errorcode_t.ERR_SSL_SERVER_CERT_BAD_FORMAT;
3764 alias ERR_CT_STH_PARSING_FAILED = cef_errorcode_t.ERR_CT_STH_PARSING_FAILED;
3765 alias ERR_CT_STH_INCOMPLETE = cef_errorcode_t.ERR_CT_STH_INCOMPLETE;
3766 alias ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = cef_errorcode_t.ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH;
3767 alias ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = cef_errorcode_t.ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED;
3768 alias ERR_SSL_OBSOLETE_CIPHER = cef_errorcode_t.ERR_SSL_OBSOLETE_CIPHER;
3769 alias ERR_WS_UPGRADE = cef_errorcode_t.ERR_WS_UPGRADE;
3770 alias ERR_READ_IF_READY_NOT_IMPLEMENTED = cef_errorcode_t.ERR_READ_IF_READY_NOT_IMPLEMENTED;
3771 alias ERR_NO_BUFFER_SPACE = cef_errorcode_t.ERR_NO_BUFFER_SPACE;
3772 alias ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS;
3773 alias ERR_EARLY_DATA_REJECTED = cef_errorcode_t.ERR_EARLY_DATA_REJECTED;
3774 alias ERR_WRONG_VERSION_ON_EARLY_DATA = cef_errorcode_t.ERR_WRONG_VERSION_ON_EARLY_DATA;
3775 alias ERR_TLS13_DOWNGRADE_DETECTED = cef_errorcode_t.ERR_TLS13_DOWNGRADE_DETECTED;
3776 alias ERR_SSL_KEY_USAGE_INCOMPATIBLE = cef_errorcode_t.ERR_SSL_KEY_USAGE_INCOMPATIBLE;
3777 alias ERR_INVALID_ECH_CONFIG_LIST = cef_errorcode_t.ERR_INVALID_ECH_CONFIG_LIST;
3778 alias ERR_ECH_NOT_NEGOTIATED = cef_errorcode_t.ERR_ECH_NOT_NEGOTIATED;
3779 alias ERR_ECH_FALLBACK_CERTIFICATE_INVALID = cef_errorcode_t.ERR_ECH_FALLBACK_CERTIFICATE_INVALID;
3780 alias ERR_CERT_COMMON_NAME_INVALID = cef_errorcode_t.ERR_CERT_COMMON_NAME_INVALID;
3781 alias ERR_CERT_DATE_INVALID = cef_errorcode_t.ERR_CERT_DATE_INVALID;
3782 alias ERR_CERT_AUTHORITY_INVALID = cef_errorcode_t.ERR_CERT_AUTHORITY_INVALID;
3783 alias ERR_CERT_CONTAINS_ERRORS = cef_errorcode_t.ERR_CERT_CONTAINS_ERRORS;
3784 alias ERR_CERT_NO_REVOCATION_MECHANISM = cef_errorcode_t.ERR_CERT_NO_REVOCATION_MECHANISM;
3785 alias ERR_CERT_UNABLE_TO_CHECK_REVOCATION = cef_errorcode_t.ERR_CERT_UNABLE_TO_CHECK_REVOCATION;
3786 alias ERR_CERT_REVOKED = cef_errorcode_t.ERR_CERT_REVOKED;
3787 alias ERR_CERT_INVALID = cef_errorcode_t.ERR_CERT_INVALID;
3788 alias ERR_CERT_WEAK_SIGNATURE_ALGORITHM = cef_errorcode_t.ERR_CERT_WEAK_SIGNATURE_ALGORITHM;
3789 alias ERR_CERT_NON_UNIQUE_NAME = cef_errorcode_t.ERR_CERT_NON_UNIQUE_NAME;
3790 alias ERR_CERT_WEAK_KEY = cef_errorcode_t.ERR_CERT_WEAK_KEY;
3791 alias ERR_CERT_NAME_CONSTRAINT_VIOLATION = cef_errorcode_t.ERR_CERT_NAME_CONSTRAINT_VIOLATION;
3792 alias ERR_CERT_VALIDITY_TOO_LONG = cef_errorcode_t.ERR_CERT_VALIDITY_TOO_LONG;
3793 alias ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = cef_errorcode_t.ERR_CERTIFICATE_TRANSPARENCY_REQUIRED;
3794 alias ERR_CERT_SYMANTEC_LEGACY = cef_errorcode_t.ERR_CERT_SYMANTEC_LEGACY;
3795 alias ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = cef_errorcode_t.ERR_CERT_KNOWN_INTERCEPTION_BLOCKED;
3796 alias ERR_CERT_END = cef_errorcode_t.ERR_CERT_END;
3797 alias ERR_INVALID_URL = cef_errorcode_t.ERR_INVALID_URL;
3798 alias ERR_DISALLOWED_URL_SCHEME = cef_errorcode_t.ERR_DISALLOWED_URL_SCHEME;
3799 alias ERR_UNKNOWN_URL_SCHEME = cef_errorcode_t.ERR_UNKNOWN_URL_SCHEME;
3800 alias ERR_INVALID_REDIRECT = cef_errorcode_t.ERR_INVALID_REDIRECT;
3801 alias ERR_TOO_MANY_REDIRECTS = cef_errorcode_t.ERR_TOO_MANY_REDIRECTS;
3802 alias ERR_UNSAFE_REDIRECT = cef_errorcode_t.ERR_UNSAFE_REDIRECT;
3803 alias ERR_UNSAFE_PORT = cef_errorcode_t.ERR_UNSAFE_PORT;
3804 alias ERR_INVALID_RESPONSE = cef_errorcode_t.ERR_INVALID_RESPONSE;
3805 alias ERR_INVALID_CHUNKED_ENCODING = cef_errorcode_t.ERR_INVALID_CHUNKED_ENCODING;
3806 alias ERR_METHOD_NOT_SUPPORTED = cef_errorcode_t.ERR_METHOD_NOT_SUPPORTED;
3807 alias ERR_UNEXPECTED_PROXY_AUTH = cef_errorcode_t.ERR_UNEXPECTED_PROXY_AUTH;
3808 alias ERR_EMPTY_RESPONSE = cef_errorcode_t.ERR_EMPTY_RESPONSE;
3809 alias ERR_RESPONSE_HEADERS_TOO_BIG = cef_errorcode_t.ERR_RESPONSE_HEADERS_TOO_BIG;
3810 alias ERR_PAC_SCRIPT_FAILED = cef_errorcode_t.ERR_PAC_SCRIPT_FAILED;
3811 alias ERR_REQUEST_RANGE_NOT_SATISFIABLE = cef_errorcode_t.ERR_REQUEST_RANGE_NOT_SATISFIABLE;
3812 alias ERR_MALFORMED_IDENTITY = cef_errorcode_t.ERR_MALFORMED_IDENTITY;
3813 alias ERR_CONTENT_DECODING_FAILED = cef_errorcode_t.ERR_CONTENT_DECODING_FAILED;
3814 alias ERR_NETWORK_IO_SUSPENDED = cef_errorcode_t.ERR_NETWORK_IO_SUSPENDED;
3815 alias ERR_SYN_REPLY_NOT_RECEIVED = cef_errorcode_t.ERR_SYN_REPLY_NOT_RECEIVED;
3816 alias ERR_ENCODING_CONVERSION_FAILED = cef_errorcode_t.ERR_ENCODING_CONVERSION_FAILED;
3817 alias ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = cef_errorcode_t.ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT;
3818 alias ERR_NO_SUPPORTED_PROXIES = cef_errorcode_t.ERR_NO_SUPPORTED_PROXIES;
3819 alias ERR_HTTP2_PROTOCOL_ERROR = cef_errorcode_t.ERR_HTTP2_PROTOCOL_ERROR;
3820 alias ERR_INVALID_AUTH_CREDENTIALS = cef_errorcode_t.ERR_INVALID_AUTH_CREDENTIALS;
3821 alias ERR_UNSUPPORTED_AUTH_SCHEME = cef_errorcode_t.ERR_UNSUPPORTED_AUTH_SCHEME;
3822 alias ERR_ENCODING_DETECTION_FAILED = cef_errorcode_t.ERR_ENCODING_DETECTION_FAILED;
3823 alias ERR_MISSING_AUTH_CREDENTIALS = cef_errorcode_t.ERR_MISSING_AUTH_CREDENTIALS;
3824 alias ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = cef_errorcode_t.ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS;
3825 alias ERR_MISCONFIGURED_AUTH_ENVIRONMENT = cef_errorcode_t.ERR_MISCONFIGURED_AUTH_ENVIRONMENT;
3826 alias ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = cef_errorcode_t.ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS;
3827 alias ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = cef_errorcode_t.ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN;
3828 alias ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH;
3829 alias ERR_INCOMPLETE_HTTP2_HEADERS = cef_errorcode_t.ERR_INCOMPLETE_HTTP2_HEADERS;
3830 alias ERR_PAC_NOT_IN_DHCP = cef_errorcode_t.ERR_PAC_NOT_IN_DHCP;
3831 alias ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION;
3832 alias ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION;
3833 alias ERR_HTTP2_SERVER_REFUSED_STREAM = cef_errorcode_t.ERR_HTTP2_SERVER_REFUSED_STREAM;
3834 alias ERR_HTTP2_PING_FAILED = cef_errorcode_t.ERR_HTTP2_PING_FAILED;
3835 alias ERR_CONTENT_LENGTH_MISMATCH = cef_errorcode_t.ERR_CONTENT_LENGTH_MISMATCH;
3836 alias ERR_INCOMPLETE_CHUNKED_ENCODING = cef_errorcode_t.ERR_INCOMPLETE_CHUNKED_ENCODING;
3837 alias ERR_QUIC_PROTOCOL_ERROR = cef_errorcode_t.ERR_QUIC_PROTOCOL_ERROR;
3838 alias ERR_RESPONSE_HEADERS_TRUNCATED = cef_errorcode_t.ERR_RESPONSE_HEADERS_TRUNCATED;
3839 alias ERR_QUIC_HANDSHAKE_FAILED = cef_errorcode_t.ERR_QUIC_HANDSHAKE_FAILED;
3840 alias ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = cef_errorcode_t.ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY;
3841 alias ERR_HTTP2_FLOW_CONTROL_ERROR = cef_errorcode_t.ERR_HTTP2_FLOW_CONTROL_ERROR;
3842 alias ERR_HTTP2_FRAME_SIZE_ERROR = cef_errorcode_t.ERR_HTTP2_FRAME_SIZE_ERROR;
3843 alias ERR_HTTP2_COMPRESSION_ERROR = cef_errorcode_t.ERR_HTTP2_COMPRESSION_ERROR;
3844 alias ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = cef_errorcode_t.ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION;
3845 alias ERR_HTTP_1_1_REQUIRED = cef_errorcode_t.ERR_HTTP_1_1_REQUIRED;
3846 alias ERR_PROXY_HTTP_1_1_REQUIRED = cef_errorcode_t.ERR_PROXY_HTTP_1_1_REQUIRED;
3847 alias ERR_PAC_SCRIPT_TERMINATED = cef_errorcode_t.ERR_PAC_SCRIPT_TERMINATED;
3848 alias ERR_INVALID_HTTP_RESPONSE = cef_errorcode_t.ERR_INVALID_HTTP_RESPONSE;
3849 alias ERR_CONTENT_DECODING_INIT_FAILED = cef_errorcode_t.ERR_CONTENT_DECODING_INIT_FAILED;
3850 alias ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = cef_errorcode_t.ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED;
3851 alias ERR_TOO_MANY_RETRIES = cef_errorcode_t.ERR_TOO_MANY_RETRIES;
3852 alias ERR_HTTP2_STREAM_CLOSED = cef_errorcode_t.ERR_HTTP2_STREAM_CLOSED;
3853 alias ERR_HTTP_RESPONSE_CODE_FAILURE = cef_errorcode_t.ERR_HTTP_RESPONSE_CODE_FAILURE;
3854 alias ERR_QUIC_CERT_ROOT_NOT_KNOWN = cef_errorcode_t.ERR_QUIC_CERT_ROOT_NOT_KNOWN;
3855 alias ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = cef_errorcode_t.ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED;
3856 alias ERR_TOO_MANY_ACCEPT_CH_RESTARTS = cef_errorcode_t.ERR_TOO_MANY_ACCEPT_CH_RESTARTS;
3857 alias ERR_INCONSISTENT_IP_ADDRESS_SPACE = cef_errorcode_t.ERR_INCONSISTENT_IP_ADDRESS_SPACE;
3858 alias ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_POLICY = cef_errorcode_t.ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_POLICY;
3859 alias ERR_CACHE_MISS = cef_errorcode_t.ERR_CACHE_MISS;
3860 alias ERR_CACHE_READ_FAILURE = cef_errorcode_t.ERR_CACHE_READ_FAILURE;
3861 alias ERR_CACHE_WRITE_FAILURE = cef_errorcode_t.ERR_CACHE_WRITE_FAILURE;
3862 alias ERR_CACHE_OPERATION_NOT_SUPPORTED = cef_errorcode_t.ERR_CACHE_OPERATION_NOT_SUPPORTED;
3863 alias ERR_CACHE_OPEN_FAILURE = cef_errorcode_t.ERR_CACHE_OPEN_FAILURE;
3864 alias ERR_CACHE_CREATE_FAILURE = cef_errorcode_t.ERR_CACHE_CREATE_FAILURE;
3865 alias ERR_CACHE_RACE = cef_errorcode_t.ERR_CACHE_RACE;
3866 alias ERR_CACHE_CHECKSUM_READ_FAILURE = cef_errorcode_t.ERR_CACHE_CHECKSUM_READ_FAILURE;
3867 alias ERR_CACHE_CHECKSUM_MISMATCH = cef_errorcode_t.ERR_CACHE_CHECKSUM_MISMATCH;
3868 alias ERR_CACHE_LOCK_TIMEOUT = cef_errorcode_t.ERR_CACHE_LOCK_TIMEOUT;
3869 alias ERR_CACHE_AUTH_FAILURE_AFTER_READ = cef_errorcode_t.ERR_CACHE_AUTH_FAILURE_AFTER_READ;
3870 alias ERR_CACHE_ENTRY_NOT_SUITABLE = cef_errorcode_t.ERR_CACHE_ENTRY_NOT_SUITABLE;
3871 alias ERR_CACHE_DOOM_FAILURE = cef_errorcode_t.ERR_CACHE_DOOM_FAILURE;
3872 alias ERR_CACHE_OPEN_OR_CREATE_FAILURE = cef_errorcode_t.ERR_CACHE_OPEN_OR_CREATE_FAILURE;
3873 alias ERR_INSECURE_RESPONSE = cef_errorcode_t.ERR_INSECURE_RESPONSE;
3874 alias ERR_NO_PRIVATE_KEY_FOR_CERT = cef_errorcode_t.ERR_NO_PRIVATE_KEY_FOR_CERT;
3875 alias ERR_ADD_USER_CERT_FAILED = cef_errorcode_t.ERR_ADD_USER_CERT_FAILED;
3876 alias ERR_INVALID_SIGNED_EXCHANGE = cef_errorcode_t.ERR_INVALID_SIGNED_EXCHANGE;
3877 alias ERR_INVALID_WEB_BUNDLE = cef_errorcode_t.ERR_INVALID_WEB_BUNDLE;
3878 alias ERR_TRUST_TOKEN_OPERATION_FAILED = cef_errorcode_t.ERR_TRUST_TOKEN_OPERATION_FAILED;
3879 alias ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = cef_errorcode_t.ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST;
3880 alias ERR_FTP_FAILED = cef_errorcode_t.ERR_FTP_FAILED;
3881 alias ERR_FTP_SERVICE_UNAVAILABLE = cef_errorcode_t.ERR_FTP_SERVICE_UNAVAILABLE;
3882 alias ERR_FTP_TRANSFER_ABORTED = cef_errorcode_t.ERR_FTP_TRANSFER_ABORTED;
3883 alias ERR_FTP_FILE_BUSY = cef_errorcode_t.ERR_FTP_FILE_BUSY;
3884 alias ERR_FTP_SYNTAX_ERROR = cef_errorcode_t.ERR_FTP_SYNTAX_ERROR;
3885 alias ERR_FTP_COMMAND_NOT_SUPPORTED = cef_errorcode_t.ERR_FTP_COMMAND_NOT_SUPPORTED;
3886 alias ERR_FTP_BAD_COMMAND_SEQUENCE = cef_errorcode_t.ERR_FTP_BAD_COMMAND_SEQUENCE;
3887 alias ERR_PKCS12_IMPORT_BAD_PASSWORD = cef_errorcode_t.ERR_PKCS12_IMPORT_BAD_PASSWORD;
3888 alias ERR_PKCS12_IMPORT_FAILED = cef_errorcode_t.ERR_PKCS12_IMPORT_FAILED;
3889 alias ERR_IMPORT_CA_CERT_NOT_CA = cef_errorcode_t.ERR_IMPORT_CA_CERT_NOT_CA;
3890 alias ERR_IMPORT_CERT_ALREADY_EXISTS = cef_errorcode_t.ERR_IMPORT_CERT_ALREADY_EXISTS;
3891 alias ERR_IMPORT_CA_CERT_FAILED = cef_errorcode_t.ERR_IMPORT_CA_CERT_FAILED;
3892 alias ERR_IMPORT_SERVER_CERT_FAILED = cef_errorcode_t.ERR_IMPORT_SERVER_CERT_FAILED;
3893 alias ERR_PKCS12_IMPORT_INVALID_MAC = cef_errorcode_t.ERR_PKCS12_IMPORT_INVALID_MAC;
3894 alias ERR_PKCS12_IMPORT_INVALID_FILE = cef_errorcode_t.ERR_PKCS12_IMPORT_INVALID_FILE;
3895 alias ERR_PKCS12_IMPORT_UNSUPPORTED = cef_errorcode_t.ERR_PKCS12_IMPORT_UNSUPPORTED;
3896 alias ERR_KEY_GENERATION_FAILED = cef_errorcode_t.ERR_KEY_GENERATION_FAILED;
3897 alias ERR_PRIVATE_KEY_EXPORT_FAILED = cef_errorcode_t.ERR_PRIVATE_KEY_EXPORT_FAILED;
3898 alias ERR_SELF_SIGNED_CERT_GENERATION_FAILED = cef_errorcode_t.ERR_SELF_SIGNED_CERT_GENERATION_FAILED;
3899 alias ERR_CERT_DATABASE_CHANGED = cef_errorcode_t.ERR_CERT_DATABASE_CHANGED;
3900 alias ERR_CERT_VERIFIER_CHANGED = cef_errorcode_t.ERR_CERT_VERIFIER_CHANGED;
3901 alias ERR_DNS_MALFORMED_RESPONSE = cef_errorcode_t.ERR_DNS_MALFORMED_RESPONSE;
3902 alias ERR_DNS_SERVER_REQUIRES_TCP = cef_errorcode_t.ERR_DNS_SERVER_REQUIRES_TCP;
3903 alias ERR_DNS_SERVER_FAILED = cef_errorcode_t.ERR_DNS_SERVER_FAILED;
3904 alias ERR_DNS_TIMED_OUT = cef_errorcode_t.ERR_DNS_TIMED_OUT;
3905 alias ERR_DNS_CACHE_MISS = cef_errorcode_t.ERR_DNS_CACHE_MISS;
3906 alias ERR_DNS_SEARCH_EMPTY = cef_errorcode_t.ERR_DNS_SEARCH_EMPTY;
3907 alias ERR_DNS_SORT_ERROR = cef_errorcode_t.ERR_DNS_SORT_ERROR;
3908 alias ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = cef_errorcode_t.ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED;
3909 alias ERR_DNS_NAME_HTTPS_ONLY = cef_errorcode_t.ERR_DNS_NAME_HTTPS_ONLY;
3910 alias ERR_DNS_REQUEST_CANCELLED = cef_errorcode_t.ERR_DNS_REQUEST_CANCELLED;
3911 alias ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = cef_errorcode_t.ERR_DNS_NO_MATCHING_SUPPORTED_ALPN;
3912 alias ERR_DICTIONARY_LOAD_FAILED = cef_errorcode_t.ERR_DICTIONARY_LOAD_FAILED;
3913 
3914 enum cef_cert_status_t
3915 {
3916     CERT_STATUS_NONE = 0,
3917     CERT_STATUS_COMMON_NAME_INVALID = 1 << 0,
3918     CERT_STATUS_DATE_INVALID = 1 << 1,
3919     CERT_STATUS_AUTHORITY_INVALID = 1 << 2,
3920     CERT_STATUS_NO_REVOCATION_MECHANISM = 1 << 4,
3921     CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = 1 << 5,
3922     CERT_STATUS_REVOKED = 1 << 6,
3923     CERT_STATUS_INVALID = 1 << 7,
3924     CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = 1 << 8,
3925     CERT_STATUS_NON_UNIQUE_NAME = 1 << 10,
3926     CERT_STATUS_WEAK_KEY = 1 << 11,
3927     CERT_STATUS_PINNED_KEY_MISSING = 1 << 13,
3928     CERT_STATUS_NAME_CONSTRAINT_VIOLATION = 1 << 14,
3929     CERT_STATUS_VALIDITY_TOO_LONG = 1 << 15,
3930     CERT_STATUS_IS_EV = 1 << 16,
3931     CERT_STATUS_REV_CHECKING_ENABLED = 1 << 17,
3932     CERT_STATUS_SHA1_SIGNATURE_PRESENT = 1 << 19,
3933     CERT_STATUS_CT_COMPLIANCE_FAILED = 1 << 20
3934 }
3935 
3936 alias CERT_STATUS_NONE = cef_cert_status_t.CERT_STATUS_NONE;
3937 alias CERT_STATUS_COMMON_NAME_INVALID = cef_cert_status_t.CERT_STATUS_COMMON_NAME_INVALID;
3938 alias CERT_STATUS_DATE_INVALID = cef_cert_status_t.CERT_STATUS_DATE_INVALID;
3939 alias CERT_STATUS_AUTHORITY_INVALID = cef_cert_status_t.CERT_STATUS_AUTHORITY_INVALID;
3940 alias CERT_STATUS_NO_REVOCATION_MECHANISM = cef_cert_status_t.CERT_STATUS_NO_REVOCATION_MECHANISM;
3941 alias CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = cef_cert_status_t.CERT_STATUS_UNABLE_TO_CHECK_REVOCATION;
3942 alias CERT_STATUS_REVOKED = cef_cert_status_t.CERT_STATUS_REVOKED;
3943 alias CERT_STATUS_INVALID = cef_cert_status_t.CERT_STATUS_INVALID;
3944 alias CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = cef_cert_status_t.CERT_STATUS_WEAK_SIGNATURE_ALGORITHM;
3945 alias CERT_STATUS_NON_UNIQUE_NAME = cef_cert_status_t.CERT_STATUS_NON_UNIQUE_NAME;
3946 alias CERT_STATUS_WEAK_KEY = cef_cert_status_t.CERT_STATUS_WEAK_KEY;
3947 alias CERT_STATUS_PINNED_KEY_MISSING = cef_cert_status_t.CERT_STATUS_PINNED_KEY_MISSING;
3948 alias CERT_STATUS_NAME_CONSTRAINT_VIOLATION = cef_cert_status_t.CERT_STATUS_NAME_CONSTRAINT_VIOLATION;
3949 alias CERT_STATUS_VALIDITY_TOO_LONG = cef_cert_status_t.CERT_STATUS_VALIDITY_TOO_LONG;
3950 alias CERT_STATUS_IS_EV = cef_cert_status_t.CERT_STATUS_IS_EV;
3951 alias CERT_STATUS_REV_CHECKING_ENABLED = cef_cert_status_t.CERT_STATUS_REV_CHECKING_ENABLED;
3952 alias CERT_STATUS_SHA1_SIGNATURE_PRESENT = cef_cert_status_t.CERT_STATUS_SHA1_SIGNATURE_PRESENT;
3953 alias CERT_STATUS_CT_COMPLIANCE_FAILED = cef_cert_status_t.CERT_STATUS_CT_COMPLIANCE_FAILED;
3954 
3955 enum cef_window_open_disposition_t
3956 {
3957     WOD_UNKNOWN = 0,
3958     WOD_CURRENT_TAB = 1,
3959     WOD_SINGLETON_TAB = 2,
3960     WOD_NEW_FOREGROUND_TAB = 3,
3961     WOD_NEW_BACKGROUND_TAB = 4,
3962     WOD_NEW_POPUP = 5,
3963     WOD_NEW_WINDOW = 6,
3964     WOD_SAVE_TO_DISK = 7,
3965     WOD_OFF_THE_RECORD = 8,
3966     WOD_IGNORE_ACTION = 9,
3967     WOD_SWITCH_TO_TAB = 10,
3968     WOD_NEW_PICTURE_IN_PICTURE = 11
3969 }
3970 
3971 alias WOD_UNKNOWN = cef_window_open_disposition_t.WOD_UNKNOWN;
3972 alias WOD_CURRENT_TAB = cef_window_open_disposition_t.WOD_CURRENT_TAB;
3973 alias WOD_SINGLETON_TAB = cef_window_open_disposition_t.WOD_SINGLETON_TAB;
3974 alias WOD_NEW_FOREGROUND_TAB = cef_window_open_disposition_t.WOD_NEW_FOREGROUND_TAB;
3975 alias WOD_NEW_BACKGROUND_TAB = cef_window_open_disposition_t.WOD_NEW_BACKGROUND_TAB;
3976 alias WOD_NEW_POPUP = cef_window_open_disposition_t.WOD_NEW_POPUP;
3977 alias WOD_NEW_WINDOW = cef_window_open_disposition_t.WOD_NEW_WINDOW;
3978 alias WOD_SAVE_TO_DISK = cef_window_open_disposition_t.WOD_SAVE_TO_DISK;
3979 alias WOD_OFF_THE_RECORD = cef_window_open_disposition_t.WOD_OFF_THE_RECORD;
3980 alias WOD_IGNORE_ACTION = cef_window_open_disposition_t.WOD_IGNORE_ACTION;
3981 alias WOD_SWITCH_TO_TAB = cef_window_open_disposition_t.WOD_SWITCH_TO_TAB;
3982 alias WOD_NEW_PICTURE_IN_PICTURE = cef_window_open_disposition_t.WOD_NEW_PICTURE_IN_PICTURE;
3983 
3984 enum cef_drag_operations_mask_t
3985 {
3986     DRAG_OPERATION_NONE = 0,
3987     DRAG_OPERATION_COPY = 1,
3988     DRAG_OPERATION_LINK = 2,
3989     DRAG_OPERATION_GENERIC = 4,
3990     DRAG_OPERATION_PRIVATE = 8,
3991     DRAG_OPERATION_MOVE = 16,
3992     DRAG_OPERATION_DELETE = 32,
3993     DRAG_OPERATION_EVERY = UINT_MAX
3994 }
3995 
3996 alias DRAG_OPERATION_NONE = cef_drag_operations_mask_t.DRAG_OPERATION_NONE;
3997 alias DRAG_OPERATION_COPY = cef_drag_operations_mask_t.DRAG_OPERATION_COPY;
3998 alias DRAG_OPERATION_LINK = cef_drag_operations_mask_t.DRAG_OPERATION_LINK;
3999 alias DRAG_OPERATION_GENERIC = cef_drag_operations_mask_t.DRAG_OPERATION_GENERIC;
4000 alias DRAG_OPERATION_PRIVATE = cef_drag_operations_mask_t.DRAG_OPERATION_PRIVATE;
4001 alias DRAG_OPERATION_MOVE = cef_drag_operations_mask_t.DRAG_OPERATION_MOVE;
4002 alias DRAG_OPERATION_DELETE = cef_drag_operations_mask_t.DRAG_OPERATION_DELETE;
4003 alias DRAG_OPERATION_EVERY = cef_drag_operations_mask_t.DRAG_OPERATION_EVERY;
4004 
4005 enum cef_text_input_mode_t
4006 {
4007     CEF_TEXT_INPUT_MODE_DEFAULT = 0,
4008     CEF_TEXT_INPUT_MODE_NONE = 1,
4009     CEF_TEXT_INPUT_MODE_TEXT = 2,
4010     CEF_TEXT_INPUT_MODE_TEL = 3,
4011     CEF_TEXT_INPUT_MODE_URL = 4,
4012     CEF_TEXT_INPUT_MODE_EMAIL = 5,
4013     CEF_TEXT_INPUT_MODE_NUMERIC = 6,
4014     CEF_TEXT_INPUT_MODE_DECIMAL = 7,
4015     CEF_TEXT_INPUT_MODE_SEARCH = 8,
4016     CEF_TEXT_INPUT_MODE_MAX = CEF_TEXT_INPUT_MODE_SEARCH
4017 }
4018 
4019 alias CEF_TEXT_INPUT_MODE_DEFAULT = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_DEFAULT;
4020 alias CEF_TEXT_INPUT_MODE_NONE = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_NONE;
4021 alias CEF_TEXT_INPUT_MODE_TEXT = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_TEXT;
4022 alias CEF_TEXT_INPUT_MODE_TEL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_TEL;
4023 alias CEF_TEXT_INPUT_MODE_URL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_URL;
4024 alias CEF_TEXT_INPUT_MODE_EMAIL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_EMAIL;
4025 alias CEF_TEXT_INPUT_MODE_NUMERIC = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_NUMERIC;
4026 alias CEF_TEXT_INPUT_MODE_DECIMAL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_DECIMAL;
4027 alias CEF_TEXT_INPUT_MODE_SEARCH = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_SEARCH;
4028 alias CEF_TEXT_INPUT_MODE_MAX = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_MAX;
4029 
4030 enum cef_v8_accesscontrol_t
4031 {
4032     V8_ACCESS_CONTROL_DEFAULT = 0,
4033     V8_ACCESS_CONTROL_ALL_CAN_READ = 1,
4034     V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1,
4035     V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = 1 << 2
4036 }
4037 
4038 alias V8_ACCESS_CONTROL_DEFAULT = cef_v8_accesscontrol_t.V8_ACCESS_CONTROL_DEFAULT;
4039 alias V8_ACCESS_CONTROL_ALL_CAN_READ = cef_v8_accesscontrol_t.V8_ACCESS_CONTROL_ALL_CAN_READ;
4040 alias V8_ACCESS_CONTROL_ALL_CAN_WRITE = cef_v8_accesscontrol_t.V8_ACCESS_CONTROL_ALL_CAN_WRITE;
4041 alias V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = cef_v8_accesscontrol_t.V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING;
4042 
4043 enum cef_v8_propertyattribute_t
4044 {
4045     V8_PROPERTY_ATTRIBUTE_NONE = 0,
4046     V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0,
4047     V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1,
4048     V8_PROPERTY_ATTRIBUTE_DONTDELETE = 1 << 2
4049 }
4050 
4051 alias V8_PROPERTY_ATTRIBUTE_NONE = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_NONE;
4052 alias V8_PROPERTY_ATTRIBUTE_READONLY = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_READONLY;
4053 alias V8_PROPERTY_ATTRIBUTE_DONTENUM = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_DONTENUM;
4054 alias V8_PROPERTY_ATTRIBUTE_DONTDELETE = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_DONTDELETE;
4055 
4056 enum cef_postdataelement_type_t
4057 {
4058     PDE_TYPE_EMPTY = 0,
4059     PDE_TYPE_BYTES = 1,
4060     PDE_TYPE_FILE = 2
4061 }
4062 
4063 alias PDE_TYPE_EMPTY = cef_postdataelement_type_t.PDE_TYPE_EMPTY;
4064 alias PDE_TYPE_BYTES = cef_postdataelement_type_t.PDE_TYPE_BYTES;
4065 alias PDE_TYPE_FILE = cef_postdataelement_type_t.PDE_TYPE_FILE;
4066 
4067 enum cef_resource_type_t
4068 {
4069     RT_MAIN_FRAME = 0,
4070     RT_SUB_FRAME = 1,
4071     RT_STYLESHEET = 2,
4072     RT_SCRIPT = 3,
4073     RT_IMAGE = 4,
4074     RT_FONT_RESOURCE = 5,
4075     RT_SUB_RESOURCE = 6,
4076     RT_OBJECT = 7,
4077     RT_MEDIA = 8,
4078     RT_WORKER = 9,
4079     RT_SHARED_WORKER = 10,
4080     RT_PREFETCH = 11,
4081     RT_FAVICON = 12,
4082     RT_XHR = 13,
4083     RT_PING = 14,
4084     RT_SERVICE_WORKER = 15,
4085     RT_CSP_REPORT = 16,
4086     RT_PLUGIN_RESOURCE = 17,
4087     ///
4088     RT_NAVIGATION_PRELOAD_MAIN_FRAME = 19,
4089 
4090     ///
4091     /// A sub-frame service worker navigation preload request.
4092     ///
4093     RT_NAVIGATION_PRELOAD_SUB_FRAME = 20
4094 }
4095 
4096 alias RT_MAIN_FRAME = cef_resource_type_t.RT_MAIN_FRAME;
4097 alias RT_SUB_FRAME = cef_resource_type_t.RT_SUB_FRAME;
4098 alias RT_STYLESHEET = cef_resource_type_t.RT_STYLESHEET;
4099 alias RT_SCRIPT = cef_resource_type_t.RT_SCRIPT;
4100 alias RT_IMAGE = cef_resource_type_t.RT_IMAGE;
4101 alias RT_FONT_RESOURCE = cef_resource_type_t.RT_FONT_RESOURCE;
4102 alias RT_SUB_RESOURCE = cef_resource_type_t.RT_SUB_RESOURCE;
4103 alias RT_OBJECT = cef_resource_type_t.RT_OBJECT;
4104 alias RT_MEDIA = cef_resource_type_t.RT_MEDIA;
4105 alias RT_WORKER = cef_resource_type_t.RT_WORKER;
4106 alias RT_SHARED_WORKER = cef_resource_type_t.RT_SHARED_WORKER;
4107 alias RT_PREFETCH = cef_resource_type_t.RT_PREFETCH;
4108 alias RT_FAVICON = cef_resource_type_t.RT_FAVICON;
4109 alias RT_XHR = cef_resource_type_t.RT_XHR;
4110 alias RT_PING = cef_resource_type_t.RT_PING;
4111 alias RT_SERVICE_WORKER = cef_resource_type_t.RT_SERVICE_WORKER;
4112 alias RT_CSP_REPORT = cef_resource_type_t.RT_CSP_REPORT;
4113 alias RT_PLUGIN_RESOURCE = cef_resource_type_t.RT_PLUGIN_RESOURCE;
4114 alias RT_NAVIGATION_PRELOAD_MAIN_FRAME = cef_resource_type_t.RT_NAVIGATION_PRELOAD_MAIN_FRAME;
4115 alias RT_NAVIGATION_PRELOAD_SUB_FRAME = cef_resource_type_t.RT_NAVIGATION_PRELOAD_SUB_FRAME;
4116 
4117 ///
4118 /// Transition type for a request. Made up of one source value and 0 or more
4119 /// qualifiers.
4120 ///
4121 enum cef_transition_type_t
4122 {
4123     ///
4124     /// Source is a link click or the JavaScript window.open function. This is
4125     /// also the default value for requests like sub-resource loads that are not
4126     /// navigations.
4127     ///
4128     TT_LINK = 0,
4129 
4130     ///
4131     /// Source is some other "explicit" navigation. This is the default value for
4132     /// navigations where the actual type is unknown. See also
4133     /// TT_DIRECT_LOAD_FLAG.
4134     ///
4135     TT_EXPLICIT = 1,
4136 
4137     ///
4138     /// User got to this page through a suggestion in the UI (for example, via the
4139     /// destinations page). Chrome runtime only.
4140     ///
4141     TT_AUTO_BOOKMARK = 2,
4142 
4143     ///
4144     /// Source is a subframe navigation. This is any content that is automatically
4145     /// loaded in a non-toplevel frame. For example, if a page consists of several
4146     /// frames containing ads, those ad URLs will have this transition type.
4147     /// The user may not even realize the content in these pages is a separate
4148     /// frame, so may not care about the URL.
4149     ///
4150     TT_AUTO_SUBFRAME = 3,
4151 
4152     ///
4153     /// Source is a subframe navigation explicitly requested by the user that will
4154     /// generate new navigation entries in the back/forward list. These are
4155     /// probably more important than frames that were automatically loaded in
4156     /// the background because the user probably cares about the fact that this
4157     /// link was loaded.
4158     ///
4159     TT_MANUAL_SUBFRAME = 4,
4160 
4161     ///
4162     /// User got to this page by typing in the URL bar and selecting an entry
4163     /// that did not look like a URL.  For example, a match might have the URL
4164     /// of a Google search result page, but appear like "Search Google for ...".
4165     /// These are not quite the same as EXPLICIT navigations because the user
4166     /// didn't type or see the destination URL. Chrome runtime only.
4167     /// See also TT_KEYWORD.
4168     ///
4169     TT_GENERATED = 5,
4170 
4171     ///
4172     /// This is a toplevel navigation. This is any content that is automatically
4173     /// loaded in a toplevel frame.  For example, opening a tab to show the ASH
4174     /// screen saver, opening the devtools window, opening the NTP after the safe
4175     /// browsing warning, opening web-based dialog boxes are examples of
4176     /// AUTO_TOPLEVEL navigations. Chrome runtime only.
4177     ///
4178     TT_AUTO_TOPLEVEL = 6,
4179 
4180     ///
4181     /// Source is a form submission by the user. NOTE: In some situations
4182     /// submitting a form does not result in this transition type. This can happen
4183     /// if the form uses a script to submit the contents.
4184     ///
4185     TT_FORM_SUBMIT = 7,
4186 
4187     ///
4188     /// Source is a "reload" of the page via the Reload function or by re-visiting
4189     /// the same URL. NOTE: This is distinct from the concept of whether a
4190     /// particular load uses "reload semantics" (i.e. bypasses cached data).
4191     ///
4192     TT_RELOAD = 8,
4193 
4194     ///
4195     /// The url was generated from a replaceable keyword other than the default
4196     /// search provider. If the user types a keyword (which also applies to
4197     /// tab-to-search) in the omnibox this qualifier is applied to the transition
4198     /// type of the generated url. TemplateURLModel then may generate an
4199     /// additional visit with a transition type of TT_KEYWORD_GENERATED against
4200     /// the url 'http://' + keyword. For example, if you do a tab-to-search
4201     /// against wikipedia the generated url has a transition qualifer of
4202     /// TT_KEYWORD, and TemplateURLModel generates a visit for 'wikipedia.org'
4203     /// with a transition type of TT_KEYWORD_GENERATED. Chrome runtime only.
4204     ///
4205     TT_KEYWORD = 9,
4206 
4207     ///
4208     /// Corresponds to a visit generated for a keyword. See description of
4209     /// TT_KEYWORD for more details. Chrome runtime only.
4210     ///
4211     TT_KEYWORD_GENERATED = 10,
4212 
4213     ///
4214     /// General mask defining the bits used for the source values.
4215     ///
4216     TT_SOURCE_MASK = 0xFF,
4217 
4218     /// Qualifiers.
4219     /// Any of the core values above can be augmented by one or more qualifiers.
4220     /// These qualifiers further define the transition.
4221 
4222     ///
4223     /// Attempted to visit a URL but was blocked.
4224     ///
4225     TT_BLOCKED_FLAG = 0x00800000,
4226 
4227     ///
4228     /// Used the Forward or Back function to navigate among browsing history.
4229     /// Will be ORed to the transition type for the original load.
4230     ///
4231     TT_FORWARD_BACK_FLAG = 0x01000000,
4232 
4233     ///
4234     /// Loaded a URL directly via CreateBrowser, LoadURL or LoadRequest.
4235     ///
4236     TT_DIRECT_LOAD_FLAG = 0x02000000,
4237 
4238     ///
4239     /// User is navigating to the home page. Chrome runtime only.
4240     ///
4241     TT_HOME_PAGE_FLAG = 0x04000000,
4242 
4243     ///
4244     /// The transition originated from an external application; the exact
4245     /// definition of this is embedder dependent. Chrome runtime and
4246     /// extension system only.
4247     ///
4248     TT_FROM_API_FLAG = 0x08000000,
4249 
4250     ///
4251     /// The beginning of a navigation chain.
4252     ///
4253     TT_CHAIN_START_FLAG = 0x10000000,
4254 
4255     ///
4256     /// The last transition in a redirect chain.
4257     ///
4258     TT_CHAIN_END_FLAG = 0x20000000,
4259 
4260     ///
4261     /// Redirects caused by JavaScript or a meta refresh tag on the page.
4262     ///
4263     TT_CLIENT_REDIRECT_FLAG = 0x40000000,
4264 
4265     ///
4266     /// Redirects sent from the server by HTTP headers.
4267     ///
4268     TT_SERVER_REDIRECT_FLAG = 0x80000000,
4269 
4270     ///
4271     /// Used to test whether a transition involves a redirect.
4272     ///
4273     TT_IS_REDIRECT_MASK = 0xC0000000,
4274 
4275     ///
4276     /// General mask defining the bits used for the qualifiers.
4277     ///
4278     TT_QUALIFIER_MASK = 0xFFFFFF00
4279 }
4280 
4281 alias TT_LINK = cef_transition_type_t.TT_LINK;
4282 alias TT_EXPLICIT = cef_transition_type_t.TT_EXPLICIT;
4283 alias TT_AUTO_BOOKMARK = cef_transition_type_t.TT_AUTO_BOOKMARK;
4284 alias TT_AUTO_SUBFRAME = cef_transition_type_t.TT_AUTO_SUBFRAME;
4285 alias TT_MANUAL_SUBFRAME = cef_transition_type_t.TT_MANUAL_SUBFRAME;
4286 alias TT_GENERATED = cef_transition_type_t.TT_GENERATED;
4287 alias TT_AUTO_TOPLEVEL = cef_transition_type_t.TT_AUTO_TOPLEVEL;
4288 alias TT_FORM_SUBMIT = cef_transition_type_t.TT_FORM_SUBMIT;
4289 alias TT_RELOAD = cef_transition_type_t.TT_RELOAD;
4290 alias TT_KEYWORD = cef_transition_type_t.TT_KEYWORD;
4291 alias TT_KEYWORD_GENERATED = cef_transition_type_t.TT_KEYWORD_GENERATED;
4292 alias TT_SOURCE_MASK = cef_transition_type_t.TT_SOURCE_MASK;
4293 alias TT_BLOCKED_FLAG = cef_transition_type_t.TT_BLOCKED_FLAG;
4294 alias TT_FORWARD_BACK_FLAG = cef_transition_type_t.TT_FORWARD_BACK_FLAG;
4295 alias TT_DIRECT_LOAD_FLAG = cef_transition_type_t.TT_DIRECT_LOAD_FLAG;
4296 alias TT_HOME_PAGE_FLAG = cef_transition_type_t.TT_HOME_PAGE_FLAG;
4297 alias TT_FROM_API_FLAG = cef_transition_type_t.TT_FROM_API_FLAG;
4298 alias TT_CHAIN_START_FLAG = cef_transition_type_t.TT_CHAIN_START_FLAG;
4299 alias TT_CHAIN_END_FLAG = cef_transition_type_t.TT_CHAIN_END_FLAG;
4300 alias TT_CLIENT_REDIRECT_FLAG = cef_transition_type_t.TT_CLIENT_REDIRECT_FLAG;
4301 alias TT_SERVER_REDIRECT_FLAG = cef_transition_type_t.TT_SERVER_REDIRECT_FLAG;
4302 alias TT_IS_REDIRECT_MASK = cef_transition_type_t.TT_IS_REDIRECT_MASK;
4303 alias TT_QUALIFIER_MASK = cef_transition_type_t.TT_QUALIFIER_MASK;
4304 
4305 ///
4306 /// Flags used to customize the behavior of CefURLRequest.
4307 ///
4308 enum cef_urlrequest_flags_t
4309 {
4310     ///
4311     /// Default behavior.
4312     ///
4313     UR_FLAG_NONE = 0,
4314 
4315     ///
4316     /// If set the cache will be skipped when handling the request. Setting this
4317     /// value is equivalent to specifying the "Cache-Control: no-cache" request
4318     /// header. Setting this value in combination with UR_FLAG_ONLY_FROM_CACHE
4319     /// will cause the request to fail.
4320     ///
4321     UR_FLAG_SKIP_CACHE = 1 << 0,
4322 
4323     ///
4324     /// If set the request will fail if it cannot be served from the cache (or
4325     /// some equivalent local store). Setting this value is equivalent to
4326     /// specifying the "Cache-Control: only-if-cached" request header. Setting
4327     /// this value in combination with UR_FLAG_SKIP_CACHE or UR_FLAG_DISABLE_CACHE
4328     /// will cause the request to fail.
4329     ///
4330     UR_FLAG_ONLY_FROM_CACHE = 1 << 1,
4331 
4332     ///
4333     /// If set the cache will not be used at all. Setting this value is equivalent
4334     /// to specifying the "Cache-Control: no-store" request header. Setting this
4335     /// value in combination with UR_FLAG_ONLY_FROM_CACHE will cause the request
4336     /// to fail.
4337     ///
4338     UR_FLAG_DISABLE_CACHE = 1 << 2,
4339 
4340     ///
4341     /// If set user name, password, and cookies may be sent with the request, and
4342     /// cookies may be saved from the response.
4343     ///
4344     UR_FLAG_ALLOW_STORED_CREDENTIALS = 1 << 3,
4345 
4346     ///
4347     /// If set upload progress events will be generated when a request has a body.
4348     ///
4349     UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 4,
4350 
4351     ///
4352     /// If set the CefURLRequestClient::OnDownloadData method will not be called.
4353     ///
4354     UR_FLAG_NO_DOWNLOAD_DATA = 1 << 5,
4355 
4356     ///
4357     /// If set 5XX redirect errors will be propagated to the observer instead of
4358     /// automatically re-tried. This currently only applies for requests
4359     /// originated in the browser process.
4360     ///
4361     UR_FLAG_NO_RETRY_ON_5XX = 1 << 6,
4362 
4363     ///
4364     /// If set 3XX responses will cause the fetch to halt immediately rather than
4365     /// continue through the redirect.
4366     ///
4367     UR_FLAG_STOP_ON_REDIRECT = 1 << 7
4368 }
4369 
4370 alias UR_FLAG_NONE = cef_urlrequest_flags_t.UR_FLAG_NONE;
4371 alias UR_FLAG_SKIP_CACHE = cef_urlrequest_flags_t.UR_FLAG_SKIP_CACHE;
4372 alias UR_FLAG_ONLY_FROM_CACHE = cef_urlrequest_flags_t.UR_FLAG_ONLY_FROM_CACHE;
4373 alias UR_FLAG_DISABLE_CACHE = cef_urlrequest_flags_t.UR_FLAG_DISABLE_CACHE;
4374 alias UR_FLAG_ALLOW_STORED_CREDENTIALS = cef_urlrequest_flags_t.UR_FLAG_ALLOW_STORED_CREDENTIALS;
4375 alias UR_FLAG_REPORT_UPLOAD_PROGRESS = cef_urlrequest_flags_t.UR_FLAG_REPORT_UPLOAD_PROGRESS;
4376 alias UR_FLAG_NO_DOWNLOAD_DATA = cef_urlrequest_flags_t.UR_FLAG_NO_DOWNLOAD_DATA;
4377 alias UR_FLAG_NO_RETRY_ON_5XX = cef_urlrequest_flags_t.UR_FLAG_NO_RETRY_ON_5XX;
4378 alias UR_FLAG_STOP_ON_REDIRECT = cef_urlrequest_flags_t.UR_FLAG_STOP_ON_REDIRECT;
4379 
4380 ///
4381 /// Flags that represent CefURLRequest status.
4382 ///
4383 enum cef_urlrequest_status_t
4384 {
4385     ///
4386     /// Unknown status.
4387     ///
4388     UR_UNKNOWN = 0,
4389 
4390     ///
4391     /// Request succeeded.
4392     ///
4393     UR_SUCCESS = 1,
4394 
4395     ///
4396     /// An IO request is pending, and the caller will be informed when it is
4397     /// completed.
4398     ///
4399     UR_IO_PENDING = 2,
4400 
4401     ///
4402     /// Request was canceled programatically.
4403     ///
4404     UR_CANCELED = 3,
4405 
4406     ///
4407     /// Request failed for some reason.
4408     ///
4409     UR_FAILED = 4
4410 }
4411 
4412 alias UR_UNKNOWN = cef_urlrequest_status_t.UR_UNKNOWN;
4413 alias UR_SUCCESS = cef_urlrequest_status_t.UR_SUCCESS;
4414 alias UR_IO_PENDING = cef_urlrequest_status_t.UR_IO_PENDING;
4415 alias UR_CANCELED = cef_urlrequest_status_t.UR_CANCELED;
4416 alias UR_FAILED = cef_urlrequest_status_t.UR_FAILED;
4417 
4418 /// Structure representing a draggable region.
4419 ///
4420 struct cef_draggable_region_t
4421 {
4422     ///
4423     /// Bounds of the region.
4424     ///
4425     cef_rect_t bounds;
4426 
4427     ///
4428     /// True (1) this this region is draggable and false (0) otherwise.
4429     ///
4430     int draggable;
4431 }
4432 
4433 
4434 
4435 ///
4436 /// Existing process IDs.
4437 ///
4438 enum cef_process_id_t
4439 {
4440     ///
4441     /// Browser process.
4442     ///
4443     PID_BROWSER = 0,
4444     ///
4445     /// Renderer process.
4446     ///
4447     PID_RENDERER = 1
4448 }
4449 
4450 alias PID_BROWSER = cef_process_id_t.PID_BROWSER;
4451 alias PID_RENDERER = cef_process_id_t.PID_RENDERER;
4452 
4453 ///
4454 /// Existing thread IDs.
4455 ///
4456 enum cef_thread_id_t
4457 {
4458     // BROWSER PROCESS THREADS -- Only available in the browser process.
4459 
4460     ///
4461     /// The main thread in the browser. This will be the same as the main
4462     /// application thread if CefInitialize() is called with a
4463     /// CefSettings.multi_threaded_message_loop value of false. Do not perform
4464     /// blocking tasks on this thread. All tasks posted after
4465     /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
4466     /// are guaranteed to run. This thread will outlive all other CEF threads.
4467     ///
4468     TID_UI = 0,
4469 
4470     ///
4471     /// Used for blocking tasks like file system access where the user won't
4472     /// notice if the task takes an arbitrarily long time to complete. All tasks
4473     /// posted after CefBrowserProcessHandler::OnContextInitialized() and before
4474     /// CefShutdown() are guaranteed to run.
4475     ///
4476     TID_FILE_BACKGROUND = 1,
4477 
4478     ///
4479     /// Used for blocking tasks like file system access that affect UI or
4480     /// responsiveness of future user interactions. Do not use if an immediate
4481     /// response to a user interaction is expected. All tasks posted after
4482     /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
4483     /// are guaranteed to run.
4484     /// Examples:
4485     /// - Updating the UI to reflect progress on a long task.
4486     /// - Loading data that might be shown in the UI after a future user
4487     ///   interaction.
4488     ///
4489     TID_FILE_USER_VISIBLE = 2,
4490 
4491     ///
4492     /// Used for blocking tasks like file system access that affect UI
4493     /// immediately after a user interaction. All tasks posted after
4494     /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
4495     /// are guaranteed to run.
4496     /// Example: Generating data shown in the UI immediately after a click.
4497     ///
4498     TID_FILE_USER_BLOCKING = 3,
4499 
4500     ///
4501     /// Used to launch and terminate browser processes.
4502     ///
4503     TID_PROCESS_LAUNCHER = 4,
4504 
4505     ///
4506     /// Used to process IPC and network messages. Do not perform blocking tasks on
4507     /// this thread. All tasks posted after
4508     /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
4509     /// are guaranteed to run.
4510     ///
4511     TID_IO = 5,
4512 
4513     // RENDER PROCESS THREADS -- Only available in the render process.
4514 
4515     ///
4516     /// The main thread in the renderer. Used for all WebKit and V8 interaction.
4517     /// Tasks may be posted to this thread after
4518     /// CefRenderProcessHandler::OnWebKitInitialized but are not guaranteed to
4519     /// run before sub-process termination (sub-processes may be killed at any
4520     /// time without warning).
4521     ///
4522     TID_RENDERER = 6
4523 }
4524 
4525 alias TID_UI = cef_thread_id_t.TID_UI;
4526 alias TID_FILE_BACKGROUND = cef_thread_id_t.TID_FILE_BACKGROUND;
4527 alias TID_FILE_USER_VISIBLE = cef_thread_id_t.TID_FILE_USER_VISIBLE;
4528 alias TID_FILE_USER_BLOCKING = cef_thread_id_t.TID_FILE_USER_BLOCKING;
4529 alias TID_PROCESS_LAUNCHER = cef_thread_id_t.TID_PROCESS_LAUNCHER;
4530 alias TID_IO = cef_thread_id_t.TID_IO;
4531 alias TID_RENDERER = cef_thread_id_t.TID_RENDERER;
4532 
4533 ///
4534 /// Thread priority values listed in increasing order of importance.
4535 ///
4536 enum cef_thread_priority_t
4537 {
4538     ///
4539     /// Suitable for threads that shouldn't disrupt high priority work.
4540     ///
4541     TP_BACKGROUND = 0,
4542 
4543     ///
4544     /// Default priority level.
4545     ///
4546     TP_NORMAL = 1,
4547 
4548     ///
4549     /// Suitable for threads which generate data for the display (at ~60Hz).
4550     ///
4551     TP_DISPLAY = 2,
4552 
4553     ///
4554     /// Suitable for low-latency, glitch-resistant audio.
4555     ///
4556     TP_REALTIME_AUDIO = 3
4557 }
4558 
4559 alias TP_BACKGROUND = cef_thread_priority_t.TP_BACKGROUND;
4560 alias TP_NORMAL = cef_thread_priority_t.TP_NORMAL;
4561 alias TP_DISPLAY = cef_thread_priority_t.TP_DISPLAY;
4562 alias TP_REALTIME_AUDIO = cef_thread_priority_t.TP_REALTIME_AUDIO;
4563 
4564 ///
4565 /// Message loop types. Indicates the set of asynchronous events that a message
4566 /// loop can process.
4567 ///
4568 enum cef_message_loop_type_t
4569 {
4570     ///
4571     /// Supports tasks and timers.
4572     ///
4573     ML_TYPE_DEFAULT = 0,
4574 
4575     ///
4576     /// Supports tasks, timers and native UI events (e.g. Windows messages).
4577     ///
4578     ML_TYPE_UI = 1,
4579 
4580     ///
4581     /// Supports tasks, timers and asynchronous IO events.
4582     ///
4583     ML_TYPE_IO = 2
4584 }
4585 
4586 alias ML_TYPE_DEFAULT = cef_message_loop_type_t.ML_TYPE_DEFAULT;
4587 alias ML_TYPE_UI = cef_message_loop_type_t.ML_TYPE_UI;
4588 alias ML_TYPE_IO = cef_message_loop_type_t.ML_TYPE_IO;
4589 
4590 ///
4591 /// Windows COM initialization mode. Specifies how COM will be initialized for a
4592 /// new thread.
4593 ///
4594 enum cef_com_init_mode_t
4595 {
4596     ///
4597     /// No COM initialization.
4598     ///
4599     COM_INIT_MODE_NONE = 0,
4600 
4601     ///
4602     /// Initialize COM using single-threaded apartments.
4603     ///
4604     COM_INIT_MODE_STA = 1,
4605 
4606     ///
4607     /// Initialize COM using multi-threaded apartments.
4608     ///
4609     COM_INIT_MODE_MTA = 2
4610 }
4611 
4612 alias COM_INIT_MODE_NONE = cef_com_init_mode_t.COM_INIT_MODE_NONE;
4613 alias COM_INIT_MODE_STA = cef_com_init_mode_t.COM_INIT_MODE_STA;
4614 alias COM_INIT_MODE_MTA = cef_com_init_mode_t.COM_INIT_MODE_MTA;
4615 
4616 ///
4617 /// Supported value types.
4618 ///
4619 enum cef_value_type_t
4620 {
4621     VTYPE_INVALID = 0,
4622     VTYPE_NULL = 1,
4623     VTYPE_BOOL = 2,
4624     VTYPE_INT = 3,
4625     VTYPE_DOUBLE = 4,
4626     VTYPE_STRING = 5,
4627     VTYPE_BINARY = 6,
4628     VTYPE_DICTIONARY = 7,
4629     VTYPE_LIST = 8
4630 }
4631 
4632 alias VTYPE_INVALID = cef_value_type_t.VTYPE_INVALID;
4633 alias VTYPE_NULL = cef_value_type_t.VTYPE_NULL;
4634 alias VTYPE_BOOL = cef_value_type_t.VTYPE_BOOL;
4635 alias VTYPE_INT = cef_value_type_t.VTYPE_INT;
4636 alias VTYPE_DOUBLE = cef_value_type_t.VTYPE_DOUBLE;
4637 alias VTYPE_STRING = cef_value_type_t.VTYPE_STRING;
4638 alias VTYPE_BINARY = cef_value_type_t.VTYPE_BINARY;
4639 alias VTYPE_DICTIONARY = cef_value_type_t.VTYPE_DICTIONARY;
4640 alias VTYPE_LIST = cef_value_type_t.VTYPE_LIST;
4641 
4642 ///
4643 /// Supported JavaScript dialog types.
4644 ///
4645 enum cef_jsdialog_type_t
4646 {
4647     JSDIALOGTYPE_ALERT = 0,
4648     JSDIALOGTYPE_CONFIRM = 1,
4649     JSDIALOGTYPE_PROMPT = 2
4650 }
4651 
4652 alias JSDIALOGTYPE_ALERT = cef_jsdialog_type_t.JSDIALOGTYPE_ALERT;
4653 alias JSDIALOGTYPE_CONFIRM = cef_jsdialog_type_t.JSDIALOGTYPE_CONFIRM;
4654 alias JSDIALOGTYPE_PROMPT = cef_jsdialog_type_t.JSDIALOGTYPE_PROMPT;
4655 
4656 ///
4657 /// Screen information used when window rendering is disabled. This structure is
4658 /// passed as a parameter to CefRenderHandler::GetScreenInfo and should be
4659 /// filled in by the client.
4660 ///
4661 struct cef_screen_info_t
4662 {
4663     ///
4664     /// Device scale factor. Specifies the ratio between physical and logical
4665     /// pixels.
4666     ///
4667     float device_scale_factor;
4668 
4669     ///
4670     /// The screen depth in bits per pixel.
4671     ///
4672     int depth;
4673 
4674     ///
4675     /// The bits per color component. This assumes that the colors are balanced
4676     /// equally.
4677     ///
4678     int depth_per_component;
4679 
4680     ///
4681     /// This can be true for black and white printers.
4682     ///
4683     int is_monochrome;
4684 
4685     ///
4686     /// This is set from the rcMonitor member of MONITORINFOEX, to whit:
4687     ///   "A RECT structure that specifies the display monitor rectangle,
4688     ///   expressed in virtual-screen coordinates. Note that if the monitor
4689     ///   is not the primary display monitor, some of the rectangle's
4690     ///   coordinates may be negative values."
4691     //
4692     /// The |rect| and |available_rect| properties are used to determine the
4693     /// available surface for rendering popup views.
4694     ///
4695     cef_rect_t rect;
4696 
4697     ///
4698     /// This is set from the rcWork member of MONITORINFOEX, to whit:
4699     ///   "A RECT structure that specifies the work area rectangle of the
4700     ///   display monitor that can be used by applications, expressed in
4701     ///   virtual-screen coordinates. Windows uses this rectangle to
4702     ///   maximize an application on the monitor. The rest of the area in
4703     ///   rcMonitor contains system windows such as the task bar and side
4704     ///   bars. Note that if the monitor is not the primary display monitor,
4705     ///   some of the rectangle's coordinates may be negative values".
4706     //
4707     /// The |rect| and |available_rect| properties are used to determine the
4708     /// available surface for rendering popup views.
4709     ///
4710     cef_rect_t available_rect;
4711 }
4712 
4713 
4714 
4715 ///
4716 /// Supported menu IDs. Non-English translations can be provided for the
4717 /// IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString().
4718 ///
4719 enum cef_menu_id_t
4720 {
4721     // Navigation.
4722     MENU_ID_BACK = 100,
4723     MENU_ID_FORWARD = 101,
4724     MENU_ID_RELOAD = 102,
4725     MENU_ID_RELOAD_NOCACHE = 103,
4726     MENU_ID_STOPLOAD = 104,
4727 
4728     // Editing.
4729     MENU_ID_UNDO = 110,
4730     MENU_ID_REDO = 111,
4731     MENU_ID_CUT = 112,
4732     MENU_ID_COPY = 113,
4733     MENU_ID_PASTE = 114,
4734     MENU_ID_DELETE = 115,
4735     MENU_ID_SELECT_ALL = 116,
4736 
4737     // Miscellaneous.
4738     MENU_ID_FIND = 130,
4739     MENU_ID_PRINT = 131,
4740     MENU_ID_VIEW_SOURCE = 132,
4741 
4742     // Spell checking word correction suggestions.
4743     MENU_ID_SPELLCHECK_SUGGESTION_0 = 200,
4744     MENU_ID_SPELLCHECK_SUGGESTION_1 = 201,
4745     MENU_ID_SPELLCHECK_SUGGESTION_2 = 202,
4746     MENU_ID_SPELLCHECK_SUGGESTION_3 = 203,
4747     MENU_ID_SPELLCHECK_SUGGESTION_4 = 204,
4748     MENU_ID_SPELLCHECK_SUGGESTION_LAST = 204,
4749     MENU_ID_NO_SPELLING_SUGGESTIONS = 205,
4750     MENU_ID_ADD_TO_DICTIONARY = 206,
4751 
4752     // Custom menu items originating from the renderer process.
4753     MENU_ID_CUSTOM_FIRST = 220,
4754     MENU_ID_CUSTOM_LAST = 250,
4755 
4756     // All user-defined menu IDs should come between MENU_ID_USER_FIRST and
4757     // MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges
4758     // defined in the tools/gritsettings/resource_ids file.
4759     MENU_ID_USER_FIRST = 26500,
4760     MENU_ID_USER_LAST = 28500
4761 }
4762 
4763 alias MENU_ID_BACK = cef_menu_id_t.MENU_ID_BACK;
4764 alias MENU_ID_FORWARD = cef_menu_id_t.MENU_ID_FORWARD;
4765 alias MENU_ID_RELOAD = cef_menu_id_t.MENU_ID_RELOAD;
4766 alias MENU_ID_RELOAD_NOCACHE = cef_menu_id_t.MENU_ID_RELOAD_NOCACHE;
4767 alias MENU_ID_STOPLOAD = cef_menu_id_t.MENU_ID_STOPLOAD;
4768 alias MENU_ID_UNDO = cef_menu_id_t.MENU_ID_UNDO;
4769 alias MENU_ID_REDO = cef_menu_id_t.MENU_ID_REDO;
4770 alias MENU_ID_CUT = cef_menu_id_t.MENU_ID_CUT;
4771 alias MENU_ID_COPY = cef_menu_id_t.MENU_ID_COPY;
4772 alias MENU_ID_PASTE = cef_menu_id_t.MENU_ID_PASTE;
4773 alias MENU_ID_DELETE = cef_menu_id_t.MENU_ID_DELETE;
4774 alias MENU_ID_SELECT_ALL = cef_menu_id_t.MENU_ID_SELECT_ALL;
4775 alias MENU_ID_FIND = cef_menu_id_t.MENU_ID_FIND;
4776 alias MENU_ID_PRINT = cef_menu_id_t.MENU_ID_PRINT;
4777 alias MENU_ID_VIEW_SOURCE = cef_menu_id_t.MENU_ID_VIEW_SOURCE;
4778 alias MENU_ID_SPELLCHECK_SUGGESTION_0 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_0;
4779 alias MENU_ID_SPELLCHECK_SUGGESTION_1 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_1;
4780 alias MENU_ID_SPELLCHECK_SUGGESTION_2 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_2;
4781 alias MENU_ID_SPELLCHECK_SUGGESTION_3 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_3;
4782 alias MENU_ID_SPELLCHECK_SUGGESTION_4 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_4;
4783 alias MENU_ID_SPELLCHECK_SUGGESTION_LAST = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_LAST;
4784 alias MENU_ID_NO_SPELLING_SUGGESTIONS = cef_menu_id_t.MENU_ID_NO_SPELLING_SUGGESTIONS;
4785 alias MENU_ID_ADD_TO_DICTIONARY = cef_menu_id_t.MENU_ID_ADD_TO_DICTIONARY;
4786 alias MENU_ID_CUSTOM_FIRST = cef_menu_id_t.MENU_ID_CUSTOM_FIRST;
4787 alias MENU_ID_CUSTOM_LAST = cef_menu_id_t.MENU_ID_CUSTOM_LAST;
4788 alias MENU_ID_USER_FIRST = cef_menu_id_t.MENU_ID_USER_FIRST;
4789 alias MENU_ID_USER_LAST = cef_menu_id_t.MENU_ID_USER_LAST;
4790 
4791 ///
4792 /// Mouse button types.
4793 ///
4794 enum cef_mouse_button_type_t
4795 {
4796     MBT_LEFT = 0,
4797     MBT_MIDDLE = 1,
4798     MBT_RIGHT = 2
4799 }
4800 
4801 alias MBT_LEFT = cef_mouse_button_type_t.MBT_LEFT;
4802 alias MBT_MIDDLE = cef_mouse_button_type_t.MBT_MIDDLE;
4803 alias MBT_RIGHT = cef_mouse_button_type_t.MBT_RIGHT;
4804 
4805 ///
4806 /// Structure representing mouse event information.
4807 ///
4808 struct cef_mouse_event_t
4809 {
4810     ///
4811     /// X coordinate relative to the left side of the view.
4812     ///
4813     int x;
4814 
4815     ///
4816     /// Y coordinate relative to the top side of the view.
4817     ///
4818     int y;
4819 
4820     ///
4821     /// Bit flags describing any pressed modifier keys. See
4822     /// cef_event_flags_t for values.
4823     ///
4824     uint modifiers;
4825 }
4826 
4827 
4828 
4829 ///
4830 /// Touch points states types.
4831 ///
4832 enum cef_touch_event_type_t
4833 {
4834     CEF_TET_RELEASED = 0,
4835     CEF_TET_PRESSED = 1,
4836     CEF_TET_MOVED = 2,
4837     CEF_TET_CANCELLED = 3
4838 }
4839 
4840 alias CEF_TET_RELEASED = cef_touch_event_type_t.CEF_TET_RELEASED;
4841 alias CEF_TET_PRESSED = cef_touch_event_type_t.CEF_TET_PRESSED;
4842 alias CEF_TET_MOVED = cef_touch_event_type_t.CEF_TET_MOVED;
4843 alias CEF_TET_CANCELLED = cef_touch_event_type_t.CEF_TET_CANCELLED;
4844 
4845 ///
4846 /// The device type that caused the event.
4847 ///
4848 enum cef_pointer_type_t
4849 {
4850     CEF_POINTER_TYPE_TOUCH = 0,
4851     CEF_POINTER_TYPE_MOUSE = 1,
4852     CEF_POINTER_TYPE_PEN = 2,
4853     CEF_POINTER_TYPE_ERASER = 3,
4854     CEF_POINTER_TYPE_UNKNOWN = 4
4855 }
4856 
4857 alias CEF_POINTER_TYPE_TOUCH = cef_pointer_type_t.CEF_POINTER_TYPE_TOUCH;
4858 alias CEF_POINTER_TYPE_MOUSE = cef_pointer_type_t.CEF_POINTER_TYPE_MOUSE;
4859 alias CEF_POINTER_TYPE_PEN = cef_pointer_type_t.CEF_POINTER_TYPE_PEN;
4860 alias CEF_POINTER_TYPE_ERASER = cef_pointer_type_t.CEF_POINTER_TYPE_ERASER;
4861 alias CEF_POINTER_TYPE_UNKNOWN = cef_pointer_type_t.CEF_POINTER_TYPE_UNKNOWN;
4862 
4863 ///
4864 /// Structure representing touch event information.
4865 ///
4866 struct cef_touch_event_t
4867 {
4868     ///
4869     /// Id of a touch point. Must be unique per touch, can be any number except
4870     /// -1. Note that a maximum of 16 concurrent touches will be tracked; touches
4871     /// beyond that will be ignored.
4872     ///
4873     int id;
4874 
4875     ///
4876     /// X coordinate relative to the left side of the view.
4877     ///
4878     float x;
4879 
4880     ///
4881     /// Y coordinate relative to the top side of the view.
4882     ///
4883     float y;
4884 
4885     ///
4886     /// X radius in pixels. Set to 0 if not applicable.
4887     ///
4888     float radius_x;
4889 
4890     ///
4891     /// Y radius in pixels. Set to 0 if not applicable.
4892     ///
4893     float radius_y;
4894 
4895     ///
4896     /// Rotation angle in radians. Set to 0 if not applicable.
4897     ///
4898     float rotation_angle;
4899 
4900     ///
4901     /// The normalized pressure of the pointer input in the range of [0,1].
4902     /// Set to 0 if not applicable.
4903     ///
4904     float pressure;
4905 
4906     ///
4907     /// The state of the touch point. Touches begin with one CEF_TET_PRESSED event
4908     /// followed by zero or more CEF_TET_MOVED events and finally one
4909     /// CEF_TET_RELEASED or CEF_TET_CANCELLED event. Events not respecting this
4910     /// order will be ignored.
4911     ///
4912     cef_touch_event_type_t type;
4913 
4914     ///
4915     /// Bit flags describing any pressed modifier keys. See
4916     /// cef_event_flags_t for values.
4917     ///
4918     uint modifiers;
4919 
4920     ///
4921     /// The device type that caused the event.
4922     ///
4923     cef_pointer_type_t pointer_type;
4924 }
4925 
4926 
4927 
4928 ///
4929 /// Paint element types.
4930 ///
4931 enum cef_paint_element_type_t
4932 {
4933     PET_VIEW = 0,
4934     PET_POPUP = 1
4935 }
4936 
4937 alias PET_VIEW = cef_paint_element_type_t.PET_VIEW;
4938 alias PET_POPUP = cef_paint_element_type_t.PET_POPUP;
4939 
4940 ///
4941 /// Supported event bit flags.
4942 ///
4943 enum cef_event_flags_t
4944 {
4945     EVENTFLAG_NONE = 0,
4946     EVENTFLAG_CAPS_LOCK_ON = 1 << 0,
4947     EVENTFLAG_SHIFT_DOWN = 1 << 1,
4948     EVENTFLAG_CONTROL_DOWN = 1 << 2,
4949     EVENTFLAG_ALT_DOWN = 1 << 3,
4950     EVENTFLAG_LEFT_MOUSE_BUTTON = 1 << 4,
4951     EVENTFLAG_MIDDLE_MOUSE_BUTTON = 1 << 5,
4952     EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6,
4953     /// Mac OS-X command key.
4954     EVENTFLAG_COMMAND_DOWN = 1 << 7,
4955     EVENTFLAG_NUM_LOCK_ON = 1 << 8,
4956     EVENTFLAG_IS_KEY_PAD = 1 << 9,
4957     EVENTFLAG_IS_LEFT = 1 << 10,
4958     EVENTFLAG_IS_RIGHT = 1 << 11,
4959     EVENTFLAG_ALTGR_DOWN = 1 << 12,
4960     EVENTFLAG_IS_REPEAT = 1 << 13
4961 }
4962 
4963 alias EVENTFLAG_NONE = cef_event_flags_t.EVENTFLAG_NONE;
4964 alias EVENTFLAG_CAPS_LOCK_ON = cef_event_flags_t.EVENTFLAG_CAPS_LOCK_ON;
4965 alias EVENTFLAG_SHIFT_DOWN = cef_event_flags_t.EVENTFLAG_SHIFT_DOWN;
4966 alias EVENTFLAG_CONTROL_DOWN = cef_event_flags_t.EVENTFLAG_CONTROL_DOWN;
4967 alias EVENTFLAG_ALT_DOWN = cef_event_flags_t.EVENTFLAG_ALT_DOWN;
4968 alias EVENTFLAG_LEFT_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_LEFT_MOUSE_BUTTON;
4969 alias EVENTFLAG_MIDDLE_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_MIDDLE_MOUSE_BUTTON;
4970 alias EVENTFLAG_RIGHT_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_RIGHT_MOUSE_BUTTON;
4971 alias EVENTFLAG_COMMAND_DOWN = cef_event_flags_t.EVENTFLAG_COMMAND_DOWN;
4972 alias EVENTFLAG_NUM_LOCK_ON = cef_event_flags_t.EVENTFLAG_NUM_LOCK_ON;
4973 alias EVENTFLAG_IS_KEY_PAD = cef_event_flags_t.EVENTFLAG_IS_KEY_PAD;
4974 alias EVENTFLAG_IS_LEFT = cef_event_flags_t.EVENTFLAG_IS_LEFT;
4975 alias EVENTFLAG_IS_RIGHT = cef_event_flags_t.EVENTFLAG_IS_RIGHT;
4976 alias EVENTFLAG_ALTGR_DOWN = cef_event_flags_t.EVENTFLAG_ALTGR_DOWN;
4977 alias EVENTFLAG_IS_REPEAT = cef_event_flags_t.EVENTFLAG_IS_REPEAT;
4978 
4979 ///
4980 /// Supported menu item types.
4981 ///
4982 enum cef_menu_item_type_t
4983 {
4984     MENUITEMTYPE_NONE = 0,
4985     MENUITEMTYPE_COMMAND = 1,
4986     MENUITEMTYPE_CHECK = 2,
4987     MENUITEMTYPE_RADIO = 3,
4988     MENUITEMTYPE_SEPARATOR = 4,
4989     MENUITEMTYPE_SUBMENU = 5
4990 }
4991 
4992 alias MENUITEMTYPE_NONE = cef_menu_item_type_t.MENUITEMTYPE_NONE;
4993 alias MENUITEMTYPE_COMMAND = cef_menu_item_type_t.MENUITEMTYPE_COMMAND;
4994 alias MENUITEMTYPE_CHECK = cef_menu_item_type_t.MENUITEMTYPE_CHECK;
4995 alias MENUITEMTYPE_RADIO = cef_menu_item_type_t.MENUITEMTYPE_RADIO;
4996 alias MENUITEMTYPE_SEPARATOR = cef_menu_item_type_t.MENUITEMTYPE_SEPARATOR;
4997 alias MENUITEMTYPE_SUBMENU = cef_menu_item_type_t.MENUITEMTYPE_SUBMENU;
4998 
4999 ///
5000 /// Supported context menu type flags.
5001 ///
5002 enum cef_context_menu_type_flags_t
5003 {
5004     ///
5005     /// No node is selected.
5006     ///
5007     CM_TYPEFLAG_NONE = 0,
5008     ///
5009     /// The top page is selected.
5010     ///
5011     CM_TYPEFLAG_PAGE = 1 << 0,
5012     ///
5013     /// A subframe page is selected.
5014     ///
5015     CM_TYPEFLAG_FRAME = 1 << 1,
5016     ///
5017     /// A link is selected.
5018     ///
5019     CM_TYPEFLAG_LINK = 1 << 2,
5020     ///
5021     /// A media node is selected.
5022     ///
5023     CM_TYPEFLAG_MEDIA = 1 << 3,
5024     ///
5025     /// There is a textual or mixed selection that is selected.
5026     ///
5027     CM_TYPEFLAG_SELECTION = 1 << 4,
5028     ///
5029     /// An editable element is selected.
5030     ///
5031     CM_TYPEFLAG_EDITABLE = 1 << 5
5032 }
5033 
5034 alias CM_TYPEFLAG_NONE = cef_context_menu_type_flags_t.CM_TYPEFLAG_NONE;
5035 alias CM_TYPEFLAG_PAGE = cef_context_menu_type_flags_t.CM_TYPEFLAG_PAGE;
5036 alias CM_TYPEFLAG_FRAME = cef_context_menu_type_flags_t.CM_TYPEFLAG_FRAME;
5037 alias CM_TYPEFLAG_LINK = cef_context_menu_type_flags_t.CM_TYPEFLAG_LINK;
5038 alias CM_TYPEFLAG_MEDIA = cef_context_menu_type_flags_t.CM_TYPEFLAG_MEDIA;
5039 alias CM_TYPEFLAG_SELECTION = cef_context_menu_type_flags_t.CM_TYPEFLAG_SELECTION;
5040 alias CM_TYPEFLAG_EDITABLE = cef_context_menu_type_flags_t.CM_TYPEFLAG_EDITABLE;
5041 
5042 ///
5043 /// Supported context menu media types. These constants match their equivalents
5044 /// in Chromium's ContextMenuDataMediaType and should not be renumbered.
5045 ///
5046 enum cef_context_menu_media_type_t
5047 {
5048     ///
5049     /// No special node is in context.
5050     ///
5051     CM_MEDIATYPE_NONE = 0,
5052     ///
5053     /// An image node is selected.
5054     ///
5055     CM_MEDIATYPE_IMAGE = 1,
5056     ///
5057     /// A video node is selected.
5058     ///
5059     CM_MEDIATYPE_VIDEO = 2,
5060     ///
5061     /// An audio node is selected.
5062     ///
5063     CM_MEDIATYPE_AUDIO = 3,
5064     ///
5065     /// An canvas node is selected.
5066     ///
5067     CM_MEDIATYPE_CANVAS = 4,
5068     ///
5069     /// A file node is selected.
5070     ///
5071     CM_MEDIATYPE_FILE = 5,
5072     ///
5073     /// A plugin node is selected.
5074     ///
5075     CM_MEDIATYPE_PLUGIN = 6
5076 }
5077 
5078 alias CM_MEDIATYPE_NONE = cef_context_menu_media_type_t.CM_MEDIATYPE_NONE;
5079 alias CM_MEDIATYPE_IMAGE = cef_context_menu_media_type_t.CM_MEDIATYPE_IMAGE;
5080 alias CM_MEDIATYPE_VIDEO = cef_context_menu_media_type_t.CM_MEDIATYPE_VIDEO;
5081 alias CM_MEDIATYPE_AUDIO = cef_context_menu_media_type_t.CM_MEDIATYPE_AUDIO;
5082 alias CM_MEDIATYPE_CANVAS = cef_context_menu_media_type_t.CM_MEDIATYPE_CANVAS;
5083 alias CM_MEDIATYPE_FILE = cef_context_menu_media_type_t.CM_MEDIATYPE_FILE;
5084 alias CM_MEDIATYPE_PLUGIN = cef_context_menu_media_type_t.CM_MEDIATYPE_PLUGIN;
5085 
5086 ///
5087 /// Supported context menu media state bit flags. These constants match their
5088 /// equivalents in Chromium's ContextMenuData::MediaFlags and should not be
5089 /// renumbered.
5090 ///
5091 enum cef_context_menu_media_state_flags_t
5092 {
5093     CM_MEDIAFLAG_NONE = 0,
5094     CM_MEDIAFLAG_IN_ERROR = 1 << 0,
5095     CM_MEDIAFLAG_PAUSED = 1 << 1,
5096     CM_MEDIAFLAG_MUTED = 1 << 2,
5097     CM_MEDIAFLAG_LOOP = 1 << 3,
5098     CM_MEDIAFLAG_CAN_SAVE = 1 << 4,
5099     CM_MEDIAFLAG_HAS_AUDIO = 1 << 5,
5100     CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS = 1 << 6,
5101     CM_MEDIAFLAG_CONTROLS = 1 << 7,
5102     CM_MEDIAFLAG_CAN_PRINT = 1 << 8,
5103     CM_MEDIAFLAG_CAN_ROTATE = 1 << 9,
5104     CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE = 1 << 10,
5105     CM_MEDIAFLAG_PICTURE_IN_PICTURE = 1 << 11,
5106     CM_MEDIAFLAG_CAN_LOOP = 1 << 12
5107 }
5108 
5109 alias CM_MEDIAFLAG_NONE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_NONE;
5110 alias CM_MEDIAFLAG_IN_ERROR = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_IN_ERROR;
5111 alias CM_MEDIAFLAG_PAUSED = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_PAUSED;
5112 alias CM_MEDIAFLAG_MUTED = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_MUTED;
5113 alias CM_MEDIAFLAG_LOOP = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_LOOP;
5114 alias CM_MEDIAFLAG_CAN_SAVE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_SAVE;
5115 alias CM_MEDIAFLAG_HAS_AUDIO = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_HAS_AUDIO;
5116 alias CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS;
5117 alias CM_MEDIAFLAG_CONTROLS = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CONTROLS;
5118 alias CM_MEDIAFLAG_CAN_PRINT = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_PRINT;
5119 alias CM_MEDIAFLAG_CAN_ROTATE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_ROTATE;
5120 alias CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE;
5121 alias CM_MEDIAFLAG_PICTURE_IN_PICTURE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_PICTURE_IN_PICTURE;
5122 alias CM_MEDIAFLAG_CAN_LOOP = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_LOOP;
5123 
5124 ///
5125 /// Supported context menu edit state bit flags. These constants match their
5126 /// equivalents in Chromium's ContextMenuDataEditFlags and should not be
5127 /// renumbered.
5128 ///
5129 enum cef_context_menu_edit_state_flags_t
5130 {
5131     CM_EDITFLAG_NONE = 0,
5132     CM_EDITFLAG_CAN_UNDO = 1 << 0,
5133     CM_EDITFLAG_CAN_REDO = 1 << 1,
5134     CM_EDITFLAG_CAN_CUT = 1 << 2,
5135     CM_EDITFLAG_CAN_COPY = 1 << 3,
5136     CM_EDITFLAG_CAN_PASTE = 1 << 4,
5137     CM_EDITFLAG_CAN_DELETE = 1 << 5,
5138     CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6,
5139     CM_EDITFLAG_CAN_TRANSLATE = 1 << 7,
5140     CM_EDITFLAG_CAN_EDIT_RICHLY = 1 << 8
5141 }
5142 
5143 alias CM_EDITFLAG_NONE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_NONE;
5144 alias CM_EDITFLAG_CAN_UNDO = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_UNDO;
5145 alias CM_EDITFLAG_CAN_REDO = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_REDO;
5146 alias CM_EDITFLAG_CAN_CUT = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_CUT;
5147 alias CM_EDITFLAG_CAN_COPY = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_COPY;
5148 alias CM_EDITFLAG_CAN_PASTE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_PASTE;
5149 alias CM_EDITFLAG_CAN_DELETE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_DELETE;
5150 alias CM_EDITFLAG_CAN_SELECT_ALL = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_SELECT_ALL;
5151 alias CM_EDITFLAG_CAN_TRANSLATE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_TRANSLATE;
5152 alias CM_EDITFLAG_CAN_EDIT_RICHLY = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_EDIT_RICHLY;
5153 
5154 ///
5155 /// Supported quick menu state bit flags.
5156 ///
5157 enum cef_quick_menu_edit_state_flags_t
5158 {
5159     QM_EDITFLAG_NONE = 0,
5160     QM_EDITFLAG_CAN_ELLIPSIS = 1 << 0,
5161     QM_EDITFLAG_CAN_CUT = 1 << 1,
5162     QM_EDITFLAG_CAN_COPY = 1 << 2,
5163     QM_EDITFLAG_CAN_PASTE = 1 << 3
5164 }
5165 
5166 alias QM_EDITFLAG_NONE = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_NONE;
5167 alias QM_EDITFLAG_CAN_ELLIPSIS = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_ELLIPSIS;
5168 alias QM_EDITFLAG_CAN_CUT = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_CUT;
5169 alias QM_EDITFLAG_CAN_COPY = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_COPY;
5170 alias QM_EDITFLAG_CAN_PASTE = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_PASTE;
5171 
5172 ///
5173 /// Key event types.
5174 ///
5175 enum cef_key_event_type_t
5176 {
5177     ///
5178     /// Notification that a key transitioned from "up" to "down".
5179     ///
5180     KEYEVENT_RAWKEYDOWN = 0,
5181 
5182     ///
5183     /// Notification that a key was pressed. This does not necessarily correspond
5184     /// to a character depending on the key and language. Use KEYEVENT_CHAR for
5185     /// character input.
5186     ///
5187     KEYEVENT_KEYDOWN = 1,
5188 
5189     ///
5190     /// Notification that a key was released.
5191     ///
5192     KEYEVENT_KEYUP = 2,
5193 
5194     ///
5195     /// Notification that a character was typed. Use this for text input. Key
5196     /// down events may generate 0, 1, or more than one character event depending
5197     /// on the key, locale, and operating system.
5198     ///
5199     KEYEVENT_CHAR = 3
5200 }
5201 
5202 alias KEYEVENT_RAWKEYDOWN = cef_key_event_type_t.KEYEVENT_RAWKEYDOWN;
5203 alias KEYEVENT_KEYDOWN = cef_key_event_type_t.KEYEVENT_KEYDOWN;
5204 alias KEYEVENT_KEYUP = cef_key_event_type_t.KEYEVENT_KEYUP;
5205 alias KEYEVENT_CHAR = cef_key_event_type_t.KEYEVENT_CHAR;
5206 
5207 ///
5208 /// Structure representing keyboard event information.
5209 ///
5210 struct cef_key_event_t
5211 {
5212     ///
5213     /// The type of keyboard event.
5214     ///
5215     cef_key_event_type_t type;
5216 
5217     ///
5218     /// Bit flags describing any pressed modifier keys. See
5219     /// cef_event_flags_t for values.
5220     ///
5221     uint modifiers;
5222 
5223     ///
5224     /// The Windows key code for the key event. This value is used by the DOM
5225     /// specification. Sometimes it comes directly from the event (i.e. on
5226     /// Windows) and sometimes it's determined using a mapping function. See
5227     /// WebCore/platform/chromium/KeyboardCodes.h for the list of values.
5228     ///
5229     int windows_key_code;
5230 
5231     ///
5232     /// The actual key code genenerated by the platform.
5233     ///
5234     int native_key_code;
5235 
5236     ///
5237     /// Indicates whether the event is considered a "system key" event (see
5238     /// http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details).
5239     /// This value will always be false on non-Windows platforms.
5240     ///
5241     int is_system_key;
5242 
5243     ///
5244     /// The character generated by the keystroke.
5245     ///
5246     alias char16_t = ushort;
5247     char16_t character;
5248 
5249     ///
5250     /// Same as |character| but unmodified by any concurrently-held modifiers
5251     /// (except shift). This is useful for working out shortcut keys.
5252     ///
5253     char16_t unmodified_character;
5254 
5255     ///
5256     /// True if the focus is currently on an editable field on the page. This is
5257     /// useful for determining if standard key events should be intercepted.
5258     ///
5259     int focus_on_editable_field;
5260 }
5261 
5262 
5263 
5264 ///
5265 /// Focus sources.
5266 ///
5267 enum cef_focus_source_t
5268 {
5269     ///
5270     /// The source is explicit navigation via the API (LoadURL(), etc).
5271     ///
5272     FOCUS_SOURCE_NAVIGATION = 0,
5273     ///
5274     /// The source is a system-generated focus event.
5275     ///
5276     FOCUS_SOURCE_SYSTEM = 1
5277 }
5278 
5279 alias FOCUS_SOURCE_NAVIGATION = cef_focus_source_t.FOCUS_SOURCE_NAVIGATION;
5280 alias FOCUS_SOURCE_SYSTEM = cef_focus_source_t.FOCUS_SOURCE_SYSTEM;
5281 
5282 ///
5283 /// Navigation types.
5284 ///
5285 enum cef_navigation_type_t
5286 {
5287     NAVIGATION_LINK_CLICKED = 0,
5288     NAVIGATION_FORM_SUBMITTED = 1,
5289     NAVIGATION_BACK_FORWARD = 2,
5290     NAVIGATION_RELOAD = 3,
5291     NAVIGATION_FORM_RESUBMITTED = 4,
5292     NAVIGATION_OTHER = 5
5293 }
5294 
5295 alias NAVIGATION_LINK_CLICKED = cef_navigation_type_t.NAVIGATION_LINK_CLICKED;
5296 alias NAVIGATION_FORM_SUBMITTED = cef_navigation_type_t.NAVIGATION_FORM_SUBMITTED;
5297 alias NAVIGATION_BACK_FORWARD = cef_navigation_type_t.NAVIGATION_BACK_FORWARD;
5298 alias NAVIGATION_RELOAD = cef_navigation_type_t.NAVIGATION_RELOAD;
5299 alias NAVIGATION_FORM_RESUBMITTED = cef_navigation_type_t.NAVIGATION_FORM_RESUBMITTED;
5300 alias NAVIGATION_OTHER = cef_navigation_type_t.NAVIGATION_OTHER;
5301 
5302 ///
5303 /// Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and
5304 /// UTF16 (LE and BE) by default. All other types must be translated to UTF8
5305 /// before being passed to the parser. If a BOM is detected and the correct
5306 /// decoder is available then that decoder will be used automatically.
5307 ///
5308 enum cef_xml_encoding_type_t
5309 {
5310     XML_ENCODING_NONE = 0,
5311     XML_ENCODING_UTF8 = 1,
5312     XML_ENCODING_UTF16LE = 2,
5313     XML_ENCODING_UTF16BE = 3,
5314     XML_ENCODING_ASCII = 4
5315 }
5316 
5317 alias XML_ENCODING_NONE = cef_xml_encoding_type_t.XML_ENCODING_NONE;
5318 alias XML_ENCODING_UTF8 = cef_xml_encoding_type_t.XML_ENCODING_UTF8;
5319 alias XML_ENCODING_UTF16LE = cef_xml_encoding_type_t.XML_ENCODING_UTF16LE;
5320 alias XML_ENCODING_UTF16BE = cef_xml_encoding_type_t.XML_ENCODING_UTF16BE;
5321 alias XML_ENCODING_ASCII = cef_xml_encoding_type_t.XML_ENCODING_ASCII;
5322 
5323 ///
5324 /// XML node types.
5325 ///
5326 enum cef_xml_node_type_t
5327 {
5328     XML_NODE_UNSUPPORTED = 0,
5329     XML_NODE_PROCESSING_INSTRUCTION = 1,
5330     XML_NODE_DOCUMENT_TYPE = 2,
5331     XML_NODE_ELEMENT_START = 3,
5332     XML_NODE_ELEMENT_END = 4,
5333     XML_NODE_ATTRIBUTE = 5,
5334     XML_NODE_TEXT = 6,
5335     XML_NODE_CDATA = 7,
5336     XML_NODE_ENTITY_REFERENCE = 8,
5337     XML_NODE_WHITESPACE = 9,
5338     XML_NODE_COMMENT = 10
5339 }
5340 
5341 alias XML_NODE_UNSUPPORTED = cef_xml_node_type_t.XML_NODE_UNSUPPORTED;
5342 alias XML_NODE_PROCESSING_INSTRUCTION = cef_xml_node_type_t.XML_NODE_PROCESSING_INSTRUCTION;
5343 alias XML_NODE_DOCUMENT_TYPE = cef_xml_node_type_t.XML_NODE_DOCUMENT_TYPE;
5344 alias XML_NODE_ELEMENT_START = cef_xml_node_type_t.XML_NODE_ELEMENT_START;
5345 alias XML_NODE_ELEMENT_END = cef_xml_node_type_t.XML_NODE_ELEMENT_END;
5346 alias XML_NODE_ATTRIBUTE = cef_xml_node_type_t.XML_NODE_ATTRIBUTE;
5347 alias XML_NODE_TEXT = cef_xml_node_type_t.XML_NODE_TEXT;
5348 alias XML_NODE_CDATA = cef_xml_node_type_t.XML_NODE_CDATA;
5349 alias XML_NODE_ENTITY_REFERENCE = cef_xml_node_type_t.XML_NODE_ENTITY_REFERENCE;
5350 alias XML_NODE_WHITESPACE = cef_xml_node_type_t.XML_NODE_WHITESPACE;
5351 alias XML_NODE_COMMENT = cef_xml_node_type_t.XML_NODE_COMMENT;
5352 
5353 ///
5354 /// Popup window features.
5355 ///
5356 struct cef_popup_features_t
5357 {
5358     int x;
5359     int xSet;
5360     int y;
5361     int ySet;
5362     int width;
5363     int widthSet;
5364     int height;
5365     int heightSet;
5366 
5367     /// True (1) if browser interface elements should be hidden.
5368     int isPopup;
5369 }
5370 
5371 
5372 
5373 ///
5374 /// DOM document types.
5375 ///
5376 enum cef_dom_document_type_t
5377 {
5378     DOM_DOCUMENT_TYPE_UNKNOWN = 0,
5379     DOM_DOCUMENT_TYPE_HTML = 1,
5380     DOM_DOCUMENT_TYPE_XHTML = 2,
5381     DOM_DOCUMENT_TYPE_PLUGIN = 3
5382 }
5383 
5384 alias DOM_DOCUMENT_TYPE_UNKNOWN = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_UNKNOWN;
5385 alias DOM_DOCUMENT_TYPE_HTML = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_HTML;
5386 alias DOM_DOCUMENT_TYPE_XHTML = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_XHTML;
5387 alias DOM_DOCUMENT_TYPE_PLUGIN = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_PLUGIN;
5388 
5389 ///
5390 /// DOM event category flags.
5391 ///
5392 enum cef_dom_event_category_t
5393 {
5394     DOM_EVENT_CATEGORY_UNKNOWN = 0x0,
5395     DOM_EVENT_CATEGORY_UI = 0x1,
5396     DOM_EVENT_CATEGORY_MOUSE = 0x2,
5397     DOM_EVENT_CATEGORY_MUTATION = 0x4,
5398     DOM_EVENT_CATEGORY_KEYBOARD = 0x8,
5399     DOM_EVENT_CATEGORY_TEXT = 0x10,
5400     DOM_EVENT_CATEGORY_COMPOSITION = 0x20,
5401     DOM_EVENT_CATEGORY_DRAG = 0x40,
5402     DOM_EVENT_CATEGORY_CLIPBOARD = 0x80,
5403     DOM_EVENT_CATEGORY_MESSAGE = 0x100,
5404     DOM_EVENT_CATEGORY_WHEEL = 0x200,
5405     DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = 0x400,
5406     DOM_EVENT_CATEGORY_OVERFLOW = 0x800,
5407     DOM_EVENT_CATEGORY_PAGE_TRANSITION = 0x1000,
5408     DOM_EVENT_CATEGORY_POPSTATE = 0x2000,
5409     DOM_EVENT_CATEGORY_PROGRESS = 0x4000,
5410     DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000
5411 }
5412 
5413 alias DOM_EVENT_CATEGORY_UNKNOWN = cef_dom_event_category_t.DOM_EVENT_CATEGORY_UNKNOWN;
5414 alias DOM_EVENT_CATEGORY_UI = cef_dom_event_category_t.DOM_EVENT_CATEGORY_UI;
5415 alias DOM_EVENT_CATEGORY_MOUSE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MOUSE;
5416 alias DOM_EVENT_CATEGORY_MUTATION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MUTATION;
5417 alias DOM_EVENT_CATEGORY_KEYBOARD = cef_dom_event_category_t.DOM_EVENT_CATEGORY_KEYBOARD;
5418 alias DOM_EVENT_CATEGORY_TEXT = cef_dom_event_category_t.DOM_EVENT_CATEGORY_TEXT;
5419 alias DOM_EVENT_CATEGORY_COMPOSITION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_COMPOSITION;
5420 alias DOM_EVENT_CATEGORY_DRAG = cef_dom_event_category_t.DOM_EVENT_CATEGORY_DRAG;
5421 alias DOM_EVENT_CATEGORY_CLIPBOARD = cef_dom_event_category_t.DOM_EVENT_CATEGORY_CLIPBOARD;
5422 alias DOM_EVENT_CATEGORY_MESSAGE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MESSAGE;
5423 alias DOM_EVENT_CATEGORY_WHEEL = cef_dom_event_category_t.DOM_EVENT_CATEGORY_WHEEL;
5424 alias DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = cef_dom_event_category_t.DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED;
5425 alias DOM_EVENT_CATEGORY_OVERFLOW = cef_dom_event_category_t.DOM_EVENT_CATEGORY_OVERFLOW;
5426 alias DOM_EVENT_CATEGORY_PAGE_TRANSITION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_PAGE_TRANSITION;
5427 alias DOM_EVENT_CATEGORY_POPSTATE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_POPSTATE;
5428 alias DOM_EVENT_CATEGORY_PROGRESS = cef_dom_event_category_t.DOM_EVENT_CATEGORY_PROGRESS;
5429 alias DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = cef_dom_event_category_t.DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS;
5430 
5431 ///
5432 /// DOM event processing phases.
5433 ///
5434 enum cef_dom_event_phase_t
5435 {
5436     DOM_EVENT_PHASE_UNKNOWN = 0,
5437     DOM_EVENT_PHASE_CAPTURING = 1,
5438     DOM_EVENT_PHASE_AT_TARGET = 2,
5439     DOM_EVENT_PHASE_BUBBLING = 3
5440 }
5441 
5442 alias DOM_EVENT_PHASE_UNKNOWN = cef_dom_event_phase_t.DOM_EVENT_PHASE_UNKNOWN;
5443 alias DOM_EVENT_PHASE_CAPTURING = cef_dom_event_phase_t.DOM_EVENT_PHASE_CAPTURING;
5444 alias DOM_EVENT_PHASE_AT_TARGET = cef_dom_event_phase_t.DOM_EVENT_PHASE_AT_TARGET;
5445 alias DOM_EVENT_PHASE_BUBBLING = cef_dom_event_phase_t.DOM_EVENT_PHASE_BUBBLING;
5446 
5447 ///
5448 /// DOM node types.
5449 ///
5450 enum cef_dom_node_type_t
5451 {
5452     DOM_NODE_TYPE_UNSUPPORTED = 0,
5453     DOM_NODE_TYPE_ELEMENT = 1,
5454     DOM_NODE_TYPE_ATTRIBUTE = 2,
5455     DOM_NODE_TYPE_TEXT = 3,
5456     DOM_NODE_TYPE_CDATA_SECTION = 4,
5457     DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS = 5,
5458     DOM_NODE_TYPE_COMMENT = 6,
5459     DOM_NODE_TYPE_DOCUMENT = 7,
5460     DOM_NODE_TYPE_DOCUMENT_TYPE = 8,
5461     DOM_NODE_TYPE_DOCUMENT_FRAGMENT = 9
5462 }
5463 
5464 alias DOM_NODE_TYPE_UNSUPPORTED = cef_dom_node_type_t.DOM_NODE_TYPE_UNSUPPORTED;
5465 alias DOM_NODE_TYPE_ELEMENT = cef_dom_node_type_t.DOM_NODE_TYPE_ELEMENT;
5466 alias DOM_NODE_TYPE_ATTRIBUTE = cef_dom_node_type_t.DOM_NODE_TYPE_ATTRIBUTE;
5467 alias DOM_NODE_TYPE_TEXT = cef_dom_node_type_t.DOM_NODE_TYPE_TEXT;
5468 alias DOM_NODE_TYPE_CDATA_SECTION = cef_dom_node_type_t.DOM_NODE_TYPE_CDATA_SECTION;
5469 alias DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS = cef_dom_node_type_t.DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS;
5470 alias DOM_NODE_TYPE_COMMENT = cef_dom_node_type_t.DOM_NODE_TYPE_COMMENT;
5471 alias DOM_NODE_TYPE_DOCUMENT = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT;
5472 alias DOM_NODE_TYPE_DOCUMENT_TYPE = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT_TYPE;
5473 alias DOM_NODE_TYPE_DOCUMENT_FRAGMENT = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT_FRAGMENT;
5474 
5475 ///
5476 /// DOM form control types. Should be kept in sync with Chromium's
5477 /// blink::mojom::FormControlType type.
5478 ///
5479 enum cef_dom_form_control_type_t
5480 {
5481     DOM_FORM_CONTROL_TYPE_UNSUPPORTED = 0,
5482     DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON = 1,
5483     DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT = 2,
5484     DOM_FORM_CONTROL_TYPE_BUTTON_RESET = 3,
5485     DOM_FORM_CONTROL_TYPE_BUTTON_SELECT_LIST = 4,
5486     DOM_FORM_CONTROL_TYPE_FIELDSET = 5,
5487     DOM_FORM_CONTROL_TYPE_INPUT_BUTTON = 6,
5488     DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX = 7,
5489     DOM_FORM_CONTROL_TYPE_INPUT_COLOR = 8,
5490     DOM_FORM_CONTROL_TYPE_INPUT_DATE = 9,
5491     DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL = 10,
5492     DOM_FORM_CONTROL_TYPE_INPUT_EMAIL = 11,
5493     DOM_FORM_CONTROL_TYPE_INPUT_FILE = 12,
5494     DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN = 13,
5495     DOM_FORM_CONTROL_TYPE_INPUT_IMAGE = 14,
5496     DOM_FORM_CONTROL_TYPE_INPUT_MONTH = 15,
5497     DOM_FORM_CONTROL_TYPE_INPUT_NUMBER = 16,
5498     DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD = 17,
5499     DOM_FORM_CONTROL_TYPE_INPUT_RADIO = 18,
5500     DOM_FORM_CONTROL_TYPE_INPUT_RANGE = 19,
5501     DOM_FORM_CONTROL_TYPE_INPUT_RESET = 20,
5502     DOM_FORM_CONTROL_TYPE_INPUT_SEARCH = 21,
5503     DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT = 22,
5504     DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE = 23,
5505     DOM_FORM_CONTROL_TYPE_INPUT_TEXT = 24,
5506     DOM_FORM_CONTROL_TYPE_INPUT_TIME = 25,
5507     DOM_FORM_CONTROL_TYPE_INPUT_URL = 26,
5508     DOM_FORM_CONTROL_TYPE_INPUT_WEEK = 27,
5509     DOM_FORM_CONTROL_TYPE_OUTPUT = 28,
5510     DOM_FORM_CONTROL_TYPE_SELECT_ONE = 29,
5511     DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE = 30,
5512     DOM_FORM_CONTROL_TYPE_SELECT_LIST = 31,
5513     DOM_FORM_CONTROL_TYPE_TEXT_AREA = 32
5514 }
5515 
5516 alias DOM_FORM_CONTROL_TYPE_UNSUPPORTED = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_UNSUPPORTED;
5517 alias DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON;
5518 alias DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT;
5519 alias DOM_FORM_CONTROL_TYPE_BUTTON_RESET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_RESET;
5520 alias DOM_FORM_CONTROL_TYPE_BUTTON_SELECT_LIST = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_SELECT_LIST;
5521 alias DOM_FORM_CONTROL_TYPE_FIELDSET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_FIELDSET;
5522 alias DOM_FORM_CONTROL_TYPE_INPUT_BUTTON = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_BUTTON;
5523 alias DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX;
5524 alias DOM_FORM_CONTROL_TYPE_INPUT_COLOR = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_COLOR;
5525 alias DOM_FORM_CONTROL_TYPE_INPUT_DATE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_DATE;
5526 alias DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL;
5527 alias DOM_FORM_CONTROL_TYPE_INPUT_EMAIL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_EMAIL;
5528 alias DOM_FORM_CONTROL_TYPE_INPUT_FILE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_FILE;
5529 alias DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN;
5530 alias DOM_FORM_CONTROL_TYPE_INPUT_IMAGE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_IMAGE;
5531 alias DOM_FORM_CONTROL_TYPE_INPUT_MONTH = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_MONTH;
5532 alias DOM_FORM_CONTROL_TYPE_INPUT_NUMBER = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_NUMBER;
5533 alias DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD;
5534 alias DOM_FORM_CONTROL_TYPE_INPUT_RADIO = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RADIO;
5535 alias DOM_FORM_CONTROL_TYPE_INPUT_RANGE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RANGE;
5536 alias DOM_FORM_CONTROL_TYPE_INPUT_RESET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RESET;
5537 alias DOM_FORM_CONTROL_TYPE_INPUT_SEARCH = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_SEARCH;
5538 alias DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT;
5539 alias DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE;
5540 alias DOM_FORM_CONTROL_TYPE_INPUT_TEXT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TEXT;
5541 alias DOM_FORM_CONTROL_TYPE_INPUT_TIME = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TIME;
5542 alias DOM_FORM_CONTROL_TYPE_INPUT_URL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_URL;
5543 alias DOM_FORM_CONTROL_TYPE_INPUT_WEEK = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_WEEK;
5544 alias DOM_FORM_CONTROL_TYPE_OUTPUT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_OUTPUT;
5545 alias DOM_FORM_CONTROL_TYPE_SELECT_ONE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_SELECT_ONE;
5546 alias DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE;
5547 alias DOM_FORM_CONTROL_TYPE_SELECT_LIST = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_SELECT_LIST;
5548 alias DOM_FORM_CONTROL_TYPE_TEXT_AREA = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_TEXT_AREA;
5549 
5550 ///
5551 /// Supported file dialog modes.
5552 ///
5553 enum cef_file_dialog_mode_t
5554 {
5555     ///
5556     /// Requires that the file exists before allowing the user to pick it.
5557     ///
5558     FILE_DIALOG_OPEN = 0,
5559 
5560     ///
5561     /// Like Open, but allows picking multiple files to open.
5562     ///
5563     FILE_DIALOG_OPEN_MULTIPLE = 1,
5564 
5565     ///
5566     /// Like Open, but selects a folder to open.
5567     ///
5568     FILE_DIALOG_OPEN_FOLDER = 2,
5569 
5570     ///
5571     /// Allows picking a nonexistent file, and prompts to overwrite if the file
5572     /// already exists.
5573     ///
5574     FILE_DIALOG_SAVE = 3
5575 }
5576 
5577 alias FILE_DIALOG_OPEN = cef_file_dialog_mode_t.FILE_DIALOG_OPEN;
5578 alias FILE_DIALOG_OPEN_MULTIPLE = cef_file_dialog_mode_t.FILE_DIALOG_OPEN_MULTIPLE;
5579 alias FILE_DIALOG_OPEN_FOLDER = cef_file_dialog_mode_t.FILE_DIALOG_OPEN_FOLDER;
5580 alias FILE_DIALOG_SAVE = cef_file_dialog_mode_t.FILE_DIALOG_SAVE;
5581 
5582 ///
5583 /// Print job color mode values.
5584 ///
5585 enum cef_color_model_t
5586 {
5587     COLOR_MODEL_UNKNOWN = 0,
5588     COLOR_MODEL_GRAY = 1,
5589     COLOR_MODEL_COLOR = 2,
5590     COLOR_MODEL_CMYK = 3,
5591     COLOR_MODEL_CMY = 4,
5592     COLOR_MODEL_KCMY = 5,
5593     COLOR_MODEL_CMY_K = 6, // CMY_K represents CMY+K.
5594     COLOR_MODEL_BLACK = 7,
5595     COLOR_MODEL_GRAYSCALE = 8,
5596     COLOR_MODEL_RGB = 9,
5597     COLOR_MODEL_RGB16 = 10,
5598     COLOR_MODEL_RGBA = 11,
5599     COLOR_MODEL_COLORMODE_COLOR = 12, // Used in samsung printer ppds.
5600     COLOR_MODEL_COLORMODE_MONOCHROME = 13, // Used in samsung printer ppds.
5601     COLOR_MODEL_HP_COLOR_COLOR = 14, // Used in HP color printer ppds.
5602     COLOR_MODEL_HP_COLOR_BLACK = 15, // Used in HP color printer ppds.
5603     COLOR_MODEL_PRINTOUTMODE_NORMAL = 16, // Used in foomatic ppds.
5604     COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY = 17, // Used in foomatic ppds.
5605     COLOR_MODEL_PROCESSCOLORMODEL_CMYK = 18, // Used in canon printer ppds.
5606     COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE = 19, // Used in canon printer ppds.
5607     COLOR_MODEL_PROCESSCOLORMODEL_RGB = 20 // Used in canon printer ppds
5608 }
5609 
5610 alias COLOR_MODEL_UNKNOWN = cef_color_model_t.COLOR_MODEL_UNKNOWN;
5611 alias COLOR_MODEL_GRAY = cef_color_model_t.COLOR_MODEL_GRAY;
5612 alias COLOR_MODEL_COLOR = cef_color_model_t.COLOR_MODEL_COLOR;
5613 alias COLOR_MODEL_CMYK = cef_color_model_t.COLOR_MODEL_CMYK;
5614 alias COLOR_MODEL_CMY = cef_color_model_t.COLOR_MODEL_CMY;
5615 alias COLOR_MODEL_KCMY = cef_color_model_t.COLOR_MODEL_KCMY;
5616 alias COLOR_MODEL_CMY_K = cef_color_model_t.COLOR_MODEL_CMY_K;
5617 alias COLOR_MODEL_BLACK = cef_color_model_t.COLOR_MODEL_BLACK;
5618 alias COLOR_MODEL_GRAYSCALE = cef_color_model_t.COLOR_MODEL_GRAYSCALE;
5619 alias COLOR_MODEL_RGB = cef_color_model_t.COLOR_MODEL_RGB;
5620 alias COLOR_MODEL_RGB16 = cef_color_model_t.COLOR_MODEL_RGB16;
5621 alias COLOR_MODEL_RGBA = cef_color_model_t.COLOR_MODEL_RGBA;
5622 alias COLOR_MODEL_COLORMODE_COLOR = cef_color_model_t.COLOR_MODEL_COLORMODE_COLOR;
5623 alias COLOR_MODEL_COLORMODE_MONOCHROME = cef_color_model_t.COLOR_MODEL_COLORMODE_MONOCHROME;
5624 alias COLOR_MODEL_HP_COLOR_COLOR = cef_color_model_t.COLOR_MODEL_HP_COLOR_COLOR;
5625 alias COLOR_MODEL_HP_COLOR_BLACK = cef_color_model_t.COLOR_MODEL_HP_COLOR_BLACK;
5626 alias COLOR_MODEL_PRINTOUTMODE_NORMAL = cef_color_model_t.COLOR_MODEL_PRINTOUTMODE_NORMAL;
5627 alias COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY = cef_color_model_t.COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY;
5628 alias COLOR_MODEL_PROCESSCOLORMODEL_CMYK = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_CMYK;
5629 alias COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE;
5630 alias COLOR_MODEL_PROCESSCOLORMODEL_RGB = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_RGB;
5631 
5632 ///
5633 /// Print job duplex mode values.
5634 ///
5635 enum cef_duplex_mode_t
5636 {
5637     DUPLEX_MODE_UNKNOWN = -1,
5638     DUPLEX_MODE_SIMPLEX = 0,
5639     DUPLEX_MODE_LONG_EDGE = 1,
5640     DUPLEX_MODE_SHORT_EDGE = 2
5641 }
5642 
5643 alias DUPLEX_MODE_UNKNOWN = cef_duplex_mode_t.DUPLEX_MODE_UNKNOWN;
5644 alias DUPLEX_MODE_SIMPLEX = cef_duplex_mode_t.DUPLEX_MODE_SIMPLEX;
5645 alias DUPLEX_MODE_LONG_EDGE = cef_duplex_mode_t.DUPLEX_MODE_LONG_EDGE;
5646 alias DUPLEX_MODE_SHORT_EDGE = cef_duplex_mode_t.DUPLEX_MODE_SHORT_EDGE;
5647 
5648 ///
5649 /// Cursor type values.
5650 ///
5651 enum cef_cursor_type_t
5652 {
5653     CT_POINTER = 0,
5654     CT_CROSS = 1,
5655     CT_HAND = 2,
5656     CT_IBEAM = 3,
5657     CT_WAIT = 4,
5658     CT_HELP = 5,
5659     CT_EASTRESIZE = 6,
5660     CT_NORTHRESIZE = 7,
5661     CT_NORTHEASTRESIZE = 8,
5662     CT_NORTHWESTRESIZE = 9,
5663     CT_SOUTHRESIZE = 10,
5664     CT_SOUTHEASTRESIZE = 11,
5665     CT_SOUTHWESTRESIZE = 12,
5666     CT_WESTRESIZE = 13,
5667     CT_NORTHSOUTHRESIZE = 14,
5668     CT_EASTWESTRESIZE = 15,
5669     CT_NORTHEASTSOUTHWESTRESIZE = 16,
5670     CT_NORTHWESTSOUTHEASTRESIZE = 17,
5671     CT_COLUMNRESIZE = 18,
5672     CT_ROWRESIZE = 19,
5673     CT_MIDDLEPANNING = 20,
5674     CT_EASTPANNING = 21,
5675     CT_NORTHPANNING = 22,
5676     CT_NORTHEASTPANNING = 23,
5677     CT_NORTHWESTPANNING = 24,
5678     CT_SOUTHPANNING = 25,
5679     CT_SOUTHEASTPANNING = 26,
5680     CT_SOUTHWESTPANNING = 27,
5681     CT_WESTPANNING = 28,
5682     CT_MOVE = 29,
5683     CT_VERTICALTEXT = 30,
5684     CT_CELL = 31,
5685     CT_CONTEXTMENU = 32,
5686     CT_ALIAS = 33,
5687     CT_PROGRESS = 34,
5688     CT_NODROP = 35,
5689     CT_COPY = 36,
5690     CT_NONE = 37,
5691     CT_NOTALLOWED = 38,
5692     CT_ZOOMIN = 39,
5693     CT_ZOOMOUT = 40,
5694     CT_GRAB = 41,
5695     CT_GRABBING = 42,
5696     CT_MIDDLE_PANNING_VERTICAL = 43,
5697     CT_MIDDLE_PANNING_HORIZONTAL = 44,
5698     CT_CUSTOM = 45,
5699     CT_DND_NONE = 46,
5700     CT_DND_MOVE = 47,
5701     CT_DND_COPY = 48,
5702     CT_DND_LINK = 49
5703 }
5704 
5705 alias CT_POINTER = cef_cursor_type_t.CT_POINTER;
5706 alias CT_CROSS = cef_cursor_type_t.CT_CROSS;
5707 alias CT_HAND = cef_cursor_type_t.CT_HAND;
5708 alias CT_IBEAM = cef_cursor_type_t.CT_IBEAM;
5709 alias CT_WAIT = cef_cursor_type_t.CT_WAIT;
5710 alias CT_HELP = cef_cursor_type_t.CT_HELP;
5711 alias CT_EASTRESIZE = cef_cursor_type_t.CT_EASTRESIZE;
5712 alias CT_NORTHRESIZE = cef_cursor_type_t.CT_NORTHRESIZE;
5713 alias CT_NORTHEASTRESIZE = cef_cursor_type_t.CT_NORTHEASTRESIZE;
5714 alias CT_NORTHWESTRESIZE = cef_cursor_type_t.CT_NORTHWESTRESIZE;
5715 alias CT_SOUTHRESIZE = cef_cursor_type_t.CT_SOUTHRESIZE;
5716 alias CT_SOUTHEASTRESIZE = cef_cursor_type_t.CT_SOUTHEASTRESIZE;
5717 alias CT_SOUTHWESTRESIZE = cef_cursor_type_t.CT_SOUTHWESTRESIZE;
5718 alias CT_WESTRESIZE = cef_cursor_type_t.CT_WESTRESIZE;
5719 alias CT_NORTHSOUTHRESIZE = cef_cursor_type_t.CT_NORTHSOUTHRESIZE;
5720 alias CT_EASTWESTRESIZE = cef_cursor_type_t.CT_EASTWESTRESIZE;
5721 alias CT_NORTHEASTSOUTHWESTRESIZE = cef_cursor_type_t.CT_NORTHEASTSOUTHWESTRESIZE;
5722 alias CT_NORTHWESTSOUTHEASTRESIZE = cef_cursor_type_t.CT_NORTHWESTSOUTHEASTRESIZE;
5723 alias CT_COLUMNRESIZE = cef_cursor_type_t.CT_COLUMNRESIZE;
5724 alias CT_ROWRESIZE = cef_cursor_type_t.CT_ROWRESIZE;
5725 alias CT_MIDDLEPANNING = cef_cursor_type_t.CT_MIDDLEPANNING;
5726 alias CT_EASTPANNING = cef_cursor_type_t.CT_EASTPANNING;
5727 alias CT_NORTHPANNING = cef_cursor_type_t.CT_NORTHPANNING;
5728 alias CT_NORTHEASTPANNING = cef_cursor_type_t.CT_NORTHEASTPANNING;
5729 alias CT_NORTHWESTPANNING = cef_cursor_type_t.CT_NORTHWESTPANNING;
5730 alias CT_SOUTHPANNING = cef_cursor_type_t.CT_SOUTHPANNING;
5731 alias CT_SOUTHEASTPANNING = cef_cursor_type_t.CT_SOUTHEASTPANNING;
5732 alias CT_SOUTHWESTPANNING = cef_cursor_type_t.CT_SOUTHWESTPANNING;
5733 alias CT_WESTPANNING = cef_cursor_type_t.CT_WESTPANNING;
5734 alias CT_MOVE = cef_cursor_type_t.CT_MOVE;
5735 alias CT_VERTICALTEXT = cef_cursor_type_t.CT_VERTICALTEXT;
5736 alias CT_CELL = cef_cursor_type_t.CT_CELL;
5737 alias CT_CONTEXTMENU = cef_cursor_type_t.CT_CONTEXTMENU;
5738 alias CT_ALIAS = cef_cursor_type_t.CT_ALIAS;
5739 alias CT_PROGRESS = cef_cursor_type_t.CT_PROGRESS;
5740 alias CT_NODROP = cef_cursor_type_t.CT_NODROP;
5741 alias CT_COPY = cef_cursor_type_t.CT_COPY;
5742 alias CT_NONE = cef_cursor_type_t.CT_NONE;
5743 alias CT_NOTALLOWED = cef_cursor_type_t.CT_NOTALLOWED;
5744 alias CT_ZOOMIN = cef_cursor_type_t.CT_ZOOMIN;
5745 alias CT_ZOOMOUT = cef_cursor_type_t.CT_ZOOMOUT;
5746 alias CT_GRAB = cef_cursor_type_t.CT_GRAB;
5747 alias CT_GRABBING = cef_cursor_type_t.CT_GRABBING;
5748 alias CT_MIDDLE_PANNING_VERTICAL = cef_cursor_type_t.CT_MIDDLE_PANNING_VERTICAL;
5749 alias CT_MIDDLE_PANNING_HORIZONTAL = cef_cursor_type_t.CT_MIDDLE_PANNING_HORIZONTAL;
5750 alias CT_CUSTOM = cef_cursor_type_t.CT_CUSTOM;
5751 alias CT_DND_NONE = cef_cursor_type_t.CT_DND_NONE;
5752 alias CT_DND_MOVE = cef_cursor_type_t.CT_DND_MOVE;
5753 alias CT_DND_COPY = cef_cursor_type_t.CT_DND_COPY;
5754 alias CT_DND_LINK = cef_cursor_type_t.CT_DND_LINK;
5755 
5756 ///
5757 /// Structure representing cursor information. |buffer| will be
5758 /// |size.width|*|size.height|*4 bytes in size and represents a BGRA image with
5759 /// an upper-left origin.
5760 ///
5761 struct cef_cursor_info_t
5762 {
5763     cef_point_t hotspot;
5764     float image_scale_factor;
5765     void* buffer;
5766 
5767     cef_size_t size;
5768 }
5769 
5770 
5771 
5772 ///
5773 /// URI unescape rules passed to CefURIDecode().
5774 ///
5775 enum cef_uri_unescape_rule_t
5776 {
5777     ///
5778     /// Don't unescape anything at all.
5779     ///
5780     UU_NONE = 0,
5781 
5782     ///
5783     /// Don't unescape anything special, but all normal unescaping will happen.
5784     /// This is a placeholder and can't be combined with other flags (since it's
5785     /// just the absence of them). All other unescape rules imply "normal" in
5786     /// addition to their special meaning. Things like escaped letters, digits,
5787     /// and most symbols will get unescaped with this mode.
5788     ///
5789     UU_NORMAL = 1 << 0,
5790 
5791     ///
5792     /// Convert %20 to spaces. In some places where we're showing URLs, we may
5793     /// want this. In places where the URL may be copied and pasted out, then
5794     /// you wouldn't want this since it might not be interpreted in one piece
5795     /// by other applications.
5796     ///
5797     UU_SPACES = 1 << 1,
5798 
5799     ///
5800     /// Unescapes '/' and '\\'. If these characters were unescaped, the resulting
5801     /// URL won't be the same as the source one. Moreover, they are dangerous to
5802     /// unescape in strings that will be used as file paths or names. This value
5803     /// should only be used when slashes don't have special meaning, like data
5804     /// URLs.
5805     ///
5806     UU_PATH_SEPARATORS = 1 << 2,
5807 
5808     ///
5809     /// Unescapes various characters that will change the meaning of URLs,
5810     /// including '%', '+', '&', '#'. Does not unescape path separators.
5811     /// If these characters were unescaped, the resulting URL won't be the same
5812     /// as the source one. This flag is used when generating final output like
5813     /// filenames for URLs where we won't be interpreting as a URL and want to do
5814     /// as much unescaping as possible.
5815     ///
5816     UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 << 3,
5817 
5818     ///
5819     /// URL queries use "+" for space. This flag controls that replacement.
5820     ///
5821     UU_REPLACE_PLUS_WITH_SPACE = 1 << 4
5822 }
5823 
5824 alias UU_NONE = cef_uri_unescape_rule_t.UU_NONE;
5825 alias UU_NORMAL = cef_uri_unescape_rule_t.UU_NORMAL;
5826 alias UU_SPACES = cef_uri_unescape_rule_t.UU_SPACES;
5827 alias UU_PATH_SEPARATORS = cef_uri_unescape_rule_t.UU_PATH_SEPARATORS;
5828 alias UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = cef_uri_unescape_rule_t.UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS;
5829 alias UU_REPLACE_PLUS_WITH_SPACE = cef_uri_unescape_rule_t.UU_REPLACE_PLUS_WITH_SPACE;
5830 
5831 ///
5832 /// Options that can be passed to CefParseJSON.
5833 ///
5834 enum cef_json_parser_options_t
5835 {
5836     ///
5837     /// Parses the input strictly according to RFC 4627. See comments in
5838     /// Chromium's base/json/json_reader.h file for known limitations/
5839     /// deviations from the RFC.
5840     ///
5841     JSON_PARSER_RFC = 0,
5842 
5843     ///
5844     /// Allows commas to exist after the last element in structures.
5845     ///
5846     JSON_PARSER_ALLOW_TRAILING_COMMAS = 1 << 0
5847 }
5848 
5849 alias JSON_PARSER_RFC = cef_json_parser_options_t.JSON_PARSER_RFC;
5850 alias JSON_PARSER_ALLOW_TRAILING_COMMAS = cef_json_parser_options_t.JSON_PARSER_ALLOW_TRAILING_COMMAS;
5851 
5852 ///
5853 /// Options that can be passed to CefWriteJSON.
5854 ///
5855 enum cef_json_writer_options_t
5856 {
5857     ///
5858     /// Default behavior.
5859     ///
5860     JSON_WRITER_DEFAULT = 0,
5861 
5862     ///
5863     /// This option instructs the writer that if a Binary value is encountered,
5864     /// the value (and key if within a dictionary) will be omitted from the
5865     /// output, and success will be returned. Otherwise, if a binary value is
5866     /// encountered, failure will be returned.
5867     ///
5868     JSON_WRITER_OMIT_BINARY_VALUES = 1 << 0,
5869 
5870     ///
5871     /// This option instructs the writer to write doubles that have no fractional
5872     /// part as a normal integer (i.e., without using exponential notation
5873     /// or appending a '.0') as long as the value is within the range of a
5874     /// 64-bit int.
5875     ///
5876     JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = 1 << 1,
5877 
5878     ///
5879     /// Return a slightly nicer formatted json string (pads with whitespace to
5880     /// help with readability).
5881     ///
5882     JSON_WRITER_PRETTY_PRINT = 1 << 2
5883 }
5884 
5885 alias JSON_WRITER_DEFAULT = cef_json_writer_options_t.JSON_WRITER_DEFAULT;
5886 alias JSON_WRITER_OMIT_BINARY_VALUES = cef_json_writer_options_t.JSON_WRITER_OMIT_BINARY_VALUES;
5887 alias JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = cef_json_writer_options_t.JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION;
5888 alias JSON_WRITER_PRETTY_PRINT = cef_json_writer_options_t.JSON_WRITER_PRETTY_PRINT;
5889 
5890 ///
5891 /// Margin type for PDF printing.
5892 ///
5893 enum cef_pdf_print_margin_type_t
5894 {
5895     ///
5896     /// Default margins of 1cm (~0.4 inches).
5897     ///
5898     PDF_PRINT_MARGIN_DEFAULT = 0,
5899 
5900     ///
5901     /// No margins.
5902     ///
5903     PDF_PRINT_MARGIN_NONE = 1,
5904 
5905     ///
5906     /// Custom margins using the |margin_*| values from cef_pdf_print_settings_t.
5907     ///
5908     PDF_PRINT_MARGIN_CUSTOM = 2
5909 }
5910 
5911 alias PDF_PRINT_MARGIN_DEFAULT = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_DEFAULT;
5912 alias PDF_PRINT_MARGIN_NONE = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_NONE;
5913 alias PDF_PRINT_MARGIN_CUSTOM = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_CUSTOM;
5914 
5915 ///
5916 /// Structure representing PDF print settings. These values match the parameters
5917 /// supported by the DevTools Page.printToPDF function. See
5918 /// https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
5919 ///
5920 struct cef_pdf_print_settings_t
5921 {
5922     ///
5923     /// Set to true (1) for landscape mode or false (0) for portrait mode.
5924     ///
5925     int landscape;
5926 
5927     ///
5928     /// Set to true (1) to print background graphics.
5929     ///
5930     int print_background;
5931 
5932     ///
5933     /// The percentage to scale the PDF by before printing (e.g. .5 is 50%).
5934     /// If this value is less than or equal to zero the default value of 1.0
5935     /// will be used.
5936     ///
5937     double scale;
5938 
5939     ///
5940     /// Output paper size in inches. If either of these values is less than or
5941     /// equal to zero then the default paper size (letter, 8.5 x 11 inches) will
5942     /// be used.
5943     ///
5944     double paper_width;
5945     double paper_height;
5946 
5947     ///
5948     /// Set to true (1) to prefer page size as defined by css. Defaults to false
5949     /// (0), in which case the content will be scaled to fit the paper size.
5950     ///
5951     int prefer_css_page_size;
5952 
5953     ///
5954     /// Margin type.
5955     ///
5956     cef_pdf_print_margin_type_t margin_type;
5957 
5958     ///
5959     /// Margins in inches. Only used if |margin_type| is set to
5960     /// PDF_PRINT_MARGIN_CUSTOM.
5961     ///
5962     double margin_top;
5963     double margin_right;
5964     double margin_bottom;
5965     double margin_left;
5966 
5967     ///
5968     /// Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed
5969     /// in the document order, not in the order specified, and no more than once.
5970     /// Defaults to empty string, which implies the entire document is printed.
5971     /// The page numbers are quietly capped to actual page count of the document,
5972     /// and ranges beyond the end of the document are ignored. If this results in
5973     /// no pages to print, an error is reported. It is an error to specify a range
5974     /// with start greater than end.
5975     ///
5976     cef_string_t page_ranges;
5977 
5978     ///
5979     /// Set to true (1) to display the header and/or footer. Modify
5980     /// |header_template| and/or |footer_template| to customize the display.
5981     ///
5982     int display_header_footer;
5983 
5984     ///
5985     /// HTML template for the print header. Only displayed if
5986     /// |display_header_footer| is true (1). Should be valid HTML markup with
5987     /// the following classes used to inject printing values into them:
5988     ///
5989     /// - date: formatted print date
5990     /// - title: document title
5991     /// - url: document location
5992     /// - pageNumber: current page number
5993     /// - totalPages: total pages in the document
5994     ///
5995     /// For example, "<span class=title></span>" would generate a span containing
5996     /// the title.
5997     ///
5998     cef_string_t header_template;
5999 
6000     ///
6001     /// HTML template for the print footer. Only displayed if
6002     /// |display_header_footer| is true (1). Uses the same format as
6003     /// |header_template|.
6004     ///
6005     cef_string_t footer_template;
6006 
6007     ///
6008     /// Set to true (1) to generate tagged (accessible) PDF.
6009     ///
6010     int generate_tagged_pdf;
6011 }
6012 
6013 
6014 
6015 ///
6016 /// Supported UI scale factors for the platform. SCALE_FACTOR_NONE is used for
6017 /// density independent resources such as string, html/js files or an image that
6018 /// can be used for any scale factors (such as wallpapers).
6019 ///
6020 enum cef_scale_factor_t
6021 {
6022     SCALE_FACTOR_NONE = 0,
6023     SCALE_FACTOR_100P = 1,
6024     SCALE_FACTOR_125P = 2,
6025     SCALE_FACTOR_133P = 3,
6026     SCALE_FACTOR_140P = 4,
6027     SCALE_FACTOR_150P = 5,
6028     SCALE_FACTOR_180P = 6,
6029     SCALE_FACTOR_200P = 7,
6030     SCALE_FACTOR_250P = 8,
6031     SCALE_FACTOR_300P = 9
6032 }
6033 
6034 alias SCALE_FACTOR_NONE = cef_scale_factor_t.SCALE_FACTOR_NONE;
6035 alias SCALE_FACTOR_100P = cef_scale_factor_t.SCALE_FACTOR_100P;
6036 alias SCALE_FACTOR_125P = cef_scale_factor_t.SCALE_FACTOR_125P;
6037 alias SCALE_FACTOR_133P = cef_scale_factor_t.SCALE_FACTOR_133P;
6038 alias SCALE_FACTOR_140P = cef_scale_factor_t.SCALE_FACTOR_140P;
6039 alias SCALE_FACTOR_150P = cef_scale_factor_t.SCALE_FACTOR_150P;
6040 alias SCALE_FACTOR_180P = cef_scale_factor_t.SCALE_FACTOR_180P;
6041 alias SCALE_FACTOR_200P = cef_scale_factor_t.SCALE_FACTOR_200P;
6042 alias SCALE_FACTOR_250P = cef_scale_factor_t.SCALE_FACTOR_250P;
6043 alias SCALE_FACTOR_300P = cef_scale_factor_t.SCALE_FACTOR_300P;
6044 
6045 ///
6046 /// Policy for how the Referrer HTTP header value will be sent during
6047 /// navigation. If the `--no-referrers` command-line flag is specified then the
6048 /// policy value will be ignored and the Referrer value will never be sent. Must
6049 /// be kept synchronized with net::URLRequest::ReferrerPolicy from Chromium.
6050 ///
6051 enum cef_referrer_policy_t
6052 {
6053     ///
6054     /// Clear the referrer header if the header value is HTTPS but the request
6055     /// destination is HTTP. This is the default behavior.
6056     ///
6057     REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 0,
6058     REFERRER_POLICY_DEFAULT = REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
6059 
6060     ///
6061     /// A slight variant on CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE:
6062     /// If the request destination is HTTP, an HTTPS referrer will be cleared. If
6063     /// the request's destination is cross-origin with the referrer (but does not
6064     /// downgrade), the referrer's granularity will be stripped down to an origin
6065     /// rather than a full URL. Same-origin requests will send the full referrer.
6066     ///
6067     REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = 1,
6068 
6069     ///
6070     /// Strip the referrer down to an origin when the origin of the referrer is
6071     /// different from the destination's origin.
6072     ///
6073     REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = 2,
6074 
6075     ///
6076     /// Never change the referrer.
6077     ///
6078     REFERRER_POLICY_NEVER_CLEAR_REFERRER = 3,
6079 
6080     ///
6081     /// Strip the referrer down to the origin regardless of the redirect location.
6082     ///
6083     REFERRER_POLICY_ORIGIN = 4,
6084 
6085     ///
6086     /// Clear the referrer when the request's referrer is cross-origin with the
6087     /// request's destination.
6088     ///
6089     REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = 5,
6090 
6091     ///
6092     /// Strip the referrer down to the origin, but clear it entirely if the
6093     /// referrer value is HTTPS and the destination is HTTP.
6094     ///
6095     REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 6,
6096 
6097     ///
6098     /// Always clear the referrer regardless of the request destination.
6099     ///
6100     REFERRER_POLICY_NO_REFERRER = 7,
6101 
6102     /// Always the last value in this enumeration.
6103     REFERRER_POLICY_LAST_VALUE = REFERRER_POLICY_NO_REFERRER
6104 }
6105 
6106 alias REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE = cef_referrer_policy_t.REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE;
6107 alias REFERRER_POLICY_DEFAULT = cef_referrer_policy_t.REFERRER_POLICY_DEFAULT;
6108 alias REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN;
6109 alias REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN;
6110 alias REFERRER_POLICY_NEVER_CLEAR_REFERRER = cef_referrer_policy_t.REFERRER_POLICY_NEVER_CLEAR_REFERRER;
6111 alias REFERRER_POLICY_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_ORIGIN;
6112 alias REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN;
6113 alias REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE = cef_referrer_policy_t.REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE;
6114 alias REFERRER_POLICY_NO_REFERRER = cef_referrer_policy_t.REFERRER_POLICY_NO_REFERRER;
6115 alias REFERRER_POLICY_LAST_VALUE = cef_referrer_policy_t.REFERRER_POLICY_LAST_VALUE;
6116 
6117 ///
6118 /// Return values for CefResponseFilter::Filter().
6119 ///
6120 enum cef_response_filter_status_t
6121 {
6122     ///
6123     /// Some or all of the pre-filter data was read successfully but more data is
6124     /// needed in order to continue filtering (filtered output is pending).
6125     ///
6126     RESPONSE_FILTER_NEED_MORE_DATA = 0,
6127 
6128     ///
6129     /// Some or all of the pre-filter data was read successfully and all available
6130     /// filtered output has been written.
6131     ///
6132     RESPONSE_FILTER_DONE = 1,
6133 
6134     ///
6135     /// An error occurred during filtering.
6136     ///
6137     RESPONSE_FILTER_ERROR = 2
6138 }
6139 
6140 alias RESPONSE_FILTER_NEED_MORE_DATA = cef_response_filter_status_t.RESPONSE_FILTER_NEED_MORE_DATA;
6141 alias RESPONSE_FILTER_DONE = cef_response_filter_status_t.RESPONSE_FILTER_DONE;
6142 alias RESPONSE_FILTER_ERROR = cef_response_filter_status_t.RESPONSE_FILTER_ERROR;
6143 
6144 ///
6145 /// Describes how to interpret the components of a pixel.
6146 ///
6147 enum cef_color_type_t
6148 {
6149     ///
6150     /// RGBA with 8 bits per pixel (32bits total).
6151     ///
6152     CEF_COLOR_TYPE_RGBA_8888 = 0,
6153 
6154     ///
6155     /// BGRA with 8 bits per pixel (32bits total).
6156     ///
6157     CEF_COLOR_TYPE_BGRA_8888 = 1
6158 }
6159 
6160 alias CEF_COLOR_TYPE_RGBA_8888 = cef_color_type_t.CEF_COLOR_TYPE_RGBA_8888;
6161 alias CEF_COLOR_TYPE_BGRA_8888 = cef_color_type_t.CEF_COLOR_TYPE_BGRA_8888;
6162 
6163 ///
6164 /// Describes how to interpret the alpha component of a pixel.
6165 ///
6166 enum cef_alpha_type_t
6167 {
6168     ///
6169     /// No transparency. The alpha component is ignored.
6170     ///
6171     CEF_ALPHA_TYPE_OPAQUE = 0,
6172 
6173     ///
6174     /// Transparency with pre-multiplied alpha component.
6175     ///
6176     CEF_ALPHA_TYPE_PREMULTIPLIED = 1,
6177 
6178     ///
6179     /// Transparency with post-multiplied alpha component.
6180     ///
6181     CEF_ALPHA_TYPE_POSTMULTIPLIED = 2
6182 }
6183 
6184 alias CEF_ALPHA_TYPE_OPAQUE = cef_alpha_type_t.CEF_ALPHA_TYPE_OPAQUE;
6185 alias CEF_ALPHA_TYPE_PREMULTIPLIED = cef_alpha_type_t.CEF_ALPHA_TYPE_PREMULTIPLIED;
6186 alias CEF_ALPHA_TYPE_POSTMULTIPLIED = cef_alpha_type_t.CEF_ALPHA_TYPE_POSTMULTIPLIED;
6187 
6188 ///
6189 /// Text style types. Should be kepy in sync with gfx::TextStyle.
6190 ///
6191 enum cef_text_style_t
6192 {
6193     CEF_TEXT_STYLE_BOLD = 0,
6194     CEF_TEXT_STYLE_ITALIC = 1,
6195     CEF_TEXT_STYLE_STRIKE = 2,
6196     CEF_TEXT_STYLE_DIAGONAL_STRIKE = 3,
6197     CEF_TEXT_STYLE_UNDERLINE = 4
6198 }
6199 
6200 alias CEF_TEXT_STYLE_BOLD = cef_text_style_t.CEF_TEXT_STYLE_BOLD;
6201 alias CEF_TEXT_STYLE_ITALIC = cef_text_style_t.CEF_TEXT_STYLE_ITALIC;
6202 alias CEF_TEXT_STYLE_STRIKE = cef_text_style_t.CEF_TEXT_STYLE_STRIKE;
6203 alias CEF_TEXT_STYLE_DIAGONAL_STRIKE = cef_text_style_t.CEF_TEXT_STYLE_DIAGONAL_STRIKE;
6204 alias CEF_TEXT_STYLE_UNDERLINE = cef_text_style_t.CEF_TEXT_STYLE_UNDERLINE;
6205 
6206 ///
6207 /// Specifies where along the main axis the CefBoxLayout child views should be
6208 /// laid out.
6209 ///
6210 enum cef_main_axis_alignment_t
6211 {
6212     ///
6213     /// Child views will be left-aligned.
6214     ///
6215     CEF_MAIN_AXIS_ALIGNMENT_START = 0,
6216 
6217     ///
6218     /// Child views will be center-aligned.
6219     ///
6220     CEF_MAIN_AXIS_ALIGNMENT_CENTER = 1,
6221 
6222     ///
6223     /// Child views will be right-aligned.
6224     ///
6225     CEF_MAIN_AXIS_ALIGNMENT_END = 2
6226 }
6227 
6228 alias CEF_MAIN_AXIS_ALIGNMENT_START = cef_main_axis_alignment_t.CEF_MAIN_AXIS_ALIGNMENT_START;
6229 alias CEF_MAIN_AXIS_ALIGNMENT_CENTER = cef_main_axis_alignment_t.CEF_MAIN_AXIS_ALIGNMENT_CENTER;
6230 alias CEF_MAIN_AXIS_ALIGNMENT_END = cef_main_axis_alignment_t.CEF_MAIN_AXIS_ALIGNMENT_END;
6231 
6232 ///
6233 /// Specifies where along the cross axis the CefBoxLayout child views should be
6234 /// laid out.
6235 ///
6236 enum cef_cross_axis_alignment_t
6237 {
6238     ///
6239     /// Child views will be stretched to fit.
6240     ///
6241     CEF_CROSS_AXIS_ALIGNMENT_STRETCH = 0,
6242 
6243     ///
6244     /// Child views will be left-aligned.
6245     ///
6246     CEF_CROSS_AXIS_ALIGNMENT_START = 1,
6247 
6248     ///
6249     /// Child views will be center-aligned.
6250     ///
6251     CEF_CROSS_AXIS_ALIGNMENT_CENTER = 2,
6252 
6253     ///
6254     /// Child views will be right-aligned.
6255     ///
6256     CEF_CROSS_AXIS_ALIGNMENT_END = 3
6257 }
6258 
6259 alias CEF_CROSS_AXIS_ALIGNMENT_STRETCH = cef_cross_axis_alignment_t.CEF_CROSS_AXIS_ALIGNMENT_STRETCH;
6260 alias CEF_CROSS_AXIS_ALIGNMENT_START = cef_cross_axis_alignment_t.CEF_CROSS_AXIS_ALIGNMENT_START;
6261 alias CEF_CROSS_AXIS_ALIGNMENT_CENTER = cef_cross_axis_alignment_t.CEF_CROSS_AXIS_ALIGNMENT_CENTER;
6262 alias CEF_CROSS_AXIS_ALIGNMENT_END = cef_cross_axis_alignment_t.CEF_CROSS_AXIS_ALIGNMENT_END;
6263 
6264 ///
6265 /// Settings used when initializing a CefBoxLayout.
6266 ///
6267 struct cef_box_layout_settings_t
6268 {
6269     ///
6270     /// If true (1) the layout will be horizontal, otherwise the layout will be
6271     /// vertical.
6272     ///
6273     int horizontal;
6274 
6275     ///
6276     /// Adds additional horizontal space between the child view area and the host
6277     /// view border.
6278     ///
6279     int inside_border_horizontal_spacing;
6280 
6281     ///
6282     /// Adds additional vertical space between the child view area and the host
6283     /// view border.
6284     ///
6285     int inside_border_vertical_spacing;
6286 
6287     ///
6288     /// Adds additional space around the child view area.
6289     ///
6290     cef_insets_t inside_border_insets;
6291 
6292     ///
6293     /// Adds additional space between child views.
6294     ///
6295     int between_child_spacing;
6296 
6297     ///
6298     /// Specifies where along the main axis the child views should be laid out.
6299     ///
6300     cef_main_axis_alignment_t main_axis_alignment;
6301 
6302     ///
6303     /// Specifies where along the cross axis the child views should be laid out.
6304     ///
6305     cef_cross_axis_alignment_t cross_axis_alignment;
6306 
6307     ///
6308     /// Minimum cross axis size.
6309     ///
6310     int minimum_cross_axis_size;
6311 
6312     ///
6313     /// Default flex for views when none is specified via CefBoxLayout methods.
6314     /// Using the preferred size as the basis, free space along the main axis is
6315     /// distributed to views in the ratio of their flex weights. Similarly, if the
6316     /// views will overflow the parent, space is subtracted in these ratios. A
6317     /// flex of 0 means this view is not resized. Flex values must not be
6318     /// negative.
6319     ///
6320     int default_flex;
6321 }
6322 
6323 
6324 
6325 ///
6326 /// Specifies the button display state.
6327 ///
6328 enum cef_button_state_t
6329 {
6330     CEF_BUTTON_STATE_NORMAL = 0,
6331     CEF_BUTTON_STATE_HOVERED = 1,
6332     CEF_BUTTON_STATE_PRESSED = 2,
6333     CEF_BUTTON_STATE_DISABLED = 3
6334 }
6335 
6336 alias CEF_BUTTON_STATE_NORMAL = cef_button_state_t.CEF_BUTTON_STATE_NORMAL;
6337 alias CEF_BUTTON_STATE_HOVERED = cef_button_state_t.CEF_BUTTON_STATE_HOVERED;
6338 alias CEF_BUTTON_STATE_PRESSED = cef_button_state_t.CEF_BUTTON_STATE_PRESSED;
6339 alias CEF_BUTTON_STATE_DISABLED = cef_button_state_t.CEF_BUTTON_STATE_DISABLED;
6340 
6341 ///
6342 /// Specifies the horizontal text alignment mode.
6343 ///
6344 enum cef_horizontal_alignment_t
6345 {
6346     ///
6347     /// Align the text's left edge with that of its display area.
6348     ///
6349     CEF_HORIZONTAL_ALIGNMENT_LEFT = 0,
6350 
6351     ///
6352     /// Align the text's center with that of its display area.
6353     ///
6354     CEF_HORIZONTAL_ALIGNMENT_CENTER = 1,
6355 
6356     ///
6357     /// Align the text's right edge with that of its display area.
6358     ///
6359     CEF_HORIZONTAL_ALIGNMENT_RIGHT = 2
6360 }
6361 
6362 alias CEF_HORIZONTAL_ALIGNMENT_LEFT = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_LEFT;
6363 alias CEF_HORIZONTAL_ALIGNMENT_CENTER = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_CENTER;
6364 alias CEF_HORIZONTAL_ALIGNMENT_RIGHT = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_RIGHT;
6365 
6366 ///
6367 /// Specifies how a menu will be anchored for non-RTL languages. The opposite
6368 /// position will be used for RTL languages.
6369 ///
6370 enum cef_menu_anchor_position_t
6371 {
6372     CEF_MENU_ANCHOR_TOPLEFT = 0,
6373     CEF_MENU_ANCHOR_TOPRIGHT = 1,
6374     CEF_MENU_ANCHOR_BOTTOMCENTER = 2
6375 }
6376 
6377 alias CEF_MENU_ANCHOR_TOPLEFT = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_TOPLEFT;
6378 alias CEF_MENU_ANCHOR_TOPRIGHT = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_TOPRIGHT;
6379 alias CEF_MENU_ANCHOR_BOTTOMCENTER = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_BOTTOMCENTER;
6380 
6381 ///
6382 /// Supported color types for menu items.
6383 ///
6384 enum cef_menu_color_type_t
6385 {
6386     CEF_MENU_COLOR_TEXT = 0,
6387     CEF_MENU_COLOR_TEXT_HOVERED = 1,
6388     CEF_MENU_COLOR_TEXT_ACCELERATOR = 2,
6389     CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED = 3,
6390     CEF_MENU_COLOR_BACKGROUND = 4,
6391     CEF_MENU_COLOR_BACKGROUND_HOVERED = 5,
6392     CEF_MENU_COLOR_COUNT = 6
6393 }
6394 
6395 alias CEF_MENU_COLOR_TEXT = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT;
6396 alias CEF_MENU_COLOR_TEXT_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_HOVERED;
6397 alias CEF_MENU_COLOR_TEXT_ACCELERATOR = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_ACCELERATOR;
6398 alias CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED;
6399 alias CEF_MENU_COLOR_BACKGROUND = cef_menu_color_type_t.CEF_MENU_COLOR_BACKGROUND;
6400 alias CEF_MENU_COLOR_BACKGROUND_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_BACKGROUND_HOVERED;
6401 alias CEF_MENU_COLOR_COUNT = cef_menu_color_type_t.CEF_MENU_COLOR_COUNT;
6402 
6403 /// Supported SSL version values. See net/ssl/ssl_connection_status_flags.h
6404 /// for more information.
6405 enum cef_ssl_version_t
6406 {
6407     SSL_CONNECTION_VERSION_UNKNOWN = 0, // Unknown SSL version.
6408     SSL_CONNECTION_VERSION_SSL2 = 1,
6409     SSL_CONNECTION_VERSION_SSL3 = 2,
6410     SSL_CONNECTION_VERSION_TLS1 = 3,
6411     SSL_CONNECTION_VERSION_TLS1_1 = 4,
6412     SSL_CONNECTION_VERSION_TLS1_2 = 5,
6413     SSL_CONNECTION_VERSION_TLS1_3 = 6,
6414     SSL_CONNECTION_VERSION_QUIC = 7
6415 }
6416 
6417 alias SSL_CONNECTION_VERSION_UNKNOWN = cef_ssl_version_t.SSL_CONNECTION_VERSION_UNKNOWN;
6418 alias SSL_CONNECTION_VERSION_SSL2 = cef_ssl_version_t.SSL_CONNECTION_VERSION_SSL2;
6419 alias SSL_CONNECTION_VERSION_SSL3 = cef_ssl_version_t.SSL_CONNECTION_VERSION_SSL3;
6420 alias SSL_CONNECTION_VERSION_TLS1 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1;
6421 alias SSL_CONNECTION_VERSION_TLS1_1 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_1;
6422 alias SSL_CONNECTION_VERSION_TLS1_2 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_2;
6423 alias SSL_CONNECTION_VERSION_TLS1_3 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_3;
6424 alias SSL_CONNECTION_VERSION_QUIC = cef_ssl_version_t.SSL_CONNECTION_VERSION_QUIC;
6425 
6426 /// Supported SSL content status flags. See content/public/common/ssl_status.h
6427 /// for more information.
6428 enum cef_ssl_content_status_t
6429 {
6430     SSL_CONTENT_NORMAL_CONTENT = 0,
6431     SSL_CONTENT_DISPLAYED_INSECURE_CONTENT = 1 << 0,
6432     SSL_CONTENT_RAN_INSECURE_CONTENT = 1 << 1
6433 }
6434 
6435 alias SSL_CONTENT_NORMAL_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_NORMAL_CONTENT;
6436 alias SSL_CONTENT_DISPLAYED_INSECURE_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_DISPLAYED_INSECURE_CONTENT;
6437 alias SSL_CONTENT_RAN_INSECURE_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_RAN_INSECURE_CONTENT;
6438 
6439 //
6440 /// Configuration options for registering a custom scheme.
6441 /// These values are used when calling AddCustomScheme.
6442 //
6443 enum cef_scheme_options_t
6444 {
6445     CEF_SCHEME_OPTION_NONE = 0,
6446 
6447     ///
6448     /// If CEF_SCHEME_OPTION_STANDARD is set the scheme will be treated as a
6449     /// standard scheme. Standard schemes are subject to URL canonicalization and
6450     /// parsing rules as defined in the Common Internet Scheme Syntax RFC 1738
6451     /// Section 3.1 available at http://www.ietf.org/rfc/rfc1738.txt
6452     //
6453     /// In particular, the syntax for standard scheme URLs must be of the form:
6454     /// <pre>
6455     ///  [scheme]://[username]:[password]@[host]:[port]/[url-path]
6456     /// </pre> Standard scheme URLs must have a host component that is a fully
6457     /// qualified domain name as defined in Section 3.5 of RFC 1034 [13] and
6458     /// Section 2.1 of RFC 1123. These URLs will be canonicalized to
6459     /// "scheme://host/path" in the simplest case and
6460     /// "scheme://username:password@host:port/path" in the most explicit case. For
6461     /// example, "scheme:host/path" and "scheme:///host/path" will both be
6462     /// canonicalized to "scheme://host/path". The origin of a standard scheme URL
6463     /// is the combination of scheme, host and port (i.e., "scheme://host:port" in
6464     /// the most explicit case).
6465     //
6466     /// For non-standard scheme URLs only the "scheme:" component is parsed and
6467     /// canonicalized. The remainder of the URL will be passed to the handler as-
6468     /// is. For example, "scheme:///some%20text" will remain the same.
6469     /// Non-standard scheme URLs cannot be used as a target for form submission.
6470     ///
6471     CEF_SCHEME_OPTION_STANDARD = 1 << 0,
6472 
6473     ///
6474     /// If CEF_SCHEME_OPTION_LOCAL is set the scheme will be treated with the same
6475     /// security rules as those applied to "file" URLs. Normal pages cannot link
6476     /// to or access local URLs. Also, by default, local URLs can only perform
6477     /// XMLHttpRequest calls to the same URL (origin + path) that originated the
6478     /// request. To allow XMLHttpRequest calls from a local URL to other URLs with
6479     /// the same origin set the CefSettings.file_access_from_file_urls_allowed
6480     /// value to true (1). To allow XMLHttpRequest calls from a local URL to all
6481     /// origins set the CefSettings.universal_access_from_file_urls_allowed value
6482     /// to true (1).
6483     ///
6484     CEF_SCHEME_OPTION_LOCAL = 1 << 1,
6485 
6486     ///
6487     /// If CEF_SCHEME_OPTION_DISPLAY_ISOLATED is set the scheme can only be
6488     /// displayed from other content hosted with the same scheme. For example,
6489     /// pages in other origins cannot create iframes or hyperlinks to URLs with
6490     /// the scheme. For schemes that must be accessible from other schemes don't
6491     /// set this, set CEF_SCHEME_OPTION_CORS_ENABLED, and use CORS
6492     /// "Access-Control-Allow-Origin" headers to further restrict access.
6493     ///
6494     CEF_SCHEME_OPTION_DISPLAY_ISOLATED = 1 << 2,
6495 
6496     ///
6497     /// If CEF_SCHEME_OPTION_SECURE is set the scheme will be treated with the
6498     /// same security rules as those applied to "https" URLs. For example, loading
6499     /// this scheme from other secure schemes will not trigger mixed content
6500     /// warnings.
6501     ///
6502     CEF_SCHEME_OPTION_SECURE = 1 << 3,
6503 
6504     ///
6505     /// If CEF_SCHEME_OPTION_CORS_ENABLED is set the scheme can be sent CORS
6506     /// requests. This value should be set in most cases where
6507     /// CEF_SCHEME_OPTION_STANDARD is set.
6508     ///
6509     CEF_SCHEME_OPTION_CORS_ENABLED = 1 << 4,
6510 
6511     ///
6512     /// If CEF_SCHEME_OPTION_CSP_BYPASSING is set the scheme can bypass Content-
6513     /// Security-Policy (CSP) checks. This value should not be set in most cases
6514     /// where CEF_SCHEME_OPTION_STANDARD is set.
6515     ///
6516     CEF_SCHEME_OPTION_CSP_BYPASSING = 1 << 5,
6517 
6518     ///
6519     /// If CEF_SCHEME_OPTION_FETCH_ENABLED is set the scheme can perform Fetch API
6520     /// requests.
6521     ///
6522     CEF_SCHEME_OPTION_FETCH_ENABLED = 1 << 6
6523 }
6524 
6525 alias CEF_SCHEME_OPTION_NONE = cef_scheme_options_t.CEF_SCHEME_OPTION_NONE;
6526 alias CEF_SCHEME_OPTION_STANDARD = cef_scheme_options_t.CEF_SCHEME_OPTION_STANDARD;
6527 alias CEF_SCHEME_OPTION_LOCAL = cef_scheme_options_t.CEF_SCHEME_OPTION_LOCAL;
6528 alias CEF_SCHEME_OPTION_DISPLAY_ISOLATED = cef_scheme_options_t.CEF_SCHEME_OPTION_DISPLAY_ISOLATED;
6529 alias CEF_SCHEME_OPTION_SECURE = cef_scheme_options_t.CEF_SCHEME_OPTION_SECURE;
6530 alias CEF_SCHEME_OPTION_CORS_ENABLED = cef_scheme_options_t.CEF_SCHEME_OPTION_CORS_ENABLED;
6531 alias CEF_SCHEME_OPTION_CSP_BYPASSING = cef_scheme_options_t.CEF_SCHEME_OPTION_CSP_BYPASSING;
6532 alias CEF_SCHEME_OPTION_FETCH_ENABLED = cef_scheme_options_t.CEF_SCHEME_OPTION_FETCH_ENABLED;
6533 
6534 ///
6535 /// Structure representing a range.
6536 ///
6537 struct cef_range_t
6538 {
6539     uint from;
6540     uint to;
6541 }
6542 
6543 
6544 
6545 ///
6546 /// Composition underline style.
6547 ///
6548 enum cef_composition_underline_style_t
6549 {
6550     CEF_CUS_SOLID = 0,
6551     CEF_CUS_DOT = 1,
6552     CEF_CUS_DASH = 2,
6553     CEF_CUS_NONE = 3
6554 }
6555 
6556 alias CEF_CUS_SOLID = cef_composition_underline_style_t.CEF_CUS_SOLID;
6557 alias CEF_CUS_DOT = cef_composition_underline_style_t.CEF_CUS_DOT;
6558 alias CEF_CUS_DASH = cef_composition_underline_style_t.CEF_CUS_DASH;
6559 alias CEF_CUS_NONE = cef_composition_underline_style_t.CEF_CUS_NONE;
6560 
6561 ///
6562 /// Structure representing IME composition underline information. This is a thin
6563 /// wrapper around Blink's WebCompositionUnderline class and should be kept in
6564 /// sync with that.
6565 ///
6566 struct cef_composition_underline_t
6567 {
6568     ///
6569     /// Underline character range.
6570     ///
6571     cef_range_t range;
6572 
6573     ///
6574     /// Text color.
6575     ///
6576     cef_color_t color;
6577 
6578     ///
6579     /// Background color.
6580     ///
6581     cef_color_t background_color;
6582 
6583     ///
6584     /// Set to true (1) for thick underline.
6585     ///
6586     int thick;
6587 
6588     ///
6589     /// Style.
6590     ///
6591     cef_composition_underline_style_t style;
6592 }
6593 
6594 
6595 
6596 ///
6597 /// Enumerates the various representations of the ordering of audio channels.
6598 /// Must be kept synchronized with media::ChannelLayout from Chromium.
6599 /// See media\base\channel_layout.h
6600 ///
6601 enum cef_channel_layout_t
6602 {
6603     CEF_CHANNEL_LAYOUT_NONE = 0,
6604     CEF_CHANNEL_LAYOUT_UNSUPPORTED = 1,
6605 
6606     /// Front C
6607     CEF_CHANNEL_LAYOUT_MONO = 2,
6608 
6609     /// Front L, Front R
6610     CEF_CHANNEL_LAYOUT_STEREO = 3,
6611 
6612     /// Front L, Front R, Back C
6613     CEF_CHANNEL_LAYOUT_2_1 = 4,
6614 
6615     /// Front L, Front R, Front C
6616     CEF_CHANNEL_LAYOUT_SURROUND = 5,
6617 
6618     /// Front L, Front R, Front C, Back C
6619     CEF_CHANNEL_LAYOUT_4_0 = 6,
6620 
6621     /// Front L, Front R, Side L, Side R
6622     CEF_CHANNEL_LAYOUT_2_2 = 7,
6623 
6624     /// Front L, Front R, Back L, Back R
6625     CEF_CHANNEL_LAYOUT_QUAD = 8,
6626 
6627     /// Front L, Front R, Front C, Side L, Side R
6628     CEF_CHANNEL_LAYOUT_5_0 = 9,
6629 
6630     /// Front L, Front R, Front C, LFE, Side L, Side R
6631     CEF_CHANNEL_LAYOUT_5_1 = 10,
6632 
6633     /// Front L, Front R, Front C, Back L, Back R
6634     CEF_CHANNEL_LAYOUT_5_0_BACK = 11,
6635 
6636     /// Front L, Front R, Front C, LFE, Back L, Back R
6637     CEF_CHANNEL_LAYOUT_5_1_BACK = 12,
6638 
6639     /// Front L, Front R, Front C, Side L, Side R, Back L, Back R
6640     CEF_CHANNEL_LAYOUT_7_0 = 13,
6641 
6642     /// Front L, Front R, Front C, LFE, Side L, Side R, Back L, Back R
6643     CEF_CHANNEL_LAYOUT_7_1 = 14,
6644 
6645     /// Front L, Front R, Front C, LFE, Side L, Side R, Front LofC, Front RofC
6646     CEF_CHANNEL_LAYOUT_7_1_WIDE = 15,
6647 
6648     /// Stereo L, Stereo R
6649     CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX = 16,
6650 
6651     /// Stereo L, Stereo R, LFE
6652     CEF_CHANNEL_LAYOUT_2POINT1 = 17,
6653 
6654     /// Stereo L, Stereo R, Front C, LFE
6655     CEF_CHANNEL_LAYOUT_3_1 = 18,
6656 
6657     /// Stereo L, Stereo R, Front C, Rear C, LFE
6658     CEF_CHANNEL_LAYOUT_4_1 = 19,
6659 
6660     /// Stereo L, Stereo R, Front C, Side L, Side R, Back C
6661     CEF_CHANNEL_LAYOUT_6_0 = 20,
6662 
6663     /// Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC
6664     CEF_CHANNEL_LAYOUT_6_0_FRONT = 21,
6665 
6666     /// Stereo L, Stereo R, Front C, Rear L, Rear R, Rear C
6667     CEF_CHANNEL_LAYOUT_HEXAGONAL = 22,
6668 
6669     /// Stereo L, Stereo R, Front C, LFE, Side L, Side R, Rear Center
6670     CEF_CHANNEL_LAYOUT_6_1 = 23,
6671 
6672     /// Stereo L, Stereo R, Front C, LFE, Back L, Back R, Rear Center
6673     CEF_CHANNEL_LAYOUT_6_1_BACK = 24,
6674 
6675     /// Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC, LFE
6676     CEF_CHANNEL_LAYOUT_6_1_FRONT = 25,
6677 
6678     /// Front L, Front R, Front C, Side L, Side R, Front LofC, Front RofC
6679     CEF_CHANNEL_LAYOUT_7_0_FRONT = 26,
6680 
6681     /// Front L, Front R, Front C, LFE, Back L, Back R, Front LofC, Front RofC
6682     CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK = 27,
6683 
6684     /// Front L, Front R, Front C, Side L, Side R, Rear L, Back R, Back C.
6685     CEF_CHANNEL_LAYOUT_OCTAGONAL = 28,
6686 
6687     /// Channels are not explicitly mapped to speakers.
6688     CEF_CHANNEL_LAYOUT_DISCRETE = 29,
6689 
6690     /// Front L, Front R, Front C. Front C contains the keyboard mic audio. This
6691     /// layout is only intended for input for WebRTC. The Front C channel
6692     /// is stripped away in the WebRTC audio input pipeline and never seen outside
6693     /// of that.
6694     CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = 30,
6695 
6696     /// Front L, Front R, Side L, Side R, LFE
6697     CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE = 31,
6698 
6699     /// Actual channel layout is specified in the bitstream and the actual channel
6700     /// count is unknown at Chromium media pipeline level (useful for audio
6701     /// pass-through mode).
6702     CEF_CHANNEL_LAYOUT_BITSTREAM = 32,
6703 
6704     /// Front L, Front R, Front C, LFE, Side L, Side R,
6705     /// Front Height L, Front Height R, Rear Height L, Rear Height R
6706     /// Will be represented as six channels (5.1) due to eight channel limit
6707     /// kMaxConcurrentChannels
6708     CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX = 33,
6709 
6710     /// Max value, must always equal the largest entry ever logged.
6711     CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX
6712 }
6713 
6714 alias CEF_CHANNEL_LAYOUT_NONE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_NONE;
6715 alias CEF_CHANNEL_LAYOUT_UNSUPPORTED = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_UNSUPPORTED;
6716 alias CEF_CHANNEL_LAYOUT_MONO = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_MONO;
6717 alias CEF_CHANNEL_LAYOUT_STEREO = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO;
6718 alias CEF_CHANNEL_LAYOUT_2_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2_1;
6719 alias CEF_CHANNEL_LAYOUT_SURROUND = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_SURROUND;
6720 alias CEF_CHANNEL_LAYOUT_4_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_0;
6721 alias CEF_CHANNEL_LAYOUT_2_2 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2_2;
6722 alias CEF_CHANNEL_LAYOUT_QUAD = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_QUAD;
6723 alias CEF_CHANNEL_LAYOUT_5_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_0;
6724 alias CEF_CHANNEL_LAYOUT_5_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1;
6725 alias CEF_CHANNEL_LAYOUT_5_0_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_0_BACK;
6726 alias CEF_CHANNEL_LAYOUT_5_1_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1_BACK;
6727 alias CEF_CHANNEL_LAYOUT_7_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_0;
6728 alias CEF_CHANNEL_LAYOUT_7_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1;
6729 alias CEF_CHANNEL_LAYOUT_7_1_WIDE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1_WIDE;
6730 alias CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX;
6731 alias CEF_CHANNEL_LAYOUT_2POINT1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2POINT1;
6732 alias CEF_CHANNEL_LAYOUT_3_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_3_1;
6733 alias CEF_CHANNEL_LAYOUT_4_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_1;
6734 alias CEF_CHANNEL_LAYOUT_6_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_0;
6735 alias CEF_CHANNEL_LAYOUT_6_0_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_0_FRONT;
6736 alias CEF_CHANNEL_LAYOUT_HEXAGONAL = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_HEXAGONAL;
6737 alias CEF_CHANNEL_LAYOUT_6_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1;
6738 alias CEF_CHANNEL_LAYOUT_6_1_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1_BACK;
6739 alias CEF_CHANNEL_LAYOUT_6_1_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1_FRONT;
6740 alias CEF_CHANNEL_LAYOUT_7_0_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_0_FRONT;
6741 alias CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK;
6742 alias CEF_CHANNEL_LAYOUT_OCTAGONAL = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_OCTAGONAL;
6743 alias CEF_CHANNEL_LAYOUT_DISCRETE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_DISCRETE;
6744 alias CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC;
6745 alias CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE;
6746 alias CEF_CHANNEL_LAYOUT_BITSTREAM = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_BITSTREAM;
6747 alias CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX;
6748 alias CEF_CHANNEL_LAYOUT_MAX = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_MAX;
6749 
6750 ///
6751 /// Structure representing the audio parameters for setting up the audio
6752 /// handler.
6753 ///
6754 struct cef_audio_parameters_t
6755 {
6756     ///
6757     /// Layout of the audio channels
6758     ///
6759     cef_channel_layout_t channel_layout;
6760 
6761     ///
6762     /// Sample rate
6763     //
6764     int sample_rate;
6765 
6766     ///
6767     /// Number of frames per buffer
6768     ///
6769     int frames_per_buffer;
6770 }
6771 
6772 
6773 
6774 ///
6775 /// Result codes for CefMediaRouter::CreateRoute. Should be kept in sync with
6776 /// Chromium's media_router::mojom::RouteRequestResultCode type.
6777 ///
6778 enum cef_media_route_create_result_t
6779 {
6780     CEF_MRCR_UNKNOWN_ERROR = 0,
6781     CEF_MRCR_OK = 1,
6782     CEF_MRCR_TIMED_OUT = 2,
6783     CEF_MRCR_ROUTE_NOT_FOUND = 3,
6784     CEF_MRCR_SINK_NOT_FOUND = 4,
6785     CEF_MRCR_INVALID_ORIGIN = 5,
6786     CEF_MRCR_NO_SUPPORTED_PROVIDER = 7,
6787     CEF_MRCR_CANCELLED = 8,
6788     CEF_MRCR_ROUTE_ALREADY_EXISTS = 9,
6789     CEF_MRCR_ROUTE_ALREADY_TERMINATED = 11
6790 }
6791 
6792 alias CEF_MRCR_UNKNOWN_ERROR = cef_media_route_create_result_t.CEF_MRCR_UNKNOWN_ERROR;
6793 alias CEF_MRCR_OK = cef_media_route_create_result_t.CEF_MRCR_OK;
6794 alias CEF_MRCR_TIMED_OUT = cef_media_route_create_result_t.CEF_MRCR_TIMED_OUT;
6795 alias CEF_MRCR_ROUTE_NOT_FOUND = cef_media_route_create_result_t.CEF_MRCR_ROUTE_NOT_FOUND;
6796 alias CEF_MRCR_SINK_NOT_FOUND = cef_media_route_create_result_t.CEF_MRCR_SINK_NOT_FOUND;
6797 alias CEF_MRCR_INVALID_ORIGIN = cef_media_route_create_result_t.CEF_MRCR_INVALID_ORIGIN;
6798 alias CEF_MRCR_NO_SUPPORTED_PROVIDER = cef_media_route_create_result_t.CEF_MRCR_NO_SUPPORTED_PROVIDER;
6799 alias CEF_MRCR_CANCELLED = cef_media_route_create_result_t.CEF_MRCR_CANCELLED;
6800 alias CEF_MRCR_ROUTE_ALREADY_EXISTS = cef_media_route_create_result_t.CEF_MRCR_ROUTE_ALREADY_EXISTS;
6801 alias CEF_MRCR_ROUTE_ALREADY_TERMINATED = cef_media_route_create_result_t.CEF_MRCR_ROUTE_ALREADY_TERMINATED;
6802 
6803 ///
6804 /// Connection state for a MediaRoute object.
6805 ///
6806 enum cef_media_route_connection_state_t
6807 {
6808     CEF_MRCS_UNKNOWN = 0,
6809     CEF_MRCS_CONNECTING = 1,
6810     CEF_MRCS_CONNECTED = 2,
6811     CEF_MRCS_CLOSED = 3,
6812     CEF_MRCS_TERMINATED = 4
6813 }
6814 
6815 alias CEF_MRCS_UNKNOWN = cef_media_route_connection_state_t.CEF_MRCS_UNKNOWN;
6816 alias CEF_MRCS_CONNECTING = cef_media_route_connection_state_t.CEF_MRCS_CONNECTING;
6817 alias CEF_MRCS_CONNECTED = cef_media_route_connection_state_t.CEF_MRCS_CONNECTED;
6818 alias CEF_MRCS_CLOSED = cef_media_route_connection_state_t.CEF_MRCS_CLOSED;
6819 alias CEF_MRCS_TERMINATED = cef_media_route_connection_state_t.CEF_MRCS_TERMINATED;
6820 
6821 ///
6822 /// Icon types for a MediaSink object. Should be kept in sync with Chromium's
6823 /// media_router::SinkIconType type.
6824 ///
6825 enum cef_media_sink_icon_type_t
6826 {
6827     CEF_MSIT_CAST = 0,
6828     CEF_MSIT_CAST_AUDIO_GROUP = 1,
6829     CEF_MSIT_CAST_AUDIO = 2,
6830     CEF_MSIT_MEETING = 3,
6831     CEF_MSIT_HANGOUT = 4,
6832     CEF_MSIT_EDUCATION = 5,
6833     CEF_MSIT_WIRED_DISPLAY = 6,
6834     CEF_MSIT_GENERIC = 7,
6835 
6836     CEF_MSIT_TOTAL_COUNT = 8 // The total number of values.
6837 }
6838 
6839 alias CEF_MSIT_CAST = cef_media_sink_icon_type_t.CEF_MSIT_CAST;
6840 alias CEF_MSIT_CAST_AUDIO_GROUP = cef_media_sink_icon_type_t.CEF_MSIT_CAST_AUDIO_GROUP;
6841 alias CEF_MSIT_CAST_AUDIO = cef_media_sink_icon_type_t.CEF_MSIT_CAST_AUDIO;
6842 alias CEF_MSIT_MEETING = cef_media_sink_icon_type_t.CEF_MSIT_MEETING;
6843 alias CEF_MSIT_HANGOUT = cef_media_sink_icon_type_t.CEF_MSIT_HANGOUT;
6844 alias CEF_MSIT_EDUCATION = cef_media_sink_icon_type_t.CEF_MSIT_EDUCATION;
6845 alias CEF_MSIT_WIRED_DISPLAY = cef_media_sink_icon_type_t.CEF_MSIT_WIRED_DISPLAY;
6846 alias CEF_MSIT_GENERIC = cef_media_sink_icon_type_t.CEF_MSIT_GENERIC;
6847 alias CEF_MSIT_TOTAL_COUNT = cef_media_sink_icon_type_t.CEF_MSIT_TOTAL_COUNT;
6848 
6849 ///
6850 /// Device information for a MediaSink object.
6851 ///
6852 struct cef_media_sink_device_info_t
6853 {
6854     cef_string_t ip_address;
6855     int port;
6856     cef_string_t model_name;
6857 }
6858 
6859 
6860 
6861 ///
6862 /// Represents commands available to TextField.
6863 ///
6864 enum cef_text_field_commands_t
6865 {
6866     CEF_TFC_CUT = 1,
6867     CEF_TFC_COPY = 2,
6868     CEF_TFC_PASTE = 3,
6869     CEF_TFC_UNDO = 4,
6870     CEF_TFC_DELETE = 5,
6871     CEF_TFC_SELECT_ALL = 6
6872 }
6873 
6874 alias CEF_TFC_CUT = cef_text_field_commands_t.CEF_TFC_CUT;
6875 alias CEF_TFC_COPY = cef_text_field_commands_t.CEF_TFC_COPY;
6876 alias CEF_TFC_PASTE = cef_text_field_commands_t.CEF_TFC_PASTE;
6877 alias CEF_TFC_UNDO = cef_text_field_commands_t.CEF_TFC_UNDO;
6878 alias CEF_TFC_DELETE = cef_text_field_commands_t.CEF_TFC_DELETE;
6879 alias CEF_TFC_SELECT_ALL = cef_text_field_commands_t.CEF_TFC_SELECT_ALL;
6880 
6881 ///
6882 /// Chrome toolbar types.
6883 ///
6884 enum cef_chrome_toolbar_type_t
6885 {
6886     CEF_CTT_NONE = 1,
6887     CEF_CTT_NORMAL = 2,
6888     CEF_CTT_LOCATION = 3
6889 }
6890 
6891 alias CEF_CTT_NONE = cef_chrome_toolbar_type_t.CEF_CTT_NONE;
6892 alias CEF_CTT_NORMAL = cef_chrome_toolbar_type_t.CEF_CTT_NORMAL;
6893 alias CEF_CTT_LOCATION = cef_chrome_toolbar_type_t.CEF_CTT_LOCATION;
6894 
6895 ///
6896 /// Chrome page action icon types. Should be kept in sync with Chromium's
6897 /// PageActionIconType type.
6898 ///
6899 enum cef_chrome_page_action_icon_type_t
6900 {
6901     CEF_CPAIT_BOOKMARK_STAR = 0,
6902     CEF_CPAIT_CLICK_TO_CALL = 1,
6903     CEF_CPAIT_COOKIE_CONTROLS = 2,
6904     CEF_CPAIT_FILE_SYSTEM_ACCESS = 3,
6905     CEF_CPAIT_FIND = 4,
6906     CEF_CPAIT_HIGH_EFFICIENCY = 5,
6907     CEF_CPAIT_INTENT_PICKER = 6,
6908     CEF_CPAIT_LOCAL_CARD_MIGRATION = 7,
6909     CEF_CPAIT_MANAGE_PASSWORDS = 8,
6910     CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION = 9,
6911     CEF_CPAIT_PRICE_TRACKING = 10,
6912     CEF_CPAIT_PWA_INSTALL = 11,
6913     CEF_CPAIT_QR_CODE_GENERATOR = 12,
6914     CEF_CPAIT_READER_MODE = 13,
6915     CEF_CPAIT_SAVE_AUTOFILL_ADDRESS = 14,
6916     CEF_CPAIT_SAVE_CARD = 15,
6917     CEF_CPAIT_SEND_TAB_TO_SELF = 16,
6918     CEF_CPAIT_SHARING_HUB = 17,
6919     CEF_CPAIT_SIDE_SEARCH = 18,
6920     CEF_CPAIT_SMS_REMOTE_FETCHER = 19,
6921     CEF_CPAIT_TRANSLATE = 20,
6922     CEF_CPAIT_VIRTUAL_CARD_ENROLL = 21,
6923     CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK = 22,
6924     CEF_CPAIT_ZOOM = 23,
6925     CEF_CPAIT_SAVE_IBAN = 24,
6926     CEF_CPAIT_MANDATORY_REAUTH = 25,
6927     CEF_CPAIT_PRICE_INSIGHTS = 26,
6928     CEF_CPAIT_MAX_VALUE = CEF_CPAIT_PRICE_INSIGHTS
6929 }
6930 
6931 alias CEF_CPAIT_BOOKMARK_STAR = cef_chrome_page_action_icon_type_t.CEF_CPAIT_BOOKMARK_STAR;
6932 alias CEF_CPAIT_CLICK_TO_CALL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_CLICK_TO_CALL;
6933 alias CEF_CPAIT_COOKIE_CONTROLS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_COOKIE_CONTROLS;
6934 alias CEF_CPAIT_FILE_SYSTEM_ACCESS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_FILE_SYSTEM_ACCESS;
6935 alias CEF_CPAIT_FIND = cef_chrome_page_action_icon_type_t.CEF_CPAIT_FIND;
6936 alias CEF_CPAIT_HIGH_EFFICIENCY = cef_chrome_page_action_icon_type_t.CEF_CPAIT_HIGH_EFFICIENCY;
6937 alias CEF_CPAIT_INTENT_PICKER = cef_chrome_page_action_icon_type_t.CEF_CPAIT_INTENT_PICKER;
6938 alias CEF_CPAIT_LOCAL_CARD_MIGRATION = cef_chrome_page_action_icon_type_t.CEF_CPAIT_LOCAL_CARD_MIGRATION;
6939 alias CEF_CPAIT_MANAGE_PASSWORDS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MANAGE_PASSWORDS;
6940 alias CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION;
6941 alias CEF_CPAIT_PRICE_TRACKING = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PRICE_TRACKING;
6942 alias CEF_CPAIT_PWA_INSTALL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PWA_INSTALL;
6943 alias CEF_CPAIT_QR_CODE_GENERATOR = cef_chrome_page_action_icon_type_t.CEF_CPAIT_QR_CODE_GENERATOR;
6944 alias CEF_CPAIT_READER_MODE = cef_chrome_page_action_icon_type_t.CEF_CPAIT_READER_MODE;
6945 alias CEF_CPAIT_SAVE_AUTOFILL_ADDRESS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_AUTOFILL_ADDRESS;
6946 alias CEF_CPAIT_SAVE_CARD = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_CARD;
6947 alias CEF_CPAIT_SEND_TAB_TO_SELF = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SEND_TAB_TO_SELF;
6948 alias CEF_CPAIT_SHARING_HUB = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SHARING_HUB;
6949 alias CEF_CPAIT_SIDE_SEARCH = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SIDE_SEARCH;
6950 alias CEF_CPAIT_SMS_REMOTE_FETCHER = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SMS_REMOTE_FETCHER;
6951 alias CEF_CPAIT_TRANSLATE = cef_chrome_page_action_icon_type_t.CEF_CPAIT_TRANSLATE;
6952 alias CEF_CPAIT_VIRTUAL_CARD_ENROLL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_VIRTUAL_CARD_ENROLL;
6953 alias CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK = cef_chrome_page_action_icon_type_t.CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK;
6954 alias CEF_CPAIT_ZOOM = cef_chrome_page_action_icon_type_t.CEF_CPAIT_ZOOM;
6955 alias CEF_CPAIT_SAVE_IBAN = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_IBAN;
6956 alias CEF_CPAIT_MANDATORY_REAUTH = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MANDATORY_REAUTH;
6957 alias CEF_CPAIT_PRICE_INSIGHTS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PRICE_INSIGHTS;
6958 alias CEF_CPAIT_MAX_VALUE = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MAX_VALUE;
6959 
6960 ///
6961 /// Chrome toolbar button types. Should be kept in sync with CEF's internal
6962 /// ToolbarButtonType type.
6963 ///
6964 enum cef_chrome_toolbar_button_type_t
6965 {
6966     CEF_CTBT_CAST = 0,
6967     CEF_CTBT_DOWNLOAD = 1,
6968     CEF_CTBT_SEND_TAB_TO_SELF = 2,
6969     CEF_CTBT_SIDE_PANEL = 3,
6970     CEF_CTBT_MAX_VALUE = CEF_CTBT_SIDE_PANEL
6971 }
6972 
6973 alias CEF_CTBT_CAST = cef_chrome_toolbar_button_type_t.CEF_CTBT_CAST;
6974 alias CEF_CTBT_DOWNLOAD = cef_chrome_toolbar_button_type_t.CEF_CTBT_DOWNLOAD;
6975 alias CEF_CTBT_SEND_TAB_TO_SELF = cef_chrome_toolbar_button_type_t.CEF_CTBT_SEND_TAB_TO_SELF;
6976 alias CEF_CTBT_SIDE_PANEL = cef_chrome_toolbar_button_type_t.CEF_CTBT_SIDE_PANEL;
6977 alias CEF_CTBT_MAX_VALUE = cef_chrome_toolbar_button_type_t.CEF_CTBT_MAX_VALUE;
6978 
6979 ///
6980 /// Docking modes supported by CefWindow::AddOverlay.
6981 ///
6982 enum cef_docking_mode_t
6983 {
6984     CEF_DOCKING_MODE_TOP_LEFT = 1,
6985     CEF_DOCKING_MODE_TOP_RIGHT = 2,
6986     CEF_DOCKING_MODE_BOTTOM_LEFT = 3,
6987     CEF_DOCKING_MODE_BOTTOM_RIGHT = 4,
6988     CEF_DOCKING_MODE_CUSTOM = 5
6989 }
6990 
6991 alias CEF_DOCKING_MODE_TOP_LEFT = cef_docking_mode_t.CEF_DOCKING_MODE_TOP_LEFT;
6992 alias CEF_DOCKING_MODE_TOP_RIGHT = cef_docking_mode_t.CEF_DOCKING_MODE_TOP_RIGHT;
6993 alias CEF_DOCKING_MODE_BOTTOM_LEFT = cef_docking_mode_t.CEF_DOCKING_MODE_BOTTOM_LEFT;
6994 alias CEF_DOCKING_MODE_BOTTOM_RIGHT = cef_docking_mode_t.CEF_DOCKING_MODE_BOTTOM_RIGHT;
6995 alias CEF_DOCKING_MODE_CUSTOM = cef_docking_mode_t.CEF_DOCKING_MODE_CUSTOM;
6996 
6997 ///
6998 /// Show states supported by CefWindowDelegate::GetInitialShowState.
6999 ///
7000 enum cef_show_state_t
7001 {
7002     CEF_SHOW_STATE_NORMAL = 1,
7003     CEF_SHOW_STATE_MINIMIZED = 2,
7004     CEF_SHOW_STATE_MAXIMIZED = 3,
7005     CEF_SHOW_STATE_FULLSCREEN = 4
7006 }
7007 
7008 alias CEF_SHOW_STATE_NORMAL = cef_show_state_t.CEF_SHOW_STATE_NORMAL;
7009 alias CEF_SHOW_STATE_MINIMIZED = cef_show_state_t.CEF_SHOW_STATE_MINIMIZED;
7010 alias CEF_SHOW_STATE_MAXIMIZED = cef_show_state_t.CEF_SHOW_STATE_MAXIMIZED;
7011 alias CEF_SHOW_STATE_FULLSCREEN = cef_show_state_t.CEF_SHOW_STATE_FULLSCREEN;
7012 
7013 ///
7014 /// Values indicating what state of the touch handle is set.
7015 ///
7016 enum cef_touch_handle_state_flags_t
7017 {
7018     CEF_THS_FLAG_NONE = 0,
7019     CEF_THS_FLAG_ENABLED = 1 << 0,
7020     CEF_THS_FLAG_ORIENTATION = 1 << 1,
7021     CEF_THS_FLAG_ORIGIN = 1 << 2,
7022     CEF_THS_FLAG_ALPHA = 1 << 3
7023 }
7024 
7025 alias CEF_THS_FLAG_NONE = cef_touch_handle_state_flags_t.CEF_THS_FLAG_NONE;
7026 alias CEF_THS_FLAG_ENABLED = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ENABLED;
7027 alias CEF_THS_FLAG_ORIENTATION = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ORIENTATION;
7028 alias CEF_THS_FLAG_ORIGIN = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ORIGIN;
7029 alias CEF_THS_FLAG_ALPHA = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ALPHA;
7030 
7031 struct cef_touch_handle_state_t
7032 {
7033     ///
7034     /// Touch handle id. Increments for each new touch handle.
7035     ///
7036     int touch_handle_id;
7037 
7038     ///
7039     /// Combination of cef_touch_handle_state_flags_t values indicating what state
7040     /// is set.
7041     ///
7042     uint flags;
7043 
7044     ///
7045     /// Enabled state. Only set if |flags| contains CEF_THS_FLAG_ENABLED.
7046     ///
7047     int enabled;
7048 
7049     ///
7050     /// Orientation state. Only set if |flags| contains CEF_THS_FLAG_ORIENTATION.
7051     ///
7052     cef_horizontal_alignment_t orientation;
7053     int mirror_vertical;
7054     int mirror_horizontal;
7055 
7056     ///
7057     /// Origin state. Only set if |flags| contains CEF_THS_FLAG_ORIGIN.
7058     ///
7059     cef_point_t origin;
7060 
7061     ///
7062     /// Alpha state. Only set if |flags| contains CEF_THS_FLAG_ALPHA.
7063     ///
7064     float alpha;
7065 }
7066 
7067 
7068 
7069 ///
7070 /// Media access permissions used by OnRequestMediaAccessPermission.
7071 ///
7072 enum cef_media_access_permission_types_t
7073 {
7074     ///
7075     /// No permission.
7076     ///
7077     CEF_MEDIA_PERMISSION_NONE = 0,
7078 
7079     ///
7080     /// Device audio capture permission.
7081     ///
7082     CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE = 1 << 0,
7083 
7084     ///
7085     /// Device video capture permission.
7086     ///
7087     CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE = 1 << 1,
7088 
7089     ///
7090     /// Desktop audio capture permission.
7091     ///
7092     CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE = 1 << 2,
7093 
7094     ///
7095     /// Desktop video capture permission.
7096     ///
7097     CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE = 1 << 3
7098 }
7099 
7100 alias CEF_MEDIA_PERMISSION_NONE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_NONE;
7101 alias CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE;
7102 alias CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE;
7103 alias CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE;
7104 alias CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE;
7105 
7106 ///
7107 /// Permission types used with OnShowPermissionPrompt. Some types are
7108 /// platform-specific or only supported with the Chrome runtime. Should be kept
7109 /// in sync with Chromium's permissions::RequestType type.
7110 ///
7111 enum cef_permission_request_types_t
7112 {
7113     CEF_PERMISSION_TYPE_NONE = 0,
7114     CEF_PERMISSION_TYPE_ACCESSIBILITY_EVENTS = 1 << 0,
7115     CEF_PERMISSION_TYPE_AR_SESSION = 1 << 1,
7116     CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = 1 << 2,
7117     CEF_PERMISSION_TYPE_CAMERA_STREAM = 1 << 3,
7118     CEF_PERMISSION_TYPE_CLIPBOARD = 1 << 4,
7119     CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = 1 << 5,
7120     CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 6,
7121     CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 7,
7122     CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 8,
7123     CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 9,
7124     CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 10,
7125     CEF_PERMISSION_TYPE_MIDI = 1 << 11,
7126     CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 12,
7127     CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 13,
7128     CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 14,
7129     CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 15,
7130     CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 16,
7131     CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 17,
7132     CEF_PERMISSION_TYPE_VR_SESSION = 1 << 18,
7133     CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 19
7134 }
7135 
7136 alias CEF_PERMISSION_TYPE_NONE = cef_permission_request_types_t.CEF_PERMISSION_TYPE_NONE;
7137 alias CEF_PERMISSION_TYPE_ACCESSIBILITY_EVENTS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_ACCESSIBILITY_EVENTS;
7138 alias CEF_PERMISSION_TYPE_AR_SESSION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_AR_SESSION;
7139 alias CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM;
7140 alias CEF_PERMISSION_TYPE_CAMERA_STREAM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CAMERA_STREAM;
7141 alias CEF_PERMISSION_TYPE_CLIPBOARD = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CLIPBOARD;
7142 alias CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS;
7143 alias CEF_PERMISSION_TYPE_DISK_QUOTA = cef_permission_request_types_t.CEF_PERMISSION_TYPE_DISK_QUOTA;
7144 alias CEF_PERMISSION_TYPE_LOCAL_FONTS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_LOCAL_FONTS;
7145 alias CEF_PERMISSION_TYPE_GEOLOCATION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_GEOLOCATION;
7146 alias CEF_PERMISSION_TYPE_IDLE_DETECTION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_IDLE_DETECTION;
7147 alias CEF_PERMISSION_TYPE_MIC_STREAM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MIC_STREAM;
7148 alias CEF_PERMISSION_TYPE_MIDI = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MIDI;
7149 alias CEF_PERMISSION_TYPE_MIDI_SYSEX = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MIDI_SYSEX;
7150 alias CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS;
7151 alias CEF_PERMISSION_TYPE_NOTIFICATIONS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_NOTIFICATIONS;
7152 alias CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = cef_permission_request_types_t.CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER;
7153 alias CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = cef_permission_request_types_t.CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER;
7154 alias CEF_PERMISSION_TYPE_STORAGE_ACCESS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_STORAGE_ACCESS;
7155 alias CEF_PERMISSION_TYPE_VR_SESSION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_VR_SESSION;
7156 alias CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = cef_permission_request_types_t.CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT;
7157 
7158 ///
7159 /// Permission request results.
7160 ///
7161 enum cef_permission_request_result_t
7162 {
7163     ///
7164     /// Accept the permission request as an explicit user action.
7165     ///
7166     CEF_PERMISSION_RESULT_ACCEPT = 0,
7167 
7168     ///
7169     /// Deny the permission request as an explicit user action.
7170     ///
7171     CEF_PERMISSION_RESULT_DENY = 1,
7172 
7173     ///
7174     /// Dismiss the permission request as an explicit user action.
7175     ///
7176     CEF_PERMISSION_RESULT_DISMISS = 2,
7177 
7178     ///
7179     /// Ignore the permission request. If the prompt remains unhandled (e.g.
7180     /// OnShowPermissionPrompt returns false and there is no default permissions
7181     /// UI) then any related promises may remain unresolved.
7182     ///
7183     CEF_PERMISSION_RESULT_IGNORE = 3
7184 }
7185 
7186 alias CEF_PERMISSION_RESULT_ACCEPT = cef_permission_request_result_t.CEF_PERMISSION_RESULT_ACCEPT;
7187 alias CEF_PERMISSION_RESULT_DENY = cef_permission_request_result_t.CEF_PERMISSION_RESULT_DENY;
7188 alias CEF_PERMISSION_RESULT_DISMISS = cef_permission_request_result_t.CEF_PERMISSION_RESULT_DISMISS;
7189 alias CEF_PERMISSION_RESULT_IGNORE = cef_permission_request_result_t.CEF_PERMISSION_RESULT_IGNORE;
7190 
7191 ///
7192 /// Certificate types supported by CefTestServer::CreateAndStart. The matching
7193 /// certificate file must exist in the "net/data/ssl/certificates" directory.
7194 /// See CefSetDataDirectoryForTests() for related configuration.
7195 ///
7196 enum cef_test_cert_type_t
7197 {
7198     /// Valid certificate using the IP (127.0.0.1). Loads the "ok_cert.pem" file.
7199     CEF_TEST_CERT_OK_IP = 0,
7200 
7201     /// Valid certificate using the domain ("localhost"). Loads the
7202     /// "localhost_cert.pem" file.
7203     CEF_TEST_CERT_OK_DOMAIN = 1,
7204 
7205     /// Expired certificate. Loads the "expired_cert.pem" file.
7206     CEF_TEST_CERT_EXPIRED = 2
7207 }
7208 
7209 alias CEF_TEST_CERT_OK_IP = cef_test_cert_type_t.CEF_TEST_CERT_OK_IP;
7210 alias CEF_TEST_CERT_OK_DOMAIN = cef_test_cert_type_t.CEF_TEST_CERT_OK_DOMAIN;
7211 alias CEF_TEST_CERT_EXPIRED = cef_test_cert_type_t.CEF_TEST_CERT_EXPIRED;
7212 
7213 ///
7214 /// Preferences type passed to
7215 /// CefBrowserProcessHandler::OnRegisterCustomPreferences.
7216 ///
7217 enum cef_preferences_type_t
7218 {
7219     /// Global preferences registered a single time at application startup.
7220     CEF_PREFERENCES_TYPE_GLOBAL = 0,
7221 
7222     /// Request context preferences registered each time a new CefRequestContext
7223     /// is created.
7224     CEF_PREFERENCES_TYPE_REQUEST_CONTEXT = 1
7225 }
7226 
7227 alias CEF_PREFERENCES_TYPE_GLOBAL = cef_preferences_type_t.CEF_PREFERENCES_TYPE_GLOBAL;
7228 alias CEF_PREFERENCES_TYPE_REQUEST_CONTEXT = cef_preferences_type_t.CEF_PREFERENCES_TYPE_REQUEST_CONTEXT;
7229 
7230 ///
7231 /// Download interrupt reasons. Should be kept in sync with
7232 /// Chromium's download::DownloadInterruptReason type.
7233 ///
7234 enum cef_download_interrupt_reason_t
7235 {
7236     CEF_DOWNLOAD_INTERRUPT_REASON_NONE = 0,
7237 
7238     /// Generic file operation failure.
7239     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED = 1,
7240 
7241     /// The file cannot be accessed due to security restrictions.
7242     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED = 2,
7243 
7244     /// There is not enough room on the drive.
7245     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE = 3,
7246 
7247     /// The directory or file name is too long.
7248     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG = 5,
7249 
7250     /// The file is too large for the file system to handle.
7251     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE = 6,
7252 
7253     /// The file contains a virus.
7254     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED = 7,
7255 
7256     /// The file was in use. Too many files are opened at once. We have run out of
7257     /// memory.
7258     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR = 10,
7259 
7260     /// The file was blocked due to local policy.
7261     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED = 11,
7262 
7263     /// An attempt to check the safety of the download failed due to unexpected
7264     /// reasons. See http://crbug.com/153212.
7265     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED = 12,
7266 
7267     /// An attempt was made to seek past the end of a file in opening
7268     /// a file (as part of resuming a previously interrupted download).
7269     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT = 13,
7270 
7271     /// The partial file didn't match the expected hash.
7272     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH = 14,
7273 
7274     /// The source and the target of the download were the same.
7275     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE = 15,
7276 
7277     // Network errors.
7278 
7279     /// Generic network failure.
7280     CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED = 20,
7281 
7282     /// The network operation timed out.
7283     CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT = 21,
7284 
7285     /// The network connection has been lost.
7286     CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED = 22,
7287 
7288     /// The server has gone down.
7289     CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN = 23,
7290 
7291     /// The network request was invalid. This may be due to the original URL or a
7292     /// redirected URL:
7293     /// - Having an unsupported scheme.
7294     /// - Being an invalid URL.
7295     /// - Being disallowed by policy.
7296     CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST = 24,
7297 
7298     // Server responses.
7299 
7300     /// The server indicates that the operation has failed (generic).
7301     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED = 30,
7302 
7303     /// The server does not support range requests.
7304     /// Internal use only:  must restart from the beginning.
7305     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE = 31,
7306 
7307     /// The server does not have the requested data.
7308     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT = 33,
7309 
7310     /// Server didn't authorize access to resource.
7311     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED = 34,
7312 
7313     /// Server certificate problem.
7314     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM = 35,
7315 
7316     /// Server access forbidden.
7317     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN = 36,
7318 
7319     /// Unexpected server response. This might indicate that the responding server
7320     /// may not be the intended server.
7321     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE = 37,
7322 
7323     /// The server sent fewer bytes than the content-length header. It may
7324     /// indicate that the connection was closed prematurely, or the Content-Length
7325     /// header was invalid. The download is only interrupted if strong validators
7326     /// are present. Otherwise, it is treated as finished.
7327     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH = 38,
7328 
7329     /// An unexpected cross-origin redirect happened.
7330     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT = 39,
7331 
7332     // User input.
7333 
7334     /// The user canceled the download.
7335     CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED = 40,
7336 
7337     /// The user shut down the browser.
7338     /// Internal use only:  resume pending downloads if possible.
7339     CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN = 41,
7340 
7341     // Crash.
7342 
7343     /// The browser crashed.
7344     /// Internal use only:  resume pending downloads if possible.
7345     CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = 50
7346 }
7347 
7348 alias CEF_DOWNLOAD_INTERRUPT_REASON_NONE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NONE;
7349 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
7350 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED;
7351 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE;
7352 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG;
7353 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE;
7354 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED;
7355 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR;
7356 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED;
7357 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED;
7358 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT;
7359 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH;
7360 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE;
7361 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED;
7362 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT;
7363 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED;
7364 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN;
7365 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST;
7366 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED;
7367 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE;
7368 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT;
7369 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED;
7370 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM;
7371 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN;
7372 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE;
7373 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH;
7374 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT;
7375 alias CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED;
7376 alias CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN;
7377 alias CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_CRASH;
7378 
7379 ///
7380 /// Specifies the gesture commands.
7381 ///
7382 enum cef_gesture_command_t
7383 {
7384     CEF_GESTURE_COMMAND_BACK = 0,
7385     CEF_GESTURE_COMMAND_FORWARD = 1
7386 }
7387 
7388 alias CEF_GESTURE_COMMAND_BACK = cef_gesture_command_t.CEF_GESTURE_COMMAND_BACK;
7389 alias CEF_GESTURE_COMMAND_FORWARD = cef_gesture_command_t.CEF_GESTURE_COMMAND_FORWARD;
7390 
7391 ///
7392 /// Specifies the zoom commands supported by CefBrowserHost::Zoom.
7393 ///
7394 enum cef_zoom_command_t
7395 {
7396     CEF_ZOOM_COMMAND_OUT = 0,
7397     CEF_ZOOM_COMMAND_RESET = 1,
7398     CEF_ZOOM_COMMAND_IN = 2
7399 }
7400 
7401 alias CEF_ZOOM_COMMAND_OUT = cef_zoom_command_t.CEF_ZOOM_COMMAND_OUT;
7402 alias CEF_ZOOM_COMMAND_RESET = cef_zoom_command_t.CEF_ZOOM_COMMAND_RESET;
7403 alias CEF_ZOOM_COMMAND_IN = cef_zoom_command_t.CEF_ZOOM_COMMAND_IN;
7404 
7405 // CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
7406 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
7407 //
7408 // Redistribution and use in source and binary forms, with or without
7409 // modification, are permitted provided that the following conditions are
7410 // met:
7411 //
7412 //    * Redistributions of source code must retain the above copyright
7413 // notice, this list of conditions and the following disclaimer.
7414 //    * Redistributions in binary form must reproduce the above
7415 // copyright notice, this list of conditions and the following disclaimer
7416 // in the documentation and/or other materials provided with the
7417 // distribution.
7418 //    * Neither the name of Google Inc. nor the name Chromium Embedded
7419 // Framework nor the names of its contributors may be used to endorse
7420 // or promote products derived from this software without specific prior
7421 // written permission.
7422 //
7423 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7424 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7425 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7426 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7427 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7428 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7429 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7430 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
7431 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7432 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7433 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7434 //
7435 // ---------------------------------------------------------------------------
7436 //
7437 // This file was generated by the CEF translator tool and should not edited
7438 // by hand. See the translator.README.txt file in the tools directory for
7439 // more information.
7440 //
7441 // $hash=0ac3c8ca887778a840c65108d56038d4d776e073$
7442 //
7443 
7444 extern (C):
7445 
7446 ///
7447 /// Implement this structure to receive accessibility notification when
7448 /// accessibility events have been registered. The functions of this structure
7449 /// will be called on the UI thread.
7450 ///
7451 struct cef_accessibility_handler_t
7452 {
7453     ///
7454     /// Base structure.
7455     ///
7456 
7457     ///
7458     /// Called after renderer process sends accessibility tree changes to the
7459     /// browser process.
7460     ///
7461 
7462     ///
7463     /// Called after renderer process sends accessibility location changes to the
7464     /// browser process.
7465     ///
7466 
7467     // CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_
7468     cef_base_ref_counted_t base;
7469     extern(System) void function (
7470         cef_accessibility_handler_t* self,
7471         cef_value_t* value) nothrow on_accessibility_tree_change;
7472     extern(System) void function (
7473         cef_accessibility_handler_t* self,
7474         cef_value_t* value) nothrow on_accessibility_location_change;
7475 }
7476 
7477 
7478 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
7479 //
7480 // Redistribution and use in source and binary forms, with or without
7481 // modification, are permitted provided that the following conditions are
7482 // met:
7483 //
7484 //    * Redistributions of source code must retain the above copyright
7485 // notice, this list of conditions and the following disclaimer.
7486 //    * Redistributions in binary form must reproduce the above
7487 // copyright notice, this list of conditions and the following disclaimer
7488 // in the documentation and/or other materials provided with the
7489 // distribution.
7490 //    * Neither the name of Google Inc. nor the name Chromium Embedded
7491 // Framework nor the names of its contributors may be used to endorse
7492 // or promote products derived from this software without specific prior
7493 // written permission.
7494 //
7495 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7496 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7497 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7498 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7499 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7500 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7501 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7502 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
7503 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7504 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7505 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7506 //
7507 // ---------------------------------------------------------------------------
7508 //
7509 // This file was generated by the CEF translator tool and should not edited
7510 // by hand. See the translator.README.txt file in the tools directory for
7511 // more information.
7512 //
7513 // $hash=9b523fbf312a8a0cb1c743a3c8aca7bc9cc22bbc$
7514 //
7515 
7516 extern (C):
7517 
7518 ///
7519 /// Implement this structure to provide handler implementations. Methods will be
7520 /// called by the process and/or thread indicated.
7521 ///
7522 struct cef_app_t
7523 {
7524     ///
7525     /// Base structure.
7526     ///
7527 
7528     ///
7529     /// Provides an opportunity to view and/or modify command-line arguments
7530     /// before processing by CEF and Chromium. The |process_type| value will be
7531     /// NULL for the browser process. Do not keep a reference to the
7532     /// cef_command_line_t object passed to this function. The
7533     /// cef_settings_t.command_line_args_disabled value can be used to start with
7534     /// an NULL command-line object. Any values specified in CefSettings that
7535     cef_base_ref_counted_t base;
7536     /// equate to command-line arguments will be set before this function is
7537     /// called. Be cautious when using this function to modify command-line
7538     /// arguments for non-browser processes as this may result in undefined
7539     /// behavior including crashes.
7540     ///
7541     extern(System) void function (
7542         cef_app_t* self,
7543         const(cef_string_t)* process_type,
7544         cef_command_line_t* command_line) nothrow on_before_command_line_processing;
7545 
7546     ///
7547     /// Provides an opportunity to register custom schemes. Do not keep a
7548     /// reference to the |registrar| object. This function is called on the main
7549     /// thread for each process and the registered schemes should be the same
7550     /// across all processes.
7551     ///
7552     extern(System) void function (
7553         cef_app_t* self,
7554         cef_scheme_registrar_t* registrar) nothrow on_register_custom_schemes;
7555 
7556     ///
7557     /// Return the handler for resource bundle events. If
7558     /// cef_settings_t.pack_loading_disabled is true (1) a handler must be
7559     /// returned. If no handler is returned resources will be loaded from pack
7560     /// files. This function is called by the browser and render processes on
7561     /// multiple threads.
7562     ///
7563     extern(System) cef_resource_bundle_handler_t* function (
7564         cef_app_t* self) nothrow get_resource_bundle_handler;
7565 
7566     ///
7567     /// Return the handler for functionality specific to the browser process. This
7568     /// function is called on multiple threads in the browser process.
7569     ///
7570     extern(System) cef_browser_process_handler_t* function (
7571         cef_app_t* self) nothrow get_browser_process_handler;
7572 
7573     ///
7574     /// Return the handler for functionality specific to the render process. This
7575     /// function is called on the render process main thread.
7576     ///
7577     extern(System) cef_render_process_handler_t* function (
7578         cef_app_t* self) nothrow get_render_process_handler;
7579 }
7580 
7581 
7582 
7583 ///
7584 /// This function should be called from the application entry point function to
7585 /// execute a secondary process. It can be used to run secondary processes from
7586 /// the browser client executable (default behavior) or from a separate
7587 /// executable specified by the cef_settings_t.browser_subprocess_path value. If
7588 /// called for the browser process (identified by no "type" command-line value)
7589 /// it will return immediately with a value of -1. If called for a recognized
7590 /// secondary process it will block until the process should exit and then
7591 /// return the process exit code. The |application| parameter may be NULL. The
7592 /// |windows_sandbox_info| parameter is only used on Windows and may be NULL
7593 /// (see cef_sandbox_win.h for details).
7594 ///
7595 int cef_execute_process (
7596     const(cef_main_args_t)* args,
7597     cef_app_t* application,
7598     void* windows_sandbox_info);
7599 
7600 ///
7601 /// This function should be called on the main application thread to initialize
7602 /// the CEF browser process. The |application| parameter may be NULL. A return
7603 /// value of true (1) indicates that it succeeded and false (0) indicates that
7604 /// it failed. The |windows_sandbox_info| parameter is only used on Windows and
7605 /// may be NULL (see cef_sandbox_win.h for details).
7606 ///
7607 int cef_initialize (
7608     const(cef_main_args_t)* args,
7609     const(cef_settings_t)* settings,
7610     cef_app_t* application,
7611     void* windows_sandbox_info);
7612 
7613 ///
7614 /// This function should be called on the main application thread to shut down
7615 /// the CEF browser process before the application exits.
7616 ///
7617 void cef_shutdown ();
7618 
7619 ///
7620 /// Perform a single iteration of CEF message loop processing. This function is
7621 /// provided for cases where the CEF message loop must be integrated into an
7622 /// existing application message loop. Use of this function is not recommended
7623 /// for most users; use either the cef_run_message_loop() function or
7624 /// cef_settings_t.multi_threaded_message_loop if possible. When using this
7625 /// function care must be taken to balance performance against excessive CPU
7626 /// usage. It is recommended to enable the cef_settings_t.external_message_pump
7627 /// option when using this function so that
7628 /// cef_browser_process_handler_t::on_schedule_message_pump_work() callbacks can
7629 /// facilitate the scheduling process. This function should only be called on
7630 /// the main application thread and only if cef_initialize() is called with a
7631 /// cef_settings_t.multi_threaded_message_loop value of false (0). This function
7632 /// will not block.
7633 ///
7634 void cef_do_message_loop_work ();
7635 
7636 ///
7637 /// Run the CEF message loop. Use this function instead of an application-
7638 /// provided message loop to get the best balance between performance and CPU
7639 /// usage. This function should only be called on the main application thread
7640 /// and only if cef_initialize() is called with a
7641 /// cef_settings_t.multi_threaded_message_loop value of false (0). This function
7642 /// will block until a quit message is received by the system.
7643 ///
7644 void cef_run_message_loop ();
7645 
7646 ///
7647 /// Quit the CEF message loop that was started by calling
7648 /// cef_run_message_loop(). This function should only be called on the main
7649 /// application thread and only if cef_run_message_loop() was used.
7650 ///
7651 void cef_quit_message_loop ();
7652 
7653 // CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_
7654 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
7655 //
7656 // Redistribution and use in source and binary forms, with or without
7657 // modification, are permitted provided that the following conditions are
7658 // met:
7659 //
7660 //    * Redistributions of source code must retain the above copyright
7661 // notice, this list of conditions and the following disclaimer.
7662 //    * Redistributions in binary form must reproduce the above
7663 // copyright notice, this list of conditions and the following disclaimer
7664 // in the documentation and/or other materials provided with the
7665 // distribution.
7666 //    * Neither the name of Google Inc. nor the name Chromium Embedded
7667 // Framework nor the names of its contributors may be used to endorse
7668 // or promote products derived from this software without specific prior
7669 // written permission.
7670 //
7671 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7672 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7673 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7674 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7675 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7676 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7677 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7678 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
7679 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7680 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7681 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7682 //
7683 // ---------------------------------------------------------------------------
7684 //
7685 // This file was generated by the CEF translator tool and should not edited
7686 // by hand. See the translator.README.txt file in the tools directory for
7687 // more information.
7688 //
7689 // $hash=932c3ecb22fd26322d96d0e01459122aadafd302$
7690 //
7691 
7692 extern (C):
7693 
7694 ///
7695 /// Implement this structure to handle audio events.
7696 ///
7697 struct cef_audio_handler_t
7698 {
7699     ///
7700     /// Base structure.
7701     ///
7702 
7703     ///
7704     /// Called on the UI thread to allow configuration of audio stream parameters.
7705     /// Return true (1) to proceed with audio stream capture, or false (0) to
7706     /// cancel it. All members of |params| can optionally be configured here, but
7707     /// they are also pre-filled with some sensible defaults.
7708     ///
7709 
7710     ///
7711     /// Called on a browser audio capture thread when the browser starts streaming
7712     /// audio. OnAudioStreamStopped will always be called after
7713     /// OnAudioStreamStarted; both functions may be called multiple times for the
7714     cef_base_ref_counted_t base;
7715     extern(System) int function (
7716         cef_audio_handler_t* self,
7717         cef_browser_t* browser,
7718         cef_audio_parameters_t* params) nothrow get_audio_parameters;
7719     /// same browser. |params| contains the audio parameters like sample rate and
7720     /// channel layout. |channels| is the number of channels.
7721     ///
7722     extern(System) void function (
7723         cef_audio_handler_t* self,
7724         cef_browser_t* browser,
7725         const(cef_audio_parameters_t)* params,
7726         int channels) nothrow on_audio_stream_started;
7727 
7728     ///
7729     /// Called on the audio stream thread when a PCM packet is received for the
7730     /// stream. |data| is an array representing the raw PCM data as a floating
7731     /// point type, i.e. 4-byte value(s). |frames| is the number of frames in the
7732     /// PCM packet. |pts| is the presentation timestamp (in milliseconds since the
7733     /// Unix Epoch) and represents the time at which the decompressed packet
7734     /// should be presented to the user. Based on |frames| and the
7735     /// |channel_layout| value passed to OnAudioStreamStarted you can calculate
7736     /// the size of the |data| array in bytes.
7737     ///
7738     extern(System) void function (
7739         cef_audio_handler_t* self,
7740         cef_browser_t* browser,
7741         const(float*)* data,
7742         int frames,
7743         long pts) nothrow on_audio_stream_packet;
7744 
7745     ///
7746     /// Called on the UI thread when the stream has stopped. OnAudioSteamStopped
7747     /// will always be called after OnAudioStreamStarted; both functions may be
7748     /// called multiple times for the same stream.
7749     ///
7750     extern(System) void function (
7751         cef_audio_handler_t* self,
7752         cef_browser_t* browser) nothrow on_audio_stream_stopped;
7753 
7754     ///
7755     /// Called on the UI or audio stream thread when an error occurred. During the
7756     /// stream creation phase this callback will be called on the UI thread while
7757     /// in the capturing phase it will be called on the audio stream thread. The
7758     /// stream will be stopped immediately.
7759     ///
7760     extern(System) void function (
7761         cef_audio_handler_t* self,
7762         cef_browser_t* browser,
7763         const(cef_string_t)* message) nothrow on_audio_stream_error;
7764 }
7765 
7766 
7767 
7768 // CEF_INCLUDE_CAPI_CEF_AUDIO_HANDLER_CAPI_H_
7769 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
7770 //
7771 // Redistribution and use in source and binary forms, with or without
7772 // modification, are permitted provided that the following conditions are
7773 // met:
7774 //
7775 //    * Redistributions of source code must retain the above copyright
7776 // notice, this list of conditions and the following disclaimer.
7777 //    * Redistributions in binary form must reproduce the above
7778 // copyright notice, this list of conditions and the following disclaimer
7779 // in the documentation and/or other materials provided with the
7780 // distribution.
7781 //    * Neither the name of Google Inc. nor the name Chromium Embedded
7782 // Framework nor the names of its contributors may be used to endorse
7783 // or promote products derived from this software without specific prior
7784 // written permission.
7785 //
7786 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7787 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7788 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7789 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7790 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7791 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7792 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7793 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
7794 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7795 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7796 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7797 //
7798 // ---------------------------------------------------------------------------
7799 //
7800 // This file was generated by the CEF translator tool and should not edited
7801 // by hand. See the translator.README.txt file in the tools directory for
7802 // more information.
7803 //
7804 // $hash=4b9c31ef9a23f899c6d8cd3da49934a41f1bd231$
7805 //
7806 
7807 extern (C):
7808 
7809 ///
7810 /// Callback structure used for asynchronous continuation of authentication
7811 /// requests.
7812 ///
7813 struct cef_auth_callback_t
7814 {
7815     ///
7816     /// Base structure.
7817     ///
7818 
7819     ///
7820     /// Continue the authentication request.
7821     ///
7822 
7823     ///
7824     /// Cancel the authentication request.
7825     ///
7826 
7827     // CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_
7828     cef_base_ref_counted_t base;
7829     extern(System) void function (
7830         cef_auth_callback_t* self,
7831         const(cef_string_t)* username,
7832         const(cef_string_t)* password) nothrow cont;
7833     extern(System) void function (cef_auth_callback_t* self) nothrow cancel;
7834 }
7835 
7836 
7837 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
7838 //
7839 // Redistribution and use in source and binary forms, with or without
7840 // modification, are permitted provided that the following conditions are
7841 // met:
7842 //
7843 //    * Redistributions of source code must retain the above copyright
7844 // notice, this list of conditions and the following disclaimer.
7845 //    * Redistributions in binary form must reproduce the above
7846 // copyright notice, this list of conditions and the following disclaimer
7847 // in the documentation and/or other materials provided with the
7848 // distribution.
7849 //    * Neither the name of Google Inc. nor the name Chromium Embedded
7850 // Framework nor the names of its contributors may be used to endorse
7851 // or promote products derived from this software without specific prior
7852 // written permission.
7853 //
7854 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7855 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7856 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7857 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7858 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7859 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7860 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7861 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
7862 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7863 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7864 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7865 
7866 import core.stdc.config;
7867 
7868 extern (C):
7869 
7870 ///
7871 // All ref-counted framework structures must include this structure first.
7872 ///
7873 struct cef_base_ref_counted_t
7874 {
7875     ///
7876     // Size of the data structure.
7877     ///
7878 
7879     ///
7880     // Called to increment the reference count for the object. Should be called
7881     // for every new copy of a pointer to a given object.
7882     ///
7883 
7884     ///
7885     // Called to decrement the reference count for the object. If the reference
7886     alias size_t = c_ulong;
7887     size_t size;
7888     extern(System) void function (cef_base_ref_counted_t* self) nothrow add_ref;
7889     // count falls to 0 the object should self-delete. Returns true (1) if the
7890     // resulting reference count is 0.
7891     ///
7892     extern(System) int function (cef_base_ref_counted_t* self) nothrow release;
7893 
7894     ///
7895     // Returns true (1) if the current reference count is 1.
7896     ///
7897     extern(System) int function (cef_base_ref_counted_t* self) nothrow has_one_ref;
7898 
7899     ///
7900     // Returns true (1) if the current reference count is at least 1.
7901     ///
7902     extern(System) int function (cef_base_ref_counted_t* self) nothrow has_at_least_one_ref;
7903 }
7904 
7905 
7906 
7907 ///
7908 // All scoped framework structures must include this structure first.
7909 ///
7910 struct cef_base_scoped_t
7911 {
7912     ///
7913     // Size of the data structure.
7914     ///
7915     size_t size;
7916 
7917     ///
7918     // Called to delete this object. May be NULL if the object is not owned.
7919     ///
7920     extern(System) void function (cef_base_scoped_t* self) nothrow del;
7921 }
7922 
7923 
7924 
7925 // Check that the structure |s|, which is defined with a size_t member at the
7926 // top, is large enough to contain the specified member |f|.
7927 
7928 
7929 
7930 
7931 // CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_
7932 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
7933 //
7934 // Redistribution and use in source and binary forms, with or without
7935 // modification, are permitted provided that the following conditions are
7936 // met:
7937 //
7938 //    * Redistributions of source code must retain the above copyright
7939 // notice, this list of conditions and the following disclaimer.
7940 //    * Redistributions in binary form must reproduce the above
7941 // copyright notice, this list of conditions and the following disclaimer
7942 // in the documentation and/or other materials provided with the
7943 // distribution.
7944 //    * Neither the name of Google Inc. nor the name Chromium Embedded
7945 // Framework nor the names of its contributors may be used to endorse
7946 // or promote products derived from this software without specific prior
7947 // written permission.
7948 //
7949 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7950 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7951 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7952 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7953 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7954 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7955 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7956 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
7957 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7958 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7959 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7960 //
7961 // ---------------------------------------------------------------------------
7962 //
7963 // This file was generated by the CEF translator tool and should not edited
7964 // by hand. See the translator.README.txt file in the tools directory for
7965 // more information.
7966 //
7967 // $hash=13ba2d807f2c1ac3adfc65f2bdb269baecba57ec$
7968 //
7969 
7970 import core.stdc.config;
7971 
7972 extern (C):
7973 
7974 
7975 
7976 ///
7977 /// Structure used to represent a browser. When used in the browser process the
7978 /// functions of this structure may be called on any thread unless otherwise
7979 /// indicated in the comments. When used in the render process the functions of
7980 /// this structure may only be called on the main thread.
7981 ///
7982 struct cef_browser_t
7983 {
7984     ///
7985     /// Base structure.
7986     ///
7987 
7988     ///
7989     /// True if this object is currently valid. This will return false (0) after
7990     /// cef_life_span_handler_t::OnBeforeClose is called.
7991     cef_base_ref_counted_t base;
7992     ///
7993     extern(System) int function (cef_browser_t* self) nothrow is_valid;
7994 
7995     ///
7996     /// Returns the browser host object. This function can only be called in the
7997     /// browser process.
7998     ///
7999     extern(System) cef_browser_host_t* function (cef_browser_t* self) nothrow get_host;
8000 
8001     ///
8002     /// Returns true (1) if the browser can navigate backwards.
8003     ///
8004     extern(System) int function (cef_browser_t* self) nothrow can_go_back;
8005 
8006     ///
8007     /// Navigate backwards.
8008     ///
8009     extern(System) void function (cef_browser_t* self) nothrow go_back;
8010 
8011     ///
8012     /// Returns true (1) if the browser can navigate forwards.
8013     ///
8014     extern(System) int function (cef_browser_t* self) nothrow can_go_forward;
8015 
8016     ///
8017     /// Navigate forwards.
8018     ///
8019     extern(System) void function (cef_browser_t* self) nothrow go_forward;
8020 
8021     ///
8022     /// Returns true (1) if the browser is currently loading.
8023     ///
8024     extern(System) int function (cef_browser_t* self) nothrow is_loading;
8025 
8026     ///
8027     /// Reload the current page.
8028     ///
8029     extern(System) void function (cef_browser_t* self) nothrow reload;
8030 
8031     ///
8032     /// Reload the current page ignoring any cached data.
8033     ///
8034     extern(System) void function (cef_browser_t* self) nothrow reload_ignore_cache;
8035 
8036     ///
8037     /// Stop loading the page.
8038     ///
8039     extern(System) void function (cef_browser_t* self) nothrow stop_load;
8040 
8041     ///
8042     /// Returns the globally unique identifier for this browser. This value is
8043     /// also used as the tabId for extension APIs.
8044     ///
8045     extern(System) int function (cef_browser_t* self) nothrow get_identifier;
8046 
8047     ///
8048     /// Returns true (1) if this object is pointing to the same handle as |that|
8049     /// object.
8050     ///
8051     extern(System) int function (cef_browser_t* self, cef_browser_t* that) nothrow is_same;
8052 
8053     ///
8054     /// Returns true (1) if the browser is a popup.
8055     ///
8056     extern(System) int function (cef_browser_t* self) nothrow is_popup;
8057 
8058     ///
8059     /// Returns true (1) if a document has been loaded in the browser.
8060     ///
8061     extern(System) int function (cef_browser_t* self) nothrow has_document;
8062 
8063     ///
8064     /// Returns the main (top-level) frame for the browser. In the browser process
8065     /// this will return a valid object until after
8066     /// cef_life_span_handler_t::OnBeforeClose is called. In the renderer process
8067     /// this will return NULL if the main frame is hosted in a different renderer
8068     /// process (e.g. for cross-origin sub-frames). The main frame object will
8069     /// change during cross-origin navigation or re-navigation after renderer
8070     /// process termination (due to crashes, etc).
8071     ///
8072     extern(System) cef_frame_t* function (cef_browser_t* self) nothrow get_main_frame;
8073 
8074     ///
8075     /// Returns the focused frame for the browser.
8076     ///
8077     extern(System) cef_frame_t* function (cef_browser_t* self) nothrow get_focused_frame;
8078 
8079     ///
8080     /// Returns the frame with the specified identifier, or NULL if not found.
8081     ///
8082     extern(System) cef_frame_t* function (
8083         cef_browser_t* self,
8084         long identifier) nothrow get_frame_byident;
8085 
8086     ///
8087     /// Returns the frame with the specified name, or NULL if not found.
8088     ///
8089     extern(System) cef_frame_t* function (
8090         cef_browser_t* self,
8091         const(cef_string_t)* name) nothrow get_frame;
8092 
8093     ///
8094     /// Returns the number of frames that currently exist.
8095     ///
8096     extern(System) size_t function (cef_browser_t* self) nothrow get_frame_count;
8097 
8098     ///
8099     /// Returns the identifiers of all existing frames.
8100     ///
8101     extern(System) void function (
8102         cef_browser_t* self,
8103         size_t* identifiersCount,
8104         long* identifiers) nothrow get_frame_identifiers;
8105 
8106     ///
8107     /// Returns the names of all existing frames.
8108     ///
8109     extern(System) void function (
8110         cef_browser_t* self,
8111         cef_string_list_t names) nothrow get_frame_names;
8112 }
8113 
8114 
8115 
8116 ///
8117 /// Callback structure for cef_browser_host_t::RunFileDialog. The functions of
8118 /// this structure will be called on the browser process UI thread.
8119 ///
8120 struct cef_run_file_dialog_callback_t
8121 {
8122     ///
8123     /// Base structure.
8124     ///
8125     cef_base_ref_counted_t base;
8126 
8127     ///
8128     /// Called asynchronously after the file dialog is dismissed. |file_paths|
8129     /// will be a single value or a list of values depending on the dialog mode.
8130     /// If the selection was cancelled |file_paths| will be NULL.
8131     ///
8132     extern(System) void function (
8133         cef_run_file_dialog_callback_t* self,
8134         cef_string_list_t file_paths) nothrow on_file_dialog_dismissed;
8135 }
8136 
8137 
8138 
8139 ///
8140 /// Callback structure for cef_browser_host_t::GetNavigationEntries. The
8141 /// functions of this structure will be called on the browser process UI thread.
8142 ///
8143 struct cef_navigation_entry_visitor_t
8144 {
8145     ///
8146     /// Base structure.
8147     ///
8148     cef_base_ref_counted_t base;
8149 
8150     ///
8151     /// Method that will be executed. Do not keep a reference to |entry| outside
8152     /// of this callback. Return true (1) to continue visiting entries or false
8153     /// (0) to stop. |current| is true (1) if this entry is the currently loaded
8154     /// navigation entry. |index| is the 0-based index of this entry and |total|
8155     /// is the total number of entries.
8156     ///
8157     extern(System) int function (
8158         cef_navigation_entry_visitor_t* self,
8159         cef_navigation_entry_t* entry,
8160         int current,
8161         int index,
8162         int total) nothrow visit;
8163 }
8164 
8165 
8166 
8167 ///
8168 /// Callback structure for cef_browser_host_t::PrintToPDF. The functions of this
8169 /// structure will be called on the browser process UI thread.
8170 ///
8171 struct cef_pdf_print_callback_t
8172 {
8173     ///
8174     /// Base structure.
8175     ///
8176     cef_base_ref_counted_t base;
8177 
8178     ///
8179     /// Method that will be executed when the PDF printing has completed. |path|
8180     /// is the output path. |ok| will be true (1) if the printing completed
8181     /// successfully or false (0) otherwise.
8182     ///
8183     extern(System) void function (
8184         cef_pdf_print_callback_t* self,
8185         const(cef_string_t)* path,
8186         int ok) nothrow on_pdf_print_finished;
8187 }
8188 
8189 
8190 
8191 ///
8192 /// Callback structure for cef_browser_host_t::DownloadImage. The functions of
8193 /// this structure will be called on the browser process UI thread.
8194 ///
8195 struct cef_download_image_callback_t
8196 {
8197     ///
8198     /// Base structure.
8199     ///
8200     cef_base_ref_counted_t base;
8201 
8202     ///
8203     /// Method that will be executed when the image download has completed.
8204     /// |image_url| is the URL that was downloaded and |http_status_code| is the
8205     /// resulting HTTP status code. |image| is the resulting image, possibly at
8206     /// multiple scale factors, or NULL if the download failed.
8207     ///
8208     extern(System) void function (
8209         cef_download_image_callback_t* self,
8210         const(cef_string_t)* image_url,
8211         int http_status_code,
8212         cef_image_t* image) nothrow on_download_image_finished;
8213 }
8214 
8215 
8216 
8217 ///
8218 /// Structure used to represent the browser process aspects of a browser. The
8219 /// functions of this structure can only be called in the browser process. They
8220 /// may be called on any thread in that process unless otherwise indicated in
8221 /// the comments.
8222 ///
8223 struct cef_browser_host_t
8224 {
8225     ///
8226     /// Base structure.
8227     ///
8228     cef_base_ref_counted_t base;
8229 
8230     ///
8231     /// Returns the hosted browser object.
8232     ///
8233     extern(System) cef_browser_t* function (cef_browser_host_t* self) nothrow get_browser;
8234 
8235     ///
8236     /// Request that the browser close. The JavaScript 'onbeforeunload' event will
8237     /// be fired. If |force_close| is false (0) the event handler, if any, will be
8238     /// allowed to prompt the user and the user can optionally cancel the close.
8239     /// If |force_close| is true (1) the prompt will not be displayed and the
8240     /// close will proceed. Results in a call to
8241     /// cef_life_span_handler_t::do_close() if the event handler allows the close
8242     /// or if |force_close| is true (1). See cef_life_span_handler_t::do_close()
8243     /// documentation for additional usage information.
8244     ///
8245     extern(System) void function (cef_browser_host_t* self, int force_close) nothrow close_browser;
8246 
8247     ///
8248     /// Helper for closing a browser. Call this function from the top-level window
8249     /// close handler (if any). Internally this calls CloseBrowser(false (0)) if
8250     /// the close has not yet been initiated. This function returns false (0)
8251     /// while the close is pending and true (1) after the close has completed. See
8252     /// close_browser() and cef_life_span_handler_t::do_close() documentation for
8253     /// additional usage information. This function must be called on the browser
8254     /// process UI thread.
8255     ///
8256     extern(System) int function (cef_browser_host_t* self) nothrow try_close_browser;
8257 
8258     ///
8259     /// Set whether the browser is focused.
8260     ///
8261     extern(System) void function (cef_browser_host_t* self, int focus) nothrow set_focus;
8262 
8263     ///
8264     /// Retrieve the window handle (if any) for this browser. If this browser is
8265     /// wrapped in a cef_browser_view_t this function should be called on the
8266     /// browser process UI thread and it will return the handle for the top-level
8267     /// native window.
8268     ///
8269     extern(System) c_ulong function (cef_browser_host_t* self) nothrow get_window_handle;
8270 
8271     ///
8272     /// Retrieve the window handle (if any) of the browser that opened this
8273     /// browser. Will return NULL for non-popup browsers or if this browser is
8274     /// wrapped in a cef_browser_view_t. This function can be used in combination
8275     /// with custom handling of modal windows.
8276     ///
8277     extern(System) c_ulong function (cef_browser_host_t* self) nothrow get_opener_window_handle;
8278 
8279     ///
8280     /// Returns true (1) if this browser is wrapped in a cef_browser_view_t.
8281     ///
8282     extern(System) int function (cef_browser_host_t* self) nothrow has_view;
8283 
8284     ///
8285     /// Returns the client for this browser.
8286     ///
8287     extern(System) cef_client_t* function (cef_browser_host_t* self) nothrow get_client;
8288 
8289     ///
8290     /// Returns the request context for this browser.
8291     ///
8292     extern(System) cef_request_context_t* function (
8293         cef_browser_host_t* self) nothrow get_request_context;
8294 
8295     ///
8296     /// Returns true (1) if this browser can execute the specified zoom command.
8297     /// This function can only be called on the UI thread.
8298     ///
8299     extern(System) int function (
8300         cef_browser_host_t* self,
8301         cef_zoom_command_t command) nothrow can_zoom;
8302 
8303     ///
8304     /// Execute a zoom command in this browser. If called on the UI thread the
8305     /// change will be applied immediately. Otherwise, the change will be applied
8306     /// asynchronously on the UI thread.
8307     ///
8308     extern(System) void function (cef_browser_host_t* self, cef_zoom_command_t command) nothrow zoom;
8309 
8310     ///
8311     /// Get the default zoom level. This value will be 0.0 by default but can be
8312     /// configured with the Chrome runtime. This function can only be called on
8313     /// the UI thread.
8314     ///
8315     extern(System) double function (cef_browser_host_t* self) nothrow get_default_zoom_level;
8316 
8317     ///
8318     /// Get the current zoom level. This function can only be called on the UI
8319     /// thread.
8320     ///
8321     extern(System) double function (cef_browser_host_t* self) nothrow get_zoom_level;
8322 
8323     ///
8324     /// Change the zoom level to the specified value. Specify 0.0 to reset the
8325     /// zoom level to the default. If called on the UI thread the change will be
8326     /// applied immediately. Otherwise, the change will be applied asynchronously
8327     /// on the UI thread.
8328     ///
8329     extern(System) void function (cef_browser_host_t* self, double zoomLevel) nothrow set_zoom_level;
8330 
8331     ///
8332     /// Call to run a file chooser dialog. Only a single file chooser dialog may
8333     /// be pending at any given time. |mode| represents the type of dialog to
8334     /// display. |title| to the title to be used for the dialog and may be NULL to
8335     /// show the default title ("Open" or "Save" depending on the mode).
8336     /// |default_file_path| is the path with optional directory and/or file name
8337     /// component that will be initially selected in the dialog. |accept_filters|
8338     /// are used to restrict the selectable file types and may any combination of
8339     /// (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b)
8340     /// individual file extensions (e.g. ".txt" or ".png"), or (c) combined
8341     /// description and file extension delimited using "|" and ";" (e.g. "Image
8342     /// Types|.png;.gif;.jpg"). |callback| will be executed after the dialog is
8343     /// dismissed or immediately if another dialog is already pending. The dialog
8344     /// will be initiated asynchronously on the UI thread.
8345     ///
8346     extern(System) void function (
8347         cef_browser_host_t* self,
8348         cef_file_dialog_mode_t mode,
8349         const(cef_string_t)* title,
8350         const(cef_string_t)* default_file_path,
8351         cef_string_list_t accept_filters,
8352         cef_run_file_dialog_callback_t* callback) nothrow run_file_dialog;
8353 
8354     ///
8355     /// Download the file at |url| using cef_download_handler_t.
8356     ///
8357     extern(System) void function (
8358         cef_browser_host_t* self,
8359         const(cef_string_t)* url) nothrow start_download;
8360 
8361     ///
8362     /// Download |image_url| and execute |callback| on completion with the images
8363     /// received from the renderer. If |is_favicon| is true (1) then cookies are
8364     /// not sent and not accepted during download. Images with density independent
8365     /// pixel (DIP) sizes larger than |max_image_size| are filtered out from the
8366     /// image results. Versions of the image at different scale factors may be
8367     /// downloaded up to the maximum scale factor supported by the system. If
8368     /// there are no image results <= |max_image_size| then the smallest image is
8369     /// resized to |max_image_size| and is the only result. A |max_image_size| of
8370     /// 0 means unlimited. If |bypass_cache| is true (1) then |image_url| is
8371     /// requested from the server even if it is present in the browser cache.
8372     ///
8373     extern(System) void function (
8374         cef_browser_host_t* self,
8375         const(cef_string_t)* image_url,
8376         int is_favicon,
8377         uint max_image_size,
8378         int bypass_cache,
8379         cef_download_image_callback_t* callback) nothrow download_image;
8380 
8381     ///
8382     /// Print the current browser contents.
8383     ///
8384     extern(System) void function (cef_browser_host_t* self) nothrow print;
8385 
8386     ///
8387     /// Print the current browser contents to the PDF file specified by |path| and
8388     /// execute |callback| on completion. The caller is responsible for deleting
8389     /// |path| when done. For PDF printing to work on Linux you must implement the
8390     /// cef_print_handler_t::GetPdfPaperSize function.
8391     ///
8392     extern(System) void function (
8393         cef_browser_host_t* self,
8394         const(cef_string_t)* path,
8395         const(cef_pdf_print_settings_t)* settings,
8396         cef_pdf_print_callback_t* callback) nothrow print_to_pdf;
8397 
8398     ///
8399     /// Search for |searchText|. |forward| indicates whether to search forward or
8400     /// backward within the page. |matchCase| indicates whether the search should
8401     /// be case-sensitive. |findNext| indicates whether this is the first request
8402     /// or a follow-up. The search will be restarted if |searchText| or
8403     /// |matchCase| change. The search will be stopped if |searchText| is NULL.
8404     /// The cef_find_handler_t instance, if any, returned via
8405     /// cef_client_t::GetFindHandler will be called to report find results.
8406     ///
8407     extern(System) void function (
8408         cef_browser_host_t* self,
8409         const(cef_string_t)* searchText,
8410         int forward,
8411         int matchCase,
8412         int findNext) nothrow find;
8413 
8414     ///
8415     /// Cancel all searches that are currently going on.
8416     ///
8417     extern(System) void function (cef_browser_host_t* self, int clearSelection) nothrow stop_finding;
8418 
8419     ///
8420     /// Open developer tools (DevTools) in its own browser. The DevTools browser
8421     /// will remain associated with this browser. If the DevTools browser is
8422     /// already open then it will be focused, in which case the |windowInfo|,
8423     /// |client| and |settings| parameters will be ignored. If
8424     /// |inspect_element_at| is non-NULL then the element at the specified (x,y)
8425     /// location will be inspected. The |windowInfo| parameter will be ignored if
8426     /// this browser is wrapped in a cef_browser_view_t.
8427     ///
8428     extern(System) void function (
8429         cef_browser_host_t* self,
8430         const(cef_window_info_t)* windowInfo,
8431         cef_client_t* client,
8432         const(cef_browser_settings_t)* settings,
8433         const(cef_point_t)* inspect_element_at) nothrow show_dev_tools;
8434 
8435     ///
8436     /// Explicitly close the associated DevTools browser, if any.
8437     ///
8438     extern(System) void function (cef_browser_host_t* self) nothrow close_dev_tools;
8439 
8440     ///
8441     /// Returns true (1) if this browser currently has an associated DevTools
8442     /// browser. Must be called on the browser process UI thread.
8443     ///
8444     extern(System) int function (cef_browser_host_t* self) nothrow has_dev_tools;
8445 
8446     ///
8447     /// Send a function call message over the DevTools protocol. |message| must be
8448     /// a UTF8-encoded JSON dictionary that contains "id" (int), "function"
8449     /// (string) and "params" (dictionary, optional) values. See the DevTools
8450     /// protocol documentation at https://chromedevtools.github.io/devtools-
8451     /// protocol/ for details of supported functions and the expected "params"
8452     /// dictionary contents. |message| will be copied if necessary. This function
8453     /// will return true (1) if called on the UI thread and the message was
8454     /// successfully submitted for validation, otherwise false (0). Validation
8455     /// will be applied asynchronously and any messages that fail due to
8456     /// formatting errors or missing parameters may be discarded without
8457     /// notification. Prefer ExecuteDevToolsMethod if a more structured approach
8458     /// to message formatting is desired.
8459     ///
8460     /// Every valid function call will result in an asynchronous function result
8461     /// or error message that references the sent message "id". Event messages are
8462     /// received while notifications are enabled (for example, between function
8463     /// calls for "Page.enable" and "Page.disable"). All received messages will be
8464     /// delivered to the observer(s) registered with AddDevToolsMessageObserver.
8465     /// See cef_dev_tools_message_observer_t::OnDevToolsMessage documentation for
8466     /// details of received message contents.
8467     ///
8468     /// Usage of the SendDevToolsMessage, ExecuteDevToolsMethod and
8469     /// AddDevToolsMessageObserver functions does not require an active DevTools
8470     /// front-end or remote-debugging session. Other active DevTools sessions will
8471     /// continue to function independently. However, any modification of global
8472     /// browser state by one session may not be reflected in the UI of other
8473     /// sessions.
8474     ///
8475     /// Communication with the DevTools front-end (when displayed) can be logged
8476     /// for development purposes by passing the `--devtools-protocol-log-
8477     /// file=<path>` command-line flag.
8478     ///
8479     extern(System) int function (
8480         cef_browser_host_t* self,
8481         const(void)* message,
8482         size_t message_size) nothrow send_dev_tools_message;
8483 
8484     ///
8485     /// Execute a function call over the DevTools protocol. This is a more
8486     /// structured version of SendDevToolsMessage. |message_id| is an incremental
8487     /// number that uniquely identifies the message (pass 0 to have the next
8488     /// number assigned automatically based on previous values). |function| is the
8489     /// function name. |params| are the function parameters, which may be NULL.
8490     /// See the DevTools protocol documentation (linked above) for details of
8491     /// supported functions and the expected |params| dictionary contents. This
8492     /// function will return the assigned message ID if called on the UI thread
8493     /// and the message was successfully submitted for validation, otherwise 0.
8494     /// See the SendDevToolsMessage documentation for additional usage
8495     /// information.
8496     ///
8497     extern(System) int function (
8498         cef_browser_host_t* self,
8499         int message_id,
8500         const(cef_string_t)* method,
8501         cef_dictionary_value_t* params) nothrow execute_dev_tools_method;
8502 
8503     ///
8504     /// Add an observer for DevTools protocol messages (function results and
8505     /// events). The observer will remain registered until the returned
8506     /// Registration object is destroyed. See the SendDevToolsMessage
8507     /// documentation for additional usage information.
8508     ///
8509     extern(System) cef_registration_t* function (
8510         cef_browser_host_t* self,
8511         cef_dev_tools_message_observer_t* observer) nothrow add_dev_tools_message_observer;
8512 
8513     ///
8514     /// Retrieve a snapshot of current navigation entries as values sent to the
8515     /// specified visitor. If |current_only| is true (1) only the current
8516     /// navigation entry will be sent, otherwise all navigation entries will be
8517     /// sent.
8518     ///
8519     extern(System) void function (
8520         cef_browser_host_t* self,
8521         cef_navigation_entry_visitor_t* visitor,
8522         int current_only) nothrow get_navigation_entries;
8523 
8524     ///
8525     /// If a misspelled word is currently selected in an editable node calling
8526     /// this function will replace it with the specified |word|.
8527     ///
8528     extern(System) void function (
8529         cef_browser_host_t* self,
8530         const(cef_string_t)* word) nothrow replace_misspelling;
8531 
8532     ///
8533     /// Add the specified |word| to the spelling dictionary.
8534     ///
8535     extern(System) void function (
8536         cef_browser_host_t* self,
8537         const(cef_string_t)* word) nothrow add_word_to_dictionary;
8538 
8539     ///
8540     /// Returns true (1) if window rendering is disabled.
8541     ///
8542     extern(System) int function (cef_browser_host_t* self) nothrow is_window_rendering_disabled;
8543 
8544     ///
8545     /// Notify the browser that the widget has been resized. The browser will
8546     /// first call cef_render_handler_t::GetViewRect to get the new size and then
8547     /// call cef_render_handler_t::OnPaint asynchronously with the updated
8548     /// regions. This function is only used when window rendering is disabled.
8549     ///
8550     extern(System) void function (cef_browser_host_t* self) nothrow was_resized;
8551 
8552     ///
8553     /// Notify the browser that it has been hidden or shown. Layouting and
8554     /// cef_render_handler_t::OnPaint notification will stop when the browser is
8555     /// hidden. This function is only used when window rendering is disabled.
8556     ///
8557     extern(System) void function (cef_browser_host_t* self, int hidden) nothrow was_hidden;
8558 
8559     ///
8560     /// Send a notification to the browser that the screen info has changed. The
8561     /// browser will then call cef_render_handler_t::GetScreenInfo to update the
8562     /// screen information with the new values. This simulates moving the webview
8563     /// window from one display to another, or changing the properties of the
8564     /// current display. This function is only used when window rendering is
8565     /// disabled.
8566     ///
8567     extern(System) void function (cef_browser_host_t* self) nothrow notify_screen_info_changed;
8568 
8569     ///
8570     /// Invalidate the view. The browser will call cef_render_handler_t::OnPaint
8571     /// asynchronously. This function is only used when window rendering is
8572     /// disabled.
8573     ///
8574     extern(System) void function (
8575         cef_browser_host_t* self,
8576         cef_paint_element_type_t type) nothrow invalidate;
8577 
8578     ///
8579     /// Issue a BeginFrame request to Chromium.  Only valid when
8580     /// cef_window_tInfo::external_begin_frame_enabled is set to true (1).
8581     ///
8582     extern(System) void function (cef_browser_host_t* self) nothrow send_external_begin_frame;
8583 
8584     ///
8585     /// Send a key event to the browser.
8586     ///
8587     extern(System) void function (
8588         cef_browser_host_t* self,
8589         const(cef_key_event_t)* event) nothrow send_key_event;
8590 
8591     ///
8592     /// Send a mouse click event to the browser. The |x| and |y| coordinates are
8593     /// relative to the upper-left corner of the view.
8594     ///
8595     extern(System) void function (
8596         cef_browser_host_t* self,
8597         const(cef_mouse_event_t)* event,
8598         cef_mouse_button_type_t type,
8599         int mouseUp,
8600         int clickCount) nothrow send_mouse_click_event;
8601 
8602     ///
8603     /// Send a mouse move event to the browser. The |x| and |y| coordinates are
8604     /// relative to the upper-left corner of the view.
8605     ///
8606     extern(System) void function (
8607         cef_browser_host_t* self,
8608         const(cef_mouse_event_t)* event,
8609         int mouseLeave) nothrow send_mouse_move_event;
8610 
8611     ///
8612     /// Send a mouse wheel event to the browser. The |x| and |y| coordinates are
8613     /// relative to the upper-left corner of the view. The |deltaX| and |deltaY|
8614     /// values represent the movement delta in the X and Y directions
8615     /// respectively. In order to scroll inside select popups with window
8616     /// rendering disabled cef_render_handler_t::GetScreenPoint should be
8617     /// implemented properly.
8618     ///
8619     extern(System) void function (
8620         cef_browser_host_t* self,
8621         const(cef_mouse_event_t)* event,
8622         int deltaX,
8623         int deltaY) nothrow send_mouse_wheel_event;
8624 
8625     ///
8626     /// Send a touch event to the browser for a windowless browser.
8627     ///
8628     extern(System) void function (
8629         cef_browser_host_t* self,
8630         const(cef_touch_event_t)* event) nothrow send_touch_event;
8631 
8632     ///
8633     /// Send a capture lost event to the browser.
8634     ///
8635     extern(System) void function (cef_browser_host_t* self) nothrow send_capture_lost_event;
8636 
8637     ///
8638     /// Notify the browser that the window hosting it is about to be moved or
8639     /// resized. This function is only used on Windows and Linux.
8640     ///
8641     extern(System) void function (cef_browser_host_t* self) nothrow notify_move_or_resize_started;
8642 
8643     ///
8644     /// Returns the maximum rate in frames per second (fps) that
8645     /// cef_render_handler_t::OnPaint will be called for a windowless browser. The
8646     /// actual fps may be lower if the browser cannot generate frames at the
8647     /// requested rate. The minimum value is 1 and the maximum value is 60
8648     /// (default 30). This function can only be called on the UI thread.
8649     ///
8650     extern(System) int function (cef_browser_host_t* self) nothrow get_windowless_frame_rate;
8651 
8652     ///
8653     /// Set the maximum rate in frames per second (fps) that
8654     /// cef_render_handler_t:: OnPaint will be called for a windowless browser.
8655     /// The actual fps may be lower if the browser cannot generate frames at the
8656     /// requested rate. The minimum value is 1 and the maximum value is 60
8657     /// (default 30). Can also be set at browser creation via
8658     /// cef_browser_tSettings.windowless_frame_rate.
8659     ///
8660     extern(System) void function (
8661         cef_browser_host_t* self,
8662         int frame_rate) nothrow set_windowless_frame_rate;
8663 
8664     ///
8665     /// Begins a new composition or updates the existing composition. Blink has a
8666     /// special node (a composition node) that allows the input function to change
8667     /// text without affecting other DOM nodes. |text| is the optional text that
8668     /// will be inserted into the composition node. |underlines| is an optional
8669     /// set of ranges that will be underlined in the resulting text.
8670     /// |replacement_range| is an optional range of the existing text that will be
8671     /// replaced. |selection_range| is an optional range of the resulting text
8672     /// that will be selected after insertion or replacement. The
8673     /// |replacement_range| value is only used on OS X.
8674     ///
8675     /// This function may be called multiple times as the composition changes.
8676     /// When the client is done making changes the composition should either be
8677     /// canceled or completed. To cancel the composition call
8678     /// ImeCancelComposition. To complete the composition call either
8679     /// ImeCommitText or ImeFinishComposingText. Completion is usually signaled
8680     /// when:
8681     ///
8682     /// 1. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR
8683     ///    flag (on Windows), or;
8684     /// 2. The client receives a "commit" signal of GtkIMContext (on Linux), or;
8685     /// 3. insertText of NSTextInput is called (on Mac).
8686     ///
8687     /// This function is only used when window rendering is disabled.
8688     ///
8689     extern(System) void function (
8690         cef_browser_host_t* self,
8691         const(cef_string_t)* text,
8692         size_t underlinesCount,
8693         const(cef_composition_underline_t)* underlines,
8694         const(cef_range_t)* replacement_range,
8695         const(cef_range_t)* selection_range) nothrow ime_set_composition;
8696 
8697     ///
8698     /// Completes the existing composition by optionally inserting the specified
8699     /// |text| into the composition node. |replacement_range| is an optional range
8700     /// of the existing text that will be replaced. |relative_cursor_pos| is where
8701     /// the cursor will be positioned relative to the current cursor position. See
8702     /// comments on ImeSetComposition for usage. The |replacement_range| and
8703     /// |relative_cursor_pos| values are only used on OS X. This function is only
8704     /// used when window rendering is disabled.
8705     ///
8706     extern(System) void function (
8707         cef_browser_host_t* self,
8708         const(cef_string_t)* text,
8709         const(cef_range_t)* replacement_range,
8710         int relative_cursor_pos) nothrow ime_commit_text;
8711 
8712     ///
8713     /// Completes the existing composition by applying the current composition
8714     /// node contents. If |keep_selection| is false (0) the current selection, if
8715     /// any, will be discarded. See comments on ImeSetComposition for usage. This
8716     /// function is only used when window rendering is disabled.
8717     ///
8718     extern(System) void function (
8719         cef_browser_host_t* self,
8720         int keep_selection) nothrow ime_finish_composing_text;
8721 
8722     ///
8723     /// Cancels the existing composition and discards the composition node
8724     /// contents without applying them. See comments on ImeSetComposition for
8725     /// usage. This function is only used when window rendering is disabled.
8726     ///
8727     extern(System) void function (cef_browser_host_t* self) nothrow ime_cancel_composition;
8728 
8729     ///
8730     /// Call this function when the user drags the mouse into the web view (before
8731     /// calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). |drag_data|
8732     /// should not contain file contents as this type of data is not allowed to be
8733     /// dragged into the web view. File contents can be removed using
8734     /// cef_drag_data_t::ResetFileContents (for example, if |drag_data| comes from
8735     /// cef_render_handler_t::StartDragging). This function is only used when
8736     /// window rendering is disabled.
8737     ///
8738     extern(System) void function (
8739         cef_browser_host_t* self,
8740         cef_drag_data_t* drag_data,
8741         const(cef_mouse_event_t)* event,
8742         cef_drag_operations_mask_t allowed_ops) nothrow drag_target_drag_enter;
8743 
8744     ///
8745     /// Call this function each time the mouse is moved across the web view during
8746     /// a drag operation (after calling DragTargetDragEnter and before calling
8747     /// DragTargetDragLeave/DragTargetDrop). This function is only used when
8748     /// window rendering is disabled.
8749     ///
8750     extern(System) void function (
8751         cef_browser_host_t* self,
8752         const(cef_mouse_event_t)* event,
8753         cef_drag_operations_mask_t allowed_ops) nothrow drag_target_drag_over;
8754 
8755     ///
8756     /// Call this function when the user drags the mouse out of the web view
8757     /// (after calling DragTargetDragEnter). This function is only used when
8758     /// window rendering is disabled.
8759     ///
8760     extern(System) void function (cef_browser_host_t* self) nothrow drag_target_drag_leave;
8761 
8762     ///
8763     /// Call this function when the user completes the drag operation by dropping
8764     /// the object onto the web view (after calling DragTargetDragEnter). The
8765     /// object being dropped is |drag_data|, given as an argument to the previous
8766     /// DragTargetDragEnter call. This function is only used when window rendering
8767     /// is disabled.
8768     ///
8769     extern(System) void function (
8770         cef_browser_host_t* self,
8771         const(cef_mouse_event_t)* event) nothrow drag_target_drop;
8772 
8773     ///
8774     /// Call this function when the drag operation started by a
8775     /// cef_render_handler_t::StartDragging call has ended either in a drop or by
8776     /// being cancelled. |x| and |y| are mouse coordinates relative to the upper-
8777     /// left corner of the view. If the web view is both the drag source and the
8778     /// drag target then all DragTarget* functions should be called before
8779     /// DragSource* mthods. This function is only used when window rendering is
8780     /// disabled.
8781     ///
8782     extern(System) void function (
8783         cef_browser_host_t* self,
8784         int x,
8785         int y,
8786         cef_drag_operations_mask_t op) nothrow drag_source_ended_at;
8787 
8788     ///
8789     /// Call this function when the drag operation started by a
8790     /// cef_render_handler_t::StartDragging call has completed. This function may
8791     /// be called immediately without first calling DragSourceEndedAt to cancel a
8792     /// drag operation. If the web view is both the drag source and the drag
8793     /// target then all DragTarget* functions should be called before DragSource*
8794     /// mthods. This function is only used when window rendering is disabled.
8795     ///
8796     extern(System) void function (cef_browser_host_t* self) nothrow drag_source_system_drag_ended;
8797 
8798     ///
8799     /// Returns the current visible navigation entry for this browser. This
8800     /// function can only be called on the UI thread.
8801     ///
8802     extern(System) cef_navigation_entry_t* function (
8803         cef_browser_host_t* self) nothrow get_visible_navigation_entry;
8804 
8805     ///
8806     /// Set accessibility state for all frames. |accessibility_state| may be
8807     /// default, enabled or disabled. If |accessibility_state| is STATE_DEFAULT
8808     /// then accessibility will be disabled by default and the state may be
8809     /// further controlled with the "force-renderer-accessibility" and "disable-
8810     /// renderer-accessibility" command-line switches. If |accessibility_state| is
8811     /// STATE_ENABLED then accessibility will be enabled. If |accessibility_state|
8812     /// is STATE_DISABLED then accessibility will be completely disabled.
8813     ///
8814     /// For windowed browsers accessibility will be enabled in Complete mode
8815     /// (which corresponds to kAccessibilityModeComplete in Chromium). In this
8816     /// mode all platform accessibility objects will be created and managed by
8817     /// Chromium's internal implementation. The client needs only to detect the
8818     /// screen reader and call this function appropriately. For example, on macOS
8819     /// the client can handle the @"AXEnhancedUserStructure" accessibility
8820     /// attribute to detect VoiceOver state changes and on Windows the client can
8821     /// handle WM_GETOBJECT with OBJID_CLIENT to detect accessibility readers.
8822     ///
8823     /// For windowless browsers accessibility will be enabled in TreeOnly mode
8824     /// (which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In
8825     /// this mode renderer accessibility is enabled, the full tree is computed,
8826     /// and events are passed to CefAccessibiltyHandler, but platform
8827     /// accessibility objects are not created. The client may implement platform
8828     /// accessibility objects using CefAccessibiltyHandler callbacks if desired.
8829     ///
8830     extern(System) void function (
8831         cef_browser_host_t* self,
8832         cef_state_t accessibility_state) nothrow set_accessibility_state;
8833 
8834     ///
8835     /// Enable notifications of auto resize via
8836     /// cef_display_handler_t::OnAutoResize. Notifications are disabled by
8837     /// default. |min_size| and |max_size| define the range of allowed sizes.
8838     ///
8839     extern(System) void function (
8840         cef_browser_host_t* self,
8841         int enabled,
8842         const(cef_size_t)* min_size,
8843         const(cef_size_t)* max_size) nothrow set_auto_resize_enabled;
8844 
8845     ///
8846     /// Returns the extension hosted in this browser or NULL if no extension is
8847     /// hosted. See cef_request_context_t::LoadExtension for details.
8848     ///
8849     extern(System) cef_extension_t* function (cef_browser_host_t* self) nothrow get_extension;
8850 
8851     ///
8852     /// Returns true (1) if this browser is hosting an extension background
8853     /// script. Background hosts do not have a window and are not displayable. See
8854     /// cef_request_context_t::LoadExtension for details.
8855     ///
8856     extern(System) int function (cef_browser_host_t* self) nothrow is_background_host;
8857 
8858     ///
8859     /// Set whether the browser's audio is muted.
8860     ///
8861     extern(System) void function (cef_browser_host_t* self, int mute) nothrow set_audio_muted;
8862 
8863     ///
8864     /// Returns true (1) if the browser's audio is muted.  This function can only
8865     /// be called on the UI thread.
8866     ///
8867     extern(System) int function (cef_browser_host_t* self) nothrow is_audio_muted;
8868 
8869     ///
8870     /// Returns true (1) if the renderer is currently in browser fullscreen. This
8871     /// differs from window fullscreen in that browser fullscreen is entered using
8872     /// the JavaScript Fullscreen API and modifies CSS attributes such as the
8873     /// ::backdrop pseudo-element and :fullscreen pseudo-structure. This function
8874     /// can only be called on the UI thread.
8875     ///
8876     extern(System) int function (cef_browser_host_t* self) nothrow is_fullscreen;
8877 
8878     ///
8879     /// Requests the renderer to exit browser fullscreen. In most cases exiting
8880     /// window fullscreen should also exit browser fullscreen. With the Alloy
8881     /// runtime this function should be called in response to a user action such
8882     /// as clicking the green traffic light button on MacOS
8883     /// (cef_window_delegate_t::OnWindowFullscreenTransition callback) or pressing
8884     /// the "ESC" key (cef_keyboard_handler_t::OnPreKeyEvent callback). With the
8885     /// Chrome runtime these standard exit actions are handled internally but
8886     /// new/additional user actions can use this function. Set |will_cause_resize|
8887     /// to true (1) if exiting browser fullscreen will cause a view resize.
8888     ///
8889     extern(System) void function (
8890         cef_browser_host_t* self,
8891         int will_cause_resize) nothrow exit_fullscreen;
8892 }
8893 
8894 
8895 
8896 ///
8897 /// Create a new browser using the window parameters specified by |windowInfo|.
8898 /// All values will be copied internally and the actual window (if any) will be
8899 /// created on the UI thread. If |request_context| is NULL the global request
8900 /// context will be used. This function can be called on any browser process
8901 /// thread and will not block. The optional |extra_info| parameter provides an
8902 /// opportunity to specify extra information specific to the created browser
8903 /// that will be passed to cef_render_process_handler_t::on_browser_created() in
8904 /// the render process.
8905 ///
8906 int cef_browser_host_create_browser (
8907     const(cef_window_info_t)* windowInfo,
8908     cef_client_t* client,
8909     const(cef_string_t)* url,
8910     const(cef_browser_settings_t)* settings,
8911     cef_dictionary_value_t* extra_info,
8912     cef_request_context_t* request_context);
8913 
8914 ///
8915 /// Create a new browser using the window parameters specified by |windowInfo|.
8916 /// If |request_context| is NULL the global request context will be used. This
8917 /// function can only be called on the browser process UI thread. The optional
8918 /// |extra_info| parameter provides an opportunity to specify extra information
8919 /// specific to the created browser that will be passed to
8920 /// cef_render_process_handler_t::on_browser_created() in the render process.
8921 ///
8922 cef_browser_t* cef_browser_host_create_browser_sync (
8923     const(cef_window_info_t)* windowInfo,
8924     cef_client_t* client,
8925     const(cef_string_t)* url,
8926     const(cef_browser_settings_t)* settings,
8927     cef_dictionary_value_t* extra_info,
8928     cef_request_context_t* request_context);
8929 
8930 // CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
8931 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
8932 //
8933 // Redistribution and use in source and binary forms, with or without
8934 // modification, are permitted provided that the following conditions are
8935 // met:
8936 //
8937 //    * Redistributions of source code must retain the above copyright
8938 // notice, this list of conditions and the following disclaimer.
8939 //    * Redistributions in binary form must reproduce the above
8940 // copyright notice, this list of conditions and the following disclaimer
8941 // in the documentation and/or other materials provided with the
8942 // distribution.
8943 //    * Neither the name of Google Inc. nor the name Chromium Embedded
8944 // Framework nor the names of its contributors may be used to endorse
8945 // or promote products derived from this software without specific prior
8946 // written permission.
8947 //
8948 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
8949 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
8950 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8951 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8952 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8953 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8954 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
8955 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8956 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8957 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8958 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8959 //
8960 // ---------------------------------------------------------------------------
8961 //
8962 // This file was generated by the CEF translator tool and should not edited
8963 // by hand. See the translator.README.txt file in the tools directory for
8964 // more information.
8965 //
8966 // $hash=a146316e075450f0a6f37cb45d14e15e0ac7be08$
8967 //
8968 
8969 extern (C):
8970 
8971 ///
8972 /// Structure used to implement browser process callbacks. The functions of this
8973 /// structure will be called on the browser process main thread unless otherwise
8974 /// indicated.
8975 ///
8976 struct cef_browser_process_handler_t
8977 {
8978     ///
8979     /// Base structure.
8980     ///
8981 
8982     ///
8983     /// Provides an opportunity to register custom preferences prior to global and
8984     /// request context initialization.
8985     ///
8986     /// If |type| is CEF_PREFERENCES_TYPE_GLOBAL the registered preferences can be
8987     /// accessed via cef_preference_manager_t::GetGlobalPreferences after
8988     /// OnContextInitialized is called. Global preferences are registered a single
8989     /// time at application startup. See related cef_settings_t.cache_path and
8990     cef_base_ref_counted_t base;
8991     /// cef_settings_t.persist_user_preferences configuration.
8992     ///
8993     /// If |type| is CEF_PREFERENCES_TYPE_REQUEST_CONTEXT the preferences can be
8994     /// accessed via the cef_request_context_t after
8995     /// cef_request_context_handler_t::OnRequestContextInitialized is called.
8996     /// Request context preferences are registered each time a new
8997     /// cef_request_context_t is created. It is intended but not required that all
8998     /// request contexts have the same registered preferences. See related
8999     /// cef_request_context_settings_t.cache_path and
9000     /// cef_request_context_settings_t.persist_user_preferences configuration.
9001     ///
9002     /// Do not keep a reference to the |registrar| object. This function is called
9003     /// on the browser process UI thread.
9004     ///
9005     extern(System) void function (
9006         cef_browser_process_handler_t* self,
9007         cef_preferences_type_t type,
9008         cef_preference_registrar_t* registrar) nothrow on_register_custom_preferences;
9009 
9010     ///
9011     /// Called on the browser process UI thread immediately after the CEF context
9012     /// has been initialized.
9013     ///
9014     extern(System) void function (
9015         cef_browser_process_handler_t* self) nothrow on_context_initialized;
9016 
9017     ///
9018     /// Called before a child process is launched. Will be called on the browser
9019     /// process UI thread when launching a render process and on the browser
9020     /// process IO thread when launching a GPU process. Provides an opportunity to
9021     /// modify the child process command line. Do not keep a reference to
9022     /// |command_line| outside of this function.
9023     ///
9024     extern(System) void function (
9025         cef_browser_process_handler_t* self,
9026         cef_command_line_t* command_line) nothrow on_before_child_process_launch;
9027 
9028     ///
9029     /// Called from any thread when work has been scheduled for the browser
9030     /// process main (UI) thread. This callback is used in combination with
9031     /// cef_settings_t.external_message_pump and cef_do_message_loop_work() in
9032     /// cases where the CEF message loop must be integrated into an existing
9033     /// application message loop (see additional comments and warnings on
9034     /// CefDoMessageLoopWork). This callback should schedule a
9035     /// cef_do_message_loop_work() call to happen on the main (UI) thread.
9036     /// |delay_ms| is the requested delay in milliseconds. If |delay_ms| is <= 0
9037     /// then the call should happen reasonably soon. If |delay_ms| is > 0 then the
9038     /// call should be scheduled to happen after the specified delay and any
9039     /// currently pending scheduled call should be cancelled.
9040     ///
9041     extern(System) void function (
9042         cef_browser_process_handler_t* self,
9043         long delay_ms) nothrow on_schedule_message_pump_work;
9044 
9045     ///
9046     /// Return the default client for use with a newly created browser window. If
9047     /// null is returned the browser will be unmanaged (no callbacks will be
9048     /// executed for that browser) and application shutdown will be blocked until
9049     /// the browser window is closed manually. This function is currently only
9050     /// used with the chrome runtime.
9051     ///
9052     extern(System) cef_client_t* function (
9053         cef_browser_process_handler_t* self) nothrow get_default_client;
9054 }
9055 
9056 
9057 
9058 // CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_
9059 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
9060 //
9061 // Redistribution and use in source and binary forms, with or without
9062 // modification, are permitted provided that the following conditions are
9063 // met:
9064 //
9065 //    * Redistributions of source code must retain the above copyright
9066 // notice, this list of conditions and the following disclaimer.
9067 //    * Redistributions in binary form must reproduce the above
9068 // copyright notice, this list of conditions and the following disclaimer
9069 // in the documentation and/or other materials provided with the
9070 // distribution.
9071 //    * Neither the name of Google Inc. nor the name Chromium Embedded
9072 // Framework nor the names of its contributors may be used to endorse
9073 // or promote products derived from this software without specific prior
9074 // written permission.
9075 //
9076 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9077 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9078 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9079 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9080 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9081 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9082 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9083 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9084 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9085 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9086 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9087 //
9088 // ---------------------------------------------------------------------------
9089 //
9090 // This file was generated by the CEF translator tool and should not edited
9091 // by hand. See the translator.README.txt file in the tools directory for
9092 // more information.
9093 //
9094 // $hash=4fd98ff68ecb42677c3344b75e26d4787161b0d2$
9095 //
9096 
9097 extern (C):
9098 
9099 ///
9100 /// Generic callback structure used for asynchronous continuation.
9101 ///
9102 struct cef_callback_t
9103 {
9104     ///
9105     /// Base structure.
9106     ///
9107 
9108     ///
9109     /// Continue processing.
9110     ///
9111 
9112     ///
9113     /// Cancel processing.
9114     ///
9115 
9116     ///
9117     /// Generic callback structure used for asynchronous completion.
9118     ///
9119 
9120     ///
9121     /// Base structure.
9122     ///
9123 
9124     ///
9125     /// Method that will be called once the task is complete.
9126     ///
9127 
9128     // CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_
9129     cef_base_ref_counted_t base;
9130     extern(System) void function (cef_callback_t* self) nothrow cont;
9131     extern(System) void function (cef_callback_t* self) nothrow cancel;
9132 }
9133 
9134 
9135 
9136 struct cef_completion_callback_t
9137 {
9138     cef_base_ref_counted_t base;
9139     extern(System) void function (cef_completion_callback_t* self) nothrow on_complete;
9140 }
9141 
9142 
9143 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
9144 //
9145 // Redistribution and use in source and binary forms, with or without
9146 // modification, are permitted provided that the following conditions are
9147 // met:
9148 //
9149 //    * Redistributions of source code must retain the above copyright
9150 // notice, this list of conditions and the following disclaimer.
9151 //    * Redistributions in binary form must reproduce the above
9152 // copyright notice, this list of conditions and the following disclaimer
9153 // in the documentation and/or other materials provided with the
9154 // distribution.
9155 //    * Neither the name of Google Inc. nor the name Chromium Embedded
9156 // Framework nor the names of its contributors may be used to endorse
9157 // or promote products derived from this software without specific prior
9158 // written permission.
9159 //
9160 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9161 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9162 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9163 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9164 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9165 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9166 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9167 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9168 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9169 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9170 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9171 //
9172 // ---------------------------------------------------------------------------
9173 //
9174 // This file was generated by the CEF translator tool and should not edited
9175 // by hand. See the translator.README.txt file in the tools directory for
9176 // more information.
9177 //
9178 // $hash=eb9dcb574252483dfab12834af93ba14138d4089$
9179 //
9180 
9181 extern (C):
9182 
9183 ///
9184 /// Implement this structure to provide handler implementations.
9185 ///
9186 struct cef_client_t
9187 {
9188     ///
9189     /// Base structure.
9190     ///
9191     cef_base_ref_counted_t base; ///
9192     /// Return the handler for audio rendering events.
9193     ///
9194     extern(System) cef_audio_handler_t* function (cef_client_t* self) nothrow get_audio_handler;
9195 
9196     ///
9197     /// Return the handler for commands. If no handler is provided the default
9198     /// implementation will be used.
9199     ///
9200     extern(System) cef_command_handler_t* function (cef_client_t* self) nothrow get_command_handler;
9201 
9202     ///
9203     /// Return the handler for context menus. If no handler is provided the
9204     /// default implementation will be used.
9205     ///
9206     extern(System) cef_context_menu_handler_t* function (
9207         cef_client_t* self) nothrow get_context_menu_handler;
9208 
9209     ///
9210     /// Return the handler for dialogs. If no handler is provided the default
9211     /// implementation will be used.
9212     ///
9213     extern(System) cef_dialog_handler_t* function (cef_client_t* self) nothrow get_dialog_handler;
9214 
9215     ///
9216     /// Return the handler for browser display state events.
9217     ///
9218     extern(System) cef_display_handler_t* function (cef_client_t* self) nothrow get_display_handler;
9219 
9220     ///
9221     /// Return the handler for download events. If no handler is returned
9222     /// downloads will not be allowed.
9223     ///
9224     extern(System) cef_download_handler_t* function (
9225         cef_client_t* self) nothrow get_download_handler;
9226 
9227     ///
9228     /// Return the handler for drag events.
9229     ///
9230     extern(System) cef_drag_handler_t* function (cef_client_t* self) nothrow get_drag_handler;
9231 
9232     ///
9233     /// Return the handler for find result events.
9234     ///
9235     extern(System) cef_find_handler_t* function (cef_client_t* self) nothrow get_find_handler;
9236 
9237     ///
9238     /// Return the handler for focus events.
9239     ///
9240     extern(System) cef_focus_handler_t* function (cef_client_t* self) nothrow get_focus_handler;
9241 
9242     ///
9243     /// Return the handler for events related to cef_frame_t lifespan. This
9244     /// function will be called once during cef_browser_t creation and the result
9245     /// will be cached for performance reasons.
9246     ///
9247     extern(System) cef_frame_handler_t* function (cef_client_t* self) nothrow get_frame_handler;
9248 
9249     ///
9250     /// Return the handler for permission requests.
9251     ///
9252     extern(System) cef_permission_handler_t* function (
9253         cef_client_t* self) nothrow get_permission_handler;
9254 
9255     ///
9256     /// Return the handler for JavaScript dialogs. If no handler is provided the
9257     /// default implementation will be used.
9258     ///
9259     extern(System) cef_jsdialog_handler_t* function (
9260         cef_client_t* self) nothrow get_jsdialog_handler;
9261 
9262     ///
9263     /// Return the handler for keyboard events.
9264     ///
9265     extern(System) cef_keyboard_handler_t* function (
9266         cef_client_t* self) nothrow get_keyboard_handler;
9267 
9268     ///
9269     /// Return the handler for browser life span events.
9270     ///
9271     extern(System) cef_life_span_handler_t* function (
9272         cef_client_t* self) nothrow get_life_span_handler;
9273 
9274     ///
9275     /// Return the handler for browser load status events.
9276     ///
9277     extern(System) cef_load_handler_t* function (cef_client_t* self) nothrow get_load_handler;
9278 
9279     ///
9280     /// Return the handler for printing on Linux. If a print handler is not
9281     /// provided then printing will not be supported on the Linux platform.
9282     ///
9283     extern(System) cef_print_handler_t* function (cef_client_t* self) nothrow get_print_handler;
9284 
9285     ///
9286     /// Return the handler for off-screen rendering events.
9287     ///
9288     extern(System) cef_render_handler_t* function (cef_client_t* self) nothrow get_render_handler;
9289 
9290     ///
9291     /// Return the handler for browser request events.
9292     ///
9293     extern(System) cef_request_handler_t* function (cef_client_t* self) nothrow get_request_handler;
9294 
9295     ///
9296     /// Called when a new message is received from a different process. Return
9297     /// true (1) if the message was handled or false (0) otherwise.  It is safe to
9298     /// keep a reference to |message| outside of this callback.
9299     ///
9300     extern(System) int function (
9301         cef_client_t* self,
9302         cef_browser_t* browser,
9303         cef_frame_t* frame,
9304         cef_process_id_t source_process,
9305         cef_process_message_t* message) nothrow on_process_message_received;
9306 }
9307 
9308 
9309 
9310 // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
9311 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
9312 //
9313 // Redistribution and use in source and binary forms, with or without
9314 // modification, are permitted provided that the following conditions are
9315 // met:
9316 //
9317 //    * Redistributions of source code must retain the above copyright
9318 // notice, this list of conditions and the following disclaimer.
9319 //    * Redistributions in binary form must reproduce the above
9320 // copyright notice, this list of conditions and the following disclaimer
9321 // in the documentation and/or other materials provided with the
9322 // distribution.
9323 //    * Neither the name of Google Inc. nor the name Chromium Embedded
9324 // Framework nor the names of its contributors may be used to endorse
9325 // or promote products derived from this software without specific prior
9326 // written permission.
9327 //
9328 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9329 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9330 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9331 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9332 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9333 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9334 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9335 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9336 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9337 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9338 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9339 //
9340 // ---------------------------------------------------------------------------
9341 //
9342 // This file was generated by the CEF translator tool and should not edited
9343 // by hand. See the translator.README.txt file in the tools directory for
9344 // more information.
9345 //
9346 // $hash=0cbb756a64d2aca1075480b5188b36cae533864d$
9347 //
9348 
9349 extern (C):
9350 
9351 ///
9352 /// Implement this structure to handle events related to commands. The functions
9353 /// of this structure will be called on the UI thread.
9354 ///
9355 struct cef_command_handler_t
9356 {
9357     ///
9358     /// Base structure.
9359     ///
9360 
9361     ///
9362     /// Called to execute a Chrome command triggered via menu selection or
9363     /// keyboard shortcut. Values for |command_id| can be found in the
9364     /// cef_command_ids.h file. |disposition| provides information about the
9365     /// intended command target. Return true (1) if the command was handled or
9366     /// false (0) for the default implementation. For context menu commands this
9367     /// will be called after cef_context_menu_handler_t::OnContextMenuCommand.
9368     /// Only used with the Chrome runtime.
9369     ///
9370     cef_base_ref_counted_t base;
9371     extern(System) int function (
9372         cef_command_handler_t* self,
9373         cef_browser_t* browser,
9374         int command_id,
9375         cef_window_open_disposition_t disposition) nothrow on_chrome_command;
9376     ///
9377     /// Called to check if a Chrome app menu item should be visible. Values for
9378     /// |command_id| can be found in the cef_command_ids.h file. Only called for
9379     /// menu items that would be visible by default. Only used with the Chrome
9380     /// runtime.
9381     ///
9382     extern(System) int function (
9383         cef_command_handler_t* self,
9384         cef_browser_t* browser,
9385         int command_id) nothrow is_chrome_app_menu_item_visible;
9386 
9387     ///
9388     /// Called to check if a Chrome app menu item should be enabled. Values for
9389     /// |command_id| can be found in the cef_command_ids.h file. Only called for
9390     /// menu items that would be enabled by default. Only used with the Chrome
9391     /// runtime.
9392     ///
9393     extern(System) int function (
9394         cef_command_handler_t* self,
9395         cef_browser_t* browser,
9396         int command_id) nothrow is_chrome_app_menu_item_enabled;
9397 
9398     ///
9399     /// Called during browser creation to check if a Chrome page action icon
9400     /// should be visible. Only called for icons that would be visible by default.
9401     /// Only used with the Chrome runtime.
9402     ///
9403     extern(System) int function (
9404         cef_command_handler_t* self,
9405         cef_chrome_page_action_icon_type_t icon_type) nothrow is_chrome_page_action_icon_visible;
9406 
9407     ///
9408     /// Called during browser creation to check if a Chrome toolbar button should
9409     /// be visible. Only called for buttons that would be visible by default. Only
9410     /// used with the Chrome runtime.
9411     ///
9412     extern(System) int function (
9413         cef_command_handler_t* self,
9414         cef_chrome_toolbar_button_type_t button_type) nothrow is_chrome_toolbar_button_visible;
9415 }
9416 
9417 
9418 
9419 // CEF_INCLUDE_CAPI_CEF_COMMAND_HANDLER_CAPI_H_
9420 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
9421 //
9422 // Redistribution and use in source and binary forms, with or without
9423 // modification, are permitted provided that the following conditions are
9424 // met:
9425 //
9426 //    * Redistributions of source code must retain the above copyright
9427 // notice, this list of conditions and the following disclaimer.
9428 //    * Redistributions in binary form must reproduce the above
9429 // copyright notice, this list of conditions and the following disclaimer
9430 // in the documentation and/or other materials provided with the
9431 // distribution.
9432 //    * Neither the name of Google Inc. nor the name Chromium Embedded
9433 // Framework nor the names of its contributors may be used to endorse
9434 // or promote products derived from this software without specific prior
9435 // written permission.
9436 //
9437 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9438 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9439 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9440 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9441 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9442 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9443 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9444 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9445 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9446 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9447 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9448 //
9449 // ---------------------------------------------------------------------------
9450 //
9451 // This file was generated by the CEF translator tool and should not edited
9452 // by hand. See the translator.README.txt file in the tools directory for
9453 // more information.
9454 //
9455 // $hash=ac8fd3a7da20cff1fe2f20a75b045bf27c0312f2$
9456 //
9457 
9458 extern (C):
9459 
9460 ///
9461 /// Structure used to create and/or parse command line arguments. Arguments with
9462 /// "--", "-" and, on Windows, "/" prefixes are considered switches. Switches
9463 /// will always precede any arguments without switch prefixes. Switches can
9464 /// optionally have a value specified using the "=" delimiter (e.g.
9465 /// "-switch=value"). An argument of "--" will terminate switch parsing with all
9466 /// subsequent tokens, regardless of prefix, being interpreted as non-switch
9467 /// arguments. Switch names should be lowercase ASCII and will be converted to
9468 /// such if necessary. Switch values will retain the original case and UTF8
9469 /// encoding. This structure can be used before cef_initialize() is called.
9470 ///
9471 struct cef_command_line_t
9472 {
9473     ///
9474     /// Base structure.
9475     ///
9476 
9477     ///
9478     /// Returns true (1) if this object is valid. Do not call any other functions
9479     /// if this function returns false (0).
9480     cef_base_ref_counted_t base;
9481     ///
9482     extern(System) int function (cef_command_line_t* self) nothrow is_valid;
9483 
9484     ///
9485     /// Returns true (1) if the values of this object are read-only. Some APIs may
9486     /// expose read-only objects.
9487     ///
9488     extern(System) int function (cef_command_line_t* self) nothrow is_read_only;
9489 
9490     ///
9491     /// Returns a writable copy of this object.
9492     ///
9493     extern(System) cef_command_line_t* function (cef_command_line_t* self) nothrow copy;
9494 
9495     ///
9496     /// Initialize the command line with the specified |argc| and |argv| values.
9497     /// The first argument must be the name of the program. This function is only
9498     /// supported on non-Windows platforms.
9499     ///
9500     extern(System) void function (
9501         cef_command_line_t* self,
9502         int argc,
9503         const(char*)* argv) nothrow init_from_argv;
9504 
9505     ///
9506     /// Initialize the command line with the string returned by calling
9507     /// GetCommandLineW(). This function is only supported on Windows.
9508     ///
9509     extern(System) void function (
9510         cef_command_line_t* self,
9511         const(cef_string_t)* command_line) nothrow init_from_string;
9512 
9513     ///
9514     /// Reset the command-line switches and arguments but leave the program
9515     /// component unchanged.
9516     ///
9517     extern(System) void function (cef_command_line_t* self) nothrow reset;
9518 
9519     ///
9520     /// Retrieve the original command line string as a vector of strings. The argv
9521     /// array: `{ program, [(--|-|/)switch[=value]]*, [--], [argument]* }`
9522     ///
9523     extern(System) void function (cef_command_line_t* self, cef_string_list_t argv) nothrow get_argv;
9524 
9525     ///
9526     /// Constructs and returns the represented command line string. Use this
9527     /// function cautiously because quoting behavior is unclear.
9528     ///
9529     // The resulting string must be freed by calling cef_string_userfree_free().
9530     extern(System) cef_string_userfree_t function (
9531         cef_command_line_t* self) nothrow get_command_line_string;
9532 
9533     ///
9534     /// Get the program part of the command line string (the first item).
9535     ///
9536     // The resulting string must be freed by calling cef_string_userfree_free().
9537     extern(System) cef_string_userfree_t function (cef_command_line_t* self) nothrow get_program;
9538 
9539     ///
9540     /// Set the program part of the command line string (the first item).
9541     ///
9542     extern(System) void function (
9543         cef_command_line_t* self,
9544         const(cef_string_t)* program) nothrow set_program;
9545 
9546     ///
9547     /// Returns true (1) if the command line has switches.
9548     ///
9549     extern(System) int function (cef_command_line_t* self) nothrow has_switches;
9550 
9551     ///
9552     /// Returns true (1) if the command line contains the given switch.
9553     ///
9554     extern(System) int function (
9555         cef_command_line_t* self,
9556         const(cef_string_t)* name) nothrow has_switch;
9557 
9558     ///
9559     /// Returns the value associated with the given switch. If the switch has no
9560     /// value or isn't present this function returns the NULL string.
9561     ///
9562     // The resulting string must be freed by calling cef_string_userfree_free().
9563     extern(System) cef_string_userfree_t function (
9564         cef_command_line_t* self,
9565         const(cef_string_t)* name) nothrow get_switch_value;
9566 
9567     ///
9568     /// Returns the map of switch names and values. If a switch has no value an
9569     /// NULL string is returned.
9570     ///
9571     extern(System) void function (
9572         cef_command_line_t* self,
9573         cef_string_map_t switches) nothrow get_switches;
9574 
9575     ///
9576     /// Add a switch to the end of the command line.
9577     ///
9578     extern(System) void function (
9579         cef_command_line_t* self,
9580         const(cef_string_t)* name) nothrow append_switch;
9581 
9582     ///
9583     /// Add a switch with the specified value to the end of the command line. If
9584     /// the switch has no value pass an NULL value string.
9585     ///
9586     extern(System) void function (
9587         cef_command_line_t* self,
9588         const(cef_string_t)* name,
9589         const(cef_string_t)* value) nothrow append_switch_with_value;
9590 
9591     ///
9592     /// True if there are remaining command line arguments.
9593     ///
9594     extern(System) int function (cef_command_line_t* self) nothrow has_arguments;
9595 
9596     ///
9597     /// Get the remaining command line arguments.
9598     ///
9599     extern(System) void function (
9600         cef_command_line_t* self,
9601         cef_string_list_t arguments) nothrow get_arguments;
9602 
9603     ///
9604     /// Add an argument to the end of the command line.
9605     ///
9606     extern(System) void function (
9607         cef_command_line_t* self,
9608         const(cef_string_t)* argument) nothrow append_argument;
9609 
9610     ///
9611     /// Insert a command before the current command. Common for debuggers, like
9612     /// "valgrind" or "gdb --args".
9613     ///
9614     extern(System) void function (
9615         cef_command_line_t* self,
9616         const(cef_string_t)* wrapper) nothrow prepend_wrapper;
9617 }
9618 
9619 
9620 
9621 ///
9622 /// Create a new cef_command_line_t instance.
9623 ///
9624 cef_command_line_t* cef_command_line_create ();
9625 
9626 ///
9627 /// Returns the singleton global cef_command_line_t object. The returned object
9628 /// will be read-only.
9629 ///
9630 cef_command_line_t* cef_command_line_get_global ();
9631 
9632 // CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
9633 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
9634 //
9635 // Redistribution and use in source and binary forms, with or without
9636 // modification, are permitted provided that the following conditions are
9637 // met:
9638 //
9639 //    * Redistributions of source code must retain the above copyright
9640 // notice, this list of conditions and the following disclaimer.
9641 //    * Redistributions in binary form must reproduce the above
9642 // copyright notice, this list of conditions and the following disclaimer
9643 // in the documentation and/or other materials provided with the
9644 // distribution.
9645 //    * Neither the name of Google Inc. nor the name Chromium Embedded
9646 // Framework nor the names of its contributors may be used to endorse
9647 // or promote products derived from this software without specific prior
9648 // written permission.
9649 //
9650 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9651 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9652 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9653 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9654 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9655 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9656 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9657 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9658 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9659 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9660 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9661 //
9662 // ---------------------------------------------------------------------------
9663 //
9664 // This file was generated by the CEF translator tool and should not edited
9665 // by hand. See the translator.README.txt file in the tools directory for
9666 // more information.
9667 //
9668 // $hash=c82f41d81f5afa5ed6995693e012c13d2a609f88$
9669 //
9670 
9671 extern (C):
9672 
9673 ///
9674 /// Callback structure used for continuation of custom context menu display.
9675 ///
9676 struct cef_run_context_menu_callback_t
9677 {
9678     ///
9679     /// Base structure.
9680     ///
9681 
9682     ///
9683     /// Complete context menu display by selecting the specified |command_id| and
9684     /// |event_flags|.
9685     ///
9686 
9687     ///
9688     /// Cancel context menu display.
9689     ///
9690 
9691     ///
9692     /// Callback structure used for continuation of custom quick menu display.
9693     cef_base_ref_counted_t base;
9694     extern(System) void function (
9695         cef_run_context_menu_callback_t* self,
9696         int command_id,
9697         cef_event_flags_t event_flags) nothrow cont;
9698     extern(System) void function (cef_run_context_menu_callback_t* self) nothrow cancel;
9699 }
9700 
9701 
9702 ///
9703 struct cef_run_quick_menu_callback_t
9704 {
9705     ///
9706     /// Base structure.
9707     ///
9708     cef_base_ref_counted_t base;
9709 
9710     ///
9711     /// Complete quick menu display by selecting the specified |command_id| and
9712     /// |event_flags|.
9713     ///
9714     extern(System) void function (
9715         cef_run_quick_menu_callback_t* self,
9716         int command_id,
9717         cef_event_flags_t event_flags) nothrow cont;
9718 
9719     ///
9720     /// Cancel quick menu display.
9721     ///
9722     extern(System) void function (cef_run_quick_menu_callback_t* self) nothrow cancel;
9723 }
9724 
9725 
9726 
9727 ///
9728 /// Implement this structure to handle context menu events. The functions of
9729 /// this structure will be called on the UI thread.
9730 ///
9731 struct cef_context_menu_handler_t
9732 {
9733     ///
9734     /// Base structure.
9735     ///
9736     cef_base_ref_counted_t base;
9737 
9738     ///
9739     /// Called before a context menu is displayed. |params| provides information
9740     /// about the context menu state. |model| initially contains the default
9741     /// context menu. The |model| can be cleared to show no context menu or
9742     /// modified to show a custom menu. Do not keep references to |params| or
9743     /// |model| outside of this callback.
9744     ///
9745     extern(System) void function (
9746         cef_context_menu_handler_t* self,
9747         cef_browser_t* browser,
9748         cef_frame_t* frame,
9749         cef_context_menu_params_t* params,
9750         cef_menu_model_t* model) nothrow on_before_context_menu;
9751 
9752     ///
9753     /// Called to allow custom display of the context menu. |params| provides
9754     /// information about the context menu state. |model| contains the context
9755     /// menu model resulting from OnBeforeContextMenu. For custom display return
9756     /// true (1) and execute |callback| either synchronously or asynchronously
9757     /// with the selected command ID. For default display return false (0). Do not
9758     /// keep references to |params| or |model| outside of this callback.
9759     ///
9760     extern(System) int function (
9761         cef_context_menu_handler_t* self,
9762         cef_browser_t* browser,
9763         cef_frame_t* frame,
9764         cef_context_menu_params_t* params,
9765         cef_menu_model_t* model,
9766         cef_run_context_menu_callback_t* callback) nothrow run_context_menu;
9767 
9768     ///
9769     /// Called to execute a command selected from the context menu. Return true
9770     /// (1) if the command was handled or false (0) for the default
9771     /// implementation. See cef_menu_id_t for the command ids that have default
9772     /// implementations. All user-defined command ids should be between
9773     /// MENU_ID_USER_FIRST and MENU_ID_USER_LAST. |params| will have the same
9774     /// values as what was passed to on_before_context_menu(). Do not keep a
9775     /// reference to |params| outside of this callback.
9776     ///
9777     extern(System) int function (
9778         cef_context_menu_handler_t* self,
9779         cef_browser_t* browser,
9780         cef_frame_t* frame,
9781         cef_context_menu_params_t* params,
9782         int command_id,
9783         cef_event_flags_t event_flags) nothrow on_context_menu_command;
9784 
9785     ///
9786     /// Called when the context menu is dismissed irregardless of whether the menu
9787     /// was canceled or a command was selected.
9788     ///
9789     extern(System) void function (
9790         cef_context_menu_handler_t* self,
9791         cef_browser_t* browser,
9792         cef_frame_t* frame) nothrow on_context_menu_dismissed;
9793 
9794     ///
9795     /// Called to allow custom display of the quick menu for a windowless browser.
9796     /// |location| is the top left corner of the selected region. |size| is the
9797     /// size of the selected region. |edit_state_flags| is a combination of flags
9798     /// that represent the state of the quick menu. Return true (1) if the menu
9799     /// will be handled and execute |callback| either synchronously or
9800     /// asynchronously with the selected command ID. Return false (0) to cancel
9801     /// the menu.
9802     ///
9803     extern(System) int function (
9804         cef_context_menu_handler_t* self,
9805         cef_browser_t* browser,
9806         cef_frame_t* frame,
9807         const(cef_point_t)* location,
9808         const(cef_size_t)* size,
9809         cef_quick_menu_edit_state_flags_t edit_state_flags,
9810         cef_run_quick_menu_callback_t* callback) nothrow run_quick_menu;
9811 
9812     ///
9813     /// Called to execute a command selected from the quick menu for a windowless
9814     /// browser. Return true (1) if the command was handled or false (0) for the
9815     /// default implementation. See cef_menu_id_t for command IDs that have
9816     /// default implementations.
9817     ///
9818     extern(System) int function (
9819         cef_context_menu_handler_t* self,
9820         cef_browser_t* browser,
9821         cef_frame_t* frame,
9822         int command_id,
9823         cef_event_flags_t event_flags) nothrow on_quick_menu_command;
9824 
9825     ///
9826     /// Called when the quick menu for a windowless browser is dismissed
9827     /// irregardless of whether the menu was canceled or a command was selected.
9828     ///
9829     extern(System) void function (
9830         cef_context_menu_handler_t* self,
9831         cef_browser_t* browser,
9832         cef_frame_t* frame) nothrow on_quick_menu_dismissed;
9833 }
9834 
9835 
9836 
9837 ///
9838 /// Provides information about the context menu state. The functions of this
9839 /// structure can only be accessed on browser process the UI thread.
9840 ///
9841 struct cef_context_menu_params_t
9842 {
9843     ///
9844     /// Base structure.
9845     ///
9846     cef_base_ref_counted_t base;
9847 
9848     ///
9849     /// Returns the X coordinate of the mouse where the context menu was invoked.
9850     /// Coords are relative to the associated RenderView's origin.
9851     ///
9852     extern(System) int function (cef_context_menu_params_t* self) nothrow get_xcoord;
9853 
9854     ///
9855     /// Returns the Y coordinate of the mouse where the context menu was invoked.
9856     /// Coords are relative to the associated RenderView's origin.
9857     ///
9858     extern(System) int function (cef_context_menu_params_t* self) nothrow get_ycoord;
9859 
9860     ///
9861     /// Returns flags representing the type of node that the context menu was
9862     /// invoked on.
9863     ///
9864     extern(System) cef_context_menu_type_flags_t function (
9865         cef_context_menu_params_t* self) nothrow get_type_flags;
9866 
9867     ///
9868     /// Returns the URL of the link, if any, that encloses the node that the
9869     /// context menu was invoked on.
9870     ///
9871     // The resulting string must be freed by calling cef_string_userfree_free().
9872     extern(System) cef_string_userfree_t function (
9873         cef_context_menu_params_t* self) nothrow get_link_url;
9874 
9875     ///
9876     /// Returns the link URL, if any, to be used ONLY for "copy link address". We
9877     /// don't validate this field in the frontend process.
9878     ///
9879     // The resulting string must be freed by calling cef_string_userfree_free().
9880     extern(System) cef_string_userfree_t function (
9881         cef_context_menu_params_t* self) nothrow get_unfiltered_link_url;
9882 
9883     ///
9884     /// Returns the source URL, if any, for the element that the context menu was
9885     /// invoked on. Example of elements with source URLs are img, audio, and
9886     /// video.
9887     ///
9888     // The resulting string must be freed by calling cef_string_userfree_free().
9889     extern(System) cef_string_userfree_t function (
9890         cef_context_menu_params_t* self) nothrow get_source_url;
9891 
9892     ///
9893     /// Returns true (1) if the context menu was invoked on an image which has
9894     /// non-NULL contents.
9895     ///
9896     extern(System) int function (cef_context_menu_params_t* self) nothrow has_image_contents;
9897 
9898     ///
9899     /// Returns the title text or the alt text if the context menu was invoked on
9900     /// an image.
9901     ///
9902     // The resulting string must be freed by calling cef_string_userfree_free().
9903     extern(System) cef_string_userfree_t function (
9904         cef_context_menu_params_t* self) nothrow get_title_text;
9905 
9906     ///
9907     /// Returns the URL of the top level page that the context menu was invoked
9908     /// on.
9909     ///
9910     // The resulting string must be freed by calling cef_string_userfree_free().
9911     extern(System) cef_string_userfree_t function (
9912         cef_context_menu_params_t* self) nothrow get_page_url;
9913 
9914     ///
9915     /// Returns the URL of the subframe that the context menu was invoked on.
9916     ///
9917     // The resulting string must be freed by calling cef_string_userfree_free().
9918     extern(System) cef_string_userfree_t function (
9919         cef_context_menu_params_t* self) nothrow get_frame_url;
9920 
9921     ///
9922     /// Returns the character encoding of the subframe that the context menu was
9923     /// invoked on.
9924     ///
9925     // The resulting string must be freed by calling cef_string_userfree_free().
9926     extern(System) cef_string_userfree_t function (
9927         cef_context_menu_params_t* self) nothrow get_frame_charset;
9928 
9929     ///
9930     /// Returns the type of context node that the context menu was invoked on.
9931     ///
9932     extern(System) cef_context_menu_media_type_t function (
9933         cef_context_menu_params_t* self) nothrow get_media_type;
9934 
9935     ///
9936     /// Returns flags representing the actions supported by the media element, if
9937     /// any, that the context menu was invoked on.
9938     ///
9939     extern(System) cef_context_menu_media_state_flags_t function (
9940         cef_context_menu_params_t* self) nothrow get_media_state_flags;
9941 
9942     ///
9943     /// Returns the text of the selection, if any, that the context menu was
9944     /// invoked on.
9945     ///
9946     // The resulting string must be freed by calling cef_string_userfree_free().
9947     extern(System) cef_string_userfree_t function (
9948         cef_context_menu_params_t* self) nothrow get_selection_text;
9949 
9950     ///
9951     /// Returns the text of the misspelled word, if any, that the context menu was
9952     /// invoked on.
9953     ///
9954     // The resulting string must be freed by calling cef_string_userfree_free().
9955     extern(System) cef_string_userfree_t function (
9956         cef_context_menu_params_t* self) nothrow get_misspelled_word;
9957 
9958     ///
9959     /// Returns true (1) if suggestions exist, false (0) otherwise. Fills in
9960     /// |suggestions| from the spell check service for the misspelled word if
9961     /// there is one.
9962     ///
9963     extern(System) int function (
9964         cef_context_menu_params_t* self,
9965         cef_string_list_t suggestions) nothrow get_dictionary_suggestions;
9966 
9967     ///
9968     /// Returns true (1) if the context menu was invoked on an editable node.
9969     ///
9970     extern(System) int function (cef_context_menu_params_t* self) nothrow is_editable;
9971 
9972     ///
9973     /// Returns true (1) if the context menu was invoked on an editable node where
9974     /// spell-check is enabled.
9975     ///
9976     extern(System) int function (cef_context_menu_params_t* self) nothrow is_spell_check_enabled;
9977 
9978     ///
9979     /// Returns flags representing the actions supported by the editable node, if
9980     /// any, that the context menu was invoked on.
9981     ///
9982     extern(System) cef_context_menu_edit_state_flags_t function (
9983         cef_context_menu_params_t* self) nothrow get_edit_state_flags;
9984 
9985     ///
9986     /// Returns true (1) if the context menu contains items specified by the
9987     /// renderer process.
9988     ///
9989     extern(System) int function (cef_context_menu_params_t* self) nothrow is_custom_menu;
9990 }
9991 
9992 
9993 
9994 // CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_
9995 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
9996 //
9997 // Redistribution and use in source and binary forms, with or without
9998 // modification, are permitted provided that the following conditions are
9999 // met:
10000 //
10001 //    * Redistributions of source code must retain the above copyright
10002 // notice, this list of conditions and the following disclaimer.
10003 //    * Redistributions in binary form must reproduce the above
10004 // copyright notice, this list of conditions and the following disclaimer
10005 // in the documentation and/or other materials provided with the
10006 // distribution.
10007 //    * Neither the name of Google Inc. nor the name Chromium Embedded
10008 // Framework nor the names of its contributors may be used to endorse
10009 // or promote products derived from this software without specific prior
10010 // written permission.
10011 //
10012 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10013 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10014 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10015 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10016 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10017 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10018 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10019 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10020 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10021 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10022 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10023 //
10024 // ---------------------------------------------------------------------------
10025 //
10026 // This file was generated by the CEF translator tool and should not edited
10027 // by hand. See the translator.README.txt file in the tools directory for
10028 // more information.
10029 //
10030 // $hash=598c6f530b2e2553197d8c6a72ad9e2bf72b5443$
10031 //
10032 
10033 extern (C):
10034 
10035 ///
10036 /// Structure used for managing cookies. The functions of this structure may be
10037 /// called on any thread unless otherwise indicated.
10038 ///
10039 struct cef_cookie_manager_t
10040 {
10041     ///
10042     /// Base structure.
10043     ///
10044 
10045     ///
10046     /// Visit all cookies on the UI thread. The returned cookies are ordered by
10047     /// longest path, then by earliest creation date. Returns false (0) if cookies
10048     /// cannot be accessed.
10049     ///
10050 
10051     ///
10052     /// Visit a subset of cookies on the UI thread. The results are filtered by
10053     /// the given url scheme, host, domain and path. If |includeHttpOnly| is true
10054     /// (1) HTTP-only cookies will also be included in the results. The returned
10055     cef_base_ref_counted_t base;
10056     extern(System) int function (
10057         cef_cookie_manager_t* self,
10058         cef_cookie_visitor_t* visitor) nothrow visit_all_cookies;
10059     /// cookies are ordered by longest path, then by earliest creation date.
10060     /// Returns false (0) if cookies cannot be accessed.
10061     ///
10062     extern(System) int function (
10063         cef_cookie_manager_t* self,
10064         const(cef_string_t)* url,
10065         int includeHttpOnly,
10066         cef_cookie_visitor_t* visitor) nothrow visit_url_cookies;
10067 
10068     ///
10069     /// Sets a cookie given a valid URL and explicit user-provided cookie
10070     /// attributes. This function expects each attribute to be well-formed. It
10071     /// will check for disallowed characters (e.g. the ';' character is disallowed
10072     /// within the cookie value attribute) and fail without setting the cookie if
10073     /// such characters are found. If |callback| is non-NULL it will be executed
10074     /// asnychronously on the UI thread after the cookie has been set. Returns
10075     /// false (0) if an invalid URL is specified or if cookies cannot be accessed.
10076     ///
10077     extern(System) int function (
10078         cef_cookie_manager_t* self,
10079         const(cef_string_t)* url,
10080         const(cef_cookie_t)* cookie,
10081         cef_set_cookie_callback_t* callback) nothrow set_cookie;
10082 
10083     ///
10084     /// Delete all cookies that match the specified parameters. If both |url| and
10085     /// |cookie_name| values are specified all host and domain cookies matching
10086     /// both will be deleted. If only |url| is specified all host cookies (but not
10087     /// domain cookies) irrespective of path will be deleted. If |url| is NULL all
10088     /// cookies for all hosts and domains will be deleted. If |callback| is non-
10089     /// NULL it will be executed asnychronously on the UI thread after the cookies
10090     /// have been deleted. Returns false (0) if a non-NULL invalid URL is
10091     /// specified or if cookies cannot be accessed. Cookies can alternately be
10092     /// deleted using the Visit*Cookies() functions.
10093     ///
10094     extern(System) int function (
10095         cef_cookie_manager_t* self,
10096         const(cef_string_t)* url,
10097         const(cef_string_t)* cookie_name,
10098         cef_delete_cookies_callback_t* callback) nothrow delete_cookies;
10099 
10100     ///
10101     /// Flush the backing store (if any) to disk. If |callback| is non-NULL it
10102     /// will be executed asnychronously on the UI thread after the flush is
10103     /// complete. Returns false (0) if cookies cannot be accessed.
10104     ///
10105     extern(System) int function (
10106         cef_cookie_manager_t* self,
10107         cef_completion_callback_t* callback) nothrow flush_store;
10108 }
10109 
10110 
10111 
10112 ///
10113 /// Returns the global cookie manager. By default data will be stored at
10114 /// cef_settings_t.cache_path if specified or in memory otherwise. If |callback|
10115 /// is non-NULL it will be executed asnychronously on the UI thread after the
10116 /// manager's storage has been initialized. Using this function is equivalent to
10117 /// calling cef_request_context_t::cef_request_context_get_global_context()->Get
10118 /// DefaultCookieManager().
10119 ///
10120 cef_cookie_manager_t* cef_cookie_manager_get_global_manager (
10121     cef_completion_callback_t* callback);
10122 
10123 ///
10124 /// Structure to implement for visiting cookie values. The functions of this
10125 /// structure will always be called on the UI thread.
10126 ///
10127 struct cef_cookie_visitor_t
10128 {
10129     ///
10130     /// Base structure.
10131     ///
10132     cef_base_ref_counted_t base;
10133 
10134     ///
10135     /// Method that will be called once for each cookie. |count| is the 0-based
10136     /// index for the current cookie. |total| is the total number of cookies. Set
10137     /// |deleteCookie| to true (1) to delete the cookie currently being visited.
10138     /// Return false (0) to stop visiting cookies. This function may never be
10139     /// called if no cookies are found.
10140     ///
10141     extern(System) int function (
10142         cef_cookie_visitor_t* self,
10143         const(cef_cookie_t)* cookie,
10144         int count,
10145         int total,
10146         int* deleteCookie) nothrow visit;
10147 }
10148 
10149 
10150 
10151 ///
10152 /// Structure to implement to be notified of asynchronous completion via
10153 /// cef_cookie_manager_t::set_cookie().
10154 ///
10155 struct cef_set_cookie_callback_t
10156 {
10157     ///
10158     /// Base structure.
10159     ///
10160     cef_base_ref_counted_t base;
10161 
10162     ///
10163     /// Method that will be called upon completion. |success| will be true (1) if
10164     /// the cookie was set successfully.
10165     ///
10166     extern(System) void function (cef_set_cookie_callback_t* self, int success) nothrow on_complete;
10167 }
10168 
10169 
10170 
10171 ///
10172 /// Structure to implement to be notified of asynchronous completion via
10173 /// cef_cookie_manager_t::delete_cookies().
10174 ///
10175 struct cef_delete_cookies_callback_t
10176 {
10177     ///
10178     /// Base structure.
10179     ///
10180     cef_base_ref_counted_t base;
10181 
10182     ///
10183     /// Method that will be called upon completion. |num_deleted| will be the
10184     /// number of cookies that were deleted.
10185     ///
10186     extern(System) void function (
10187         cef_delete_cookies_callback_t* self,
10188         int num_deleted) nothrow on_complete;
10189 }
10190 
10191 
10192 
10193 // CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_
10194 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
10195 //
10196 // Redistribution and use in source and binary forms, with or without
10197 // modification, are permitted provided that the following conditions are
10198 // met:
10199 //
10200 //    * Redistributions of source code must retain the above copyright
10201 // notice, this list of conditions and the following disclaimer.
10202 //    * Redistributions in binary form must reproduce the above
10203 // copyright notice, this list of conditions and the following disclaimer
10204 // in the documentation and/or other materials provided with the
10205 // distribution.
10206 //    * Neither the name of Google Inc. nor the name Chromium Embedded
10207 // Framework nor the names of its contributors may be used to endorse
10208 // or promote products derived from this software without specific prior
10209 // written permission.
10210 //
10211 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10212 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10213 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10214 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10215 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10216 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10217 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10218 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10219 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10220 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10221 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10222 //
10223 // ---------------------------------------------------------------------------
10224 //
10225 // This file was generated by the CEF translator tool and should not edited
10226 // by hand. See the translator.README.txt file in the tools directory for
10227 // more information.
10228 //
10229 // $hash=22cfd717df9032a01214d9abfe3e0e51949b3319$
10230 //
10231 
10232 extern (C):
10233 
10234 ///
10235 /// Crash reporting is configured using an INI-style config file named
10236 /// "crash_reporter.cfg". On Windows and Linux this file must be placed next to
10237 /// the main application executable. On macOS this file must be placed in the
10238 /// top-level app bundle Resources directory (e.g.
10239 /// "<appname>.app/Contents/Resources"). File contents are as follows:
10240 ///
10241 /// <pre>
10242 ///  # Comments start with a hash character and must be on their own line.
10243 ///
10244 ///  [Config]
10245 ///  ProductName=<Value of the "prod" crash key; defaults to "cef">
10246 ///  ProductVersion=<Value of the "ver" crash key; defaults to the CEF version>
10247 ///  AppName=<Windows only; App-specific folder name component for storing crash
10248 ///           information; default to "CEF">
10249 ///  ExternalHandler=<Windows only; Name of the external handler exe to use
10250 ///                   instead of re-launching the main exe; default to empty>
10251 ///  BrowserCrashForwardingEnabled=<macOS only; True if browser process crashes
10252 ///                                 should be forwarded to the system crash
10253 ///                                 reporter; default to false>
10254 ///  ServerURL=<crash server URL; default to empty>
10255 ///  RateLimitEnabled=<True if uploads should be rate limited; default to true>
10256 ///  MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled;
10257 ///                    default to 5>
10258 ///  MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value
10259 ///                       will cause older reports to be deleted; default to 20>
10260 ///  MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted;
10261 ///                        default to 5>
10262 ///
10263 ///  [CrashKeys]
10264 ///  my_key1=<small|medium|large>
10265 ///  my_key2=<small|medium|large>
10266 /// </pre>
10267 ///
10268 /// <b>Config section:</b>
10269 ///
10270 /// If "ProductName" and/or "ProductVersion" are set then the specified values
10271 /// will be included in the crash dump metadata. On macOS if these values are
10272 /// set to NULL then they will be retrieved from the Info.plist file using the
10273 /// "CFBundleName" and "CFBundleShortVersionString" keys respectively.
10274 ///
10275 /// If "AppName" is set on Windows then crash report information (metrics,
10276 /// database and dumps) will be stored locally on disk under the
10277 /// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other
10278 /// platforms the cef_settings_t.root_cache_path value will be used.
10279 ///
10280 /// If "ExternalHandler" is set on Windows then the specified exe will be
10281 /// launched as the crashpad-handler instead of re-launching the main process
10282 /// exe. The value can be an absolute path or a path relative to the main exe
10283 /// directory. On Linux the cef_settings_t.browser_subprocess_path value will be
10284 /// used. On macOS the existing subprocess app bundle will be used.
10285 ///
10286 /// If "BrowserCrashForwardingEnabled" is set to true (1) on macOS then browser
10287 /// process crashes will be forwarded to the system crash reporter. This results
10288 /// in the crash UI dialog being displayed to the user and crash reports being
10289 /// logged under "~/Library/Logs/DiagnosticReports". Forwarding of crash reports
10290 /// from non-browser processes and Debug builds is always disabled.
10291 ///
10292 /// If "ServerURL" is set then crashes will be uploaded as a multi-part POST
10293 /// request to the specified URL. Otherwise, reports will only be stored locally
10294 /// on disk.
10295 ///
10296 /// If "RateLimitEnabled" is set to true (1) then crash report uploads will be
10297 /// rate limited as follows:
10298 ///  1. If "MaxUploadsPerDay" is set to a positive value then at most the
10299 ///     specified number of crashes will be uploaded in each 24 hour period.
10300 ///  2. If crash upload fails due to a network or server error then an
10301 ///     incremental backoff delay up to a maximum of 24 hours will be applied
10302 ///     for retries.
10303 ///  3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the
10304 ///     "MaxUploadsPerDay" value will be reduced to 1 until the client is
10305 ///     restarted. This helps to avoid an upload flood when the network or
10306 ///     server error is resolved.
10307 /// Rate limiting is not supported on Linux.
10308 ///
10309 /// If "MaxDatabaseSizeInMb" is set to a positive value then crash report
10310 /// storage on disk will be limited to that size in megabytes. For example, on
10311 /// Windows each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20
10312 /// equates to about 34 crash reports stored on disk. Not supported on Linux.
10313 ///
10314 /// If "MaxDatabaseAgeInDays" is set to a positive value then crash reports
10315 /// older than the specified age in days will be deleted. Not supported on
10316 /// Linux.
10317 ///
10318 /// <b>CrashKeys section:</b>
10319 ///
10320 /// A maximum of 26 crash keys of each size can be specified for use by the
10321 /// application. Crash key values will be truncated based on the specified size
10322 /// (small = 64 bytes, medium = 256 bytes, large = 1024 bytes). The value of
10323 /// crash keys can be set from any thread or process using the
10324 /// CefSetCrashKeyValue function. These key/value pairs will be sent to the
10325 /// crash server along with the crash dump file.
10326 ///
10327 int cef_crash_reporting_enabled ();
10328 
10329 ///
10330 /// Sets or clears a specific key-value pair from the crash metadata.
10331 ///
10332 void cef_set_crash_key_value (
10333     const(cef_string_t)* key,
10334     const(cef_string_t)* value);
10335 
10336 // CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
10337 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
10338 //
10339 // Redistribution and use in source and binary forms, with or without
10340 // modification, are permitted provided that the following conditions are
10341 // met:
10342 //
10343 //    * Redistributions of source code must retain the above copyright
10344 // notice, this list of conditions and the following disclaimer.
10345 //    * Redistributions in binary form must reproduce the above
10346 // copyright notice, this list of conditions and the following disclaimer
10347 // in the documentation and/or other materials provided with the
10348 // distribution.
10349 //    * Neither the name of Google Inc. nor the name Chromium Embedded
10350 // Framework nor the names of its contributors may be used to endorse
10351 // or promote products derived from this software without specific prior
10352 // written permission.
10353 //
10354 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10355 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10356 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10357 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10358 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10359 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10360 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10361 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10362 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10363 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10364 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10365 //
10366 // ---------------------------------------------------------------------------
10367 //
10368 // This file was generated by the CEF translator tool and should not edited
10369 // by hand. See the translator.README.txt file in the tools directory for
10370 // more information.
10371 //
10372 // $hash=777485120b9a9df0f890579ee698d33f273819c5$
10373 //
10374 
10375 extern (C):
10376 
10377 
10378 
10379 ///
10380 /// Callback structure for cef_browser_host_t::AddDevToolsMessageObserver. The
10381 /// functions of this structure will be called on the browser process UI thread.
10382 ///
10383 struct cef_dev_tools_message_observer_t
10384 {
10385     ///
10386     /// Base structure.
10387     ///
10388 
10389     ///
10390     /// Method that will be called on receipt of a DevTools protocol message.
10391     /// |browser| is the originating browser instance. |message| is a UTF8-encoded
10392     /// JSON dictionary representing either a function result or an event.
10393     /// |message| is only valid for the scope of this callback and should be
10394     /// copied if necessary. Return true (1) if the message was handled or false
10395     /// (0) if the message should be further processed and passed to the
10396     /// OnDevToolsMethodResult or OnDevToolsEvent functions as appropriate.
10397     ///
10398     /// Method result dictionaries include an "id" (int) value that identifies the
10399     cef_base_ref_counted_t base;
10400     /// orginating function call sent from
10401     /// cef_browser_host_t::SendDevToolsMessage, and optionally either a "result"
10402     /// (dictionary) or "error" (dictionary) value. The "error" dictionary will
10403     /// contain "code" (int) and "message" (string) values. Event dictionaries
10404     /// include a "function" (string) value and optionally a "params" (dictionary)
10405     /// value. See the DevTools protocol documentation at
10406     /// https://chromedevtools.github.io/devtools-protocol/ for details of
10407     /// supported function calls and the expected "result" or "params" dictionary
10408     /// contents. JSON dictionaries can be parsed using the CefParseJSON function
10409     /// if desired, however be aware of performance considerations when parsing
10410     /// large messages (some of which may exceed 1MB in size).
10411     ///
10412     extern(System) int function (
10413         cef_dev_tools_message_observer_t* self,
10414         cef_browser_t* browser,
10415         const(void)* message,
10416         size_t message_size) nothrow on_dev_tools_message;
10417 
10418     ///
10419     /// Method that will be called after attempted execution of a DevTools
10420     /// protocol function. |browser| is the originating browser instance.
10421     /// |message_id| is the "id" value that identifies the originating function
10422     /// call message. If the function succeeded |success| will be true (1) and
10423     /// |result| will be the UTF8-encoded JSON "result" dictionary value (which
10424     /// may be NULL). If the function failed |success| will be false (0) and
10425     /// |result| will be the UTF8-encoded JSON "error" dictionary value. |result|
10426     /// is only valid for the scope of this callback and should be copied if
10427     /// necessary. See the OnDevToolsMessage documentation for additional details
10428     /// on |result| contents.
10429     ///
10430     extern(System) void function (
10431         cef_dev_tools_message_observer_t* self,
10432         cef_browser_t* browser,
10433         int message_id,
10434         int success,
10435         const(void)* result,
10436         size_t result_size) nothrow on_dev_tools_method_result;
10437 
10438     ///
10439     /// Method that will be called on receipt of a DevTools protocol event.
10440     /// |browser| is the originating browser instance. |function| is the
10441     /// "function" value. |params| is the UTF8-encoded JSON "params" dictionary
10442     /// value (which may be NULL). |params| is only valid for the scope of this
10443     /// callback and should be copied if necessary. See the OnDevToolsMessage
10444     /// documentation for additional details on |params| contents.
10445     ///
10446     extern(System) void function (
10447         cef_dev_tools_message_observer_t* self,
10448         cef_browser_t* browser,
10449         const(cef_string_t)* method,
10450         const(void)* params,
10451         size_t params_size) nothrow on_dev_tools_event;
10452 
10453     ///
10454     /// Method that will be called when the DevTools agent has attached. |browser|
10455     /// is the originating browser instance. This will generally occur in response
10456     /// to the first message sent while the agent is detached.
10457     ///
10458     extern(System) void function (
10459         cef_dev_tools_message_observer_t* self,
10460         cef_browser_t* browser) nothrow on_dev_tools_agent_attached;
10461 
10462     ///
10463     /// Method that will be called when the DevTools agent has detached. |browser|
10464     /// is the originating browser instance. Any function results that were
10465     /// pending before the agent became detached will not be delivered, and any
10466     /// active event subscriptions will be canceled.
10467     ///
10468     extern(System) void function (
10469         cef_dev_tools_message_observer_t* self,
10470         cef_browser_t* browser) nothrow on_dev_tools_agent_detached;
10471 }
10472 
10473 
10474 
10475 // CEF_INCLUDE_CAPI_CEF_DEVTOOLS_MESSAGE_OBSERVER_CAPI_H_
10476 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
10477 //
10478 // Redistribution and use in source and binary forms, with or without
10479 // modification, are permitted provided that the following conditions are
10480 // met:
10481 //
10482 //    * Redistributions of source code must retain the above copyright
10483 // notice, this list of conditions and the following disclaimer.
10484 //    * Redistributions in binary form must reproduce the above
10485 // copyright notice, this list of conditions and the following disclaimer
10486 // in the documentation and/or other materials provided with the
10487 // distribution.
10488 //    * Neither the name of Google Inc. nor the name Chromium Embedded
10489 // Framework nor the names of its contributors may be used to endorse
10490 // or promote products derived from this software without specific prior
10491 // written permission.
10492 //
10493 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10494 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10495 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10496 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10497 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10498 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10499 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10500 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10501 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10502 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10503 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10504 //
10505 // ---------------------------------------------------------------------------
10506 //
10507 // This file was generated by the CEF translator tool and should not edited
10508 // by hand. See the translator.README.txt file in the tools directory for
10509 // more information.
10510 //
10511 // $hash=69545645f079f4593d9cbb6d8a36535c209245f7$
10512 //
10513 
10514 extern (C):
10515 
10516 ///
10517 /// Callback structure for asynchronous continuation of file dialog requests.
10518 ///
10519 struct cef_file_dialog_callback_t
10520 {
10521     ///
10522     /// Base structure.
10523     ///
10524 
10525     ///
10526     /// Continue the file selection. |file_paths| should be a single value or a
10527     /// list of values depending on the dialog mode. An NULL |file_paths| value is
10528     /// treated the same as calling cancel().
10529     ///
10530 
10531     ///
10532     /// Cancel the file selection.
10533     ///
10534 
10535     ///
10536     /// Implement this structure to handle dialog events. The functions of this
10537     /// structure will be called on the browser process UI thread.
10538     ///
10539     cef_base_ref_counted_t base;
10540     extern(System) void function (
10541         cef_file_dialog_callback_t* self,
10542         cef_string_list_t file_paths) nothrow cont;
10543     extern(System) void function (cef_file_dialog_callback_t* self) nothrow cancel;
10544 }
10545 
10546 
10547 
10548 struct cef_dialog_handler_t
10549 {
10550     ///
10551     /// Base structure.
10552     ///
10553     cef_base_ref_counted_t base;
10554 
10555     ///
10556     /// Called to run a file chooser dialog. |mode| represents the type of dialog
10557     /// to display. |title| to the title to be used for the dialog and may be NULL
10558     /// to show the default title ("Open" or "Save" depending on the mode).
10559     /// |default_file_path| is the path with optional directory and/or file name
10560     /// component that should be initially selected in the dialog.
10561     /// |accept_filters| are used to restrict the selectable file types and may
10562     /// any combination of (a) valid lower-cased MIME types (e.g. "text/*" or
10563     /// "image/*"), (b) individual file extensions (e.g. ".txt" or ".png"), or (c)
10564     /// combined description and file extension delimited using "|" and ";" (e.g.
10565     /// "Image Types|.png;.gif;.jpg"). To display a custom dialog return true (1)
10566     /// and execute |callback| either inline or at a later time. To display the
10567     /// default dialog return false (0).
10568     ///
10569     extern(System) int function (
10570         cef_dialog_handler_t* self,
10571         cef_browser_t* browser,
10572         cef_file_dialog_mode_t mode,
10573         const(cef_string_t)* title,
10574         const(cef_string_t)* default_file_path,
10575         cef_string_list_t accept_filters,
10576         cef_file_dialog_callback_t* callback) nothrow on_file_dialog;
10577 }
10578 
10579 
10580 
10581 // CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_
10582 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
10583 //
10584 // Redistribution and use in source and binary forms, with or without
10585 // modification, are permitted provided that the following conditions are
10586 // met:
10587 //
10588 //    * Redistributions of source code must retain the above copyright
10589 // notice, this list of conditions and the following disclaimer.
10590 //    * Redistributions in binary form must reproduce the above
10591 // copyright notice, this list of conditions and the following disclaimer
10592 // in the documentation and/or other materials provided with the
10593 // distribution.
10594 //    * Neither the name of Google Inc. nor the name Chromium Embedded
10595 // Framework nor the names of its contributors may be used to endorse
10596 // or promote products derived from this software without specific prior
10597 // written permission.
10598 //
10599 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10600 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10601 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10602 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10603 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10604 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10605 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10606 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10607 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10608 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10609 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10610 //
10611 // ---------------------------------------------------------------------------
10612 //
10613 // This file was generated by the CEF translator tool and should not edited
10614 // by hand. See the translator.README.txt file in the tools directory for
10615 // more information.
10616 //
10617 // $hash=5374127458a7cac3ee9b4d2b4ad8a6f5ca81ec52$
10618 //
10619 
10620 import core.stdc.config;
10621 
10622 extern (C):
10623 
10624 ///
10625 /// Implement this structure to handle events related to browser display state.
10626 /// The functions of this structure will be called on the UI thread.
10627 ///
10628 struct cef_display_handler_t
10629 {
10630     ///
10631     /// Base structure.
10632     ///
10633 
10634     ///
10635     /// Called when a frame's address has changed.
10636     ///
10637 
10638     ///
10639     /// Called when the page title changes.
10640     ///
10641     cef_base_ref_counted_t base;
10642     extern(System) void function (
10643         cef_display_handler_t* self,
10644         cef_browser_t* browser,
10645         cef_frame_t* frame,
10646         const(cef_string_t)* url) nothrow on_address_change;
10647     extern(System) void function (
10648         cef_display_handler_t* self,
10649         cef_browser_t* browser,
10650         const(cef_string_t)* title) nothrow on_title_change;
10651     ///
10652     /// Called when the page icon changes.
10653     ///
10654     extern(System) void function (
10655         cef_display_handler_t* self,
10656         cef_browser_t* browser,
10657         cef_string_list_t icon_urls) nothrow on_favicon_urlchange;
10658 
10659     ///
10660     /// Called when web content in the page has toggled fullscreen mode. If
10661     /// |fullscreen| is true (1) the content will automatically be sized to fill
10662     /// the browser content area. If |fullscreen| is false (0) the content will
10663     /// automatically return to its original size and position. With the Alloy
10664     /// runtime the client is responsible for triggering the fullscreen transition
10665     /// (for example, by calling cef_window_t::SetFullscreen when using Views).
10666     /// With the Chrome runtime the fullscreen transition will be triggered
10667     /// automatically. The cef_window_delegate_t::OnWindowFullscreenTransition
10668     /// function will be called during the fullscreen transition for notification
10669     /// purposes.
10670     ///
10671     extern(System) void function (
10672         cef_display_handler_t* self,
10673         cef_browser_t* browser,
10674         int fullscreen) nothrow on_fullscreen_mode_change;
10675 
10676     ///
10677     /// Called when the browser is about to display a tooltip. |text| contains the
10678     /// text that will be displayed in the tooltip. To handle the display of the
10679     /// tooltip yourself return true (1). Otherwise, you can optionally modify
10680     /// |text| and then return false (0) to allow the browser to display the
10681     /// tooltip. When window rendering is disabled the application is responsible
10682     /// for drawing tooltips and the return value is ignored.
10683     ///
10684     extern(System) int function (
10685         cef_display_handler_t* self,
10686         cef_browser_t* browser,
10687         cef_string_t* text) nothrow on_tooltip;
10688 
10689     ///
10690     /// Called when the browser receives a status message. |value| contains the
10691     /// text that will be displayed in the status message.
10692     ///
10693     extern(System) void function (
10694         cef_display_handler_t* self,
10695         cef_browser_t* browser,
10696         const(cef_string_t)* value) nothrow on_status_message;
10697 
10698     ///
10699     /// Called to display a console message. Return true (1) to stop the message
10700     /// from being output to the console.
10701     ///
10702     extern(System) int function (
10703         cef_display_handler_t* self,
10704         cef_browser_t* browser,
10705         cef_log_severity_t level,
10706         const(cef_string_t)* message,
10707         const(cef_string_t)* source,
10708         int line) nothrow on_console_message;
10709 
10710     ///
10711     /// Called when auto-resize is enabled via
10712     /// cef_browser_host_t::SetAutoResizeEnabled and the contents have auto-
10713     /// resized. |new_size| will be the desired size in view coordinates. Return
10714     /// true (1) if the resize was handled or false (0) for default handling.
10715     ///
10716     extern(System) int function (
10717         cef_display_handler_t* self,
10718         cef_browser_t* browser,
10719         const(cef_size_t)* new_size) nothrow on_auto_resize;
10720 
10721     ///
10722     /// Called when the overall page loading progress has changed. |progress|
10723     /// ranges from 0.0 to 1.0.
10724     ///
10725     extern(System) void function (
10726         cef_display_handler_t* self,
10727         cef_browser_t* browser,
10728         double progress) nothrow on_loading_progress_change;
10729 
10730     ///
10731     /// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
10732     /// |custom_cursor_info| will be populated with the custom cursor information.
10733     /// Return true (1) if the cursor change was handled or false (0) for default
10734     /// handling.
10735     ///
10736     extern(System) int function (
10737         cef_display_handler_t* self,
10738         cef_browser_t* browser,
10739         c_ulong cursor,
10740         cef_cursor_type_t type,
10741         const(cef_cursor_info_t)* custom_cursor_info) nothrow on_cursor_change;
10742 
10743     ///
10744     /// Called when the browser's access to an audio and/or video source has
10745     /// changed.
10746     ///
10747     extern(System) void function (
10748         cef_display_handler_t* self,
10749         cef_browser_t* browser,
10750         int has_video_access,
10751         int has_audio_access) nothrow on_media_access_change;
10752 }
10753 
10754 
10755 
10756 // CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
10757 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
10758 //
10759 // Redistribution and use in source and binary forms, with or without
10760 // modification, are permitted provided that the following conditions are
10761 // met:
10762 //
10763 //    * Redistributions of source code must retain the above copyright
10764 // notice, this list of conditions and the following disclaimer.
10765 //    * Redistributions in binary form must reproduce the above
10766 // copyright notice, this list of conditions and the following disclaimer
10767 // in the documentation and/or other materials provided with the
10768 // distribution.
10769 //    * Neither the name of Google Inc. nor the name Chromium Embedded
10770 // Framework nor the names of its contributors may be used to endorse
10771 // or promote products derived from this software without specific prior
10772 // written permission.
10773 //
10774 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10775 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10776 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10777 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10778 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10779 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10780 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10781 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10782 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10783 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10784 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10785 //
10786 // ---------------------------------------------------------------------------
10787 //
10788 // This file was generated by the CEF translator tool and should not edited
10789 // by hand. See the translator.README.txt file in the tools directory for
10790 // more information.
10791 //
10792 // $hash=f18407bec715e682d5745aeb155a0113473723dd$
10793 //
10794 
10795 extern (C):
10796 
10797 ///
10798 /// Structure to implement for visiting the DOM. The functions of this structure
10799 /// will be called on the render process main thread.
10800 ///
10801 struct cef_domvisitor_t
10802 {
10803     ///
10804     /// Base structure.
10805     ///
10806 
10807     ///
10808     /// Method executed for visiting the DOM. The document object passed to this
10809     /// function represents a snapshot of the DOM at the time this function is
10810     /// executed. DOM objects are only valid for the scope of this function. Do
10811     /// not keep references to or attempt to access any DOM objects outside the
10812     /// scope of this function.
10813     ///
10814 
10815     ///
10816     /// Structure used to represent a DOM document. The functions of this structure
10817     /// should only be called on the render process main thread thread.
10818     cef_base_ref_counted_t base;
10819     extern(System) void function (
10820         cef_domvisitor_t* self,
10821         cef_domdocument_t* document) nothrow visit;
10822 }
10823 
10824 
10825 ///
10826 struct cef_domdocument_t
10827 {
10828     ///
10829     /// Base structure.
10830     ///
10831     cef_base_ref_counted_t base;
10832 
10833     ///
10834     /// Returns the document type.
10835     ///
10836     extern(System) cef_dom_document_type_t function (cef_domdocument_t* self) nothrow get_type;
10837 
10838     ///
10839     /// Returns the root document node.
10840     ///
10841     extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_document;
10842 
10843     ///
10844     /// Returns the BODY node of an HTML document.
10845     ///
10846     extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_body;
10847 
10848     ///
10849     /// Returns the HEAD node of an HTML document.
10850     ///
10851     extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_head;
10852 
10853     ///
10854     /// Returns the title of an HTML document.
10855     ///
10856     // The resulting string must be freed by calling cef_string_userfree_free().
10857     extern(System) cef_string_userfree_t function (cef_domdocument_t* self) nothrow get_title;
10858 
10859     ///
10860     /// Returns the document element with the specified ID value.
10861     ///
10862     extern(System) cef_domnode_t* function (
10863         cef_domdocument_t* self,
10864         const(cef_string_t)* id) nothrow get_element_by_id;
10865 
10866     ///
10867     /// Returns the node that currently has keyboard focus.
10868     ///
10869     extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_focused_node;
10870 
10871     ///
10872     /// Returns true (1) if a portion of the document is selected.
10873     ///
10874     extern(System) int function (cef_domdocument_t* self) nothrow has_selection;
10875 
10876     ///
10877     /// Returns the selection offset within the start node.
10878     ///
10879     extern(System) int function (cef_domdocument_t* self) nothrow get_selection_start_offset;
10880 
10881     ///
10882     /// Returns the selection offset within the end node.
10883     ///
10884     extern(System) int function (cef_domdocument_t* self) nothrow get_selection_end_offset;
10885 
10886     ///
10887     /// Returns the contents of this selection as markup.
10888     ///
10889     // The resulting string must be freed by calling cef_string_userfree_free().
10890     extern(System) cef_string_userfree_t function (
10891         cef_domdocument_t* self) nothrow get_selection_as_markup;
10892 
10893     ///
10894     /// Returns the contents of this selection as text.
10895     ///
10896     // The resulting string must be freed by calling cef_string_userfree_free().
10897     extern(System) cef_string_userfree_t function (
10898         cef_domdocument_t* self) nothrow get_selection_as_text;
10899 
10900     ///
10901     /// Returns the base URL for the document.
10902     ///
10903     // The resulting string must be freed by calling cef_string_userfree_free().
10904     extern(System) cef_string_userfree_t function (cef_domdocument_t* self) nothrow get_base_url;
10905 
10906     ///
10907     /// Returns a complete URL based on the document base URL and the specified
10908     /// partial URL.
10909     ///
10910     // The resulting string must be freed by calling cef_string_userfree_free().
10911     extern(System) cef_string_userfree_t function (
10912         cef_domdocument_t* self,
10913         const(cef_string_t)* partialURL) nothrow get_complete_url;
10914 }
10915 
10916 
10917 
10918 ///
10919 /// Structure used to represent a DOM node. The functions of this structure
10920 /// should only be called on the render process main thread.
10921 ///
10922 struct cef_domnode_t
10923 {
10924     ///
10925     /// Base structure.
10926     ///
10927     cef_base_ref_counted_t base;
10928 
10929     ///
10930     /// Returns the type for this node.
10931     ///
10932     extern(System) cef_dom_node_type_t function (cef_domnode_t* self) nothrow get_type;
10933 
10934     ///
10935     /// Returns true (1) if this is a text node.
10936     ///
10937     extern(System) int function (cef_domnode_t* self) nothrow is_text;
10938 
10939     ///
10940     /// Returns true (1) if this is an element node.
10941     ///
10942     extern(System) int function (cef_domnode_t* self) nothrow is_element;
10943 
10944     ///
10945     /// Returns true (1) if this is an editable node.
10946     ///
10947     extern(System) int function (cef_domnode_t* self) nothrow is_editable;
10948 
10949     ///
10950     /// Returns true (1) if this is a form control element node.
10951     ///
10952     extern(System) int function (cef_domnode_t* self) nothrow is_form_control_element;
10953 
10954     ///
10955     /// Returns the type of this form control element node.
10956     ///
10957     extern(System) cef_dom_form_control_type_t function (
10958         cef_domnode_t* self) nothrow get_form_control_element_type;
10959 
10960     ///
10961     /// Returns true (1) if this object is pointing to the same handle as |that|
10962     /// object.
10963     ///
10964     extern(System) int function (cef_domnode_t* self, cef_domnode_t* that) nothrow is_same;
10965 
10966     ///
10967     /// Returns the name of this node.
10968     ///
10969     // The resulting string must be freed by calling cef_string_userfree_free().
10970     extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_name;
10971 
10972     ///
10973     /// Returns the value of this node.
10974     ///
10975     // The resulting string must be freed by calling cef_string_userfree_free().
10976     extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_value;
10977 
10978     ///
10979     /// Set the value of this node. Returns true (1) on success.
10980     ///
10981     extern(System) int function (cef_domnode_t* self, const(cef_string_t)* value) nothrow set_value;
10982 
10983     ///
10984     /// Returns the contents of this node as markup.
10985     ///
10986     // The resulting string must be freed by calling cef_string_userfree_free().
10987     extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_as_markup;
10988 
10989     ///
10990     /// Returns the document associated with this node.
10991     ///
10992     extern(System) cef_domdocument_t* function (cef_domnode_t* self) nothrow get_document;
10993 
10994     ///
10995     /// Returns the parent node.
10996     ///
10997     extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_parent;
10998 
10999     ///
11000     /// Returns the previous sibling node.
11001     ///
11002     extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_previous_sibling;
11003 
11004     ///
11005     /// Returns the next sibling node.
11006     ///
11007     extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_next_sibling;
11008 
11009     ///
11010     /// Returns true (1) if this node has child nodes.
11011     ///
11012     extern(System) int function (cef_domnode_t* self) nothrow has_children;
11013 
11014     ///
11015     /// Return the first child node.
11016     ///
11017     extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_first_child;
11018 
11019     ///
11020     /// Returns the last child node.
11021     ///
11022     extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_last_child;
11023 
11024     ///
11025     /// Returns the tag name of this element.
11026     ///
11027     // The resulting string must be freed by calling cef_string_userfree_free().
11028     extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_element_tag_name;
11029 
11030     ///
11031     /// Returns true (1) if this element has attributes.
11032     ///
11033     extern(System) int function (cef_domnode_t* self) nothrow has_element_attributes;
11034 
11035     ///
11036     /// Returns true (1) if this element has an attribute named |attrName|.
11037     ///
11038     extern(System) int function (
11039         cef_domnode_t* self,
11040         const(cef_string_t)* attrName) nothrow has_element_attribute;
11041 
11042     ///
11043     /// Returns the element attribute named |attrName|.
11044     ///
11045     // The resulting string must be freed by calling cef_string_userfree_free().
11046     extern(System) cef_string_userfree_t function (
11047         cef_domnode_t* self,
11048         const(cef_string_t)* attrName) nothrow get_element_attribute;
11049 
11050     ///
11051     /// Returns a map of all element attributes.
11052     ///
11053     extern(System) void function (
11054         cef_domnode_t* self,
11055         cef_string_map_t attrMap) nothrow get_element_attributes;
11056 
11057     ///
11058     /// Set the value for the element attribute named |attrName|. Returns true (1)
11059     /// on success.
11060     ///
11061     extern(System) int function (
11062         cef_domnode_t* self,
11063         const(cef_string_t)* attrName,
11064         const(cef_string_t)* value) nothrow set_element_attribute;
11065 
11066     ///
11067     /// Returns the inner text of the element.
11068     ///
11069     // The resulting string must be freed by calling cef_string_userfree_free().
11070     extern(System) cef_string_userfree_t function (
11071         cef_domnode_t* self) nothrow get_element_inner_text;
11072 
11073     ///
11074     /// Returns the bounds of the element in device pixels. Use
11075     /// "window.devicePixelRatio" to convert to/from CSS pixels.
11076     ///
11077     extern(System) cef_rect_t function (cef_domnode_t* self) nothrow get_element_bounds;
11078 }
11079 
11080 
11081 
11082 // CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_
11083 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
11084 //
11085 // Redistribution and use in source and binary forms, with or without
11086 // modification, are permitted provided that the following conditions are
11087 // met:
11088 //
11089 //    * Redistributions of source code must retain the above copyright
11090 // notice, this list of conditions and the following disclaimer.
11091 //    * Redistributions in binary form must reproduce the above
11092 // copyright notice, this list of conditions and the following disclaimer
11093 // in the documentation and/or other materials provided with the
11094 // distribution.
11095 //    * Neither the name of Google Inc. nor the name Chromium Embedded
11096 // Framework nor the names of its contributors may be used to endorse
11097 // or promote products derived from this software without specific prior
11098 // written permission.
11099 //
11100 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11101 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11102 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11103 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11104 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11105 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11106 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11107 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11108 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11109 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11110 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11111 //
11112 // ---------------------------------------------------------------------------
11113 //
11114 // This file was generated by the CEF translator tool and should not edited
11115 // by hand. See the translator.README.txt file in the tools directory for
11116 // more information.
11117 //
11118 // $hash=f1f6a110a7ce15611a7062b3d7fe8b5c630f2980$
11119 //
11120 
11121 extern (C):
11122 
11123 ///
11124 /// Callback structure used to asynchronously continue a download.
11125 ///
11126 struct cef_before_download_callback_t
11127 {
11128     ///
11129     /// Base structure.
11130     ///
11131 
11132     ///
11133     /// Call to continue the download. Set |download_path| to the full file path
11134     /// for the download including the file name or leave blank to use the
11135     /// suggested name and the default temp directory. Set |show_dialog| to true
11136     /// (1) if you do wish to show the default "Save As" dialog.
11137     ///
11138 
11139     ///
11140     /// Callback structure used to asynchronously cancel a download.
11141     ///
11142     cef_base_ref_counted_t base;
11143     extern(System) void function (
11144         cef_before_download_callback_t* self,
11145         const(cef_string_t)* download_path,
11146         int show_dialog) nothrow cont;
11147 }
11148 
11149 
11150 
11151 struct cef_download_item_callback_t
11152 {
11153     ///
11154     /// Base structure.
11155     ///
11156     cef_base_ref_counted_t base;
11157 
11158     ///
11159     /// Call to cancel the download.
11160     ///
11161     extern(System) void function (cef_download_item_callback_t* self) nothrow cancel;
11162 
11163     ///
11164     /// Call to pause the download.
11165     ///
11166     extern(System) void function (cef_download_item_callback_t* self) nothrow pause;
11167 
11168     ///
11169     /// Call to resume the download.
11170     ///
11171     extern(System) void function (cef_download_item_callback_t* self) nothrow resume;
11172 }
11173 
11174 
11175 
11176 ///
11177 /// Structure used to handle file downloads. The functions of this structure
11178 /// will called on the browser process UI thread.
11179 ///
11180 struct cef_download_handler_t
11181 {
11182     ///
11183     /// Base structure.
11184     ///
11185     cef_base_ref_counted_t base;
11186 
11187     ///
11188     /// Called before a download begins in response to a user-initiated action
11189     /// (e.g. alt + link click or link click that returns a `Content-Disposition:
11190     /// attachment` response from the server). |url| is the target download URL
11191     /// and |request_function| is the target function (GET, POST, etc) nothrow. Return
11192     /// true (1) to proceed with the download or false (0) to cancel the download.
11193     ///
11194     extern(System) int function (
11195         cef_download_handler_t* self,
11196         cef_browser_t* browser,
11197         const(cef_string_t)* url,
11198         const(cef_string_t)* request_method) nothrow can_download;
11199 
11200     ///
11201     /// Called before a download begins. |suggested_name| is the suggested name
11202     /// for the download file. By default the download will be canceled. Execute
11203     /// |callback| either asynchronously or in this function to continue the
11204     /// download if desired. Do not keep a reference to |download_item| outside of
11205     /// this function.
11206     ///
11207     extern(System) void function (
11208         cef_download_handler_t* self,
11209         cef_browser_t* browser,
11210         cef_download_item_t* download_item,
11211         const(cef_string_t)* suggested_name,
11212         cef_before_download_callback_t* callback) nothrow on_before_download;
11213 
11214     ///
11215     /// Called when a download's status or progress information has been updated.
11216     /// This may be called multiple times before and after on_before_download().
11217     /// Execute |callback| either asynchronously or in this function to cancel the
11218     /// download if desired. Do not keep a reference to |download_item| outside of
11219     /// this function.
11220     ///
11221     extern(System) void function (
11222         cef_download_handler_t* self,
11223         cef_browser_t* browser,
11224         cef_download_item_t* download_item,
11225         cef_download_item_callback_t* callback) nothrow on_download_updated;
11226 }
11227 
11228 
11229 
11230 // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_
11231 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
11232 //
11233 // Redistribution and use in source and binary forms, with or without
11234 // modification, are permitted provided that the following conditions are
11235 // met:
11236 //
11237 //    * Redistributions of source code must retain the above copyright
11238 // notice, this list of conditions and the following disclaimer.
11239 //    * Redistributions in binary form must reproduce the above
11240 // copyright notice, this list of conditions and the following disclaimer
11241 // in the documentation and/or other materials provided with the
11242 // distribution.
11243 //    * Neither the name of Google Inc. nor the name Chromium Embedded
11244 // Framework nor the names of its contributors may be used to endorse
11245 // or promote products derived from this software without specific prior
11246 // written permission.
11247 //
11248 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11249 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11250 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11251 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11252 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11253 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11254 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11255 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11256 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11257 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11258 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11259 //
11260 // ---------------------------------------------------------------------------
11261 //
11262 // This file was generated by the CEF translator tool and should not edited
11263 // by hand. See the translator.README.txt file in the tools directory for
11264 // more information.
11265 //
11266 // $hash=c4ecfde5d6791400c4b3fd466e7d3676d51cf8d8$
11267 //
11268 
11269 extern (C):
11270 
11271 ///
11272 /// Structure used to represent a download item.
11273 ///
11274 struct cef_download_item_t
11275 {
11276     ///
11277     /// Base structure.
11278     ///
11279 
11280     ///
11281     /// Returns true (1) if this object is valid. Do not call any other functions
11282     /// if this function returns false (0).
11283     ///
11284 
11285     ///
11286     /// Returns true (1) if the download is in progress.
11287     ///
11288 
11289     ///
11290     /// Returns true (1) if the download is complete.
11291     ///
11292 
11293     ///
11294     /// Returns true (1) if the download has been canceled.
11295     ///
11296 
11297     ///
11298     /// Returns true (1) if the download has been interrupted.
11299     ///
11300     cef_base_ref_counted_t base;
11301     extern(System) int function (cef_download_item_t* self) nothrow is_valid;
11302     extern(System) int function (cef_download_item_t* self) nothrow is_in_progress;
11303     extern(System) int function (cef_download_item_t* self) nothrow is_complete;
11304     extern(System) int function (cef_download_item_t* self) nothrow is_canceled;
11305     extern(System) int function (cef_download_item_t* self) nothrow is_interrupted;
11306 
11307     ///
11308     /// Returns the most recent interrupt reason.
11309     ///
11310     extern(System) cef_download_interrupt_reason_t function (
11311         cef_download_item_t* self) nothrow get_interrupt_reason;
11312 
11313     ///
11314     /// Returns a simple speed estimate in bytes/s.
11315     ///
11316     extern(System) long function (cef_download_item_t* self) nothrow get_current_speed;
11317 
11318     ///
11319     /// Returns the rough percent complete or -1 if the receive total size is
11320     /// unknown.
11321     ///
11322     extern(System) int function (cef_download_item_t* self) nothrow get_percent_complete;
11323 
11324     ///
11325     /// Returns the total number of bytes.
11326     ///
11327     extern(System) long function (cef_download_item_t* self) nothrow get_total_bytes;
11328 
11329     ///
11330     /// Returns the number of received bytes.
11331     ///
11332     extern(System) long function (cef_download_item_t* self) nothrow get_received_bytes;
11333 
11334     ///
11335     /// Returns the time that the download started.
11336     ///
11337     extern(System) cef_basetime_t function (cef_download_item_t* self) nothrow get_start_time;
11338 
11339     ///
11340     /// Returns the time that the download ended.
11341     ///
11342     extern(System) cef_basetime_t function (cef_download_item_t* self) nothrow get_end_time;
11343 
11344     ///
11345     /// Returns the full path to the downloaded or downloading file.
11346     ///
11347     // The resulting string must be freed by calling cef_string_userfree_free().
11348     extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_full_path;
11349 
11350     ///
11351     /// Returns the unique identifier for this download.
11352     ///
11353     extern(System) uint function (cef_download_item_t* self) nothrow get_id;
11354 
11355     ///
11356     /// Returns the URL.
11357     ///
11358     // The resulting string must be freed by calling cef_string_userfree_free().
11359     extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_url;
11360 
11361     ///
11362     /// Returns the original URL before any redirections.
11363     ///
11364     // The resulting string must be freed by calling cef_string_userfree_free().
11365     extern(System) cef_string_userfree_t function (
11366         cef_download_item_t* self) nothrow get_original_url;
11367 
11368     ///
11369     /// Returns the suggested file name.
11370     ///
11371     // The resulting string must be freed by calling cef_string_userfree_free().
11372     extern(System) cef_string_userfree_t function (
11373         cef_download_item_t* self) nothrow get_suggested_file_name;
11374 
11375     ///
11376     /// Returns the content disposition.
11377     ///
11378     // The resulting string must be freed by calling cef_string_userfree_free().
11379     extern(System) cef_string_userfree_t function (
11380         cef_download_item_t* self) nothrow get_content_disposition;
11381 
11382     ///
11383     /// Returns the mime type.
11384     ///
11385     // The resulting string must be freed by calling cef_string_userfree_free().
11386     extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_mime_type;
11387 }
11388 
11389 
11390 
11391 // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_
11392 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
11393 //
11394 // Redistribution and use in source and binary forms, with or without
11395 // modification, are permitted provided that the following conditions are
11396 // met:
11397 //
11398 //    * Redistributions of source code must retain the above copyright
11399 // notice, this list of conditions and the following disclaimer.
11400 //    * Redistributions in binary form must reproduce the above
11401 // copyright notice, this list of conditions and the following disclaimer
11402 // in the documentation and/or other materials provided with the
11403 // distribution.
11404 //    * Neither the name of Google Inc. nor the name Chromium Embedded
11405 // Framework nor the names of its contributors may be used to endorse
11406 // or promote products derived from this software without specific prior
11407 // written permission.
11408 //
11409 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11410 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11411 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11412 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11413 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11414 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11415 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11416 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11417 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11418 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11419 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11420 //
11421 // ---------------------------------------------------------------------------
11422 //
11423 // This file was generated by the CEF translator tool and should not edited
11424 // by hand. See the translator.README.txt file in the tools directory for
11425 // more information.
11426 //
11427 // $hash=8d00465ba004758f464cdb8b1fbd02cd26323ace$
11428 //
11429 
11430 extern (C):
11431 
11432 ///
11433 /// Structure used to represent drag data. The functions of this structure may
11434 /// be called on any thread.
11435 ///
11436 struct cef_drag_data_t
11437 {
11438     ///
11439     /// Base structure.
11440     ///
11441 
11442     ///
11443     /// Returns a copy of the current object.
11444     ///
11445 
11446     ///
11447     /// Returns true (1) if this object is read-only.
11448     ///
11449 
11450     ///
11451     /// Returns true (1) if the drag data is a link.
11452     ///
11453 
11454     ///
11455     /// Returns true (1) if the drag data is a text or html fragment.
11456     ///
11457 
11458     ///
11459     /// Returns true (1) if the drag data is a file.
11460     ///
11461     cef_base_ref_counted_t base;
11462     extern(System) cef_drag_data_t* function (cef_drag_data_t* self) nothrow clone;
11463     extern(System) int function (cef_drag_data_t* self) nothrow is_read_only;
11464     extern(System) int function (cef_drag_data_t* self) nothrow is_link;
11465     extern(System) int function (cef_drag_data_t* self) nothrow is_fragment;
11466     extern(System) int function (cef_drag_data_t* self) nothrow is_file;
11467 
11468     ///
11469     /// Return the link URL that is being dragged.
11470     ///
11471     // The resulting string must be freed by calling cef_string_userfree_free().
11472     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_url;
11473 
11474     ///
11475     /// Return the title associated with the link being dragged.
11476     ///
11477     // The resulting string must be freed by calling cef_string_userfree_free().
11478     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_title;
11479 
11480     ///
11481     /// Return the metadata, if any, associated with the link being dragged.
11482     ///
11483     // The resulting string must be freed by calling cef_string_userfree_free().
11484     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_metadata;
11485 
11486     ///
11487     /// Return the plain text fragment that is being dragged.
11488     ///
11489     // The resulting string must be freed by calling cef_string_userfree_free().
11490     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_fragment_text;
11491 
11492     ///
11493     /// Return the text/html fragment that is being dragged.
11494     ///
11495     // The resulting string must be freed by calling cef_string_userfree_free().
11496     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_fragment_html;
11497 
11498     ///
11499     /// Return the base URL that the fragment came from. This value is used for
11500     /// resolving relative URLs and may be NULL.
11501     ///
11502     // The resulting string must be freed by calling cef_string_userfree_free().
11503     extern(System) cef_string_userfree_t function (
11504         cef_drag_data_t* self) nothrow get_fragment_base_url;
11505 
11506     ///
11507     /// Return the name of the file being dragged out of the browser window.
11508     ///
11509     // The resulting string must be freed by calling cef_string_userfree_free().
11510     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_file_name;
11511 
11512     ///
11513     /// Write the contents of the file being dragged out of the web view into
11514     /// |writer|. Returns the number of bytes sent to |writer|. If |writer| is
11515     /// NULL this function will return the size of the file contents in bytes.
11516     /// Call get_file_name() to get a suggested name for the file.
11517     ///
11518     extern(System) size_t function (
11519         cef_drag_data_t* self,
11520         cef_stream_writer_t* writer) nothrow get_file_contents;
11521 
11522     ///
11523     /// Retrieve the list of file names that are being dragged into the browser
11524     /// window.
11525     ///
11526     extern(System) int function (
11527         cef_drag_data_t* self,
11528         cef_string_list_t names) nothrow get_file_names;
11529 
11530     ///
11531     /// Retrieve the list of file paths that are being dragged into the browser
11532     /// window.
11533     ///
11534     extern(System) int function (
11535         cef_drag_data_t* self,
11536         cef_string_list_t paths) nothrow get_file_paths;
11537 
11538     ///
11539     /// Set the link URL that is being dragged.
11540     ///
11541     extern(System) void function (
11542         cef_drag_data_t* self,
11543         const(cef_string_t)* url) nothrow set_link_url;
11544 
11545     ///
11546     /// Set the title associated with the link being dragged.
11547     ///
11548     extern(System) void function (
11549         cef_drag_data_t* self,
11550         const(cef_string_t)* title) nothrow set_link_title;
11551 
11552     ///
11553     /// Set the metadata associated with the link being dragged.
11554     ///
11555     extern(System) void function (
11556         cef_drag_data_t* self,
11557         const(cef_string_t)* data) nothrow set_link_metadata;
11558 
11559     ///
11560     /// Set the plain text fragment that is being dragged.
11561     ///
11562     extern(System) void function (
11563         cef_drag_data_t* self,
11564         const(cef_string_t)* text) nothrow set_fragment_text;
11565 
11566     ///
11567     /// Set the text/html fragment that is being dragged.
11568     ///
11569     extern(System) void function (
11570         cef_drag_data_t* self,
11571         const(cef_string_t)* html) nothrow set_fragment_html;
11572 
11573     ///
11574     /// Set the base URL that the fragment came from.
11575     ///
11576     extern(System) void function (
11577         cef_drag_data_t* self,
11578         const(cef_string_t)* base_url) nothrow set_fragment_base_url;
11579 
11580     ///
11581     /// Reset the file contents. You should do this before calling
11582     /// cef_browser_host_t::DragTargetDragEnter as the web view does not allow us
11583     /// to drag in this kind of data.
11584     ///
11585     extern(System) void function (cef_drag_data_t* self) nothrow reset_file_contents;
11586 
11587     ///
11588     /// Add a file that is being dragged into the webview.
11589     ///
11590     extern(System) void function (
11591         cef_drag_data_t* self,
11592         const(cef_string_t)* path,
11593         const(cef_string_t)* display_name) nothrow add_file;
11594 
11595     ///
11596     /// Clear list of filenames.
11597     ///
11598     extern(System) void function (cef_drag_data_t* self) nothrow clear_filenames;
11599 
11600     ///
11601     /// Get the image representation of drag data. May return NULL if no image
11602     /// representation is available.
11603     ///
11604     extern(System) cef_image_t* function (cef_drag_data_t* self) nothrow get_image;
11605 
11606     ///
11607     /// Get the image hotspot (drag start location relative to image dimensions).
11608     ///
11609     extern(System) cef_point_t function (cef_drag_data_t* self) nothrow get_image_hotspot;
11610 
11611     ///
11612     /// Returns true (1) if an image representation of drag data is available.
11613     ///
11614     extern(System) int function (cef_drag_data_t* self) nothrow has_image;
11615 }
11616 
11617 
11618 
11619 ///
11620 /// Create a new cef_drag_data_t object.
11621 ///
11622 cef_drag_data_t* cef_drag_data_create ();
11623 
11624 // CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
11625 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
11626 //
11627 // Redistribution and use in source and binary forms, with or without
11628 // modification, are permitted provided that the following conditions are
11629 // met:
11630 //
11631 //    * Redistributions of source code must retain the above copyright
11632 // notice, this list of conditions and the following disclaimer.
11633 //    * Redistributions in binary form must reproduce the above
11634 // copyright notice, this list of conditions and the following disclaimer
11635 // in the documentation and/or other materials provided with the
11636 // distribution.
11637 //    * Neither the name of Google Inc. nor the name Chromium Embedded
11638 // Framework nor the names of its contributors may be used to endorse
11639 // or promote products derived from this software without specific prior
11640 // written permission.
11641 //
11642 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11643 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11644 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11645 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11646 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11647 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11648 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11649 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11650 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11651 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11652 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11653 //
11654 // ---------------------------------------------------------------------------
11655 //
11656 // This file was generated by the CEF translator tool and should not edited
11657 // by hand. See the translator.README.txt file in the tools directory for
11658 // more information.
11659 //
11660 // $hash=ad16b0f4320d7b363efb152a65e3ce142882b9d9$
11661 //
11662 
11663 extern (C):
11664 
11665 ///
11666 /// Implement this structure to handle events related to dragging. The functions
11667 /// of this structure will be called on the UI thread.
11668 ///
11669 struct cef_drag_handler_t
11670 {
11671     ///
11672     /// Base structure.
11673     ///
11674 
11675     ///
11676     /// Called when an external drag event enters the browser window. |dragData|
11677     /// contains the drag event data and |mask| represents the type of drag
11678     /// operation. Return false (0) for default drag handling behavior or true (1)
11679     /// to cancel the drag event.
11680     ///
11681     cef_base_ref_counted_t base;
11682     extern(System) int function (
11683         cef_drag_handler_t* self,
11684         cef_browser_t* browser,
11685         cef_drag_data_t* dragData,
11686         cef_drag_operations_mask_t mask) nothrow on_drag_enter;
11687     ///
11688     /// Called whenever draggable regions for the browser window change. These can
11689     /// be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If
11690     /// draggable regions are never defined in a document this function will also
11691     /// never be called. If the last draggable region is removed from a document
11692     /// this function will be called with an NULL vector.
11693     ///
11694     extern(System) void function (
11695         cef_drag_handler_t* self,
11696         cef_browser_t* browser,
11697         cef_frame_t* frame,
11698         size_t regionsCount,
11699         const(cef_draggable_region_t)* regions) nothrow on_draggable_regions_changed;
11700 }
11701 
11702 
11703 
11704 // CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
11705 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
11706 //
11707 // Redistribution and use in source and binary forms, with or without
11708 // modification, are permitted provided that the following conditions are
11709 // met:
11710 //
11711 //    * Redistributions of source code must retain the above copyright
11712 // notice, this list of conditions and the following disclaimer.
11713 //    * Redistributions in binary form must reproduce the above
11714 // copyright notice, this list of conditions and the following disclaimer
11715 // in the documentation and/or other materials provided with the
11716 // distribution.
11717 //    * Neither the name of Google Inc. nor the name Chromium Embedded
11718 // Framework nor the names of its contributors may be used to endorse
11719 // or promote products derived from this software without specific prior
11720 // written permission.
11721 //
11722 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11723 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11724 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11725 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11726 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11727 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11728 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11729 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11730 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11731 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11732 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11733 //
11734 // ---------------------------------------------------------------------------
11735 //
11736 // This file was generated by the CEF translator tool and should not edited
11737 // by hand. See the translator.README.txt file in the tools directory for
11738 // more information.
11739 //
11740 // $hash=c81a74622b987483e5fcd2c508aec5c13e12389b$
11741 //
11742 
11743 extern (C):
11744 
11745 
11746 
11747 
11748 ///
11749 /// Object representing an extension. Methods may be called on any thread unless
11750 /// otherwise indicated.
11751 ///
11752 struct cef_extension_t
11753 {
11754     ///
11755     /// Base structure.
11756     ///
11757 
11758     ///
11759     /// Returns the unique extension identifier. This is calculated based on the
11760     /// extension public key, if available, or on the extension path. See
11761     /// https://developer.chrome.com/extensions/manifest/key for details.
11762     ///
11763     // The resulting string must be freed by calling cef_string_userfree_free().
11764 
11765     ///
11766     /// Returns the absolute path to the extension directory on disk. This value
11767     /// will be prefixed with PK_DIR_RESOURCES if a relative path was passed to
11768     /// cef_request_context_t::LoadExtension.
11769     cef_base_ref_counted_t base;
11770     extern(System) cef_string_userfree_t function (cef_extension_t* self) nothrow get_identifier;
11771     ///
11772     // The resulting string must be freed by calling cef_string_userfree_free().
11773     extern(System) cef_string_userfree_t function (cef_extension_t* self) nothrow get_path;
11774 
11775     ///
11776     /// Returns the extension manifest contents as a cef_dictionary_value_t
11777     /// object. See https://developer.chrome.com/extensions/manifest for details.
11778     ///
11779     extern(System) cef_dictionary_value_t* function (cef_extension_t* self) nothrow get_manifest;
11780 
11781     ///
11782     /// Returns true (1) if this object is the same extension as |that| object.
11783     /// Extensions are considered the same if identifier, path and loader context
11784     /// match.
11785     ///
11786     extern(System) int function (cef_extension_t* self, cef_extension_t* that) nothrow is_same;
11787 
11788     ///
11789     /// Returns the handler for this extension. Will return NULL for internal
11790     /// extensions or if no handler was passed to
11791     /// cef_request_context_t::LoadExtension.
11792     ///
11793     extern(System) cef_extension_handler_t* function (cef_extension_t* self) nothrow get_handler;
11794 
11795     ///
11796     /// Returns the request context that loaded this extension. Will return NULL
11797     /// for internal extensions or if the extension has been unloaded. See the
11798     /// cef_request_context_t::LoadExtension documentation for more information
11799     /// about loader contexts. Must be called on the browser process UI thread.
11800     ///
11801     extern(System) cef_request_context_t* function (
11802         cef_extension_t* self) nothrow get_loader_context;
11803 
11804     ///
11805     /// Returns true (1) if this extension is currently loaded. Must be called on
11806     /// the browser process UI thread.
11807     ///
11808     extern(System) int function (cef_extension_t* self) nothrow is_loaded;
11809 
11810     ///
11811     /// Unload this extension if it is not an internal extension and is currently
11812     /// loaded. Will result in a call to
11813     /// cef_extension_handler_t::OnExtensionUnloaded on success.
11814     ///
11815     extern(System) void function (cef_extension_t* self) nothrow unload;
11816 }
11817 
11818 
11819 
11820 // CEF_INCLUDE_CAPI_CEF_EXTENSION_CAPI_H_
11821 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
11822 //
11823 // Redistribution and use in source and binary forms, with or without
11824 // modification, are permitted provided that the following conditions are
11825 // met:
11826 //
11827 //    * Redistributions of source code must retain the above copyright
11828 // notice, this list of conditions and the following disclaimer.
11829 //    * Redistributions in binary form must reproduce the above
11830 // copyright notice, this list of conditions and the following disclaimer
11831 // in the documentation and/or other materials provided with the
11832 // distribution.
11833 //    * Neither the name of Google Inc. nor the name Chromium Embedded
11834 // Framework nor the names of its contributors may be used to endorse
11835 // or promote products derived from this software without specific prior
11836 // written permission.
11837 //
11838 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11839 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11840 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11841 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11842 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11843 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11844 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11845 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11846 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11847 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11848 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11849 //
11850 // ---------------------------------------------------------------------------
11851 //
11852 // This file was generated by the CEF translator tool and should not edited
11853 // by hand. See the translator.README.txt file in the tools directory for
11854 // more information.
11855 //
11856 // $hash=ad6d3845b150f22b88a71dafa601ef01c9579824$
11857 //
11858 
11859 extern (C):
11860 
11861 
11862 
11863 ///
11864 /// Callback structure used for asynchronous continuation of
11865 /// cef_extension_handler_t::GetExtensionResource.
11866 ///
11867 struct cef_get_extension_resource_callback_t
11868 {
11869     ///
11870     /// Base structure.
11871     ///
11872 
11873     ///
11874     /// Continue the request. Read the resource contents from |stream|.
11875     ///
11876 
11877     ///
11878     /// Cancel the request.
11879     ///
11880 
11881     ///
11882     /// Implement this structure to handle events related to browser extensions. The
11883     /// functions of this structure will be called on the UI thread. See
11884     cef_base_ref_counted_t base;
11885     extern(System) void function (
11886         cef_get_extension_resource_callback_t* self,
11887         cef_stream_reader_t* stream) nothrow cont;
11888     extern(System) void function (cef_get_extension_resource_callback_t* self) nothrow cancel;
11889 }
11890 
11891 
11892 /// cef_request_context_t::LoadExtension for information about extension
11893 /// loading.
11894 ///
11895 struct cef_extension_handler_t
11896 {
11897     ///
11898     /// Base structure.
11899     ///
11900     cef_base_ref_counted_t base;
11901 
11902     ///
11903     /// Called if the cef_request_context_t::LoadExtension request fails. |result|
11904     /// will be the error code.
11905     ///
11906     extern(System) void function (
11907         cef_extension_handler_t* self,
11908         cef_errorcode_t result) nothrow on_extension_load_failed;
11909 
11910     ///
11911     /// Called if the cef_request_context_t::LoadExtension request succeeds.
11912     /// |extension| is the loaded extension.
11913     ///
11914     extern(System) void function (
11915         cef_extension_handler_t* self,
11916         cef_extension_t* extension) nothrow on_extension_loaded;
11917 
11918     ///
11919     /// Called after the cef_extension_t::Unload request has completed.
11920     ///
11921     extern(System) void function (
11922         cef_extension_handler_t* self,
11923         cef_extension_t* extension) nothrow on_extension_unloaded;
11924 
11925     ///
11926     /// Called when an extension needs a browser to host a background script
11927     /// specified via the "background" manifest key. The browser will have no
11928     /// visible window and cannot be displayed. |extension| is the extension that
11929     /// is loading the background script. |url| is an internally generated
11930     /// reference to an HTML page that will be used to load the background script
11931     /// via a "<script>" src attribute. To allow creation of the browser
11932     /// optionally modify |client| and |settings| and return false (0). To cancel
11933     /// creation of the browser (and consequently cancel load of the background
11934     /// script) return true (1). Successful creation will be indicated by a call
11935     /// to cef_life_span_handler_t::OnAfterCreated, and
11936     /// cef_browser_host_t::IsBackgroundHost will return true (1) for the
11937     /// resulting browser. See https://developer.chrome.com/extensions/event_pages
11938     /// for more information about extension background script usage.
11939     ///
11940     extern(System) int function (
11941         cef_extension_handler_t* self,
11942         cef_extension_t* extension,
11943         const(cef_string_t)* url,
11944         cef_client_t** client,
11945         cef_browser_settings_t* settings) nothrow on_before_background_browser;
11946 
11947     ///
11948     /// Called when an extension API (e.g. chrome.tabs.create) requests creation
11949     /// of a new browser. |extension| and |browser| are the source of the API
11950     /// call. |active_browser| may optionally be specified via the windowId
11951     /// property or returned via the get_active_browser() callback and provides
11952     /// the default |client| and |settings| values for the new browser. |index| is
11953     /// the position value optionally specified via the index property. |url| is
11954     /// the URL that will be loaded in the browser. |active| is true (1) if the
11955     /// new browser should be active when opened.  To allow creation of the
11956     /// browser optionally modify |windowInfo|, |client| and |settings| and return
11957     /// false (0). To cancel creation of the browser return true (1). Successful
11958     /// creation will be indicated by a call to
11959     /// cef_life_span_handler_t::OnAfterCreated. Any modifications to |windowInfo|
11960     /// will be ignored if |active_browser| is wrapped in a cef_browser_view_t.
11961     ///
11962     extern(System) int function (
11963         cef_extension_handler_t* self,
11964         cef_extension_t* extension,
11965         cef_browser_t* browser,
11966         cef_browser_t* active_browser,
11967         int index,
11968         const(cef_string_t)* url,
11969         int active,
11970         cef_window_info_t* windowInfo,
11971         cef_client_t** client,
11972         cef_browser_settings_t* settings) nothrow on_before_browser;
11973 
11974     ///
11975     /// Called when no tabId is specified to an extension API call that accepts a
11976     /// tabId parameter (e.g. chrome.tabs.*). |extension| and |browser| are the
11977     /// source of the API call. Return the browser that will be acted on by the
11978     /// API call or return NULL to act on |browser|. The returned browser must
11979     /// share the same cef_request_context_t as |browser|. Incognito browsers
11980     /// should not be considered unless the source extension has incognito access
11981     /// enabled, in which case |include_incognito| will be true (1).
11982     ///
11983     extern(System) cef_browser_t* function (
11984         cef_extension_handler_t* self,
11985         cef_extension_t* extension,
11986         cef_browser_t* browser,
11987         int include_incognito) nothrow get_active_browser;
11988 
11989     ///
11990     /// Called when the tabId associated with |target_browser| is specified to an
11991     /// extension API call that accepts a tabId parameter (e.g. chrome.tabs.*).
11992     /// |extension| and |browser| are the source of the API call. Return true (1)
11993     /// to allow access of false (0) to deny access. Access to incognito browsers
11994     /// should not be allowed unless the source extension has incognito access
11995     /// enabled, in which case |include_incognito| will be true (1).
11996     ///
11997     extern(System) int function (
11998         cef_extension_handler_t* self,
11999         cef_extension_t* extension,
12000         cef_browser_t* browser,
12001         int include_incognito,
12002         cef_browser_t* target_browser) nothrow can_access_browser;
12003 
12004     ///
12005     /// Called to retrieve an extension resource that would normally be loaded
12006     /// from disk (e.g. if a file parameter is specified to
12007     /// chrome.tabs.executeScript). |extension| and |browser| are the source of
12008     /// the resource request. |file| is the requested relative file path. To
12009     /// handle the resource request return true (1) and execute |callback| either
12010     /// synchronously or asynchronously. For the default behavior which reads the
12011     /// resource from the extension directory on disk return false (0).
12012     /// Localization substitutions will not be applied to resources handled via
12013     /// this function.
12014     ///
12015     extern(System) int function (
12016         cef_extension_handler_t* self,
12017         cef_extension_t* extension,
12018         cef_browser_t* browser,
12019         const(cef_string_t)* file,
12020         cef_get_extension_resource_callback_t* callback) nothrow get_extension_resource;
12021 }
12022 
12023 
12024 
12025 // CEF_INCLUDE_CAPI_CEF_EXTENSION_HANDLER_CAPI_H_
12026 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
12027 //
12028 // Redistribution and use in source and binary forms, with or without
12029 // modification, are permitted provided that the following conditions are
12030 // met:
12031 //
12032 //    * Redistributions of source code must retain the above copyright
12033 // notice, this list of conditions and the following disclaimer.
12034 //    * Redistributions in binary form must reproduce the above
12035 // copyright notice, this list of conditions and the following disclaimer
12036 // in the documentation and/or other materials provided with the
12037 // distribution.
12038 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12039 // Framework nor the names of its contributors may be used to endorse
12040 // or promote products derived from this software without specific prior
12041 // written permission.
12042 //
12043 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12044 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12045 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12046 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12047 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12048 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12049 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12050 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12051 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12052 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12053 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12054 //
12055 // ---------------------------------------------------------------------------
12056 //
12057 // This file was generated by the CEF translator tool and should not edited
12058 // by hand. See the translator.README.txt file in the tools directory for
12059 // more information.
12060 //
12061 // $hash=4e0e0abcb72327998df950e618b147b196e76b60$
12062 //
12063 
12064 extern (C):
12065 
12066 ///
12067 /// Creates a directory and all parent directories if they don't already exist.
12068 /// Returns true (1) on successful creation or if the directory already exists.
12069 /// The directory is only readable by the current user. Calling this function on
12070 /// the browser process UI or IO threads is not allowed.
12071 ///
12072 int cef_create_directory (const(cef_string_t)* full_path);
12073 
12074 ///
12075 /// Get the temporary directory provided by the system.
12076 ///
12077 /// WARNING: In general, you should use the temp directory variants below
12078 /// instead of this function. Those variants will ensure that the proper
12079 /// permissions are set so that other users on the system can't edit them while
12080 /// they're open (which could lead to security issues).
12081 ///
12082 int cef_get_temp_directory (cef_string_t* temp_dir);
12083 
12084 ///
12085 /// Creates a new directory. On Windows if |prefix| is provided the new
12086 /// directory name is in the format of "prefixyyyy". Returns true (1) on success
12087 /// and sets |new_temp_path| to the full path of the directory that was created.
12088 /// The directory is only readable by the current user. Calling this function on
12089 /// the browser process UI or IO threads is not allowed.
12090 ///
12091 int cef_create_new_temp_directory (
12092     const(cef_string_t)* prefix,
12093     cef_string_t* new_temp_path);
12094 
12095 ///
12096 /// Creates a directory within another directory. Extra characters will be
12097 /// appended to |prefix| to ensure that the new directory does not have the same
12098 /// name as an existing directory. Returns true (1) on success and sets
12099 /// |new_dir| to the full path of the directory that was created. The directory
12100 /// is only readable by the current user. Calling this function on the browser
12101 /// process UI or IO threads is not allowed.
12102 ///
12103 int cef_create_temp_directory_in_directory (
12104     const(cef_string_t)* base_dir,
12105     const(cef_string_t)* prefix,
12106     cef_string_t* new_dir);
12107 
12108 ///
12109 /// Returns true (1) if the given path exists and is a directory. Calling this
12110 /// function on the browser process UI or IO threads is not allowed.
12111 ///
12112 int cef_directory_exists (const(cef_string_t)* path);
12113 
12114 ///
12115 /// Deletes the given path whether it's a file or a directory. If |path| is a
12116 /// directory all contents will be deleted.  If |recursive| is true (1) any sub-
12117 /// directories and their contents will also be deleted (equivalent to executing
12118 /// "rm -rf", so use with caution). On POSIX environments if |path| is a
12119 /// symbolic link then only the symlink will be deleted. Returns true (1) on
12120 /// successful deletion or if |path| does not exist. Calling this function on
12121 /// the browser process UI or IO threads is not allowed.
12122 ///
12123 int cef_delete_file (const(cef_string_t)* path, int recursive);
12124 
12125 ///
12126 /// Writes the contents of |src_dir| into a zip archive at |dest_file|. If
12127 /// |include_hidden_files| is true (1) files starting with "." will be included.
12128 /// Returns true (1) on success.  Calling this function on the browser process
12129 /// UI or IO threads is not allowed.
12130 ///
12131 int cef_zip_directory (
12132     const(cef_string_t)* src_dir,
12133     const(cef_string_t)* dest_file,
12134     int include_hidden_files);
12135 
12136 ///
12137 /// Loads the existing "Certificate Revocation Lists" file that is managed by
12138 /// Google Chrome. This file can generally be found in Chrome's User Data
12139 /// directory (e.g. "C:\Users\[User]\AppData\Local\Google\Chrome\User Data\" on
12140 /// Windows) and is updated periodically by Chrome's component updater service.
12141 /// Must be called in the browser process after the context has been
12142 /// initialized. See https://dev.chromium.org/Home/chromium-security/crlsets for
12143 /// background.
12144 ///
12145 void cef_load_crlsets_file (const(cef_string_t)* path);
12146 
12147 // CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
12148 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
12149 //
12150 // Redistribution and use in source and binary forms, with or without
12151 // modification, are permitted provided that the following conditions are
12152 // met:
12153 //
12154 //    * Redistributions of source code must retain the above copyright
12155 // notice, this list of conditions and the following disclaimer.
12156 //    * Redistributions in binary form must reproduce the above
12157 // copyright notice, this list of conditions and the following disclaimer
12158 // in the documentation and/or other materials provided with the
12159 // distribution.
12160 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12161 // Framework nor the names of its contributors may be used to endorse
12162 // or promote products derived from this software without specific prior
12163 // written permission.
12164 //
12165 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12166 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12167 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12168 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12169 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12170 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12171 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12172 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12173 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12174 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12175 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12176 //
12177 // ---------------------------------------------------------------------------
12178 //
12179 // This file was generated by the CEF translator tool and should not edited
12180 // by hand. See the translator.README.txt file in the tools directory for
12181 // more information.
12182 //
12183 // $hash=8149c82dd6671d676ee62cb6749bf30b32a5832c$
12184 //
12185 
12186 extern (C):
12187 
12188 ///
12189 /// Implement this structure to handle events related to find results. The
12190 /// functions of this structure will be called on the UI thread.
12191 ///
12192 struct cef_find_handler_t
12193 {
12194     ///
12195     /// Base structure.
12196     ///
12197 
12198     ///
12199     /// Called to report find results returned by cef_browser_host_t::find().
12200     /// |identifer| is a unique incremental identifier for the currently active
12201     /// search, |count| is the number of matches currently identified,
12202     /// |selectionRect| is the location of where the match was found (in window
12203     /// coordinates), |activeMatchOrdinal| is the current position in the search
12204     /// results, and |finalUpdate| is true (1) if this is the last find
12205     /// notification.
12206     ///
12207     cef_base_ref_counted_t base;
12208     extern(System) void function (
12209         cef_find_handler_t* self,
12210         cef_browser_t* browser,
12211         int identifier,
12212         int count,
12213         const(cef_rect_t)* selectionRect,
12214         int activeMatchOrdinal,
12215         int finalUpdate) nothrow on_find_result;
12216 }
12217 
12218 
12219 
12220 // CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
12221 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
12222 //
12223 // Redistribution and use in source and binary forms, with or without
12224 // modification, are permitted provided that the following conditions are
12225 // met:
12226 //
12227 //    * Redistributions of source code must retain the above copyright
12228 // notice, this list of conditions and the following disclaimer.
12229 //    * Redistributions in binary form must reproduce the above
12230 // copyright notice, this list of conditions and the following disclaimer
12231 // in the documentation and/or other materials provided with the
12232 // distribution.
12233 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12234 // Framework nor the names of its contributors may be used to endorse
12235 // or promote products derived from this software without specific prior
12236 // written permission.
12237 //
12238 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12239 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12240 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12241 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12242 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12243 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12244 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12245 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12246 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12247 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12248 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12249 //
12250 // ---------------------------------------------------------------------------
12251 //
12252 // This file was generated by the CEF translator tool and should not edited
12253 // by hand. See the translator.README.txt file in the tools directory for
12254 // more information.
12255 //
12256 // $hash=53ec33c8937c735f646f9e0a14a416218e32887c$
12257 //
12258 
12259 extern (C):
12260 
12261 ///
12262 /// Implement this structure to handle events related to focus. The functions of
12263 /// this structure will be called on the UI thread.
12264 ///
12265 struct cef_focus_handler_t
12266 {
12267     ///
12268     /// Base structure.
12269     ///
12270 
12271     ///
12272     /// Called when the browser component is about to loose focus. For instance,
12273     /// if focus was on the last HTML element and the user pressed the TAB key.
12274     /// |next| will be true (1) if the browser is giving focus to the next
12275     /// component and false (0) if the browser is giving focus to the previous
12276     /// component.
12277     ///
12278 
12279     ///
12280     /// Called when the browser component is requesting focus. |source| indicates
12281     cef_base_ref_counted_t base;
12282     extern(System) void function (
12283         cef_focus_handler_t* self,
12284         cef_browser_t* browser,
12285         int next) nothrow on_take_focus;
12286     /// where the focus request is originating from. Return false (0) to allow the
12287     /// focus to be set or true (1) to cancel setting the focus.
12288     ///
12289     extern(System) int function (
12290         cef_focus_handler_t* self,
12291         cef_browser_t* browser,
12292         cef_focus_source_t source) nothrow on_set_focus;
12293 
12294     ///
12295     /// Called when the browser component has received focus.
12296     ///
12297     extern(System) void function (
12298         cef_focus_handler_t* self,
12299         cef_browser_t* browser) nothrow on_got_focus;
12300 }
12301 
12302 
12303 
12304 // CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
12305 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
12306 //
12307 // Redistribution and use in source and binary forms, with or without
12308 // modification, are permitted provided that the following conditions are
12309 // met:
12310 //
12311 //    * Redistributions of source code must retain the above copyright
12312 // notice, this list of conditions and the following disclaimer.
12313 //    * Redistributions in binary form must reproduce the above
12314 // copyright notice, this list of conditions and the following disclaimer
12315 // in the documentation and/or other materials provided with the
12316 // distribution.
12317 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12318 // Framework nor the names of its contributors may be used to endorse
12319 // or promote products derived from this software without specific prior
12320 // written permission.
12321 //
12322 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12323 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12324 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12325 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12326 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12327 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12328 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12329 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12330 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12331 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12332 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12333 //
12334 // ---------------------------------------------------------------------------
12335 //
12336 // This file was generated by the CEF translator tool and should not edited
12337 // by hand. See the translator.README.txt file in the tools directory for
12338 // more information.
12339 //
12340 // $hash=1ad87e4addc2f05497671bc59dc7fd315e0603f3$
12341 //
12342 
12343 extern (C):
12344 
12345 
12346 
12347 
12348 
12349 
12350 ///
12351 /// Structure used to represent a frame in the browser window. When used in the
12352 /// browser process the functions of this structure may be called on any thread
12353 /// unless otherwise indicated in the comments. When used in the render process
12354 /// the functions of this structure may only be called on the main thread.
12355 ///
12356 struct cef_frame_t
12357 {
12358     ///
12359     /// Base structure.
12360     ///
12361 
12362     ///
12363     /// True if this object is currently attached to a valid frame.
12364     ///
12365 
12366     ///
12367     /// Execute undo in this frame.
12368     cef_base_ref_counted_t base;
12369     extern(System) int function (cef_frame_t* self) nothrow is_valid;
12370     ///
12371     extern(System) void function (cef_frame_t* self) nothrow undo;
12372 
12373     ///
12374     /// Execute redo in this frame.
12375     ///
12376     extern(System) void function (cef_frame_t* self) nothrow redo;
12377 
12378     ///
12379     /// Execute cut in this frame.
12380     ///
12381     extern(System) void function (cef_frame_t* self) nothrow cut;
12382 
12383     ///
12384     /// Execute copy in this frame.
12385     ///
12386     extern(System) void function (cef_frame_t* self) nothrow copy;
12387 
12388     ///
12389     /// Execute paste in this frame.
12390     ///
12391     extern(System) void function (cef_frame_t* self) nothrow paste;
12392 
12393     ///
12394     /// Execute delete in this frame.
12395     ///
12396     extern(System) void function (cef_frame_t* self) nothrow del;
12397 
12398     ///
12399     /// Execute select all in this frame.
12400     ///
12401     extern(System) void function (cef_frame_t* self) nothrow select_all;
12402 
12403     ///
12404     /// Save this frame's HTML source to a temporary file and open it in the
12405     /// default text viewing application. This function can only be called from
12406     /// the browser process.
12407     ///
12408     extern(System) void function (cef_frame_t* self) nothrow view_source;
12409 
12410     ///
12411     /// Retrieve this frame's HTML source as a string sent to the specified
12412     /// visitor.
12413     ///
12414     extern(System) void function (
12415         cef_frame_t* self,
12416         cef_string_visitor_t* visitor) nothrow get_source;
12417 
12418     ///
12419     /// Retrieve this frame's display text as a string sent to the specified
12420     /// visitor.
12421     ///
12422     extern(System) void function (
12423         cef_frame_t* self,
12424         cef_string_visitor_t* visitor) nothrow get_text;
12425 
12426     ///
12427     /// Load the request represented by the |request| object.
12428     ///
12429     /// WARNING: This function will fail with "bad IPC message" reason
12430     /// INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request
12431     /// origin using some other mechanism (LoadURL, link click, etc).
12432     ///
12433     extern(System) void function (cef_frame_t* self, cef_request_t* request) nothrow load_request;
12434 
12435     ///
12436     /// Load the specified |url|.
12437     ///
12438     extern(System) void function (cef_frame_t* self, const(cef_string_t)* url) nothrow load_url;
12439 
12440     ///
12441     /// Execute a string of JavaScript code in this frame. The |script_url|
12442     /// parameter is the URL where the script in question can be found, if any.
12443     /// The renderer may request this URL to show the developer the source of the
12444     /// error.  The |start_line| parameter is the base line number to use for
12445     /// error reporting.
12446     ///
12447     extern(System) void function (
12448         cef_frame_t* self,
12449         const(cef_string_t)* code,
12450         const(cef_string_t)* script_url,
12451         int start_line) nothrow execute_java_script;
12452 
12453     ///
12454     /// Returns true (1) if this is the main (top-level) frame.
12455     ///
12456     extern(System) int function (cef_frame_t* self) nothrow is_main;
12457 
12458     ///
12459     /// Returns true (1) if this is the focused frame.
12460     ///
12461     extern(System) int function (cef_frame_t* self) nothrow is_focused;
12462 
12463     ///
12464     /// Returns the name for this frame. If the frame has an assigned name (for
12465     /// example, set via the iframe "name" attribute) then that value will be
12466     /// returned. Otherwise a unique name will be constructed based on the frame
12467     /// parent hierarchy. The main (top-level) frame will always have an NULL name
12468     /// value.
12469     ///
12470     // The resulting string must be freed by calling cef_string_userfree_free().
12471     extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_name;
12472 
12473     ///
12474     /// Returns the globally unique identifier for this frame or < 0 if the
12475     /// underlying frame does not yet exist.
12476     ///
12477     extern(System) long function (cef_frame_t* self) nothrow get_identifier;
12478 
12479     ///
12480     /// Returns the parent of this frame or NULL if this is the main (top-level)
12481     /// frame.
12482     ///
12483     extern(System) cef_frame_t* function (cef_frame_t* self) nothrow get_parent;
12484 
12485     ///
12486     /// Returns the URL currently loaded in this frame.
12487     ///
12488     // The resulting string must be freed by calling cef_string_userfree_free().
12489     extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_url;
12490 
12491     ///
12492     /// Returns the browser that this frame belongs to.
12493     ///
12494     extern(System) cef_browser_t* function (cef_frame_t* self) nothrow get_browser;
12495 
12496     ///
12497     /// Get the V8 context associated with the frame. This function can only be
12498     /// called from the render process.
12499     ///
12500     extern(System) cef_v8context_t* function (cef_frame_t* self) nothrow get_v8context;
12501 
12502     ///
12503     /// Visit the DOM document. This function can only be called from the render
12504     /// process.
12505     ///
12506     extern(System) void function (cef_frame_t* self, cef_domvisitor_t* visitor) nothrow visit_dom;
12507 
12508     ///
12509     /// Create a new URL request that will be treated as originating from this
12510     /// frame and the associated browser. Use cef_urlrequest_t::Create instead if
12511     /// you do not want the request to have this association, in which case it may
12512     /// be handled differently (see documentation on that function). A request
12513     /// created with this function may only originate from the browser process,
12514     /// and will behave as follows:
12515     ///   - It may be intercepted by the client via CefResourceRequestHandler or
12516     ///     CefSchemeHandlerFactory.
12517     ///   - POST data may only contain a single element of type PDE_TYPE_FILE or
12518     ///     PDE_TYPE_BYTES.
12519     ///
12520     /// The |request| object will be marked as read-only after calling this
12521     /// function.
12522     ///
12523     extern(System) cef_urlrequest_t* function (
12524         cef_frame_t* self,
12525         cef_request_t* request,
12526         cef_urlrequest_client_t* client) nothrow create_urlrequest;
12527 
12528     ///
12529     /// Send a message to the specified |target_process|. Ownership of the message
12530     /// contents will be transferred and the |message| reference will be
12531     /// invalidated. Message delivery is not guaranteed in all cases (for example,
12532     /// if the browser is closing, navigating, or if the target process crashes).
12533     /// Send an ACK message back from the target process if confirmation is
12534     /// required.
12535     ///
12536     extern(System) void function (
12537         cef_frame_t* self,
12538         cef_process_id_t target_process,
12539         cef_process_message_t* message) nothrow send_process_message;
12540 }
12541 
12542 
12543 
12544 // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
12545 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
12546 //
12547 // Redistribution and use in source and binary forms, with or without
12548 // modification, are permitted provided that the following conditions are
12549 // met:
12550 //
12551 //    * Redistributions of source code must retain the above copyright
12552 // notice, this list of conditions and the following disclaimer.
12553 //    * Redistributions in binary form must reproduce the above
12554 // copyright notice, this list of conditions and the following disclaimer
12555 // in the documentation and/or other materials provided with the
12556 // distribution.
12557 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12558 // Framework nor the names of its contributors may be used to endorse
12559 // or promote products derived from this software without specific prior
12560 // written permission.
12561 //
12562 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12563 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12564 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12565 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12566 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12567 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12568 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12569 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12570 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12571 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12572 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12573 //
12574 // ---------------------------------------------------------------------------
12575 //
12576 // This file was generated by the CEF translator tool and should not edited
12577 // by hand. See the translator.README.txt file in the tools directory for
12578 // more information.
12579 //
12580 // $hash=4cdadeb6439415d60ec32249c3a0b6457dd586f7$
12581 //
12582 
12583 extern (C):
12584 
12585 ///
12586 /// Implement this structure to handle events related to cef_frame_t life span.
12587 /// The order of callbacks is:
12588 ///
12589 /// (1) During initial cef_browser_host_t creation and navigation of the main
12590 /// frame: - cef_frame_handler_t::OnFrameCreated => The initial main frame
12591 /// object has been
12592 ///   created. Any commands will be queued until the frame is attached.
12593 /// - cef_frame_handler_t::OnMainFrameChanged => The initial main frame object
12594 /// has
12595 ///   been assigned to the browser.
12596 /// - cef_life_span_handler_t::OnAfterCreated => The browser is now valid and
12597 /// can be
12598 ///   used.
12599 /// - cef_frame_handler_t::OnFrameAttached => The initial main frame object is
12600 /// now
12601 ///   connected to its peer in the renderer process. Commands can be routed.
12602 ///
12603 /// (2) During further cef_browser_host_t navigation/loading of the main frame
12604 ///     and/or sub-frames:
12605 /// - cef_frame_handler_t::OnFrameCreated => A new main frame or sub-frame
12606 /// object
12607 ///   has been created. Any commands will be queued until the frame is attached.
12608 /// - cef_frame_handler_t::OnFrameAttached => A new main frame or sub-frame
12609 /// object
12610 ///   is now connected to its peer in the renderer process. Commands can be
12611 ///   routed.
12612 /// - cef_frame_handler_t::OnFrameDetached => An existing main frame or sub-
12613 /// frame
12614 ///   object has lost its connection to the renderer process. If multiple
12615 ///   objects are detached at the same time then notifications will be sent for
12616 ///   any sub-frame objects before the main frame object. Commands can no longer
12617 ///   be routed and will be discarded.
12618 /// - cef_frame_handler_t::OnMainFrameChanged => A new main frame object has
12619 /// been
12620 ///   assigned to the browser. This will only occur with cross-origin navigation
12621 ///   or re-navigation after renderer process termination (due to crashes, etc).
12622 ///
12623 /// (3) During final cef_browser_host_t destruction of the main frame: -
12624 /// cef_frame_handler_t::OnFrameDetached => Any sub-frame objects have lost
12625 /// their
12626 ///   connection to the renderer process. Commands can no longer be routed and
12627 ///   will be discarded.
12628 /// - cef_life_span_handler_t::OnBeforeClose => The browser has been destroyed.
12629 /// - cef_frame_handler_t::OnFrameDetached => The main frame object have lost
12630 /// its
12631 ///   connection to the renderer process. Notifications will be sent for any
12632 ///   sub-frame objects before the main frame object. Commands can no longer be
12633 ///   routed and will be discarded.
12634 /// - cef_frame_handler_t::OnMainFrameChanged => The final main frame object has
12635 ///   been removed from the browser.
12636 ///
12637 /// Cross-origin navigation and/or loading receives special handling.
12638 ///
12639 /// When the main frame navigates to a different origin the OnMainFrameChanged
12640 /// callback (2) will be executed with the old and new main frame objects.
12641 ///
12642 /// When a new sub-frame is loaded in, or an existing sub-frame is navigated to,
12643 /// a different origin from the parent frame, a temporary sub-frame object will
12644 /// first be created in the parent's renderer process. That temporary sub-frame
12645 /// will then be discarded after the real cross-origin sub-frame is created in
12646 /// the new/target renderer process. The client will receive cross-origin
12647 /// navigation callbacks (2) for the transition from the temporary sub-frame to
12648 /// the real sub-frame. The temporary sub-frame will not recieve or execute
12649 /// commands during this transitional period (any sent commands will be
12650 /// discarded).
12651 ///
12652 /// When a new popup browser is created in a different origin from the parent
12653 /// browser, a temporary main frame object for the popup will first be created
12654 /// in the parent's renderer process. That temporary main frame will then be
12655 /// discarded after the real cross-origin main frame is created in the
12656 /// new/target renderer process. The client will recieve creation and initial
12657 /// navigation callbacks (1) for the temporary main frame, followed by cross-
12658 /// origin navigation callbacks (2) for the transition from the temporary main
12659 /// frame to the real main frame. The temporary main frame may receive and
12660 /// execute commands during this transitional period (any sent commands may be
12661 /// executed, but the behavior is potentially undesirable since they execute in
12662 /// the parent browser's renderer process and not the new/target renderer
12663 /// process).
12664 ///
12665 /// Callbacks will not be executed for placeholders that may be created during
12666 /// pre-commit navigation for sub-frames that do not yet exist in the renderer
12667 /// process. Placeholders will have cef_frame_t::get_identifier() == -4.
12668 ///
12669 /// The functions of this structure will be called on the UI thread unless
12670 /// otherwise indicated.
12671 ///
12672 struct cef_frame_handler_t
12673 {
12674     ///
12675     /// Base structure.
12676     ///
12677     cef_base_ref_counted_t base;
12678 
12679     ///
12680     /// Called when a new frame is created. This will be the first notification
12681     /// that references |frame|. Any commands that require transport to the
12682     /// associated renderer process (LoadRequest, SendProcessMessage, GetSource,
12683     /// etc.) will be queued until OnFrameAttached is called for |frame|.
12684     ///
12685     extern(System) void function (
12686         cef_frame_handler_t* self,
12687         cef_browser_t* browser,
12688         cef_frame_t* frame) nothrow on_frame_created;
12689 
12690     ///
12691     /// Called when a frame can begin routing commands to/from the associated
12692     /// renderer process. |reattached| will be true (1) if the frame was re-
12693     /// attached after exiting the BackForwardCache. Any commands that were queued
12694     /// have now been dispatched.
12695     ///
12696     extern(System) void function (
12697         cef_frame_handler_t* self,
12698         cef_browser_t* browser,
12699         cef_frame_t* frame,
12700         int reattached) nothrow on_frame_attached;
12701 
12702     ///
12703     /// Called when a frame loses its connection to the renderer process and will
12704     /// be destroyed. Any pending or future commands will be discarded and
12705     /// cef_frame_t::is_valid() will now return false (0) for |frame|. If called
12706     /// after cef_life_span_handler_t::on_before_close() during browser
12707     /// destruction then cef_browser_t::is_valid() will return false (0) for
12708     /// |browser|.
12709     ///
12710     extern(System) void function (
12711         cef_frame_handler_t* self,
12712         cef_browser_t* browser,
12713         cef_frame_t* frame) nothrow on_frame_detached;
12714 
12715     ///
12716     /// Called when the main frame changes due to (a) initial browser creation,
12717     /// (b) final browser destruction, (c) cross-origin navigation or (d) re-
12718     /// navigation after renderer process termination (due to crashes, etc).
12719     /// |old_frame| will be NULL and |new_frame| will be non-NULL when a main
12720     /// frame is assigned to |browser| for the first time. |old_frame| will be
12721     /// non-NULL and |new_frame| will be NULL and  when a main frame is removed
12722     /// from |browser| for the last time. Both |old_frame| and |new_frame| will be
12723     /// non-NULL for cross-origin navigations or re-navigation after renderer
12724     /// process termination. This function will be called after on_frame_created()
12725     /// for |new_frame| and/or after on_frame_detached() for |old_frame|. If
12726     /// called after cef_life_span_handler_t::on_before_close() during browser
12727     /// destruction then cef_browser_t::is_valid() will return false (0) for
12728     /// |browser|.
12729     ///
12730     extern(System) void function (
12731         cef_frame_handler_t* self,
12732         cef_browser_t* browser,
12733         cef_frame_t* old_frame,
12734         cef_frame_t* new_frame) nothrow on_main_frame_changed;
12735 }
12736 
12737 
12738 
12739 // CEF_INCLUDE_CAPI_CEF_FRAME_HANDLER_CAPI_H_
12740 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
12741 //
12742 // Redistribution and use in source and binary forms, with or without
12743 // modification, are permitted provided that the following conditions are
12744 // met:
12745 //
12746 //    * Redistributions of source code must retain the above copyright
12747 // notice, this list of conditions and the following disclaimer.
12748 //    * Redistributions in binary form must reproduce the above
12749 // copyright notice, this list of conditions and the following disclaimer
12750 // in the documentation and/or other materials provided with the
12751 // distribution.
12752 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12753 // Framework nor the names of its contributors may be used to endorse
12754 // or promote products derived from this software without specific prior
12755 // written permission.
12756 //
12757 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12758 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12759 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12760 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12761 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12762 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12763 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12764 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12765 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12766 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12767 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12768 //
12769 // ---------------------------------------------------------------------------
12770 //
12771 // This file was generated by the CEF translator tool and should not edited
12772 // by hand. See the translator.README.txt file in the tools directory for
12773 // more information.
12774 //
12775 // $hash=c564ee1f32a0ef05fe49fc779af5bc0b0e1b36d6$
12776 //
12777 
12778 extern (C):
12779 
12780 ///
12781 /// Returns true (1) if the application text direction is right-to-left.
12782 ///
12783 int cef_is_rtl ();
12784 
12785 // CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_
12786 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
12787 //
12788 // Redistribution and use in source and binary forms, with or without
12789 // modification, are permitted provided that the following conditions are
12790 // met:
12791 //
12792 //    * Redistributions of source code must retain the above copyright
12793 // notice, this list of conditions and the following disclaimer.
12794 //    * Redistributions in binary form must reproduce the above
12795 // copyright notice, this list of conditions and the following disclaimer
12796 // in the documentation and/or other materials provided with the
12797 // distribution.
12798 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12799 // Framework nor the names of its contributors may be used to endorse
12800 // or promote products derived from this software without specific prior
12801 // written permission.
12802 //
12803 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12804 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12805 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12806 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12807 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12808 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12809 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12810 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12811 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12812 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12813 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12814 //
12815 // ---------------------------------------------------------------------------
12816 //
12817 // This file was generated by the CEF translator tool and should not edited
12818 // by hand. See the translator.README.txt file in the tools directory for
12819 // more information.
12820 //
12821 // $hash=99c94b208f9b184985220493bba4ea08e6786046$
12822 //
12823 
12824 extern (C):
12825 
12826 ///
12827 /// Container for a single image represented at different scale factors. All
12828 /// image representations should be the same size in density independent pixel
12829 /// (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels
12830 /// then the image at scale factor 2.0 should be 200x200 pixels -- both images
12831 /// will display with a DIP size of 100x100 units. The functions of this
12832 /// structure can be called on any browser process thread.
12833 ///
12834 struct cef_image_t
12835 {
12836     ///
12837     /// Base structure.
12838     ///
12839 
12840     ///
12841     /// Returns true (1) if this Image is NULL.
12842     ///
12843 
12844     ///
12845     /// Returns true (1) if this Image and |that| Image share the same underlying
12846     /// storage. Will also return true (1) if both images are NULL.
12847     ///
12848     cef_base_ref_counted_t base;
12849     extern(System) int function (cef_image_t* self) nothrow is_empty;
12850     extern(System) int function (cef_image_t* self, cef_image_t* that) nothrow is_same;
12851     ///
12852     /// Add a bitmap image representation for |scale_factor|. Only 32-bit
12853     /// RGBA/BGRA formats are supported. |pixel_width| and |pixel_height| are the
12854     /// bitmap representation size in pixel coordinates. |pixel_data| is the array
12855     /// of pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in
12856     /// size. |color_type| and |alpha_type| values specify the pixel format.
12857     ///
12858     extern(System) int function (
12859         cef_image_t* self,
12860         float scale_factor,
12861         int pixel_width,
12862         int pixel_height,
12863         cef_color_type_t color_type,
12864         cef_alpha_type_t alpha_type,
12865         const(void)* pixel_data,
12866         size_t pixel_data_size) nothrow add_bitmap;
12867 
12868     ///
12869     /// Add a PNG image representation for |scale_factor|. |png_data| is the image
12870     /// data of size |png_data_size|. Any alpha transparency in the PNG data will
12871     /// be maintained.
12872     ///
12873     extern(System) int function (
12874         cef_image_t* self,
12875         float scale_factor,
12876         const(void)* png_data,
12877         size_t png_data_size) nothrow add_png;
12878 
12879     ///
12880     /// Create a JPEG image representation for |scale_factor|. |jpeg_data| is the
12881     /// image data of size |jpeg_data_size|. The JPEG format does not support
12882     /// transparency so the alpha byte will be set to 0xFF for all pixels.
12883     ///
12884     extern(System) int function (
12885         cef_image_t* self,
12886         float scale_factor,
12887         const(void)* jpeg_data,
12888         size_t jpeg_data_size) nothrow add_jpeg;
12889 
12890     ///
12891     /// Returns the image width in density independent pixel (DIP) units.
12892     ///
12893     extern(System) size_t function (cef_image_t* self) nothrow get_width;
12894 
12895     ///
12896     /// Returns the image height in density independent pixel (DIP) units.
12897     ///
12898     extern(System) size_t function (cef_image_t* self) nothrow get_height;
12899 
12900     ///
12901     /// Returns true (1) if this image contains a representation for
12902     /// |scale_factor|.
12903     ///
12904     extern(System) int function (cef_image_t* self, float scale_factor) nothrow has_representation;
12905 
12906     ///
12907     /// Removes the representation for |scale_factor|. Returns true (1) on
12908     /// success.
12909     ///
12910     extern(System) int function (
12911         cef_image_t* self,
12912         float scale_factor) nothrow remove_representation;
12913 
12914     ///
12915     /// Returns information for the representation that most closely matches
12916     /// |scale_factor|. |actual_scale_factor| is the actual scale factor for the
12917     /// representation. |pixel_width| and |pixel_height| are the representation
12918     /// size in pixel coordinates. Returns true (1) on success.
12919     ///
12920     extern(System) int function (
12921         cef_image_t* self,
12922         float scale_factor,
12923         float* actual_scale_factor,
12924         int* pixel_width,
12925         int* pixel_height) nothrow get_representation_info;
12926 
12927     ///
12928     /// Returns the bitmap representation that most closely matches
12929     /// |scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |color_type|
12930     /// and |alpha_type| values specify the desired output pixel format.
12931     /// |pixel_width| and |pixel_height| are the output representation size in
12932     /// pixel coordinates. Returns a cef_binary_value_t containing the pixel data
12933     /// on success or NULL on failure.
12934     ///
12935     extern(System) cef_binary_value_t* function (
12936         cef_image_t* self,
12937         float scale_factor,
12938         cef_color_type_t color_type,
12939         cef_alpha_type_t alpha_type,
12940         int* pixel_width,
12941         int* pixel_height) nothrow get_as_bitmap;
12942 
12943     ///
12944     /// Returns the PNG representation that most closely matches |scale_factor|.
12945     /// If |with_transparency| is true (1) any alpha transparency in the image
12946     /// will be represented in the resulting PNG data. |pixel_width| and
12947     /// |pixel_height| are the output representation size in pixel coordinates.
12948     /// Returns a cef_binary_value_t containing the PNG image data on success or
12949     /// NULL on failure.
12950     ///
12951     extern(System) cef_binary_value_t* function (
12952         cef_image_t* self,
12953         float scale_factor,
12954         int with_transparency,
12955         int* pixel_width,
12956         int* pixel_height) nothrow get_as_png;
12957 
12958     ///
12959     /// Returns the JPEG representation that most closely matches |scale_factor|.
12960     /// |quality| determines the compression level with 0 == lowest and 100 ==
12961     /// highest. The JPEG format does not support alpha transparency and the alpha
12962     /// channel, if any, will be discarded. |pixel_width| and |pixel_height| are
12963     /// the output representation size in pixel coordinates. Returns a
12964     /// cef_binary_value_t containing the JPEG image data on success or NULL on
12965     /// failure.
12966     ///
12967     extern(System) cef_binary_value_t* function (
12968         cef_image_t* self,
12969         float scale_factor,
12970         int quality,
12971         int* pixel_width,
12972         int* pixel_height) nothrow get_as_jpeg;
12973 }
12974 
12975 
12976 
12977 ///
12978 /// Create a new cef_image_t. It will initially be NULL. Use the Add*()
12979 /// functions to add representations at different scale factors.
12980 ///
12981 cef_image_t* cef_image_create ();
12982 
12983 // CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_
12984 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
12985 //
12986 // Redistribution and use in source and binary forms, with or without
12987 // modification, are permitted provided that the following conditions are
12988 // met:
12989 //
12990 //    * Redistributions of source code must retain the above copyright
12991 // notice, this list of conditions and the following disclaimer.
12992 //    * Redistributions in binary form must reproduce the above
12993 // copyright notice, this list of conditions and the following disclaimer
12994 // in the documentation and/or other materials provided with the
12995 // distribution.
12996 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12997 // Framework nor the names of its contributors may be used to endorse
12998 // or promote products derived from this software without specific prior
12999 // written permission.
13000 //
13001 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13002 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13003 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13004 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13005 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13006 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13007 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13008 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13009 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13010 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13011 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13012 //
13013 // ---------------------------------------------------------------------------
13014 //
13015 // This file was generated by the CEF translator tool and should not edited
13016 // by hand. See the translator.README.txt file in the tools directory for
13017 // more information.
13018 //
13019 // $hash=e9fb0354243611f3a4de508923a4e01dab42f82d$
13020 //
13021 
13022 extern (C):
13023 
13024 ///
13025 /// Callback structure used for asynchronous continuation of JavaScript dialog
13026 /// requests.
13027 ///
13028 struct cef_jsdialog_callback_t
13029 {
13030     ///
13031     /// Base structure.
13032     ///
13033 
13034     ///
13035     /// Continue the JS dialog request. Set |success| to true (1) if the OK button
13036     /// was pressed. The |user_input| value should be specified for prompt
13037     /// dialogs.
13038     ///
13039 
13040     ///
13041     /// Implement this structure to handle events related to JavaScript dialogs. The
13042     /// functions of this structure will be called on the UI thread.
13043     ///
13044 
13045     ///
13046     /// Base structure.
13047     ///
13048 
13049     ///
13050     /// Called to run a JavaScript dialog. If |origin_url| is non-NULL it can be
13051     cef_base_ref_counted_t base;
13052     extern(System) void function (
13053         cef_jsdialog_callback_t* self,
13054         int success,
13055         const(cef_string_t)* user_input) nothrow cont;
13056 }
13057 
13058 
13059 
13060 struct cef_jsdialog_handler_t
13061 {
13062     cef_base_ref_counted_t base;
13063     /// passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure
13064     /// and user-friendly display string. The |default_prompt_text| value will be
13065     /// specified for prompt dialogs only. Set |suppress_message| to true (1) and
13066     /// return false (0) to suppress the message (suppressing messages is
13067     /// preferable to immediately executing the callback as this is used to detect
13068     /// presumably malicious behavior like spamming alert messages in
13069     /// onbeforeunload). Set |suppress_message| to false (0) and return false (0)
13070     /// to use the default implementation (the default implementation will show
13071     /// one modal dialog at a time and suppress any additional dialog requests
13072     /// until the displayed dialog is dismissed). Return true (1) if the
13073     /// application will use a custom dialog or if the callback has been executed
13074     /// immediately. Custom dialogs may be either modal or modeless. If a custom
13075     /// dialog is used the application must execute |callback| once the custom
13076     /// dialog is dismissed.
13077     ///
13078     extern(System) int function (
13079         cef_jsdialog_handler_t* self,
13080         cef_browser_t* browser,
13081         const(cef_string_t)* origin_url,
13082         cef_jsdialog_type_t dialog_type,
13083         const(cef_string_t)* message_text,
13084         const(cef_string_t)* default_prompt_text,
13085         cef_jsdialog_callback_t* callback,
13086         int* suppress_message) nothrow on_jsdialog;
13087 
13088     ///
13089     /// Called to run a dialog asking the user if they want to leave a page.
13090     /// Return false (0) to use the default dialog implementation. Return true (1)
13091     /// if the application will use a custom dialog or if the callback has been
13092     /// executed immediately. Custom dialogs may be either modal or modeless. If a
13093     /// custom dialog is used the application must execute |callback| once the
13094     /// custom dialog is dismissed.
13095     ///
13096     extern(System) int function (
13097         cef_jsdialog_handler_t* self,
13098         cef_browser_t* browser,
13099         const(cef_string_t)* message_text,
13100         int is_reload,
13101         cef_jsdialog_callback_t* callback) nothrow on_before_unload_dialog;
13102 
13103     ///
13104     /// Called to cancel any pending dialogs and reset any saved dialog state.
13105     /// Will be called due to events like page navigation irregardless of whether
13106     /// any dialogs are currently pending.
13107     ///
13108     extern(System) void function (
13109         cef_jsdialog_handler_t* self,
13110         cef_browser_t* browser) nothrow on_reset_dialog_state;
13111 
13112     ///
13113     /// Called when the dialog is closed.
13114     ///
13115     extern(System) void function (
13116         cef_jsdialog_handler_t* self,
13117         cef_browser_t* browser) nothrow on_dialog_closed;
13118 }
13119 
13120 
13121 
13122 // CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_
13123 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
13124 //
13125 // Redistribution and use in source and binary forms, with or without
13126 // modification, are permitted provided that the following conditions are
13127 // met:
13128 //
13129 //    * Redistributions of source code must retain the above copyright
13130 // notice, this list of conditions and the following disclaimer.
13131 //    * Redistributions in binary form must reproduce the above
13132 // copyright notice, this list of conditions and the following disclaimer
13133 // in the documentation and/or other materials provided with the
13134 // distribution.
13135 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13136 // Framework nor the names of its contributors may be used to endorse
13137 // or promote products derived from this software without specific prior
13138 // written permission.
13139 //
13140 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13141 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13142 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13143 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13144 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13145 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13146 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13147 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13148 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13149 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13150 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13151 //
13152 // ---------------------------------------------------------------------------
13153 //
13154 // This file was generated by the CEF translator tool and should not edited
13155 // by hand. See the translator.README.txt file in the tools directory for
13156 // more information.
13157 //
13158 // $hash=10fb708c5f550403205a976924abf1886bf3dfa7$
13159 //
13160 
13161 extern (C):
13162 
13163 ///
13164 /// Implement this structure to handle events related to keyboard input. The
13165 /// functions of this structure will be called on the UI thread.
13166 ///
13167 struct cef_keyboard_handler_t
13168 {
13169     ///
13170     /// Base structure.
13171     ///
13172 
13173     ///
13174     /// Called before a keyboard event is sent to the renderer. |event| contains
13175     /// information about the keyboard event. |os_event| is the operating system
13176     /// event message, if any. Return true (1) if the event was handled or false
13177     /// (0) otherwise. If the event will be handled in on_key_event() as a
13178     /// keyboard shortcut set |is_keyboard_shortcut| to true (1) and return false
13179     /// (0).
13180     ///
13181     cef_base_ref_counted_t base;
13182     extern(System) int function (
13183         cef_keyboard_handler_t* self,
13184         cef_browser_t* browser,
13185         const(cef_key_event_t)* event,
13186         XEvent* os_event,
13187         int* is_keyboard_shortcut) nothrow on_pre_key_event;
13188     ///
13189     /// Called after the renderer and JavaScript in the page has had a chance to
13190     /// handle the event. |event| contains information about the keyboard event.
13191     /// |os_event| is the operating system event message, if any. Return true (1)
13192     /// if the keyboard event was handled or false (0) otherwise.
13193     ///
13194     extern(System) int function (
13195         cef_keyboard_handler_t* self,
13196         cef_browser_t* browser,
13197         const(cef_key_event_t)* event,
13198         XEvent* os_event) nothrow on_key_event;
13199 }
13200 
13201 
13202 
13203 // CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_
13204 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
13205 //
13206 // Redistribution and use in source and binary forms, with or without
13207 // modification, are permitted provided that the following conditions are
13208 // met:
13209 //
13210 //    * Redistributions of source code must retain the above copyright
13211 // notice, this list of conditions and the following disclaimer.
13212 //    * Redistributions in binary form must reproduce the above
13213 // copyright notice, this list of conditions and the following disclaimer
13214 // in the documentation and/or other materials provided with the
13215 // distribution.
13216 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13217 // Framework nor the names of its contributors may be used to endorse
13218 // or promote products derived from this software without specific prior
13219 // written permission.
13220 //
13221 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13222 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13223 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13224 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13225 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13226 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13227 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13228 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13229 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13230 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13231 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13232 //
13233 // ---------------------------------------------------------------------------
13234 //
13235 // This file was generated by the CEF translator tool and should not edited
13236 // by hand. See the translator.README.txt file in the tools directory for
13237 // more information.
13238 //
13239 // $hash=1c807597b96889f44a1e5199e860e8db4948b473$
13240 //
13241 
13242 extern (C):
13243 
13244 
13245 
13246 ///
13247 /// Implement this structure to handle events related to browser life span. The
13248 /// functions of this structure will be called on the UI thread unless otherwise
13249 /// indicated.
13250 ///
13251 struct cef_life_span_handler_t
13252 {
13253     ///
13254     /// Base structure.
13255     ///
13256 
13257     ///
13258     /// Called on the UI thread before a new popup browser is created. The
13259     /// |browser| and |frame| values represent the source of the popup request.
13260     /// The |target_url| and |target_frame_name| values indicate where the popup
13261     /// browser should navigate and may be NULL if not specified with the request.
13262     /// The |target_disposition| value indicates where the user intended to open
13263     /// the popup (e.g. current tab, new tab, etc). The |user_gesture| value will
13264     /// be true (1) if the popup was opened via explicit user gesture (e.g.
13265     cef_base_ref_counted_t base;
13266     /// clicking a link) or false (0) if the popup opened automatically (e.g. via
13267     /// the DomContentLoaded event). The |popupFeatures| structure contains
13268     /// additional information about the requested popup window. To allow creation
13269     /// of the popup browser optionally modify |windowInfo|, |client|, |settings|
13270     /// and |no_javascript_access| and return false (0). To cancel creation of the
13271     /// popup browser return true (1). The |client| and |settings| values will
13272     /// default to the source browser's values. If the |no_javascript_access|
13273     /// value is set to false (0) the new browser will not be scriptable and may
13274     /// not be hosted in the same renderer process as the source browser. Any
13275     /// modifications to |windowInfo| will be ignored if the parent browser is
13276     /// wrapped in a cef_browser_view_t. Popup browser creation will be canceled
13277     /// if the parent browser is destroyed before the popup browser creation
13278     /// completes (indicated by a call to OnAfterCreated for the popup browser).
13279     /// The |extra_info| parameter provides an opportunity to specify extra
13280     /// information specific to the created popup browser that will be passed to
13281     /// cef_render_process_handler_t::on_browser_created() in the render process.
13282     ///
13283     extern(System) int function (
13284         cef_life_span_handler_t* self,
13285         cef_browser_t* browser,
13286         cef_frame_t* frame,
13287         const(cef_string_t)* target_url,
13288         const(cef_string_t)* target_frame_name,
13289         cef_window_open_disposition_t target_disposition,
13290         int user_gesture,
13291         const(cef_popup_features_t)* popupFeatures,
13292         cef_window_info_t* windowInfo,
13293         cef_client_t** client,
13294         cef_browser_settings_t* settings,
13295         cef_dictionary_value_t** extra_info,
13296         int* no_javascript_access) nothrow on_before_popup;
13297 
13298     ///
13299     /// Called after a new browser is created. It is now safe to begin performing
13300     /// actions with |browser|. cef_frame_handler_t callbacks related to initial
13301     /// main frame creation will arrive before this callback. See
13302     /// cef_frame_handler_t documentation for additional usage information.
13303     ///
13304     extern(System) void function (
13305         cef_life_span_handler_t* self,
13306         cef_browser_t* browser) nothrow on_after_created;
13307 
13308     ///
13309     /// Called when a browser has recieved a request to close. This may result
13310     /// directly from a call to cef_browser_host_t::*close_browser() or indirectly
13311     /// if the browser is parented to a top-level window created by CEF and the
13312     /// user attempts to close that window (by clicking the 'X', for example). The
13313     /// do_close() function will be called after the JavaScript 'onunload' event
13314     /// has been fired.
13315     ///
13316     /// An application should handle top-level owner window close notifications by
13317     /// calling cef_browser_host_t::try_close_browser() or
13318     /// cef_browser_host_t::CloseBrowser(false (0)) instead of allowing the window
13319     /// to close immediately (see the examples below). This gives CEF an
13320     /// opportunity to process the 'onbeforeunload' event and optionally cancel
13321     /// the close before do_close() is called.
13322     ///
13323     /// When windowed rendering is enabled CEF will internally create a window or
13324     /// view to host the browser. In that case returning false (0) from do_close()
13325     /// will send the standard close notification to the browser's top-level owner
13326     /// window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on
13327     /// Linux or cef_window_delegate_t::can_close() callback from Views). If the
13328     /// browser's host window/view has already been destroyed (via view hierarchy
13329     /// tear-down, for example) then do_close() will not be called for that
13330     /// browser since is no longer possible to cancel the close.
13331     ///
13332     /// When windowed rendering is disabled returning false (0) from do_close()
13333     /// will cause the browser object to be destroyed immediately.
13334     ///
13335     /// If the browser's top-level owner window requires a non-standard close
13336     /// notification then send that notification from do_close() and return true
13337     /// (1).
13338     ///
13339     /// The cef_life_span_handler_t::on_before_close() function will be called
13340     /// after do_close() (if do_close() is called) and immediately before the
13341     /// browser object is destroyed. The application should only exit after
13342     /// on_before_close() has been called for all existing browsers.
13343     ///
13344     /// The below examples describe what should happen during window close when
13345     /// the browser is parented to an application-provided top-level window.
13346     ///
13347     /// Example 1: Using cef_browser_host_t::try_close_browser(). This is
13348     /// recommended for clients using standard close handling and windows created
13349     /// on the browser process UI thread. 1.  User clicks the window close button
13350     /// which sends a close notification
13351     ///     to the application's top-level window.
13352     /// 2.  Application's top-level window receives the close notification and
13353     ///     calls TryCloseBrowser() (which internally calls CloseBrowser(false)).
13354     ///     TryCloseBrowser() returns false so the client cancels the window
13355     ///     close.
13356     /// 3.  JavaScript 'onbeforeunload' handler executes and shows the close
13357     ///     confirmation dialog (which can be overridden via
13358     ///     CefJSDialogHandler::OnBeforeUnloadDialog()).
13359     /// 4.  User approves the close. 5.  JavaScript 'onunload' handler executes.
13360     /// 6.  CEF sends a close notification to the application's top-level window
13361     ///     (because DoClose() returned false by default).
13362     /// 7.  Application's top-level window receives the close notification and
13363     ///     calls TryCloseBrowser(). TryCloseBrowser() returns true so the client
13364     ///     allows the window close.
13365     /// 8.  Application's top-level window is destroyed. 9.  Application's
13366     /// on_before_close() handler is called and the browser object
13367     ///     is destroyed.
13368     /// 10. Application exits by calling cef_quit_message_loop() if no other
13369     /// browsers
13370     ///     exist.
13371     ///
13372     /// Example 2: Using cef_browser_host_t::CloseBrowser(false (0)) and
13373     /// implementing the do_close() callback. This is recommended for clients
13374     /// using non-standard close handling or windows that were not created on the
13375     /// browser process UI thread. 1.  User clicks the window close button which
13376     /// sends a close notification
13377     ///     to the application's top-level window.
13378     /// 2.  Application's top-level window receives the close notification and:
13379     ///     A. Calls CefBrowserHost::CloseBrowser(false).
13380     ///     B. Cancels the window close.
13381     /// 3.  JavaScript 'onbeforeunload' handler executes and shows the close
13382     ///     confirmation dialog (which can be overridden via
13383     ///     CefJSDialogHandler::OnBeforeUnloadDialog()).
13384     /// 4.  User approves the close. 5.  JavaScript 'onunload' handler executes.
13385     /// 6.  Application's do_close() handler is called. Application will:
13386     ///     A. Set a flag to indicate that the next close attempt will be allowed.
13387     ///     B. Return false.
13388     /// 7.  CEF sends an close notification to the application's top-level window.
13389     /// 8.  Application's top-level window receives the close notification and
13390     ///     allows the window to close based on the flag from #6B.
13391     /// 9.  Application's top-level window is destroyed. 10. Application's
13392     /// on_before_close() handler is called and the browser object
13393     ///     is destroyed.
13394     /// 11. Application exits by calling cef_quit_message_loop() if no other
13395     /// browsers
13396     ///     exist.
13397     ///
13398     extern(System) int function (
13399         cef_life_span_handler_t* self,
13400         cef_browser_t* browser) nothrow do_close;
13401 
13402     ///
13403     /// Called just before a browser is destroyed. Release all references to the
13404     /// browser object and do not attempt to execute any functions on the browser
13405     /// object (other than IsValid, GetIdentifier or IsSame) after this callback
13406     /// returns. cef_frame_handler_t callbacks related to final main frame
13407     /// destruction will arrive after this callback and cef_browser_t::IsValid
13408     /// will return false (0) at that time. Any in-progress network requests
13409     /// associated with |browser| will be aborted when the browser is destroyed,
13410     /// and cef_resource_request_handler_t callbacks related to those requests may
13411     /// still arrive on the IO thread after this callback. See cef_frame_handler_t
13412     /// and do_close() documentation for additional usage information.
13413     ///
13414     extern(System) void function (
13415         cef_life_span_handler_t* self,
13416         cef_browser_t* browser) nothrow on_before_close;
13417 }
13418 
13419 
13420 
13421 // CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_
13422 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
13423 //
13424 // Redistribution and use in source and binary forms, with or without
13425 // modification, are permitted provided that the following conditions are
13426 // met:
13427 //
13428 //    * Redistributions of source code must retain the above copyright
13429 // notice, this list of conditions and the following disclaimer.
13430 //    * Redistributions in binary form must reproduce the above
13431 // copyright notice, this list of conditions and the following disclaimer
13432 // in the documentation and/or other materials provided with the
13433 // distribution.
13434 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13435 // Framework nor the names of its contributors may be used to endorse
13436 // or promote products derived from this software without specific prior
13437 // written permission.
13438 //
13439 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13440 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13441 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13442 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13443 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13444 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13445 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13446 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13447 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13448 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13449 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13450 //
13451 // ---------------------------------------------------------------------------
13452 //
13453 // This file was generated by the CEF translator tool and should not edited
13454 // by hand. See the translator.README.txt file in the tools directory for
13455 // more information.
13456 //
13457 // $hash=1ee684174554f7d1cf8899992705d072c1c56ae7$
13458 //
13459 
13460 extern (C):
13461 
13462 ///
13463 /// Implement this structure to handle events related to browser load status.
13464 /// The functions of this structure will be called on the browser process UI
13465 /// thread or render process main thread (TID_RENDERER).
13466 ///
13467 struct cef_load_handler_t
13468 {
13469     ///
13470     /// Base structure.
13471     ///
13472 
13473     ///
13474     /// Called when the loading state has changed. This callback will be executed
13475     /// twice -- once when loading is initiated either programmatically or by user
13476     /// action, and once when loading is terminated due to completion,
13477     /// cancellation of failure. It will be called before any calls to OnLoadStart
13478     /// and after all calls to OnLoadError and/or OnLoadEnd.
13479     ///
13480     cef_base_ref_counted_t base;
13481     extern(System) void function (
13482         cef_load_handler_t* self,
13483         cef_browser_t* browser,
13484         int isLoading,
13485         int canGoBack,
13486         int canGoForward) nothrow on_loading_state_change;
13487     ///
13488     /// Called after a navigation has been committed and before the browser begins
13489     /// loading contents in the frame. The |frame| value will never be NULL --
13490     /// call the is_main() function to check if this frame is the main frame.
13491     /// |transition_type| provides information about the source of the navigation
13492     /// and an accurate value is only available in the browser process. Multiple
13493     /// frames may be loading at the same time. Sub-frames may start or continue
13494     /// loading after the main frame load has ended. This function will not be
13495     /// called for same page navigations (fragments, history state, etc.) or for
13496     /// navigations that fail or are canceled before commit. For notification of
13497     /// overall browser load status use OnLoadingStateChange instead.
13498     ///
13499     extern(System) void function (
13500         cef_load_handler_t* self,
13501         cef_browser_t* browser,
13502         cef_frame_t* frame,
13503         cef_transition_type_t transition_type) nothrow on_load_start;
13504 
13505     ///
13506     /// Called when the browser is done loading a frame. The |frame| value will
13507     /// never be NULL -- call the is_main() function to check if this frame is the
13508     /// main frame. Multiple frames may be loading at the same time. Sub-frames
13509     /// may start or continue loading after the main frame load has ended. This
13510     /// function will not be called for same page navigations (fragments, history
13511     /// state, etc.) or for navigations that fail or are canceled before commit.
13512     /// For notification of overall browser load status use OnLoadingStateChange
13513     /// instead.
13514     ///
13515     extern(System) void function (
13516         cef_load_handler_t* self,
13517         cef_browser_t* browser,
13518         cef_frame_t* frame,
13519         int httpStatusCode) nothrow on_load_end;
13520 
13521     ///
13522     /// Called when a navigation fails or is canceled. This function may be called
13523     /// by itself if before commit or in combination with OnLoadStart/OnLoadEnd if
13524     /// after commit. |errorCode| is the error code number, |errorText| is the
13525     /// error text and |failedUrl| is the URL that failed to load. See
13526     /// net\base\net_error_list.h for complete descriptions of the error codes.
13527     ///
13528     extern(System) void function (
13529         cef_load_handler_t* self,
13530         cef_browser_t* browser,
13531         cef_frame_t* frame,
13532         cef_errorcode_t errorCode,
13533         const(cef_string_t)* errorText,
13534         const(cef_string_t)* failedUrl) nothrow on_load_error;
13535 }
13536 
13537 
13538 
13539 // CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_
13540 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
13541 //
13542 // Redistribution and use in source and binary forms, with or without
13543 // modification, are permitted provided that the following conditions are
13544 // met:
13545 //
13546 //    * Redistributions of source code must retain the above copyright
13547 // notice, this list of conditions and the following disclaimer.
13548 //    * Redistributions in binary form must reproduce the above
13549 // copyright notice, this list of conditions and the following disclaimer
13550 // in the documentation and/or other materials provided with the
13551 // distribution.
13552 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13553 // Framework nor the names of its contributors may be used to endorse
13554 // or promote products derived from this software without specific prior
13555 // written permission.
13556 //
13557 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13558 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13559 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13560 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13561 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13562 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13563 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13564 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13565 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13566 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13567 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13568 //
13569 // ---------------------------------------------------------------------------
13570 //
13571 // This file was generated by the CEF translator tool and should not edited
13572 // by hand. See the translator.README.txt file in the tools directory for
13573 // more information.
13574 //
13575 // $hash=de4a9b856c6951231f446991a9b1efb89096ad3b$
13576 //
13577 
13578 extern (C):
13579 
13580 ///
13581 /// Supports discovery of and communication with media devices on the local
13582 /// network via the Cast and DIAL protocols. The functions of this structure may
13583 /// be called on any browser process thread unless otherwise indicated.
13584 ///
13585 struct cef_media_router_t
13586 {
13587     ///
13588     /// Base structure.
13589     ///
13590 
13591     ///
13592     /// Add an observer for MediaRouter events. The observer will remain
13593     /// registered until the returned Registration object is destroyed.
13594     ///
13595     cef_base_ref_counted_t base;
13596     extern(System) cef_registration_t* function (
13597         cef_media_router_t* self,
13598         cef_media_observer_t* observer) nothrow add_observer; ///
13599     /// Returns a MediaSource object for the specified media source URN. Supported
13600     /// URN schemes include "cast:" and "dial:", and will be already known by the
13601     /// client application (e.g. "cast:<appId>?clientId=<clientId>").
13602     ///
13603     extern(System) cef_media_source_t* function (
13604         cef_media_router_t* self,
13605         const(cef_string_t)* urn) nothrow get_source;
13606 
13607     ///
13608     /// Trigger an asynchronous call to cef_media_observer_t::OnSinks on all
13609     /// registered observers.
13610     ///
13611     extern(System) void function (cef_media_router_t* self) nothrow notify_current_sinks;
13612 
13613     ///
13614     /// Create a new route between |source| and |sink|. Source and sink must be
13615     /// valid, compatible (as reported by cef_media_sink_t::IsCompatibleWith), and
13616     /// a route between them must not already exist. |callback| will be executed
13617     /// on success or failure. If route creation succeeds it will also trigger an
13618     /// asynchronous call to cef_media_observer_t::OnRoutes on all registered
13619     /// observers.
13620     ///
13621     extern(System) void function (
13622         cef_media_router_t* self,
13623         cef_media_source_t* source,
13624         cef_media_sink_t* sink,
13625         cef_media_route_create_callback_t* callback) nothrow create_route;
13626 
13627     ///
13628     /// Trigger an asynchronous call to cef_media_observer_t::OnRoutes on all
13629     /// registered observers.
13630     ///
13631     extern(System) void function (cef_media_router_t* self) nothrow notify_current_routes;
13632 }
13633 
13634 
13635 
13636 ///
13637 /// Returns the MediaRouter object associated with the global request context.
13638 /// If |callback| is non-NULL it will be executed asnychronously on the UI
13639 /// thread after the manager's storage has been initialized. Equivalent to
13640 /// calling cef_request_context_t::cef_request_context_get_global_context()->get
13641 /// _media_router().
13642 ///
13643 cef_media_router_t* cef_media_router_get_global (
13644     cef_completion_callback_t* callback);
13645 
13646 ///
13647 /// Implemented by the client to observe MediaRouter events and registered via
13648 /// cef_media_router_t::AddObserver. The functions of this structure will be
13649 /// called on the browser process UI thread.
13650 ///
13651 struct cef_media_observer_t
13652 {
13653     ///
13654     /// Base structure.
13655     ///
13656     cef_base_ref_counted_t base;
13657 
13658     ///
13659     /// The list of available media sinks has changed or
13660     /// cef_media_router_t::NotifyCurrentSinks was called.
13661     ///
13662     extern(System) void function (
13663         cef_media_observer_t* self,
13664         size_t sinksCount,
13665         cef_media_sink_t** sinks) nothrow on_sinks;
13666 
13667     ///
13668     /// The list of available media routes has changed or
13669     /// cef_media_router_t::NotifyCurrentRoutes was called.
13670     ///
13671     extern(System) void function (
13672         cef_media_observer_t* self,
13673         size_t routesCount,
13674         cef_media_route_t** routes) nothrow on_routes;
13675 
13676     ///
13677     /// The connection state of |route| has changed.
13678     ///
13679     extern(System) void function (
13680         cef_media_observer_t* self,
13681         cef_media_route_t* route,
13682         cef_media_route_connection_state_t state) nothrow on_route_state_changed;
13683 
13684     ///
13685     /// A message was recieved over |route|. |message| is only valid for the scope
13686     /// of this callback and should be copied if necessary.
13687     ///
13688     extern(System) void function (
13689         cef_media_observer_t* self,
13690         cef_media_route_t* route,
13691         const(void)* message,
13692         size_t message_size) nothrow on_route_message_received;
13693 }
13694 
13695 
13696 
13697 ///
13698 /// Represents the route between a media source and sink. Instances of this
13699 /// object are created via cef_media_router_t::CreateRoute and retrieved via
13700 /// cef_media_observer_t::OnRoutes. Contains the status and metadata of a
13701 /// routing operation. The functions of this structure may be called on any
13702 /// browser process thread unless otherwise indicated.
13703 ///
13704 struct cef_media_route_t
13705 {
13706     ///
13707     /// Base structure.
13708     ///
13709     cef_base_ref_counted_t base;
13710 
13711     ///
13712     /// Returns the ID for this route.
13713     ///
13714     // The resulting string must be freed by calling cef_string_userfree_free().
13715     extern(System) cef_string_userfree_t function (cef_media_route_t* self) nothrow get_id;
13716 
13717     ///
13718     /// Returns the source associated with this route.
13719     ///
13720     extern(System) cef_media_source_t* function (cef_media_route_t* self) nothrow get_source;
13721 
13722     ///
13723     /// Returns the sink associated with this route.
13724     ///
13725     extern(System) cef_media_sink_t* function (cef_media_route_t* self) nothrow get_sink;
13726 
13727     ///
13728     /// Send a message over this route. |message| will be copied if necessary.
13729     ///
13730     extern(System) void function (
13731         cef_media_route_t* self,
13732         const(void)* message,
13733         size_t message_size) nothrow send_route_message;
13734 
13735     ///
13736     /// Terminate this route. Will result in an asynchronous call to
13737     /// cef_media_observer_t::OnRoutes on all registered observers.
13738     ///
13739     extern(System) void function (cef_media_route_t* self) nothrow terminate;
13740 }
13741 
13742 
13743 
13744 ///
13745 /// Callback structure for cef_media_router_t::CreateRoute. The functions of
13746 /// this structure will be called on the browser process UI thread.
13747 ///
13748 struct cef_media_route_create_callback_t
13749 {
13750     ///
13751     /// Base structure.
13752     ///
13753     cef_base_ref_counted_t base;
13754 
13755     ///
13756     /// Method that will be executed when the route creation has finished.
13757     /// |result| will be CEF_MRCR_OK if the route creation succeeded. |error| will
13758     /// be a description of the error if the route creation failed. |route| is the
13759     /// resulting route, or NULL if the route creation failed.
13760     ///
13761     extern(System) void function (
13762         cef_media_route_create_callback_t* self,
13763         cef_media_route_create_result_t result,
13764         const(cef_string_t)* error,
13765         cef_media_route_t* route) nothrow on_media_route_create_finished;
13766 }
13767 
13768 
13769 
13770 ///
13771 /// Represents a sink to which media can be routed. Instances of this object are
13772 /// retrieved via cef_media_observer_t::OnSinks. The functions of this structure
13773 /// may be called on any browser process thread unless otherwise indicated.
13774 ///
13775 struct cef_media_sink_t
13776 {
13777     ///
13778     /// Base structure.
13779     ///
13780     cef_base_ref_counted_t base;
13781 
13782     ///
13783     /// Returns the ID for this sink.
13784     ///
13785     // The resulting string must be freed by calling cef_string_userfree_free().
13786     extern(System) cef_string_userfree_t function (cef_media_sink_t* self) nothrow get_id;
13787 
13788     ///
13789     /// Returns the name of this sink.
13790     ///
13791     // The resulting string must be freed by calling cef_string_userfree_free().
13792     extern(System) cef_string_userfree_t function (cef_media_sink_t* self) nothrow get_name;
13793 
13794     ///
13795     /// Returns the icon type for this sink.
13796     ///
13797     extern(System) cef_media_sink_icon_type_t function (
13798         cef_media_sink_t* self) nothrow get_icon_type;
13799 
13800     ///
13801     /// Asynchronously retrieves device info.
13802     ///
13803     extern(System) void function (
13804         cef_media_sink_t* self,
13805         cef_media_sink_device_info_callback_t* callback) nothrow get_device_info;
13806 
13807     ///
13808     /// Returns true (1) if this sink accepts content via Cast.
13809     ///
13810     extern(System) int function (cef_media_sink_t* self) nothrow is_cast_sink;
13811 
13812     ///
13813     /// Returns true (1) if this sink accepts content via DIAL.
13814     ///
13815     extern(System) int function (cef_media_sink_t* self) nothrow is_dial_sink;
13816 
13817     ///
13818     /// Returns true (1) if this sink is compatible with |source|.
13819     ///
13820     extern(System) int function (
13821         cef_media_sink_t* self,
13822         cef_media_source_t* source) nothrow is_compatible_with;
13823 }
13824 
13825 
13826 
13827 ///
13828 /// Callback structure for cef_media_sink_t::GetDeviceInfo. The functions of
13829 /// this structure will be called on the browser process UI thread.
13830 ///
13831 struct cef_media_sink_device_info_callback_t
13832 {
13833     ///
13834     /// Base structure.
13835     ///
13836     cef_base_ref_counted_t base;
13837 
13838     ///
13839     /// Method that will be executed asyncronously once device information has
13840     /// been retrieved.
13841     ///
13842     extern(System) void function (
13843         cef_media_sink_device_info_callback_t* self,
13844         const(cef_media_sink_device_info_t)* device_info) nothrow on_media_sink_device_info;
13845 }
13846 
13847 
13848 
13849 ///
13850 /// Represents a source from which media can be routed. Instances of this object
13851 /// are retrieved via cef_media_router_t::GetSource. The functions of this
13852 /// structure may be called on any browser process thread unless otherwise
13853 /// indicated.
13854 ///
13855 struct cef_media_source_t
13856 {
13857     ///
13858     /// Base structure.
13859     ///
13860     cef_base_ref_counted_t base;
13861 
13862     ///
13863     /// Returns the ID (media source URN or URL) for this source.
13864     ///
13865     // The resulting string must be freed by calling cef_string_userfree_free().
13866     extern(System) cef_string_userfree_t function (cef_media_source_t* self) nothrow get_id;
13867 
13868     ///
13869     /// Returns true (1) if this source outputs its content via Cast.
13870     ///
13871     extern(System) int function (cef_media_source_t* self) nothrow is_cast_source;
13872 
13873     ///
13874     /// Returns true (1) if this source outputs its content via DIAL.
13875     ///
13876     extern(System) int function (cef_media_source_t* self) nothrow is_dial_source;
13877 }
13878 
13879 
13880 
13881 // CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_
13882 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
13883 //
13884 // Redistribution and use in source and binary forms, with or without
13885 // modification, are permitted provided that the following conditions are
13886 // met:
13887 //
13888 //    * Redistributions of source code must retain the above copyright
13889 // notice, this list of conditions and the following disclaimer.
13890 //    * Redistributions in binary form must reproduce the above
13891 // copyright notice, this list of conditions and the following disclaimer
13892 // in the documentation and/or other materials provided with the
13893 // distribution.
13894 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13895 // Framework nor the names of its contributors may be used to endorse
13896 // or promote products derived from this software without specific prior
13897 // written permission.
13898 //
13899 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13900 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13901 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13902 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13903 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13904 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13905 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13906 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13907 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13908 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13909 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13910 //
13911 // ---------------------------------------------------------------------------
13912 //
13913 // This file was generated by the CEF translator tool and should not edited
13914 // by hand. See the translator.README.txt file in the tools directory for
13915 // more information.
13916 //
13917 // $hash=d70b78b8108bb08b4f53b2627ed4ebfdffece7c1$
13918 //
13919 
13920 extern (C):
13921 
13922 ///
13923 /// Supports creation and modification of menus. See cef_menu_id_t for the
13924 /// command ids that have default implementations. All user-defined command ids
13925 /// should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of
13926 /// this structure can only be accessed on the browser process the UI thread.
13927 ///
13928 struct cef_menu_model_t
13929 {
13930     ///
13931     /// Base structure.
13932     ///
13933 
13934     ///
13935     /// Returns true (1) if this menu is a submenu.
13936     ///
13937 
13938     ///
13939     /// Clears the menu. Returns true (1) on success.
13940     ///
13941 
13942     ///
13943     /// Returns the number of items in this menu.
13944     ///
13945 
13946     ///
13947     /// Add a separator to the menu. Returns true (1) on success.
13948     cef_base_ref_counted_t base;
13949     extern(System) int function (cef_menu_model_t* self) nothrow is_sub_menu;
13950     extern(System) int function (cef_menu_model_t* self) nothrow clear;
13951     extern(System) size_t function (cef_menu_model_t* self) nothrow get_count;
13952     ///
13953     extern(System) int function (cef_menu_model_t* self) nothrow add_separator;
13954 
13955     ///
13956     /// Add an item to the menu. Returns true (1) on success.
13957     ///
13958     extern(System) int function (
13959         cef_menu_model_t* self,
13960         int command_id,
13961         const(cef_string_t)* label) nothrow add_item;
13962 
13963     ///
13964     /// Add a check item to the menu. Returns true (1) on success.
13965     ///
13966     extern(System) int function (
13967         cef_menu_model_t* self,
13968         int command_id,
13969         const(cef_string_t)* label) nothrow add_check_item;
13970 
13971     ///
13972     /// Add a radio item to the menu. Only a single item with the specified
13973     /// |group_id| can be checked at a time. Returns true (1) on success.
13974     ///
13975     extern(System) int function (
13976         cef_menu_model_t* self,
13977         int command_id,
13978         const(cef_string_t)* label,
13979         int group_id) nothrow add_radio_item;
13980 
13981     ///
13982     /// Add a sub-menu to the menu. The new sub-menu is returned.
13983     ///
13984     extern(System) cef_menu_model_t* function (
13985         cef_menu_model_t* self,
13986         int command_id,
13987         const(cef_string_t)* label) nothrow add_sub_menu;
13988 
13989     ///
13990     /// Insert a separator in the menu at the specified |index|. Returns true (1)
13991     /// on success.
13992     ///
13993     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow insert_separator_at;
13994 
13995     ///
13996     /// Insert an item in the menu at the specified |index|. Returns true (1) on
13997     /// success.
13998     ///
13999     extern(System) int function (
14000         cef_menu_model_t* self,
14001         size_t index,
14002         int command_id,
14003         const(cef_string_t)* label) nothrow insert_item_at;
14004 
14005     ///
14006     /// Insert a check item in the menu at the specified |index|. Returns true (1)
14007     /// on success.
14008     ///
14009     extern(System) int function (
14010         cef_menu_model_t* self,
14011         size_t index,
14012         int command_id,
14013         const(cef_string_t)* label) nothrow insert_check_item_at;
14014 
14015     ///
14016     /// Insert a radio item in the menu at the specified |index|. Only a single
14017     /// item with the specified |group_id| can be checked at a time. Returns true
14018     /// (1) on success.
14019     ///
14020     extern(System) int function (
14021         cef_menu_model_t* self,
14022         size_t index,
14023         int command_id,
14024         const(cef_string_t)* label,
14025         int group_id) nothrow insert_radio_item_at;
14026 
14027     ///
14028     /// Insert a sub-menu in the menu at the specified |index|. The new sub-menu
14029     /// is returned.
14030     ///
14031     extern(System) cef_menu_model_t* function (
14032         cef_menu_model_t* self,
14033         size_t index,
14034         int command_id,
14035         const(cef_string_t)* label) nothrow insert_sub_menu_at;
14036 
14037     ///
14038     /// Removes the item with the specified |command_id|. Returns true (1) on
14039     /// success.
14040     ///
14041     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow remove;
14042 
14043     ///
14044     /// Removes the item at the specified |index|. Returns true (1) on success.
14045     ///
14046     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow remove_at;
14047 
14048     ///
14049     /// Returns the index associated with the specified |command_id| or -1 if not
14050     /// found due to the command id not existing in the menu.
14051     ///
14052     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow get_index_of;
14053 
14054     ///
14055     /// Returns the command id at the specified |index| or -1 if not found due to
14056     /// invalid range or the index being a separator.
14057     ///
14058     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow get_command_id_at;
14059 
14060     ///
14061     /// Sets the command id at the specified |index|. Returns true (1) on success.
14062     ///
14063     extern(System) int function (
14064         cef_menu_model_t* self,
14065         size_t index,
14066         int command_id) nothrow set_command_id_at;
14067 
14068     ///
14069     /// Returns the label for the specified |command_id| or NULL if not found.
14070     ///
14071     // The resulting string must be freed by calling cef_string_userfree_free().
14072     extern(System) cef_string_userfree_t function (
14073         cef_menu_model_t* self,
14074         int command_id) nothrow get_label;
14075 
14076     ///
14077     /// Returns the label at the specified |index| or NULL if not found due to
14078     /// invalid range or the index being a separator.
14079     ///
14080     // The resulting string must be freed by calling cef_string_userfree_free().
14081     extern(System) cef_string_userfree_t function (
14082         cef_menu_model_t* self,
14083         size_t index) nothrow get_label_at;
14084 
14085     ///
14086     /// Sets the label for the specified |command_id|. Returns true (1) on
14087     /// success.
14088     ///
14089     extern(System) int function (
14090         cef_menu_model_t* self,
14091         int command_id,
14092         const(cef_string_t)* label) nothrow set_label;
14093 
14094     ///
14095     /// Set the label at the specified |index|. Returns true (1) on success.
14096     ///
14097     extern(System) int function (
14098         cef_menu_model_t* self,
14099         size_t index,
14100         const(cef_string_t)* label) nothrow set_label_at;
14101 
14102     ///
14103     /// Returns the item type for the specified |command_id|.
14104     ///
14105     extern(System) cef_menu_item_type_t function (
14106         cef_menu_model_t* self,
14107         int command_id) nothrow get_type;
14108 
14109     ///
14110     /// Returns the item type at the specified |index|.
14111     ///
14112     extern(System) cef_menu_item_type_t function (
14113         cef_menu_model_t* self,
14114         size_t index) nothrow get_type_at;
14115 
14116     ///
14117     /// Returns the group id for the specified |command_id| or -1 if invalid.
14118     ///
14119     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow get_group_id;
14120 
14121     ///
14122     /// Returns the group id at the specified |index| or -1 if invalid.
14123     ///
14124     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow get_group_id_at;
14125 
14126     ///
14127     /// Sets the group id for the specified |command_id|. Returns true (1) on
14128     /// success.
14129     ///
14130     extern(System) int function (
14131         cef_menu_model_t* self,
14132         int command_id,
14133         int group_id) nothrow set_group_id;
14134 
14135     ///
14136     /// Sets the group id at the specified |index|. Returns true (1) on success.
14137     ///
14138     extern(System) int function (
14139         cef_menu_model_t* self,
14140         size_t index,
14141         int group_id) nothrow set_group_id_at;
14142 
14143     ///
14144     /// Returns the submenu for the specified |command_id| or NULL if invalid.
14145     ///
14146     extern(System) cef_menu_model_t* function (
14147         cef_menu_model_t* self,
14148         int command_id) nothrow get_sub_menu;
14149 
14150     ///
14151     /// Returns the submenu at the specified |index| or NULL if invalid.
14152     ///
14153     extern(System) cef_menu_model_t* function (
14154         cef_menu_model_t* self,
14155         size_t index) nothrow get_sub_menu_at;
14156 
14157     ///
14158     /// Returns true (1) if the specified |command_id| is visible.
14159     ///
14160     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_visible;
14161 
14162     ///
14163     /// Returns true (1) if the specified |index| is visible.
14164     ///
14165     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_visible_at;
14166 
14167     ///
14168     /// Change the visibility of the specified |command_id|. Returns true (1) on
14169     /// success.
14170     ///
14171     extern(System) int function (
14172         cef_menu_model_t* self,
14173         int command_id,
14174         int visible) nothrow set_visible;
14175 
14176     ///
14177     /// Change the visibility at the specified |index|. Returns true (1) on
14178     /// success.
14179     ///
14180     extern(System) int function (
14181         cef_menu_model_t* self,
14182         size_t index,
14183         int visible) nothrow set_visible_at;
14184 
14185     ///
14186     /// Returns true (1) if the specified |command_id| is enabled.
14187     ///
14188     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_enabled;
14189 
14190     ///
14191     /// Returns true (1) if the specified |index| is enabled.
14192     ///
14193     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_enabled_at;
14194 
14195     ///
14196     /// Change the enabled status of the specified |command_id|. Returns true (1)
14197     /// on success.
14198     ///
14199     extern(System) int function (
14200         cef_menu_model_t* self,
14201         int command_id,
14202         int enabled) nothrow set_enabled;
14203 
14204     ///
14205     /// Change the enabled status at the specified |index|. Returns true (1) on
14206     /// success.
14207     ///
14208     extern(System) int function (
14209         cef_menu_model_t* self,
14210         size_t index,
14211         int enabled) nothrow set_enabled_at;
14212 
14213     ///
14214     /// Returns true (1) if the specified |command_id| is checked. Only applies to
14215     /// check and radio items.
14216     ///
14217     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_checked;
14218 
14219     ///
14220     /// Returns true (1) if the specified |index| is checked. Only applies to
14221     /// check and radio items.
14222     ///
14223     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_checked_at;
14224 
14225     ///
14226     /// Check the specified |command_id|. Only applies to check and radio items.
14227     /// Returns true (1) on success.
14228     ///
14229     extern(System) int function (
14230         cef_menu_model_t* self,
14231         int command_id,
14232         int checked) nothrow set_checked;
14233 
14234     ///
14235     /// Check the specified |index|. Only applies to check and radio items.
14236     /// Returns true (1) on success.
14237     ///
14238     extern(System) int function (
14239         cef_menu_model_t* self,
14240         size_t index,
14241         int checked) nothrow set_checked_at;
14242 
14243     ///
14244     /// Returns true (1) if the specified |command_id| has a keyboard accelerator
14245     /// assigned.
14246     ///
14247     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow has_accelerator;
14248 
14249     ///
14250     /// Returns true (1) if the specified |index| has a keyboard accelerator
14251     /// assigned.
14252     ///
14253     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow has_accelerator_at;
14254 
14255     ///
14256     /// Set the keyboard accelerator for the specified |command_id|. |key_code|
14257     /// can be any virtual key or character value. Returns true (1) on success.
14258     ///
14259     extern(System) int function (
14260         cef_menu_model_t* self,
14261         int command_id,
14262         int key_code,
14263         int shift_pressed,
14264         int ctrl_pressed,
14265         int alt_pressed) nothrow set_accelerator;
14266 
14267     ///
14268     /// Set the keyboard accelerator at the specified |index|. |key_code| can be
14269     /// any virtual key or character value. Returns true (1) on success.
14270     ///
14271     extern(System) int function (
14272         cef_menu_model_t* self,
14273         size_t index,
14274         int key_code,
14275         int shift_pressed,
14276         int ctrl_pressed,
14277         int alt_pressed) nothrow set_accelerator_at;
14278 
14279     ///
14280     /// Remove the keyboard accelerator for the specified |command_id|. Returns
14281     /// true (1) on success.
14282     ///
14283     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow remove_accelerator;
14284 
14285     ///
14286     /// Remove the keyboard accelerator at the specified |index|. Returns true (1)
14287     /// on success.
14288     ///
14289     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow remove_accelerator_at;
14290 
14291     ///
14292     /// Retrieves the keyboard accelerator for the specified |command_id|. Returns
14293     /// true (1) on success.
14294     ///
14295     extern(System) int function (
14296         cef_menu_model_t* self,
14297         int command_id,
14298         int* key_code,
14299         int* shift_pressed,
14300         int* ctrl_pressed,
14301         int* alt_pressed) nothrow get_accelerator;
14302 
14303     ///
14304     /// Retrieves the keyboard accelerator for the specified |index|. Returns true
14305     /// (1) on success.
14306     ///
14307     extern(System) int function (
14308         cef_menu_model_t* self,
14309         size_t index,
14310         int* key_code,
14311         int* shift_pressed,
14312         int* ctrl_pressed,
14313         int* alt_pressed) nothrow get_accelerator_at;
14314 
14315     ///
14316     /// Set the explicit color for |command_id| and |color_type| to |color|.
14317     /// Specify a |color| value of 0 to remove the explicit color. If no explicit
14318     /// color or default color is set for |color_type| then the system color will
14319     /// be used. Returns true (1) on success.
14320     ///
14321     extern(System) int function (
14322         cef_menu_model_t* self,
14323         int command_id,
14324         cef_menu_color_type_t color_type,
14325         cef_color_t color) nothrow set_color;
14326 
14327     ///
14328     /// Set the explicit color for |command_id| and |index| to |color|. Specify a
14329     /// |color| value of 0 to remove the explicit color. Specify an |index| value
14330     /// of -1 to set the default color for items that do not have an explicit
14331     /// color set. If no explicit color or default color is set for |color_type|
14332     /// then the system color will be used. Returns true (1) on success.
14333     ///
14334     extern(System) int function (
14335         cef_menu_model_t* self,
14336         int index,
14337         cef_menu_color_type_t color_type,
14338         cef_color_t color) nothrow set_color_at;
14339 
14340     ///
14341     /// Returns in |color| the color that was explicitly set for |command_id| and
14342     /// |color_type|. If a color was not set then 0 will be returned in |color|.
14343     /// Returns true (1) on success.
14344     ///
14345     extern(System) int function (
14346         cef_menu_model_t* self,
14347         int command_id,
14348         cef_menu_color_type_t color_type,
14349         cef_color_t* color) nothrow get_color;
14350 
14351     ///
14352     /// Returns in |color| the color that was explicitly set for |command_id| and
14353     /// |color_type|. Specify an |index| value of -1 to return the default color
14354     /// in |color|. If a color was not set then 0 will be returned in |color|.
14355     /// Returns true (1) on success.
14356     ///
14357     extern(System) int function (
14358         cef_menu_model_t* self,
14359         int index,
14360         cef_menu_color_type_t color_type,
14361         cef_color_t* color) nothrow get_color_at;
14362 
14363     ///
14364     /// Sets the font list for the specified |command_id|. If |font_list| is NULL
14365     /// the system font will be used. Returns true (1) on success. The format is
14366     /// "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where: - FONT_FAMILY_LIST is a
14367     /// comma-separated list of font family names, - STYLES is an optional space-
14368     /// separated list of style names
14369     ///   (case-sensitive "Bold" and "Italic" are supported), and
14370     /// - SIZE is an integer font size in pixels with the suffix "px".
14371     ///
14372     /// Here are examples of valid font description strings: - "Arial, Helvetica,
14373     /// Bold Italic 14px" - "Arial, 14px"
14374     ///
14375     extern(System) int function (
14376         cef_menu_model_t* self,
14377         int command_id,
14378         const(cef_string_t)* font_list) nothrow set_font_list;
14379 
14380     ///
14381     /// Sets the font list for the specified |index|. Specify an |index| value of
14382     /// -1 to set the default font. If |font_list| is NULL the system font will be
14383     /// used. Returns true (1) on success. The format is
14384     /// "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where: - FONT_FAMILY_LIST is a
14385     /// comma-separated list of font family names, - STYLES is an optional space-
14386     /// separated list of style names
14387     ///   (case-sensitive "Bold" and "Italic" are supported), and
14388     /// - SIZE is an integer font size in pixels with the suffix "px".
14389     ///
14390     /// Here are examples of valid font description strings: - "Arial, Helvetica,
14391     /// Bold Italic 14px" - "Arial, 14px"
14392     ///
14393     extern(System) int function (
14394         cef_menu_model_t* self,
14395         int index,
14396         const(cef_string_t)* font_list) nothrow set_font_list_at;
14397 }
14398 
14399 
14400 
14401 ///
14402 /// Create a new MenuModel with the specified |delegate|.
14403 ///
14404 cef_menu_model_t* cef_menu_model_create (cef_menu_model_delegate_t* delegate_);
14405 
14406 // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_
14407 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
14408 //
14409 // Redistribution and use in source and binary forms, with or without
14410 // modification, are permitted provided that the following conditions are
14411 // met:
14412 //
14413 //    * Redistributions of source code must retain the above copyright
14414 // notice, this list of conditions and the following disclaimer.
14415 //    * Redistributions in binary form must reproduce the above
14416 // copyright notice, this list of conditions and the following disclaimer
14417 // in the documentation and/or other materials provided with the
14418 // distribution.
14419 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14420 // Framework nor the names of its contributors may be used to endorse
14421 // or promote products derived from this software without specific prior
14422 // written permission.
14423 //
14424 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14425 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14426 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
14427 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
14428 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14429 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14430 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
14431 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
14432 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14433 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14434 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14435 //
14436 // ---------------------------------------------------------------------------
14437 //
14438 // This file was generated by the CEF translator tool and should not edited
14439 // by hand. See the translator.README.txt file in the tools directory for
14440 // more information.
14441 //
14442 // $hash=933a90dfb7b94a3aba7f2944e4540662dc8c79d7$
14443 //
14444 
14445 extern (C):
14446 
14447 
14448 
14449 ///
14450 /// Implement this structure to handle menu model events. The functions of this
14451 /// structure will be called on the browser process UI thread unless otherwise
14452 /// indicated.
14453 ///
14454 struct cef_menu_model_delegate_t
14455 {
14456     ///
14457     /// Base structure.
14458     ///
14459 
14460     ///
14461     /// Perform the action associated with the specified |command_id| and optional
14462     /// |event_flags|.
14463     ///
14464 
14465     ///
14466     /// Called when the user moves the mouse outside the menu and over the owning
14467     /// window.
14468     ///
14469     cef_base_ref_counted_t base;
14470     extern(System) void function (
14471         cef_menu_model_delegate_t* self,
14472         cef_menu_model_t* menu_model,
14473         int command_id,
14474         cef_event_flags_t event_flags) nothrow execute_command;
14475     extern(System) void function (
14476         cef_menu_model_delegate_t* self,
14477         cef_menu_model_t* menu_model,
14478         const(cef_point_t)* screen_point) nothrow mouse_outside_menu;
14479 
14480     ///
14481     /// Called on unhandled open submenu keyboard commands. |is_rtl| will be true
14482     /// (1) if the menu is displaying a right-to-left language.
14483     ///
14484     extern(System) void function (
14485         cef_menu_model_delegate_t* self,
14486         cef_menu_model_t* menu_model,
14487         int is_rtl) nothrow unhandled_open_submenu;
14488 
14489     ///
14490     /// Called on unhandled close submenu keyboard commands. |is_rtl| will be true
14491     /// (1) if the menu is displaying a right-to-left language.
14492     ///
14493     extern(System) void function (
14494         cef_menu_model_delegate_t* self,
14495         cef_menu_model_t* menu_model,
14496         int is_rtl) nothrow unhandled_close_submenu;
14497 
14498     ///
14499     /// The menu is about to show.
14500     ///
14501     extern(System) void function (
14502         cef_menu_model_delegate_t* self,
14503         cef_menu_model_t* menu_model) nothrow menu_will_show;
14504 
14505     ///
14506     /// The menu has closed.
14507     ///
14508     extern(System) void function (
14509         cef_menu_model_delegate_t* self,
14510         cef_menu_model_t* menu_model) nothrow menu_closed;
14511 
14512     ///
14513     /// Optionally modify a menu item label. Return true (1) if |label| was
14514     /// modified.
14515     ///
14516     extern(System) int function (
14517         cef_menu_model_delegate_t* self,
14518         cef_menu_model_t* menu_model,
14519         cef_string_t* label) nothrow format_label;
14520 }
14521 
14522 
14523 
14524 // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_
14525 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
14526 //
14527 // Redistribution and use in source and binary forms, with or without
14528 // modification, are permitted provided that the following conditions are
14529 // met:
14530 //
14531 //    * Redistributions of source code must retain the above copyright
14532 // notice, this list of conditions and the following disclaimer.
14533 //    * Redistributions in binary form must reproduce the above
14534 // copyright notice, this list of conditions and the following disclaimer
14535 // in the documentation and/or other materials provided with the
14536 // distribution.
14537 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14538 // Framework nor the names of its contributors may be used to endorse
14539 // or promote products derived from this software without specific prior
14540 // written permission.
14541 //
14542 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14543 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14544 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
14545 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
14546 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14547 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14548 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
14549 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
14550 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14551 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14552 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14553 //
14554 // ---------------------------------------------------------------------------
14555 //
14556 // This file was generated by the CEF translator tool and should not edited
14557 // by hand. See the translator.README.txt file in the tools directory for
14558 // more information.
14559 //
14560 // $hash=d33771c31b7b0964aa2ccf1c2bc2ca1226194977$
14561 //
14562 
14563 extern (C):
14564 
14565 ///
14566 /// Structure used to represent an entry in navigation history.
14567 ///
14568 struct cef_navigation_entry_t
14569 {
14570     ///
14571     /// Base structure.
14572     ///
14573 
14574     ///
14575     /// Returns true (1) if this object is valid. Do not call any other functions
14576     /// if this function returns false (0).
14577     ///
14578 
14579     ///
14580     /// Returns the actual URL of the page. For some pages this may be data: URL
14581     /// or similar. Use get_display_url() to return a display-friendly version.
14582     ///
14583     // The resulting string must be freed by calling cef_string_userfree_free().
14584 
14585     ///
14586     /// Returns a display-friendly version of the URL.
14587     ///
14588     // The resulting string must be freed by calling cef_string_userfree_free().
14589     cef_base_ref_counted_t base;
14590     extern(System) int function (cef_navigation_entry_t* self) nothrow is_valid;
14591     extern(System) cef_string_userfree_t function (cef_navigation_entry_t* self) nothrow get_url;
14592     extern(System) cef_string_userfree_t function (
14593         cef_navigation_entry_t* self) nothrow get_display_url;
14594 
14595     ///
14596     /// Returns the original URL that was entered by the user before any
14597     /// redirects.
14598     ///
14599     // The resulting string must be freed by calling cef_string_userfree_free().
14600     extern(System) cef_string_userfree_t function (
14601         cef_navigation_entry_t* self) nothrow get_original_url;
14602 
14603     ///
14604     /// Returns the title set by the page. This value may be NULL.
14605     ///
14606     // The resulting string must be freed by calling cef_string_userfree_free().
14607     extern(System) cef_string_userfree_t function (cef_navigation_entry_t* self) nothrow get_title;
14608 
14609     ///
14610     /// Returns the transition type which indicates what the user did to move to
14611     /// this page from the previous page.
14612     ///
14613     extern(System) cef_transition_type_t function (
14614         cef_navigation_entry_t* self) nothrow get_transition_type;
14615 
14616     ///
14617     /// Returns true (1) if this navigation includes post data.
14618     ///
14619     extern(System) int function (cef_navigation_entry_t* self) nothrow has_post_data;
14620 
14621     ///
14622     /// Returns the time for the last known successful navigation completion. A
14623     /// navigation may be completed more than once if the page is reloaded. May be
14624     /// 0 if the navigation has not yet completed.
14625     ///
14626     extern(System) cef_basetime_t function (
14627         cef_navigation_entry_t* self) nothrow get_completion_time;
14628 
14629     ///
14630     /// Returns the HTTP status code for the last known successful navigation
14631     /// response. May be 0 if the response has not yet been received or if the
14632     /// navigation has not yet completed.
14633     ///
14634     extern(System) int function (cef_navigation_entry_t* self) nothrow get_http_status_code;
14635 
14636     ///
14637     /// Returns the SSL information for this navigation entry.
14638     ///
14639     extern(System) cef_sslstatus_t* function (cef_navigation_entry_t* self) nothrow get_sslstatus;
14640 }
14641 
14642 
14643 
14644 // CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_
14645 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
14646 //
14647 // Redistribution and use in source and binary forms, with or without
14648 // modification, are permitted provided that the following conditions are
14649 // met:
14650 //
14651 //    * Redistributions of source code must retain the above copyright
14652 // notice, this list of conditions and the following disclaimer.
14653 //    * Redistributions in binary form must reproduce the above
14654 // copyright notice, this list of conditions and the following disclaimer
14655 // in the documentation and/or other materials provided with the
14656 // distribution.
14657 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14658 // Framework nor the names of its contributors may be used to endorse
14659 // or promote products derived from this software without specific prior
14660 // written permission.
14661 //
14662 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14663 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14664 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
14665 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
14666 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14667 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14668 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
14669 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
14670 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14671 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14672 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14673 //
14674 // ---------------------------------------------------------------------------
14675 //
14676 // This file was generated by the CEF translator tool and should not edited
14677 // by hand. See the translator.README.txt file in the tools directory for
14678 // more information.
14679 //
14680 // $hash=9330c709713a10c1e6b55278428e65c07f4c9dfb$
14681 //
14682 
14683 extern (C):
14684 
14685 ///
14686 /// Add an entry to the cross-origin access whitelist.
14687 ///
14688 /// The same-origin policy restricts how scripts hosted from different origins
14689 /// (scheme + domain + port) can communicate. By default, scripts can only
14690 /// access resources with the same origin. Scripts hosted on the HTTP and HTTPS
14691 /// schemes (but no other schemes) can use the "Access-Control-Allow-Origin"
14692 /// header to allow cross-origin requests. For example,
14693 /// https://source.example.com can make XMLHttpRequest requests on
14694 /// http://target.example.com if the http://target.example.com request returns
14695 /// an "Access-Control-Allow-Origin: https://source.example.com" response
14696 /// header.
14697 ///
14698 /// Scripts in separate frames or iframes and hosted from the same protocol and
14699 /// domain suffix can execute cross-origin JavaScript if both pages set the
14700 /// document.domain value to the same domain suffix. For example,
14701 /// scheme://foo.example.com and scheme://bar.example.com can communicate using
14702 /// JavaScript if both domains set document.domain="example.com".
14703 ///
14704 /// This function is used to allow access to origins that would otherwise
14705 /// violate the same-origin policy. Scripts hosted underneath the fully
14706 /// qualified |source_origin| URL (like http://www.example.com) will be allowed
14707 /// access to all resources hosted on the specified |target_protocol| and
14708 /// |target_domain|. If |target_domain| is non-NULL and
14709 /// |allow_target_subdomains| is false (0) only exact domain matches will be
14710 /// allowed. If |target_domain| contains a top- level domain component (like
14711 /// "example.com") and |allow_target_subdomains| is true (1) sub-domain matches
14712 /// will be allowed. If |target_domain| is NULL and |allow_target_subdomains| if
14713 /// true (1) all domains and IP addresses will be allowed.
14714 ///
14715 /// This function cannot be used to bypass the restrictions on local or display
14716 /// isolated schemes. See the comments on CefRegisterCustomScheme for more
14717 /// information.
14718 ///
14719 /// This function may be called on any thread. Returns false (0) if
14720 /// |source_origin| is invalid or the whitelist cannot be accessed.
14721 ///
14722 int cef_add_cross_origin_whitelist_entry (
14723     const(cef_string_t)* source_origin,
14724     const(cef_string_t)* target_protocol,
14725     const(cef_string_t)* target_domain,
14726     int allow_target_subdomains);
14727 
14728 ///
14729 /// Remove an entry from the cross-origin access whitelist. Returns false (0) if
14730 /// |source_origin| is invalid or the whitelist cannot be accessed.
14731 ///
14732 int cef_remove_cross_origin_whitelist_entry (
14733     const(cef_string_t)* source_origin,
14734     const(cef_string_t)* target_protocol,
14735     const(cef_string_t)* target_domain,
14736     int allow_target_subdomains);
14737 
14738 ///
14739 /// Remove all entries from the cross-origin access whitelist. Returns false (0)
14740 /// if the whitelist cannot be accessed.
14741 ///
14742 int cef_clear_cross_origin_whitelist ();
14743 
14744 // CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_
14745 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
14746 //
14747 // Redistribution and use in source and binary forms, with or without
14748 // modification, are permitted provided that the following conditions are
14749 // met:
14750 //
14751 //    * Redistributions of source code must retain the above copyright
14752 // notice, this list of conditions and the following disclaimer.
14753 //    * Redistributions in binary form must reproduce the above
14754 // copyright notice, this list of conditions and the following disclaimer
14755 // in the documentation and/or other materials provided with the
14756 // distribution.
14757 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14758 // Framework nor the names of its contributors may be used to endorse
14759 // or promote products derived from this software without specific prior
14760 // written permission.
14761 //
14762 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14763 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14764 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
14765 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
14766 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14767 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14768 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
14769 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
14770 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14771 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14772 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14773 //
14774 // ---------------------------------------------------------------------------
14775 //
14776 // This file was generated by the CEF translator tool and should not edited
14777 // by hand. See the translator.README.txt file in the tools directory for
14778 // more information.
14779 //
14780 // $hash=5d6dad4bfaeef0117d068b6e67a8da7490fe7c2d$
14781 //
14782 
14783 extern (C):
14784 
14785 ///
14786 /// Combines specified |base_url| and |relative_url| into |resolved_url|.
14787 /// Returns false (0) if one of the URLs is NULL or invalid.
14788 ///
14789 int cef_resolve_url (
14790     const(cef_string_t)* base_url,
14791     const(cef_string_t)* relative_url,
14792     cef_string_t* resolved_url);
14793 
14794 ///
14795 /// Parse the specified |url| into its component parts. Returns false (0) if the
14796 /// URL is NULL or invalid.
14797 ///
14798 int cef_parse_url (const(cef_string_t)* url, cef_urlparts_t* parts);
14799 
14800 ///
14801 /// Creates a URL from the specified |parts|, which must contain a non-NULL spec
14802 /// or a non-NULL host and path (at a minimum), but not both. Returns false (0)
14803 /// if |parts| isn't initialized as described.
14804 ///
14805 int cef_create_url (const(cef_urlparts_t)* parts, cef_string_t* url);
14806 
14807 ///
14808 /// This is a convenience function for formatting a URL in a concise and human-
14809 /// friendly way to help users make security-related decisions (or in other
14810 /// circumstances when people need to distinguish sites, origins, or otherwise-
14811 /// simplified URLs from each other). Internationalized domain names (IDN) may
14812 /// be presented in Unicode if the conversion is considered safe. The returned
14813 /// value will (a) omit the path for standard schemes, excepting file and
14814 /// filesystem, and (b) omit the port if it is the default for the scheme. Do
14815 /// not use this for URLs which will be parsed or sent to other applications.
14816 ///
14817 // The resulting string must be freed by calling cef_string_userfree_free().
14818 cef_string_userfree_t cef_format_url_for_security_display (
14819     const(cef_string_t)* origin_url);
14820 
14821 ///
14822 /// Returns the mime type for the specified file extension or an NULL string if
14823 /// unknown.
14824 ///
14825 // The resulting string must be freed by calling cef_string_userfree_free().
14826 cef_string_userfree_t cef_get_mime_type (const(cef_string_t)* extension);
14827 
14828 ///
14829 /// Get the extensions associated with the given mime type. This should be
14830 /// passed in lower case. There could be multiple extensions for a given mime
14831 /// type, like "html,htm" for "text/html", or "txt,text,html,..." for "text/*".
14832 /// Any existing elements in the provided vector will not be erased.
14833 ///
14834 void cef_get_extensions_for_mime_type (
14835     const(cef_string_t)* mime_type,
14836     cef_string_list_t extensions);
14837 
14838 ///
14839 /// Encodes |data| as a base64 string.
14840 ///
14841 // The resulting string must be freed by calling cef_string_userfree_free().
14842 cef_string_userfree_t cef_base64encode (const(void)* data, size_t data_size);
14843 
14844 ///
14845 /// Decodes the base64 encoded string |data|. The returned value will be NULL if
14846 /// the decoding fails.
14847 ///
14848 
14849 cef_binary_value_t* cef_base64decode (const(cef_string_t)* data);
14850 
14851 ///
14852 /// Escapes characters in |text| which are unsuitable for use as a query
14853 /// parameter value. Everything except alphanumerics and -_.!~*'() will be
14854 /// converted to "%XX". If |use_plus| is true (1) spaces will change to "+". The
14855 /// result is basically the same as encodeURIComponent in Javacript.
14856 ///
14857 // The resulting string must be freed by calling cef_string_userfree_free().
14858 cef_string_userfree_t cef_uriencode (const(cef_string_t)* text, int use_plus);
14859 
14860 ///
14861 /// Unescapes |text| and returns the result. Unescaping consists of looking for
14862 /// the exact pattern "%XX" where each X is a hex digit and converting to the
14863 /// character with the numerical value of those digits (e.g. "i%20=%203%3b"
14864 /// unescapes to "i = 3;"). If |convert_to_utf8| is true (1) this function will
14865 /// attempt to interpret the initial decoded result as UTF-8. If the result is
14866 /// convertable into UTF-8 it will be returned as converted. Otherwise the
14867 /// initial decoded result will be returned.  The |unescape_rule| parameter
14868 /// supports further customization the decoding process.
14869 ///
14870 // The resulting string must be freed by calling cef_string_userfree_free().
14871 cef_string_userfree_t cef_uridecode (
14872     const(cef_string_t)* text,
14873     int convert_to_utf8,
14874     cef_uri_unescape_rule_t unescape_rule);
14875 
14876 ///
14877 /// Parses the specified |json_string| and returns a dictionary or list
14878 /// representation. If JSON parsing fails this function returns NULL.
14879 ///
14880 
14881 cef_value_t* cef_parse_json (
14882     const(cef_string_t)* json_string,
14883     cef_json_parser_options_t options);
14884 
14885 ///
14886 /// Parses the specified UTF8-encoded |json| buffer of size |json_size| and
14887 /// returns a dictionary or list representation. If JSON parsing fails this
14888 /// function returns NULL.
14889 ///
14890 cef_value_t* cef_parse_json_buffer (
14891     const(void)* json,
14892     size_t json_size,
14893     cef_json_parser_options_t options);
14894 
14895 ///
14896 /// Parses the specified |json_string| and returns a dictionary or list
14897 /// representation. If JSON parsing fails this function returns NULL and
14898 /// populates |error_msg_out| with a formatted error message.
14899 ///
14900 cef_value_t* cef_parse_jsonand_return_error (
14901     const(cef_string_t)* json_string,
14902     cef_json_parser_options_t options,
14903     cef_string_t* error_msg_out);
14904 
14905 ///
14906 /// Generates a JSON string from the specified root |node| which should be a
14907 /// dictionary or list value. Returns an NULL string on failure. This function
14908 /// requires exclusive access to |node| including any underlying data.
14909 ///
14910 // The resulting string must be freed by calling cef_string_userfree_free().
14911 cef_string_userfree_t cef_write_json (
14912     cef_value_t* node,
14913     cef_json_writer_options_t options);
14914 
14915 // CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_
14916 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
14917 //
14918 // Redistribution and use in source and binary forms, with or without
14919 // modification, are permitted provided that the following conditions are
14920 // met:
14921 //
14922 //    * Redistributions of source code must retain the above copyright
14923 // notice, this list of conditions and the following disclaimer.
14924 //    * Redistributions in binary form must reproduce the above
14925 // copyright notice, this list of conditions and the following disclaimer
14926 // in the documentation and/or other materials provided with the
14927 // distribution.
14928 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14929 // Framework nor the names of its contributors may be used to endorse
14930 // or promote products derived from this software without specific prior
14931 // written permission.
14932 //
14933 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14934 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14935 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
14936 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
14937 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14938 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14939 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
14940 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
14941 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14942 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14943 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14944 //
14945 // ---------------------------------------------------------------------------
14946 //
14947 // This file was generated by the CEF translator tool and should not edited
14948 // by hand. See the translator.README.txt file in the tools directory for
14949 // more information.
14950 //
14951 // $hash=70b306534b9cb8334c9ea260feacfd8f2f503292$
14952 //
14953 
14954 extern (C):
14955 
14956 ///
14957 /// Retrieve the path associated with the specified |key|. Returns true (1) on
14958 /// success. Can be called on any thread in the browser process.
14959 ///
14960 int cef_get_path (cef_path_key_t key, cef_string_t* path);
14961 
14962 // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_
14963 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
14964 //
14965 // Redistribution and use in source and binary forms, with or without
14966 // modification, are permitted provided that the following conditions are
14967 // met:
14968 //
14969 //    * Redistributions of source code must retain the above copyright
14970 // notice, this list of conditions and the following disclaimer.
14971 //    * Redistributions in binary form must reproduce the above
14972 // copyright notice, this list of conditions and the following disclaimer
14973 // in the documentation and/or other materials provided with the
14974 // distribution.
14975 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14976 // Framework nor the names of its contributors may be used to endorse
14977 // or promote products derived from this software without specific prior
14978 // written permission.
14979 //
14980 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14981 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14982 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
14983 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
14984 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14985 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14986 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
14987 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
14988 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14989 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14990 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14991 //
14992 // ---------------------------------------------------------------------------
14993 //
14994 // This file was generated by the CEF translator tool and should not edited
14995 // by hand. See the translator.README.txt file in the tools directory for
14996 // more information.
14997 //
14998 // $hash=012d76416d19b590f29c013c44ceec1674593022$
14999 //
15000 
15001 extern (C):
15002 
15003 ///
15004 /// Callback structure used for asynchronous continuation of media access
15005 /// permission requests.
15006 ///
15007 struct cef_media_access_callback_t
15008 {
15009     ///
15010     /// Base structure.
15011     ///
15012 
15013     ///
15014     /// Call to allow or deny media access. If this callback was initiated in
15015     /// response to a getUserMedia (indicated by
15016     /// CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE and/or
15017     /// CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE being set) then
15018     /// |allowed_permissions| must match |required_permissions| passed to
15019     /// OnRequestMediaAccessPermission.
15020     ///
15021 
15022     ///
15023     /// Cancel the media access request.
15024     ///
15025     cef_base_ref_counted_t base;
15026     extern(System) void function (
15027         cef_media_access_callback_t* self,
15028         uint allowed_permissions) nothrow cont;
15029     extern(System) void function (cef_media_access_callback_t* self) nothrow cancel;
15030 }
15031 
15032  ///
15033 /// Callback structure used for asynchronous continuation of permission prompts.
15034 ///
15035 struct cef_permission_prompt_callback_t
15036 {
15037     ///
15038     /// Base structure.
15039     ///
15040     cef_base_ref_counted_t base;
15041 
15042     ///
15043     /// Complete the permissions request with the specified |result|.
15044     ///
15045     extern(System) void function (
15046         cef_permission_prompt_callback_t* self,
15047         cef_permission_request_result_t result) nothrow cont;
15048 }
15049 
15050 
15051 
15052 ///
15053 /// Implement this structure to handle events related to permission requests.
15054 /// The functions of this structure will be called on the browser process UI
15055 /// thread.
15056 ///
15057 struct cef_permission_handler_t
15058 {
15059     ///
15060     /// Base structure.
15061     ///
15062     cef_base_ref_counted_t base;
15063 
15064     ///
15065     /// Called when a page requests permission to access media.
15066     /// |requesting_origin| is the URL origin requesting permission.
15067     /// |requested_permissions| is a combination of values from
15068     /// cef_media_access_permission_types_t that represent the requested
15069     /// permissions. Return true (1) and call cef_media_access_callback_t
15070     /// functions either in this function or at a later time to continue or cancel
15071     /// the request. Return false (0) to proceed with default handling. With the
15072     /// Chrome runtime, default handling will display the permission request UI.
15073     /// With the Alloy runtime, default handling will deny the request. This
15074     /// function will not be called if the "--enable-media-stream" command-line
15075     /// switch is used to grant all permissions.
15076     ///
15077     extern(System) int function (
15078         cef_permission_handler_t* self,
15079         cef_browser_t* browser,
15080         cef_frame_t* frame,
15081         const(cef_string_t)* requesting_origin,
15082         uint requested_permissions,
15083         cef_media_access_callback_t* callback) nothrow on_request_media_access_permission;
15084 
15085     ///
15086     /// Called when a page should show a permission prompt. |prompt_id| uniquely
15087     /// identifies the prompt. |requesting_origin| is the URL origin requesting
15088     /// permission. |requested_permissions| is a combination of values from
15089     /// cef_permission_request_types_t that represent the requested permissions.
15090     /// Return true (1) and call cef_permission_prompt_callback_t::Continue either
15091     /// in this function or at a later time to continue or cancel the request.
15092     /// Return false (0) to proceed with default handling. With the Chrome
15093     /// runtime, default handling will display the permission prompt UI. With the
15094     /// Alloy runtime, default handling is CEF_PERMISSION_RESULT_IGNORE.
15095     ///
15096     extern(System) int function (
15097         cef_permission_handler_t* self,
15098         cef_browser_t* browser,
15099         ulong prompt_id,
15100         const(cef_string_t)* requesting_origin,
15101         uint requested_permissions,
15102         cef_permission_prompt_callback_t* callback) nothrow on_show_permission_prompt;
15103 
15104     ///
15105     /// Called when a permission prompt handled via OnShowPermissionPrompt is
15106     /// dismissed. |prompt_id| will match the value that was passed to
15107     /// OnShowPermissionPrompt. |result| will be the value passed to
15108     /// cef_permission_prompt_callback_t::Continue or CEF_PERMISSION_RESULT_IGNORE
15109     /// if the dialog was dismissed for other reasons such as navigation, browser
15110     /// closure, etc. This function will not be called if OnShowPermissionPrompt
15111     /// returned false (0) for |prompt_id|.
15112     ///
15113     extern(System) void function (
15114         cef_permission_handler_t* self,
15115         cef_browser_t* browser,
15116         ulong prompt_id,
15117         cef_permission_request_result_t result) nothrow on_dismiss_permission_prompt;
15118 }
15119 
15120 
15121 
15122 // CEF_INCLUDE_CAPI_CEF_PERMISSION_HANDLER_CAPI_H_
15123 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
15124 //
15125 // Redistribution and use in source and binary forms, with or without
15126 // modification, are permitted provided that the following conditions are
15127 // met:
15128 //
15129 //    * Redistributions of source code must retain the above copyright
15130 // notice, this list of conditions and the following disclaimer.
15131 //    * Redistributions in binary form must reproduce the above
15132 // copyright notice, this list of conditions and the following disclaimer
15133 // in the documentation and/or other materials provided with the
15134 // distribution.
15135 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15136 // Framework nor the names of its contributors may be used to endorse
15137 // or promote products derived from this software without specific prior
15138 // written permission.
15139 //
15140 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15141 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15142 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15143 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15144 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15145 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15146 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15147 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15148 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15149 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15150 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15151 //
15152 // ---------------------------------------------------------------------------
15153 //
15154 // This file was generated by the CEF translator tool and should not edited
15155 // by hand. See the translator.README.txt file in the tools directory for
15156 // more information.
15157 //
15158 // $hash=922659242ea25c52d02884a7cc5918d086cbfaca$
15159 //
15160 
15161 extern (C):
15162 
15163 ///
15164 /// Structure that manages custom preference registrations.
15165 ///
15166 struct cef_preference_registrar_t
15167 {
15168     ///
15169     /// Base structure.
15170     ///
15171 
15172     ///
15173     /// Register a preference with the specified |name| and |default_value|. To
15174     /// avoid conflicts with built-in preferences the |name| value should contain
15175     /// an application-specific prefix followed by a period (e.g. "myapp.value").
15176     /// The contents of |default_value| will be copied. The data type for the
15177     /// preference will be inferred from |default_value|'s type and cannot be
15178     /// changed after registration. Returns true (1) on success. Returns false (0)
15179     /// if |name| is already registered or if |default_value| has an invalid type.
15180     /// This function must be called from within the scope of the
15181     /// cef_browser_process_handler_t::OnRegisterCustomPreferences callback.
15182     ///
15183 
15184     ///
15185     /// Manage access to preferences. Many built-in preferences are registered by
15186     /// Chromium. Custom preferences can be registered in
15187     cef_base_scoped_t base;
15188     extern(System) int function (
15189         cef_preference_registrar_t* self,
15190         const(cef_string_t)* name,
15191         cef_value_t* default_value) nothrow add_preference;
15192 }
15193 
15194 
15195 /// cef_browser_process_handler_t::OnRegisterCustomPreferences.
15196 ///
15197 struct cef_preference_manager_t
15198 {
15199     ///
15200     /// Base structure.
15201     ///
15202     cef_base_ref_counted_t base;
15203 
15204     ///
15205     /// Returns true (1) if a preference with the specified |name| exists. This
15206     /// function must be called on the browser process UI thread.
15207     ///
15208     extern(System) int function (
15209         cef_preference_manager_t* self,
15210         const(cef_string_t)* name) nothrow has_preference;
15211 
15212     ///
15213     /// Returns the value for the preference with the specified |name|. Returns
15214     /// NULL if the preference does not exist. The returned object contains a copy
15215     /// of the underlying preference value and modifications to the returned
15216     /// object will not modify the underlying preference value. This function must
15217     /// be called on the browser process UI thread.
15218     ///
15219     extern(System) cef_value_t* function (
15220         cef_preference_manager_t* self,
15221         const(cef_string_t)* name) nothrow get_preference;
15222 
15223     ///
15224     /// Returns all preferences as a dictionary. If |include_defaults| is true (1)
15225     /// then preferences currently at their default value will be included. The
15226     /// returned object contains a copy of the underlying preference values and
15227     /// modifications to the returned object will not modify the underlying
15228     /// preference values. This function must be called on the browser process UI
15229     /// thread.
15230     ///
15231     extern(System) cef_dictionary_value_t* function (
15232         cef_preference_manager_t* self,
15233         int include_defaults) nothrow get_all_preferences;
15234 
15235     ///
15236     /// Returns true (1) if the preference with the specified |name| can be
15237     /// modified using SetPreference. As one example preferences set via the
15238     /// command-line usually cannot be modified. This function must be called on
15239     /// the browser process UI thread.
15240     ///
15241     extern(System) int function (
15242         cef_preference_manager_t* self,
15243         const(cef_string_t)* name) nothrow can_set_preference;
15244 
15245     ///
15246     /// Set the |value| associated with preference |name|. Returns true (1) if the
15247     /// value is set successfully and false (0) otherwise. If |value| is NULL the
15248     /// preference will be restored to its default value. If setting the
15249     /// preference fails then |error| will be populated with a detailed
15250     /// description of the problem. This function must be called on the browser
15251     /// process UI thread.
15252     ///
15253     extern(System) int function (
15254         cef_preference_manager_t* self,
15255         const(cef_string_t)* name,
15256         cef_value_t* value,
15257         cef_string_t* error) nothrow set_preference;
15258 }
15259 
15260 
15261 
15262 ///
15263 /// Returns the global preference manager object.
15264 ///
15265 cef_preference_manager_t* cef_preference_manager_get_global ();
15266 
15267 // CEF_INCLUDE_CAPI_CEF_PREFERENCE_CAPI_H_
15268 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
15269 //
15270 // Redistribution and use in source and binary forms, with or without
15271 // modification, are permitted provided that the following conditions are
15272 // met:
15273 //
15274 //    * Redistributions of source code must retain the above copyright
15275 // notice, this list of conditions and the following disclaimer.
15276 //    * Redistributions in binary form must reproduce the above
15277 // copyright notice, this list of conditions and the following disclaimer
15278 // in the documentation and/or other materials provided with the
15279 // distribution.
15280 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15281 // Framework nor the names of its contributors may be used to endorse
15282 // or promote products derived from this software without specific prior
15283 // written permission.
15284 //
15285 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15286 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15287 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15288 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15289 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15290 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15291 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15292 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15293 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15294 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15295 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15296 //
15297 // ---------------------------------------------------------------------------
15298 //
15299 // This file was generated by the CEF translator tool and should not edited
15300 // by hand. See the translator.README.txt file in the tools directory for
15301 // more information.
15302 //
15303 // $hash=d09937fb047debd9da39c4072a434659b3c5682c$
15304 //
15305 
15306 extern (C):
15307 
15308 ///
15309 /// Callback structure for asynchronous continuation of print dialog requests.
15310 ///
15311 struct cef_print_dialog_callback_t
15312 {
15313     ///
15314     /// Base structure.
15315     ///
15316 
15317     ///
15318     /// Continue printing with the specified |settings|.
15319     ///
15320 
15321     ///
15322     /// Cancel the printing.
15323     ///
15324 
15325     ///
15326     /// Callback structure for asynchronous continuation of print job requests.
15327     ///
15328 
15329     ///
15330     /// Base structure.
15331     ///
15332 
15333     ///
15334     /// Indicate completion of the print job.
15335     ///
15336     cef_base_ref_counted_t base;
15337     extern(System) void function (
15338         cef_print_dialog_callback_t* self,
15339         cef_print_settings_t* settings) nothrow cont;
15340     extern(System) void function (cef_print_dialog_callback_t* self) nothrow cancel;
15341 }
15342 
15343 
15344 
15345 struct cef_print_job_callback_t
15346 {
15347     cef_base_ref_counted_t base;
15348     extern(System) void function (cef_print_job_callback_t* self) nothrow cont;
15349 }
15350 
15351 
15352 
15353 ///
15354 /// Implement this structure to handle printing on Linux. Each browser will have
15355 /// only one print job in progress at a time. The functions of this structure
15356 /// will be called on the browser process UI thread.
15357 ///
15358 struct cef_print_handler_t
15359 {
15360     ///
15361     /// Base structure.
15362     ///
15363     cef_base_ref_counted_t base;
15364 
15365     ///
15366     /// Called when printing has started for the specified |browser|. This
15367     /// function will be called before the other OnPrint*() functions and
15368     /// irrespective of how printing was initiated (e.g.
15369     /// cef_browser_host_t::print(), JavaScript window.print() or PDF extension
15370     /// print button).
15371     ///
15372     extern(System) void function (
15373         cef_print_handler_t* self,
15374         cef_browser_t* browser) nothrow on_print_start;
15375 
15376     ///
15377     /// Synchronize |settings| with client state. If |get_defaults| is true (1)
15378     /// then populate |settings| with the default print settings. Do not keep a
15379     /// reference to |settings| outside of this callback.
15380     ///
15381     extern(System) void function (
15382         cef_print_handler_t* self,
15383         cef_browser_t* browser,
15384         cef_print_settings_t* settings,
15385         int get_defaults) nothrow on_print_settings;
15386 
15387     ///
15388     /// Show the print dialog. Execute |callback| once the dialog is dismissed.
15389     /// Return true (1) if the dialog will be displayed or false (0) to cancel the
15390     /// printing immediately.
15391     ///
15392     extern(System) int function (
15393         cef_print_handler_t* self,
15394         cef_browser_t* browser,
15395         int has_selection,
15396         cef_print_dialog_callback_t* callback) nothrow on_print_dialog;
15397 
15398     ///
15399     /// Send the print job to the printer. Execute |callback| once the job is
15400     /// completed. Return true (1) if the job will proceed or false (0) to cancel
15401     /// the job immediately.
15402     ///
15403     extern(System) int function (
15404         cef_print_handler_t* self,
15405         cef_browser_t* browser,
15406         const(cef_string_t)* document_name,
15407         const(cef_string_t)* pdf_file_path,
15408         cef_print_job_callback_t* callback) nothrow on_print_job;
15409 
15410     ///
15411     /// Reset client state related to printing.
15412     ///
15413     extern(System) void function (
15414         cef_print_handler_t* self,
15415         cef_browser_t* browser) nothrow on_print_reset;
15416 
15417     ///
15418     /// Return the PDF paper size in device units. Used in combination with
15419     /// cef_browser_host_t::print_to_pdf().
15420     ///
15421     extern(System) cef_size_t function (
15422         cef_print_handler_t* self,
15423         cef_browser_t* browser,
15424         int device_units_per_inch) nothrow get_pdf_paper_size;
15425 }
15426 
15427 
15428 
15429 // CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
15430 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
15431 //
15432 // Redistribution and use in source and binary forms, with or without
15433 // modification, are permitted provided that the following conditions are
15434 // met:
15435 //
15436 //    * Redistributions of source code must retain the above copyright
15437 // notice, this list of conditions and the following disclaimer.
15438 //    * Redistributions in binary form must reproduce the above
15439 // copyright notice, this list of conditions and the following disclaimer
15440 // in the documentation and/or other materials provided with the
15441 // distribution.
15442 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15443 // Framework nor the names of its contributors may be used to endorse
15444 // or promote products derived from this software without specific prior
15445 // written permission.
15446 //
15447 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15448 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15449 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15450 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15451 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15452 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15453 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15454 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15455 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15456 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15457 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15458 //
15459 // ---------------------------------------------------------------------------
15460 //
15461 // This file was generated by the CEF translator tool and should not edited
15462 // by hand. See the translator.README.txt file in the tools directory for
15463 // more information.
15464 //
15465 // $hash=46508464579e797d4684f4a7facdb39f9bdb312b$
15466 //
15467 
15468 extern (C):
15469 
15470 ///
15471 /// Structure representing print settings.
15472 ///
15473 struct cef_print_settings_t
15474 {
15475     ///
15476     /// Base structure.
15477     ///
15478 
15479     ///
15480     /// Returns true (1) if this object is valid. Do not call any other functions
15481     /// if this function returns false (0).
15482     ///
15483 
15484     ///
15485     /// Returns true (1) if the values of this object are read-only. Some APIs may
15486     /// expose read-only objects.
15487     ///
15488 
15489     ///
15490     /// Set the page orientation.
15491     ///
15492 
15493     ///
15494     /// Returns true (1) if the orientation is landscape.
15495     ///
15496 
15497     ///
15498     /// Set the printer printable area in device units. Some platforms already
15499     cef_base_ref_counted_t base;
15500     extern(System) int function (cef_print_settings_t* self) nothrow is_valid;
15501     extern(System) int function (cef_print_settings_t* self) nothrow is_read_only;
15502     extern(System) void function (cef_print_settings_t* self, int landscape) nothrow set_orientation;
15503     extern(System) int function (cef_print_settings_t* self) nothrow is_landscape;
15504     /// provide flipped area. Set |landscape_needs_flip| to false (0) on those
15505     /// platforms to avoid double flipping.
15506     ///
15507     extern(System) void function (
15508         cef_print_settings_t* self,
15509         const(cef_size_t)* physical_size_device_units,
15510         const(cef_rect_t)* printable_area_device_units,
15511         int landscape_needs_flip) nothrow set_printer_printable_area;
15512 
15513     ///
15514     /// Set the device name.
15515     ///
15516     extern(System) void function (
15517         cef_print_settings_t* self,
15518         const(cef_string_t)* name) nothrow set_device_name;
15519 
15520     ///
15521     /// Get the device name.
15522     ///
15523     // The resulting string must be freed by calling cef_string_userfree_free().
15524     extern(System) cef_string_userfree_t function (
15525         cef_print_settings_t* self) nothrow get_device_name;
15526 
15527     ///
15528     /// Set the DPI (dots per inch).
15529     ///
15530     extern(System) void function (cef_print_settings_t* self, int dpi) nothrow set_dpi;
15531 
15532     ///
15533     /// Get the DPI (dots per inch).
15534     ///
15535     extern(System) int function (cef_print_settings_t* self) nothrow get_dpi;
15536 
15537     ///
15538     /// Set the page ranges.
15539     ///
15540     extern(System) void function (
15541         cef_print_settings_t* self,
15542         size_t rangesCount,
15543         const(cef_range_t)* ranges) nothrow set_page_ranges;
15544 
15545     ///
15546     /// Returns the number of page ranges that currently exist.
15547     ///
15548     extern(System) size_t function (cef_print_settings_t* self) nothrow get_page_ranges_count;
15549 
15550     ///
15551     /// Retrieve the page ranges.
15552     ///
15553     extern(System) void function (
15554         cef_print_settings_t* self,
15555         size_t* rangesCount,
15556         cef_range_t* ranges) nothrow get_page_ranges;
15557 
15558     ///
15559     /// Set whether only the selection will be printed.
15560     ///
15561     extern(System) void function (
15562         cef_print_settings_t* self,
15563         int selection_only) nothrow set_selection_only;
15564 
15565     ///
15566     /// Returns true (1) if only the selection will be printed.
15567     ///
15568     extern(System) int function (cef_print_settings_t* self) nothrow is_selection_only;
15569 
15570     ///
15571     /// Set whether pages will be collated.
15572     ///
15573     extern(System) void function (cef_print_settings_t* self, int collate) nothrow set_collate;
15574 
15575     ///
15576     /// Returns true (1) if pages will be collated.
15577     ///
15578     extern(System) int function (cef_print_settings_t* self) nothrow will_collate;
15579 
15580     ///
15581     /// Set the color model.
15582     ///
15583     extern(System) void function (
15584         cef_print_settings_t* self,
15585         cef_color_model_t model) nothrow set_color_model;
15586 
15587     ///
15588     /// Get the color model.
15589     ///
15590     extern(System) cef_color_model_t function (cef_print_settings_t* self) nothrow get_color_model;
15591 
15592     ///
15593     /// Set the number of copies.
15594     ///
15595     extern(System) void function (cef_print_settings_t* self, int copies) nothrow set_copies;
15596 
15597     ///
15598     /// Get the number of copies.
15599     ///
15600     extern(System) int function (cef_print_settings_t* self) nothrow get_copies;
15601 
15602     ///
15603     /// Set the duplex mode.
15604     ///
15605     extern(System) void function (
15606         cef_print_settings_t* self,
15607         cef_duplex_mode_t mode) nothrow set_duplex_mode;
15608 
15609     ///
15610     /// Get the duplex mode.
15611     ///
15612     extern(System) cef_duplex_mode_t function (cef_print_settings_t* self) nothrow get_duplex_mode;
15613 }
15614 
15615 
15616 
15617 ///
15618 /// Create a new cef_print_settings_t object.
15619 ///
15620 cef_print_settings_t* cef_print_settings_create ();
15621 
15622 // CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_
15623 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
15624 //
15625 // Redistribution and use in source and binary forms, with or without
15626 // modification, are permitted provided that the following conditions are
15627 // met:
15628 //
15629 //    * Redistributions of source code must retain the above copyright
15630 // notice, this list of conditions and the following disclaimer.
15631 //    * Redistributions in binary form must reproduce the above
15632 // copyright notice, this list of conditions and the following disclaimer
15633 // in the documentation and/or other materials provided with the
15634 // distribution.
15635 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15636 // Framework nor the names of its contributors may be used to endorse
15637 // or promote products derived from this software without specific prior
15638 // written permission.
15639 //
15640 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15641 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15642 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15643 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15644 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15645 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15646 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15647 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15648 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15649 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15650 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15651 //
15652 // ---------------------------------------------------------------------------
15653 //
15654 // This file was generated by the CEF translator tool and should not edited
15655 // by hand. See the translator.README.txt file in the tools directory for
15656 // more information.
15657 //
15658 // $hash=e20a8d6a5803dae5ba156adde40c8b964899b176$
15659 //
15660 
15661 extern (C):
15662 
15663 ///
15664 /// Structure representing a message. Can be used on any process and thread.
15665 ///
15666 struct cef_process_message_t
15667 {
15668     ///
15669     /// Base structure.
15670     ///
15671 
15672     ///
15673     /// Returns true (1) if this object is valid. Do not call any other functions
15674     /// if this function returns false (0).
15675     ///
15676 
15677     ///
15678     /// Returns true (1) if the values of this object are read-only. Some APIs may
15679     /// expose read-only objects.
15680     ///
15681 
15682     ///
15683     /// Returns a writable copy of this object. Returns nullptr when message
15684     /// contains a shared memory region.
15685     ///
15686     cef_base_ref_counted_t base;
15687     extern(System) int function (cef_process_message_t* self) nothrow is_valid;
15688     extern(System) int function (cef_process_message_t* self) nothrow is_read_only;
15689     extern(System) cef_process_message_t* function (cef_process_message_t* self) nothrow copy;
15690 
15691     ///
15692     /// Returns the message name.
15693     ///
15694     // The resulting string must be freed by calling cef_string_userfree_free().
15695     extern(System) cef_string_userfree_t function (cef_process_message_t* self) nothrow get_name;
15696 
15697     ///
15698     /// Returns the list of arguments. Returns nullptr when message contains a
15699     /// shared memory region.
15700     ///
15701     extern(System) cef_list_value_t* function (
15702         cef_process_message_t* self) nothrow get_argument_list;
15703 
15704     ///
15705     /// Returns the shared memory region. Returns nullptr when message contains an
15706     /// argument list.
15707     ///
15708     extern(System) cef_shared_memory_region_t* function (
15709         cef_process_message_t* self) nothrow get_shared_memory_region;
15710 }
15711 
15712 
15713 
15714 ///
15715 /// Create a new cef_process_message_t object with the specified name.
15716 ///
15717 cef_process_message_t* cef_process_message_create (const(cef_string_t)* name);
15718 
15719 // CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_
15720 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
15721 //
15722 // Redistribution and use in source and binary forms, with or without
15723 // modification, are permitted provided that the following conditions are
15724 // met:
15725 //
15726 //    * Redistributions of source code must retain the above copyright
15727 // notice, this list of conditions and the following disclaimer.
15728 //    * Redistributions in binary form must reproduce the above
15729 // copyright notice, this list of conditions and the following disclaimer
15730 // in the documentation and/or other materials provided with the
15731 // distribution.
15732 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15733 // Framework nor the names of its contributors may be used to endorse
15734 // or promote products derived from this software without specific prior
15735 // written permission.
15736 //
15737 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15738 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15739 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15740 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15741 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15742 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15743 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15744 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15745 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15746 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15747 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15748 //
15749 // ---------------------------------------------------------------------------
15750 //
15751 // This file was generated by the CEF translator tool and should not edited
15752 // by hand. See the translator.README.txt file in the tools directory for
15753 // more information.
15754 //
15755 // $hash=88c42c5f216798304b07bfe985296014cf65996c$
15756 //
15757 
15758 extern (C):
15759 
15760 ///
15761 /// Launches the process specified via |command_line|. Returns true (1) upon
15762 /// success. Must be called on the browser process TID_PROCESS_LAUNCHER thread.
15763 ///
15764 /// Unix-specific notes: - All file descriptors open in the parent process will
15765 /// be closed in the
15766 ///   child process except for stdin, stdout, and stderr.
15767 /// - If the first argument on the command line does not contain a slash,
15768 ///   PATH will be searched. (See man execvp.)
15769 ///
15770 int cef_launch_process (cef_command_line_t* command_line);
15771 
15772 // CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_
15773 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
15774 //
15775 // Redistribution and use in source and binary forms, with or without
15776 // modification, are permitted provided that the following conditions are
15777 // met:
15778 //
15779 //    * Redistributions of source code must retain the above copyright
15780 // notice, this list of conditions and the following disclaimer.
15781 //    * Redistributions in binary form must reproduce the above
15782 // copyright notice, this list of conditions and the following disclaimer
15783 // in the documentation and/or other materials provided with the
15784 // distribution.
15785 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15786 // Framework nor the names of its contributors may be used to endorse
15787 // or promote products derived from this software without specific prior
15788 // written permission.
15789 //
15790 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15791 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15792 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15793 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15794 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15795 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15796 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15797 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15798 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15799 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15800 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15801 //
15802 // ---------------------------------------------------------------------------
15803 //
15804 // This file was generated by the CEF translator tool and should not edited
15805 // by hand. See the translator.README.txt file in the tools directory for
15806 // more information.
15807 //
15808 // $hash=b1b38a3171dd3626029e70e75b482dfa3531215b$
15809 //
15810 
15811 extern (C):
15812 
15813 ///
15814 /// Generic callback structure used for managing the lifespan of a registration.
15815 ///
15816 struct cef_registration_t
15817 {
15818     ///
15819     /// Base structure.
15820     ///
15821 
15822     // CEF_INCLUDE_CAPI_CEF_REGISTRATION_CAPI_H_
15823     cef_base_ref_counted_t base;
15824 }
15825 
15826 
15827 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
15828 //
15829 // Redistribution and use in source and binary forms, with or without
15830 // modification, are permitted provided that the following conditions are
15831 // met:
15832 //
15833 //    * Redistributions of source code must retain the above copyright
15834 // notice, this list of conditions and the following disclaimer.
15835 //    * Redistributions in binary form must reproduce the above
15836 // copyright notice, this list of conditions and the following disclaimer
15837 // in the documentation and/or other materials provided with the
15838 // distribution.
15839 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15840 // Framework nor the names of its contributors may be used to endorse
15841 // or promote products derived from this software without specific prior
15842 // written permission.
15843 //
15844 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15845 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15846 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15847 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15848 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15849 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15850 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15851 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15852 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15853 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15854 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15855 //
15856 // ---------------------------------------------------------------------------
15857 //
15858 // This file was generated by the CEF translator tool and should not edited
15859 // by hand. See the translator.README.txt file in the tools directory for
15860 // more information.
15861 //
15862 // $hash=32d8176f39b05487bae048990b2dee3212ae3b78$
15863 //
15864 
15865 extern (C):
15866 
15867 ///
15868 /// Implement this structure to handle events when window rendering is disabled.
15869 /// The functions of this structure will be called on the UI thread.
15870 ///
15871 struct cef_render_handler_t
15872 {
15873     ///
15874     /// Base structure.
15875     ///
15876 
15877     ///
15878     /// Return the handler for accessibility notifications. If no handler is
15879     /// provided the default implementation will be used.
15880     ///
15881 
15882     ///
15883     /// Called to retrieve the root window rectangle in screen DIP coordinates.
15884     /// Return true (1) if the rectangle was provided. If this function returns
15885     /// false (0) the rectangle from GetViewRect will be used.
15886     cef_base_ref_counted_t base;
15887     extern(System) cef_accessibility_handler_t* function (
15888         cef_render_handler_t* self) nothrow get_accessibility_handler;
15889     ///
15890     extern(System) int function (
15891         cef_render_handler_t* self,
15892         cef_browser_t* browser,
15893         cef_rect_t* rect) nothrow get_root_screen_rect;
15894 
15895     ///
15896     /// Called to retrieve the view rectangle in screen DIP coordinates. This
15897     /// function must always provide a non-NULL rectangle.
15898     ///
15899     extern(System) void function (
15900         cef_render_handler_t* self,
15901         cef_browser_t* browser,
15902         cef_rect_t* rect) nothrow get_view_rect;
15903 
15904     ///
15905     /// Called to retrieve the translation from view DIP coordinates to screen
15906     /// coordinates. Windows/Linux should provide screen device (pixel)
15907     /// coordinates and MacOS should provide screen DIP coordinates. Return true
15908     /// (1) if the requested coordinates were provided.
15909     ///
15910     extern(System) int function (
15911         cef_render_handler_t* self,
15912         cef_browser_t* browser,
15913         int viewX,
15914         int viewY,
15915         int* screenX,
15916         int* screenY) nothrow get_screen_point;
15917 
15918     ///
15919     /// Called to allow the client to fill in the CefScreenInfo object with
15920     /// appropriate values. Return true (1) if the |screen_info| structure has
15921     /// been modified.
15922     ///
15923     /// If the screen info rectangle is left NULL the rectangle from GetViewRect
15924     /// will be used. If the rectangle is still NULL or invalid popups may not be
15925     /// drawn correctly.
15926     ///
15927     extern(System) int function (
15928         cef_render_handler_t* self,
15929         cef_browser_t* browser,
15930         cef_screen_info_t* screen_info) nothrow get_screen_info;
15931 
15932     ///
15933     /// Called when the browser wants to show or hide the popup widget. The popup
15934     /// should be shown if |show| is true (1) and hidden if |show| is false (0).
15935     ///
15936     extern(System) void function (
15937         cef_render_handler_t* self,
15938         cef_browser_t* browser,
15939         int show) nothrow on_popup_show;
15940 
15941     ///
15942     /// Called when the browser wants to move or resize the popup widget. |rect|
15943     /// contains the new location and size in view coordinates.
15944     ///
15945     extern(System) void function (
15946         cef_render_handler_t* self,
15947         cef_browser_t* browser,
15948         const(cef_rect_t)* rect) nothrow on_popup_size;
15949 
15950     ///
15951     /// Called when an element should be painted. Pixel values passed to this
15952     /// function are scaled relative to view coordinates based on the value of
15953     /// CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type|
15954     /// indicates whether the element is the view or the popup widget. |buffer|
15955     /// contains the pixel data for the whole image. |dirtyRects| contains the set
15956     /// of rectangles in pixel coordinates that need to be repainted. |buffer|
15957     /// will be |width|*|height|*4 bytes in size and represents a BGRA image with
15958     /// an upper-left origin. This function is only called when
15959     /// cef_window_tInfo::shared_texture_enabled is set to false (0).
15960     ///
15961     extern(System) void function (
15962         cef_render_handler_t* self,
15963         cef_browser_t* browser,
15964         cef_paint_element_type_t type,
15965         size_t dirtyRectsCount,
15966         const(cef_rect_t)* dirtyRects,
15967         const(void)* buffer,
15968         int width,
15969         int height) nothrow on_paint;
15970 
15971     ///
15972     /// Called when an element has been rendered to the shared texture handle.
15973     /// |type| indicates whether the element is the view or the popup widget.
15974     /// |dirtyRects| contains the set of rectangles in pixel coordinates that need
15975     /// to be repainted. |shared_handle| is the handle for a D3D11 Texture2D that
15976     /// can be accessed via ID3D11Device using the OpenSharedResource function.
15977     /// This function is only called when cef_window_tInfo::shared_texture_enabled
15978     /// is set to true (1), and is currently only supported on Windows.
15979     ///
15980     extern(System) void function (
15981         cef_render_handler_t* self,
15982         cef_browser_t* browser,
15983         cef_paint_element_type_t type,
15984         size_t dirtyRectsCount,
15985         const(cef_rect_t)* dirtyRects,
15986         void* shared_handle) nothrow on_accelerated_paint;
15987 
15988     ///
15989     /// Called to retrieve the size of the touch handle for the specified
15990     /// |orientation|.
15991     ///
15992     extern(System) void function (
15993         cef_render_handler_t* self,
15994         cef_browser_t* browser,
15995         cef_horizontal_alignment_t orientation,
15996         cef_size_t* size) nothrow get_touch_handle_size;
15997 
15998     ///
15999     /// Called when touch handle state is updated. The client is responsible for
16000     /// rendering the touch handles.
16001     ///
16002     extern(System) void function (
16003         cef_render_handler_t* self,
16004         cef_browser_t* browser,
16005         const(cef_touch_handle_state_t)* state) nothrow on_touch_handle_state_changed;
16006 
16007     ///
16008     /// Called when the user starts dragging content in the web view. Contextual
16009     /// information about the dragged content is supplied by |drag_data|. (|x|,
16010     /// |y|) is the drag start location in screen coordinates. OS APIs that run a
16011     /// system message loop may be used within the StartDragging call.
16012     ///
16013     /// Return false (0) to abort the drag operation. Don't call any of
16014     /// cef_browser_host_t::DragSource*Ended* functions after returning false (0).
16015     ///
16016     /// Return true (1) to handle the drag operation. Call
16017     /// cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either
16018     /// synchronously or asynchronously to inform the web view that the drag
16019     /// operation has ended.
16020     ///
16021     extern(System) int function (
16022         cef_render_handler_t* self,
16023         cef_browser_t* browser,
16024         cef_drag_data_t* drag_data,
16025         cef_drag_operations_mask_t allowed_ops,
16026         int x,
16027         int y) nothrow start_dragging;
16028 
16029     ///
16030     /// Called when the web view wants to update the mouse cursor during a drag &
16031     /// drop operation. |operation| describes the allowed operation (none, move,
16032     /// copy, link).
16033     ///
16034     extern(System) void function (
16035         cef_render_handler_t* self,
16036         cef_browser_t* browser,
16037         cef_drag_operations_mask_t operation) nothrow update_drag_cursor;
16038 
16039     ///
16040     /// Called when the scroll offset has changed.
16041     ///
16042     extern(System) void function (
16043         cef_render_handler_t* self,
16044         cef_browser_t* browser,
16045         double x,
16046         double y) nothrow on_scroll_offset_changed;
16047 
16048     ///
16049     /// Called when the IME composition range has changed. |selected_range| is the
16050     /// range of characters that have been selected. |character_bounds| is the
16051     /// bounds of each character in view coordinates.
16052     ///
16053     extern(System) void function (
16054         cef_render_handler_t* self,
16055         cef_browser_t* browser,
16056         const(cef_range_t)* selected_range,
16057         size_t character_boundsCount,
16058         const(cef_rect_t)* character_bounds) nothrow on_ime_composition_range_changed;
16059 
16060     ///
16061     /// Called when text selection has changed for the specified |browser|.
16062     /// |selected_text| is the currently selected text and |selected_range| is the
16063     /// character range.
16064     ///
16065     extern(System) void function (
16066         cef_render_handler_t* self,
16067         cef_browser_t* browser,
16068         const(cef_string_t)* selected_text,
16069         const(cef_range_t)* selected_range) nothrow on_text_selection_changed;
16070 
16071     ///
16072     /// Called when an on-screen keyboard should be shown or hidden for the
16073     /// specified |browser|. |input_mode| specifies what kind of keyboard should
16074     /// be opened. If |input_mode| is CEF_TEXT_INPUT_MODE_NONE, any existing
16075     /// keyboard for this browser should be hidden.
16076     ///
16077     extern(System) void function (
16078         cef_render_handler_t* self,
16079         cef_browser_t* browser,
16080         cef_text_input_mode_t input_mode) nothrow on_virtual_keyboard_requested;
16081 }
16082 
16083 
16084 
16085 // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
16086 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
16087 //
16088 // Redistribution and use in source and binary forms, with or without
16089 // modification, are permitted provided that the following conditions are
16090 // met:
16091 //
16092 //    * Redistributions of source code must retain the above copyright
16093 // notice, this list of conditions and the following disclaimer.
16094 //    * Redistributions in binary form must reproduce the above
16095 // copyright notice, this list of conditions and the following disclaimer
16096 // in the documentation and/or other materials provided with the
16097 // distribution.
16098 //    * Neither the name of Google Inc. nor the name Chromium Embedded
16099 // Framework nor the names of its contributors may be used to endorse
16100 // or promote products derived from this software without specific prior
16101 // written permission.
16102 //
16103 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16104 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16105 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16106 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16107 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16108 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16109 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
16110 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
16111 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
16112 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16113 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16114 //
16115 // ---------------------------------------------------------------------------
16116 //
16117 // This file was generated by the CEF translator tool and should not edited
16118 // by hand. See the translator.README.txt file in the tools directory for
16119 // more information.
16120 //
16121 // $hash=d807c7566ce3085243e9e7ea279fee7241acfc5f$
16122 //
16123 
16124 extern (C):
16125 
16126 ///
16127 /// Structure used to implement render process callbacks. The functions of this
16128 /// structure will be called on the render process main thread (TID_RENDERER)
16129 /// unless otherwise indicated.
16130 ///
16131 struct cef_render_process_handler_t
16132 {
16133     ///
16134     /// Base structure.
16135     ///
16136 
16137     ///
16138     /// Called after WebKit has been initialized.
16139     ///
16140 
16141     ///
16142     /// Called after a browser has been created. When browsing cross-origin a new
16143     /// browser will be created before the old browser with the same identifier is
16144     cef_base_ref_counted_t base;
16145     extern(System) void function (cef_render_process_handler_t* self) nothrow on_web_kit_initialized;
16146     /// destroyed. |extra_info| is an optional read-only value originating from
16147     /// cef_browser_host_t::cef_browser_host_create_browser(),
16148     /// cef_browser_host_t::cef_browser_host_create_browser_sync(),
16149     /// cef_life_span_handler_t::on_before_popup() or
16150     /// cef_browser_view_t::cef_browser_view_create().
16151     ///
16152     extern(System) void function (
16153         cef_render_process_handler_t* self,
16154         cef_browser_t* browser,
16155         cef_dictionary_value_t* extra_info) nothrow on_browser_created;
16156 
16157     ///
16158     /// Called before a browser is destroyed.
16159     ///
16160     extern(System) void function (
16161         cef_render_process_handler_t* self,
16162         cef_browser_t* browser) nothrow on_browser_destroyed;
16163 
16164     ///
16165     /// Return the handler for browser load status events.
16166     ///
16167     extern(System) cef_load_handler_t* function (
16168         cef_render_process_handler_t* self) nothrow get_load_handler;
16169 
16170     ///
16171     /// Called immediately after the V8 context for a frame has been created. To
16172     /// retrieve the JavaScript 'window' object use the
16173     /// cef_v8context_t::get_global() function. V8 handles can only be accessed
16174     /// from the thread on which they are created. A task runner for posting tasks
16175     /// on the associated thread can be retrieved via the
16176     /// cef_v8context_t::get_task_runner() function.
16177     ///
16178     extern(System) void function (
16179         cef_render_process_handler_t* self,
16180         cef_browser_t* browser,
16181         cef_frame_t* frame,
16182         cef_v8context_t* context) nothrow on_context_created;
16183 
16184     ///
16185     /// Called immediately before the V8 context for a frame is released. No
16186     /// references to the context should be kept after this function is called.
16187     ///
16188     extern(System) void function (
16189         cef_render_process_handler_t* self,
16190         cef_browser_t* browser,
16191         cef_frame_t* frame,
16192         cef_v8context_t* context) nothrow on_context_released;
16193 
16194     ///
16195     /// Called for global uncaught exceptions in a frame. Execution of this
16196     /// callback is disabled by default. To enable set
16197     /// cef_settings_t.uncaught_exception_stack_size > 0.
16198     ///
16199     extern(System) void function (
16200         cef_render_process_handler_t* self,
16201         cef_browser_t* browser,
16202         cef_frame_t* frame,
16203         cef_v8context_t* context,
16204         cef_v8exception_t* exception,
16205         cef_v8stack_trace_t* stackTrace) nothrow on_uncaught_exception;
16206 
16207     ///
16208     /// Called when a new node in the the browser gets focus. The |node| value may
16209     /// be NULL if no specific node has gained focus. The node object passed to
16210     /// this function represents a snapshot of the DOM at the time this function
16211     /// is executed. DOM objects are only valid for the scope of this function. Do
16212     /// not keep references to or attempt to access any DOM objects outside the
16213     /// scope of this function.
16214     ///
16215     extern(System) void function (
16216         cef_render_process_handler_t* self,
16217         cef_browser_t* browser,
16218         cef_frame_t* frame,
16219         cef_domnode_t* node) nothrow on_focused_node_changed;
16220 
16221     ///
16222     /// Called when a new message is received from a different process. Return
16223     /// true (1) if the message was handled or false (0) otherwise. It is safe to
16224     /// keep a reference to |message| outside of this callback.
16225     ///
16226     extern(System) int function (
16227         cef_render_process_handler_t* self,
16228         cef_browser_t* browser,
16229         cef_frame_t* frame,
16230         cef_process_id_t source_process,
16231         cef_process_message_t* message) nothrow on_process_message_received;
16232 }
16233 
16234 
16235 
16236 // CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_
16237 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
16238 //
16239 // Redistribution and use in source and binary forms, with or without
16240 // modification, are permitted provided that the following conditions are
16241 // met:
16242 //
16243 //    * Redistributions of source code must retain the above copyright
16244 // notice, this list of conditions and the following disclaimer.
16245 //    * Redistributions in binary form must reproduce the above
16246 // copyright notice, this list of conditions and the following disclaimer
16247 // in the documentation and/or other materials provided with the
16248 // distribution.
16249 //    * Neither the name of Google Inc. nor the name Chromium Embedded
16250 // Framework nor the names of its contributors may be used to endorse
16251 // or promote products derived from this software without specific prior
16252 // written permission.
16253 //
16254 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16255 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16256 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16257 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16258 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16259 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16260 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
16261 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
16262 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
16263 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16264 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16265 //
16266 // ---------------------------------------------------------------------------
16267 //
16268 // This file was generated by the CEF translator tool and should not edited
16269 // by hand. See the translator.README.txt file in the tools directory for
16270 // more information.
16271 //
16272 // $hash=241f8b8ba0a4555f8ad8ed1d60345ae83d4d62f4$
16273 //
16274 
16275 extern (C):
16276 
16277 ///
16278 /// Structure used to represent a web request. The functions of this structure
16279 /// may be called on any thread.
16280 ///
16281 struct cef_request_t
16282 {
16283     ///
16284     /// Base structure.
16285     ///
16286 
16287     ///
16288     /// Returns true (1) if this object is read-only.
16289     ///
16290 
16291     ///
16292     /// Get the fully qualified URL.
16293     ///
16294     // The resulting string must be freed by calling cef_string_userfree_free().
16295 
16296     ///
16297     /// Set the fully qualified URL.
16298     ///
16299 
16300     ///
16301     /// Get the request function type. The value will default to POST if post data
16302     /// is provided and GET otherwise.
16303     ///
16304     // The resulting string must be freed by calling cef_string_userfree_free().
16305     cef_base_ref_counted_t base;
16306     extern(System) int function (cef_request_t* self) nothrow is_read_only;
16307     extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_url;
16308     extern(System) void function (cef_request_t* self, const(cef_string_t)* url) nothrow set_url;
16309     extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_method;
16310 
16311     ///
16312     /// Set the request function type.
16313     ///
16314     extern(System) void function (
16315         cef_request_t* self,
16316         const(cef_string_t)* method) nothrow set_method;
16317 
16318     ///
16319     /// Set the referrer URL and policy. If non-NULL the referrer URL must be
16320     /// fully qualified with an HTTP or HTTPS scheme component. Any username,
16321     /// password or ref component will be removed.
16322     ///
16323     extern(System) void function (
16324         cef_request_t* self,
16325         const(cef_string_t)* referrer_url,
16326         cef_referrer_policy_t policy) nothrow set_referrer;
16327 
16328     ///
16329     /// Get the referrer URL.
16330     ///
16331     // The resulting string must be freed by calling cef_string_userfree_free().
16332     extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_referrer_url;
16333 
16334     ///
16335     /// Get the referrer policy.
16336     ///
16337     extern(System) cef_referrer_policy_t function (cef_request_t* self) nothrow get_referrer_policy;
16338 
16339     ///
16340     /// Get the post data.
16341     ///
16342     extern(System) cef_post_data_t* function (cef_request_t* self) nothrow get_post_data;
16343 
16344     ///
16345     /// Set the post data.
16346     ///
16347     extern(System) void function (
16348         cef_request_t* self,
16349         cef_post_data_t* postData) nothrow set_post_data;
16350 
16351     ///
16352     /// Get the header values. Will not include the Referer value if any.
16353     ///
16354     extern(System) void function (
16355         cef_request_t* self,
16356         cef_string_multimap_t headerMap) nothrow get_header_map;
16357 
16358     ///
16359     /// Set the header values. If a Referer value exists in the header map it will
16360     /// be removed and ignored.
16361     ///
16362     extern(System) void function (
16363         cef_request_t* self,
16364         cef_string_multimap_t headerMap) nothrow set_header_map;
16365 
16366     ///
16367     /// Returns the first header value for |name| or an NULL string if not found.
16368     /// Will not return the Referer value if any. Use GetHeaderMap instead if
16369     /// |name| might have multiple values.
16370     ///
16371     // The resulting string must be freed by calling cef_string_userfree_free().
16372     extern(System) cef_string_userfree_t function (
16373         cef_request_t* self,
16374         const(cef_string_t)* name) nothrow get_header_by_name;
16375 
16376     ///
16377     /// Set the header |name| to |value|. If |overwrite| is true (1) any existing
16378     /// values will be replaced with the new value. If |overwrite| is false (0)
16379     /// any existing values will not be overwritten. The Referer value cannot be
16380     /// set using this function.
16381     ///
16382     extern(System) void function (
16383         cef_request_t* self,
16384         const(cef_string_t)* name,
16385         const(cef_string_t)* value,
16386         int overwrite) nothrow set_header_by_name;
16387 
16388     ///
16389     /// Set all values at one time.
16390     ///
16391     extern(System) void function (
16392         cef_request_t* self,
16393         const(cef_string_t)* url,
16394         const(cef_string_t)* method,
16395         cef_post_data_t* postData,
16396         cef_string_multimap_t headerMap) nothrow set;
16397 
16398     ///
16399     /// Get the flags used in combination with cef_urlrequest_t. See
16400     /// cef_urlrequest_flags_t for supported values.
16401     ///
16402     extern(System) int function (cef_request_t* self) nothrow get_flags;
16403 
16404     ///
16405     /// Set the flags used in combination with cef_urlrequest_t.  See
16406     /// cef_urlrequest_flags_t for supported values.
16407     ///
16408     extern(System) void function (cef_request_t* self, int flags) nothrow set_flags;
16409 
16410     ///
16411     /// Get the URL to the first party for cookies used in combination with
16412     /// cef_urlrequest_t.
16413     ///
16414     // The resulting string must be freed by calling cef_string_userfree_free().
16415     extern(System) cef_string_userfree_t function (
16416         cef_request_t* self) nothrow get_first_party_for_cookies;
16417 
16418     ///
16419     /// Set the URL to the first party for cookies used in combination with
16420     /// cef_urlrequest_t.
16421     ///
16422     extern(System) void function (
16423         cef_request_t* self,
16424         const(cef_string_t)* url) nothrow set_first_party_for_cookies;
16425 
16426     ///
16427     /// Get the resource type for this request. Only available in the browser
16428     /// process.
16429     ///
16430     extern(System) cef_resource_type_t function (cef_request_t* self) nothrow get_resource_type;
16431 
16432     ///
16433     /// Get the transition type for this request. Only available in the browser
16434     /// process and only applies to requests that represent a main frame or sub-
16435     /// frame navigation.
16436     ///
16437     extern(System) cef_transition_type_t function (cef_request_t* self) nothrow get_transition_type;
16438 
16439     ///
16440     /// Returns the globally unique identifier for this request or 0 if not
16441     /// specified. Can be used by cef_resource_request_handler_t implementations
16442     /// in the browser process to track a single request across multiple
16443     /// callbacks.
16444     ///
16445     extern(System) ulong function (cef_request_t* self) nothrow get_identifier;
16446 }
16447 
16448 
16449 
16450 ///
16451 /// Create a new cef_request_t object.
16452 ///
16453 cef_request_t* cef_request_create ();
16454 
16455 ///
16456 /// Structure used to represent post data for a web request. The functions of
16457 /// this structure may be called on any thread.
16458 ///
16459 struct cef_post_data_t
16460 {
16461     ///
16462     /// Base structure.
16463     ///
16464     cef_base_ref_counted_t base;
16465 
16466     ///
16467     /// Returns true (1) if this object is read-only.
16468     ///
16469     extern(System) int function (cef_post_data_t* self) nothrow is_read_only;
16470 
16471     ///
16472     /// Returns true (1) if the underlying POST data includes elements that are
16473     /// not represented by this cef_post_data_t object (for example, multi-part
16474     /// file upload data). Modifying cef_post_data_t objects with excluded
16475     /// elements may result in the request failing.
16476     ///
16477     extern(System) int function (cef_post_data_t* self) nothrow has_excluded_elements;
16478 
16479     ///
16480     /// Returns the number of existing post data elements.
16481     ///
16482     extern(System) size_t function (cef_post_data_t* self) nothrow get_element_count;
16483 
16484     ///
16485     /// Retrieve the post data elements.
16486     ///
16487     extern(System) void function (
16488         cef_post_data_t* self,
16489         size_t* elementsCount,
16490         cef_post_data_element_t** elements) nothrow get_elements;
16491 
16492     ///
16493     /// Remove the specified post data element.  Returns true (1) if the removal
16494     /// succeeds.
16495     ///
16496     extern(System) int function (
16497         cef_post_data_t* self,
16498         cef_post_data_element_t* element) nothrow remove_element;
16499 
16500     ///
16501     /// Add the specified post data element.  Returns true (1) if the add
16502     /// succeeds.
16503     ///
16504     extern(System) int function (
16505         cef_post_data_t* self,
16506         cef_post_data_element_t* element) nothrow add_element;
16507 
16508     ///
16509     /// Remove all existing post data elements.
16510     ///
16511     extern(System) void function (cef_post_data_t* self) nothrow remove_elements;
16512 }
16513 
16514 
16515 
16516 ///
16517 /// Create a new cef_post_data_t object.
16518 ///
16519 cef_post_data_t* cef_post_data_create ();
16520 
16521 ///
16522 /// Structure used to represent a single element in the request post data. The
16523 /// functions of this structure may be called on any thread.
16524 ///
16525 struct cef_post_data_element_t
16526 {
16527     ///
16528     /// Base structure.
16529     ///
16530     cef_base_ref_counted_t base;
16531 
16532     ///
16533     /// Returns true (1) if this object is read-only.
16534     ///
16535     extern(System) int function (cef_post_data_element_t* self) nothrow is_read_only;
16536 
16537     ///
16538     /// Remove all contents from the post data element.
16539     ///
16540     extern(System) void function (cef_post_data_element_t* self) nothrow set_to_empty;
16541 
16542     ///
16543     /// The post data element will represent a file.
16544     ///
16545     extern(System) void function (
16546         cef_post_data_element_t* self,
16547         const(cef_string_t)* fileName) nothrow set_to_file;
16548 
16549     ///
16550     /// The post data element will represent bytes.  The bytes passed in will be
16551     /// copied.
16552     ///
16553     extern(System) void function (
16554         cef_post_data_element_t* self,
16555         size_t size,
16556         const(void)* bytes) nothrow set_to_bytes;
16557 
16558     ///
16559     /// Return the type of this post data element.
16560     ///
16561     extern(System) cef_postdataelement_type_t function (
16562         cef_post_data_element_t* self) nothrow get_type;
16563 
16564     ///
16565     /// Return the file name.
16566     ///
16567     // The resulting string must be freed by calling cef_string_userfree_free().
16568     extern(System) cef_string_userfree_t function (cef_post_data_element_t* self) nothrow get_file;
16569 
16570     ///
16571     /// Return the number of bytes.
16572     ///
16573     extern(System) size_t function (cef_post_data_element_t* self) nothrow get_bytes_count;
16574 
16575     ///
16576     /// Read up to |size| bytes into |bytes| and return the number of bytes
16577     /// actually read.
16578     ///
16579     extern(System) size_t function (
16580         cef_post_data_element_t* self,
16581         size_t size,
16582         void* bytes) nothrow get_bytes;
16583 }
16584 
16585 
16586 
16587 ///
16588 /// Create a new cef_post_data_element_t object.
16589 ///
16590 cef_post_data_element_t* cef_post_data_element_create ();
16591 
16592 // CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_
16593 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
16594 //
16595 // Redistribution and use in source and binary forms, with or without
16596 // modification, are permitted provided that the following conditions are
16597 // met:
16598 //
16599 //    * Redistributions of source code must retain the above copyright
16600 // notice, this list of conditions and the following disclaimer.
16601 //    * Redistributions in binary form must reproduce the above
16602 // copyright notice, this list of conditions and the following disclaimer
16603 // in the documentation and/or other materials provided with the
16604 // distribution.
16605 //    * Neither the name of Google Inc. nor the name Chromium Embedded
16606 // Framework nor the names of its contributors may be used to endorse
16607 // or promote products derived from this software without specific prior
16608 // written permission.
16609 //
16610 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16611 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16612 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16613 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16614 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16615 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16616 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
16617 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
16618 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
16619 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16620 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16621 //
16622 // ---------------------------------------------------------------------------
16623 //
16624 // This file was generated by the CEF translator tool and should not edited
16625 // by hand. See the translator.README.txt file in the tools directory for
16626 // more information.
16627 //
16628 // $hash=1c3c3dfb4bde6cd45278c6a80fbc53f624017c44$
16629 //
16630 
16631 extern (C):
16632 
16633 
16634 
16635 
16636 ///
16637 /// Callback structure for cef_request_context_t::ResolveHost.
16638 ///
16639 struct cef_resolve_callback_t
16640 {
16641     ///
16642     /// Base structure.
16643     ///
16644 
16645     ///
16646     /// Called on the UI thread after the ResolveHost request has completed.
16647     /// |result| will be the result code. |resolved_ips| will be the list of
16648     /// resolved IP addresses or NULL if the resolution failed.
16649     ///
16650     cef_base_ref_counted_t base;
16651     extern(System) void function (
16652         cef_resolve_callback_t* self,
16653         cef_errorcode_t result,
16654         cef_string_list_t resolved_ips) nothrow on_resolve_completed;
16655 }
16656 
16657  ///
16658 /// A request context provides request handling for a set of related browser or
16659 /// URL request objects. A request context can be specified when creating a new
16660 /// browser via the cef_browser_host_t static factory functions or when creating
16661 /// a new URL request via the cef_urlrequest_t static factory functions. Browser
16662 /// objects with different request contexts will never be hosted in the same
16663 /// render process. Browser objects with the same request context may or may not
16664 /// be hosted in the same render process depending on the process model. Browser
16665 /// objects created indirectly via the JavaScript window.open function or
16666 /// targeted links will share the same render process and the same request
16667 /// context as the source browser. When running in single-process mode there is
16668 /// only a single render process (the main process) and so all browsers created
16669 /// in single-process mode will share the same request context. This will be the
16670 /// first request context passed into a cef_browser_host_t static factory
16671 /// function and all other request context objects will be ignored.
16672 ///
16673 struct cef_request_context_t
16674 {
16675     ///
16676     /// Base structure.
16677     ///
16678 
16679     ///
16680     /// Returns true (1) if this object is pointing to the same context as |that|
16681     /// object.
16682     ///
16683 
16684     ///
16685     /// Returns true (1) if this object is sharing the same storage as |that|
16686     /// object.
16687     ///
16688 
16689     ///
16690     /// Returns true (1) if this object is the global context. The global context
16691     /// is used by default when creating a browser or URL request with a NULL
16692     /// context argument.
16693     ///
16694 
16695     ///
16696     /// Returns the handler for this context if any.
16697     ///
16698 
16699     ///
16700     /// Returns the cache path for this object. If NULL an "incognito mode" in-
16701     /// memory cache is being used.
16702     ///
16703     // The resulting string must be freed by calling cef_string_userfree_free().
16704 
16705     ///
16706     /// Returns the cookie manager for this object. If |callback| is non-NULL it
16707     /// will be executed asnychronously on the UI thread after the manager's
16708     /// storage has been initialized.
16709     ///
16710 
16711     ///
16712     /// Register a scheme handler factory for the specified |scheme_name| and
16713     /// optional |domain_name|. An NULL |domain_name| value for a standard scheme
16714     cef_preference_manager_t base;
16715     extern(System) int function (
16716         cef_request_context_t* self,
16717         cef_request_context_t* other) nothrow is_same;
16718     extern(System) int function (
16719         cef_request_context_t* self,
16720         cef_request_context_t* other) nothrow is_sharing_with;
16721     extern(System) int function (cef_request_context_t* self) nothrow is_global;
16722     extern(System) cef_request_context_handler_t* function (
16723         cef_request_context_t* self) nothrow get_handler;
16724     extern(System) cef_string_userfree_t function (
16725         cef_request_context_t* self) nothrow get_cache_path;
16726     extern(System) cef_cookie_manager_t* function (
16727         cef_request_context_t* self,
16728         cef_completion_callback_t* callback) nothrow get_cookie_manager;
16729     /// will cause the factory to match all domain names. The |domain_name| value
16730     /// will be ignored for non-standard schemes. If |scheme_name| is a built-in
16731     /// scheme and no handler is returned by |factory| then the built-in scheme
16732     /// handler factory will be called. If |scheme_name| is a custom scheme then
16733     /// you must also implement the cef_app_t::on_register_custom_schemes()
16734     /// function in all processes. This function may be called multiple times to
16735     /// change or remove the factory that matches the specified |scheme_name| and
16736     /// optional |domain_name|. Returns false (0) if an error occurs. This
16737     /// function may be called on any thread in the browser process.
16738     ///
16739     extern(System) int function (
16740         cef_request_context_t* self,
16741         const(cef_string_t)* scheme_name,
16742         const(cef_string_t)* domain_name,
16743         cef_scheme_handler_factory_t* factory) nothrow register_scheme_handler_factory;
16744 
16745     ///
16746     /// Clear all registered scheme handler factories. Returns false (0) on error.
16747     /// This function may be called on any thread in the browser process.
16748     ///
16749     extern(System) int function (cef_request_context_t* self) nothrow clear_scheme_handler_factories;
16750 
16751     ///
16752     /// Clears all certificate exceptions that were added as part of handling
16753     /// cef_request_handler_t::on_certificate_error(). If you call this it is
16754     /// recommended that you also call close_all_connections() or you risk not
16755     /// being prompted again for server certificates if you reconnect quickly. If
16756     /// |callback| is non-NULL it will be executed on the UI thread after
16757     /// completion.
16758     ///
16759     extern(System) void function (
16760         cef_request_context_t* self,
16761         cef_completion_callback_t* callback) nothrow clear_certificate_exceptions;
16762 
16763     ///
16764     /// Clears all HTTP authentication credentials that were added as part of
16765     /// handling GetAuthCredentials. If |callback| is non-NULL it will be executed
16766     /// on the UI thread after completion.
16767     ///
16768     extern(System) void function (
16769         cef_request_context_t* self,
16770         cef_completion_callback_t* callback) nothrow clear_http_auth_credentials;
16771 
16772     ///
16773     /// Clears all active and idle connections that Chromium currently has. This
16774     /// is only recommended if you have released all other CEF objects but don't
16775     /// yet want to call cef_shutdown(). If |callback| is non-NULL it will be
16776     /// executed on the UI thread after completion.
16777     ///
16778     extern(System) void function (
16779         cef_request_context_t* self,
16780         cef_completion_callback_t* callback) nothrow close_all_connections;
16781 
16782     ///
16783     /// Attempts to resolve |origin| to a list of associated IP addresses.
16784     /// |callback| will be executed on the UI thread after completion.
16785     ///
16786     extern(System) void function (
16787         cef_request_context_t* self,
16788         const(cef_string_t)* origin,
16789         cef_resolve_callback_t* callback) nothrow resolve_host;
16790 
16791     ///
16792     /// Load an extension.
16793     ///
16794     /// If extension resources will be read from disk using the default load
16795     /// implementation then |root_directory| should be the absolute path to the
16796     /// extension resources directory and |manifest| should be NULL. If extension
16797     /// resources will be provided by the client (e.g. via cef_request_handler_t
16798     /// and/or cef_extension_handler_t) then |root_directory| should be a path
16799     /// component unique to the extension (if not absolute this will be internally
16800     /// prefixed with the PK_DIR_RESOURCES path) and |manifest| should contain the
16801     /// contents that would otherwise be read from the "manifest.json" file on
16802     /// disk.
16803     ///
16804     /// The loaded extension will be accessible in all contexts sharing the same
16805     /// storage (HasExtension returns true (1)). However, only the context on
16806     /// which this function was called is considered the loader (DidLoadExtension
16807     /// returns true (1)) and only the loader will receive
16808     /// cef_request_context_handler_t callbacks for the extension.
16809     ///
16810     /// cef_extension_handler_t::OnExtensionLoaded will be called on load success
16811     /// or cef_extension_handler_t::OnExtensionLoadFailed will be called on load
16812     /// failure.
16813     ///
16814     /// If the extension specifies a background script via the "background"
16815     /// manifest key then cef_extension_handler_t::OnBeforeBackgroundBrowser will
16816     /// be called to create the background browser. See that function for
16817     /// additional information about background scripts.
16818     ///
16819     /// For visible extension views the client application should evaluate the
16820     /// manifest to determine the correct extension URL to load and then pass that
16821     /// URL to the cef_browser_host_t::CreateBrowser* function after the extension
16822     /// has loaded. For example, the client can look for the "browser_action"
16823     /// manifest key as documented at
16824     /// https://developer.chrome.com/extensions/browserAction. Extension URLs take
16825     /// the form "chrome-extension://<extension_id>/<path>".
16826     ///
16827     /// Browsers that host extensions differ from normal browsers as follows:
16828     ///  - Can access chrome.* JavaScript APIs if allowed by the manifest. Visit
16829     ///    chrome://extensions-support for the list of extension APIs currently
16830     ///    supported by CEF.
16831     ///  - Main frame navigation to non-extension content is blocked.
16832     ///  - Pinch-zooming is disabled.
16833     ///  - CefBrowserHost::GetExtension returns the hosted extension.
16834     ///  - CefBrowserHost::IsBackgroundHost returns true for background hosts.
16835     ///
16836     /// See https://developer.chrome.com/extensions for extension implementation
16837     /// and usage documentation.
16838     ///
16839     extern(System) void function (
16840         cef_request_context_t* self,
16841         const(cef_string_t)* root_directory,
16842         cef_dictionary_value_t* manifest,
16843         cef_extension_handler_t* handler) nothrow load_extension;
16844 
16845     ///
16846     /// Returns true (1) if this context was used to load the extension identified
16847     /// by |extension_id|. Other contexts sharing the same storage will also have
16848     /// access to the extension (see HasExtension). This function must be called
16849     /// on the browser process UI thread.
16850     ///
16851     extern(System) int function (
16852         cef_request_context_t* self,
16853         const(cef_string_t)* extension_id) nothrow did_load_extension;
16854 
16855     ///
16856     /// Returns true (1) if this context has access to the extension identified by
16857     /// |extension_id|. This may not be the context that was used to load the
16858     /// extension (see DidLoadExtension). This function must be called on the
16859     /// browser process UI thread.
16860     ///
16861     extern(System) int function (
16862         cef_request_context_t* self,
16863         const(cef_string_t)* extension_id) nothrow has_extension;
16864 
16865     ///
16866     /// Retrieve the list of all extensions that this context has access to (see
16867     /// HasExtension). |extension_ids| will be populated with the list of
16868     /// extension ID values. Returns true (1) on success. This function must be
16869     /// called on the browser process UI thread.
16870     ///
16871     extern(System) int function (
16872         cef_request_context_t* self,
16873         cef_string_list_t extension_ids) nothrow get_extensions;
16874 
16875     ///
16876     /// Returns the extension matching |extension_id| or NULL if no matching
16877     /// extension is accessible in this context (see HasExtension). This function
16878     /// must be called on the browser process UI thread.
16879     ///
16880     extern(System) cef_extension_t* function (
16881         cef_request_context_t* self,
16882         const(cef_string_t)* extension_id) nothrow get_extension;
16883 
16884     ///
16885     /// Returns the MediaRouter object associated with this context.  If
16886     /// |callback| is non-NULL it will be executed asnychronously on the UI thread
16887     /// after the manager's context has been initialized.
16888     ///
16889     extern(System) cef_media_router_t* function (
16890         cef_request_context_t* self,
16891         cef_completion_callback_t* callback) nothrow get_media_router;
16892 
16893     ///
16894     /// Returns the current value for |content_type| that applies for the
16895     /// specified URLs. If both URLs are NULL the default value will be returned.
16896     /// Returns nullptr if no value is configured. Must be called on the browser
16897     /// process UI thread.
16898     ///
16899     extern(System) cef_value_t* function (
16900         cef_request_context_t* self,
16901         const(cef_string_t)* requesting_url,
16902         const(cef_string_t)* top_level_url,
16903         cef_content_setting_types_t content_type) nothrow get_website_setting;
16904 
16905     ///
16906     /// Sets the current value for |content_type| for the specified URLs in the
16907     /// default scope. If both URLs are NULL, and the context is not incognito,
16908     /// the default value will be set. Pass nullptr for |value| to remove the
16909     /// default value for this content type.
16910     ///
16911     /// WARNING: Incorrect usage of this function may cause instability or
16912     /// security issues in Chromium. Make sure that you first understand the
16913     /// potential impact of any changes to |content_type| by reviewing the related
16914     /// source code in Chromium. For example, if you plan to modify
16915     /// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
16916     /// ContentSettingsType::POPUPS in Chromium:
16917     /// https://source.chromium.org/search?q=ContentSettingsType::POPUPS
16918     ///
16919     extern(System) void function (
16920         cef_request_context_t* self,
16921         const(cef_string_t)* requesting_url,
16922         const(cef_string_t)* top_level_url,
16923         cef_content_setting_types_t content_type,
16924         cef_value_t* value) nothrow set_website_setting;
16925 
16926     ///
16927     /// Returns the current value for |content_type| that applies for the
16928     /// specified URLs. If both URLs are NULL the default value will be returned.
16929     /// Returns CEF_CONTENT_SETTING_VALUE_DEFAULT if no value is configured. Must
16930     /// be called on the browser process UI thread.
16931     ///
16932     extern(System) cef_content_setting_values_t function (
16933         cef_request_context_t* self,
16934         const(cef_string_t)* requesting_url,
16935         const(cef_string_t)* top_level_url,
16936         cef_content_setting_types_t content_type) nothrow get_content_setting;
16937 
16938     ///
16939     /// Sets the current value for |content_type| for the specified URLs in the
16940     /// default scope. If both URLs are NULL, and the context is not incognito,
16941     /// the default value will be set. Pass CEF_CONTENT_SETTING_VALUE_DEFAULT for
16942     /// |value| to use the default value for this content type.
16943     ///
16944     /// WARNING: Incorrect usage of this function may cause instability or
16945     /// security issues in Chromium. Make sure that you first understand the
16946     /// potential impact of any changes to |content_type| by reviewing the related
16947     /// source code in Chromium. For example, if you plan to modify
16948     /// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
16949     /// ContentSettingsType::POPUPS in Chromium:
16950     /// https://source.chromium.org/search?q=ContentSettingsType::POPUPS
16951     ///
16952     extern(System) void function (
16953         cef_request_context_t* self,
16954         const(cef_string_t)* requesting_url,
16955         const(cef_string_t)* top_level_url,
16956         cef_content_setting_types_t content_type,
16957         cef_content_setting_values_t value) nothrow set_content_setting;
16958 }
16959 
16960 
16961 
16962 ///
16963 /// Returns the global context object.
16964 ///
16965 cef_request_context_t* cef_request_context_get_global_context ();
16966 
16967 ///
16968 /// Creates a new context object with the specified |settings| and optional
16969 /// |handler|.
16970 ///
16971 cef_request_context_t* cef_request_context_create_context (
16972     const(cef_request_context_settings_t)* settings,
16973     cef_request_context_handler_t* handler);
16974 
16975 ///
16976 /// Creates a new context object that shares storage with |other| and uses an
16977 /// optional |handler|.
16978 ///
16979 cef_request_context_t* cef_create_context_shared (
16980     cef_request_context_t* other,
16981     cef_request_context_handler_t* handler);
16982 
16983 // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
16984 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
16985 //
16986 // Redistribution and use in source and binary forms, with or without
16987 // modification, are permitted provided that the following conditions are
16988 // met:
16989 //
16990 //    * Redistributions of source code must retain the above copyright
16991 // notice, this list of conditions and the following disclaimer.
16992 //    * Redistributions in binary form must reproduce the above
16993 // copyright notice, this list of conditions and the following disclaimer
16994 // in the documentation and/or other materials provided with the
16995 // distribution.
16996 //    * Neither the name of Google Inc. nor the name Chromium Embedded
16997 // Framework nor the names of its contributors may be used to endorse
16998 // or promote products derived from this software without specific prior
16999 // written permission.
17000 //
17001 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17002 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17003 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17004 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17005 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17006 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17007 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17008 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17009 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17010 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17011 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17012 //
17013 // ---------------------------------------------------------------------------
17014 //
17015 // This file was generated by the CEF translator tool and should not edited
17016 // by hand. See the translator.README.txt file in the tools directory for
17017 // more information.
17018 //
17019 // $hash=b0b532a12106d960adc446b980affeee12b93ae3$
17020 //
17021 
17022 extern (C):
17023 
17024 ///
17025 /// Implement this structure to provide handler implementations. The handler
17026 /// instance will not be released until all objects related to the context have
17027 /// been destroyed.
17028 ///
17029 struct cef_request_context_handler_t
17030 {
17031     ///
17032     /// Base structure.
17033     ///
17034 
17035     ///
17036     /// Called on the browser process UI thread immediately after the request
17037     /// context has been initialized.
17038     ///
17039 
17040     ///
17041     /// Called on the browser process IO thread before a resource request is
17042     cef_base_ref_counted_t base;
17043     extern(System) void function (
17044         cef_request_context_handler_t* self,
17045         cef_request_context_t* request_context) nothrow on_request_context_initialized;
17046     /// initiated. The |browser| and |frame| values represent the source of the
17047     /// request, and may be NULL for requests originating from service workers or
17048     /// cef_urlrequest_t. |request| represents the request contents and cannot be
17049     /// modified in this callback. |is_navigation| will be true (1) if the
17050     /// resource request is a navigation. |is_download| will be true (1) if the
17051     /// resource request is a download. |request_initiator| is the origin (scheme
17052     /// + domain) of the page that initiated the request. Set
17053     /// |disable_default_handling| to true (1) to disable default handling of the
17054     /// request, in which case it will need to be handled via
17055     /// cef_resource_request_handler_t::GetResourceHandler or it will be canceled.
17056     /// To allow the resource load to proceed with default handling return NULL.
17057     /// To specify a handler for the resource return a
17058     /// cef_resource_request_handler_t object. This function will not be called if
17059     /// the client associated with |browser| returns a non-NULL value from
17060     /// cef_request_handler_t::GetResourceRequestHandler for the same request
17061     /// (identified by cef_request_t::GetIdentifier).
17062     ///
17063     extern(System) cef_resource_request_handler_t* function (
17064         cef_request_context_handler_t* self,
17065         cef_browser_t* browser,
17066         cef_frame_t* frame,
17067         cef_request_t* request,
17068         int is_navigation,
17069         int is_download,
17070         const(cef_string_t)* request_initiator,
17071         int* disable_default_handling) nothrow get_resource_request_handler;
17072 }
17073 
17074 
17075 
17076 // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_
17077 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
17078 //
17079 // Redistribution and use in source and binary forms, with or without
17080 // modification, are permitted provided that the following conditions are
17081 // met:
17082 //
17083 //    * Redistributions of source code must retain the above copyright
17084 // notice, this list of conditions and the following disclaimer.
17085 //    * Redistributions in binary form must reproduce the above
17086 // copyright notice, this list of conditions and the following disclaimer
17087 // in the documentation and/or other materials provided with the
17088 // distribution.
17089 //    * Neither the name of Google Inc. nor the name Chromium Embedded
17090 // Framework nor the names of its contributors may be used to endorse
17091 // or promote products derived from this software without specific prior
17092 // written permission.
17093 //
17094 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17095 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17096 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17097 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17098 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17099 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17100 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17101 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17102 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17103 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17104 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17105 //
17106 // ---------------------------------------------------------------------------
17107 //
17108 // This file was generated by the CEF translator tool and should not edited
17109 // by hand. See the translator.README.txt file in the tools directory for
17110 // more information.
17111 //
17112 // $hash=092d897e223273a940ed623547d82645f764519c$
17113 //
17114 
17115 extern (C):
17116 
17117 ///
17118 /// Callback structure used to select a client certificate for authentication.
17119 ///
17120 struct cef_select_client_certificate_callback_t
17121 {
17122     ///
17123     /// Base structure.
17124     ///
17125 
17126     ///
17127     /// Chooses the specified certificate for client certificate authentication.
17128     /// NULL value means that no client certificate should be used.
17129     ///
17130     cef_base_ref_counted_t base;
17131     extern(System) void function (
17132         cef_select_client_certificate_callback_t* self,
17133         cef_x509certificate_t* cert) nothrow select;
17134 }
17135 
17136 
17137 ///
17138 /// Implement this structure to handle events related to browser requests. The
17139 /// functions of this structure will be called on the thread indicated.
17140 ///
17141 struct cef_request_handler_t
17142 {
17143     ///
17144     /// Base structure.
17145     ///
17146     cef_base_ref_counted_t base;
17147 
17148     ///
17149     /// Called on the UI thread before browser navigation. Return true (1) to
17150     /// cancel the navigation or false (0) to allow the navigation to proceed. The
17151     /// |request| object cannot be modified in this callback.
17152     /// cef_load_handler_t::OnLoadingStateChange will be called twice in all
17153     /// cases. If the navigation is allowed cef_load_handler_t::OnLoadStart and
17154     /// cef_load_handler_t::OnLoadEnd will be called. If the navigation is
17155     /// canceled cef_load_handler_t::OnLoadError will be called with an
17156     /// |errorCode| value of ERR_ABORTED. The |user_gesture| value will be true
17157     /// (1) if the browser navigated via explicit user gesture (e.g. clicking a
17158     /// link) or false (0) if it navigated automatically (e.g. via the
17159     /// DomContentLoaded event).
17160     ///
17161     extern(System) int function (
17162         cef_request_handler_t* self,
17163         cef_browser_t* browser,
17164         cef_frame_t* frame,
17165         cef_request_t* request,
17166         int user_gesture,
17167         int is_redirect) nothrow on_before_browse;
17168 
17169     ///
17170     /// Called on the UI thread before OnBeforeBrowse in certain limited cases
17171     /// where navigating a new or different browser might be desirable. This
17172     /// includes user-initiated navigation that might open in a special way (e.g.
17173     /// links clicked via middle-click or ctrl + left-click) and certain types of
17174     /// cross-origin navigation initiated from the renderer process (e.g.
17175     /// navigating the top-level frame to/from a file URL). The |browser| and
17176     /// |frame| values represent the source of the navigation. The
17177     /// |target_disposition| value indicates where the user intended to navigate
17178     /// the browser based on standard Chromium behaviors (e.g. current tab, new
17179     /// tab, etc). The |user_gesture| value will be true (1) if the browser
17180     /// navigated via explicit user gesture (e.g. clicking a link) or false (0) if
17181     /// it navigated automatically (e.g. via the DomContentLoaded event). Return
17182     /// true (1) to cancel the navigation or false (0) to allow the navigation to
17183     /// proceed in the source browser's top-level frame.
17184     ///
17185     extern(System) int function (
17186         cef_request_handler_t* self,
17187         cef_browser_t* browser,
17188         cef_frame_t* frame,
17189         const(cef_string_t)* target_url,
17190         cef_window_open_disposition_t target_disposition,
17191         int user_gesture) nothrow on_open_urlfrom_tab;
17192 
17193     ///
17194     /// Called on the browser process IO thread before a resource request is
17195     /// initiated. The |browser| and |frame| values represent the source of the
17196     /// request. |request| represents the request contents and cannot be modified
17197     /// in this callback. |is_navigation| will be true (1) if the resource request
17198     /// is a navigation. |is_download| will be true (1) if the resource request is
17199     /// a download. |request_initiator| is the origin (scheme + domain) of the
17200     /// page that initiated the request. Set |disable_default_handling| to true
17201     /// (1) to disable default handling of the request, in which case it will need
17202     /// to be handled via cef_resource_request_handler_t::GetResourceHandler or it
17203     /// will be canceled. To allow the resource load to proceed with default
17204     /// handling return NULL. To specify a handler for the resource return a
17205     /// cef_resource_request_handler_t object. If this callback returns NULL the
17206     /// same function will be called on the associated
17207     /// cef_request_context_handler_t, if any.
17208     ///
17209     extern(System) cef_resource_request_handler_t* function (
17210         cef_request_handler_t* self,
17211         cef_browser_t* browser,
17212         cef_frame_t* frame,
17213         cef_request_t* request,
17214         int is_navigation,
17215         int is_download,
17216         const(cef_string_t)* request_initiator,
17217         int* disable_default_handling) nothrow get_resource_request_handler;
17218 
17219     ///
17220     /// Called on the IO thread when the browser needs credentials from the user.
17221     /// |origin_url| is the origin making this authentication request. |isProxy|
17222     /// indicates whether the host is a proxy server. |host| contains the hostname
17223     /// and |port| contains the port number. |realm| is the realm of the challenge
17224     /// and may be NULL. |scheme| is the authentication scheme used, such as
17225     /// "basic" or "digest", and will be NULL if the source of the request is an
17226     /// FTP server. Return true (1) to continue the request and call
17227     /// cef_auth_callback_t::cont() either in this function or at a later time
17228     /// when the authentication information is available. Return false (0) to
17229     /// cancel the request immediately.
17230     ///
17231     extern(System) int function (
17232         cef_request_handler_t* self,
17233         cef_browser_t* browser,
17234         const(cef_string_t)* origin_url,
17235         int isProxy,
17236         const(cef_string_t)* host,
17237         int port,
17238         const(cef_string_t)* realm,
17239         const(cef_string_t)* scheme,
17240         cef_auth_callback_t* callback) nothrow get_auth_credentials;
17241 
17242     ///
17243     /// Called on the UI thread to handle requests for URLs with an invalid SSL
17244     /// certificate. Return true (1) and call cef_callback_t functions either in
17245     /// this function or at a later time to continue or cancel the request. Return
17246     /// false (0) to cancel the request immediately. If
17247     /// cef_settings_t.ignore_certificate_errors is set all invalid certificates
17248     /// will be accepted without calling this function.
17249     ///
17250     extern(System) int function (
17251         cef_request_handler_t* self,
17252         cef_browser_t* browser,
17253         cef_errorcode_t cert_error,
17254         const(cef_string_t)* request_url,
17255         cef_sslinfo_t* ssl_info,
17256         cef_callback_t* callback) nothrow on_certificate_error;
17257 
17258     ///
17259     /// Called on the UI thread when a client certificate is being requested for
17260     /// authentication. Return false (0) to use the default behavior and
17261     /// automatically select the first certificate available. Return true (1) and
17262     /// call cef_select_client_certificate_callback_t::Select either in this
17263     /// function or at a later time to select a certificate. Do not call Select or
17264     /// call it with NULL to continue without using any certificate. |isProxy|
17265     /// indicates whether the host is an HTTPS proxy or the origin server. |host|
17266     /// and |port| contains the hostname and port of the SSL server.
17267     /// |certificates| is the list of certificates to choose from; this list has
17268     /// already been pruned by Chromium so that it only contains certificates from
17269     /// issuers that the server trusts.
17270     ///
17271     extern(System) int function (
17272         cef_request_handler_t* self,
17273         cef_browser_t* browser,
17274         int isProxy,
17275         const(cef_string_t)* host,
17276         int port,
17277         size_t certificatesCount,
17278         cef_x509certificate_t** certificates,
17279         cef_select_client_certificate_callback_t* callback) nothrow on_select_client_certificate;
17280 
17281     ///
17282     /// Called on the browser process UI thread when the render view associated
17283     /// with |browser| is ready to receive/handle IPC messages in the render
17284     /// process.
17285     ///
17286     extern(System) void function (
17287         cef_request_handler_t* self,
17288         cef_browser_t* browser) nothrow on_render_view_ready;
17289 
17290     ///
17291     /// Called on the browser process UI thread when the render process terminates
17292     /// unexpectedly. |status| indicates how the process terminated.
17293     ///
17294     extern(System) void function (
17295         cef_request_handler_t* self,
17296         cef_browser_t* browser,
17297         cef_termination_status_t status) nothrow on_render_process_terminated;
17298 
17299     ///
17300     /// Called on the browser process UI thread when the window.document object of
17301     /// the main frame has been created.
17302     ///
17303     extern(System) void function (
17304         cef_request_handler_t* self,
17305         cef_browser_t* browser) nothrow on_document_available_in_main_frame;
17306 }
17307 
17308 
17309 
17310 // CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
17311 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
17312 //
17313 // Redistribution and use in source and binary forms, with or without
17314 // modification, are permitted provided that the following conditions are
17315 // met:
17316 //
17317 //    * Redistributions of source code must retain the above copyright
17318 // notice, this list of conditions and the following disclaimer.
17319 //    * Redistributions in binary form must reproduce the above
17320 // copyright notice, this list of conditions and the following disclaimer
17321 // in the documentation and/or other materials provided with the
17322 // distribution.
17323 //    * Neither the name of Google Inc. nor the name Chromium Embedded
17324 // Framework nor the names of its contributors may be used to endorse
17325 // or promote products derived from this software without specific prior
17326 // written permission.
17327 //
17328 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17329 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17330 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17331 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17332 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17333 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17334 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17335 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17336 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17337 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17338 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17339 //
17340 // ---------------------------------------------------------------------------
17341 //
17342 // This file was generated by the CEF translator tool and should not edited
17343 // by hand. See the translator.README.txt file in the tools directory for
17344 // more information.
17345 //
17346 // $hash=e8e8dd2730a47aad9414f7bfc2e6ad96aba2c875$
17347 //
17348 
17349 extern (C):
17350 
17351 ///
17352 /// Structure used for retrieving resources from the resource bundle (*.pak)
17353 /// files loaded by CEF during startup or via the cef_resource_bundle_handler_t
17354 /// returned from cef_app_t::GetResourceBundleHandler. See CefSettings for
17355 /// additional options related to resource bundle loading. The functions of this
17356 /// structure may be called on any thread unless otherwise indicated.
17357 ///
17358 struct cef_resource_bundle_t
17359 {
17360     ///
17361     /// Base structure.
17362     ///
17363 
17364     ///
17365     /// Returns the localized string for the specified |string_id| or an NULL
17366     /// string if the value is not found. Include cef_pack_strings.h for a listing
17367     /// of valid string ID values.
17368     ///
17369     // The resulting string must be freed by calling cef_string_userfree_free().
17370     cef_base_ref_counted_t base;
17371     extern(System) cef_string_userfree_t function (
17372         cef_resource_bundle_t* self,
17373         int string_id) nothrow get_localized_string;
17374     ///
17375     /// Returns a cef_binary_value_t containing the decompressed contents of the
17376     /// specified scale independent |resource_id| or NULL if not found. Include
17377     /// cef_pack_resources.h for a listing of valid resource ID values.
17378     ///
17379     extern(System) cef_binary_value_t* function (
17380         cef_resource_bundle_t* self,
17381         int resource_id) nothrow get_data_resource;
17382 
17383     ///
17384     /// Returns a cef_binary_value_t containing the decompressed contents of the
17385     /// specified |resource_id| nearest the scale factor |scale_factor| or NULL if
17386     /// not found. Use a |scale_factor| value of SCALE_FACTOR_NONE for scale
17387     /// independent resources or call GetDataResource instead.Include
17388     /// cef_pack_resources.h for a listing of valid resource ID values.
17389     ///
17390     extern(System) cef_binary_value_t* function (
17391         cef_resource_bundle_t* self,
17392         int resource_id,
17393         cef_scale_factor_t scale_factor) nothrow get_data_resource_for_scale;
17394 }
17395 
17396 
17397 
17398 ///
17399 /// Returns the global resource bundle instance.
17400 ///
17401 cef_resource_bundle_t* cef_resource_bundle_get_global ();
17402 
17403 // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_
17404 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
17405 //
17406 // Redistribution and use in source and binary forms, with or without
17407 // modification, are permitted provided that the following conditions are
17408 // met:
17409 //
17410 //    * Redistributions of source code must retain the above copyright
17411 // notice, this list of conditions and the following disclaimer.
17412 //    * Redistributions in binary form must reproduce the above
17413 // copyright notice, this list of conditions and the following disclaimer
17414 // in the documentation and/or other materials provided with the
17415 // distribution.
17416 //    * Neither the name of Google Inc. nor the name Chromium Embedded
17417 // Framework nor the names of its contributors may be used to endorse
17418 // or promote products derived from this software without specific prior
17419 // written permission.
17420 //
17421 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17422 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17423 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17424 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17425 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17426 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17427 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17428 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17429 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17430 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17431 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17432 //
17433 // ---------------------------------------------------------------------------
17434 //
17435 // This file was generated by the CEF translator tool and should not edited
17436 // by hand. See the translator.README.txt file in the tools directory for
17437 // more information.
17438 //
17439 // $hash=00023b2ec108ae6e4bd282d16e82032cdc99d548$
17440 //
17441 
17442 extern (C):
17443 
17444 ///
17445 /// Structure used to implement a custom resource bundle structure. See
17446 /// CefSettings for additional options related to resource bundle loading. The
17447 /// functions of this structure may be called on multiple threads.
17448 ///
17449 struct cef_resource_bundle_handler_t
17450 {
17451     ///
17452     /// Base structure.
17453     ///
17454 
17455     ///
17456     /// Called to retrieve a localized translation for the specified |string_id|.
17457     /// To provide the translation set |string| to the translation string and
17458     /// return true (1). To use the default translation return false (0). Include
17459     /// cef_pack_strings.h for a listing of valid string ID values.
17460     ///
17461 
17462     ///
17463     /// Called to retrieve data for the specified scale independent |resource_id|.
17464     cef_base_ref_counted_t base;
17465     extern(System) int function (
17466         cef_resource_bundle_handler_t* self,
17467         int string_id,
17468         cef_string_t* string) nothrow get_localized_string;
17469     /// To provide the resource data set |data| and |data_size| to the data
17470     /// pointer and size respectively and return true (1). To use the default
17471     /// resource data return false (0). The resource data will not be copied and
17472     /// must remain resident in memory. Include cef_pack_resources.h for a listing
17473     /// of valid resource ID values.
17474     ///
17475     extern(System) int function (
17476         cef_resource_bundle_handler_t* self,
17477         int resource_id,
17478         void** data,
17479         size_t* data_size) nothrow get_data_resource;
17480 
17481     ///
17482     /// Called to retrieve data for the specified |resource_id| nearest the scale
17483     /// factor |scale_factor|. To provide the resource data set |data| and
17484     /// |data_size| to the data pointer and size respectively and return true (1).
17485     /// To use the default resource data return false (0). The resource data will
17486     /// not be copied and must remain resident in memory. Include
17487     /// cef_pack_resources.h for a listing of valid resource ID values.
17488     ///
17489     extern(System) int function (
17490         cef_resource_bundle_handler_t* self,
17491         int resource_id,
17492         cef_scale_factor_t scale_factor,
17493         void** data,
17494         size_t* data_size) nothrow get_data_resource_for_scale;
17495 }
17496 
17497 
17498 
17499 // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_
17500 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
17501 //
17502 // Redistribution and use in source and binary forms, with or without
17503 // modification, are permitted provided that the following conditions are
17504 // met:
17505 //
17506 //    * Redistributions of source code must retain the above copyright
17507 // notice, this list of conditions and the following disclaimer.
17508 //    * Redistributions in binary form must reproduce the above
17509 // copyright notice, this list of conditions and the following disclaimer
17510 // in the documentation and/or other materials provided with the
17511 // distribution.
17512 //    * Neither the name of Google Inc. nor the name Chromium Embedded
17513 // Framework nor the names of its contributors may be used to endorse
17514 // or promote products derived from this software without specific prior
17515 // written permission.
17516 //
17517 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17518 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17519 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17520 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17521 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17522 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17523 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17524 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17525 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17526 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17527 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17528 //
17529 // ---------------------------------------------------------------------------
17530 //
17531 // This file was generated by the CEF translator tool and should not edited
17532 // by hand. See the translator.README.txt file in the tools directory for
17533 // more information.
17534 //
17535 // $hash=ca5c224b373452158904b0f859f126f36c927f93$
17536 //
17537 
17538 extern (C):
17539 
17540 ///
17541 /// Callback for asynchronous continuation of cef_resource_handler_t::skip().
17542 ///
17543 struct cef_resource_skip_callback_t
17544 {
17545     ///
17546     /// Base structure.
17547     ///
17548 
17549     ///
17550     /// Callback for asynchronous continuation of skip(). If |bytes_skipped| > 0
17551     /// then either skip() will be called again until the requested number of
17552     /// bytes have been skipped or the request will proceed. If |bytes_skipped| <=
17553     /// 0 the request will fail with ERR_REQUEST_RANGE_NOT_SATISFIABLE.
17554     ///
17555 
17556     ///
17557     /// Callback for asynchronous continuation of cef_resource_handler_t::read().
17558     cef_base_ref_counted_t base;
17559     extern(System) void function (
17560         cef_resource_skip_callback_t* self,
17561         long bytes_skipped) nothrow cont;
17562 }
17563 
17564 
17565 ///
17566 struct cef_resource_read_callback_t
17567 {
17568     ///
17569     /// Base structure.
17570     ///
17571     cef_base_ref_counted_t base;
17572 
17573     ///
17574     /// Callback for asynchronous continuation of read(). If |bytes_read| == 0 the
17575     /// response will be considered complete. If |bytes_read| > 0 then read() will
17576     /// be called again until the request is complete (based on either the result
17577     /// or the expected content length). If |bytes_read| < 0 then the request will
17578     /// fail and the |bytes_read| value will be treated as the error code.
17579     ///
17580     extern(System) void function (cef_resource_read_callback_t* self, int bytes_read) nothrow cont;
17581 }
17582 
17583 
17584 
17585 ///
17586 /// Structure used to implement a custom request handler structure. The
17587 /// functions of this structure will be called on the IO thread unless otherwise
17588 /// indicated.
17589 ///
17590 struct cef_resource_handler_t
17591 {
17592     ///
17593     /// Base structure.
17594     ///
17595     cef_base_ref_counted_t base;
17596 
17597     ///
17598     /// Open the response stream. To handle the request immediately set
17599     /// |handle_request| to true (1) and return true (1). To decide at a later
17600     /// time set |handle_request| to false (0), return true (1), and execute
17601     /// |callback| to continue or cancel the request. To cancel the request
17602     /// immediately set |handle_request| to true (1) and return false (0). This
17603     /// function will be called in sequence but not from a dedicated thread. For
17604     /// backwards compatibility set |handle_request| to false (0) and return false
17605     /// (0) and the ProcessRequest function will be called.
17606     ///
17607     extern(System) int function (
17608         cef_resource_handler_t* self,
17609         cef_request_t* request,
17610         int* handle_request,
17611         cef_callback_t* callback) nothrow open;
17612 
17613     ///
17614     /// Begin processing the request. To handle the request return true (1) and
17615     /// call cef_callback_t::cont() once the response header information is
17616     /// available (cef_callback_t::cont() can also be called from inside this
17617     /// function if header information is available immediately). To cancel the
17618     /// request return false (0).
17619     ///
17620     /// WARNING: This function is deprecated. Use Open instead.
17621     ///
17622     extern(System) int function (
17623         cef_resource_handler_t* self,
17624         cef_request_t* request,
17625         cef_callback_t* callback) nothrow process_request;
17626 
17627     ///
17628     /// Retrieve response header information. If the response length is not known
17629     /// set |response_length| to -1 and read_response() will be called until it
17630     /// returns false (0). If the response length is known set |response_length|
17631     /// to a positive value and read_response() will be called until it returns
17632     /// false (0) or the specified number of bytes have been read. Use the
17633     /// |response| object to set the mime type, http status code and other
17634     /// optional header values. To redirect the request to a new URL set
17635     /// |redirectUrl| to the new URL. |redirectUrl| can be either a relative or
17636     /// fully qualified URL. It is also possible to set |response| to a redirect
17637     /// http status code and pass the new URL via a Location header. Likewise with
17638     /// |redirectUrl| it is valid to set a relative or fully qualified URL as the
17639     /// Location header value. If an error occured while setting up the request
17640     /// you can call set_error() on |response| to indicate the error condition.
17641     ///
17642     extern(System) void function (
17643         cef_resource_handler_t* self,
17644         cef_response_t* response,
17645         long* response_length,
17646         cef_string_t* redirectUrl) nothrow get_response_headers;
17647 
17648     ///
17649     /// Skip response data when requested by a Range header. Skip over and discard
17650     /// |bytes_to_skip| bytes of response data. If data is available immediately
17651     /// set |bytes_skipped| to the number of bytes skipped and return true (1). To
17652     /// read the data at a later time set |bytes_skipped| to 0, return true (1)
17653     /// and execute |callback| when the data is available. To indicate failure set
17654     /// |bytes_skipped| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This
17655     /// function will be called in sequence but not from a dedicated thread.
17656     ///
17657     extern(System) int function (
17658         cef_resource_handler_t* self,
17659         long bytes_to_skip,
17660         long* bytes_skipped,
17661         cef_resource_skip_callback_t* callback) nothrow skip;
17662 
17663     ///
17664     /// Read response data. If data is available immediately copy up to
17665     /// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
17666     /// bytes copied, and return true (1). To read the data at a later time keep a
17667     /// pointer to |data_out|, set |bytes_read| to 0, return true (1) and execute
17668     /// |callback| when the data is available (|data_out| will remain valid until
17669     /// the callback is executed). To indicate response completion set
17670     /// |bytes_read| to 0 and return false (0). To indicate failure set
17671     /// |bytes_read| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This
17672     /// function will be called in sequence but not from a dedicated thread. For
17673     /// backwards compatibility set |bytes_read| to -1 and return false (0) and
17674     /// the ReadResponse function will be called.
17675     ///
17676     extern(System) int function (
17677         cef_resource_handler_t* self,
17678         void* data_out,
17679         int bytes_to_read,
17680         int* bytes_read,
17681         cef_resource_read_callback_t* callback) nothrow read;
17682 
17683     ///
17684     /// Read response data. If data is available immediately copy up to
17685     /// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
17686     /// bytes copied, and return true (1). To read the data at a later time set
17687     /// |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when
17688     /// the data is available. To indicate response completion return false (0).
17689     ///
17690     /// WARNING: This function is deprecated. Use Skip and Read instead.
17691     ///
17692     extern(System) int function (
17693         cef_resource_handler_t* self,
17694         void* data_out,
17695         int bytes_to_read,
17696         int* bytes_read,
17697         cef_callback_t* callback) nothrow read_response;
17698 
17699     ///
17700     /// Request processing has been canceled.
17701     ///
17702     extern(System) void function (cef_resource_handler_t* self) nothrow cancel;
17703 }
17704 
17705 
17706 
17707 // CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_
17708 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
17709 //
17710 // Redistribution and use in source and binary forms, with or without
17711 // modification, are permitted provided that the following conditions are
17712 // met:
17713 //
17714 //    * Redistributions of source code must retain the above copyright
17715 // notice, this list of conditions and the following disclaimer.
17716 //    * Redistributions in binary form must reproduce the above
17717 // copyright notice, this list of conditions and the following disclaimer
17718 // in the documentation and/or other materials provided with the
17719 // distribution.
17720 //    * Neither the name of Google Inc. nor the name Chromium Embedded
17721 // Framework nor the names of its contributors may be used to endorse
17722 // or promote products derived from this software without specific prior
17723 // written permission.
17724 //
17725 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17726 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17727 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17728 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17729 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17730 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17731 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17732 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17733 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17734 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17735 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17736 //
17737 // ---------------------------------------------------------------------------
17738 //
17739 // This file was generated by the CEF translator tool and should not edited
17740 // by hand. See the translator.README.txt file in the tools directory for
17741 // more information.
17742 //
17743 // $hash=757155e6dbceef47938fd562f7f5f48a609ce288$
17744 //
17745 
17746 extern (C):
17747 
17748 ///
17749 /// Implement this structure to handle events related to browser requests. The
17750 /// functions of this structure will be called on the IO thread unless otherwise
17751 /// indicated.
17752 ///
17753 struct cef_resource_request_handler_t
17754 {
17755     ///
17756     /// Base structure.
17757     ///
17758 
17759     ///
17760     /// Called on the IO thread before a resource request is loaded. The |browser|
17761     /// and |frame| values represent the source of the request, and may be NULL
17762     /// for requests originating from service workers or cef_urlrequest_t. To
17763     cef_base_ref_counted_t base;
17764     /// optionally filter cookies for the request return a
17765     /// cef_cookie_access_filter_t object. The |request| object cannot not be
17766     /// modified in this callback.
17767     ///
17768     extern(System) cef_cookie_access_filter_t* function (
17769         cef_resource_request_handler_t* self,
17770         cef_browser_t* browser,
17771         cef_frame_t* frame,
17772         cef_request_t* request) nothrow get_cookie_access_filter;
17773 
17774     ///
17775     /// Called on the IO thread before a resource request is loaded. The |browser|
17776     /// and |frame| values represent the source of the request, and may be NULL
17777     /// for requests originating from service workers or cef_urlrequest_t. To
17778     /// redirect or change the resource load optionally modify |request|.
17779     /// Modification of the request URL will be treated as a redirect. Return
17780     /// RV_CONTINUE to continue the request immediately. Return RV_CONTINUE_ASYNC
17781     /// and call cef_callback_t functions at a later time to continue or cancel
17782     /// the request asynchronously. Return RV_CANCEL to cancel the request
17783     /// immediately.
17784     ///
17785     extern(System) cef_return_value_t function (
17786         cef_resource_request_handler_t* self,
17787         cef_browser_t* browser,
17788         cef_frame_t* frame,
17789         cef_request_t* request,
17790         cef_callback_t* callback) nothrow on_before_resource_load;
17791 
17792     ///
17793     /// Called on the IO thread before a resource is loaded. The |browser| and
17794     /// |frame| values represent the source of the request, and may be NULL for
17795     /// requests originating from service workers or cef_urlrequest_t. To allow
17796     /// the resource to load using the default network loader return NULL. To
17797     /// specify a handler for the resource return a cef_resource_handler_t object.
17798     /// The |request| object cannot not be modified in this callback.
17799     ///
17800     extern(System) cef_resource_handler_t* function (
17801         cef_resource_request_handler_t* self,
17802         cef_browser_t* browser,
17803         cef_frame_t* frame,
17804         cef_request_t* request) nothrow get_resource_handler;
17805 
17806     ///
17807     /// Called on the IO thread when a resource load is redirected. The |browser|
17808     /// and |frame| values represent the source of the request, and may be NULL
17809     /// for requests originating from service workers or cef_urlrequest_t. The
17810     /// |request| parameter will contain the old URL and other request-related
17811     /// information. The |response| parameter will contain the response that
17812     /// resulted in the redirect. The |new_url| parameter will contain the new URL
17813     /// and can be changed if desired. The |request| and |response| objects cannot
17814     /// be modified in this callback.
17815     ///
17816     extern(System) void function (
17817         cef_resource_request_handler_t* self,
17818         cef_browser_t* browser,
17819         cef_frame_t* frame,
17820         cef_request_t* request,
17821         cef_response_t* response,
17822         cef_string_t* new_url) nothrow on_resource_redirect;
17823 
17824     ///
17825     /// Called on the IO thread when a resource response is received. The
17826     /// |browser| and |frame| values represent the source of the request, and may
17827     /// be NULL for requests originating from service workers or cef_urlrequest_t.
17828     /// To allow the resource load to proceed without modification return false
17829     /// (0). To redirect or retry the resource load optionally modify |request|
17830     /// and return true (1). Modification of the request URL will be treated as a
17831     /// redirect. Requests handled using the default network loader cannot be
17832     /// redirected in this callback. The |response| object cannot be modified in
17833     /// this callback.
17834     ///
17835     /// WARNING: Redirecting using this function is deprecated. Use
17836     /// OnBeforeResourceLoad or GetResourceHandler to perform redirects.
17837     ///
17838     extern(System) int function (
17839         cef_resource_request_handler_t* self,
17840         cef_browser_t* browser,
17841         cef_frame_t* frame,
17842         cef_request_t* request,
17843         cef_response_t* response) nothrow on_resource_response;
17844 
17845     ///
17846     /// Called on the IO thread to optionally filter resource response content.
17847     /// The |browser| and |frame| values represent the source of the request, and
17848     /// may be NULL for requests originating from service workers or
17849     /// cef_urlrequest_t. |request| and |response| represent the request and
17850     /// response respectively and cannot be modified in this callback.
17851     ///
17852     extern(System) cef_response_filter_t* function (
17853         cef_resource_request_handler_t* self,
17854         cef_browser_t* browser,
17855         cef_frame_t* frame,
17856         cef_request_t* request,
17857         cef_response_t* response) nothrow get_resource_response_filter;
17858 
17859     ///
17860     /// Called on the IO thread when a resource load has completed. The |browser|
17861     /// and |frame| values represent the source of the request, and may be NULL
17862     /// for requests originating from service workers or cef_urlrequest_t.
17863     /// |request| and |response| represent the request and response respectively
17864     /// and cannot be modified in this callback. |status| indicates the load
17865     /// completion status. |received_content_length| is the number of response
17866     /// bytes actually read. This function will be called for all requests,
17867     /// including requests that are aborted due to CEF shutdown or destruction of
17868     /// the associated browser. In cases where the associated browser is destroyed
17869     /// this callback may arrive after the cef_life_span_handler_t::OnBeforeClose
17870     /// callback for that browser. The cef_frame_t::IsValid function can be used
17871     /// to test for this situation, and care should be taken not to call |browser|
17872     /// or |frame| functions that modify state (like LoadURL, SendProcessMessage,
17873     /// etc.) if the frame is invalid.
17874     ///
17875     extern(System) void function (
17876         cef_resource_request_handler_t* self,
17877         cef_browser_t* browser,
17878         cef_frame_t* frame,
17879         cef_request_t* request,
17880         cef_response_t* response,
17881         cef_urlrequest_status_t status,
17882         long received_content_length) nothrow on_resource_load_complete;
17883 
17884     ///
17885     /// Called on the IO thread to handle requests for URLs with an unknown
17886     /// protocol component. The |browser| and |frame| values represent the source
17887     /// of the request, and may be NULL for requests originating from service
17888     /// workers or cef_urlrequest_t. |request| cannot be modified in this
17889     /// callback. Set |allow_os_execution| to true (1) to attempt execution via
17890     /// the registered OS protocol handler, if any. SECURITY WARNING: YOU SHOULD
17891     /// USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL
17892     /// ANALYSIS BEFORE ALLOWING OS EXECUTION.
17893     ///
17894     extern(System) void function (
17895         cef_resource_request_handler_t* self,
17896         cef_browser_t* browser,
17897         cef_frame_t* frame,
17898         cef_request_t* request,
17899         int* allow_os_execution) nothrow on_protocol_execution;
17900 }
17901 
17902 
17903 
17904 ///
17905 /// Implement this structure to filter cookies that may be sent or received from
17906 /// resource requests. The functions of this structure will be called on the IO
17907 /// thread unless otherwise indicated.
17908 ///
17909 struct cef_cookie_access_filter_t
17910 {
17911     ///
17912     /// Base structure.
17913     ///
17914     cef_base_ref_counted_t base;
17915 
17916     ///
17917     /// Called on the IO thread before a resource request is sent. The |browser|
17918     /// and |frame| values represent the source of the request, and may be NULL
17919     /// for requests originating from service workers or cef_urlrequest_t.
17920     /// |request| cannot be modified in this callback. Return true (1) if the
17921     /// specified cookie can be sent with the request or false (0) otherwise.
17922     ///
17923     extern(System) int function (
17924         cef_cookie_access_filter_t* self,
17925         cef_browser_t* browser,
17926         cef_frame_t* frame,
17927         cef_request_t* request,
17928         const(cef_cookie_t)* cookie) nothrow can_send_cookie;
17929 
17930     ///
17931     /// Called on the IO thread after a resource response is received. The
17932     /// |browser| and |frame| values represent the source of the request, and may
17933     /// be NULL for requests originating from service workers or cef_urlrequest_t.
17934     /// |request| cannot be modified in this callback. Return true (1) if the
17935     /// specified cookie returned with the response can be saved or false (0)
17936     /// otherwise.
17937     ///
17938     extern(System) int function (
17939         cef_cookie_access_filter_t* self,
17940         cef_browser_t* browser,
17941         cef_frame_t* frame,
17942         cef_request_t* request,
17943         cef_response_t* response,
17944         const(cef_cookie_t)* cookie) nothrow can_save_cookie;
17945 }
17946 
17947 
17948 
17949 // CEF_INCLUDE_CAPI_CEF_RESOURCE_REQUEST_HANDLER_CAPI_H_
17950 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
17951 //
17952 // Redistribution and use in source and binary forms, with or without
17953 // modification, are permitted provided that the following conditions are
17954 // met:
17955 //
17956 //    * Redistributions of source code must retain the above copyright
17957 // notice, this list of conditions and the following disclaimer.
17958 //    * Redistributions in binary form must reproduce the above
17959 // copyright notice, this list of conditions and the following disclaimer
17960 // in the documentation and/or other materials provided with the
17961 // distribution.
17962 //    * Neither the name of Google Inc. nor the name Chromium Embedded
17963 // Framework nor the names of its contributors may be used to endorse
17964 // or promote products derived from this software without specific prior
17965 // written permission.
17966 //
17967 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17968 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17969 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17970 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17971 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17972 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17973 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17974 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17975 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17976 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17977 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17978 //
17979 // ---------------------------------------------------------------------------
17980 //
17981 // This file was generated by the CEF translator tool and should not edited
17982 // by hand. See the translator.README.txt file in the tools directory for
17983 // more information.
17984 //
17985 // $hash=7fbcd399c08dc39e33a7d0400a49f2e3a551bd02$
17986 //
17987 
17988 extern (C):
17989 
17990 ///
17991 /// Structure used to represent a web response. The functions of this structure
17992 /// may be called on any thread.
17993 ///
17994 struct cef_response_t
17995 {
17996     ///
17997     /// Base structure.
17998     ///
17999 
18000     ///
18001     /// Returns true (1) if this object is read-only.
18002     ///
18003 
18004     ///
18005     /// Get the response error code. Returns ERR_NONE if there was no error.
18006     ///
18007 
18008     ///
18009     /// Set the response error code. This can be used by custom scheme handlers to
18010     /// return errors during initial request processing.
18011     ///
18012 
18013     ///
18014     /// Get the response status code.
18015     ///
18016 
18017     ///
18018     /// Set the response status code.
18019     cef_base_ref_counted_t base;
18020     extern(System) int function (cef_response_t* self) nothrow is_read_only;
18021     extern(System) cef_errorcode_t function (cef_response_t* self) nothrow get_error;
18022     extern(System) void function (cef_response_t* self, cef_errorcode_t error) nothrow set_error;
18023     extern(System) int function (cef_response_t* self) nothrow get_status;
18024     ///
18025     extern(System) void function (cef_response_t* self, int status) nothrow set_status;
18026 
18027     ///
18028     /// Get the response status text.
18029     ///
18030     // The resulting string must be freed by calling cef_string_userfree_free().
18031     extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_status_text;
18032 
18033     ///
18034     /// Set the response status text.
18035     ///
18036     extern(System) void function (
18037         cef_response_t* self,
18038         const(cef_string_t)* statusText) nothrow set_status_text;
18039 
18040     ///
18041     /// Get the response mime type.
18042     ///
18043     // The resulting string must be freed by calling cef_string_userfree_free().
18044     extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_mime_type;
18045 
18046     ///
18047     /// Set the response mime type.
18048     ///
18049     extern(System) void function (
18050         cef_response_t* self,
18051         const(cef_string_t)* mimeType) nothrow set_mime_type;
18052 
18053     ///
18054     /// Get the response charset.
18055     ///
18056     // The resulting string must be freed by calling cef_string_userfree_free().
18057     extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_charset;
18058 
18059     ///
18060     /// Set the response charset.
18061     ///
18062     extern(System) void function (
18063         cef_response_t* self,
18064         const(cef_string_t)* charset) nothrow set_charset;
18065 
18066     ///
18067     /// Get the value for the specified response header field.
18068     ///
18069     // The resulting string must be freed by calling cef_string_userfree_free().
18070     extern(System) cef_string_userfree_t function (
18071         cef_response_t* self,
18072         const(cef_string_t)* name) nothrow get_header_by_name;
18073 
18074     ///
18075     /// Set the header |name| to |value|. If |overwrite| is true (1) any existing
18076     /// values will be replaced with the new value. If |overwrite| is false (0)
18077     /// any existing values will not be overwritten.
18078     ///
18079     extern(System) void function (
18080         cef_response_t* self,
18081         const(cef_string_t)* name,
18082         const(cef_string_t)* value,
18083         int overwrite) nothrow set_header_by_name;
18084 
18085     ///
18086     /// Get all response header fields.
18087     ///
18088     extern(System) void function (
18089         cef_response_t* self,
18090         cef_string_multimap_t headerMap) nothrow get_header_map;
18091 
18092     ///
18093     /// Set all response header fields.
18094     ///
18095     extern(System) void function (
18096         cef_response_t* self,
18097         cef_string_multimap_t headerMap) nothrow set_header_map;
18098 
18099     ///
18100     /// Get the resolved URL after redirects or changed as a result of HSTS.
18101     ///
18102     // The resulting string must be freed by calling cef_string_userfree_free().
18103     extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_url;
18104 
18105     ///
18106     /// Set the resolved URL after redirects or changed as a result of HSTS.
18107     ///
18108     extern(System) void function (cef_response_t* self, const(cef_string_t)* url) nothrow set_url;
18109 }
18110 
18111 
18112 
18113 ///
18114 /// Create a new cef_response_t object.
18115 ///
18116 cef_response_t* cef_response_create ();
18117 
18118 // CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_
18119 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
18120 //
18121 // Redistribution and use in source and binary forms, with or without
18122 // modification, are permitted provided that the following conditions are
18123 // met:
18124 //
18125 //    * Redistributions of source code must retain the above copyright
18126 // notice, this list of conditions and the following disclaimer.
18127 //    * Redistributions in binary form must reproduce the above
18128 // copyright notice, this list of conditions and the following disclaimer
18129 // in the documentation and/or other materials provided with the
18130 // distribution.
18131 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18132 // Framework nor the names of its contributors may be used to endorse
18133 // or promote products derived from this software without specific prior
18134 // written permission.
18135 //
18136 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18137 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18138 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18139 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18140 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18141 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18142 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18143 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18144 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18145 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18146 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18147 //
18148 // ---------------------------------------------------------------------------
18149 //
18150 // This file was generated by the CEF translator tool and should not edited
18151 // by hand. See the translator.README.txt file in the tools directory for
18152 // more information.
18153 //
18154 // $hash=2c9b14a86ee6777e4834eadcfc95802f2dedb11a$
18155 //
18156 
18157 extern (C):
18158 
18159 ///
18160 /// Implement this structure to filter resource response content. The functions
18161 /// of this structure will be called on the browser process IO thread.
18162 ///
18163 struct cef_response_filter_t
18164 {
18165     ///
18166     /// Base structure.
18167     ///
18168 
18169     ///
18170     /// Initialize the response filter. Will only be called a single time. The
18171     /// filter will not be installed if this function returns false (0).
18172     ///
18173 
18174     ///
18175     /// Called to filter a chunk of data. Expected usage is as follows:
18176     ///
18177     ///  1. Read input data from |data_in| and set |data_in_read| to the number of
18178     ///     bytes that were read up to a maximum of |data_in_size|. |data_in| will
18179     ///     be NULL if |data_in_size| is zero.
18180     ///  2. Write filtered output data to |data_out| and set |data_out_written| to
18181     ///     the number of bytes that were written up to a maximum of
18182     cef_base_ref_counted_t base;
18183     extern(System) int function (cef_response_filter_t* self) nothrow init_filter;
18184     ///     |data_out_size|. If no output data was written then all data must be
18185     ///     read from |data_in| (user must set |data_in_read| = |data_in_size|).
18186     ///  3. Return RESPONSE_FILTER_DONE if all output data was written or
18187     ///     RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending.
18188     ///
18189     /// This function will be called repeatedly until the input buffer has been
18190     /// fully read (user sets |data_in_read| = |data_in_size|) and there is no
18191     /// more input data to filter (the resource response is complete). This
18192     /// function may then be called an additional time with an NULL input buffer
18193     /// if the user filled the output buffer (set |data_out_written| =
18194     /// |data_out_size|) and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate
18195     /// that output data is still pending.
18196     ///
18197     /// Calls to this function will stop when one of the following conditions is
18198     /// met:
18199     ///
18200     ///  1. There is no more input data to filter (the resource response is
18201     ///     complete) and the user sets |data_out_written| = 0 or returns
18202     ///     RESPONSE_FILTER_DONE to indicate that all data has been written, or;
18203     ///  2. The user returns RESPONSE_FILTER_ERROR to indicate an error.
18204     ///
18205     /// Do not keep a reference to the buffers passed to this function.
18206     ///
18207     extern(System) cef_response_filter_status_t function (
18208         cef_response_filter_t* self,
18209         void* data_in,
18210         size_t data_in_size,
18211         size_t* data_in_read,
18212         void* data_out,
18213         size_t data_out_size,
18214         size_t* data_out_written) nothrow filter;
18215 }
18216 
18217 
18218 
18219 // CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_
18220 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
18221 //
18222 // Redistribution and use in source and binary forms, with or without
18223 // modification, are permitted provided that the following conditions are
18224 // met:
18225 //
18226 //    * Redistributions of source code must retain the above copyright
18227 // notice, this list of conditions and the following disclaimer.
18228 //    * Redistributions in binary form must reproduce the above
18229 // copyright notice, this list of conditions and the following disclaimer
18230 // in the documentation and/or other materials provided with the
18231 // distribution.
18232 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18233 // Framework nor the names of its contributors may be used to endorse
18234 // or promote products derived from this software without specific prior
18235 // written permission.
18236 //
18237 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18238 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18239 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18240 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18241 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18242 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18243 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18244 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18245 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18246 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18247 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18248 //
18249 // ---------------------------------------------------------------------------
18250 //
18251 // This file was generated by the CEF translator tool and should not edited
18252 // by hand. See the translator.README.txt file in the tools directory for
18253 // more information.
18254 //
18255 // $hash=6b6a7f754abc9ee5d6f775ba9eee802d3244faf5$
18256 //
18257 
18258 extern (C):
18259 
18260 ///
18261 /// Structure that manages custom scheme registrations.
18262 ///
18263 struct cef_scheme_registrar_t
18264 {
18265     ///
18266     /// Base structure.
18267     ///
18268 
18269     ///
18270     /// Register a custom scheme. This function should not be called for the
18271     /// built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.
18272     ///
18273     /// See cef_scheme_options_t for possible values for |options|.
18274     ///
18275     /// This function may be called on any thread. It should only be called once
18276     /// per unique |scheme_name| value. If |scheme_name| is already registered or
18277     /// if an error occurs this function will return false (0).
18278     ///
18279 
18280     ///
18281     /// Structure that creates cef_resource_handler_t instances for handling scheme
18282     /// requests. The functions of this structure will always be called on the IO
18283     cef_base_scoped_t base;
18284     extern(System) int function (
18285         cef_scheme_registrar_t* self,
18286         const(cef_string_t)* scheme_name,
18287         int options) nothrow add_custom_scheme;
18288 }
18289 
18290 
18291 /// thread.
18292 ///
18293 struct cef_scheme_handler_factory_t
18294 {
18295     ///
18296     /// Base structure.
18297     ///
18298     cef_base_ref_counted_t base;
18299 
18300     ///
18301     /// Return a new resource handler instance to handle the request or an NULL
18302     /// reference to allow default handling of the request. |browser| and |frame|
18303     /// will be the browser window and frame respectively that originated the
18304     /// request or NULL if the request did not originate from a browser window
18305     /// (for example, if the request came from cef_urlrequest_t). The |request|
18306     /// object passed to this function cannot be modified.
18307     ///
18308     extern(System) cef_resource_handler_t* function (
18309         cef_scheme_handler_factory_t* self,
18310         cef_browser_t* browser,
18311         cef_frame_t* frame,
18312         const(cef_string_t)* scheme_name,
18313         cef_request_t* request) nothrow create;
18314 }
18315 
18316 
18317 
18318 ///
18319 /// Register a scheme handler factory with the global request context. An NULL
18320 /// |domain_name| value for a standard scheme will cause the factory to match
18321 /// all domain names. The |domain_name| value will be ignored for non-standard
18322 /// schemes. If |scheme_name| is a built-in scheme and no handler is returned by
18323 /// |factory| then the built-in scheme handler factory will be called. If
18324 /// |scheme_name| is a custom scheme then you must also implement the
18325 /// cef_app_t::on_register_custom_schemes() function in all processes. This
18326 /// function may be called multiple times to change or remove the factory that
18327 /// matches the specified |scheme_name| and optional |domain_name|. Returns
18328 /// false (0) if an error occurs. This function may be called on any thread in
18329 /// the browser process. Using this function is equivalent to calling cef_reques
18330 /// t_context_t::cef_request_context_get_global_context()->register_scheme_handl
18331 /// er_factory().
18332 ///
18333 int cef_register_scheme_handler_factory (
18334     const(cef_string_t)* scheme_name,
18335     const(cef_string_t)* domain_name,
18336     cef_scheme_handler_factory_t* factory);
18337 
18338 ///
18339 /// Clear all scheme handler factories registered with the global request
18340 /// context. Returns false (0) on error. This function may be called on any
18341 /// thread in the browser process. Using this function is equivalent to calling
18342 /// cef_request_context_t::cef_request_context_get_global_context()->clear_schem
18343 /// e_handler_factories().
18344 ///
18345 int cef_clear_scheme_handler_factories ();
18346 
18347 // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_
18348 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
18349 //
18350 // Redistribution and use in source and binary forms, with or without
18351 // modification, are permitted provided that the following conditions are
18352 // met:
18353 //
18354 //    * Redistributions of source code must retain the above copyright
18355 // notice, this list of conditions and the following disclaimer.
18356 //    * Redistributions in binary form must reproduce the above
18357 // copyright notice, this list of conditions and the following disclaimer
18358 // in the documentation and/or other materials provided with the
18359 // distribution.
18360 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18361 // Framework nor the names of its contributors may be used to endorse
18362 // or promote products derived from this software without specific prior
18363 // written permission.
18364 //
18365 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18366 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18367 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18368 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18369 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18370 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18371 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18372 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18373 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18374 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18375 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18376 //
18377 // ---------------------------------------------------------------------------
18378 //
18379 // This file was generated by the CEF translator tool and should not edited
18380 // by hand. See the translator.README.txt file in the tools directory for
18381 // more information.
18382 //
18383 // $hash=d0563a0850f6118c850ab01c553142d2e890703e$
18384 //
18385 
18386 extern (C):
18387 
18388 ///
18389 /// Structure representing a server that supports HTTP and WebSocket requests.
18390 /// Server capacity is limited and is intended to handle only a small number of
18391 /// simultaneous connections (e.g. for communicating between applications on
18392 /// localhost). The functions of this structure are safe to call from any thread
18393 /// in the brower process unless otherwise indicated.
18394 ///
18395 struct cef_server_t
18396 {
18397     ///
18398     /// Base structure.
18399     ///
18400 
18401     ///
18402     /// Returns the task runner for the dedicated server thread.
18403     ///
18404 
18405     ///
18406     /// Stop the server and shut down the dedicated server thread. See
18407     /// cef_server_handler_t::OnServerCreated documentation for a description of
18408     cef_base_ref_counted_t base;
18409     extern(System) cef_task_runner_t* function (cef_server_t* self) nothrow get_task_runner;
18410     /// server lifespan.
18411     ///
18412     extern(System) void function (cef_server_t* self) nothrow shutdown;
18413 
18414     ///
18415     /// Returns true (1) if the server is currently running and accepting incoming
18416     /// connections. See cef_server_handler_t::OnServerCreated documentation for a
18417     /// description of server lifespan. This function must be called on the
18418     /// dedicated server thread.
18419     ///
18420     extern(System) int function (cef_server_t* self) nothrow is_running;
18421 
18422     ///
18423     /// Returns the server address including the port number.
18424     ///
18425     // The resulting string must be freed by calling cef_string_userfree_free().
18426     extern(System) cef_string_userfree_t function (cef_server_t* self) nothrow get_address;
18427 
18428     ///
18429     /// Returns true (1) if the server currently has a connection. This function
18430     /// must be called on the dedicated server thread.
18431     ///
18432     extern(System) int function (cef_server_t* self) nothrow has_connection;
18433 
18434     ///
18435     /// Returns true (1) if |connection_id| represents a valid connection. This
18436     /// function must be called on the dedicated server thread.
18437     ///
18438     extern(System) int function (cef_server_t* self, int connection_id) nothrow is_valid_connection;
18439 
18440     ///
18441     /// Send an HTTP 200 "OK" response to the connection identified by
18442     /// |connection_id|. |content_type| is the response content type (e.g.
18443     /// "text/html"), |data| is the response content, and |data_size| is the size
18444     /// of |data| in bytes. The contents of |data| will be copied. The connection
18445     /// will be closed automatically after the response is sent.
18446     ///
18447     extern(System) void function (
18448         cef_server_t* self,
18449         int connection_id,
18450         const(cef_string_t)* content_type,
18451         const(void)* data,
18452         size_t data_size) nothrow send_http200response;
18453 
18454     ///
18455     /// Send an HTTP 404 "Not Found" response to the connection identified by
18456     /// |connection_id|. The connection will be closed automatically after the
18457     /// response is sent.
18458     ///
18459     extern(System) void function (
18460         cef_server_t* self,
18461         int connection_id) nothrow send_http404response;
18462 
18463     ///
18464     /// Send an HTTP 500 "Internal Server Error" response to the connection
18465     /// identified by |connection_id|. |error_message| is the associated error
18466     /// message. The connection will be closed automatically after the response is
18467     /// sent.
18468     ///
18469     extern(System) void function (
18470         cef_server_t* self,
18471         int connection_id,
18472         const(cef_string_t)* error_message) nothrow send_http500response;
18473 
18474     ///
18475     /// Send a custom HTTP response to the connection identified by
18476     /// |connection_id|. |response_code| is the HTTP response code sent in the
18477     /// status line (e.g. 200), |content_type| is the response content type sent
18478     /// as the "Content-Type" header (e.g. "text/html"), |content_length| is the
18479     /// expected content length, and |extra_headers| is the map of extra response
18480     /// headers. If |content_length| is >= 0 then the "Content-Length" header will
18481     /// be sent. If |content_length| is 0 then no content is expected and the
18482     /// connection will be closed automatically after the response is sent. If
18483     /// |content_length| is < 0 then no "Content-Length" header will be sent and
18484     /// the client will continue reading until the connection is closed. Use the
18485     /// SendRawData function to send the content, if applicable, and call
18486     /// CloseConnection after all content has been sent.
18487     ///
18488     extern(System) void function (
18489         cef_server_t* self,
18490         int connection_id,
18491         int response_code,
18492         const(cef_string_t)* content_type,
18493         long content_length,
18494         cef_string_multimap_t extra_headers) nothrow send_http_response;
18495 
18496     ///
18497     /// Send raw data directly to the connection identified by |connection_id|.
18498     /// |data| is the raw data and |data_size| is the size of |data| in bytes. The
18499     /// contents of |data| will be copied. No validation of |data| is performed
18500     /// internally so the client should be careful to send the amount indicated by
18501     /// the "Content-Length" header, if specified. See SendHttpResponse
18502     /// documentation for intended usage.
18503     ///
18504     extern(System) void function (
18505         cef_server_t* self,
18506         int connection_id,
18507         const(void)* data,
18508         size_t data_size) nothrow send_raw_data;
18509 
18510     ///
18511     /// Close the connection identified by |connection_id|. See SendHttpResponse
18512     /// documentation for intended usage.
18513     ///
18514     extern(System) void function (cef_server_t* self, int connection_id) nothrow close_connection;
18515 
18516     ///
18517     /// Send a WebSocket message to the connection identified by |connection_id|.
18518     /// |data| is the response content and |data_size| is the size of |data| in
18519     /// bytes. The contents of |data| will be copied. See
18520     /// cef_server_handler_t::OnWebSocketRequest documentation for intended usage.
18521     ///
18522     extern(System) void function (
18523         cef_server_t* self,
18524         int connection_id,
18525         const(void)* data,
18526         size_t data_size) nothrow send_web_socket_message;
18527 }
18528 
18529 
18530 
18531 ///
18532 /// Create a new server that binds to |address| and |port|. |address| must be a
18533 /// valid IPv4 or IPv6 address (e.g. 127.0.0.1 or ::1) and |port| must be a port
18534 /// number outside of the reserved range (e.g. between 1025 and 65535 on most
18535 /// platforms). |backlog| is the maximum number of pending connections. A new
18536 /// thread will be created for each CreateServer call (the "dedicated server
18537 /// thread"). It is therefore recommended to use a different
18538 /// cef_server_handler_t instance for each CreateServer call to avoid thread
18539 /// safety issues in the cef_server_handler_t implementation. The
18540 /// cef_server_handler_t::OnServerCreated function will be called on the
18541 /// dedicated server thread to report success or failure. See
18542 /// cef_server_handler_t::OnServerCreated documentation for a description of
18543 /// server lifespan.
18544 ///
18545 void cef_server_create (
18546     const(cef_string_t)* address,
18547     ushort port,
18548     int backlog,
18549     cef_server_handler_t* handler);
18550 
18551 ///
18552 /// Implement this structure to handle HTTP server requests. A new thread will
18553 /// be created for each cef_server_t::CreateServer call (the "dedicated server
18554 /// thread"), and the functions of this structure will be called on that thread.
18555 /// It is therefore recommended to use a different cef_server_handler_t instance
18556 /// for each cef_server_t::CreateServer call to avoid thread safety issues in
18557 /// the cef_server_handler_t implementation.
18558 ///
18559 struct cef_server_handler_t
18560 {
18561     ///
18562     /// Base structure.
18563     ///
18564     cef_base_ref_counted_t base;
18565 
18566     ///
18567     /// Called when |server| is created. If the server was started successfully
18568     /// then cef_server_t::IsRunning will return true (1). The server will
18569     /// continue running until cef_server_t::Shutdown is called, after which time
18570     /// OnServerDestroyed will be called. If the server failed to start then
18571     /// OnServerDestroyed will be called immediately after this function returns.
18572     ///
18573     extern(System) void function (
18574         cef_server_handler_t* self,
18575         cef_server_t* server) nothrow on_server_created;
18576 
18577     ///
18578     /// Called when |server| is destroyed. The server thread will be stopped after
18579     /// this function returns. The client should release any references to
18580     /// |server| when this function is called. See OnServerCreated documentation
18581     /// for a description of server lifespan.
18582     ///
18583     extern(System) void function (
18584         cef_server_handler_t* self,
18585         cef_server_t* server) nothrow on_server_destroyed;
18586 
18587     ///
18588     /// Called when a client connects to |server|. |connection_id| uniquely
18589     /// identifies the connection. Each call to this function will have a matching
18590     /// call to OnClientDisconnected.
18591     ///
18592     extern(System) void function (
18593         cef_server_handler_t* self,
18594         cef_server_t* server,
18595         int connection_id) nothrow on_client_connected;
18596 
18597     ///
18598     /// Called when a client disconnects from |server|. |connection_id| uniquely
18599     /// identifies the connection. The client should release any data associated
18600     /// with |connection_id| when this function is called and |connection_id|
18601     /// should no longer be passed to cef_server_t functions. Disconnects can
18602     /// originate from either the client or the server. For example, the server
18603     /// will disconnect automatically after a cef_server_t::SendHttpXXXResponse
18604     /// function is called.
18605     ///
18606     extern(System) void function (
18607         cef_server_handler_t* self,
18608         cef_server_t* server,
18609         int connection_id) nothrow on_client_disconnected;
18610 
18611     ///
18612     /// Called when |server| receives an HTTP request. |connection_id| uniquely
18613     /// identifies the connection, |client_address| is the requesting IPv4 or IPv6
18614     /// client address including port number, and |request| contains the request
18615     /// contents (URL, function, headers and optional POST data). Call
18616     /// cef_server_t functions either synchronously or asynchronusly to send a
18617     /// response.
18618     ///
18619     extern(System) void function (
18620         cef_server_handler_t* self,
18621         cef_server_t* server,
18622         int connection_id,
18623         const(cef_string_t)* client_address,
18624         cef_request_t* request) nothrow on_http_request;
18625 
18626     ///
18627     /// Called when |server| receives a WebSocket request. |connection_id|
18628     /// uniquely identifies the connection, |client_address| is the requesting
18629     /// IPv4 or IPv6 client address including port number, and |request| contains
18630     /// the request contents (URL, function, headers and optional POST data).
18631     /// Execute |callback| either synchronously or asynchronously to accept or
18632     /// decline the WebSocket connection. If the request is accepted then
18633     /// OnWebSocketConnected will be called after the WebSocket has connected and
18634     /// incoming messages will be delivered to the OnWebSocketMessage callback. If
18635     /// the request is declined then the client will be disconnected and
18636     /// OnClientDisconnected will be called. Call the
18637     /// cef_server_t::SendWebSocketMessage function after receiving the
18638     /// OnWebSocketConnected callback to respond with WebSocket messages.
18639     ///
18640     extern(System) void function (
18641         cef_server_handler_t* self,
18642         cef_server_t* server,
18643         int connection_id,
18644         const(cef_string_t)* client_address,
18645         cef_request_t* request,
18646         cef_callback_t* callback) nothrow on_web_socket_request;
18647 
18648     ///
18649     /// Called after the client has accepted the WebSocket connection for |server|
18650     /// and |connection_id| via the OnWebSocketRequest callback. See
18651     /// OnWebSocketRequest documentation for intended usage.
18652     ///
18653     extern(System) void function (
18654         cef_server_handler_t* self,
18655         cef_server_t* server,
18656         int connection_id) nothrow on_web_socket_connected;
18657 
18658     ///
18659     /// Called when |server| receives an WebSocket message. |connection_id|
18660     /// uniquely identifies the connection, |data| is the message content and
18661     /// |data_size| is the size of |data| in bytes. Do not keep a reference to
18662     /// |data| outside of this function. See OnWebSocketRequest documentation for
18663     /// intended usage.
18664     ///
18665     extern(System) void function (
18666         cef_server_handler_t* self,
18667         cef_server_t* server,
18668         int connection_id,
18669         const(void)* data,
18670         size_t data_size) nothrow on_web_socket_message;
18671 }
18672 
18673 
18674 
18675 // CEF_INCLUDE_CAPI_CEF_SERVER_CAPI_H_
18676 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
18677 //
18678 // Redistribution and use in source and binary forms, with or without
18679 // modification, are permitted provided that the following conditions are
18680 // met:
18681 //
18682 //    * Redistributions of source code must retain the above copyright
18683 // notice, this list of conditions and the following disclaimer.
18684 //    * Redistributions in binary form must reproduce the above
18685 // copyright notice, this list of conditions and the following disclaimer
18686 // in the documentation and/or other materials provided with the
18687 // distribution.
18688 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18689 // Framework nor the names of its contributors may be used to endorse
18690 // or promote products derived from this software without specific prior
18691 // written permission.
18692 //
18693 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18694 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18695 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18696 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18697 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18698 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18699 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18700 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18701 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18702 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18703 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18704 //
18705 // ---------------------------------------------------------------------------
18706 //
18707 // This file was generated by the CEF translator tool and should not edited
18708 // by hand. See the translator.README.txt file in the tools directory for
18709 // more information.
18710 //
18711 // $hash=dfa2f2d57339e05592d7ee5f4c4c54dd0932cd94$
18712 //
18713 
18714 extern (C):
18715 
18716 ///
18717 /// Structure that wraps platform-dependent share memory region mapping.
18718 ///
18719 struct cef_shared_memory_region_t
18720 {
18721     ///
18722     /// Base structure.
18723     ///
18724 
18725     ///
18726     /// Returns true (1) if the mapping is valid.
18727     ///
18728 
18729     ///
18730     /// Returns the size of the mapping in bytes. Returns 0 for invalid instances.
18731     ///
18732 
18733     ///
18734     /// Returns the pointer to the memory. Returns nullptr for invalid instances.
18735     /// The returned pointer is only valid for the life span of this object.
18736     ///
18737 
18738     // CEF_INCLUDE_CAPI_CEF_SHARED_MEMORY_REGION_CAPI_H_
18739     cef_base_ref_counted_t base;
18740     extern(System) int function (cef_shared_memory_region_t* self) nothrow is_valid;
18741     extern(System) size_t function (cef_shared_memory_region_t* self) nothrow size;
18742     extern(System) void* function (cef_shared_memory_region_t* self) nothrow memory;
18743 }
18744 
18745 
18746 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
18747 //
18748 // Redistribution and use in source and binary forms, with or without
18749 // modification, are permitted provided that the following conditions are
18750 // met:
18751 //
18752 //    * Redistributions of source code must retain the above copyright
18753 // notice, this list of conditions and the following disclaimer.
18754 //    * Redistributions in binary form must reproduce the above
18755 // copyright notice, this list of conditions and the following disclaimer
18756 // in the documentation and/or other materials provided with the
18757 // distribution.
18758 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18759 // Framework nor the names of its contributors may be used to endorse
18760 // or promote products derived from this software without specific prior
18761 // written permission.
18762 //
18763 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18764 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18765 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18766 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18767 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18768 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18769 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18770 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18771 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18772 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18773 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18774 //
18775 // ---------------------------------------------------------------------------
18776 //
18777 // This file was generated by the CEF translator tool and should not edited
18778 // by hand. See the translator.README.txt file in the tools directory for
18779 // more information.
18780 //
18781 // $hash=1a2d8806256d04362f181350db2835850cb3e0ae$
18782 //
18783 
18784 extern (C):
18785 
18786 ///
18787 /// Structure that builds a cef_process_message_t containing a shared memory
18788 /// region. This structure is not thread-safe but may be used exclusively on a
18789 /// different thread from the one which constructed it.
18790 ///
18791 struct cef_shared_process_message_builder_t
18792 {
18793     ///
18794     /// Base structure.
18795     ///
18796 
18797     ///
18798     /// Returns true (1) if the builder is valid.
18799     ///
18800 
18801     ///
18802     /// Returns the size of the shared memory region in bytes. Returns 0 for
18803     /// invalid instances.
18804     ///
18805 
18806     ///
18807     /// Returns the pointer to the writable memory. Returns nullptr for invalid
18808     /// instances. The returned pointer is only valid for the life span of this
18809     cef_base_ref_counted_t base;
18810     extern(System) int function (cef_shared_process_message_builder_t* self) nothrow is_valid;
18811     extern(System) size_t function (cef_shared_process_message_builder_t* self) nothrow size;
18812     /// object.
18813     ///
18814     extern(System) void* function (cef_shared_process_message_builder_t* self) nothrow memory;
18815 
18816     ///
18817     /// Creates a new cef_process_message_t from the data provided to the builder.
18818     /// Returns nullptr for invalid instances. Invalidates the builder instance.
18819     ///
18820     extern(System) cef_process_message_t* function (
18821         cef_shared_process_message_builder_t* self) nothrow build;
18822 }
18823 
18824 
18825 
18826 ///
18827 /// Creates a new cef_shared_process_message_builder_t with the specified |name|
18828 /// and shared memory region of specified |byte_size|.
18829 ///
18830 cef_shared_process_message_builder_t* cef_shared_process_message_builder_create (
18831     const(cef_string_t)* name,
18832     size_t byte_size);
18833 
18834 // CEF_INCLUDE_CAPI_CEF_SHARED_PROCESS_MESSAGE_BUILDER_CAPI_H_
18835 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
18836 //
18837 // Redistribution and use in source and binary forms, with or without
18838 // modification, are permitted provided that the following conditions are
18839 // met:
18840 //
18841 //    * Redistributions of source code must retain the above copyright
18842 // notice, this list of conditions and the following disclaimer.
18843 //    * Redistributions in binary form must reproduce the above
18844 // copyright notice, this list of conditions and the following disclaimer
18845 // in the documentation and/or other materials provided with the
18846 // distribution.
18847 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18848 // Framework nor the names of its contributors may be used to endorse
18849 // or promote products derived from this software without specific prior
18850 // written permission.
18851 //
18852 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18853 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18854 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18855 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18856 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18857 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18858 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18859 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18860 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18861 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18862 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18863 //
18864 // ---------------------------------------------------------------------------
18865 //
18866 // This file was generated by the CEF translator tool and should not edited
18867 // by hand. See the translator.README.txt file in the tools directory for
18868 // more information.
18869 //
18870 // $hash=99dff3042ea437ecf5771eff9b3cab4c22190534$
18871 //
18872 
18873 extern (C):
18874 
18875 ///
18876 /// Structure representing SSL information.
18877 ///
18878 struct cef_sslinfo_t
18879 {
18880     ///
18881     /// Base structure.
18882     ///
18883 
18884     ///
18885     /// Returns a bitmask containing any and all problems verifying the server
18886     /// certificate.
18887     ///
18888 
18889     ///
18890     /// Returns the X.509 certificate.
18891     ///
18892 
18893     ///
18894     /// Returns true (1) if the certificate status represents an error.
18895     ///
18896 
18897     // CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
18898     cef_base_ref_counted_t base;
18899     extern(System) cef_cert_status_t function (cef_sslinfo_t* self) nothrow get_cert_status;
18900     extern(System) cef_x509certificate_t* function (
18901         cef_sslinfo_t* self) nothrow get_x509certificate;
18902 }
18903 
18904 
18905 int cef_is_cert_status_error (cef_cert_status_t status);
18906 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
18907 //
18908 // Redistribution and use in source and binary forms, with or without
18909 // modification, are permitted provided that the following conditions are
18910 // met:
18911 //
18912 //    * Redistributions of source code must retain the above copyright
18913 // notice, this list of conditions and the following disclaimer.
18914 //    * Redistributions in binary form must reproduce the above
18915 // copyright notice, this list of conditions and the following disclaimer
18916 // in the documentation and/or other materials provided with the
18917 // distribution.
18918 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18919 // Framework nor the names of its contributors may be used to endorse
18920 // or promote products derived from this software without specific prior
18921 // written permission.
18922 //
18923 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18924 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18925 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18926 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18927 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18928 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18929 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18930 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18931 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18932 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18933 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18934 //
18935 // ---------------------------------------------------------------------------
18936 //
18937 // This file was generated by the CEF translator tool and should not edited
18938 // by hand. See the translator.README.txt file in the tools directory for
18939 // more information.
18940 //
18941 // $hash=034a68aa4901cde95e12a7900cfc65753fbde345$
18942 //
18943 
18944 extern (C):
18945 
18946 ///
18947 /// Structure representing the SSL information for a navigation entry.
18948 ///
18949 struct cef_sslstatus_t
18950 {
18951     ///
18952     /// Base structure.
18953     ///
18954 
18955     ///
18956     /// Returns true (1) if the status is related to a secure SSL/TLS connection.
18957     ///
18958 
18959     ///
18960     /// Returns a bitmask containing any and all problems verifying the server
18961     /// certificate.
18962     ///
18963 
18964     ///
18965     /// Returns the SSL version used for the SSL connection.
18966     ///
18967 
18968     ///
18969     /// Returns a bitmask containing the page security content status.
18970     ///
18971     cef_base_ref_counted_t base;
18972     extern(System) int function (cef_sslstatus_t* self) nothrow is_secure_connection;
18973     extern(System) cef_cert_status_t function (cef_sslstatus_t* self) nothrow get_cert_status;
18974     extern(System) cef_ssl_version_t function (cef_sslstatus_t* self) nothrow get_sslversion;
18975     extern(System) cef_ssl_content_status_t function (
18976         cef_sslstatus_t* self) nothrow get_content_status;
18977 
18978     ///
18979     /// Returns the X.509 certificate.
18980     ///
18981     extern(System) cef_x509certificate_t* function (
18982         cef_sslstatus_t* self) nothrow get_x509certificate;
18983 }
18984 
18985 
18986 
18987 // CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_
18988 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
18989 //
18990 // Redistribution and use in source and binary forms, with or without
18991 // modification, are permitted provided that the following conditions are
18992 // met:
18993 //
18994 //    * Redistributions of source code must retain the above copyright
18995 // notice, this list of conditions and the following disclaimer.
18996 //    * Redistributions in binary form must reproduce the above
18997 // copyright notice, this list of conditions and the following disclaimer
18998 // in the documentation and/or other materials provided with the
18999 // distribution.
19000 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19001 // Framework nor the names of its contributors may be used to endorse
19002 // or promote products derived from this software without specific prior
19003 // written permission.
19004 //
19005 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19006 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19007 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19008 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19009 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19010 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19011 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19012 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19013 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19014 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19015 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19016 //
19017 // ---------------------------------------------------------------------------
19018 //
19019 // This file was generated by the CEF translator tool and should not edited
19020 // by hand. See the translator.README.txt file in the tools directory for
19021 // more information.
19022 //
19023 // $hash=5632e62f83aac60e62db9d7f308563fed3285c65$
19024 //
19025 
19026 extern (C):
19027 
19028 ///
19029 /// Structure the client can implement to provide a custom stream reader. The
19030 /// functions of this structure may be called on any thread.
19031 ///
19032 struct cef_read_handler_t
19033 {
19034     ///
19035     /// Base structure.
19036     ///
19037 
19038     ///
19039     /// Read raw binary data.
19040     ///
19041 
19042     ///
19043     /// Seek to the specified offset position. |whence| may be any one of
19044     /// SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on
19045     /// failure.
19046     ///
19047 
19048     ///
19049     /// Return the current offset position.
19050     ///
19051 
19052     ///
19053     cef_base_ref_counted_t base;
19054     extern(System) size_t function (
19055         cef_read_handler_t* self,
19056         void* ptr,
19057         size_t size,
19058         size_t n) nothrow read;
19059     extern(System) int function (cef_read_handler_t* self, long offset, int whence) nothrow seek;
19060     extern(System) long function (cef_read_handler_t* self) nothrow tell;
19061     /// Return non-zero if at end of file.
19062     ///
19063     extern(System) int function (cef_read_handler_t* self) nothrow eof;
19064 
19065     ///
19066     /// Return true (1) if this handler performs work like accessing the file
19067     /// system which may block. Used as a hint for determining the thread to
19068     /// access the handler from.
19069     ///
19070     extern(System) int function (cef_read_handler_t* self) nothrow may_block;
19071 }
19072 
19073 
19074 
19075 ///
19076 /// Structure used to read data from a stream. The functions of this structure
19077 /// may be called on any thread.
19078 ///
19079 struct cef_stream_reader_t
19080 {
19081     ///
19082     /// Base structure.
19083     ///
19084     cef_base_ref_counted_t base;
19085 
19086     ///
19087     /// Read raw binary data.
19088     ///
19089     extern(System) size_t function (
19090         cef_stream_reader_t* self,
19091         void* ptr,
19092         size_t size,
19093         size_t n) nothrow read;
19094 
19095     ///
19096     /// Seek to the specified offset position. |whence| may be any one of
19097     /// SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on
19098     /// failure.
19099     ///
19100     extern(System) int function (cef_stream_reader_t* self, long offset, int whence) nothrow seek;
19101 
19102     ///
19103     /// Return the current offset position.
19104     ///
19105     extern(System) long function (cef_stream_reader_t* self) nothrow tell;
19106 
19107     ///
19108     /// Return non-zero if at end of file.
19109     ///
19110     extern(System) int function (cef_stream_reader_t* self) nothrow eof;
19111 
19112     ///
19113     /// Returns true (1) if this reader performs work like accessing the file
19114     /// system which may block. Used as a hint for determining the thread to
19115     /// access the reader from.
19116     ///
19117     extern(System) int function (cef_stream_reader_t* self) nothrow may_block;
19118 }
19119 
19120 
19121 
19122 ///
19123 /// Create a new cef_stream_reader_t object from a file.
19124 ///
19125 cef_stream_reader_t* cef_stream_reader_create_for_file (
19126     const(cef_string_t)* fileName);
19127 
19128 ///
19129 /// Create a new cef_stream_reader_t object from data.
19130 ///
19131 cef_stream_reader_t* cef_stream_reader_create_for_data (
19132     void* data,
19133     size_t size);
19134 
19135 ///
19136 /// Create a new cef_stream_reader_t object from a custom handler.
19137 ///
19138 cef_stream_reader_t* cef_stream_reader_create_for_handler (
19139     cef_read_handler_t* handler);
19140 
19141 ///
19142 /// Structure the client can implement to provide a custom stream writer. The
19143 /// functions of this structure may be called on any thread.
19144 ///
19145 struct cef_write_handler_t
19146 {
19147     ///
19148     /// Base structure.
19149     ///
19150     cef_base_ref_counted_t base;
19151 
19152     ///
19153     /// Write raw binary data.
19154     ///
19155     extern(System) size_t function (
19156         cef_write_handler_t* self,
19157         const(void)* ptr,
19158         size_t size,
19159         size_t n) nothrow write;
19160 
19161     ///
19162     /// Seek to the specified offset position. |whence| may be any one of
19163     /// SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on
19164     /// failure.
19165     ///
19166     extern(System) int function (cef_write_handler_t* self, long offset, int whence) nothrow seek;
19167 
19168     ///
19169     /// Return the current offset position.
19170     ///
19171     extern(System) long function (cef_write_handler_t* self) nothrow tell;
19172 
19173     ///
19174     /// Flush the stream.
19175     ///
19176     extern(System) int function (cef_write_handler_t* self) nothrow flush;
19177 
19178     ///
19179     /// Return true (1) if this handler performs work like accessing the file
19180     /// system which may block. Used as a hint for determining the thread to
19181     /// access the handler from.
19182     ///
19183     extern(System) int function (cef_write_handler_t* self) nothrow may_block;
19184 }
19185 
19186 
19187 
19188 ///
19189 /// Structure used to write data to a stream. The functions of this structure
19190 /// may be called on any thread.
19191 ///
19192 struct cef_stream_writer_t
19193 {
19194     ///
19195     /// Base structure.
19196     ///
19197     cef_base_ref_counted_t base;
19198 
19199     ///
19200     /// Write raw binary data.
19201     ///
19202     extern(System) size_t function (
19203         cef_stream_writer_t* self,
19204         const(void)* ptr,
19205         size_t size,
19206         size_t n) nothrow write;
19207 
19208     ///
19209     /// Seek to the specified offset position. |whence| may be any one of
19210     /// SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on
19211     /// failure.
19212     ///
19213     extern(System) int function (cef_stream_writer_t* self, long offset, int whence) nothrow seek;
19214 
19215     ///
19216     /// Return the current offset position.
19217     ///
19218     extern(System) long function (cef_stream_writer_t* self) nothrow tell;
19219 
19220     ///
19221     /// Flush the stream.
19222     ///
19223     extern(System) int function (cef_stream_writer_t* self) nothrow flush;
19224 
19225     ///
19226     /// Returns true (1) if this writer performs work like accessing the file
19227     /// system which may block. Used as a hint for determining the thread to
19228     /// access the writer from.
19229     ///
19230     extern(System) int function (cef_stream_writer_t* self) nothrow may_block;
19231 }
19232 
19233 
19234 
19235 ///
19236 /// Create a new cef_stream_writer_t object for a file.
19237 ///
19238 cef_stream_writer_t* cef_stream_writer_create_for_file (
19239     const(cef_string_t)* fileName);
19240 
19241 ///
19242 /// Create a new cef_stream_writer_t object for a custom handler.
19243 ///
19244 cef_stream_writer_t* cef_stream_writer_create_for_handler (
19245     cef_write_handler_t* handler);
19246 
19247 // CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
19248 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
19249 //
19250 // Redistribution and use in source and binary forms, with or without
19251 // modification, are permitted provided that the following conditions are
19252 // met:
19253 //
19254 //    * Redistributions of source code must retain the above copyright
19255 // notice, this list of conditions and the following disclaimer.
19256 //    * Redistributions in binary form must reproduce the above
19257 // copyright notice, this list of conditions and the following disclaimer
19258 // in the documentation and/or other materials provided with the
19259 // distribution.
19260 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19261 // Framework nor the names of its contributors may be used to endorse
19262 // or promote products derived from this software without specific prior
19263 // written permission.
19264 //
19265 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19266 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19267 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19268 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19269 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19270 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19271 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19272 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19273 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19274 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19275 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19276 //
19277 // ---------------------------------------------------------------------------
19278 //
19279 // This file was generated by the CEF translator tool and should not edited
19280 // by hand. See the translator.README.txt file in the tools directory for
19281 // more information.
19282 //
19283 // $hash=6a22e5144c0254acb09656e6e41eedd05f2dd7e7$
19284 //
19285 
19286 extern (C):
19287 
19288 ///
19289 /// Implement this structure to receive string values asynchronously.
19290 ///
19291 struct cef_string_visitor_t
19292 {
19293     ///
19294     /// Base structure.
19295     ///
19296 
19297     ///
19298     /// Method that will be executed.
19299     ///
19300 
19301     // CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_
19302     cef_base_ref_counted_t base;
19303     extern(System) void function (
19304         cef_string_visitor_t* self,
19305         const(cef_string_t)* string) nothrow visit;
19306 }
19307 
19308 
19309 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
19310 //
19311 // Redistribution and use in source and binary forms, with or without
19312 // modification, are permitted provided that the following conditions are
19313 // met:
19314 //
19315 //    * Redistributions of source code must retain the above copyright
19316 // notice, this list of conditions and the following disclaimer.
19317 //    * Redistributions in binary form must reproduce the above
19318 // copyright notice, this list of conditions and the following disclaimer
19319 // in the documentation and/or other materials provided with the
19320 // distribution.
19321 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19322 // Framework nor the names of its contributors may be used to endorse
19323 // or promote products derived from this software without specific prior
19324 // written permission.
19325 //
19326 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19327 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19328 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19329 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19330 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19331 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19332 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19333 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19334 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19335 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19336 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19337 //
19338 // ---------------------------------------------------------------------------
19339 //
19340 // This file was generated by the CEF translator tool and should not edited
19341 // by hand. See the translator.README.txt file in the tools directory for
19342 // more information.
19343 //
19344 // $hash=fc609ce5aa3bc51e5cef1f9174dbfc5cff0a0689$
19345 //
19346 
19347 extern (C):
19348 
19349 ///
19350 /// Implement this structure for asynchronous task execution. If the task is
19351 /// posted successfully and if the associated message loop is still running then
19352 /// the execute() function will be called on the target thread. If the task
19353 /// fails to post then the task object may be destroyed on the source thread
19354 /// instead of the target thread. For this reason be cautious when performing
19355 /// work in the task object destructor.
19356 ///
19357 struct cef_task_t
19358 {
19359     ///
19360     /// Base structure.
19361     ///
19362 
19363     ///
19364     /// Method that will be executed on the target thread.
19365     ///
19366 
19367     ///
19368     /// Structure that asynchronously executes tasks on the associated thread. It is
19369     /// safe to call the functions of this structure on any thread.
19370     ///
19371     /// CEF maintains multiple internal threads that are used for handling different
19372     /// types of tasks in different processes. The cef_thread_id_t definitions in
19373     cef_base_ref_counted_t base;
19374     extern(System) void function (cef_task_t* self) nothrow execute;
19375 }
19376 
19377 
19378 /// cef_types.h list the common CEF threads. Task runners are also available for
19379 /// other CEF threads as appropriate (for example, V8 WebWorker threads).
19380 ///
19381 struct cef_task_runner_t
19382 {
19383     ///
19384     /// Base structure.
19385     ///
19386     cef_base_ref_counted_t base;
19387 
19388     ///
19389     /// Returns true (1) if this object is pointing to the same task runner as
19390     /// |that| object.
19391     ///
19392     extern(System) int function (cef_task_runner_t* self, cef_task_runner_t* that) nothrow is_same;
19393 
19394     ///
19395     /// Returns true (1) if this task runner belongs to the current thread.
19396     ///
19397     extern(System) int function (cef_task_runner_t* self) nothrow belongs_to_current_thread;
19398 
19399     ///
19400     /// Returns true (1) if this task runner is for the specified CEF thread.
19401     ///
19402     extern(System) int function (
19403         cef_task_runner_t* self,
19404         cef_thread_id_t threadId) nothrow belongs_to_thread;
19405 
19406     ///
19407     /// Post a task for execution on the thread associated with this task runner.
19408     /// Execution will occur asynchronously.
19409     ///
19410     extern(System) int function (cef_task_runner_t* self, cef_task_t* task) nothrow post_task;
19411 
19412     ///
19413     /// Post a task for delayed execution on the thread associated with this task
19414     /// runner. Execution will occur asynchronously. Delayed tasks are not
19415     /// supported on V8 WebWorker threads and will be executed without the
19416     /// specified delay.
19417     ///
19418     extern(System) int function (
19419         cef_task_runner_t* self,
19420         cef_task_t* task,
19421         long delay_ms) nothrow post_delayed_task;
19422 }
19423 
19424 
19425 
19426 ///
19427 /// Returns the task runner for the current thread. Only CEF threads will have
19428 /// task runners. An NULL reference will be returned if this function is called
19429 /// on an invalid thread.
19430 ///
19431 cef_task_runner_t* cef_task_runner_get_for_current_thread ();
19432 
19433 ///
19434 /// Returns the task runner for the specified CEF thread.
19435 ///
19436 cef_task_runner_t* cef_task_runner_get_for_thread (cef_thread_id_t threadId);
19437 
19438 ///
19439 /// Returns true (1) if called on the specified thread. Equivalent to using
19440 /// cef_task_runner_t::GetForThread(threadId)->belongs_to_current_thread().
19441 ///
19442 int cef_currently_on (cef_thread_id_t threadId);
19443 
19444 ///
19445 /// Post a task for execution on the specified thread. Equivalent to using
19446 /// cef_task_runner_t::GetForThread(threadId)->PostTask(task).
19447 ///
19448 int cef_post_task (cef_thread_id_t threadId, cef_task_t* task);
19449 
19450 ///
19451 /// Post a task for delayed execution on the specified thread. Equivalent to
19452 /// using cef_task_runner_t::GetForThread(threadId)->PostDelayedTask(task,
19453 /// delay_ms).
19454 ///
19455 int cef_post_delayed_task (
19456     cef_thread_id_t threadId,
19457     cef_task_t* task,
19458     long delay_ms);
19459 
19460 // CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_
19461 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
19462 //
19463 // Redistribution and use in source and binary forms, with or without
19464 // modification, are permitted provided that the following conditions are
19465 // met:
19466 //
19467 //    * Redistributions of source code must retain the above copyright
19468 // notice, this list of conditions and the following disclaimer.
19469 //    * Redistributions in binary form must reproduce the above
19470 // copyright notice, this list of conditions and the following disclaimer
19471 // in the documentation and/or other materials provided with the
19472 // distribution.
19473 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19474 // Framework nor the names of its contributors may be used to endorse
19475 // or promote products derived from this software without specific prior
19476 // written permission.
19477 //
19478 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19479 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19480 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19481 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19482 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19483 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19484 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19485 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19486 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19487 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19488 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19489 //
19490 // ---------------------------------------------------------------------------
19491 //
19492 // This file was generated by the CEF translator tool and should not edited
19493 // by hand. See the translator.README.txt file in the tools directory for
19494 // more information.
19495 //
19496 // $hash=b111114b291d3b91c526e6b3da5741959469ec4a$
19497 //
19498 
19499 extern (C):
19500 
19501 ///
19502 /// A simple thread abstraction that establishes a message loop on a new thread.
19503 /// The consumer uses cef_task_runner_t to execute code on the thread's message
19504 /// loop. The thread is terminated when the cef_thread_t object is destroyed or
19505 /// stop() is called. All pending tasks queued on the thread's message loop will
19506 /// run to completion before the thread is terminated. cef_thread_create() can
19507 /// be called on any valid CEF thread in either the browser or render process.
19508 /// This structure should only be used for tasks that require a dedicated
19509 /// thread. In most cases you can post tasks to an existing CEF thread instead
19510 /// of creating a new one; see cef_task.h for details.
19511 ///
19512 struct cef_thread_t
19513 {
19514     ///
19515     /// Base structure.
19516     ///
19517 
19518     ///
19519     /// Returns the cef_task_runner_t that will execute code on this thread's
19520     cef_base_ref_counted_t base;
19521     /// message loop. This function is safe to call from any thread.
19522     ///
19523     extern(System) cef_task_runner_t* function (cef_thread_t* self) nothrow get_task_runner;
19524 
19525     ///
19526     /// Returns the platform thread ID. It will return the same value after stop()
19527     /// is called. This function is safe to call from any thread.
19528     ///
19529     extern(System) cef_platform_thread_id_t function (
19530         cef_thread_t* self) nothrow get_platform_thread_id;
19531 
19532     ///
19533     /// Stop and join the thread. This function must be called from the same
19534     /// thread that called cef_thread_create(). Do not call this function if
19535     /// cef_thread_create() was called with a |stoppable| value of false (0).
19536     ///
19537     extern(System) void function (cef_thread_t* self) nothrow stop;
19538 
19539     ///
19540     /// Returns true (1) if the thread is currently running. This function must be
19541     /// called from the same thread that called cef_thread_create().
19542     ///
19543     extern(System) int function (cef_thread_t* self) nothrow is_running;
19544 }
19545 
19546 
19547 
19548 ///
19549 /// Create and start a new thread. This function does not block waiting for the
19550 /// thread to run initialization. |display_name| is the name that will be used
19551 /// to identify the thread. |priority| is the thread execution priority.
19552 /// |message_loop_type| indicates the set of asynchronous events that the thread
19553 /// can process. If |stoppable| is true (1) the thread will stopped and joined
19554 /// on destruction or when stop() is called; otherwise, the thread cannot be
19555 /// stopped and will be leaked on shutdown. On Windows the |com_init_mode| value
19556 /// specifies how COM will be initialized for the thread. If |com_init_mode| is
19557 /// set to COM_INIT_MODE_STA then |message_loop_type| must be set to ML_TYPE_UI.
19558 ///
19559 cef_thread_t* cef_thread_create (
19560     const(cef_string_t)* display_name,
19561     cef_thread_priority_t priority,
19562     cef_message_loop_type_t message_loop_type,
19563     int stoppable,
19564     cef_com_init_mode_t com_init_mode);
19565 
19566 // CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_
19567 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
19568 //
19569 // Redistribution and use in source and binary forms, with or without
19570 // modification, are permitted provided that the following conditions are
19571 // met:
19572 //
19573 //    * Redistributions of source code must retain the above copyright
19574 // notice, this list of conditions and the following disclaimer.
19575 //    * Redistributions in binary form must reproduce the above
19576 // copyright notice, this list of conditions and the following disclaimer
19577 // in the documentation and/or other materials provided with the
19578 // distribution.
19579 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19580 // Framework nor the names of its contributors may be used to endorse
19581 // or promote products derived from this software without specific prior
19582 // written permission.
19583 //
19584 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19585 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19586 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19587 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19588 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19589 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19590 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19591 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19592 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19593 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19594 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19595 //
19596 // ---------------------------------------------------------------------------
19597 //
19598 // This file was generated by the CEF translator tool and should not edited
19599 // by hand. See the translator.README.txt file in the tools directory for
19600 // more information.
19601 //
19602 // $hash=28e2d2d86dffdfdad0f275a444656a0638b44d0e$
19603 //
19604 
19605 extern (C):
19606 
19607 ///
19608 /// Implement this structure to receive notification when tracing has completed.
19609 /// The functions of this structure will be called on the browser process UI
19610 /// thread.
19611 ///
19612 struct cef_end_tracing_callback_t
19613 {
19614     ///
19615     /// Base structure.
19616     ///
19617 
19618     ///
19619     /// Called after all processes have sent their trace data. |tracing_file| is
19620     /// the path at which tracing data was written. The client is responsible for
19621     /// deleting |tracing_file|.
19622     ///
19623 
19624     ///
19625     /// Start tracing events on all processes. Tracing is initialized asynchronously
19626     /// and |callback| will be executed on the UI thread after initialization is
19627     /// complete.
19628     ///
19629     /// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is
19630     cef_base_ref_counted_t base;
19631     extern(System) void function (
19632         cef_end_tracing_callback_t* self,
19633         const(cef_string_t)* tracing_file) nothrow on_end_tracing_complete;
19634 }
19635 
19636  /// pending, CefBeginTracing will fail and return false (0).
19637 ///
19638 /// |categories| is a comma-delimited list of category wildcards. A category can
19639 /// have an optional '-' prefix to make it an excluded category. Having both
19640 /// included and excluded categories in the same list is not supported.
19641 ///
19642 /// Examples: - "test_MyTest*" - "test_MyTest*,test_OtherStuff" -
19643 /// "-excluded_category1,-excluded_category2"
19644 ///
19645 /// This function must be called on the browser process UI thread.
19646 ///
19647 int cef_begin_tracing (
19648     const(cef_string_t)* categories,
19649     cef_completion_callback_t* callback);
19650 
19651 ///
19652 /// Stop tracing events on all processes.
19653 ///
19654 /// This function will fail and return false (0) if a previous call to
19655 /// CefEndTracingAsync is already pending or if CefBeginTracing was not called.
19656 ///
19657 /// |tracing_file| is the path at which tracing data will be written and
19658 /// |callback| is the callback that will be executed once all processes have
19659 /// sent their trace data. If |tracing_file| is NULL a new temporary file path
19660 /// will be used. If |callback| is NULL no trace data will be written.
19661 ///
19662 /// This function must be called on the browser process UI thread.
19663 ///
19664 int cef_end_tracing (
19665     const(cef_string_t)* tracing_file,
19666     cef_end_tracing_callback_t* callback);
19667 
19668 ///
19669 /// Returns the current system trace time or, if none is defined, the current
19670 /// high-res time. Can be used by clients to synchronize with the time
19671 /// information in trace events.
19672 ///
19673 long cef_now_from_system_trace_time ();
19674 
19675 // CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_
19676 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
19677 //
19678 // Redistribution and use in source and binary forms, with or without
19679 // modification, are permitted provided that the following conditions are
19680 // met:
19681 //
19682 //    * Redistributions of source code must retain the above copyright
19683 // notice, this list of conditions and the following disclaimer.
19684 //    * Redistributions in binary form must reproduce the above
19685 // copyright notice, this list of conditions and the following disclaimer
19686 // in the documentation and/or other materials provided with the
19687 // distribution.
19688 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19689 // Framework nor the names of its contributors may be used to endorse
19690 // or promote products derived from this software without specific prior
19691 // written permission.
19692 //
19693 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19694 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19695 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19696 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19697 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19698 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19699 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19700 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19701 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19702 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19703 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19704 //
19705 // ---------------------------------------------------------------------------
19706 //
19707 // This file was generated by the CEF translator tool and should not edited
19708 // by hand. See the translator.README.txt file in the tools directory for
19709 // more information.
19710 //
19711 // $hash=b038ad859f1dad2d8ba63589da118898350b309c$
19712 //
19713 
19714 extern (C):
19715 
19716 ///
19717 /// Structure used to make a URL request. URL requests are not associated with a
19718 /// browser instance so no cef_client_t callbacks will be executed. URL requests
19719 /// can be created on any valid CEF thread in either the browser or render
19720 /// process. Once created the functions of the URL request object must be
19721 /// accessed on the same thread that created it.
19722 ///
19723 struct cef_urlrequest_t
19724 {
19725     ///
19726     /// Base structure.
19727     ///
19728 
19729     ///
19730     /// Returns the request object used to create this URL request. The returned
19731     /// object is read-only and should not be modified.
19732     ///
19733     cef_base_ref_counted_t base;
19734     extern(System) cef_request_t* function (cef_urlrequest_t* self) nothrow get_request;
19735     ///
19736     /// Returns the client.
19737     ///
19738     extern(System) cef_urlrequest_client_t* function (cef_urlrequest_t* self) nothrow get_client;
19739 
19740     ///
19741     /// Returns the request status.
19742     ///
19743     extern(System) cef_urlrequest_status_t function (
19744         cef_urlrequest_t* self) nothrow get_request_status;
19745 
19746     ///
19747     /// Returns the request error if status is UR_CANCELED or UR_FAILED, or 0
19748     /// otherwise.
19749     ///
19750     extern(System) cef_errorcode_t function (cef_urlrequest_t* self) nothrow get_request_error;
19751 
19752     ///
19753     /// Returns the response, or NULL if no response information is available.
19754     /// Response information will only be available after the upload has
19755     /// completed. The returned object is read-only and should not be modified.
19756     ///
19757     extern(System) cef_response_t* function (cef_urlrequest_t* self) nothrow get_response;
19758 
19759     ///
19760     /// Returns true (1) if the response body was served from the cache. This
19761     /// includes responses for which revalidation was required.
19762     ///
19763     extern(System) int function (cef_urlrequest_t* self) nothrow response_was_cached;
19764 
19765     ///
19766     /// Cancel the request.
19767     ///
19768     extern(System) void function (cef_urlrequest_t* self) nothrow cancel;
19769 }
19770 
19771 
19772 
19773 ///
19774 /// Create a new URL request that is not associated with a specific browser or
19775 /// frame. Use cef_frame_t::CreateURLRequest instead if you want the request to
19776 /// have this association, in which case it may be handled differently (see
19777 /// documentation on that function). A request created with this function may
19778 /// only originate from the browser process, and will behave as follows:
19779 ///   - It may be intercepted by the client via CefResourceRequestHandler or
19780 ///     CefSchemeHandlerFactory.
19781 ///   - POST data may only contain only a single element of type PDE_TYPE_FILE
19782 ///     or PDE_TYPE_BYTES.
19783 ///   - If |request_context| is empty the global request context will be used.
19784 ///
19785 /// The |request| object will be marked as read-only after calling this
19786 /// function.
19787 ///
19788 cef_urlrequest_t* cef_urlrequest_create (
19789     cef_request_t* request,
19790     cef_urlrequest_client_t* client,
19791     cef_request_context_t* request_context);
19792 
19793 ///
19794 /// Structure that should be implemented by the cef_urlrequest_t client. The
19795 /// functions of this structure will be called on the same thread that created
19796 /// the request unless otherwise documented.
19797 ///
19798 struct cef_urlrequest_client_t
19799 {
19800     ///
19801     /// Base structure.
19802     ///
19803     cef_base_ref_counted_t base;
19804 
19805     ///
19806     /// Notifies the client that the request has completed. Use the
19807     /// cef_urlrequest_t::GetRequestStatus function to determine if the request
19808     /// was successful or not.
19809     ///
19810     extern(System) void function (
19811         cef_urlrequest_client_t* self,
19812         cef_urlrequest_t* request) nothrow on_request_complete;
19813 
19814     ///
19815     /// Notifies the client of upload progress. |current| denotes the number of
19816     /// bytes sent so far and |total| is the total size of uploading data (or -1
19817     /// if chunked upload is enabled). This function will only be called if the
19818     /// UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
19819     ///
19820     extern(System) void function (
19821         cef_urlrequest_client_t* self,
19822         cef_urlrequest_t* request,
19823         long current,
19824         long total) nothrow on_upload_progress;
19825 
19826     ///
19827     /// Notifies the client of download progress. |current| denotes the number of
19828     /// bytes received up to the call and |total| is the expected total size of
19829     /// the response (or -1 if not determined).
19830     ///
19831     extern(System) void function (
19832         cef_urlrequest_client_t* self,
19833         cef_urlrequest_t* request,
19834         long current,
19835         long total) nothrow on_download_progress;
19836 
19837     ///
19838     /// Called when some part of the response is read. |data| contains the current
19839     /// bytes received since the last call. This function will not be called if
19840     /// the UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
19841     ///
19842     extern(System) void function (
19843         cef_urlrequest_client_t* self,
19844         cef_urlrequest_t* request,
19845         const(void)* data,
19846         size_t data_length) nothrow on_download_data;
19847 
19848     ///
19849     /// Called on the IO thread when the browser needs credentials from the user.
19850     /// |isProxy| indicates whether the host is a proxy server. |host| contains
19851     /// the hostname and |port| contains the port number. Return true (1) to
19852     /// continue the request and call cef_auth_callback_t::cont() when the
19853     /// authentication information is available. If the request has an associated
19854     /// browser/frame then returning false (0) will result in a call to
19855     /// GetAuthCredentials on the cef_request_handler_t associated with that
19856     /// browser, if any. Otherwise, returning false (0) will cancel the request
19857     /// immediately. This function will only be called for requests initiated from
19858     /// the browser process.
19859     ///
19860     extern(System) int function (
19861         cef_urlrequest_client_t* self,
19862         int isProxy,
19863         const(cef_string_t)* host,
19864         int port,
19865         const(cef_string_t)* realm,
19866         const(cef_string_t)* scheme,
19867         cef_auth_callback_t* callback) nothrow get_auth_credentials;
19868 }
19869 
19870 
19871 
19872 // CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_
19873 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
19874 //
19875 // Redistribution and use in source and binary forms, with or without
19876 // modification, are permitted provided that the following conditions are
19877 // met:
19878 //
19879 //    * Redistributions of source code must retain the above copyright
19880 // notice, this list of conditions and the following disclaimer.
19881 //    * Redistributions in binary form must reproduce the above
19882 // copyright notice, this list of conditions and the following disclaimer
19883 // in the documentation and/or other materials provided with the
19884 // distribution.
19885 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19886 // Framework nor the names of its contributors may be used to endorse
19887 // or promote products derived from this software without specific prior
19888 // written permission.
19889 //
19890 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19891 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19892 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19893 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19894 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19895 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19896 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19897 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19898 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19899 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19900 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19901 //
19902 // ---------------------------------------------------------------------------
19903 //
19904 // This file was generated by the CEF translator tool and should not edited
19905 // by hand. See the translator.README.txt file in the tools directory for
19906 // more information.
19907 //
19908 // $hash=865ca5bff4a0867d0c25cb41bd2aa808cf3fddbd$
19909 //
19910 
19911 extern (C):
19912 
19913 ///
19914 /// Structure representing a V8 context handle. V8 handles can only be accessed
19915 /// from the thread on which they are created. Valid threads for creating a V8
19916 /// handle include the render process main thread (TID_RENDERER) and WebWorker
19917 /// threads. A task runner for posting tasks on the associated thread can be
19918 /// retrieved via the cef_v8context_t::get_task_runner() function.
19919 ///
19920 struct cef_v8context_t
19921 {
19922     ///
19923     /// Base structure.
19924     ///
19925 
19926     ///
19927     /// Returns the task runner associated with this context. V8 handles can only
19928     /// be accessed from the thread on which they are created. This function can
19929     /// be called on any render process thread.
19930     cef_base_ref_counted_t base;
19931     ///
19932     extern(System) cef_task_runner_t* function (cef_v8context_t* self) nothrow get_task_runner;
19933 
19934     ///
19935     /// Returns true (1) if the underlying handle is valid and it can be accessed
19936     /// on the current thread. Do not call any other functions if this function
19937     /// returns false (0).
19938     ///
19939     extern(System) int function (cef_v8context_t* self) nothrow is_valid;
19940 
19941     ///
19942     /// Returns the browser for this context. This function will return an NULL
19943     /// reference for WebWorker contexts.
19944     ///
19945     extern(System) cef_browser_t* function (cef_v8context_t* self) nothrow get_browser;
19946 
19947     ///
19948     /// Returns the frame for this context. This function will return an NULL
19949     /// reference for WebWorker contexts.
19950     ///
19951     extern(System) cef_frame_t* function (cef_v8context_t* self) nothrow get_frame;
19952 
19953     ///
19954     /// Returns the global object for this context. The context must be entered
19955     /// before calling this function.
19956     ///
19957     extern(System) cef_v8value_t* function (cef_v8context_t* self) nothrow get_global;
19958 
19959     ///
19960     /// Enter this context. A context must be explicitly entered before creating a
19961     /// V8 Object, Array, Function or Date asynchronously. exit() must be called
19962     /// the same number of times as enter() before releasing this context. V8
19963     /// objects belong to the context in which they are created. Returns true (1)
19964     /// if the scope was entered successfully.
19965     ///
19966     extern(System) int function (cef_v8context_t* self) nothrow enter;
19967 
19968     ///
19969     /// Exit this context. Call this function only after calling enter(). Returns
19970     /// true (1) if the scope was exited successfully.
19971     ///
19972     extern(System) int function (cef_v8context_t* self) nothrow exit;
19973 
19974     ///
19975     /// Returns true (1) if this object is pointing to the same handle as |that|
19976     /// object.
19977     ///
19978     extern(System) int function (cef_v8context_t* self, cef_v8context_t* that) nothrow is_same;
19979 
19980     ///
19981     /// Execute a string of JavaScript code in this V8 context. The |script_url|
19982     /// parameter is the URL where the script in question can be found, if any.
19983     /// The |start_line| parameter is the base line number to use for error
19984     /// reporting. On success |retval| will be set to the return value, if any,
19985     /// and the function will return true (1). On failure |exception| will be set
19986     /// to the exception, if any, and the function will return false (0).
19987     ///
19988     extern(System) int function (
19989         cef_v8context_t* self,
19990         const(cef_string_t)* code,
19991         const(cef_string_t)* script_url,
19992         int start_line,
19993         cef_v8value_t** retval,
19994         cef_v8exception_t** exception) nothrow eval;
19995 }
19996 
19997 
19998 
19999 ///
20000 /// Returns the current (top) context object in the V8 context stack.
20001 ///
20002 cef_v8context_t* cef_v8context_get_current_context ();
20003 
20004 ///
20005 /// Returns the entered (bottom) context object in the V8 context stack.
20006 ///
20007 cef_v8context_t* cef_v8context_get_entered_context ();
20008 
20009 ///
20010 /// Returns true (1) if V8 is currently inside a context.
20011 ///
20012 int cef_v8context_in_context ();
20013 
20014 ///
20015 /// Structure that should be implemented to handle V8 function calls. The
20016 /// functions of this structure will be called on the thread associated with the
20017 /// V8 function.
20018 ///
20019 struct cef_v8handler_t
20020 {
20021     ///
20022     /// Base structure.
20023     ///
20024     cef_base_ref_counted_t base;
20025 
20026     ///
20027     /// Handle execution of the function identified by |name|. |object| is the
20028     /// receiver ('this' object) of the function. |arguments| is the list of
20029     /// arguments passed to the function. If execution succeeds set |retval| to
20030     /// the function return value. If execution fails set |exception| to the
20031     /// exception that will be thrown. Return true (1) if execution was handled.
20032     ///
20033     extern(System) int function (
20034         cef_v8handler_t* self,
20035         const(cef_string_t)* name,
20036         cef_v8value_t* object,
20037         size_t argumentsCount,
20038         cef_v8value_t** arguments,
20039         cef_v8value_t** retval,
20040         cef_string_t* exception) nothrow execute;
20041 }
20042 
20043 
20044 
20045 ///
20046 /// Structure that should be implemented to handle V8 accessor calls. Accessor
20047 /// identifiers are registered by calling cef_v8value_t::set_value(). The
20048 /// functions of this structure will be called on the thread associated with the
20049 /// V8 accessor.
20050 ///
20051 struct cef_v8accessor_t
20052 {
20053     ///
20054     /// Base structure.
20055     ///
20056     cef_base_ref_counted_t base;
20057 
20058     ///
20059     /// Handle retrieval the accessor value identified by |name|. |object| is the
20060     /// receiver ('this' object) of the accessor. If retrieval succeeds set
20061     /// |retval| to the return value. If retrieval fails set |exception| to the
20062     /// exception that will be thrown. Return true (1) if accessor retrieval was
20063     /// handled.
20064     ///
20065     extern(System) int function (
20066         cef_v8accessor_t* self,
20067         const(cef_string_t)* name,
20068         cef_v8value_t* object,
20069         cef_v8value_t** retval,
20070         cef_string_t* exception) nothrow get;
20071 
20072     ///
20073     /// Handle assignment of the accessor value identified by |name|. |object| is
20074     /// the receiver ('this' object) of the accessor. |value| is the new value
20075     /// being assigned to the accessor. If assignment fails set |exception| to the
20076     /// exception that will be thrown. Return true (1) if accessor assignment was
20077     /// handled.
20078     ///
20079     extern(System) int function (
20080         cef_v8accessor_t* self,
20081         const(cef_string_t)* name,
20082         cef_v8value_t* object,
20083         cef_v8value_t* value,
20084         cef_string_t* exception) nothrow set;
20085 }
20086 
20087 
20088 
20089 ///
20090 /// Structure that should be implemented to handle V8 interceptor calls. The
20091 /// functions of this structure will be called on the thread associated with the
20092 /// V8 interceptor. Interceptor's named property handlers (with first argument
20093 /// of type CefString) are called when object is indexed by string. Indexed
20094 /// property handlers (with first argument of type int) are called when object
20095 /// is indexed by integer.
20096 ///
20097 struct cef_v8interceptor_t
20098 {
20099     ///
20100     /// Base structure.
20101     ///
20102     cef_base_ref_counted_t base;
20103 
20104     ///
20105     /// Handle retrieval of the interceptor value identified by |name|. |object|
20106     /// is the receiver ('this' object) of the interceptor. If retrieval succeeds,
20107     /// set |retval| to the return value. If the requested value does not exist,
20108     /// don't set either |retval| or |exception|. If retrieval fails, set
20109     /// |exception| to the exception that will be thrown. If the property has an
20110     /// associated accessor, it will be called only if you don't set |retval|.
20111     /// Return true (1) if interceptor retrieval was handled, false (0) otherwise.
20112     ///
20113     extern(System) int function (
20114         cef_v8interceptor_t* self,
20115         const(cef_string_t)* name,
20116         cef_v8value_t* object,
20117         cef_v8value_t** retval,
20118         cef_string_t* exception) nothrow get_byname;
20119 
20120     ///
20121     /// Handle retrieval of the interceptor value identified by |index|. |object|
20122     /// is the receiver ('this' object) of the interceptor. If retrieval succeeds,
20123     /// set |retval| to the return value. If the requested value does not exist,
20124     /// don't set either |retval| or |exception|. If retrieval fails, set
20125     /// |exception| to the exception that will be thrown. Return true (1) if
20126     /// interceptor retrieval was handled, false (0) otherwise.
20127     ///
20128     extern(System) int function (
20129         cef_v8interceptor_t* self,
20130         int index,
20131         cef_v8value_t* object,
20132         cef_v8value_t** retval,
20133         cef_string_t* exception) nothrow get_byindex;
20134 
20135     ///
20136     /// Handle assignment of the interceptor value identified by |name|. |object|
20137     /// is the receiver ('this' object) of the interceptor. |value| is the new
20138     /// value being assigned to the interceptor. If assignment fails, set
20139     /// |exception| to the exception that will be thrown. This setter will always
20140     /// be called, even when the property has an associated accessor. Return true
20141     /// (1) if interceptor assignment was handled, false (0) otherwise.
20142     ///
20143     extern(System) int function (
20144         cef_v8interceptor_t* self,
20145         const(cef_string_t)* name,
20146         cef_v8value_t* object,
20147         cef_v8value_t* value,
20148         cef_string_t* exception) nothrow set_byname;
20149 
20150     ///
20151     /// Handle assignment of the interceptor value identified by |index|. |object|
20152     /// is the receiver ('this' object) of the interceptor. |value| is the new
20153     /// value being assigned to the interceptor. If assignment fails, set
20154     /// |exception| to the exception that will be thrown. Return true (1) if
20155     /// interceptor assignment was handled, false (0) otherwise.
20156     ///
20157     extern(System) int function (
20158         cef_v8interceptor_t* self,
20159         int index,
20160         cef_v8value_t* object,
20161         cef_v8value_t* value,
20162         cef_string_t* exception) nothrow set_byindex;
20163 }
20164 
20165 
20166 
20167 ///
20168 /// Structure representing a V8 exception. The functions of this structure may
20169 /// be called on any render process thread.
20170 ///
20171 struct cef_v8exception_t
20172 {
20173     ///
20174     /// Base structure.
20175     ///
20176     cef_base_ref_counted_t base;
20177 
20178     ///
20179     /// Returns the exception message.
20180     ///
20181     // The resulting string must be freed by calling cef_string_userfree_free().
20182     extern(System) cef_string_userfree_t function (cef_v8exception_t* self) nothrow get_message;
20183 
20184     ///
20185     /// Returns the line of source code that the exception occurred within.
20186     ///
20187     // The resulting string must be freed by calling cef_string_userfree_free().
20188     extern(System) cef_string_userfree_t function (cef_v8exception_t* self) nothrow get_source_line;
20189 
20190     ///
20191     /// Returns the resource name for the script from where the function causing
20192     /// the error originates.
20193     ///
20194     // The resulting string must be freed by calling cef_string_userfree_free().
20195     extern(System) cef_string_userfree_t function (
20196         cef_v8exception_t* self) nothrow get_script_resource_name;
20197 
20198     ///
20199     /// Returns the 1-based number of the line where the error occurred or 0 if
20200     /// the line number is unknown.
20201     ///
20202     extern(System) int function (cef_v8exception_t* self) nothrow get_line_number;
20203 
20204     ///
20205     /// Returns the index within the script of the first character where the error
20206     /// occurred.
20207     ///
20208     extern(System) int function (cef_v8exception_t* self) nothrow get_start_position;
20209 
20210     ///
20211     /// Returns the index within the script of the last character where the error
20212     /// occurred.
20213     ///
20214     extern(System) int function (cef_v8exception_t* self) nothrow get_end_position;
20215 
20216     ///
20217     /// Returns the index within the line of the first character where the error
20218     /// occurred.
20219     ///
20220     extern(System) int function (cef_v8exception_t* self) nothrow get_start_column;
20221 
20222     ///
20223     /// Returns the index within the line of the last character where the error
20224     /// occurred.
20225     ///
20226     extern(System) int function (cef_v8exception_t* self) nothrow get_end_column;
20227 }
20228 
20229 
20230 
20231 ///
20232 /// Callback structure that is passed to cef_v8value_t::CreateArrayBuffer.
20233 ///
20234 struct cef_v8array_buffer_release_callback_t
20235 {
20236     ///
20237     /// Base structure.
20238     ///
20239     cef_base_ref_counted_t base;
20240 
20241     ///
20242     /// Called to release |buffer| when the ArrayBuffer JS object is garbage
20243     /// collected. |buffer| is the value that was passed to CreateArrayBuffer
20244     /// along with this object.
20245     ///
20246     extern(System) void function (
20247         cef_v8array_buffer_release_callback_t* self,
20248         void* buffer) nothrow release_buffer;
20249 }
20250 
20251 
20252 
20253 ///
20254 /// Structure representing a V8 value handle. V8 handles can only be accessed
20255 /// from the thread on which they are created. Valid threads for creating a V8
20256 /// handle include the render process main thread (TID_RENDERER) and WebWorker
20257 /// threads. A task runner for posting tasks on the associated thread can be
20258 /// retrieved via the cef_v8context_t::get_task_runner() function.
20259 ///
20260 struct cef_v8value_t
20261 {
20262     ///
20263     /// Base structure.
20264     ///
20265     cef_base_ref_counted_t base;
20266 
20267     ///
20268     /// Returns true (1) if the underlying handle is valid and it can be accessed
20269     /// on the current thread. Do not call any other functions if this function
20270     /// returns false (0).
20271     ///
20272     extern(System) int function (cef_v8value_t* self) nothrow is_valid;
20273 
20274     ///
20275     /// True if the value type is undefined.
20276     ///
20277     extern(System) int function (cef_v8value_t* self) nothrow is_undefined;
20278 
20279     ///
20280     /// True if the value type is null.
20281     ///
20282     extern(System) int function (cef_v8value_t* self) nothrow is_null;
20283 
20284     ///
20285     /// True if the value type is bool.
20286     ///
20287     extern(System) int function (cef_v8value_t* self) nothrow is_bool;
20288 
20289     ///
20290     /// True if the value type is int.
20291     ///
20292     extern(System) int function (cef_v8value_t* self) nothrow is_int;
20293 
20294     ///
20295     /// True if the value type is unsigned int.
20296     ///
20297     extern(System) int function (cef_v8value_t* self) nothrow is_uint;
20298 
20299     ///
20300     /// True if the value type is double.
20301     ///
20302     extern(System) int function (cef_v8value_t* self) nothrow is_double;
20303 
20304     ///
20305     /// True if the value type is Date.
20306     ///
20307     extern(System) int function (cef_v8value_t* self) nothrow is_date;
20308 
20309     ///
20310     /// True if the value type is string.
20311     ///
20312     extern(System) int function (cef_v8value_t* self) nothrow is_string;
20313 
20314     ///
20315     /// True if the value type is object.
20316     ///
20317     extern(System) int function (cef_v8value_t* self) nothrow is_object;
20318 
20319     ///
20320     /// True if the value type is array.
20321     ///
20322     extern(System) int function (cef_v8value_t* self) nothrow is_array;
20323 
20324     ///
20325     /// True if the value type is an ArrayBuffer.
20326     ///
20327     extern(System) int function (cef_v8value_t* self) nothrow is_array_buffer;
20328 
20329     ///
20330     /// True if the value type is function.
20331     ///
20332     extern(System) int function (cef_v8value_t* self) nothrow is_function;
20333 
20334     ///
20335     /// True if the value type is a Promise.
20336     ///
20337     extern(System) int function (cef_v8value_t* self) nothrow is_promise;
20338 
20339     ///
20340     /// Returns true (1) if this object is pointing to the same handle as |that|
20341     /// object.
20342     ///
20343     extern(System) int function (cef_v8value_t* self, cef_v8value_t* that) nothrow is_same;
20344 
20345     ///
20346     /// Return a bool value.
20347     ///
20348     extern(System) int function (cef_v8value_t* self) nothrow get_bool_value;
20349 
20350     ///
20351     /// Return an int value.
20352     ///
20353     extern(System) int function (cef_v8value_t* self) nothrow get_int_value;
20354 
20355     ///
20356     /// Return an unsigned int value.
20357     ///
20358     extern(System) uint function (cef_v8value_t* self) nothrow get_uint_value;
20359 
20360     ///
20361     /// Return a double value.
20362     ///
20363     extern(System) double function (cef_v8value_t* self) nothrow get_double_value;
20364 
20365     ///
20366     /// Return a Date value.
20367     ///
20368     extern(System) cef_basetime_t function (cef_v8value_t* self) nothrow get_date_value;
20369 
20370     ///
20371     /// Return a string value.
20372     ///
20373     // The resulting string must be freed by calling cef_string_userfree_free().
20374     extern(System) cef_string_userfree_t function (cef_v8value_t* self) nothrow get_string_value;
20375 
20376     ///
20377     /// Returns true (1) if this is a user created object.
20378     ///
20379     extern(System) int function (cef_v8value_t* self) nothrow is_user_created;
20380 
20381     ///
20382     /// Returns true (1) if the last function call resulted in an exception. This
20383     /// attribute exists only in the scope of the current CEF value object.
20384     ///
20385     extern(System) int function (cef_v8value_t* self) nothrow has_exception;
20386 
20387     ///
20388     /// Returns the exception resulting from the last function call. This
20389     /// attribute exists only in the scope of the current CEF value object.
20390     ///
20391     extern(System) cef_v8exception_t* function (cef_v8value_t* self) nothrow get_exception;
20392 
20393     ///
20394     /// Clears the last exception and returns true (1) on success.
20395     ///
20396     extern(System) int function (cef_v8value_t* self) nothrow clear_exception;
20397 
20398     ///
20399     /// Returns true (1) if this object will re-throw future exceptions. This
20400     /// attribute exists only in the scope of the current CEF value object.
20401     ///
20402     extern(System) int function (cef_v8value_t* self) nothrow will_rethrow_exceptions;
20403 
20404     ///
20405     /// Set whether this object will re-throw future exceptions. By default
20406     /// exceptions are not re-thrown. If a exception is re-thrown the current
20407     /// context should not be accessed again until after the exception has been
20408     /// caught and not re-thrown. Returns true (1) on success. This attribute
20409     /// exists only in the scope of the current CEF value object.
20410     ///
20411     extern(System) int function (cef_v8value_t* self, int rethrow) nothrow set_rethrow_exceptions;
20412 
20413     ///
20414     /// Returns true (1) if the object has a value with the specified identifier.
20415     ///
20416     extern(System) int function (
20417         cef_v8value_t* self,
20418         const(cef_string_t)* key) nothrow has_value_bykey;
20419 
20420     ///
20421     /// Returns true (1) if the object has a value with the specified identifier.
20422     ///
20423     extern(System) int function (cef_v8value_t* self, int index) nothrow has_value_byindex;
20424 
20425     ///
20426     /// Deletes the value with the specified identifier and returns true (1) on
20427     /// success. Returns false (0) if this function is called incorrectly or an
20428     /// exception is thrown. For read-only and don't-delete values this function
20429     /// will return true (1) even though deletion failed.
20430     ///
20431     extern(System) int function (
20432         cef_v8value_t* self,
20433         const(cef_string_t)* key) nothrow delete_value_bykey;
20434 
20435     ///
20436     /// Deletes the value with the specified identifier and returns true (1) on
20437     /// success. Returns false (0) if this function is called incorrectly,
20438     /// deletion fails or an exception is thrown. For read-only and don't-delete
20439     /// values this function will return true (1) even though deletion failed.
20440     ///
20441     extern(System) int function (cef_v8value_t* self, int index) nothrow delete_value_byindex;
20442 
20443     ///
20444     /// Returns the value with the specified identifier on success. Returns NULL
20445     /// if this function is called incorrectly or an exception is thrown.
20446     ///
20447     extern(System) cef_v8value_t* function (
20448         cef_v8value_t* self,
20449         const(cef_string_t)* key) nothrow get_value_bykey;
20450 
20451     ///
20452     /// Returns the value with the specified identifier on success. Returns NULL
20453     /// if this function is called incorrectly or an exception is thrown.
20454     ///
20455     extern(System) cef_v8value_t* function (
20456         cef_v8value_t* self,
20457         int index) nothrow get_value_byindex;
20458 
20459     ///
20460     /// Associates a value with the specified identifier and returns true (1) on
20461     /// success. Returns false (0) if this function is called incorrectly or an
20462     /// exception is thrown. For read-only values this function will return true
20463     /// (1) even though assignment failed.
20464     ///
20465     extern(System) int function (
20466         cef_v8value_t* self,
20467         const(cef_string_t)* key,
20468         cef_v8value_t* value,
20469         cef_v8_propertyattribute_t attribute) nothrow set_value_bykey;
20470 
20471     ///
20472     /// Associates a value with the specified identifier and returns true (1) on
20473     /// success. Returns false (0) if this function is called incorrectly or an
20474     /// exception is thrown. For read-only values this function will return true
20475     /// (1) even though assignment failed.
20476     ///
20477     extern(System) int function (
20478         cef_v8value_t* self,
20479         int index,
20480         cef_v8value_t* value) nothrow set_value_byindex;
20481 
20482     ///
20483     /// Registers an identifier and returns true (1) on success. Access to the
20484     /// identifier will be forwarded to the cef_v8accessor_t instance passed to
20485     /// cef_v8value_t::cef_v8value_create_object(). Returns false (0) if this
20486     /// function is called incorrectly or an exception is thrown. For read-only
20487     /// values this function will return true (1) even though assignment failed.
20488     ///
20489     extern(System) int function (
20490         cef_v8value_t* self,
20491         const(cef_string_t)* key,
20492         cef_v8_accesscontrol_t settings,
20493         cef_v8_propertyattribute_t attribute) nothrow set_value_byaccessor;
20494 
20495     ///
20496     /// Read the keys for the object's values into the specified vector. Integer-
20497     /// based keys will also be returned as strings.
20498     ///
20499     extern(System) int function (cef_v8value_t* self, cef_string_list_t keys) nothrow get_keys;
20500 
20501     ///
20502     /// Sets the user data for this object and returns true (1) on success.
20503     /// Returns false (0) if this function is called incorrectly. This function
20504     /// can only be called on user created objects.
20505     ///
20506     extern(System) int function (
20507         cef_v8value_t* self,
20508         cef_base_ref_counted_t* user_data) nothrow set_user_data;
20509 
20510     ///
20511     /// Returns the user data, if any, assigned to this object.
20512     ///
20513     extern(System) cef_base_ref_counted_t* function (cef_v8value_t* self) nothrow get_user_data;
20514 
20515     ///
20516     /// Returns the amount of externally allocated memory registered for the
20517     /// object.
20518     ///
20519     extern(System) int function (cef_v8value_t* self) nothrow get_externally_allocated_memory;
20520 
20521     ///
20522     /// Adjusts the amount of registered external memory for the object. Used to
20523     /// give V8 an indication of the amount of externally allocated memory that is
20524     /// kept alive by JavaScript objects. V8 uses this information to decide when
20525     /// to perform global garbage collection. Each cef_v8value_t tracks the amount
20526     /// of external memory associated with it and automatically decreases the
20527     /// global total by the appropriate amount on its destruction.
20528     /// |change_in_bytes| specifies the number of bytes to adjust by. This
20529     /// function returns the number of bytes associated with the object after the
20530     /// adjustment. This function can only be called on user created objects.
20531     ///
20532     extern(System) int function (
20533         cef_v8value_t* self,
20534         int change_in_bytes) nothrow adjust_externally_allocated_memory;
20535 
20536     ///
20537     /// Returns the number of elements in the array.
20538     ///
20539     extern(System) int function (cef_v8value_t* self) nothrow get_array_length;
20540 
20541     ///
20542     /// Returns the ReleaseCallback object associated with the ArrayBuffer or NULL
20543     /// if the ArrayBuffer was not created with CreateArrayBuffer.
20544     ///
20545     extern(System) cef_v8array_buffer_release_callback_t* function (
20546         cef_v8value_t* self) nothrow get_array_buffer_release_callback;
20547 
20548     ///
20549     /// Prevent the ArrayBuffer from using it's memory block by setting the length
20550     /// to zero. This operation cannot be undone. If the ArrayBuffer was created
20551     /// with CreateArrayBuffer then
20552     /// cef_v8array_buffer_release_callback_t::ReleaseBuffer will be called to
20553     /// release the underlying buffer.
20554     ///
20555     extern(System) int function (cef_v8value_t* self) nothrow neuter_array_buffer;
20556 
20557     ///
20558     /// Returns the length (in bytes) of the ArrayBuffer.
20559     ///
20560     extern(System) size_t function (cef_v8value_t* self) nothrow get_array_buffer_byte_length;
20561 
20562     ///
20563     /// Returns a pointer to the beginning of the memory block for this
20564     /// ArrayBuffer backing store. The returned pointer is valid as long as the
20565     /// cef_v8value_t is alive.
20566     ///
20567     extern(System) void* function (cef_v8value_t* self) nothrow get_array_buffer_data;
20568 
20569     ///
20570     /// Returns the function name.
20571     ///
20572     // The resulting string must be freed by calling cef_string_userfree_free().
20573     extern(System) cef_string_userfree_t function (cef_v8value_t* self) nothrow get_function_name;
20574 
20575     ///
20576     /// Returns the function handler or NULL if not a CEF-created function.
20577     ///
20578     extern(System) cef_v8handler_t* function (cef_v8value_t* self) nothrow get_function_handler;
20579 
20580     ///
20581     /// Execute the function using the current V8 context. This function should
20582     /// only be called from within the scope of a cef_v8handler_t or
20583     /// cef_v8accessor_t callback, or in combination with calling enter() and
20584     /// exit() on a stored cef_v8context_t reference. |object| is the receiver
20585     /// ('this' object) of the function. If |object| is NULL the current context's
20586     /// global object will be used. |arguments| is the list of arguments that will
20587     /// be passed to the function. Returns the function return value on success.
20588     /// Returns NULL if this function is called incorrectly or an exception is
20589     /// thrown.
20590     ///
20591     extern(System) cef_v8value_t* function (
20592         cef_v8value_t* self,
20593         cef_v8value_t* object,
20594         size_t argumentsCount,
20595         cef_v8value_t** arguments) nothrow execute_function;
20596 
20597     ///
20598     /// Execute the function using the specified V8 context. |object| is the
20599     /// receiver ('this' object) of the function. If |object| is NULL the
20600     /// specified context's global object will be used. |arguments| is the list of
20601     /// arguments that will be passed to the function. Returns the function return
20602     /// value on success. Returns NULL if this function is called incorrectly or
20603     /// an exception is thrown.
20604     ///
20605     extern(System) cef_v8value_t* function (
20606         cef_v8value_t* self,
20607         cef_v8context_t* context,
20608         cef_v8value_t* object,
20609         size_t argumentsCount,
20610         cef_v8value_t** arguments) nothrow execute_function_with_context;
20611 
20612     ///
20613     /// Resolve the Promise using the current V8 context. This function should
20614     /// only be called from within the scope of a cef_v8handler_t or
20615     /// cef_v8accessor_t callback, or in combination with calling enter() and
20616     /// exit() on a stored cef_v8context_t reference. |arg| is the argument passed
20617     /// to the resolved promise. Returns true (1) on success. Returns false (0) if
20618     /// this function is called incorrectly or an exception is thrown.
20619     ///
20620     extern(System) int function (cef_v8value_t* self, cef_v8value_t* arg) nothrow resolve_promise;
20621 
20622     ///
20623     /// Reject the Promise using the current V8 context. This function should only
20624     /// be called from within the scope of a cef_v8handler_t or cef_v8accessor_t
20625     /// callback, or in combination with calling enter() and exit() on a stored
20626     /// cef_v8context_t reference. Returns true (1) on success. Returns false (0)
20627     /// if this function is called incorrectly or an exception is thrown.
20628     ///
20629     extern(System) int function (
20630         cef_v8value_t* self,
20631         const(cef_string_t)* errorMsg) nothrow reject_promise;
20632 }
20633 
20634 
20635 
20636 ///
20637 /// Create a new cef_v8value_t object of type undefined.
20638 ///
20639 cef_v8value_t* cef_v8value_create_undefined ();
20640 
20641 ///
20642 /// Create a new cef_v8value_t object of type null.
20643 ///
20644 cef_v8value_t* cef_v8value_create_null ();
20645 
20646 ///
20647 /// Create a new cef_v8value_t object of type bool.
20648 ///
20649 cef_v8value_t* cef_v8value_create_bool (int value);
20650 
20651 ///
20652 /// Create a new cef_v8value_t object of type int.
20653 ///
20654 cef_v8value_t* cef_v8value_create_int (int value);
20655 
20656 ///
20657 /// Create a new cef_v8value_t object of type unsigned int.
20658 ///
20659 cef_v8value_t* cef_v8value_create_uint (uint value);
20660 
20661 ///
20662 /// Create a new cef_v8value_t object of type double.
20663 ///
20664 cef_v8value_t* cef_v8value_create_double (double value);
20665 
20666 ///
20667 /// Create a new cef_v8value_t object of type Date. This function should only be
20668 /// called from within the scope of a cef_render_process_handler_t,
20669 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
20670 /// enter() and exit() on a stored cef_v8context_t reference.
20671 ///
20672 cef_v8value_t* cef_v8value_create_date (cef_basetime_t date);
20673 
20674 ///
20675 /// Create a new cef_v8value_t object of type string.
20676 ///
20677 cef_v8value_t* cef_v8value_create_string (const(cef_string_t)* value);
20678 
20679 ///
20680 /// Create a new cef_v8value_t object of type object with optional accessor
20681 /// and/or interceptor. This function should only be called from within the
20682 /// scope of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t
20683 /// callback, or in combination with calling enter() and exit() on a stored
20684 /// cef_v8context_t reference.
20685 ///
20686 cef_v8value_t* cef_v8value_create_object (
20687     cef_v8accessor_t* accessor,
20688     cef_v8interceptor_t* interceptor);
20689 
20690 ///
20691 /// Create a new cef_v8value_t object of type array with the specified |length|.
20692 /// If |length| is negative the returned array will have length 0. This function
20693 /// should only be called from within the scope of a
20694 /// cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback,
20695 /// or in combination with calling enter() and exit() on a stored
20696 /// cef_v8context_t reference.
20697 ///
20698 cef_v8value_t* cef_v8value_create_array (int length);
20699 
20700 ///
20701 /// Create a new cef_v8value_t object of type ArrayBuffer which wraps the
20702 /// provided |buffer| of size |length| bytes. The ArrayBuffer is externalized,
20703 /// meaning that it does not own |buffer|. The caller is responsible for freeing
20704 /// |buffer| when requested via a call to
20705 /// cef_v8array_buffer_release_callback_t::ReleaseBuffer. This function should
20706 /// only be called from within the scope of a cef_render_process_handler_t,
20707 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
20708 /// enter() and exit() on a stored cef_v8context_t reference.
20709 ///
20710 cef_v8value_t* cef_v8value_create_array_buffer (
20711     void* buffer,
20712     size_t length,
20713     cef_v8array_buffer_release_callback_t* release_callback);
20714 
20715 ///
20716 /// Create a new cef_v8value_t object of type function. This function should
20717 /// only be called from within the scope of a cef_render_process_handler_t,
20718 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
20719 /// enter() and exit() on a stored cef_v8context_t reference.
20720 ///
20721 extern(System) cef_v8value_t* cef_v8value_create_function (
20722     const(cef_string_t)* name,
20723     cef_v8handler_t* handler) nothrow;
20724 
20725 ///
20726 /// Create a new cef_v8value_t object of type Promise. This function should only
20727 /// be called from within the scope of a cef_render_process_handler_t,
20728 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
20729 /// enter() and exit() on a stored cef_v8context_t reference.
20730 ///
20731 cef_v8value_t* cef_v8value_create_promise ();
20732 
20733 ///
20734 /// Structure representing a V8 stack trace handle. V8 handles can only be
20735 /// accessed from the thread on which they are created. Valid threads for
20736 /// creating a V8 handle include the render process main thread (TID_RENDERER)
20737 /// and WebWorker threads. A task runner for posting tasks on the associated
20738 /// thread can be retrieved via the cef_v8context_t::get_task_runner() function.
20739 ///
20740 struct cef_v8stack_trace_t
20741 {
20742     ///
20743     /// Base structure.
20744     ///
20745     cef_base_ref_counted_t base;
20746 
20747     ///
20748     /// Returns true (1) if the underlying handle is valid and it can be accessed
20749     /// on the current thread. Do not call any other functions if this function
20750     /// returns false (0).
20751     ///
20752     extern(System) int function (cef_v8stack_trace_t* self) nothrow is_valid;
20753 
20754     ///
20755     /// Returns the number of stack frames.
20756     ///
20757     extern(System) int function (cef_v8stack_trace_t* self) nothrow get_frame_count;
20758 
20759     ///
20760     /// Returns the stack frame at the specified 0-based index.
20761     ///
20762     extern(System) cef_v8stack_frame_t* function (
20763         cef_v8stack_trace_t* self,
20764         int index) nothrow get_frame;
20765 }
20766 
20767 
20768 
20769 ///
20770 /// Returns the stack trace for the currently active context. |frame_limit| is
20771 /// the maximum number of frames that will be captured.
20772 ///
20773 cef_v8stack_trace_t* cef_v8stack_trace_get_current (int frame_limit);
20774 
20775 ///
20776 /// Structure representing a V8 stack frame handle. V8 handles can only be
20777 /// accessed from the thread on which they are created. Valid threads for
20778 /// creating a V8 handle include the render process main thread (TID_RENDERER)
20779 /// and WebWorker threads. A task runner for posting tasks on the associated
20780 /// thread can be retrieved via the cef_v8context_t::get_task_runner() function.
20781 ///
20782 struct cef_v8stack_frame_t
20783 {
20784     ///
20785     /// Base structure.
20786     ///
20787     cef_base_ref_counted_t base;
20788 
20789     ///
20790     /// Returns true (1) if the underlying handle is valid and it can be accessed
20791     /// on the current thread. Do not call any other functions if this function
20792     /// returns false (0).
20793     ///
20794     extern(System) int function (cef_v8stack_frame_t* self) nothrow is_valid;
20795 
20796     ///
20797     /// Returns the name of the resource script that contains the function.
20798     ///
20799     // The resulting string must be freed by calling cef_string_userfree_free().
20800     extern(System) cef_string_userfree_t function (
20801         cef_v8stack_frame_t* self) nothrow get_script_name;
20802 
20803     ///
20804     /// Returns the name of the resource script that contains the function or the
20805     /// sourceURL value if the script name is undefined and its source ends with a
20806     /// "//@ sourceURL=..." string.
20807     ///
20808     // The resulting string must be freed by calling cef_string_userfree_free().
20809     extern(System) cef_string_userfree_t function (
20810         cef_v8stack_frame_t* self) nothrow get_script_name_or_source_url;
20811 
20812     ///
20813     /// Returns the name of the function.
20814     ///
20815     // The resulting string must be freed by calling cef_string_userfree_free().
20816     extern(System) cef_string_userfree_t function (
20817         cef_v8stack_frame_t* self) nothrow get_function_name;
20818 
20819     ///
20820     /// Returns the 1-based line number for the function call or 0 if unknown.
20821     ///
20822     extern(System) int function (cef_v8stack_frame_t* self) nothrow get_line_number;
20823 
20824     ///
20825     /// Returns the 1-based column offset on the line for the function call or 0
20826     /// if unknown.
20827     ///
20828     extern(System) int function (cef_v8stack_frame_t* self) nothrow get_column;
20829 
20830     ///
20831     /// Returns true (1) if the function was compiled using eval().
20832     ///
20833     extern(System) int function (cef_v8stack_frame_t* self) nothrow is_eval;
20834 
20835     ///
20836     /// Returns true (1) if the function was called as a constructor via "new".
20837     ///
20838     extern(System) int function (cef_v8stack_frame_t* self) nothrow is_constructor;
20839 }
20840 
20841 
20842 
20843 ///
20844 /// Register a new V8 extension with the specified JavaScript extension code and
20845 /// handler. Functions implemented by the handler are prototyped using the
20846 /// keyword 'native'. The calling of a native function is restricted to the
20847 /// scope in which the prototype of the native function is defined. This
20848 /// function may only be called on the render process main thread.
20849 ///
20850 /// Example JavaScript extension code: <pre>
20851 ///   // create the 'example' global object if it doesn't already exist.
20852 ///   if (!example)
20853 ///     example = {};
20854 ///   // create the 'example.test' global object if it doesn't already exist.
20855 ///   if (!example.test)
20856 ///     example.test = {};
20857 ///   (function() {
20858 ///     // Define the function 'example.test.myfunction'.
20859 ///     example.test.myfunction = function() {
20860 ///       // Call CefV8Handler::Execute() with the function name 'MyFunction'
20861 ///       // and no arguments.
20862 ///       native function MyFunction();
20863 ///       return MyFunction();
20864 ///     };
20865 ///     // Define the getter function for parameter 'example.test.myparam'.
20866 ///     example.test.__defineGetter__('myparam', function() {
20867 ///       // Call CefV8Handler::Execute() with the function name 'GetMyParam'
20868 ///       // and no arguments.
20869 ///       native function GetMyParam();
20870 ///       return GetMyParam();
20871 ///     });
20872 ///     // Define the setter function for parameter 'example.test.myparam'.
20873 ///     example.test.__defineSetter__('myparam', function(b) {
20874 ///       // Call CefV8Handler::Execute() with the function name 'SetMyParam'
20875 ///       // and a single argument.
20876 ///       native function SetMyParam();
20877 ///       if(b) SetMyParam(b);
20878 ///     });
20879 ///
20880 ///     // Extension definitions can also contain normal JavaScript variables
20881 ///     // and functions.
20882 ///     var myint = 0;
20883 ///     example.test.increment = function() {
20884 ///       myint += 1;
20885 ///       return myint;
20886 ///     };
20887 ///   })();
20888 /// </pre>
20889 ///
20890 /// Example usage in the page: <pre>
20891 ///   // Call the function.
20892 ///   example.test.myfunction();
20893 ///   // Set the parameter.
20894 ///   example.test.myparam = value;
20895 ///   // Get the parameter.
20896 ///   value = example.test.myparam;
20897 ///   // Call another function.
20898 ///   example.test.increment();
20899 /// </pre>
20900 ///
20901 int cef_register_extension (
20902     const(cef_string_t)* extension_name,
20903     const(cef_string_t)* javascript_code,
20904     cef_v8handler_t* handler);
20905 
20906 // CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_
20907 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
20908 //
20909 // Redistribution and use in source and binary forms, with or without
20910 // modification, are permitted provided that the following conditions are
20911 // met:
20912 //
20913 //    * Redistributions of source code must retain the above copyright
20914 // notice, this list of conditions and the following disclaimer.
20915 //    * Redistributions in binary form must reproduce the above
20916 // copyright notice, this list of conditions and the following disclaimer
20917 // in the documentation and/or other materials provided with the
20918 // distribution.
20919 //    * Neither the name of Google Inc. nor the name Chromium Embedded
20920 // Framework nor the names of its contributors may be used to endorse
20921 // or promote products derived from this software without specific prior
20922 // written permission.
20923 //
20924 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20925 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20926 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20927 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20928 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20929 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20930 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20931 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20932 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20933 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20934 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20935 //
20936 // ---------------------------------------------------------------------------
20937 //
20938 // This file was generated by the CEF translator tool and should not edited
20939 // by hand. See the translator.README.txt file in the tools directory for
20940 // more information.
20941 //
20942 // $hash=7b8fee9d4a0530782ed62f5741820708f110e24e$
20943 //
20944 
20945 extern (C):
20946 
20947 ///
20948 /// Structure that wraps other data value types. Complex types (binary,
20949 /// dictionary and list) will be referenced but not owned by this object. Can be
20950 /// used on any process and thread.
20951 ///
20952 struct cef_value_t
20953 {
20954     ///
20955     /// Base structure.
20956     ///
20957 
20958     ///
20959     /// Returns true (1) if the underlying data is valid. This will always be true
20960     /// (1) for simple types. For complex types (binary, dictionary and list) the
20961     /// underlying data may become invalid if owned by another object (e.g. list
20962     /// or dictionary) and that other object is then modified or destroyed. This
20963     /// value object can be re-used by calling Set*() even if the underlying data
20964     /// is invalid.
20965     ///
20966 
20967     ///
20968     /// Returns true (1) if the underlying data is owned by another object.
20969     cef_base_ref_counted_t base;
20970     extern(System) int function (cef_value_t* self) nothrow is_valid;
20971     ///
20972     extern(System) int function (cef_value_t* self) nothrow is_owned;
20973 
20974     ///
20975     /// Returns true (1) if the underlying data is read-only. Some APIs may expose
20976     /// read-only objects.
20977     ///
20978     extern(System) int function (cef_value_t* self) nothrow is_read_only;
20979 
20980     ///
20981     /// Returns true (1) if this object and |that| object have the same underlying
20982     /// data. If true (1) modifications to this object will also affect |that|
20983     /// object and vice-versa.
20984     ///
20985     extern(System) int function (cef_value_t* self, cef_value_t* that) nothrow is_same;
20986 
20987     ///
20988     /// Returns true (1) if this object and |that| object have an equivalent
20989     /// underlying value but are not necessarily the same object.
20990     ///
20991     extern(System) int function (cef_value_t* self, cef_value_t* that) nothrow is_equal;
20992 
20993     ///
20994     /// Returns a copy of this object. The underlying data will also be copied.
20995     ///
20996     extern(System) cef_value_t* function (cef_value_t* self) nothrow copy;
20997 
20998     ///
20999     /// Returns the underlying value type.
21000     ///
21001     extern(System) cef_value_type_t function (cef_value_t* self) nothrow get_type;
21002 
21003     ///
21004     /// Returns the underlying value as type bool.
21005     ///
21006     extern(System) int function (cef_value_t* self) nothrow get_bool;
21007 
21008     ///
21009     /// Returns the underlying value as type int.
21010     ///
21011     extern(System) int function (cef_value_t* self) nothrow get_int;
21012 
21013     ///
21014     /// Returns the underlying value as type double.
21015     ///
21016     extern(System) double function (cef_value_t* self) nothrow get_double;
21017 
21018     ///
21019     /// Returns the underlying value as type string.
21020     ///
21021     // The resulting string must be freed by calling cef_string_userfree_free().
21022     extern(System) cef_string_userfree_t function (cef_value_t* self) nothrow get_string;
21023 
21024     ///
21025     /// Returns the underlying value as type binary. The returned reference may
21026     /// become invalid if the value is owned by another object or if ownership is
21027     /// transferred to another object in the future. To maintain a reference to
21028     /// the value after assigning ownership to a dictionary or list pass this
21029     /// object to the set_value() function instead of passing the returned
21030     /// reference to set_binary().
21031     ///
21032     extern(System) cef_binary_value_t* function (cef_value_t* self) nothrow get_binary;
21033 
21034     ///
21035     /// Returns the underlying value as type dictionary. The returned reference
21036     /// may become invalid if the value is owned by another object or if ownership
21037     /// is transferred to another object in the future. To maintain a reference to
21038     /// the value after assigning ownership to a dictionary or list pass this
21039     /// object to the set_value() function instead of passing the returned
21040     /// reference to set_dictionary().
21041     ///
21042     extern(System) cef_dictionary_value_t* function (cef_value_t* self) nothrow get_dictionary;
21043 
21044     ///
21045     /// Returns the underlying value as type list. The returned reference may
21046     /// become invalid if the value is owned by another object or if ownership is
21047     /// transferred to another object in the future. To maintain a reference to
21048     /// the value after assigning ownership to a dictionary or list pass this
21049     /// object to the set_value() function instead of passing the returned
21050     /// reference to set_list().
21051     ///
21052     extern(System) cef_list_value_t* function (cef_value_t* self) nothrow get_list;
21053 
21054     ///
21055     /// Sets the underlying value as type null. Returns true (1) if the value was
21056     /// set successfully.
21057     ///
21058     extern(System) int function (cef_value_t* self) nothrow set_null;
21059 
21060     ///
21061     /// Sets the underlying value as type bool. Returns true (1) if the value was
21062     /// set successfully.
21063     ///
21064     extern(System) int function (cef_value_t* self, int value) nothrow set_bool;
21065 
21066     ///
21067     /// Sets the underlying value as type int. Returns true (1) if the value was
21068     /// set successfully.
21069     ///
21070     extern(System) int function (cef_value_t* self, int value) nothrow set_int;
21071 
21072     ///
21073     /// Sets the underlying value as type double. Returns true (1) if the value
21074     /// was set successfully.
21075     ///
21076     extern(System) int function (cef_value_t* self, double value) nothrow set_double;
21077 
21078     ///
21079     /// Sets the underlying value as type string. Returns true (1) if the value
21080     /// was set successfully.
21081     ///
21082     extern(System) int function (cef_value_t* self, const(cef_string_t)* value) nothrow set_string;
21083 
21084     ///
21085     /// Sets the underlying value as type binary. Returns true (1) if the value
21086     /// was set successfully. This object keeps a reference to |value| and
21087     /// ownership of the underlying data remains unchanged.
21088     ///
21089     extern(System) int function (cef_value_t* self, cef_binary_value_t* value) nothrow set_binary;
21090 
21091     ///
21092     /// Sets the underlying value as type dict. Returns true (1) if the value was
21093     /// set successfully. This object keeps a reference to |value| and ownership
21094     /// of the underlying data remains unchanged.
21095     ///
21096     extern(System) int function (
21097         cef_value_t* self,
21098         cef_dictionary_value_t* value) nothrow set_dictionary;
21099 
21100     ///
21101     /// Sets the underlying value as type list. Returns true (1) if the value was
21102     /// set successfully. This object keeps a reference to |value| and ownership
21103     /// of the underlying data remains unchanged.
21104     ///
21105     extern(System) int function (cef_value_t* self, cef_list_value_t* value) nothrow set_list;
21106 }
21107 
21108 
21109 
21110 ///
21111 /// Creates a new object.
21112 ///
21113 cef_value_t* cef_value_create ();
21114 
21115 ///
21116 /// Structure representing a binary value. Can be used on any process and
21117 /// thread.
21118 ///
21119 struct cef_binary_value_t
21120 {
21121     ///
21122     /// Base structure.
21123     ///
21124     cef_base_ref_counted_t base;
21125 
21126     ///
21127     /// Returns true (1) if this object is valid. This object may become invalid
21128     /// if the underlying data is owned by another object (e.g. list or
21129     /// dictionary) and that other object is then modified or destroyed. Do not
21130     /// call any other functions if this function returns false (0).
21131     ///
21132     extern(System) int function (cef_binary_value_t* self) nothrow is_valid;
21133 
21134     ///
21135     /// Returns true (1) if this object is currently owned by another object.
21136     ///
21137     extern(System) int function (cef_binary_value_t* self) nothrow is_owned;
21138 
21139     ///
21140     /// Returns true (1) if this object and |that| object have the same underlying
21141     /// data.
21142     ///
21143     extern(System) int function (
21144         cef_binary_value_t* self,
21145         cef_binary_value_t* that) nothrow is_same;
21146 
21147     ///
21148     /// Returns true (1) if this object and |that| object have an equivalent
21149     /// underlying value but are not necessarily the same object.
21150     ///
21151     extern(System) int function (
21152         cef_binary_value_t* self,
21153         cef_binary_value_t* that) nothrow is_equal;
21154 
21155     ///
21156     /// Returns a copy of this object. The data in this object will also be
21157     /// copied.
21158     ///
21159     extern(System) cef_binary_value_t* function (cef_binary_value_t* self) nothrow copy;
21160 
21161     ///
21162     /// Returns a pointer to the beginning of the memory block. The returned
21163     /// pointer is valid as long as the cef_binary_value_t is alive.
21164     ///
21165     extern(System) const(void)* function (cef_binary_value_t* self) nothrow get_raw_data;
21166 
21167     ///
21168     /// Returns the data size.
21169     ///
21170     extern(System) size_t function (cef_binary_value_t* self) nothrow get_size;
21171 
21172     ///
21173     /// Read up to |buffer_size| number of bytes into |buffer|. Reading begins at
21174     /// the specified byte |data_offset|. Returns the number of bytes read.
21175     ///
21176     extern(System) size_t function (
21177         cef_binary_value_t* self,
21178         void* buffer,
21179         size_t buffer_size,
21180         size_t data_offset) nothrow get_data;
21181 }
21182 
21183 
21184 
21185 ///
21186 /// Creates a new object that is not owned by any other object. The specified
21187 /// |data| will be copied.
21188 ///
21189 cef_binary_value_t* cef_binary_value_create (
21190     const(void)* data,
21191     size_t data_size);
21192 
21193 ///
21194 /// Structure representing a dictionary value. Can be used on any process and
21195 /// thread.
21196 ///
21197 struct cef_dictionary_value_t
21198 {
21199     ///
21200     /// Base structure.
21201     ///
21202     cef_base_ref_counted_t base;
21203 
21204     ///
21205     /// Returns true (1) if this object is valid. This object may become invalid
21206     /// if the underlying data is owned by another object (e.g. list or
21207     /// dictionary) and that other object is then modified or destroyed. Do not
21208     /// call any other functions if this function returns false (0).
21209     ///
21210     extern(System) int function (cef_dictionary_value_t* self) nothrow is_valid;
21211 
21212     ///
21213     /// Returns true (1) if this object is currently owned by another object.
21214     ///
21215     extern(System) int function (cef_dictionary_value_t* self) nothrow is_owned;
21216 
21217     ///
21218     /// Returns true (1) if the values of this object are read-only. Some APIs may
21219     /// expose read-only objects.
21220     ///
21221     extern(System) int function (cef_dictionary_value_t* self) nothrow is_read_only;
21222 
21223     ///
21224     /// Returns true (1) if this object and |that| object have the same underlying
21225     /// data. If true (1) modifications to this object will also affect |that|
21226     /// object and vice-versa.
21227     ///
21228     extern(System) int function (
21229         cef_dictionary_value_t* self,
21230         cef_dictionary_value_t* that) nothrow is_same;
21231 
21232     ///
21233     /// Returns true (1) if this object and |that| object have an equivalent
21234     /// underlying value but are not necessarily the same object.
21235     ///
21236     extern(System) int function (
21237         cef_dictionary_value_t* self,
21238         cef_dictionary_value_t* that) nothrow is_equal;
21239 
21240     ///
21241     /// Returns a writable copy of this object. If |exclude_NULL_children| is true
21242     /// (1) any NULL dictionaries or lists will be excluded from the copy.
21243     ///
21244     extern(System) cef_dictionary_value_t* function (
21245         cef_dictionary_value_t* self,
21246         int exclude_empty_children) nothrow copy;
21247 
21248     ///
21249     /// Returns the number of values.
21250     ///
21251     extern(System) size_t function (cef_dictionary_value_t* self) nothrow get_size;
21252 
21253     ///
21254     /// Removes all values. Returns true (1) on success.
21255     ///
21256     extern(System) int function (cef_dictionary_value_t* self) nothrow clear;
21257 
21258     ///
21259     /// Returns true (1) if the current dictionary has a value for the given key.
21260     ///
21261     extern(System) int function (
21262         cef_dictionary_value_t* self,
21263         const(cef_string_t)* key) nothrow has_key;
21264 
21265     ///
21266     /// Reads all keys for this dictionary into the specified vector.
21267     ///
21268     extern(System) int function (
21269         cef_dictionary_value_t* self,
21270         cef_string_list_t keys) nothrow get_keys;
21271 
21272     ///
21273     /// Removes the value at the specified key. Returns true (1) is the value was
21274     /// removed successfully.
21275     ///
21276     extern(System) int function (
21277         cef_dictionary_value_t* self,
21278         const(cef_string_t)* key) nothrow remove;
21279 
21280     ///
21281     /// Returns the value type for the specified key.
21282     ///
21283     extern(System) cef_value_type_t function (
21284         cef_dictionary_value_t* self,
21285         const(cef_string_t)* key) nothrow get_type;
21286 
21287     ///
21288     /// Returns the value at the specified key. For simple types the returned
21289     /// value will copy existing data and modifications to the value will not
21290     /// modify this object. For complex types (binary, dictionary and list) the
21291     /// returned value will reference existing data and modifications to the value
21292     /// will modify this object.
21293     ///
21294     extern(System) cef_value_t* function (
21295         cef_dictionary_value_t* self,
21296         const(cef_string_t)* key) nothrow get_value;
21297 
21298     ///
21299     /// Returns the value at the specified key as type bool.
21300     ///
21301     extern(System) int function (
21302         cef_dictionary_value_t* self,
21303         const(cef_string_t)* key) nothrow get_bool;
21304 
21305     ///
21306     /// Returns the value at the specified key as type int.
21307     ///
21308     extern(System) int function (
21309         cef_dictionary_value_t* self,
21310         const(cef_string_t)* key) nothrow get_int;
21311 
21312     ///
21313     /// Returns the value at the specified key as type double.
21314     ///
21315     extern(System) double function (
21316         cef_dictionary_value_t* self,
21317         const(cef_string_t)* key) nothrow get_double;
21318 
21319     ///
21320     /// Returns the value at the specified key as type string.
21321     ///
21322     // The resulting string must be freed by calling cef_string_userfree_free().
21323     extern(System) cef_string_userfree_t function (
21324         cef_dictionary_value_t* self,
21325         const(cef_string_t)* key) nothrow get_string;
21326 
21327     ///
21328     /// Returns the value at the specified key as type binary. The returned value
21329     /// will reference existing data.
21330     ///
21331     extern(System) cef_binary_value_t* function (
21332         cef_dictionary_value_t* self,
21333         const(cef_string_t)* key) nothrow get_binary;
21334 
21335     ///
21336     /// Returns the value at the specified key as type dictionary. The returned
21337     /// value will reference existing data and modifications to the value will
21338     /// modify this object.
21339     ///
21340     extern(System) cef_dictionary_value_t* function (
21341         cef_dictionary_value_t* self,
21342         const(cef_string_t)* key) nothrow get_dictionary;
21343 
21344     ///
21345     /// Returns the value at the specified key as type list. The returned value
21346     /// will reference existing data and modifications to the value will modify
21347     /// this object.
21348     ///
21349     extern(System) cef_list_value_t* function (
21350         cef_dictionary_value_t* self,
21351         const(cef_string_t)* key) nothrow get_list;
21352 
21353     ///
21354     /// Sets the value at the specified key. Returns true (1) if the value was set
21355     /// successfully. If |value| represents simple data then the underlying data
21356     /// will be copied and modifications to |value| will not modify this object.
21357     /// If |value| represents complex data (binary, dictionary or list) then the
21358     /// underlying data will be referenced and modifications to |value| will
21359     /// modify this object.
21360     ///
21361     extern(System) int function (
21362         cef_dictionary_value_t* self,
21363         const(cef_string_t)* key,
21364         cef_value_t* value) nothrow set_value;
21365 
21366     ///
21367     /// Sets the value at the specified key as type null. Returns true (1) if the
21368     /// value was set successfully.
21369     ///
21370     extern(System) int function (
21371         cef_dictionary_value_t* self,
21372         const(cef_string_t)* key) nothrow set_null;
21373 
21374     ///
21375     /// Sets the value at the specified key as type bool. Returns true (1) if the
21376     /// value was set successfully.
21377     ///
21378     extern(System) int function (
21379         cef_dictionary_value_t* self,
21380         const(cef_string_t)* key,
21381         int value) nothrow set_bool;
21382 
21383     ///
21384     /// Sets the value at the specified key as type int. Returns true (1) if the
21385     /// value was set successfully.
21386     ///
21387     extern(System) int function (
21388         cef_dictionary_value_t* self,
21389         const(cef_string_t)* key,
21390         int value) nothrow set_int;
21391 
21392     ///
21393     /// Sets the value at the specified key as type double. Returns true (1) if
21394     /// the value was set successfully.
21395     ///
21396     extern(System) int function (
21397         cef_dictionary_value_t* self,
21398         const(cef_string_t)* key,
21399         double value) nothrow set_double;
21400 
21401     ///
21402     /// Sets the value at the specified key as type string. Returns true (1) if
21403     /// the value was set successfully.
21404     ///
21405     extern(System) int function (
21406         cef_dictionary_value_t* self,
21407         const(cef_string_t)* key,
21408         const(cef_string_t)* value) nothrow set_string;
21409 
21410     ///
21411     /// Sets the value at the specified key as type binary. Returns true (1) if
21412     /// the value was set successfully. If |value| is currently owned by another
21413     /// object then the value will be copied and the |value| reference will not
21414     /// change. Otherwise, ownership will be transferred to this object and the
21415     /// |value| reference will be invalidated.
21416     ///
21417     extern(System) int function (
21418         cef_dictionary_value_t* self,
21419         const(cef_string_t)* key,
21420         cef_binary_value_t* value) nothrow set_binary;
21421 
21422     ///
21423     /// Sets the value at the specified key as type dict. Returns true (1) if the
21424     /// value was set successfully. If |value| is currently owned by another
21425     /// object then the value will be copied and the |value| reference will not
21426     /// change. Otherwise, ownership will be transferred to this object and the
21427     /// |value| reference will be invalidated.
21428     ///
21429     extern(System) int function (
21430         cef_dictionary_value_t* self,
21431         const(cef_string_t)* key,
21432         cef_dictionary_value_t* value) nothrow set_dictionary;
21433 
21434     ///
21435     /// Sets the value at the specified key as type list. Returns true (1) if the
21436     /// value was set successfully. If |value| is currently owned by another
21437     /// object then the value will be copied and the |value| reference will not
21438     /// change. Otherwise, ownership will be transferred to this object and the
21439     /// |value| reference will be invalidated.
21440     ///
21441     extern(System) int function (
21442         cef_dictionary_value_t* self,
21443         const(cef_string_t)* key,
21444         cef_list_value_t* value) nothrow set_list;
21445 }
21446 
21447 
21448 
21449 ///
21450 /// Creates a new object that is not owned by any other object.
21451 ///
21452 cef_dictionary_value_t* cef_dictionary_value_create ();
21453 
21454 ///
21455 /// Structure representing a list value. Can be used on any process and thread.
21456 ///
21457 struct cef_list_value_t
21458 {
21459     ///
21460     /// Base structure.
21461     ///
21462     cef_base_ref_counted_t base;
21463 
21464     ///
21465     /// Returns true (1) if this object is valid. This object may become invalid
21466     /// if the underlying data is owned by another object (e.g. list or
21467     /// dictionary) and that other object is then modified or destroyed. Do not
21468     /// call any other functions if this function returns false (0).
21469     ///
21470     extern(System) int function (cef_list_value_t* self) nothrow is_valid;
21471 
21472     ///
21473     /// Returns true (1) if this object is currently owned by another object.
21474     ///
21475     extern(System) int function (cef_list_value_t* self) nothrow is_owned;
21476 
21477     ///
21478     /// Returns true (1) if the values of this object are read-only. Some APIs may
21479     /// expose read-only objects.
21480     ///
21481     extern(System) int function (cef_list_value_t* self) nothrow is_read_only;
21482 
21483     ///
21484     /// Returns true (1) if this object and |that| object have the same underlying
21485     /// data. If true (1) modifications to this object will also affect |that|
21486     /// object and vice-versa.
21487     ///
21488     extern(System) int function (cef_list_value_t* self, cef_list_value_t* that) nothrow is_same;
21489 
21490     ///
21491     /// Returns true (1) if this object and |that| object have an equivalent
21492     /// underlying value but are not necessarily the same object.
21493     ///
21494     extern(System) int function (cef_list_value_t* self, cef_list_value_t* that) nothrow is_equal;
21495 
21496     ///
21497     /// Returns a writable copy of this object.
21498     ///
21499     extern(System) cef_list_value_t* function (cef_list_value_t* self) nothrow copy;
21500 
21501     ///
21502     /// Sets the number of values. If the number of values is expanded all new
21503     /// value slots will default to type null. Returns true (1) on success.
21504     ///
21505     extern(System) int function (cef_list_value_t* self, size_t size) nothrow set_size;
21506 
21507     ///
21508     /// Returns the number of values.
21509     ///
21510     extern(System) size_t function (cef_list_value_t* self) nothrow get_size;
21511 
21512     ///
21513     /// Removes all values. Returns true (1) on success.
21514     ///
21515     extern(System) int function (cef_list_value_t* self) nothrow clear;
21516 
21517     ///
21518     /// Removes the value at the specified index.
21519     ///
21520     extern(System) int function (cef_list_value_t* self, size_t index) nothrow remove;
21521 
21522     ///
21523     /// Returns the value type at the specified index.
21524     ///
21525     extern(System) cef_value_type_t function (cef_list_value_t* self, size_t index) nothrow get_type;
21526 
21527     ///
21528     /// Returns the value at the specified index. For simple types the returned
21529     /// value will copy existing data and modifications to the value will not
21530     /// modify this object. For complex types (binary, dictionary and list) the
21531     /// returned value will reference existing data and modifications to the value
21532     /// will modify this object.
21533     ///
21534     extern(System) cef_value_t* function (cef_list_value_t* self, size_t index) nothrow get_value;
21535 
21536     ///
21537     /// Returns the value at the specified index as type bool.
21538     ///
21539     extern(System) int function (cef_list_value_t* self, size_t index) nothrow get_bool;
21540 
21541     ///
21542     /// Returns the value at the specified index as type int.
21543     ///
21544     extern(System) int function (cef_list_value_t* self, size_t index) nothrow get_int;
21545 
21546     ///
21547     /// Returns the value at the specified index as type double.
21548     ///
21549     extern(System) double function (cef_list_value_t* self, size_t index) nothrow get_double;
21550 
21551     ///
21552     /// Returns the value at the specified index as type string.
21553     ///
21554     // The resulting string must be freed by calling cef_string_userfree_free().
21555     extern(System) cef_string_userfree_t function (
21556         cef_list_value_t* self,
21557         size_t index) nothrow get_string;
21558 
21559     ///
21560     /// Returns the value at the specified index as type binary. The returned
21561     /// value will reference existing data.
21562     ///
21563     extern(System) cef_binary_value_t* function (
21564         cef_list_value_t* self,
21565         size_t index) nothrow get_binary;
21566 
21567     ///
21568     /// Returns the value at the specified index as type dictionary. The returned
21569     /// value will reference existing data and modifications to the value will
21570     /// modify this object.
21571     ///
21572     extern(System) cef_dictionary_value_t* function (
21573         cef_list_value_t* self,
21574         size_t index) nothrow get_dictionary;
21575 
21576     ///
21577     /// Returns the value at the specified index as type list. The returned value
21578     /// will reference existing data and modifications to the value will modify
21579     /// this object.
21580     ///
21581     extern(System) cef_list_value_t* function (
21582         cef_list_value_t* self,
21583         size_t index) nothrow get_list;
21584 
21585     ///
21586     /// Sets the value at the specified index. Returns true (1) if the value was
21587     /// set successfully. If |value| represents simple data then the underlying
21588     /// data will be copied and modifications to |value| will not modify this
21589     /// object. If |value| represents complex data (binary, dictionary or list)
21590     /// then the underlying data will be referenced and modifications to |value|
21591     /// will modify this object.
21592     ///
21593     extern(System) int function (
21594         cef_list_value_t* self,
21595         size_t index,
21596         cef_value_t* value) nothrow set_value;
21597 
21598     ///
21599     /// Sets the value at the specified index as type null. Returns true (1) if
21600     /// the value was set successfully.
21601     ///
21602     extern(System) int function (cef_list_value_t* self, size_t index) nothrow set_null;
21603 
21604     ///
21605     /// Sets the value at the specified index as type bool. Returns true (1) if
21606     /// the value was set successfully.
21607     ///
21608     extern(System) int function (cef_list_value_t* self, size_t index, int value) nothrow set_bool;
21609 
21610     ///
21611     /// Sets the value at the specified index as type int. Returns true (1) if the
21612     /// value was set successfully.
21613     ///
21614     extern(System) int function (cef_list_value_t* self, size_t index, int value) nothrow set_int;
21615 
21616     ///
21617     /// Sets the value at the specified index as type double. Returns true (1) if
21618     /// the value was set successfully.
21619     ///
21620     extern(System) int function (
21621         cef_list_value_t* self,
21622         size_t index,
21623         double value) nothrow set_double;
21624 
21625     ///
21626     /// Sets the value at the specified index as type string. Returns true (1) if
21627     /// the value was set successfully.
21628     ///
21629     extern(System) int function (
21630         cef_list_value_t* self,
21631         size_t index,
21632         const(cef_string_t)* value) nothrow set_string;
21633 
21634     ///
21635     /// Sets the value at the specified index as type binary. Returns true (1) if
21636     /// the value was set successfully. If |value| is currently owned by another
21637     /// object then the value will be copied and the |value| reference will not
21638     /// change. Otherwise, ownership will be transferred to this object and the
21639     /// |value| reference will be invalidated.
21640     ///
21641     extern(System) int function (
21642         cef_list_value_t* self,
21643         size_t index,
21644         cef_binary_value_t* value) nothrow set_binary;
21645 
21646     ///
21647     /// Sets the value at the specified index as type dict. Returns true (1) if
21648     /// the value was set successfully. If |value| is currently owned by another
21649     /// object then the value will be copied and the |value| reference will not
21650     /// change. Otherwise, ownership will be transferred to this object and the
21651     /// |value| reference will be invalidated.
21652     ///
21653     extern(System) int function (
21654         cef_list_value_t* self,
21655         size_t index,
21656         cef_dictionary_value_t* value) nothrow set_dictionary;
21657 
21658     ///
21659     /// Sets the value at the specified index as type list. Returns true (1) if
21660     /// the value was set successfully. If |value| is currently owned by another
21661     /// object then the value will be copied and the |value| reference will not
21662     /// change. Otherwise, ownership will be transferred to this object and the
21663     /// |value| reference will be invalidated.
21664     ///
21665     extern(System) int function (
21666         cef_list_value_t* self,
21667         size_t index,
21668         cef_list_value_t* value) nothrow set_list;
21669 }
21670 
21671 
21672 
21673 ///
21674 /// Creates a new object that is not owned by any other object.
21675 ///
21676 cef_list_value_t* cef_list_value_create ();
21677 
21678 // CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
21679 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
21680 //
21681 // Redistribution and use in source and binary forms, with or without
21682 // modification, are permitted provided that the following conditions are
21683 // met:
21684 //
21685 //    * Redistributions of source code must retain the above copyright
21686 // notice, this list of conditions and the following disclaimer.
21687 //    * Redistributions in binary form must reproduce the above
21688 // copyright notice, this list of conditions and the following disclaimer
21689 // in the documentation and/or other materials provided with the
21690 // distribution.
21691 //    * Neither the name of Google Inc. nor the name Chromium Embedded
21692 // Framework nor the names of its contributors may be used to endorse
21693 // or promote products derived from this software without specific prior
21694 // written permission.
21695 //
21696 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21697 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21698 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21699 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21700 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21701 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21702 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21703 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21704 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21705 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21706 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21707 //
21708 // ---------------------------------------------------------------------------
21709 //
21710 // This file was generated by the CEF translator tool and should not edited
21711 // by hand. See the translator.README.txt file in the tools directory for
21712 // more information.
21713 //
21714 // $hash=be3741396459ccf1337f319965ba1dc509142536$
21715 //
21716 
21717 extern (C):
21718 
21719 ///
21720 /// WaitableEvent is a thread synchronization tool that allows one thread to
21721 /// wait for another thread to finish some work. This is equivalent to using a
21722 /// Lock+ConditionVariable to protect a simple boolean value. However, using
21723 /// WaitableEvent in conjunction with a Lock to wait for a more complex state
21724 /// change (e.g., for an item to be added to a queue) is not recommended. In
21725 /// that case consider using a ConditionVariable instead of a WaitableEvent. It
21726 /// is safe to create and/or signal a WaitableEvent from any thread. Blocking on
21727 /// a WaitableEvent by calling the *wait() functions is not allowed on the
21728 /// browser process UI or IO threads.
21729 ///
21730 struct cef_waitable_event_t
21731 {
21732     ///
21733     /// Base structure.
21734     ///
21735 
21736     ///
21737     /// Put the event in the un-signaled state.
21738     ///
21739     cef_base_ref_counted_t base;
21740     extern(System) void function (cef_waitable_event_t* self) nothrow reset;
21741     ///
21742     /// Put the event in the signaled state. This causes any thread blocked on
21743     /// Wait to be woken up.
21744     ///
21745     extern(System) void function (cef_waitable_event_t* self) nothrow signal;
21746 
21747     ///
21748     /// Returns true (1) if the event is in the signaled state, else false (0). If
21749     /// the event was created with |automatic_reset| set to true (1) then calling
21750     /// this function will also cause a reset.
21751     ///
21752     extern(System) int function (cef_waitable_event_t* self) nothrow is_signaled;
21753 
21754     ///
21755     /// Wait indefinitely for the event to be signaled. This function will not
21756     /// return until after the call to signal() has completed. This function
21757     /// cannot be called on the browser process UI or IO threads.
21758     ///
21759     extern(System) void function (cef_waitable_event_t* self) nothrow wait;
21760 
21761     ///
21762     /// Wait up to |max_ms| milliseconds for the event to be signaled. Returns
21763     /// true (1) if the event was signaled. A return value of false (0) does not
21764     /// necessarily mean that |max_ms| was exceeded. This function will not return
21765     /// until after the call to signal() has completed. This function cannot be
21766     /// called on the browser process UI or IO threads.
21767     ///
21768     extern(System) int function (cef_waitable_event_t* self, long max_ms) nothrow timed_wait;
21769 }
21770 
21771 
21772 
21773 ///
21774 /// Create a new waitable event. If |automatic_reset| is true (1) then the event
21775 /// state is automatically reset to un-signaled after a single waiting thread
21776 /// has been released; otherwise, the state remains signaled until reset() is
21777 /// called manually. If |initially_signaled| is true (1) then the event will
21778 /// start in the signaled state.
21779 ///
21780 cef_waitable_event_t* cef_waitable_event_create (
21781     int automatic_reset,
21782     int initially_signaled);
21783 
21784 // CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_
21785 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
21786 //
21787 // Redistribution and use in source and binary forms, with or without
21788 // modification, are permitted provided that the following conditions are
21789 // met:
21790 //
21791 //    * Redistributions of source code must retain the above copyright
21792 // notice, this list of conditions and the following disclaimer.
21793 //    * Redistributions in binary form must reproduce the above
21794 // copyright notice, this list of conditions and the following disclaimer
21795 // in the documentation and/or other materials provided with the
21796 // distribution.
21797 //    * Neither the name of Google Inc. nor the name Chromium Embedded
21798 // Framework nor the names of its contributors may be used to endorse
21799 // or promote products derived from this software without specific prior
21800 // written permission.
21801 //
21802 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21803 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21804 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21805 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21806 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21807 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21808 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21809 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21810 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21811 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21812 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21813 //
21814 // ---------------------------------------------------------------------------
21815 //
21816 // This file was generated by the CEF translator tool and should not edited
21817 // by hand. See the translator.README.txt file in the tools directory for
21818 // more information.
21819 //
21820 // $hash=a4b62b20f30552fef5d522bdd00ebf9a8f12464c$
21821 //
21822 
21823 extern (C):
21824 
21825 ///
21826 /// Structure representing the issuer or subject field of an X.509 certificate.
21827 ///
21828 struct cef_x509cert_principal_t
21829 {
21830     ///
21831     /// Base structure.
21832     ///
21833 
21834     ///
21835     /// Returns a name that can be used to represent the issuer. It tries in this
21836     /// order: Common Name (CN), Organization Name (O) and Organizational Unit
21837     /// Name (OU) and returns the first non-NULL one found.
21838     ///
21839     // The resulting string must be freed by calling cef_string_userfree_free().
21840 
21841     ///
21842     /// Returns the common name.
21843     ///
21844     // The resulting string must be freed by calling cef_string_userfree_free().
21845 
21846     ///
21847     /// Returns the locality name.
21848     cef_base_ref_counted_t base;
21849     extern(System) cef_string_userfree_t function (
21850         cef_x509cert_principal_t* self) nothrow get_display_name;
21851     extern(System) cef_string_userfree_t function (
21852         cef_x509cert_principal_t* self) nothrow get_common_name; ///
21853     // The resulting string must be freed by calling cef_string_userfree_free().
21854     extern(System) cef_string_userfree_t function (
21855         cef_x509cert_principal_t* self) nothrow get_locality_name;
21856 
21857     ///
21858     /// Returns the state or province name.
21859     ///
21860     // The resulting string must be freed by calling cef_string_userfree_free().
21861     extern(System) cef_string_userfree_t function (
21862         cef_x509cert_principal_t* self) nothrow get_state_or_province_name;
21863 
21864     ///
21865     /// Returns the country name.
21866     ///
21867     // The resulting string must be freed by calling cef_string_userfree_free().
21868     extern(System) cef_string_userfree_t function (
21869         cef_x509cert_principal_t* self) nothrow get_country_name;
21870 
21871     ///
21872     /// Retrieve the list of organization names.
21873     ///
21874     extern(System) void function (
21875         cef_x509cert_principal_t* self,
21876         cef_string_list_t names) nothrow get_organization_names;
21877 
21878     ///
21879     /// Retrieve the list of organization unit names.
21880     ///
21881     extern(System) void function (
21882         cef_x509cert_principal_t* self,
21883         cef_string_list_t names) nothrow get_organization_unit_names;
21884 }
21885 
21886 
21887 
21888 ///
21889 /// Structure representing a X.509 certificate.
21890 ///
21891 struct cef_x509certificate_t
21892 {
21893     ///
21894     /// Base structure.
21895     ///
21896     cef_base_ref_counted_t base;
21897 
21898     ///
21899     /// Returns the subject of the X.509 certificate. For HTTPS server
21900     /// certificates this represents the web server.  The common name of the
21901     /// subject should match the host name of the web server.
21902     ///
21903     extern(System) cef_x509cert_principal_t* function (
21904         cef_x509certificate_t* self) nothrow get_subject;
21905 
21906     ///
21907     /// Returns the issuer of the X.509 certificate.
21908     ///
21909     extern(System) cef_x509cert_principal_t* function (
21910         cef_x509certificate_t* self) nothrow get_issuer;
21911 
21912     ///
21913     /// Returns the DER encoded serial number for the X.509 certificate. The value
21914     /// possibly includes a leading 00 byte.
21915     ///
21916     extern(System) cef_binary_value_t* function (
21917         cef_x509certificate_t* self) nothrow get_serial_number;
21918 
21919     ///
21920     /// Returns the date before which the X.509 certificate is invalid.
21921     /// CefBaseTime.GetTimeT() will return 0 if no date was specified.
21922     ///
21923     extern(System) cef_basetime_t function (cef_x509certificate_t* self) nothrow get_valid_start;
21924 
21925     ///
21926     /// Returns the date after which the X.509 certificate is invalid.
21927     /// CefBaseTime.GetTimeT() will return 0 if no date was specified.
21928     ///
21929     extern(System) cef_basetime_t function (cef_x509certificate_t* self) nothrow get_valid_expiry;
21930 
21931     ///
21932     /// Returns the DER encoded data for the X.509 certificate.
21933     ///
21934     extern(System) cef_binary_value_t* function (
21935         cef_x509certificate_t* self) nothrow get_derencoded;
21936 
21937     ///
21938     /// Returns the PEM encoded data for the X.509 certificate.
21939     ///
21940     extern(System) cef_binary_value_t* function (
21941         cef_x509certificate_t* self) nothrow get_pemencoded;
21942 
21943     ///
21944     /// Returns the number of certificates in the issuer chain. If 0, the
21945     /// certificate is self-signed.
21946     ///
21947     extern(System) size_t function (cef_x509certificate_t* self) nothrow get_issuer_chain_size;
21948 
21949     ///
21950     /// Returns the DER encoded data for the certificate issuer chain. If we
21951     /// failed to encode a certificate in the chain it is still present in the
21952     /// array but is an NULL string.
21953     ///
21954     extern(System) void function (
21955         cef_x509certificate_t* self,
21956         size_t* chainCount,
21957         cef_binary_value_t** chain) nothrow get_derencoded_issuer_chain;
21958 
21959     ///
21960     /// Returns the PEM encoded data for the certificate issuer chain. If we
21961     /// failed to encode a certificate in the chain it is still present in the
21962     /// array but is an NULL string.
21963     ///
21964     extern(System) void function (
21965         cef_x509certificate_t* self,
21966         size_t* chainCount,
21967         cef_binary_value_t** chain) nothrow get_pemencoded_issuer_chain;
21968 }
21969 
21970 
21971 
21972 // CEF_INCLUDE_CAPI_CEF_X509_CERTIFICATE_CAPI_H_
21973 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
21974 //
21975 // Redistribution and use in source and binary forms, with or without
21976 // modification, are permitted provided that the following conditions are
21977 // met:
21978 //
21979 //    * Redistributions of source code must retain the above copyright
21980 // notice, this list of conditions and the following disclaimer.
21981 //    * Redistributions in binary form must reproduce the above
21982 // copyright notice, this list of conditions and the following disclaimer
21983 // in the documentation and/or other materials provided with the
21984 // distribution.
21985 //    * Neither the name of Google Inc. nor the name Chromium Embedded
21986 // Framework nor the names of its contributors may be used to endorse
21987 // or promote products derived from this software without specific prior
21988 // written permission.
21989 //
21990 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21991 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21992 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21993 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21994 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21995 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21996 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21997 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21998 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21999 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22000 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22001 //
22002 // ---------------------------------------------------------------------------
22003 //
22004 // This file was generated by the CEF translator tool and should not edited
22005 // by hand. See the translator.README.txt file in the tools directory for
22006 // more information.
22007 //
22008 // $hash=366f872b03f7c25ef56677cc427a317bb529ad9c$
22009 //
22010 
22011 extern (C):
22012 
22013 ///
22014 /// Structure that supports the reading of XML data via the libxml streaming
22015 /// API. The functions of this structure should only be called on the thread
22016 /// that creates the object.
22017 ///
22018 struct cef_xml_reader_t
22019 {
22020     ///
22021     /// Base structure.
22022     ///
22023 
22024     ///
22025     /// Moves the cursor to the next node in the document. This function must be
22026     /// called at least once to set the current cursor position. Returns true (1)
22027     /// if the cursor position was set successfully.
22028     ///
22029 
22030     ///
22031     /// Close the document. This should be called directly to ensure that cleanup
22032     /// occurs on the correct thread.
22033     ///
22034 
22035     ///
22036     /// Returns true (1) if an error has been reported by the XML parser.
22037     ///
22038     cef_base_ref_counted_t base;
22039     extern(System) int function (cef_xml_reader_t* self) nothrow move_to_next_node;
22040     extern(System) int function (cef_xml_reader_t* self) nothrow close;
22041     extern(System) int function (cef_xml_reader_t* self) nothrow has_error;
22042 
22043     ///
22044     /// Returns the error string.
22045     ///
22046     // The resulting string must be freed by calling cef_string_userfree_free().
22047     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_error;
22048 
22049     ///
22050     /// Returns the node type.
22051     ///
22052     extern(System) cef_xml_node_type_t function (cef_xml_reader_t* self) nothrow get_type;
22053 
22054     ///
22055     /// Returns the node depth. Depth starts at 0 for the root node.
22056     ///
22057     extern(System) int function (cef_xml_reader_t* self) nothrow get_depth;
22058 
22059     ///
22060     /// Returns the local name. See http://www.w3.org/TR/REC-xml-names/#NT-
22061     /// LocalPart for additional details.
22062     ///
22063     // The resulting string must be freed by calling cef_string_userfree_free().
22064     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_local_name;
22065 
22066     ///
22067     /// Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for
22068     /// additional details.
22069     ///
22070     // The resulting string must be freed by calling cef_string_userfree_free().
22071     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_prefix;
22072 
22073     ///
22074     /// Returns the qualified name, equal to (Prefix:)LocalName. See
22075     /// http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details.
22076     ///
22077     // The resulting string must be freed by calling cef_string_userfree_free().
22078     extern(System) cef_string_userfree_t function (
22079         cef_xml_reader_t* self) nothrow get_qualified_name;
22080 
22081     ///
22082     /// Returns the URI defining the namespace associated with the node. See
22083     /// http://www.w3.org/TR/REC-xml-names/ for additional details.
22084     ///
22085     // The resulting string must be freed by calling cef_string_userfree_free().
22086     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_namespace_uri;
22087 
22088     ///
22089     /// Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for
22090     /// additional details.
22091     ///
22092     // The resulting string must be freed by calling cef_string_userfree_free().
22093     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_base_uri;
22094 
22095     ///
22096     /// Returns the xml:lang scope within which the node resides. See
22097     /// http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details.
22098     ///
22099     // The resulting string must be freed by calling cef_string_userfree_free().
22100     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_xml_lang;
22101 
22102     ///
22103     /// Returns true (1) if the node represents an NULL element. "<a/>" is
22104     /// considered NULL but "<a></a>" is not.
22105     ///
22106     extern(System) int function (cef_xml_reader_t* self) nothrow is_empty_element;
22107 
22108     ///
22109     /// Returns true (1) if the node has a text value.
22110     ///
22111     extern(System) int function (cef_xml_reader_t* self) nothrow has_value;
22112 
22113     ///
22114     /// Returns the text value.
22115     ///
22116     // The resulting string must be freed by calling cef_string_userfree_free().
22117     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_value;
22118 
22119     ///
22120     /// Returns true (1) if the node has attributes.
22121     ///
22122     extern(System) int function (cef_xml_reader_t* self) nothrow has_attributes;
22123 
22124     ///
22125     /// Returns the number of attributes.
22126     ///
22127     extern(System) size_t function (cef_xml_reader_t* self) nothrow get_attribute_count;
22128 
22129     ///
22130     /// Returns the value of the attribute at the specified 0-based index.
22131     ///
22132     // The resulting string must be freed by calling cef_string_userfree_free().
22133     extern(System) cef_string_userfree_t function (
22134         cef_xml_reader_t* self,
22135         int index) nothrow get_attribute_byindex;
22136 
22137     ///
22138     /// Returns the value of the attribute with the specified qualified name.
22139     ///
22140     // The resulting string must be freed by calling cef_string_userfree_free().
22141     extern(System) cef_string_userfree_t function (
22142         cef_xml_reader_t* self,
22143         const(cef_string_t)* qualifiedName) nothrow get_attribute_byqname;
22144 
22145     ///
22146     /// Returns the value of the attribute with the specified local name and
22147     /// namespace URI.
22148     ///
22149     // The resulting string must be freed by calling cef_string_userfree_free().
22150     extern(System) cef_string_userfree_t function (
22151         cef_xml_reader_t* self,
22152         const(cef_string_t)* localName,
22153         const(cef_string_t)* namespaceURI) nothrow get_attribute_bylname;
22154 
22155     ///
22156     /// Returns an XML representation of the current node's children.
22157     ///
22158     // The resulting string must be freed by calling cef_string_userfree_free().
22159     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_inner_xml;
22160 
22161     ///
22162     /// Returns an XML representation of the current node including its children.
22163     ///
22164     // The resulting string must be freed by calling cef_string_userfree_free().
22165     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_outer_xml;
22166 
22167     ///
22168     /// Returns the line number for the current node.
22169     ///
22170     extern(System) int function (cef_xml_reader_t* self) nothrow get_line_number;
22171 
22172     ///
22173     /// Moves the cursor to the attribute at the specified 0-based index. Returns
22174     /// true (1) if the cursor position was set successfully.
22175     ///
22176     extern(System) int function (
22177         cef_xml_reader_t* self,
22178         int index) nothrow move_to_attribute_byindex;
22179 
22180     ///
22181     /// Moves the cursor to the attribute with the specified qualified name.
22182     /// Returns true (1) if the cursor position was set successfully.
22183     ///
22184     extern(System) int function (
22185         cef_xml_reader_t* self,
22186         const(cef_string_t)* qualifiedName) nothrow move_to_attribute_byqname;
22187 
22188     ///
22189     /// Moves the cursor to the attribute with the specified local name and
22190     /// namespace URI. Returns true (1) if the cursor position was set
22191     /// successfully.
22192     ///
22193     extern(System) int function (
22194         cef_xml_reader_t* self,
22195         const(cef_string_t)* localName,
22196         const(cef_string_t)* namespaceURI) nothrow move_to_attribute_bylname;
22197 
22198     ///
22199     /// Moves the cursor to the first attribute in the current element. Returns
22200     /// true (1) if the cursor position was set successfully.
22201     ///
22202     extern(System) int function (cef_xml_reader_t* self) nothrow move_to_first_attribute;
22203 
22204     ///
22205     /// Moves the cursor to the next attribute in the current element. Returns
22206     /// true (1) if the cursor position was set successfully.
22207     ///
22208     extern(System) int function (cef_xml_reader_t* self) nothrow move_to_next_attribute;
22209 
22210     ///
22211     /// Moves the cursor back to the carrying element. Returns true (1) if the
22212     /// cursor position was set successfully.
22213     ///
22214     extern(System) int function (cef_xml_reader_t* self) nothrow move_to_carrying_element;
22215 }
22216 
22217 
22218 
22219 ///
22220 /// Create a new cef_xml_reader_t object. The returned object's functions can
22221 /// only be called from the thread that created the object.
22222 ///
22223 cef_xml_reader_t* cef_xml_reader_create (
22224     cef_stream_reader_t* stream,
22225     cef_xml_encoding_type_t encodingType,
22226     const(cef_string_t)* URI);
22227 
22228 // CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_
22229 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
22230 //
22231 // Redistribution and use in source and binary forms, with or without
22232 // modification, are permitted provided that the following conditions are
22233 // met:
22234 //
22235 //    * Redistributions of source code must retain the above copyright
22236 // notice, this list of conditions and the following disclaimer.
22237 //    * Redistributions in binary form must reproduce the above
22238 // copyright notice, this list of conditions and the following disclaimer
22239 // in the documentation and/or other materials provided with the
22240 // distribution.
22241 //    * Neither the name of Google Inc. nor the name Chromium Embedded
22242 // Framework nor the names of its contributors may be used to endorse
22243 // or promote products derived from this software without specific prior
22244 // written permission.
22245 //
22246 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22247 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22248 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22249 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22250 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22251 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22252 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22253 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22254 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22255 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22256 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22257 //
22258 // ---------------------------------------------------------------------------
22259 //
22260 // This file was generated by the CEF translator tool and should not edited
22261 // by hand. See the translator.README.txt file in the tools directory for
22262 // more information.
22263 //
22264 // $hash=d082d724164cb0b1da12d49b080c599934f08b9d$
22265 //
22266 
22267 extern (C):
22268 
22269 ///
22270 /// Structure that supports the reading of zip archives via the zlib unzip API.
22271 /// The functions of this structure should only be called on the thread that
22272 /// creates the object.
22273 ///
22274 struct cef_zip_reader_t
22275 {
22276     ///
22277     /// Base structure.
22278     ///
22279 
22280     ///
22281     /// Moves the cursor to the first file in the archive. Returns true (1) if the
22282     /// cursor position was set successfully.
22283     ///
22284 
22285     ///
22286     /// Moves the cursor to the next file in the archive. Returns true (1) if the
22287     /// cursor position was set successfully.
22288     ///
22289 
22290     ///
22291     /// Moves the cursor to the specified file in the archive. If |caseSensitive|
22292     /// is true (1) then the search will be case sensitive. Returns true (1) if
22293     cef_base_ref_counted_t base;
22294     extern(System) int function (cef_zip_reader_t* self) nothrow move_to_first_file;
22295     extern(System) int function (cef_zip_reader_t* self) nothrow move_to_next_file;
22296     /// the cursor position was set successfully.
22297     ///
22298     extern(System) int function (
22299         cef_zip_reader_t* self,
22300         const(cef_string_t)* fileName,
22301         int caseSensitive) nothrow move_to_file;
22302 
22303     ///
22304     /// Closes the archive. This should be called directly to ensure that cleanup
22305     /// occurs on the correct thread.
22306     ///
22307     extern(System) int function (cef_zip_reader_t* self) nothrow close;
22308 
22309     ///
22310     /// Returns the name of the file.
22311     ///
22312     // The resulting string must be freed by calling cef_string_userfree_free().
22313     extern(System) cef_string_userfree_t function (cef_zip_reader_t* self) nothrow get_file_name;
22314 
22315     ///
22316     /// Returns the uncompressed size of the file.
22317     ///
22318     extern(System) long function (cef_zip_reader_t* self) nothrow get_file_size;
22319 
22320     ///
22321     /// Returns the last modified timestamp for the file.
22322     ///
22323     extern(System) cef_basetime_t function (cef_zip_reader_t* self) nothrow get_file_last_modified;
22324 
22325     ///
22326     /// Opens the file for reading of uncompressed data. A read password may
22327     /// optionally be specified.
22328     ///
22329     extern(System) int function (
22330         cef_zip_reader_t* self,
22331         const(cef_string_t)* password) nothrow open_file;
22332 
22333     ///
22334     /// Closes the file.
22335     ///
22336     extern(System) int function (cef_zip_reader_t* self) nothrow close_file;
22337 
22338     ///
22339     /// Read uncompressed file contents into the specified buffer. Returns < 0 if
22340     /// an error occurred, 0 if at the end of file, or the number of bytes read.
22341     ///
22342     extern(System) int function (
22343         cef_zip_reader_t* self,
22344         void* buffer,
22345         size_t bufferSize) nothrow read_file;
22346 
22347     ///
22348     /// Returns the current offset in the uncompressed file contents.
22349     ///
22350     extern(System) long function (cef_zip_reader_t* self) nothrow tell;
22351 
22352     ///
22353     /// Returns true (1) if at end of the file contents.
22354     ///
22355     extern(System) int function (cef_zip_reader_t* self) nothrow eof;
22356 }
22357 
22358 
22359 
22360 ///
22361 /// Create a new cef_zip_reader_t object. The returned object's functions can
22362 /// only be called from the thread that created the object.
22363 ///
22364 cef_zip_reader_t* cef_zip_reader_create (cef_stream_reader_t* stream);
22365 
22366 // CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_
22367 }
22368 
22369 }
22370 
22371 
22372 version(Windows) {
22373 
22374 /+
22375 	***** Webview2 Bindings *****
22376 
22377 	TO UPDATE THIS:
22378 
22379 	Get the new package from https://www.nuget.org/packages/Microsoft.Web.WebView2
22380 	Note that is a .zip file so you can extract the WebView2.idl file by just treating it as such
22381 
22382 	Use my idl2d fork (from ~/program/idl2d or dub) on it `./idl2d WebView2.idl` to make webview2.d.
22383 
22384 	Just delete any `import sdk.*` lines. Comment out the lines that mention `DEFINE_ENUM_FLAG_OPERATORS` (there's like a dozen, it is some C macro that isn't translated and i don't think it is important).
22385 
22386 	And paste it in the version(inline_webview2_bindings) block.
22387 +/
22388 
22389 alias EventRegistrationToken = long;
22390 version=inline_webview2_bindings;
22391 
22392 version(inline_webview2_bindings) {
22393 public import core.sys.windows.windows;
22394 public import core.sys.windows.unknwn;
22395 public import core.sys.windows.oaidl;
22396 public import core.sys.windows.objidl;
22397 
22398 
22399 // Copyright (C) Microsoft Corporation. All rights reserved.
22400 // Use of this source code is governed by a BSD-style license that can be
22401 // found in the LICENSE file.
22402 
22403 @("uuid(26d34152-879f-4065-bea2-3daa2cfadfb8), version(1.0)")
22404 enum LibraryInfo;
22405 version(all)
22406 { /+ library WebView2 +/
22407 
22408 // Interface forward declarations
22409 
22410 /+ interface ICoreWebView2AcceleratorKeyPressedEventArgs; +/
22411 /+ interface ICoreWebView2AcceleratorKeyPressedEventArgs2; +/
22412 /+ interface ICoreWebView2AcceleratorKeyPressedEventHandler; +/
22413 /+ interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler; +/
22414 /+ interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler; +/
22415 /+ interface ICoreWebView2CapturePreviewCompletedHandler; +/
22416 /+ interface ICoreWebView2; +/
22417 /+ interface ICoreWebView2_2; +/
22418 /+ interface ICoreWebView2_3; +/
22419 /+ interface ICoreWebView2_4; +/
22420 /+ interface ICoreWebView2_5; +/
22421 /+ interface ICoreWebView2_6; +/
22422 /+ interface ICoreWebView2_7; +/
22423 /+ interface ICoreWebView2_8; +/
22424 /+ interface ICoreWebView2_9; +/
22425 /+ interface ICoreWebView2_10; +/
22426 /+ interface ICoreWebView2_11; +/
22427 /+ interface ICoreWebView2_12; +/
22428 /+ interface ICoreWebView2_13; +/
22429 /+ interface ICoreWebView2_14; +/
22430 /+ interface ICoreWebView2_15; +/
22431 /+ interface ICoreWebView2_16; +/
22432 /+ interface ICoreWebView2_17; +/
22433 /+ interface ICoreWebView2_18; +/
22434 /+ interface ICoreWebView2_19; +/
22435 /+ interface ICoreWebView2_20; +/
22436 /+ interface ICoreWebView2BasicAuthenticationRequestedEventArgs; +/
22437 /+ interface ICoreWebView2BasicAuthenticationRequestedEventHandler; +/
22438 /+ interface ICoreWebView2BasicAuthenticationResponse; +/
22439 /+ interface ICoreWebView2BrowserProcessExitedEventArgs; +/
22440 /+ interface ICoreWebView2BrowserProcessExitedEventHandler; +/
22441 /+ interface ICoreWebView2BytesReceivedChangedEventHandler; +/
22442 /+ interface ICoreWebView2CompositionController; +/
22443 /+ interface ICoreWebView2CompositionController2; +/
22444 /+ interface ICoreWebView2CompositionController3; +/
22445 /+ interface ICoreWebView2Controller; +/
22446 /+ interface ICoreWebView2Controller2; +/
22447 /+ interface ICoreWebView2Controller3; +/
22448 /+ interface ICoreWebView2Controller4; +/
22449 /+ interface ICoreWebView2ControllerOptions; +/
22450 /+ interface ICoreWebView2ControllerOptions2; +/
22451 /+ interface ICoreWebView2ContentLoadingEventArgs; +/
22452 /+ interface ICoreWebView2ContentLoadingEventHandler; +/
22453 /+ interface ICoreWebView2ContextMenuRequestedEventArgs; +/
22454 /+ interface ICoreWebView2ContextMenuRequestedEventHandler; +/
22455 /+ interface ICoreWebView2Cookie; +/
22456 /+ interface ICoreWebView2CookieList; +/
22457 /+ interface ICoreWebView2CookieManager; +/
22458 /+ interface ICoreWebView2Certificate; +/
22459 /+ interface ICoreWebView2ClientCertificate; +/
22460 /+ interface ICoreWebView2StringCollection; +/
22461 /+ interface ICoreWebView2ClearBrowsingDataCompletedHandler; +/
22462 /+ interface ICoreWebView2ClientCertificateCollection; +/
22463 /+ interface ICoreWebView2ClientCertificateRequestedEventArgs; +/
22464 /+ interface ICoreWebView2ClientCertificateRequestedEventHandler; +/
22465 /+ interface ICoreWebView2ContextMenuItem; +/
22466 /+ interface ICoreWebView2ContextMenuItemCollection; +/
22467 /+ interface ICoreWebView2ContextMenuRequestedEventArgs; +/
22468 /+ interface ICoreWebView2ContextMenuRequestedEventHandler; +/
22469 /+ interface ICoreWebView2ContextMenuTarget; +/
22470 /+ interface ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler; +/
22471 /+ interface ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler; +/
22472 /+ interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler; +/
22473 /+ interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler; +/
22474 /+ interface ICoreWebView2ContainsFullScreenElementChangedEventHandler; +/
22475 /+ interface ICoreWebView2CursorChangedEventHandler; +/
22476 /+ interface ICoreWebView2CustomItemSelectedEventHandler; +/
22477 /+ interface ICoreWebView2CustomSchemeRegistration; +/
22478 /+ interface ICoreWebView2DocumentTitleChangedEventHandler; +/
22479 /+ interface ICoreWebView2DOMContentLoadedEventArgs; +/
22480 /+ interface ICoreWebView2DOMContentLoadedEventHandler; +/
22481 /+ interface ICoreWebView2Deferral; +/
22482 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs; +/
22483 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs2; +/
22484 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler; +/
22485 /+ interface ICoreWebView2DevToolsProtocolEventReceiver; +/
22486 /+ interface ICoreWebView2DownloadOperation; +/
22487 /+ interface ICoreWebView2DownloadStartingEventArgs; +/
22488 /+ interface ICoreWebView2DownloadStartingEventHandler; +/
22489 /+ interface ICoreWebView2Environment; +/
22490 /+ interface ICoreWebView2Environment2; +/
22491 /+ interface ICoreWebView2Environment3; +/
22492 /+ interface ICoreWebView2Environment4; +/
22493 /+ interface ICoreWebView2Environment5; +/
22494 /+ interface ICoreWebView2Environment6; +/
22495 /+ interface ICoreWebView2Environment7; +/
22496 /+ interface ICoreWebView2Environment8; +/
22497 /+ interface ICoreWebView2Environment9; +/
22498 /+ interface ICoreWebView2Environment10; +/
22499 /+ interface ICoreWebView2Environment11; +/
22500 /+ interface ICoreWebView2Environment12; +/
22501 /+ interface ICoreWebView2Environment13; +/
22502 /+ interface ICoreWebView2EnvironmentOptions; +/
22503 /+ interface ICoreWebView2EnvironmentOptions2; +/
22504 /+ interface ICoreWebView2EnvironmentOptions3; +/
22505 /+ interface ICoreWebView2EnvironmentOptions4; +/
22506 /+ interface ICoreWebView2EnvironmentOptions5; +/
22507 /+ interface ICoreWebView2EnvironmentOptions6; +/
22508 /+ interface ICoreWebView2EstimatedEndTimeChangedEventHandler; +/
22509 /+ interface ICoreWebView2ExecuteScriptCompletedHandler; +/
22510 /+ interface ICoreWebView2GetProcessExtendedInfosCompletedHandler; +/
22511 /+ interface ICoreWebView2ProcessExtendedInfo; +/
22512 /+ interface ICoreWebView2ProcessExtendedInfoCollection; +/
22513 /+ interface ICoreWebView2Frame; +/
22514 /+ interface ICoreWebView2Frame2; +/
22515 /+ interface ICoreWebView2Frame3; +/
22516 /+ interface ICoreWebView2Frame4; +/
22517 /+ interface ICoreWebView2Frame5; +/
22518 /+ interface ICoreWebView2FrameContentLoadingEventHandler; +/
22519 /+ interface ICoreWebView2FrameCreatedEventArgs; +/
22520 /+ interface ICoreWebView2FrameCreatedEventHandler; +/
22521 /+ interface ICoreWebView2FrameDestroyedEventHandler; +/
22522 /+ interface ICoreWebView2FrameDOMContentLoadedEventHandler; +/
22523 /+ interface ICoreWebView2FrameNameChangedEventHandler; +/
22524 /+ interface ICoreWebView2FrameNavigationCompletedEventHandler; +/
22525 /+ interface ICoreWebView2FrameNavigationStartingEventHandler; +/
22526 /+ interface ICoreWebView2FramePermissionRequestedEventHandler; +/
22527 /+ interface ICoreWebView2FrameWebMessageReceivedEventHandler; +/
22528 /+ interface ICoreWebView2FrameInfo; +/
22529 /+ interface ICoreWebView2FrameInfo2; +/
22530 /+ interface ICoreWebView2FrameInfoCollection; +/
22531 /+ interface ICoreWebView2FrameInfoCollectionIterator; +/
22532 /+ interface ICoreWebView2FocusChangedEventHandler; +/
22533 /+ interface ICoreWebView2GetCookiesCompletedHandler; +/
22534 /+ interface ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler; +/
22535 /+ interface ICoreWebView2HistoryChangedEventHandler; +/
22536 /+ interface ICoreWebView2HttpHeadersCollectionIterator; +/
22537 /+ interface ICoreWebView2HttpRequestHeaders; +/
22538 /+ interface ICoreWebView2HttpResponseHeaders; +/
22539 /+ interface ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler; +/
22540 /+ interface ICoreWebView2LaunchingExternalUriSchemeEventArgs; +/
22541 /+ interface ICoreWebView2LaunchingExternalUriSchemeEventHandler; +/
22542 /+ interface ICoreWebView2MoveFocusRequestedEventArgs; +/
22543 /+ interface ICoreWebView2MoveFocusRequestedEventHandler; +/
22544 /+ interface ICoreWebView2NavigationCompletedEventArgs; +/
22545 /+ interface ICoreWebView2NavigationCompletedEventArgs2; +/
22546 /+ interface ICoreWebView2NavigationCompletedEventHandler; +/
22547 /+ interface ICoreWebView2NavigationStartingEventArgs; +/
22548 /+ interface ICoreWebView2NavigationStartingEventArgs2; +/
22549 /+ interface ICoreWebView2NavigationStartingEventArgs3; +/
22550 /+ interface ICoreWebView2NavigationStartingEventHandler; +/
22551 /+ interface ICoreWebView2NewBrowserVersionAvailableEventHandler; +/
22552 /+ interface ICoreWebView2NewWindowRequestedEventArgs; +/
22553 /+ interface ICoreWebView2NewWindowRequestedEventArgs2; +/
22554 /+ interface ICoreWebView2NewWindowRequestedEventArgs3; +/
22555 /+ interface ICoreWebView2NewWindowRequestedEventHandler; +/
22556 /+ interface ICoreWebView2PermissionRequestedEventArgs; +/
22557 /+ interface ICoreWebView2PermissionRequestedEventArgs2; +/
22558 /+ interface ICoreWebView2PermissionRequestedEventArgs3; +/
22559 /+ interface ICoreWebView2PermissionRequestedEventHandler; +/
22560 /+ interface ICoreWebView2PermissionSettingCollectionView; +/
22561 /+ interface ICoreWebView2PermissionSetting; +/
22562 /+ interface ICoreWebView2PointerInfo; +/
22563 /+ interface ICoreWebView2PrintSettings; +/
22564 /+ interface ICoreWebView2PrintSettings2; +/
22565 /+ interface ICoreWebView2PrintToPdfCompletedHandler; +/
22566 /+ interface ICoreWebView2PrintCompletedHandler; +/
22567 /+ interface ICoreWebView2PrintToPdfStreamCompletedHandler; +/
22568 /+ interface ICoreWebView2ProcessFailedEventArgs; +/
22569 /+ interface ICoreWebView2ProcessFailedEventArgs2; +/
22570 /+ interface ICoreWebView2ProcessFailedEventHandler; +/
22571 /+ interface ICoreWebView2Profile; +/
22572 /+ interface ICoreWebView2Profile2; +/
22573 /+ interface ICoreWebView2Profile3; +/
22574 /+ interface ICoreWebView2Profile4; +/
22575 /+ interface ICoreWebView2Profile5; +/
22576 /+ interface ICoreWebView2Profile6; +/
22577 /+ interface ICoreWebView2Profile7; +/
22578 /+ interface ICoreWebView2Profile8; +/
22579 /+ interface ICoreWebView2ProfileDeletedEventHandler; +/
22580 /+ interface ICoreWebView2RasterizationScaleChangedEventHandler; +/
22581 /+ interface ICoreWebView2ServerCertificateErrorDetectedEventArgs; +/
22582 /+ interface ICoreWebView2ServerCertificateErrorDetectedEventHandler; +/
22583 /+ interface ICoreWebView2SetPermissionStateCompletedHandler; +/
22584 /+ interface ICoreWebView2ScriptDialogOpeningEventArgs; +/
22585 /+ interface ICoreWebView2ScriptDialogOpeningEventHandler; +/
22586 /+ interface ICoreWebView2Settings; +/
22587 /+ interface ICoreWebView2Settings2; +/
22588 /+ interface ICoreWebView2Settings3; +/
22589 /+ interface ICoreWebView2Settings4; +/
22590 /+ interface ICoreWebView2Settings5; +/
22591 /+ interface ICoreWebView2Settings6; +/
22592 /+ interface ICoreWebView2Settings7; +/
22593 /+ interface ICoreWebView2Settings8; +/
22594 /+ interface ICoreWebView2SharedBuffer; +/
22595 /+ interface ICoreWebView2SourceChangedEventArgs; +/
22596 /+ interface ICoreWebView2SourceChangedEventHandler; +/
22597 /+ interface ICoreWebView2StateChangedEventHandler; +/
22598 /+ interface ICoreWebView2StatusBarTextChangedEventHandler; +/
22599 /+ interface ICoreWebView2TrySuspendCompletedHandler; +/
22600 /+ interface ICoreWebView2WebMessageReceivedEventArgs; +/
22601 /+ interface ICoreWebView2WebMessageReceivedEventHandler; +/
22602 /+ interface ICoreWebView2WebResourceRequest; +/
22603 /+ interface ICoreWebView2WebResourceRequestedEventArgs; +/
22604 /+ interface ICoreWebView2WebResourceRequestedEventHandler; +/
22605 /+ interface ICoreWebView2WebResourceResponse; +/
22606 /+ interface ICoreWebView2WebResourceResponseReceivedEventHandler; +/
22607 /+ interface ICoreWebView2WebResourceResponseReceivedEventArgs; +/
22608 /+ interface ICoreWebView2WebResourceResponseView; +/
22609 /+ interface ICoreWebView2WebResourceResponseViewGetContentCompletedHandler; +/
22610 /+ interface ICoreWebView2WindowCloseRequestedEventHandler; +/
22611 /+ interface ICoreWebView2WindowFeatures; +/
22612 /+ interface ICoreWebView2ZoomFactorChangedEventHandler; +/
22613 /+ interface ICoreWebView2IsMutedChangedEventHandler; +/
22614 /+ interface ICoreWebView2IsDocumentPlayingAudioChangedEventHandler; +/
22615 /+ interface ICoreWebView2ProcessInfo; +/
22616 /+ interface ICoreWebView2ProcessInfoCollection; +/
22617 /+ interface ICoreWebView2ProcessInfosChangedEventHandler; +/
22618 /+ interface ICoreWebView2FaviconChangedEventHandler; +/
22619 /+ interface ICoreWebView2GetFaviconCompletedHandler; +/
22620 /+ interface ICoreWebView2ProfileAddBrowserExtensionCompletedHandler; +/
22621 /+ interface ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler; +/
22622 /+ interface ICoreWebView2BrowserExtensionList; +/
22623 /+ interface ICoreWebView2BrowserExtension; +/
22624 /+ interface ICoreWebView2BrowserExtensionEnableCompletedHandler; +/
22625 /+ interface ICoreWebView2BrowserExtensionRemoveCompletedHandler; +/
22626 
22627 // Enums and structs
22628 
22629 /// Specifies the image format for the `ICoreWebView2::CapturePreview` method.
22630 
22631 @("v1_enum")
22632 enum /+ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT+/
22633 {
22634 
22635   /// Indicates that the PNG image format is used.
22636 
22637   COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG,
22638 
22639   /// Indicates the JPEG image format is used.
22640 
22641   COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_JPEG,
22642 }
22643 alias int COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT;
22644 
22645 /// Kind of cookie SameSite status used in the ICoreWebView2Cookie interface.
22646 /// These fields match those as specified in https://developer.mozilla.org/docs/Web/HTTP/Cookies#.
22647 /// Learn more about SameSite cookies here: https://tools.ietf.org/html/draft-west-first-party-cookies-07
22648 @("v1_enum")
22649 enum /+ COREWEBVIEW2_COOKIE_SAME_SITE_KIND+/
22650 {
22651   /// None SameSite type. No restrictions on cross-site requests.
22652   COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE,
22653   /// Lax SameSite type. The cookie will be sent with "same-site" requests, and with "cross-site" top level navigation.
22654   COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX,
22655   /// Strict SameSite type. The cookie will only be sent along with "same-site" requests.
22656   COREWEBVIEW2_COOKIE_SAME_SITE_KIND_STRICT,
22657 }
22658 alias int COREWEBVIEW2_COOKIE_SAME_SITE_KIND;
22659 
22660 /// Kind of cross origin resource access allowed for host resources during download.
22661 /// Note that other normal access checks like same origin DOM access check and [Content
22662 /// Security Policy](https://developer.mozilla.org/docs/Web/HTTP/CSP) still apply.
22663 /// The following table illustrates the host resource cross origin access according to
22664 /// access context and `COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND`.
22665 ///
22666 /// Cross Origin Access Context | DENY | ALLOW | DENY_CORS
22667 /// --- | --- | --- | ---
22668 /// From DOM like src of img, script or iframe element| Deny | Allow | Allow
22669 /// From Script like Fetch or XMLHttpRequest| Deny | Allow | Deny
22670 @("v1_enum")
22671 enum /+ COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND+/
22672 {
22673   /// All cross origin resource access is denied, including normal sub resource access
22674   /// as src of a script or image element.
22675   COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY,
22676 
22677   /// All cross origin resource access is allowed, including accesses that are
22678   /// subject to Cross-Origin Resource Sharing(CORS) check. The behavior is similar to
22679   /// a web site sends back http header Access-Control-Allow-Origin: *.
22680   COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_ALLOW,
22681 
22682   /// Cross origin resource access is allowed for normal sub resource access like
22683   /// as src of a script or image element, while any access that subjects to CORS check
22684   /// will be denied.
22685   /// See [Cross-Origin Resource Sharing](https://developer.mozilla.org/docs/Web/HTTP/CORS)
22686   /// for more information.
22687   COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY_CORS,
22688 }
22689 alias int COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND;
22690 
22691 /// Specifies the JavaScript dialog type used in the
22692 /// `ICoreWebView2ScriptDialogOpeningEventHandler` interface.
22693 
22694 @("v1_enum")
22695 enum /+ COREWEBVIEW2_SCRIPT_DIALOG_KIND+/
22696 {
22697 
22698   /// Indicates that the dialog uses the `window.alert` JavaScript function.
22699 
22700   COREWEBVIEW2_SCRIPT_DIALOG_KIND_ALERT,
22701 
22702   /// Indicates that the dialog uses the `window.confirm` JavaScript function.
22703 
22704   COREWEBVIEW2_SCRIPT_DIALOG_KIND_CONFIRM,
22705 
22706   /// Indicates that the dialog uses the `window.prompt` JavaScript function.
22707 
22708   COREWEBVIEW2_SCRIPT_DIALOG_KIND_PROMPT,
22709 
22710   /// Indicates that the dialog uses the `beforeunload` JavaScript event.
22711 
22712   COREWEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD,
22713 }
22714 alias int COREWEBVIEW2_SCRIPT_DIALOG_KIND;
22715 
22716 /// Specifies the process failure type used in the
22717 /// `ICoreWebView2ProcessFailedEventArgs` interface. The values in this enum
22718 /// make reference to the process kinds in the Chromium architecture. For more
22719 /// information about what these processes are and what they do, see
22720 /// [Browser Architecture - Inside look at modern web browser](https://developers.google.com/web/updates/2018/09/inside-browser-part1).
22721 
22722 @("v1_enum")
22723 enum /+ COREWEBVIEW2_PROCESS_FAILED_KIND+/
22724 {
22725 
22726   /// Indicates that the browser process ended unexpectedly.  The WebView
22727   /// automatically moves to the Closed state.  The app has to recreate a new
22728   /// WebView to recover from this failure.
22729 
22730   COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED,
22731 
22732   /// Indicates that the main frame's render process ended unexpectedly. Any
22733   /// subframes in the WebView will be gone too.  A new render process is
22734   /// created automatically and navigated to an error page. You can use the
22735   /// `Reload` method to try to recover from this failure. Alternatively, you
22736   /// can `Close` and recreate the WebView.
22737 
22738   COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED,
22739 
22740   /// Indicates that the main frame's render process is unresponsive. Renderer
22741   /// process unresponsiveness can happen for the following reasons:
22742   ///
22743   /// *   There is a **long-running script** being executed. For example, the
22744   /// web content in your WebView might be performing a synchronous XHR, or have
22745   /// entered an infinite loop.
22746   /// *   The **system is busy**.
22747   ///
22748   /// The `ProcessFailed` event will continue to be raised every few seconds
22749   /// until the renderer process has become responsive again. The application
22750   /// can consider taking action if the event keeps being raised. For example,
22751   /// the application might show UI for the user to decide to keep waiting or
22752   /// reload the page, or navigate away.
22753 
22754   COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE,
22755 
22756   /// Indicates that a frame-only render process ended unexpectedly. The process
22757   /// exit does not affect the top-level document, only a subset of the
22758   /// subframes within it. The content in these frames is replaced with an error
22759   /// page in the frame. Your application can communicate with the main frame to
22760   /// recover content in the impacted frames, using
22761   /// `ICoreWebView2ProcessFailedEventArgs2::FrameInfosForFailedProcess` to get
22762   /// information about the impacted frames.
22763 
22764   COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED,
22765 
22766   /// Indicates that a utility process ended unexpectedly. The failed process
22767   /// is recreated automatically. Your application does **not** need to handle
22768   /// recovery for this event, but can use `ICoreWebView2ProcessFailedEventArgs`
22769   /// and `ICoreWebView2ProcessFailedEventArgs2` to collect information about
22770   /// the failure, including `ProcessDescription`.
22771 
22772   COREWEBVIEW2_PROCESS_FAILED_KIND_UTILITY_PROCESS_EXITED,
22773 
22774   /// Indicates that a sandbox helper process ended unexpectedly. This failure
22775   /// is not fatal. Your application does **not** need to handle recovery for
22776   /// this event, but can use `ICoreWebView2ProcessFailedEventArgs` and
22777   /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about
22778   /// the failure.
22779 
22780   COREWEBVIEW2_PROCESS_FAILED_KIND_SANDBOX_HELPER_PROCESS_EXITED,
22781 
22782   /// Indicates that the GPU process ended unexpectedly. The failed process
22783   /// is recreated automatically. Your application does **not** need to handle
22784   /// recovery for this event, but can use `ICoreWebView2ProcessFailedEventArgs`
22785   /// and `ICoreWebView2ProcessFailedEventArgs2` to collect information about
22786   /// the failure.
22787 
22788   COREWEBVIEW2_PROCESS_FAILED_KIND_GPU_PROCESS_EXITED,
22789 
22790   /// Indicates that a PPAPI plugin process ended unexpectedly. This failure
22791   /// is not fatal. Your application does **not** need to handle recovery for
22792   /// this event, but can use `ICoreWebView2ProcessFailedEventArgs` and
22793   /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about
22794   /// the failure, including `ProcessDescription`.
22795 
22796   COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_PLUGIN_PROCESS_EXITED,
22797 
22798   /// Indicates that a PPAPI plugin broker process ended unexpectedly. This failure
22799   /// is not fatal. Your application does **not** need to handle recovery for
22800   /// this event, but can use `ICoreWebView2ProcessFailedEventArgs` and
22801   /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about
22802   /// the failure.
22803 
22804   COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_BROKER_PROCESS_EXITED,
22805 
22806   /// Indicates that a process of unspecified kind ended unexpectedly. Your
22807   /// application can use `ICoreWebView2ProcessFailedEventArgs` and
22808   /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about
22809   /// the failure.
22810 
22811   COREWEBVIEW2_PROCESS_FAILED_KIND_UNKNOWN_PROCESS_EXITED,
22812 }
22813 alias int COREWEBVIEW2_PROCESS_FAILED_KIND;
22814 
22815 /// Specifies the process failure reason used in the
22816 /// `ICoreWebView2ProcessFailedEventArgs` interface. For process failures where
22817 /// a process has exited, it indicates the type of issue that produced the
22818 /// process exit.
22819 
22820 @("v1_enum")
22821 enum /+ COREWEBVIEW2_PROCESS_FAILED_REASON+/
22822 {
22823 
22824   /// An unexpected process failure occurred.
22825   COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED,
22826 
22827   /// The process became unresponsive.
22828   /// This only applies to the main frame's render process.
22829 
22830   COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE,
22831 
22832   /// The process was terminated. For example, from Task Manager.
22833 
22834   COREWEBVIEW2_PROCESS_FAILED_REASON_TERMINATED,
22835 
22836   /// The process crashed. Most crashes will generate dumps in the location
22837   /// indicated by `ICoreWebView2Environment11::get_FailureReportFolderPath`.
22838 
22839   COREWEBVIEW2_PROCESS_FAILED_REASON_CRASHED,
22840 
22841   /// The process failed to launch.
22842 
22843   COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED,
22844 
22845   /// The process terminated due to running out of memory.
22846 
22847   COREWEBVIEW2_PROCESS_FAILED_REASON_OUT_OF_MEMORY,
22848 
22849   /// The process exited because its corresponding profile was deleted.
22850   COREWEBVIEW2_PROCESS_FAILED_REASON_PROFILE_DELETED,
22851 }
22852 alias int COREWEBVIEW2_PROCESS_FAILED_REASON;
22853 
22854 /// Indicates the type of a permission request.
22855 
22856 @("v1_enum")
22857 enum /+ COREWEBVIEW2_PERMISSION_KIND+/
22858 {
22859 
22860   /// Indicates an unknown permission.
22861 
22862   COREWEBVIEW2_PERMISSION_KIND_UNKNOWN_PERMISSION,
22863 
22864   /// Indicates permission to capture audio.
22865 
22866   COREWEBVIEW2_PERMISSION_KIND_MICROPHONE,
22867 
22868   /// Indicates permission to capture video.
22869 
22870   COREWEBVIEW2_PERMISSION_KIND_CAMERA,
22871 
22872   /// Indicates permission to access geolocation.
22873 
22874   COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION,
22875 
22876   /// Indicates permission to send web notifications. Apps that would like to
22877   /// show notifications should handle `PermissionRequested` events
22878   /// and no browser permission prompt will be shown for notification requests.
22879   /// Note that push notifications are currently unavailable in WebView2.
22880 
22881   COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS,
22882 
22883   /// Indicates permission to access generic sensor.  Generic Sensor covering
22884   /// ambient-light-sensor, accelerometer, gyroscope, and magnetometer.
22885 
22886   COREWEBVIEW2_PERMISSION_KIND_OTHER_SENSORS,
22887 
22888   /// Indicates permission to read the system clipboard without a user gesture.
22889 
22890   COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ,
22891 
22892   /// Indicates permission to automatically download multiple files. Permission
22893   /// is requested when multiple downloads are triggered in quick succession.
22894 
22895   COREWEBVIEW2_PERMISSION_KIND_MULTIPLE_AUTOMATIC_DOWNLOADS,
22896 
22897   /// Indicates permission to read and write to files or folders on the device.
22898   /// Permission is requested when developers use the [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API)
22899   /// to show the file or folder picker to the end user, and then request
22900   /// "readwrite" permission for the user's selection.
22901 
22902   COREWEBVIEW2_PERMISSION_KIND_FILE_READ_WRITE,
22903 
22904   /// Indicates permission to play audio and video automatically on sites. This
22905   /// permission affects the autoplay attribute and play method of the audio and
22906   /// video HTML elements, and the start method of the Web Audio API. See the
22907   /// [Autoplay guide for media and Web Audio APIs](https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide) for details.
22908 
22909   COREWEBVIEW2_PERMISSION_KIND_AUTOPLAY,
22910 
22911   /// Indicates permission to use fonts on the device. Permission is requested
22912   /// when developers use the [Local Font Access API](https://wicg.github.io/local-font-access/)
22913   /// to query the system fonts available for styling web content.
22914 
22915   COREWEBVIEW2_PERMISSION_KIND_LOCAL_FONTS,
22916 
22917   /// Indicates permission to send and receive system exclusive messages to/from MIDI
22918   /// (Musical Instrument Digital Interface) devices. Permission is requested
22919   /// when developers use the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API)
22920   /// to request access to system exclusive MIDI messages.
22921   COREWEBVIEW2_PERMISSION_KIND_MIDI_SYSTEM_EXCLUSIVE_MESSAGES,
22922 
22923   /// Indicates permission to open and place windows on the screen. Permission is
22924   /// requested when developers use the [Multi-Screen Window Placement API](https://www.w3.org/TR/window-placement/)
22925   /// to get screen details.
22926   COREWEBVIEW2_PERMISSION_KIND_WINDOW_MANAGEMENT,
22927 }
22928 alias int COREWEBVIEW2_PERMISSION_KIND;
22929 
22930 /// Specifies the response to a permission request.
22931 
22932 @("v1_enum")
22933 enum /+ COREWEBVIEW2_PERMISSION_STATE+/
22934 {
22935 
22936   /// Specifies that the default browser behavior is used, which normally
22937   /// prompt users for decision.
22938 
22939   COREWEBVIEW2_PERMISSION_STATE_DEFAULT,
22940 
22941   /// Specifies that the permission request is granted.
22942 
22943   COREWEBVIEW2_PERMISSION_STATE_ALLOW,
22944 
22945   /// Specifies that the permission request is denied.
22946 
22947   COREWEBVIEW2_PERMISSION_STATE_DENY,
22948 }
22949 alias int COREWEBVIEW2_PERMISSION_STATE;
22950 
22951 /// Indicates the error status values for web navigations.
22952 
22953 @("v1_enum")
22954 enum /+ COREWEBVIEW2_WEB_ERROR_STATUS+/
22955 {
22956 
22957   /// Indicates that an unknown error occurred.
22958 
22959   COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN,
22960 
22961   /// Indicates that the SSL certificate common name does not match the web
22962   /// address.
22963 
22964   COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT,
22965 
22966   /// Indicates that the SSL certificate has expired.
22967 
22968   COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED,
22969 
22970   /// Indicates that the SSL client certificate contains errors.
22971 
22972   COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS,
22973 
22974   /// Indicates that the SSL certificate has been revoked.
22975 
22976   COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED,
22977 
22978   /// Indicates that the SSL certificate is not valid.  The certificate may not
22979   /// match the public key pins for the host name, the certificate is signed
22980   /// by an untrusted authority or using a weak sign algorithm, the certificate
22981   /// claimed DNS names violate name constraints, the certificate contains a
22982   /// weak key, the validity period of the certificate is too long, lack of
22983   /// revocation information or revocation mechanism, non-unique host name,
22984   /// lack of certificate transparency information, or the certificate is
22985   /// chained to a
22986   /// [legacy Symantec root](https://security.googleblog.com/2018/03/distrust-of-symantec-pki-immediate.html).
22987 
22988   COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID,
22989 
22990   /// Indicates that the host is unreachable.
22991 
22992   COREWEBVIEW2_WEB_ERROR_STATUS_SERVER_UNREACHABLE,
22993 
22994   /// Indicates that the connection has timed out.
22995 
22996   COREWEBVIEW2_WEB_ERROR_STATUS_TIMEOUT,
22997 
22998   /// Indicates that the server returned an invalid or unrecognized response.
22999 
23000   COREWEBVIEW2_WEB_ERROR_STATUS_ERROR_HTTP_INVALID_SERVER_RESPONSE,
23001 
23002   /// Indicates that the connection was stopped.
23003 
23004   COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED,
23005 
23006   /// Indicates that the connection was reset.
23007 
23008   COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_RESET,
23009 
23010   /// Indicates that the Internet connection has been lost.
23011 
23012   COREWEBVIEW2_WEB_ERROR_STATUS_DISCONNECTED,
23013 
23014   /// Indicates that a connection to the destination was not established.
23015 
23016   COREWEBVIEW2_WEB_ERROR_STATUS_CANNOT_CONNECT,
23017 
23018   /// Indicates that the provided host name was not able to be resolved.
23019 
23020   COREWEBVIEW2_WEB_ERROR_STATUS_HOST_NAME_NOT_RESOLVED,
23021 
23022   /// Indicates that the operation was canceled. This status code is also used
23023   /// in the following cases:
23024   /// - When the app cancels a navigation via NavigationStarting event.
23025   /// - For original navigation if the app navigates the WebView2 in a rapid succession
23026   /// away after the load for original navigation commenced, but before it completed.
23027 
23028   COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED,
23029 
23030   /// Indicates that the request redirect failed.
23031 
23032   COREWEBVIEW2_WEB_ERROR_STATUS_REDIRECT_FAILED,
23033 
23034   /// Indicates that an unexpected error occurred.
23035 
23036   COREWEBVIEW2_WEB_ERROR_STATUS_UNEXPECTED_ERROR,
23037 
23038   /// Indicates that user is prompted with a login, waiting on user action.
23039   /// Initial navigation to a login site will always return this even if app provides
23040   /// credential using BasicAuthenticationRequested.
23041   /// HTTP response status code in this case is 401.
23042   /// See status code reference here: https://developer.mozilla.org/docs/Web/HTTP/Status.
23043 
23044   COREWEBVIEW2_WEB_ERROR_STATUS_VALID_AUTHENTICATION_CREDENTIALS_REQUIRED,
23045 
23046   /// Indicates that user lacks proper authentication credentials for a proxy server.
23047   /// HTTP response status code in this case is 407.
23048   /// See status code reference here: https://developer.mozilla.org/docs/Web/HTTP/Status.
23049 
23050   COREWEBVIEW2_WEB_ERROR_STATUS_VALID_PROXY_AUTHENTICATION_REQUIRED,
23051 }
23052 alias int COREWEBVIEW2_WEB_ERROR_STATUS;
23053 
23054 /// Specifies the web resource request contexts.
23055 
23056 @("v1_enum")
23057 enum /+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT+/
23058 {
23059 
23060   /// Specifies all resources.
23061 
23062   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL,
23063 
23064   /// Specifies a document resource.
23065 
23066   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT,
23067 
23068   /// Specifies a CSS resource.
23069 
23070   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET,
23071 
23072   /// Specifies an image resource.
23073 
23074   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE,
23075 
23076   /// Specifies another media resource such as a video.
23077 
23078   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA,
23079 
23080   /// Specifies a font resource.
23081 
23082   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT,
23083 
23084   /// Specifies a script resource.
23085 
23086   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT,
23087 
23088   /// Specifies an XML HTTP request, Fetch and EventSource API communication.
23089 
23090   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST,
23091 
23092   /// Specifies a Fetch API communication.
23093 
23094   // Note that this isn't working. Fetch API requests are fired as a part
23095   // of COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST.
23096 
23097   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH,
23098 
23099   /// Specifies a TextTrack resource.
23100 
23101   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK,
23102 
23103   /// Specifies an EventSource API communication.
23104 
23105   // Note that this isn't working. EventSource API requests are fired as a part
23106   // of COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST.
23107 
23108   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE,
23109 
23110   /// Specifies a WebSocket API communication.
23111 
23112   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET,
23113 
23114   /// Specifies a Web App Manifest.
23115 
23116   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST,
23117 
23118   /// Specifies a Signed HTTP Exchange.
23119 
23120   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE,
23121 
23122   /// Specifies a Ping request.
23123 
23124   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING,
23125 
23126   /// Specifies a CSP Violation Report.
23127 
23128   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT,
23129 
23130   /// Specifies an other resource.
23131 
23132   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER
23133 }
23134 alias int COREWEBVIEW2_WEB_RESOURCE_CONTEXT;
23135 
23136 /// Specifies the reason for moving focus.
23137 
23138 @("v1_enum")
23139 enum /+ COREWEBVIEW2_MOVE_FOCUS_REASON+/
23140 {
23141 
23142   /// Specifies that the code is setting focus into WebView.
23143 
23144   COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC,
23145 
23146   /// Specifies that the focus is moving due to Tab traversal forward.
23147 
23148   COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT,
23149 
23150   /// Specifies that the focus is moving due to Tab traversal backward.
23151 
23152   COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS,
23153 }
23154 alias int COREWEBVIEW2_MOVE_FOCUS_REASON;
23155 
23156 /// Specifies the key event type that triggered an `AcceleratorKeyPressed`
23157 /// event.
23158 
23159 @("v1_enum")
23160 enum /+ COREWEBVIEW2_KEY_EVENT_KIND+/
23161 {
23162 
23163   /// Specifies that the key event type corresponds to window message
23164   /// `WM_KEYDOWN`.
23165 
23166   COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN,
23167 
23168   /// Specifies that the key event type corresponds to window message
23169   /// `WM_KEYUP`.
23170 
23171   COREWEBVIEW2_KEY_EVENT_KIND_KEY_UP,
23172 
23173   /// Specifies that the key event type corresponds to window message
23174   /// `WM_SYSKEYDOWN`.
23175 
23176   COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN,
23177 
23178   /// Specifies that the key event type corresponds to window message
23179   /// `WM_SYSKEYUP`.
23180 
23181   COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_UP,
23182 }
23183 alias int COREWEBVIEW2_KEY_EVENT_KIND;
23184 
23185 /// Specifies the browser process exit type used in the
23186 /// `ICoreWebView2BrowserProcessExitedEventArgs` interface.
23187 
23188 @("v1_enum")
23189 enum /+ COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND+/
23190 {
23191 
23192   /// Indicates that the browser process ended normally.
23193 
23194   COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_NORMAL,
23195 
23196   /// Indicates that the browser process ended unexpectedly.
23197   /// A `ProcessFailed` event will also be sent to listening WebViews from the
23198   /// `ICoreWebView2Environment` associated to the failed process.
23199 
23200   COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_FAILED
23201 }
23202 alias int COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND;
23203 
23204 /// Contains the information packed into the `LPARAM` sent to a Win32 key
23205 /// event.  For more information about `WM_KEYDOWN`, navigate to
23206 /// [WM_KEYDOWN message](/windows/win32/inputdev/wm-keydown).
23207 
23208 struct COREWEBVIEW2_PHYSICAL_KEY_STATUS
23209 {
23210 
23211   /// Specifies the repeat count for the current message.
23212 
23213   UINT32 RepeatCount;
23214 
23215   /// Specifies the scan code.
23216 
23217   UINT32 ScanCode;
23218 
23219   /// Indicates that the key is an extended key.
23220 
23221   BOOL IsExtendedKey;
23222 
23223   /// Indicates that a menu key is held down (context code).
23224 
23225   BOOL IsMenuKeyDown;
23226 
23227   /// Indicates that the key was held down.
23228 
23229   BOOL WasKeyDown;
23230 
23231   /// Indicates that the key was released.
23232 
23233   BOOL IsKeyReleased;
23234 }
23235 
23236 /// A value representing RGBA color (Red, Green, Blue, Alpha) for WebView2.
23237 /// Each component takes a value from 0 to 255, with 0 being no intensity
23238 /// and 255 being the highest intensity.
23239 
23240 struct COREWEBVIEW2_COLOR
23241 {
23242 
23243   /// Specifies the intensity of the Alpha ie. opacity value. 0 is transparent,
23244   /// 255 is opaque.
23245 
23246   BYTE A;
23247 
23248   /// Specifies the intensity of the Red color.
23249 
23250   BYTE R;
23251 
23252   /// Specifies the intensity of the Green color.
23253 
23254   BYTE G;
23255 
23256   /// Specifies the intensity of the Blue color.
23257 
23258   BYTE B;
23259 }
23260 
23261 /// Mouse event type used by SendMouseInput to convey the type of mouse event
23262 /// being sent to WebView. The values of this enum align with the matching
23263 /// WM_* window messages.
23264 
23265 @("v1_enum")
23266 enum /+ COREWEBVIEW2_MOUSE_EVENT_KIND+/
23267 {
23268 
23269   /// Mouse horizontal wheel scroll event, WM_MOUSEHWHEEL.
23270 
23271   COREWEBVIEW2_MOUSE_EVENT_KIND_HORIZONTAL_WHEEL = 0x020E,
23272 
23273   /// Left button double click mouse event, WM_LBUTTONDBLCLK.
23274 
23275   COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOUBLE_CLICK = 0x0203,
23276 
23277   /// Left button down mouse event, WM_LBUTTONDOWN.
23278 
23279   COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOWN = 0x0201,
23280 
23281   /// Left button up mouse event, WM_LBUTTONUP.
23282 
23283   COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_UP = 0x0202,
23284 
23285   /// Mouse leave event, WM_MOUSELEAVE.
23286 
23287   COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE = 0x02A3,
23288 
23289   /// Middle button double click mouse event, WM_MBUTTONDBLCLK.
23290 
23291   COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOUBLE_CLICK = 0x0209,
23292 
23293   /// Middle button down mouse event, WM_MBUTTONDOWN.
23294 
23295   COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOWN = 0x0207,
23296 
23297   /// Middle button up mouse event, WM_MBUTTONUP.
23298 
23299   COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_UP = 0x0208,
23300 
23301   /// Mouse move event, WM_MOUSEMOVE.
23302 
23303   COREWEBVIEW2_MOUSE_EVENT_KIND_MOVE = 0x0200,
23304 
23305   /// Right button double click mouse event, WM_RBUTTONDBLCLK.
23306 
23307   COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOUBLE_CLICK = 0x0206,
23308 
23309   /// Right button down mouse event, WM_RBUTTONDOWN.
23310 
23311   COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOWN = 0x0204,
23312 
23313   /// Right button up mouse event, WM_RBUTTONUP.
23314 
23315   COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_UP = 0x0205,
23316 
23317   /// Mouse wheel scroll event, WM_MOUSEWHEEL.
23318 
23319   COREWEBVIEW2_MOUSE_EVENT_KIND_WHEEL = 0x020A,
23320 
23321   /// First or second X button double click mouse event, WM_XBUTTONDBLCLK.
23322 
23323   COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOUBLE_CLICK = 0x020D,
23324 
23325   /// First or second X button down mouse event, WM_XBUTTONDOWN.
23326 
23327   COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOWN = 0x020B,
23328 
23329   /// First or second X button up mouse event, WM_XBUTTONUP.
23330 
23331   COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_UP = 0x020C,
23332 
23333   /// Mouse Right Button Down event over a nonclient area, WM_NCRBUTTONDOWN.
23334 
23335   COREWEBVIEW2_MOUSE_EVENT_KIND_NON_CLIENT_RIGHT_BUTTON_DOWN = 0x00A4,
23336 
23337   /// Mouse Right Button up event over a nonclient area, WM_NCRBUTTONUP.
23338 
23339   COREWEBVIEW2_MOUSE_EVENT_KIND_NON_CLIENT_RIGHT_BUTTON_UP = 0x00A5,
23340 }
23341 alias int COREWEBVIEW2_MOUSE_EVENT_KIND;
23342 
23343 /// Mouse event virtual keys associated with a COREWEBVIEW2_MOUSE_EVENT_KIND for
23344 /// SendMouseInput. These values can be combined into a bit flag if more than
23345 /// one virtual key is pressed for the event. The values of this enum align
23346 /// with the matching MK_* mouse keys.
23347 
23348 @("v1_enum")
23349 enum /+ COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS+/
23350 {
23351 
23352   /// No additional keys pressed.
23353 
23354   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_NONE     = 0x0,
23355 
23356   /// Left mouse button is down, MK_LBUTTON.
23357 
23358   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_LEFT_BUTTON  = 0x0001,
23359 
23360   /// Right mouse button is down, MK_RBUTTON.
23361 
23362   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_RIGHT_BUTTON  = 0x0002,
23363 
23364   /// SHIFT key is down, MK_SHIFT.
23365 
23366   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_SHIFT    = 0x0004,
23367 
23368   /// CTRL key is down, MK_CONTROL.
23369 
23370   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_CONTROL  = 0x0008,
23371 
23372   /// Middle mouse button is down, MK_MBUTTON.
23373 
23374   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_MIDDLE_BUTTON  = 0x0010,
23375 
23376   /// First X button is down, MK_XBUTTON1
23377 
23378   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON1 = 0x0020,
23379 
23380   /// Second X button is down, MK_XBUTTON2
23381 
23382   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON2 = 0x0040,
23383 }
23384 alias int COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS;
23385 // DEFINE_ENUM_FLAG_OPERATORS(COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS)
23386 
23387 /// Pointer event type used by SendPointerInput to convey the type of pointer
23388 /// event being sent to WebView. The values of this enum align with the
23389 /// matching WM_POINTER* window messages.
23390 
23391 @("v1_enum")
23392 enum /+ COREWEBVIEW2_POINTER_EVENT_KIND+/
23393 {
23394 
23395   /// Corresponds to WM_POINTERACTIVATE.
23396 
23397   COREWEBVIEW2_POINTER_EVENT_KIND_ACTIVATE = 0x024B,
23398 
23399   /// Corresponds to WM_POINTERDOWN.
23400 
23401   COREWEBVIEW2_POINTER_EVENT_KIND_DOWN = 0x0246,
23402 
23403   /// Corresponds to WM_POINTERENTER.
23404 
23405   COREWEBVIEW2_POINTER_EVENT_KIND_ENTER = 0x0249,
23406 
23407   /// Corresponds to WM_POINTERLEAVE.
23408 
23409   COREWEBVIEW2_POINTER_EVENT_KIND_LEAVE = 0x024A,
23410 
23411   /// Corresponds to WM_POINTERUP.
23412 
23413   COREWEBVIEW2_POINTER_EVENT_KIND_UP = 0x0247,
23414 
23415   /// Corresponds to WM_POINTERUPDATE.
23416 
23417   COREWEBVIEW2_POINTER_EVENT_KIND_UPDATE = 0x0245,
23418 }
23419 alias int COREWEBVIEW2_POINTER_EVENT_KIND;
23420 
23421 /// Mode for how the Bounds property is interpreted in relation to the RasterizationScale property.
23422 @("v1_enum")
23423 enum /+ COREWEBVIEW2_BOUNDS_MODE+/
23424 {
23425 
23426   /// Bounds property represents raw pixels. Physical size of Webview is not impacted by RasterizationScale.
23427 
23428   COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS,
23429 
23430   /// Bounds property represents logical pixels and the RasterizationScale property is used to get the physical size of the WebView.
23431 
23432   COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE,
23433 }
23434 alias int COREWEBVIEW2_BOUNDS_MODE;
23435 
23436 /// Specifies the client certificate kind.
23437 @("v1_enum") enum /+ COREWEBVIEW2_CLIENT_CERTIFICATE_KIND+/
23438 {
23439   /// Specifies smart card certificate.
23440   COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_SMART_CARD,
23441   /// Specifies PIN certificate.
23442   COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_PIN,
23443   /// Specifies other certificate.
23444   COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_OTHER,
23445 }
23446 alias int COREWEBVIEW2_CLIENT_CERTIFICATE_KIND;
23447 
23448 /// State of the download operation.
23449 @("v1_enum")
23450 enum /+ COREWEBVIEW2_DOWNLOAD_STATE+/
23451 {
23452   /// The download is in progress.
23453   COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS,
23454   /// The connection with the file host was broken. The `InterruptReason` property
23455   /// can be accessed from `ICoreWebView2DownloadOperation`. See
23456   /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON` for descriptions of kinds of
23457   /// interrupt reasons. Host can check whether an interrupted download can be
23458   /// resumed with the `CanResume` property on the `ICoreWebView2DownloadOperation`.
23459   /// Once resumed, a download is in the `COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS` state.
23460   COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED,
23461   /// The download completed successfully.
23462   COREWEBVIEW2_DOWNLOAD_STATE_COMPLETED,
23463 }
23464 alias int COREWEBVIEW2_DOWNLOAD_STATE;
23465 
23466 /// Reason why a download was interrupted.
23467 @("v1_enum")
23468 enum /+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON+/
23469 {
23470   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NONE,
23471 
23472   /// Generic file error.
23473   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
23474   /// Access denied due to security restrictions.
23475   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED,
23476   /// Disk full. User should free some space or choose a different location to
23477   /// store the file.
23478   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE,
23479   /// Result file path with file name is too long.
23480   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG,
23481   /// File is too large for file system.
23482   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE,
23483   /// Microsoft Defender Smartscreen detected a virus in the file.
23484   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_MALICIOUS,
23485   /// File was in use, too many files opened, or out of memory.
23486   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR,
23487   /// File blocked by local policy.
23488   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED_BY_POLICY,
23489   /// Security check failed unexpectedly. Microsoft Defender SmartScreen could
23490   /// not scan this file.
23491   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED,
23492   /// Seeking past the end of a file in opening a file, as part of resuming an
23493   /// interrupted download. The file did not exist or was not as large as
23494   /// expected. Partially downloaded file was truncated or deleted, and download
23495   /// will be restarted automatically.
23496   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT,
23497   /// Partial file did not match the expected hash and was deleted. Download
23498   /// will be restarted automatically.
23499   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH,
23500 
23501   /// Generic network error. User can retry the download manually.
23502   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
23503   /// Network operation timed out.
23504   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT,
23505   /// Network connection lost. User can retry the download manually.
23506   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED,
23507   /// Server has gone down. User can retry the download manually.
23508   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN,
23509   /// Network request invalid because original or redirected URI is invalid, has
23510   /// an unsupported scheme, or is disallowed by network policy.
23511   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST,
23512 
23513   /// Generic server error. User can retry the download manually.
23514   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED,
23515   /// Server does not support range requests.
23516   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE,
23517   /// Server does not have the requested data.
23518   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT,
23519   /// Server did not authorize access to resource.
23520   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED,
23521   /// Server certificate problem.
23522   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CERTIFICATE_PROBLEM,
23523   /// Server access forbidden.
23524   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN,
23525   /// Unexpected server response. Responding server may not be intended server.
23526   /// User can retry the download manually.
23527   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNEXPECTED_RESPONSE,
23528   /// Server sent fewer bytes than the Content-Length header. Content-length
23529   /// header may be invalid or connection may have closed. Download is treated
23530   /// as complete unless there are
23531   /// [strong validators](https://tools.ietf.org/html/rfc7232#section-2) present
23532   /// to interrupt the download.
23533   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH,
23534   /// Unexpected cross-origin redirect.
23535   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT,
23536 
23537   /// User canceled the download.
23538   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED,
23539   /// User shut down the WebView. Resuming downloads that were interrupted
23540   /// during shutdown is not yet supported.
23541   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN,
23542   /// User paused the download.
23543   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_PAUSED,
23544 
23545   /// WebView crashed.
23546   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_DOWNLOAD_PROCESS_CRASHED,
23547 }
23548 alias int COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON;
23549 
23550 /// The orientation for printing, used by the `Orientation` property on
23551 /// `ICoreWebView2PrintSettings`.
23552 @("v1_enum")
23553 enum /+ COREWEBVIEW2_PRINT_ORIENTATION+/
23554 {
23555   /// Print the page(s) in portrait orientation.
23556   COREWEBVIEW2_PRINT_ORIENTATION_PORTRAIT,
23557 
23558   /// Print the page(s) in landscape orientation.
23559   COREWEBVIEW2_PRINT_ORIENTATION_LANDSCAPE,
23560 }
23561 alias int COREWEBVIEW2_PRINT_ORIENTATION;
23562 
23563 /// The default download dialog can be aligned to any of the WebView corners
23564 /// by setting the `DefaultDownloadDialogCornerAlignment` property. The default
23565 /// position is top-right corner.
23566 @("v1_enum")
23567 enum /+ COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT+/
23568 {
23569 
23570   /// Top-left corner of the WebView.
23571   COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_LEFT,
23572 
23573   /// Top-right corner of the WebView.
23574   COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_RIGHT,
23575 
23576   /// Bottom-left corner of the WebView.
23577   COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_LEFT,
23578 
23579   /// Bottom-right corner of the WebView.
23580   COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_RIGHT,
23581 }
23582 alias int COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT;
23583 
23584 /// Indicates the process type used in the ICoreWebView2ProcessInfo interface.
23585 @("v1_enum")
23586 enum /+ COREWEBVIEW2_PROCESS_KIND+/
23587 {
23588   /// Indicates the browser process kind.
23589   COREWEBVIEW2_PROCESS_KIND_BROWSER,
23590 
23591   /// Indicates the render process kind.
23592   COREWEBVIEW2_PROCESS_KIND_RENDERER,
23593 
23594   /// Indicates the utility process kind.
23595   COREWEBVIEW2_PROCESS_KIND_UTILITY,
23596 
23597   /// Indicates the sandbox helper process kind.
23598   COREWEBVIEW2_PROCESS_KIND_SANDBOX_HELPER,
23599 
23600   /// Indicates the GPU process kind.
23601   COREWEBVIEW2_PROCESS_KIND_GPU,
23602 
23603   /// Indicates the PPAPI plugin process kind.
23604   COREWEBVIEW2_PROCESS_KIND_PPAPI_PLUGIN,
23605 
23606   /// Indicates the PPAPI plugin broker process kind.
23607   COREWEBVIEW2_PROCESS_KIND_PPAPI_BROKER,
23608 }
23609 alias int COREWEBVIEW2_PROCESS_KIND;
23610 
23611 // PDF toolbar item. This enum must be in sync with ToolBarItem in pdf-store-data-types.ts
23612 /// Specifies the PDF toolbar item types used for the `ICoreWebView2Settings::put_HiddenPdfToolbarItems` method.
23613 @("v1_enum")
23614 enum /+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS+/
23615 {
23616 
23617   /// No item
23618   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_NONE  = 0x0,
23619 
23620   /// The save button
23621   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE  = 0x0001,
23622 
23623   /// The print button
23624   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PRINT  = 0x0002,
23625 
23626   /// The save as button
23627   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE_AS  = 0x0004,
23628 
23629     /// The zoom in button
23630   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ZOOM_IN  = 0x0008,
23631 
23632   /// The zoom out button
23633   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ZOOM_OUT  = 0x0010,
23634 
23635   /// The rotate button
23636   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ROTATE  = 0x0020,
23637 
23638   /// The fit page button
23639   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_FIT_PAGE  = 0x0040,
23640 
23641   /// The page layout button
23642   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_LAYOUT  = 0x0080,
23643 
23644   /// The bookmarks button
23645   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_BOOKMARKS  = 0x0100,
23646 
23647   /// The page select button
23648   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_SELECTOR  = 0x0200,
23649 
23650   /// The search button
23651   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SEARCH  = 0x0400,
23652 
23653   /// The full screen button
23654   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_FULL_SCREEN  = 0x0800,
23655 
23656   /// The more settings button
23657   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_MORE_SETTINGS  = 0x1000,
23658 }
23659 alias int COREWEBVIEW2_PDF_TOOLBAR_ITEMS;
23660 // DEFINE_ENUM_FLAG_OPERATORS(COREWEBVIEW2_PDF_TOOLBAR_ITEMS)
23661 
23662 /// Indicates the kind of context for which the context menu was created
23663 /// for the `ICoreWebView2ContextMenuTarget::get_Kind` method.
23664 /// This enum will always represent the active element that caused the context menu request.
23665 /// If there is a selection with multiple images, audio and text, for example, the element that
23666 /// the end user right clicks on within this selection will be the option represented by this enum.
23667 @("v1_enum")
23668 enum /+ COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND+/
23669 {
23670     /// Indicates that the context menu was created for the page without any additional content.
23671     COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_PAGE,
23672 
23673     /// Indicates that the context menu was created for an image element.
23674     COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_IMAGE,
23675 
23676     /// Indicates that the context menu was created for selected text.
23677     COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_SELECTED_TEXT,
23678 
23679     /// Indicates that the context menu was created for an audio element.
23680     COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_AUDIO,
23681 
23682     /// Indicates that the context menu was created for a video element.
23683     COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_VIDEO,
23684 }
23685 alias int COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND;
23686 
23687 /// Specifies the menu item kind
23688 /// for the `ICoreWebView2ContextMenuItem::get_Kind` method
23689 @("v1_enum")
23690 enum /+ COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND+/
23691 {
23692     /// Specifies a command menu item kind.
23693     COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_COMMAND,
23694 
23695     /// Specifies a check box menu item kind. `ContextMenuItem` objects of this kind
23696     /// will need the `IsChecked` property to determine current state of the check box.
23697     COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_CHECK_BOX,
23698 
23699     /// Specifies a radio button menu item kind. `ContextMenuItem` objects of this kind
23700     /// will need the `IsChecked` property to determine current state of the radio button.
23701     COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_RADIO,
23702 
23703     /// Specifies a separator menu item kind. `ContextMenuItem` objects of this kind
23704     /// are used to signal a visual separator with no functionality.
23705     COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_SEPARATOR,
23706 
23707     /// Specifies a submenu menu item kind. `ContextMenuItem` objects of this kind will contain
23708     /// a `ContextMenuItemCollection` of its children `ContextMenuItem` objects.
23709     COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_SUBMENU,
23710 }
23711 alias int COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND;
23712 
23713 /// An enum to represent the options for WebView2 color scheme: auto, light, or dark.
23714 @("v1_enum")
23715 enum /+ COREWEBVIEW2_PREFERRED_COLOR_SCHEME+/
23716 {
23717     /// Auto color scheme.
23718     COREWEBVIEW2_PREFERRED_COLOR_SCHEME_AUTO,
23719 
23720     /// Light color scheme.
23721     COREWEBVIEW2_PREFERRED_COLOR_SCHEME_LIGHT,
23722 
23723     /// Dark color scheme.
23724     COREWEBVIEW2_PREFERRED_COLOR_SCHEME_DARK
23725 }
23726 alias int COREWEBVIEW2_PREFERRED_COLOR_SCHEME;
23727 
23728 /// Specifies the datatype for the
23729 /// `ICoreWebView2Profile2::ClearBrowsingData` method.
23730 @("v1_enum")
23731 enum /+ COREWEBVIEW2_BROWSING_DATA_KINDS+/
23732 {
23733 
23734     /// Specifies file systems data.
23735     COREWEBVIEW2_BROWSING_DATA_KINDS_FILE_SYSTEMS = 1 << 0,
23736 
23737     /// Specifies data stored by the IndexedDB DOM feature.
23738     COREWEBVIEW2_BROWSING_DATA_KINDS_INDEXED_DB = 1 << 1,
23739 
23740     /// Specifies data stored by the localStorage DOM API.
23741     COREWEBVIEW2_BROWSING_DATA_KINDS_LOCAL_STORAGE = 1 << 2,
23742 
23743     /// Specifies data stored by the Web SQL database DOM API.
23744     COREWEBVIEW2_BROWSING_DATA_KINDS_WEB_SQL = 1 << 3,
23745 
23746     /// Specifies data stored by the CacheStorage DOM API.
23747     COREWEBVIEW2_BROWSING_DATA_KINDS_CACHE_STORAGE = 1 << 4,
23748 
23749     /// Specifies DOM storage data, now and future. This browsing data kind is
23750     /// inclusive of COREWEBVIEW2_BROWSING_DATA_KINDS_FILE_SYSTEMS,
23751     /// COREWEBVIEW2_BROWSING_DATA_KINDS_INDEXED_DB,
23752     /// COREWEBVIEW2_BROWSING_DATA_KINDS_LOCAL_STORAGE,
23753     /// COREWEBVIEW2_BROWSING_DATA_KINDS_WEB_SQL,
23754     /// COREWEBVIEW2_BROWSING_DATA_KINDS_SERVICE_WORKERS,
23755     /// COREWEBVIEW2_BROWSING_DATA_KINDS_CACHE_STORAGE,
23756     /// and some other data kinds not listed yet to keep consistent with
23757     /// [DOM-accessible storage](https://www.w3.org/TR/clear-site-data/#storage).
23758     COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_DOM_STORAGE = 1 << 5,
23759 
23760     /// Specifies HTTP cookies data.
23761     COREWEBVIEW2_BROWSING_DATA_KINDS_COOKIES = 1 << 6,
23762 
23763     /// Specifies all site data, now and future. This browsing data kind
23764     /// is inclusive of COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_DOM_STORAGE and
23765     /// COREWEBVIEW2_BROWSING_DATA_KINDS_COOKIES. New site data types
23766     /// may be added to this data kind in the future.
23767     COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_SITE = 1 << 7,
23768 
23769     /// Specifies disk cache.
23770     COREWEBVIEW2_BROWSING_DATA_KINDS_DISK_CACHE = 1 << 8,
23771 
23772     /// Specifies download history data.
23773     COREWEBVIEW2_BROWSING_DATA_KINDS_DOWNLOAD_HISTORY = 1 << 9,
23774 
23775     /// Specifies general autofill form data.
23776     /// This excludes password information and includes information like:
23777     /// names, street and email addresses, phone numbers, and arbitrary input.
23778     /// This also includes payment data.
23779     COREWEBVIEW2_BROWSING_DATA_KINDS_GENERAL_AUTOFILL = 1 << 10,
23780 
23781     /// Specifies password autosave data.
23782     COREWEBVIEW2_BROWSING_DATA_KINDS_PASSWORD_AUTOSAVE = 1 << 11,
23783 
23784     /// Specifies browsing history data.
23785     COREWEBVIEW2_BROWSING_DATA_KINDS_BROWSING_HISTORY = 1 << 12,
23786 
23787     /// Specifies settings data.
23788     COREWEBVIEW2_BROWSING_DATA_KINDS_SETTINGS = 1 << 13,
23789 
23790     /// Specifies profile data that should be wiped to make it look like a new profile.
23791     /// This does not delete account-scoped data like passwords but will remove access
23792     /// to account-scoped data by signing the user out.
23793     /// Specifies all profile data, now and future. New profile data types may be added
23794     /// to this data kind in the future.
23795     /// This browsing data kind is inclusive of COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_SITE,
23796     /// COREWEBVIEW2_BROWSING_DATA_KINDS_DISK_CACHE,
23797     /// COREWEBVIEW2_BROWSING_DATA_KINDS_DOWNLOAD_HISTORY,
23798     /// COREWEBVIEW2_BROWSING_DATA_KINDS_GENERAL_AUTOFILL,
23799     /// COREWEBVIEW2_BROWSING_DATA_KINDS_PASSWORD_AUTOSAVE,
23800     /// COREWEBVIEW2_BROWSING_DATA_KINDS_BROWSING_HISTORY, and
23801     /// COREWEBVIEW2_BROWSING_DATA_KINDS_SETTINGS.
23802     COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_PROFILE =  1 << 14,
23803 
23804     /// Specifies service workers registered for an origin, and clear will result in
23805     /// termination and deregistration of them.
23806     COREWEBVIEW2_BROWSING_DATA_KINDS_SERVICE_WORKERS = 1 << 15,
23807 }
23808 alias int COREWEBVIEW2_BROWSING_DATA_KINDS;
23809 // DEFINE_ENUM_FLAG_OPERATORS(COREWEBVIEW2_BROWSING_DATA_KINDS)
23810 
23811 /// Specifies the action type when server certificate error is detected to be
23812 /// used in the `ICoreWebView2ServerCertificateErrorDetectedEventArgs`
23813 /// interface.
23814 @("v1_enum") enum /+ COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION+/
23815 {
23816   /// Indicates to ignore the warning and continue the request with the TLS
23817   /// certificate. This decision is cached for the RequestUri's host and the
23818   /// server certificate in the session.
23819   COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_ALWAYS_ALLOW,
23820 
23821   /// Indicates to reject the certificate and cancel the request.
23822   COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_CANCEL,
23823 
23824   /// Indicates to display the default TLS interstitial error page to user for
23825   /// page navigations.
23826   /// For others TLS certificate is rejected and the request is cancelled.
23827   COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_DEFAULT
23828 }
23829 alias int COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION;
23830 
23831 /// Specifies the image format to use for favicon.
23832 @("v1_enum")
23833 enum /+ COREWEBVIEW2_FAVICON_IMAGE_FORMAT+/
23834 {
23835     /// Indicates that the PNG image format is used.
23836     COREWEBVIEW2_FAVICON_IMAGE_FORMAT_PNG,
23837 
23838     /// Indicates the JPEG image format is used.
23839     COREWEBVIEW2_FAVICON_IMAGE_FORMAT_JPEG,
23840 }
23841 alias int COREWEBVIEW2_FAVICON_IMAGE_FORMAT;
23842 
23843 /// Specifies the print dialog kind.
23844 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_DIALOG_KIND+/
23845 {
23846   /// Opens the browser print preview dialog.
23847   COREWEBVIEW2_PRINT_DIALOG_KIND_BROWSER,
23848 
23849   /// Opens the system print dialog.
23850   COREWEBVIEW2_PRINT_DIALOG_KIND_SYSTEM,
23851 }
23852 alias int COREWEBVIEW2_PRINT_DIALOG_KIND;
23853 
23854 /// Specifies the duplex option for a print.
23855 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_DUPLEX+/
23856 {
23857   /// The default duplex for a printer.
23858   COREWEBVIEW2_PRINT_DUPLEX_DEFAULT,
23859 
23860   /// Print on only one side of the sheet.
23861   COREWEBVIEW2_PRINT_DUPLEX_ONE_SIDED,
23862 
23863   /// Print on both sides of the sheet, flipped along the long edge.
23864   COREWEBVIEW2_PRINT_DUPLEX_TWO_SIDED_LONG_EDGE,
23865 
23866   /// Print on both sides of the sheet, flipped along the short edge.
23867   COREWEBVIEW2_PRINT_DUPLEX_TWO_SIDED_SHORT_EDGE,
23868 }
23869 alias int COREWEBVIEW2_PRINT_DUPLEX;
23870 
23871 /// Specifies the color mode for a print.
23872 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_COLOR_MODE+/
23873 {
23874   /// The default color mode for a printer.
23875   COREWEBVIEW2_PRINT_COLOR_MODE_DEFAULT,
23876 
23877   /// Indicate that the printed output will be in color.
23878   COREWEBVIEW2_PRINT_COLOR_MODE_COLOR,
23879 
23880   /// Indicate that the printed output will be in shades of gray.
23881   COREWEBVIEW2_PRINT_COLOR_MODE_GRAYSCALE,
23882 }
23883 alias int COREWEBVIEW2_PRINT_COLOR_MODE;
23884 
23885 /// Specifies the collation for a print.
23886 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_COLLATION+/
23887 {
23888   /// The default collation for a printer.
23889   COREWEBVIEW2_PRINT_COLLATION_DEFAULT,
23890 
23891   /// Indicate that the collation has been selected for the printed output.
23892   COREWEBVIEW2_PRINT_COLLATION_COLLATED,
23893 
23894   /// Indicate that the collation has not been selected for the printed output.
23895   COREWEBVIEW2_PRINT_COLLATION_UNCOLLATED,
23896 }
23897 alias int COREWEBVIEW2_PRINT_COLLATION;
23898 
23899 /// Specifies the media size for a print.
23900 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_MEDIA_SIZE+/
23901 {
23902   /// The default media size for a printer.
23903   COREWEBVIEW2_PRINT_MEDIA_SIZE_DEFAULT,
23904 
23905   /// Indicate custom media size that is specific to the printer.
23906   COREWEBVIEW2_PRINT_MEDIA_SIZE_CUSTOM,
23907 }
23908 alias int COREWEBVIEW2_PRINT_MEDIA_SIZE;
23909 
23910 /// Indicates the status for printing.
23911 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_STATUS+/
23912 {
23913   /// Indicates that the print operation is succeeded.
23914   COREWEBVIEW2_PRINT_STATUS_SUCCEEDED,
23915 
23916   /// Indicates that the printer is not available.
23917   COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE,
23918 
23919   /// Indicates that the print operation is failed.
23920   COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR,
23921 }
23922 alias int COREWEBVIEW2_PRINT_STATUS;
23923 
23924 /// Tracking prevention levels.
23925 @("v1_enum") enum /+ COREWEBVIEW2_TRACKING_PREVENTION_LEVEL+/
23926 {
23927   /// Tracking prevention is turned off.
23928   COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE,
23929   /// The least restrictive level of tracking prevention. Set to this level to
23930   /// protect against malicious trackers but allows most other trackers and
23931   /// personalize content and ads.
23932   ///
23933   /// See [Current tracking prevention
23934   /// behavior](/microsoft-edge/web-platform/tracking-prevention#current-tracking-prevention-behavior)
23935   /// for fine-grained information on what is being blocked with this level and
23936   /// can change with different Edge versions.
23937   COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BASIC,
23938   /// The default level of tracking prevention. Set to this level to
23939   /// protect against social media tracking on top of malicious trackers.
23940   /// Content and ads will likely be less personalized.
23941   ///
23942   /// See [Current tracking prevention
23943   /// behavior](/microsoft-edge/web-platform/tracking-prevention#current-tracking-prevention-behavior)
23944   /// for fine-grained information on what is being blocked with this level and
23945   /// can change with different Edge versions.
23946   COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED,
23947   /// The most restrictive level of tracking prevention. Set to this level to
23948   /// protect
23949   /// against malicious trackers and most trackers across sites. Content and ads
23950   /// will likely have minimal personalization.
23951   ///
23952   /// This level blocks the most trackers but could cause some websites to not
23953   /// behave as expected.
23954   ///
23955   /// See [Current tracking prevention
23956   /// behavior](/microsoft-edge/web-platform/tracking-prevention#current-tracking-prevention-behavior)
23957   /// for fine-grained information on what is being blocked with this level and
23958   /// can change with different Edge versions.
23959   COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_STRICT,
23960 }
23961 alias int COREWEBVIEW2_TRACKING_PREVENTION_LEVEL;
23962 
23963 /// Specifies the desired access from script to `CoreWebView2SharedBuffer`.
23964 @("v1_enum")
23965 enum /+ COREWEBVIEW2_SHARED_BUFFER_ACCESS+/
23966 {
23967   /// Script from web page only has read access to the shared buffer.
23968   COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY,
23969 
23970   /// Script from web page has read and write access to the shared buffer.
23971   COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_WRITE
23972 }
23973 alias int COREWEBVIEW2_SHARED_BUFFER_ACCESS;
23974 
23975 /// Specifies memory usage target level of WebView.
23976 @("v1_enum")
23977 enum /+ COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL+/
23978 {
23979   /// Specifies normal memory usage target level.
23980   COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_NORMAL,
23981 
23982   /// Specifies low memory usage target level.
23983   /// Used for inactivate WebView for reduced memory consumption.
23984   COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_LOW,
23985 }
23986 alias int COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL;
23987 
23988 /// Specifies the navigation kind of each navigation.
23989 @("v1_enum")
23990 enum /+ COREWEBVIEW2_NAVIGATION_KIND+/
23991 {
23992   /// A navigation caused by `CoreWebView2.Reload()`, `location.reload()`, the end user
23993   /// using F5 or other UX, or other reload mechanisms to reload the current document
23994   /// without modifying the navigation history.
23995   COREWEBVIEW2_NAVIGATION_KIND_RELOAD = 0,
23996 
23997   /// A navigation back or forward to a different entry in the session navigation history,
23998   /// like via `CoreWebView2.Back()`, `location.back()`, the end user pressing Alt+Left
23999   /// or other UX, or other mechanisms to navigate back or forward in the current
24000   /// session navigation history.
24001   ///
24002   // Note: This kind doesn't distinguish back or forward, because we can't
24003   // distinguish it from origin source `blink.mojom.NavigationType`.
24004   COREWEBVIEW2_NAVIGATION_KIND_BACK_OR_FORWARD = 1,
24005 
24006   /// A navigation to another document, which can be caused by `CoreWebView2.Navigate()`,
24007   /// `window.location.href = ...`, or other WebView2 or DOM APIs that navigate to a new URI.
24008   COREWEBVIEW2_NAVIGATION_KIND_NEW_DOCUMENT = 2,
24009 }
24010 alias int COREWEBVIEW2_NAVIGATION_KIND;
24011 
24012 /// Indicates the frame type used in the `ICoreWebView2FrameInfo` interface.
24013 @("v1_enum")
24014 enum /+ COREWEBVIEW2_FRAME_KIND+/
24015 {
24016   /// Indicates that the frame is an unknown type frame. We may extend this enum
24017   /// type to identify more frame kinds in the future.
24018   COREWEBVIEW2_FRAME_KIND_UNKNOWN,
24019   /// Indicates that the frame is a primary main frame(webview).
24020   COREWEBVIEW2_FRAME_KIND_MAIN_FRAME,
24021   /// Indicates that the frame is an iframe.
24022   COREWEBVIEW2_FRAME_KIND_IFRAME,
24023   /// Indicates that the frame is an embed element.
24024   COREWEBVIEW2_FRAME_KIND_EMBED,
24025   /// Indicates that the frame is an object element.
24026   COREWEBVIEW2_FRAME_KIND_OBJECT,
24027 }
24028 alias int COREWEBVIEW2_FRAME_KIND;
24029 
24030 // End of enums and structs
24031 
24032 /// WebView2 enables you to host web content using the latest Microsoft Edge
24033 /// browser and web technology.
24034 
24035 const GUID IID_ICoreWebView2 = ICoreWebView2.iid;
24036 
24037 interface ICoreWebView2 : IUnknown
24038 {
24039     static const GUID iid = { 0x76eceacb,0x0462,0x4d94,[ 0xac,0x83,0x42,0x3a,0x67,0x93,0x77,0x5e ] };
24040 
24041   /// The `ICoreWebView2Settings` object contains various modifiable settings
24042   /// for the running WebView.
24043 
24044   @(" propget")
24045 	HRESULT get_Settings(@("out, retval") ICoreWebView2Settings * settings);
24046 
24047   /// The URI of the current top level document.  This value potentially
24048   /// changes as a part of the `SourceChanged` event that runs for some cases
24049   /// such as navigating to a different site or fragment navigations.  It
24050   /// remains the same for other types of navigations such as page refreshes
24051   /// or `history.pushState` with the same URL as the current page.
24052   ///
24053   /// The caller must free the returned string with `CoTaskMemFree`.  See
24054   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
24055   ///
24056   /// \snippet ControlComponent.cpp SourceChanged
24057   @(" propget")
24058 	HRESULT get_Source(@("out, retval") LPWSTR* uri);
24059 
24060   /// Cause a navigation of the top-level document to run to the specified URI.
24061   /// For more information, navigate to [Navigation
24062   /// events](/microsoft-edge/webview2/concepts/navigation-events).
24063   ///
24064   /// \> [!NOTE]\n\> This operation starts a navigation and the corresponding
24065   /// `NavigationStarting` event triggers sometime after `Navigate` runs.
24066   ///
24067   /// \snippet ControlComponent.cpp Navigate
24068   HRESULT Navigate(in LPCWSTR uri);
24069 
24070   /// Initiates a navigation to htmlContent as source HTML of a new document.
24071   /// The `htmlContent` parameter may not be larger than 2 MB (2 * 1024 * 1024 bytes) in total size.
24072   /// The origin of the new page is `about:blank`.
24073   ///
24074   /// ```cpp
24075   ///    SetVirtualHostNameToFolderMapping(
24076   ///        L"appassets.example", L"assets",
24077   ///        COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY);
24078   ///
24079   ///    WCHAR c_navString[] = LR"
24080   ///    <head><link rel='stylesheet' href ='http://appassets.example/wv2.css'/></head>
24081   ///    <body>
24082   ///      <img src='http://appassets.example/wv2.png' />
24083   ///      <p><a href='http://appassets.example/winrt_test.txt'>Click me</a></p>
24084   ///    </body>";
24085   ///    m_webView->NavigateToString(c_navString);
24086   /// ```
24087   /// \snippet SettingsComponent.cpp NavigateToString
24088   HRESULT NavigateToString(in LPCWSTR htmlContent);
24089 
24090   /// Add an event handler for the `NavigationStarting` event.
24091   /// `NavigationStarting` runs when the WebView main frame is requesting
24092   /// permission to navigate to a different URI.  Redirects trigger this
24093   /// operation as well, and the navigation id is the same as the original
24094   /// one.
24095   ///
24096   /// Navigations will be blocked until all `NavigationStarting` event handlers
24097   /// return.
24098   ///
24099   /// \snippet SettingsComponent.cpp NavigationStarting
24100   HRESULT add_NavigationStarting(
24101       /+[in]+/ ICoreWebView2NavigationStartingEventHandler eventHandler,
24102       @("out") EventRegistrationToken* token);
24103 
24104   /// Remove an event handler previously added with `add_NavigationStarting`.
24105   HRESULT remove_NavigationStarting(
24106       in EventRegistrationToken token);
24107 
24108   /// Add an event handler for the `ContentLoading` event.  `ContentLoading`
24109   /// triggers before any content is loaded, including scripts added with
24110   /// `AddScriptToExecuteOnDocumentCreated`.  `ContentLoading` does not trigger
24111   /// if a same page navigation occurs (such as through `fragment`
24112   /// navigations or `history.pushState` navigations).  This operation
24113   /// follows the `NavigationStarting` and `SourceChanged` events and precedes
24114   /// the `HistoryChanged` and `NavigationCompleted` events.
24115   HRESULT add_ContentLoading(
24116       /+[in]+/ ICoreWebView2ContentLoadingEventHandler eventHandler,
24117       @("out") EventRegistrationToken* token);
24118 
24119   /// Remove an event handler previously added with `add_ContentLoading`.
24120   HRESULT remove_ContentLoading(
24121       in EventRegistrationToken token);
24122 
24123   /// Add an event handler for the `SourceChanged` event.  `SourceChanged`
24124   /// triggers when the `Source` property changes.  `SourceChanged` runs when
24125   /// navigating to a different site or fragment navigations.  It does not
24126   /// trigger for other types of navigations such as page refreshes or
24127   /// `history.pushState` with the same URL as the current page.
24128   /// `SourceChanged` runs before `ContentLoading` for navigation to a new
24129   /// document.
24130   ///
24131   /// \snippet ControlComponent.cpp SourceChanged
24132   HRESULT add_SourceChanged(
24133       /+[in]+/ ICoreWebView2SourceChangedEventHandler eventHandler,
24134       @("out") EventRegistrationToken* token);
24135 
24136   /// Remove an event handler previously added with `add_SourceChanged`.
24137   HRESULT remove_SourceChanged(
24138       in EventRegistrationToken token);
24139 
24140   /// Add an event handler for the `HistoryChanged` event.  `HistoryChanged` is
24141   /// raised for changes to joint session history, which consists of top-level
24142   /// and manual frame navigations.  Use `HistoryChanged` to verify that the
24143   /// `CanGoBack` or `CanGoForward` value has changed.  `HistoryChanged` also
24144   /// runs for using `GoBack` or `GoForward`.  `HistoryChanged` runs after
24145   /// `SourceChanged` and `ContentLoading`.  `CanGoBack` is false for
24146   /// navigations initiated through ICoreWebView2Frame APIs if there has not yet
24147   /// been a user gesture.
24148   ///
24149   /// \snippet ControlComponent.cpp HistoryChanged
24150   HRESULT add_HistoryChanged(
24151       /+[in]+/ ICoreWebView2HistoryChangedEventHandler eventHandler,
24152       @("out") EventRegistrationToken* token);
24153 
24154   /// Remove an event handler previously added with `add_HistoryChanged`.
24155   HRESULT remove_HistoryChanged(
24156       in EventRegistrationToken token);
24157 
24158   /// Add an event handler for the `NavigationCompleted` event.
24159   /// `NavigationCompleted` runs when the WebView has completely loaded
24160   /// (concurrently when `body.onload` runs) or loading stopped with error.
24161   ///
24162   /// \snippet ControlComponent.cpp NavigationCompleted
24163   HRESULT add_NavigationCompleted(
24164       /+[in]+/ ICoreWebView2NavigationCompletedEventHandler eventHandler,
24165       @("out") EventRegistrationToken* token);
24166 
24167   /// Remove an event handler previously added with `add_NavigationCompleted`.
24168   HRESULT remove_NavigationCompleted(
24169       in EventRegistrationToken token);
24170 
24171   /// Add an event handler for the `FrameNavigationStarting` event.
24172   /// `FrameNavigationStarting` triggers when a child frame in the WebView
24173   /// requests permission to navigate to a different URI.  Redirects trigger
24174   /// this operation as well, and the navigation id is the same as the original
24175   /// one.
24176   ///
24177   /// Navigations will be blocked until all `FrameNavigationStarting` event
24178   /// handlers return.
24179   ///
24180   /// \snippet SettingsComponent.cpp FrameNavigationStarting
24181   HRESULT add_FrameNavigationStarting(
24182       /+[in]+/ ICoreWebView2NavigationStartingEventHandler eventHandler,
24183       @("out") EventRegistrationToken* token);
24184 
24185   /// Remove an event handler previously added with
24186   /// `add_FrameNavigationStarting`.
24187   HRESULT remove_FrameNavigationStarting(
24188       in EventRegistrationToken token);
24189 
24190   /// Add an event handler for the `FrameNavigationCompleted` event.
24191   /// `FrameNavigationCompleted` triggers when a child frame has completely
24192   /// loaded (concurrently when `body.onload` has triggered) or loading stopped with error.
24193   ///
24194   /// \snippet ControlComponent.cpp FrameNavigationCompleted
24195   HRESULT add_FrameNavigationCompleted(
24196       /+[in]+/ ICoreWebView2NavigationCompletedEventHandler eventHandler,
24197       @("out") EventRegistrationToken* token);
24198 
24199   /// Remove an event handler previously added with
24200   /// `add_FrameNavigationCompleted`.
24201   HRESULT remove_FrameNavigationCompleted(
24202       in EventRegistrationToken token);
24203 
24204   /// Add an event handler for the `ScriptDialogOpening` event.
24205   /// `ScriptDialogOpening` runs when a JavaScript dialog (`alert`, `confirm`,
24206   /// `prompt`, or `beforeunload`) displays for the webview.  This event only
24207   /// triggers if the `ICoreWebView2Settings::AreDefaultScriptDialogsEnabled`
24208   /// property is set to `FALSE`.  The `ScriptDialogOpening` event suppresses
24209   /// dialogs or replaces default dialogs with custom dialogs.
24210   ///
24211   /// If a deferral is not taken on the event args, the subsequent scripts are
24212   /// blocked until the event handler returns.  If a deferral is taken, the
24213   /// scripts are blocked until the deferral is completed.
24214   ///
24215   /// \snippet SettingsComponent.cpp ScriptDialogOpening
24216   HRESULT add_ScriptDialogOpening(
24217       /+[in]+/ ICoreWebView2ScriptDialogOpeningEventHandler eventHandler,
24218       @("out") EventRegistrationToken* token);
24219 
24220   /// Remove an event handler previously added with `add_ScriptDialogOpening`.
24221   HRESULT remove_ScriptDialogOpening(
24222       in EventRegistrationToken token);
24223 
24224   /// Add an event handler for the `PermissionRequested` event.
24225   /// `PermissionRequested` runs when content in a WebView requests permission
24226   /// to access some privileged resources.
24227   ///
24228   /// If a deferral is not taken on the event args, the subsequent scripts are
24229   /// blocked until the event handler returns.  If a deferral is taken, the
24230   /// scripts are blocked until the deferral is completed.
24231   ///
24232   /// \snippet SettingsComponent.cpp PermissionRequested0
24233   /// \snippet SettingsComponent.cpp PermissionRequested1
24234   HRESULT add_PermissionRequested(
24235       /+[in]+/ ICoreWebView2PermissionRequestedEventHandler eventHandler,
24236       @("out") EventRegistrationToken* token);
24237 
24238   /// Remove an event handler previously added with `add_PermissionRequested`.
24239   HRESULT remove_PermissionRequested(
24240       in EventRegistrationToken token);
24241 
24242   /// Add an event handler for the `ProcessFailed` event.
24243   /// `ProcessFailed` runs when any of the processes in the
24244   /// [WebView2 Process Group](/microsoft-edge/webview2/concepts/process-model?tabs=csharp#processes-in-the-webview2-runtime)
24245   /// encounters one of the following conditions:
24246   ///
24247   /// Condition | Details
24248   /// ---|---
24249   /// Unexpected exit | The process indicated by the event args has exited unexpectedly (usually due to a crash). The failure might or might not be recoverable and some failures are auto-recoverable.
24250   /// Unresponsiveness | The process indicated by the event args has become unresponsive to user input. This is only reported for renderer processes, and will run every few seconds until the process becomes responsive again.
24251   ///
24252   /// \> [!NOTE]\n\> When the failing process is the browser process, a
24253   /// `ICoreWebView2Environment5::BrowserProcessExited` event will run too.
24254   ///
24255   /// Your application can use `ICoreWebView2ProcessFailedEventArgs` and
24256   /// `ICoreWebView2ProcessFailedEventArgs2` to identify which condition and
24257   /// process the event is for, and to collect diagnostics and handle recovery
24258   /// if necessary. For more details about which cases need to be handled by
24259   /// your application, see `COREWEBVIEW2_PROCESS_FAILED_KIND`.
24260   ///
24261   /// \snippet ProcessComponent.cpp ProcessFailed
24262   HRESULT add_ProcessFailed(
24263       /+[in]+/ ICoreWebView2ProcessFailedEventHandler eventHandler,
24264       @("out") EventRegistrationToken* token);
24265 
24266   /// Remove an event handler previously added with `add_ProcessFailed`.
24267   HRESULT remove_ProcessFailed(
24268       in EventRegistrationToken token);
24269 
24270   /// Add the provided JavaScript to a list of scripts that should be run after
24271   /// the global object has been created, but before the HTML document has
24272   /// been parsed and before any other script included by the HTML document is
24273   /// run.  This method injects a script that runs on all top-level document
24274   /// and child frame page navigations.  This method runs asynchronously, and
24275   /// you must wait for the completion handler to finish before the injected
24276   /// script is ready to run.  When this method completes, the `Invoke` method
24277   /// of the handler is run with the `id` of the injected script.  `id` is a
24278   /// string.  To remove the injected script, use
24279   /// `RemoveScriptToExecuteOnDocumentCreated`.
24280   ///
24281   /// If the method is run in add_NewWindowRequested handler it should be called
24282   /// before the new window is set. If called after setting the NewWindow property, the initial script
24283   /// may or may not apply to the initial navigation and may only apply to the subsequent navigation.
24284   /// For more details see `ICoreWebView2NewWindowRequestedEventArgs::put_NewWindow`.
24285   ///
24286   /// \> [!NOTE]\n\> If an HTML document is running in a sandbox of some kind using
24287   /// [sandbox](https://developer.mozilla.org/docs/Web/HTML/Element/iframe#attr-sandbox)
24288   /// properties or the
24289   /// [Content-Security-Policy](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy)
24290   /// HTTP header affects the script that runs.  For example, if the
24291   /// `allow-modals` keyword is not set then requests to run the `alert`
24292   /// function are ignored.
24293   ///
24294   /// \snippet ScriptComponent.cpp AddScriptToExecuteOnDocumentCreated
24295   HRESULT AddScriptToExecuteOnDocumentCreated(
24296       in LPCWSTR javaScript,
24297       /+[in]+/ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler handler);
24298 
24299   /// Remove the corresponding JavaScript added using
24300   /// `AddScriptToExecuteOnDocumentCreated` with the specified script ID. The
24301   /// script ID should be the one returned by the `AddScriptToExecuteOnDocumentCreated`.
24302   /// Both use `AddScriptToExecuteOnDocumentCreated` and this method in `NewWindowRequested`
24303   /// event handler at the same time sometimes causes trouble.  Since invalid scripts will
24304   /// be ignored, the script IDs you got may not be valid anymore.
24305   HRESULT RemoveScriptToExecuteOnDocumentCreated(in LPCWSTR id);
24306 
24307   /// Run JavaScript code from the javascript parameter in the current
24308   /// top-level document rendered in the WebView.  The result of evaluating
24309   /// the provided JavaScript is used in this parameter.  The result value is
24310   /// a JSON encoded string.  If the result is undefined, contains a reference
24311   /// cycle, or otherwise is not able to be encoded into JSON, then the result
24312   /// is considered to be null, which is encoded in JSON as the string "null".
24313   ///
24314   /// \> [!NOTE]\n\> A function that has no explicit return value returns undefined. If the
24315   /// script that was run throws an unhandled exception, then the result is
24316   /// also "null".  This method is applied asynchronously. If the method is
24317   /// run after the `NavigationStarting` event during a navigation, the script
24318   /// runs in the new document when loading it, around the time
24319   /// `ContentLoading` is run.  This operation executes the script even if
24320   /// `ICoreWebView2Settings::IsScriptEnabled` is set to `FALSE`.
24321   ///
24322   /// \snippet ScriptComponent.cpp ExecuteScript
24323   HRESULT ExecuteScript(
24324       in LPCWSTR javaScript,
24325       /+[in]+/ ICoreWebView2ExecuteScriptCompletedHandler handler);
24326 
24327   /// Capture an image of what WebView is displaying.  Specify the format of
24328   /// the image with the `imageFormat` parameter.  The resulting image binary
24329   /// data is written to the provided `imageStream` parameter.  When
24330   /// `CapturePreview` finishes writing to the stream, the `Invoke` method on
24331   /// the provided `handler` parameter is run.  This method fails if called
24332   /// before the first ContentLoading event.  For example if this is called in
24333   /// the NavigationStarting event for the first navigation it will fail.
24334   /// For subsequent navigations, the method may not fail, but will not capture
24335   /// an image of a given webpage until the ContentLoading event has been fired
24336   /// for it.  Any call to this method prior to that will result in a capture of
24337   /// the page being navigated away from.
24338   ///
24339   /// \snippet FileComponent.cpp CapturePreview
24340   HRESULT CapturePreview(
24341       in COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT imageFormat,
24342       in IStream* imageStream,
24343       /+[in]+/ ICoreWebView2CapturePreviewCompletedHandler handler);
24344 
24345   /// Reload the current page.  This is similar to navigating to the URI of
24346   /// current top level document including all navigation events firing and
24347   /// respecting any entries in the HTTP cache.  But, the back or forward
24348   /// history are not modified.
24349   HRESULT Reload();
24350 
24351   /// Post the specified webMessage to the top level document in this WebView.
24352   /// The main page receives the message by subscribing to the `message` event of the
24353   /// `window.chrome.webview` of the page document.
24354   ///
24355   /// ```cpp
24356   /// window.chrome.webview.addEventListener('message', handler)
24357   /// window.chrome.webview.removeEventListener('message', handler)
24358   /// ```
24359   ///
24360   /// The event args is an instance of `MessageEvent`.  The
24361   /// `ICoreWebView2Settings::IsWebMessageEnabled` setting must be `TRUE` or
24362   /// the web message will not be sent. The `data` property of the event
24363   /// arg is the `webMessage` string parameter parsed as a JSON string into a
24364   /// JavaScript object.  The `source` property of the event arg is a reference
24365   ///  to the `window.chrome.webview` object.  For information about sending
24366   /// messages from the HTML document in the WebView to the host, navigate to
24367   /// [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived).
24368   /// The message is delivered asynchronously.  If a navigation occurs before
24369   /// the message is posted to the page, the message is discarded.
24370   ///
24371   /// \snippet ScenarioWebMessage.cpp WebMessageReceived
24372   HRESULT PostWebMessageAsJson(in LPCWSTR webMessageAsJson);
24373 
24374   /// Posts a message that is a simple string rather than a JSON string
24375   /// representation of a JavaScript object.  This behaves in exactly the same
24376   /// manner as `PostWebMessageAsJson`, but the `data` property of the event
24377   /// arg of the `window.chrome.webview` message is a string with the same
24378   /// value as `webMessageAsString`.  Use this instead of
24379   /// `PostWebMessageAsJson` if you want to communicate using simple strings
24380   /// rather than JSON objects.
24381   HRESULT PostWebMessageAsString(in LPCWSTR webMessageAsString);
24382 
24383   /// Add an event handler for the `WebMessageReceived` event.
24384   /// `WebMessageReceived` runs when the
24385   /// `ICoreWebView2Settings::IsWebMessageEnabled` setting is set and the
24386   /// top-level document of the WebView runs
24387   /// `window.chrome.webview.postMessage`.  The `postMessage` function is
24388   /// `void postMessage(object)` where object is any object supported by JSON
24389   /// conversion.
24390   ///
24391   /// \snippet assets\ScenarioWebMessage.html chromeWebView
24392   ///
24393   /// When the page calls `postMessage`, the object parameter is converted to a
24394   /// JSON string and is posted asynchronously to the host process. This will
24395   /// result in the handler's `Invoke` method being called with the JSON string
24396   /// as a parameter.
24397   ///
24398   /// \snippet ScenarioWebMessage.cpp WebMessageReceived
24399   ///
24400   /// If the same page calls `postMessage` multiple times, the corresponding
24401   /// `WebMessageReceived` events are guaranteed to be fired in the same order.
24402   /// However, if multiple frames call `postMessage`, there is no guaranteed
24403   /// order.  In addition, `WebMessageReceived` events caused by calls to
24404   /// `postMessage` are not guaranteed to be sequenced with events caused by DOM
24405   /// APIs.  For example, if the page runs
24406   ///
24407   /// ```javascript
24408   /// chrome.webview.postMessage("message");
24409   /// window.open();
24410   /// ```
24411   ///
24412   /// then the `NewWindowRequested` event might be fired before the
24413   /// `WebMessageReceived` event.  If you need the `WebMessageReceived` event
24414   /// to happen before anything else, then in the `WebMessageReceived` handler
24415   /// you can post a message back to the page and have the page wait until it
24416   /// receives that message before continuing.
24417   HRESULT add_WebMessageReceived(
24418       /+[in]+/ ICoreWebView2WebMessageReceivedEventHandler handler,
24419       @("out") EventRegistrationToken* token);
24420 
24421   /// Remove an event handler previously added with `add_WebMessageReceived`.
24422   HRESULT remove_WebMessageReceived(
24423       in EventRegistrationToken token);
24424 
24425   /// Runs an asynchronous `DevToolsProtocol` method.  For more information
24426   /// about available methods, navigate to
24427   /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot)
24428   /// .  The `methodName` parameter is the full name of the method in the
24429   /// `{domain}.{method}` format.  The `parametersAsJson` parameter is a JSON
24430   /// formatted string containing the parameters for the corresponding method.
24431   /// The `Invoke` method of the `handler` is run when the method
24432   /// asynchronously completes.  `Invoke` is run with the return object of the
24433   /// method as a JSON string.  This function returns E_INVALIDARG if the `methodName` is
24434   /// unknown or the `parametersAsJson` has an error.  In the case of such an error, the
24435   /// `returnObjectAsJson` parameter of the handler will include information
24436   /// about the error.
24437   /// Note even though WebView2 dispatches the CDP messages in the order called,
24438   /// CDP method calls may be processed out of order.
24439   /// If you require CDP methods to run in a particular order, you should wait
24440   /// for the previous method's completed handler to run before calling the
24441   /// next method.
24442   ///
24443   /// \snippet ScriptComponent.cpp CallDevToolsProtocolMethod
24444   HRESULT CallDevToolsProtocolMethod(
24445       in LPCWSTR methodName,
24446       in LPCWSTR parametersAsJson,
24447       /+[in]+/ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler handler);
24448 
24449   /// The process ID of the browser process that hosts the WebView.
24450   @(" propget")
24451 	HRESULT get_BrowserProcessId(@("out, retval") UINT32* value);
24452 
24453   /// `TRUE` if the WebView is able to navigate to a previous page in the
24454   /// navigation history.  If `CanGoBack` changes value, the `HistoryChanged`
24455   /// event runs.
24456   @(" propget")
24457 	HRESULT get_CanGoBack(@("out, retval") BOOL* canGoBack);
24458 
24459   /// `TRUE` if the WebView is able to navigate to a next page in the
24460   /// navigation history.  If `CanGoForward` changes value, the
24461   /// `HistoryChanged` event runs.
24462   @(" propget")
24463 	HRESULT get_CanGoForward(@("out, retval") BOOL* canGoForward);
24464 
24465   /// Navigates the WebView to the previous page in the navigation history.
24466   HRESULT GoBack();
24467 
24468   /// Navigates the WebView to the next page in the navigation history.
24469   HRESULT GoForward();
24470 
24471   /// Get a DevTools Protocol event receiver that allows you to subscribe to a
24472   /// DevTools Protocol event.  The `eventName` parameter is the full name of
24473   /// the event in the format `{domain}.{event}`.  For more information about
24474   /// DevTools Protocol events description and event args, navigate to
24475   /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot).
24476   ///
24477   /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceived
24478   HRESULT GetDevToolsProtocolEventReceiver(
24479       in LPCWSTR eventName,
24480       @("out, retval") ICoreWebView2DevToolsProtocolEventReceiver * receiver);
24481 
24482   /// Stop all navigations and pending resource fetches.  Does not stop scripts.
24483   HRESULT Stop();
24484 
24485   /// Add an event handler for the `NewWindowRequested` event.
24486   /// `NewWindowRequested` runs when content inside the WebView requests to
24487   /// open a new window, such as through `window.open`.  The app can pass a
24488   /// target WebView that is considered the opened window or mark the event as
24489   /// `Handled`, in which case WebView2 does not open a window.
24490   /// If either `Handled` or `NewWindow` properties are not set, the target
24491   /// content will be opened on a popup window.
24492   ///
24493   /// If a deferral is not taken on the event args, scripts that resulted in the
24494   /// new window that are requested are blocked until the event handler returns.
24495   /// If a deferral is taken, then scripts are blocked until the deferral is
24496   /// completed or new window is set.
24497   ///
24498   /// For more details and considerations on the target WebView to be supplied
24499   /// at the opened window, see `ICoreWebView2NewWindowRequestedEventArgs::put_NewWindow`.
24500   ///
24501   /// \snippet AppWindow.cpp NewWindowRequested
24502   HRESULT add_NewWindowRequested(
24503       /+[in]+/ ICoreWebView2NewWindowRequestedEventHandler eventHandler,
24504       @("out") EventRegistrationToken* token);
24505 
24506   /// Remove an event handler previously added with `add_NewWindowRequested`.
24507   HRESULT remove_NewWindowRequested(
24508       in EventRegistrationToken token);
24509 
24510   /// Add an event handler for the `DocumentTitleChanged` event.
24511   /// `DocumentTitleChanged` runs when the `DocumentTitle` property of the
24512   /// WebView changes and may run before or after the `NavigationCompleted`
24513   /// event.
24514   ///
24515   /// \snippet FileComponent.cpp DocumentTitleChanged
24516   HRESULT add_DocumentTitleChanged(
24517       /+[in]+/ ICoreWebView2DocumentTitleChangedEventHandler eventHandler,
24518       @("out") EventRegistrationToken* token);
24519 
24520   /// Remove an event handler previously added with `add_DocumentTitleChanged`.
24521   HRESULT remove_DocumentTitleChanged(
24522       in EventRegistrationToken token);
24523 
24524   /// The title for the current top-level document.  If the document has no
24525   /// explicit title or is otherwise empty, a default that may or may not match
24526   ///  the URI of the document is used.
24527   ///
24528   /// The caller must free the returned string with `CoTaskMemFree`.  See
24529   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
24530   @(" propget")
24531 	HRESULT get_DocumentTitle(@("out, retval") LPWSTR* title);
24532 
24533   /// Add the provided host object to script running in the WebView with the
24534   /// specified name.  Host objects are exposed as host object proxies using
24535   /// `window.chrome.webview.hostObjects.{name}`.  Host object proxies are
24536   /// promises and resolves to an object representing the host object.  The
24537   /// promise is rejected if the app has not added an object with the name.
24538   /// When JavaScript code access a property or method of the object, a promise
24539   ///  is return, which resolves to the value returned from the host for the
24540   /// property or method, or rejected in case of error, for example, no
24541   /// property or method on the object or parameters are not valid.
24542   ///
24543   /// \> [!NOTE]\n\> While simple types, `IDispatch` and array are supported, and
24544   /// `IUnknown` objects that also implement `IDispatch` are treated as `IDispatch`,
24545   /// generic `IUnknown`, `VT_DECIMAL`, or `VT_RECORD` variant is not supported.
24546   /// Remote JavaScript objects like callback functions are represented as an
24547   /// `VT_DISPATCH` `VARIANT` with the object implementing `IDispatch`.  The
24548   /// JavaScript callback method may be invoked using `DISPID_VALUE` for the
24549   /// `DISPID`.  Such callback method invocations will return immediately and will
24550   /// not wait for the JavaScript function to run and so will not provide the return
24551   /// value of the JavaScript function.
24552   /// Nested arrays are supported up to a depth of 3.  Arrays of by
24553   /// reference types are not supported. `VT_EMPTY` and `VT_NULL` are mapped
24554   /// into JavaScript as `null`.  In JavaScript, `null` and undefined are
24555   /// mapped to `VT_EMPTY`.
24556   ///
24557   /// Additionally, all host objects are exposed as
24558   /// `window.chrome.webview.hostObjects.sync.{name}`.  Here the host objects
24559   /// are exposed as synchronous host object proxies. These are not promises
24560   /// and function runtimes or property access synchronously block running
24561   /// script waiting to communicate cross process for the host code to run.
24562   /// Accordingly the result may have reliability issues and it is recommended
24563   /// that you use the promise-based asynchronous
24564   /// `window.chrome.webview.hostObjects.{name}` API.
24565   ///
24566   /// Synchronous host object proxies and asynchronous host object proxies may
24567   /// both use a proxy to the same host object.  Remote changes made by one
24568   /// proxy propagates to any other proxy of that same host object whether
24569   /// the other proxies and synchronous or asynchronous.
24570   ///
24571   /// While JavaScript is blocked on a synchronous run to native code, that
24572   /// native code is unable to run back to JavaScript.  Attempts to do so fail
24573   ///  with `HRESULT_FROM_WIN32(ERROR_POSSIBLE_DEADLOCK)`.
24574   ///
24575   /// Host object proxies are JavaScript Proxy objects that intercept all
24576   /// property get, property set, and method invocations. Properties or methods
24577   ///  that are a part of the Function or Object prototype are run locally.
24578   /// Additionally any property or method in the
24579   /// `chrome.webview.hostObjects.options.forceLocalProperties`
24580   /// array are also run locally.  This defaults to including optional methods
24581   /// that have meaning in JavaScript like `toJSON` and `Symbol.toPrimitive`.
24582   /// Add more to the array as required.
24583   ///
24584   /// The `chrome.webview.hostObjects.cleanupSome` method performs a best
24585   /// effort garbage collection on host object proxies.
24586   ///
24587   /// The `chrome.webview.hostObjects.options` object provides the ability to
24588   /// change some functionality of host objects.
24589   ///
24590   /// Options property | Details
24591   /// ---|---
24592   /// `forceLocalProperties` | This is an array of host object property names that will be run locally, instead of being called on the native host object. This defaults to `then`, `toJSON`, `Symbol.toString`, and `Symbol.toPrimitive`. You can add other properties to specify that they should be run locally on the javascript host object proxy.
24593   /// `log` | This is a callback that will be called with debug information. For example, you can set this to `console.log.bind(console)` to have it print debug information to the console to help when troubleshooting host object usage. By default this is null.
24594   /// `shouldSerializeDates` | By default this is false, and javascript Date objects will be sent to host objects as a string using `JSON.stringify`. You can set this property to true to have Date objects properly serialize as a `VT_DATE` when sending to the native host object, and have `VT_DATE` properties and return values create a javascript Date object.
24595   /// `defaultSyncProxy` | When calling a method on a synchronous proxy, the result should also be a synchronous proxy. But in some cases, the sync/async context is lost (for example, when providing to native code a reference to a function, and then calling that function in native code). In these cases, the proxy will be asynchronous, unless this property is set.
24596   /// `forceAsyncMethodMatches ` | This is an array of regular expressions. When calling a method on a synchronous proxy, the method call will be performed asynchronously if the method name matches a string or regular expression in this array. Setting this value to `Async` will make any method that ends with Async be an asynchronous method call. If an async method doesn't match here and isn't forced to be asynchronous, the method will be invoked synchronously, blocking execution of the calling JavaScript and then returning the resolution of the promise, rather than returning a promise.
24597   /// `ignoreMemberNotFoundError` | By default, an exception is thrown when attempting to get the value of a proxy property that doesn't exist on the corresponding native class. Setting this property to `true` switches the behavior to match Chakra WinRT projection (and general JavaScript) behavior of returning `undefined` with no error.
24598   ///
24599   /// Host object proxies additionally have the following methods which run
24600   /// locally.
24601   ///
24602   /// Method name | Details
24603   /// ---|---
24604   ///`applyHostFunction`, `getHostProperty`, `setHostProperty` | Perform a method invocation, property get, or property set on the host object. Use the methods to explicitly force a method or property to run remotely if a conflicting local method or property exists.  For instance, `proxy.toString()` runs the local `toString` method on the proxy object. But proxy.applyHostFunction('toString') runs `toString` on the host proxied object instead.
24605   ///`getLocalProperty`, `setLocalProperty` | Perform property get, or property set locally.  Use the methods to force getting or setting a property on the host object proxy rather than on the host object it represents. For instance, `proxy.unknownProperty` gets the property named `unknownProperty` from the host proxied object.  But proxy.getLocalProperty('unknownProperty') gets the value of the property `unknownProperty` on the proxy object.
24606   ///`sync` | Asynchronous host object proxies expose a sync method which returns a promise for a synchronous host object proxy for the same host object.  For example, `chrome.webview.hostObjects.sample.methodCall()` returns an asynchronous host object proxy.  Use the `sync` method to obtain a synchronous host object proxy instead: `const syncProxy = await chrome.webview.hostObjects.sample.methodCall().sync()`.
24607   ///`async` | Synchronous host object proxies expose an async method which blocks and returns an asynchronous host object proxy for the same host object.  For example, `chrome.webview.hostObjects.sync.sample.methodCall()` returns a synchronous host object proxy.  Running the `async` method on this blocks and then returns an asynchronous host object proxy for the same host object: `const asyncProxy = chrome.webview.hostObjects.sync.sample.methodCall().async()`.
24608   ///`then` | Asynchronous host object proxies have a `then` method.  Allows proxies to be awaitable.  `then` returns a promise that resolves with a representation of the host object.  If the proxy represents a JavaScript literal, a copy of that is returned locally.  If the proxy represents a function, a non-awaitable proxy is returned.  If the proxy represents a JavaScript object with a mix of literal properties and function properties, the a copy of the object is returned with some properties as host object proxies.
24609   ///
24610   /// All other property and method invocations (other than the above Remote
24611   /// object proxy methods, `forceLocalProperties` list, and properties on
24612   /// Function and Object prototypes) are run remotely.  Asynchronous host
24613   /// object proxies return a promise representing asynchronous completion of
24614   /// remotely invoking the method, or getting the property.  The promise
24615   /// resolves after the remote operations complete and the promises resolve to
24616   ///  the resulting value of the operation.  Synchronous host object proxies
24617   /// work similarly, but block running JavaScript and wait for the remote
24618   /// operation to complete.
24619   ///
24620   /// Setting a property on an asynchronous host object proxy works slightly
24621   /// differently.  The set returns immediately and the return value is the
24622   /// value that is set.  This is a requirement of the JavaScript Proxy object.
24623   /// If you need to asynchronously wait for the property set to complete, use
24624   /// the `setHostProperty` method which returns a promise as described above.
24625   /// Synchronous object property set property synchronously blocks until the
24626   /// property is set.
24627   ///
24628   /// For example, suppose you have a COM object with the following interface.
24629   ///
24630   /// \snippet HostObjectSample.idl AddHostObjectInterface
24631   ///
24632   /// Add an instance of this interface into your JavaScript with
24633   /// `AddHostObjectToScript`.  In this case, name it `sample`.
24634   ///
24635   /// \snippet ScenarioAddHostObject.cpp AddHostObjectToScript
24636   ///
24637   /// In the HTML document, use the COM object using
24638   /// `chrome.webview.hostObjects.sample`.
24639   /// Note that `CoreWebView2.AddHostObjectToScript` only applies to the
24640   /// top-level document and not to frames. To add host objects to frames use
24641   /// `CoreWebView2Frame.AddHostObjectToScript`.
24642   ///
24643   /// \snippet assets\ScenarioAddHostObject.html HostObjectUsage
24644   ///
24645   /// Exposing host objects to script has security risk.  For more information
24646   /// about best practices, navigate to
24647   /// [Best practices for developing secure WebView2 applications](/microsoft-edge/webview2/concepts/security).
24648   HRESULT AddHostObjectToScript(in LPCWSTR name, in VARIANT* object);
24649 
24650   /// Remove the host object specified by the name so that it is no longer
24651   /// accessible from JavaScript code in the WebView.  While new access
24652   /// attempts are denied, if the object is already obtained by JavaScript code
24653   /// in the WebView, the JavaScript code continues to have access to that
24654   /// object.   Run this method for a name that is already removed or never
24655   /// added fails.
24656   HRESULT RemoveHostObjectFromScript(in LPCWSTR name);
24657 
24658   /// Opens the DevTools window for the current document in the WebView. Does
24659   /// nothing if run when the DevTools window is already open.
24660   HRESULT OpenDevToolsWindow();
24661 
24662   /// Add an event handler for the `ContainsFullScreenElementChanged` event.
24663   /// `ContainsFullScreenElementChanged` triggers when the
24664   /// `ContainsFullScreenElement` property changes.  An HTML element inside the
24665   /// WebView may enter fullscreen to the size of the WebView or leave
24666   /// fullscreen.  This event is useful when, for example, a video element
24667   /// requests to go fullscreen.  The listener of
24668   /// `ContainsFullScreenElementChanged` may resize the WebView in response.
24669   ///
24670   /// \snippet AppWindow.cpp ContainsFullScreenElementChanged
24671   HRESULT add_ContainsFullScreenElementChanged(
24672       /+[in]+/ ICoreWebView2ContainsFullScreenElementChangedEventHandler eventHandler,
24673       @("out") EventRegistrationToken* token);
24674 
24675   /// Remove an event handler previously added with
24676   /// `add_ContainsFullScreenElementChanged`.
24677   HRESULT remove_ContainsFullScreenElementChanged(
24678       in EventRegistrationToken token);
24679 
24680   /// Indicates if the WebView contains a fullscreen HTML element.
24681   @(" propget")
24682 	HRESULT get_ContainsFullScreenElement(
24683       @("out, retval") BOOL* containsFullScreenElement);
24684 
24685   /// Add an event handler for the `WebResourceRequested` event.
24686   /// `WebResourceRequested` runs when the WebView is performing a URL request
24687   /// to a matching URL and resource context filter that was added with
24688   /// `AddWebResourceRequestedFilter`.  At least one filter must be added for
24689   /// the event to run.
24690   ///
24691   /// The web resource requested may be blocked until the event handler returns
24692   /// if a deferral is not taken on the event args.  If a deferral is taken,
24693   /// then the web resource requested is blocked until the deferral is
24694   /// completed.
24695   ///
24696   /// If this event is subscribed in the add_NewWindowRequested handler it should be called
24697   /// after the new window is set. For more details see `ICoreWebView2NewWindowRequestedEventArgs::put_NewWindow`.
24698   ///
24699   /// This event is by default raised for file, http, and https URI schemes.
24700   /// This is also raised for registered custom URI schemes. For more details
24701   /// see `ICoreWebView2CustomSchemeRegistration`.
24702   ///
24703   /// \snippet SettingsComponent.cpp WebResourceRequested0
24704   /// \snippet SettingsComponent.cpp WebResourceRequested1
24705   HRESULT add_WebResourceRequested(
24706     /+[in]+/ ICoreWebView2WebResourceRequestedEventHandler eventHandler,
24707     @("out") EventRegistrationToken* token);
24708 
24709   /// Remove an event handler previously added with `add_WebResourceRequested`.
24710   HRESULT remove_WebResourceRequested(
24711       in EventRegistrationToken token);
24712 
24713   /// Adds a URI and resource context filter for the `WebResourceRequested`
24714   /// event.  A web resource request with a resource context that matches this
24715   /// filter's resource context and a URI that matches this filter's URI
24716   /// wildcard string will be raised via the `WebResourceRequested` event.
24717   ///
24718   /// The `uri` parameter value is a wildcard string matched against the URI
24719   /// of the web resource request. This is a glob style
24720   /// wildcard string in which a `*` matches zero or more characters and a `?`
24721   /// matches exactly one character.
24722   /// These wildcard characters can be escaped using a backslash just before
24723   /// the wildcard character in order to represent the literal `*` or `?`.
24724   ///
24725   /// The matching occurs over the URI as a whole string and not limiting
24726   /// wildcard matches to particular parts of the URI.
24727   /// The wildcard filter is compared to the URI after the URI has been
24728   /// normalized, any URI fragment has been removed, and non-ASCII hostnames
24729   /// have been converted to punycode.
24730   ///
24731   /// Specifying a `nullptr` for the uri is equivalent to an empty string which
24732   /// matches no URIs.
24733   ///
24734   /// For more information about resource context filters, navigate to
24735   /// [COREWEBVIEW2_WEB_RESOURCE_CONTEXT](/microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_web_resource_context).
24736   ///
24737   /// | URI Filter String | Request URI | Match | Notes |
24738   /// | ---- | ---- | ---- | ---- |
24739   /// | `*` | `https://contoso.com/a/b/c` | Yes | A single * will match all URIs |
24740   /// | `*://contoso.com/*` | `https://contoso.com/a/b/c` | Yes | Matches everything in contoso.com across all schemes |
24741   /// | `*://contoso.com/*` | `https://example.com/?https://contoso.com/` | Yes | But also matches a URI with just the same text anywhere in the URI |
24742   /// | `example` | `https://contoso.com/example` | No | The filter does not perform partial matches |
24743   /// | `*example` | `https://contoso.com/example` | Yes | The filter matches across URI parts  |
24744   /// | `*example` | `https://contoso.com/path/?example` | Yes | The filter matches across URI parts |
24745   /// | `*example` | `https://contoso.com/path/?query#example` | No | The filter is matched against the URI with no fragment |
24746   /// | `*example` | `https://example` | No | The URI is normalized before filter matching so the actual URI used for comparison is `https://example/` |
24747   /// | `*example/` | `https://example` | Yes | Just like above, but this time the filter ends with a / just like the normalized URI |
24748   /// | `https://xn--qei.example/` | `https://&#x2764;.example/` | Yes | Non-ASCII hostnames are normalized to punycode before wildcard comparison |
24749   /// | `https://&#x2764;.example/` | `https://xn--qei.example/` | No | Non-ASCII hostnames are normalized to punycode before wildcard comparison |
24750   HRESULT AddWebResourceRequestedFilter(
24751     in LPCWSTR /*const*/ uri,
24752     in COREWEBVIEW2_WEB_RESOURCE_CONTEXT /*const*/ resourceContext);
24753 
24754   /// Removes a matching WebResource filter that was previously added for the
24755   /// `WebResourceRequested` event.  If the same filter was added multiple
24756   /// times, then it must be removed as many times as it was added for the
24757   /// removal to be effective.  Returns `E_INVALIDARG` for a filter that was
24758   /// never added.
24759   HRESULT RemoveWebResourceRequestedFilter(
24760     in LPCWSTR /*const*/ uri,
24761     in COREWEBVIEW2_WEB_RESOURCE_CONTEXT /*const*/ resourceContext);
24762 
24763   /// Add an event handler for the `WindowCloseRequested` event.
24764   /// `WindowCloseRequested` triggers when content inside the WebView
24765   /// requested to close the window, such as after `window.close` is run.  The
24766   /// app should close the WebView and related app window if that makes sense
24767   /// to the app.
24768   ///
24769   /// \snippet AppWindow.cpp WindowCloseRequested
24770   HRESULT add_WindowCloseRequested(
24771       /+[in]+/ ICoreWebView2WindowCloseRequestedEventHandler eventHandler,
24772       @("out") EventRegistrationToken* token);
24773 
24774   /// Remove an event handler previously added with `add_WindowCloseRequested`.
24775   HRESULT remove_WindowCloseRequested(
24776       in EventRegistrationToken token);
24777 }
24778 
24779 /// A continuation of the ICoreWebView2 interface.
24780 const GUID IID_ICoreWebView2_2 = ICoreWebView2_2.iid;
24781 
24782 interface ICoreWebView2_2 : ICoreWebView2
24783 {
24784     static const GUID iid = { 0x9E8F0CF8,0xE670,0x4B5E,[ 0xB2,0xBC,0x73,0xE0,0x61,0xE3,0x18,0x4C ] };
24785   /// Add an event handler for the WebResourceResponseReceived event.
24786   /// WebResourceResponseReceived is raised when the WebView receives the
24787   /// response for a request for a web resource (any URI resolution performed by
24788   /// the WebView; such as HTTP/HTTPS, file and data requests from redirects,
24789   /// navigations, declarations in HTML, implicit favicon lookups, and fetch API
24790   /// usage in the document). The host app can use this event to view the actual
24791   /// request and response for a web resource. There is no guarantee about the
24792   /// order in which the WebView processes the response and the host app's
24793   /// handler runs. The app's handler will not block the WebView from processing
24794   /// the response.
24795   /// \snippet ScenarioAuthentication.cpp WebResourceResponseReceived
24796   HRESULT add_WebResourceResponseReceived(
24797     /+[in]+/ ICoreWebView2WebResourceResponseReceivedEventHandler eventHandler,
24798     @("out") EventRegistrationToken* token);
24799   /// Remove an event handler previously added with
24800   /// add_WebResourceResponseReceived.
24801   HRESULT remove_WebResourceResponseReceived(
24802     in EventRegistrationToken token);
24803 
24804   /// Navigates using a constructed WebResourceRequest object. This lets you
24805   /// provide post data or additional request headers during navigation.
24806   /// The headers in the WebResourceRequest override headers
24807   /// added by WebView2 runtime except for Cookie headers.
24808   /// Method can only be either "GET" or "POST". Provided post data will only
24809   /// be sent only if the method is "POST" and the uri scheme is HTTP(S).
24810   /// \snippet ScenarioNavigateWithWebResourceRequest.cpp NavigateWithWebResourceRequest
24811   HRESULT NavigateWithWebResourceRequest(/+[in]+/ ICoreWebView2WebResourceRequest request);
24812 
24813   /// Add an event handler for the DOMContentLoaded event.
24814   /// DOMContentLoaded is raised when the initial html document has been parsed.
24815   /// This aligns with the document's DOMContentLoaded event in html.
24816   ///
24817   /// \snippet ScenarioDOMContentLoaded.cpp DOMContentLoaded
24818   HRESULT add_DOMContentLoaded(
24819       /+[in]+/ ICoreWebView2DOMContentLoadedEventHandler eventHandler,
24820       @("out") EventRegistrationToken* token);
24821 
24822   /// Remove an event handler previously added with add_DOMContentLoaded.
24823   HRESULT remove_DOMContentLoaded(
24824       in EventRegistrationToken token);
24825 
24826   /// Gets the cookie manager object associated with this ICoreWebView2.
24827   /// See ICoreWebView2CookieManager.
24828   ///
24829   /// \snippet ScenarioCookieManagement.cpp CookieManager
24830   @(" propget")
24831 	HRESULT get_CookieManager(@("out, retval") ICoreWebView2CookieManager * cookieManager);
24832 
24833   /// Exposes the CoreWebView2Environment used to create this CoreWebView2.
24834   @(" propget")
24835 	HRESULT get_Environment(@("out, retval") ICoreWebView2Environment * environment);
24836 }
24837 
24838 /// A continuation of the ICoreWebView2_2 interface.
24839 const GUID IID_ICoreWebView2_3 = ICoreWebView2_3.iid;
24840 
24841 interface ICoreWebView2_3 : ICoreWebView2_2
24842 {
24843     static const GUID iid = { 0xA0D6DF20,0x3B92,0x416D,[ 0xAA,0x0C,0x43,0x7A,0x9C,0x72,0x78,0x57 ] };
24844   /// An app may call the `TrySuspend` API to have the WebView2 consume less memory.
24845   /// This is useful when a Win32 app becomes invisible, or when a Universal Windows
24846   /// Platform app is being suspended, during the suspended event handler before completing
24847   /// the suspended event.
24848   /// The CoreWebView2Controller's IsVisible property must be false when the API is called.
24849   /// Otherwise, the API fails with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
24850   /// Suspending is similar to putting a tab to sleep in the Edge browser. Suspending pauses
24851   /// WebView script timers and animations, minimizes CPU usage for the associated
24852   /// browser renderer process and allows the operating system to reuse the memory that was
24853   /// used by the renderer process for other processes.
24854   /// Note that Suspend is best effort and considered completed successfully once the request
24855   /// is sent to browser renderer process. If there is a running script, the script will continue
24856   /// to run and the renderer process will be suspended after that script is done.
24857   /// See [Sleeping Tabs FAQ](https://techcommunity.microsoft.com/t5/articles/sleeping-tabs-faq/m-p/1705434)
24858   /// for conditions that might prevent WebView from being suspended. In those situations,
24859   /// the completed handler will be invoked with isSuccessful as false and errorCode as S_OK.
24860   /// The WebView will be automatically resumed when it becomes visible. Therefore, the
24861   /// app normally does not have to call `Resume` explicitly.
24862   /// The app can call `Resume` and then `TrySuspend` periodically for an invisible WebView so that
24863   /// the invisible WebView can sync up with latest data and the page ready to show fresh content
24864   /// when it becomes visible.
24865   /// All WebView APIs can still be accessed when a WebView is suspended. Some APIs like Navigate
24866   /// will auto resume the WebView. To avoid unexpected auto resume, check `IsSuspended` property
24867   /// before calling APIs that might change WebView state.
24868   ///
24869   /// \snippet ViewComponent.cpp ToggleIsVisibleOnMinimize
24870   ///
24871   /// \snippet ViewComponent.cpp Suspend
24872   ///
24873   HRESULT TrySuspend(/+[in]+/ ICoreWebView2TrySuspendCompletedHandler handler);
24874 
24875   /// Resumes the WebView so that it resumes activities on the web page.
24876   /// This API can be called while the WebView2 controller is invisible.
24877   /// The app can interact with the WebView immediately after `Resume`.
24878   /// WebView will be automatically resumed when it becomes visible.
24879   ///
24880   /// \snippet ViewComponent.cpp ToggleIsVisibleOnMinimize
24881   ///
24882   /// \snippet ViewComponent.cpp Resume
24883   ///
24884   HRESULT Resume();
24885 
24886   /// Whether WebView is suspended.
24887   /// `TRUE` when WebView is suspended, from the time when TrySuspend has completed
24888   ///  successfully until WebView is resumed.
24889   @(" propget")
24890 	HRESULT get_IsSuspended(@("out, retval") BOOL* isSuspended);
24891 
24892   /// Sets a mapping between a virtual host name and a folder path to make available to web sites
24893   /// via that host name.
24894   ///
24895   /// After setting the mapping, documents loaded in the WebView can use HTTP or HTTPS URLs at
24896   /// the specified host name specified by hostName to access files in the local folder specified
24897   /// by folderPath.
24898   ///
24899   /// This mapping applies to both top-level document and iframe navigations as well as subresource
24900   /// references from a document. This also applies to web workers including dedicated/shared worker
24901   /// and service worker, for loading either worker scripts or subresources
24902   /// (importScripts(), fetch(), XHR, etc.) issued from within a worker.
24903   /// For virtual host mapping to work with service worker, please keep the virtual host name
24904   /// mappings consistent among all WebViews sharing the same browser instance. As service worker
24905   /// works independently of WebViews, we merge mappings from all WebViews when resolving virtual
24906   /// host name, inconsistent mappings between WebViews would lead unexpected behavior.
24907   ///
24908   /// Due to a current implementation limitation, media files accessed using virtual host name can be
24909   /// very slow to load.
24910   /// As the resource loaders for the current page might have already been created and running,
24911   /// changes to the mapping might not be applied to the current page and a reload of the page is
24912   /// needed to apply the new mapping.
24913   ///
24914   /// Both absolute and relative paths are supported for folderPath. Relative paths are interpreted
24915   /// as relative to the folder where the exe of the app is in.
24916   ///
24917   /// Note that the folderPath length must not exceed the Windows MAX_PATH limit.
24918   ///
24919   /// accessKind specifies the level of access to resources under the virtual host from other sites.
24920   ///
24921   /// For example, after calling
24922   /// ```cpp
24923   ///    SetVirtualHostNameToFolderMapping(
24924   ///        L"appassets.example", L"assets",
24925   ///        COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY);
24926   /// ```
24927   /// navigating to `https://appassets.example/my-local-file.html` will
24928   /// show the content from my-local-file.html in the assets subfolder located on disk under
24929   /// the same path as the app's executable file.
24930   ///
24931   /// DOM elements that want to reference local files will have their host reference virtual host in the source.
24932   /// If there are multiple folders being used, define one unique virtual host per folder.
24933   /// For example, you can embed a local image like this
24934   /// ```cpp
24935   ///    WCHAR c_navString[] = L"<img src=\"http://appassets.example/wv2.png\"/>";
24936   ///    m_webView->NavigateToString(c_navString);
24937   /// ```
24938   /// The example above shows the image wv2.png by resolving the folder mapping above.
24939   ///
24940   /// You should typically choose virtual host names that are never used by real sites.
24941   /// If you own a domain such as example.com, another option is to use a subdomain reserved for
24942   /// the app (like my-app.example.com).
24943   ///
24944   /// [RFC 6761](https://tools.ietf.org/html/rfc6761) has reserved several special-use domain
24945   /// names that are guaranteed to not be used by real sites (for example, .example, .test, and
24946   /// .invalid.)
24947   ///
24948   /// Note that using `.local` as the top-level domain name will work but can cause a delay
24949   /// during navigations. You should avoid using `.local` if you can.
24950   ///
24951   /// Apps should use distinct domain names when mapping folder from different sources that
24952   /// should be isolated from each other. For instance, the app might use app-file.example for
24953   /// files that ship as part of the app, and book1.example might be used for files containing
24954   /// books from a less trusted source that were previously downloaded and saved to the disk by
24955   /// the app.
24956   ///
24957   /// The host name used in the APIs is canonicalized using Chromium's host name parsing logic
24958   /// before being used internally. For more information see [HTML5 2.6 URLs](https://dev.w3.org/html5/spec-LC/urls.html).
24959   ///
24960   /// All host names that are canonicalized to the same string are considered identical.
24961   /// For example, `EXAMPLE.COM` and `example.com` are treated as the same host name.
24962   /// An international host name and its Punycode-encoded host name are considered the same host
24963   /// name. There is no DNS resolution for host name and the trailing '.' is not normalized as
24964   /// part of canonicalization.
24965   ///
24966   /// Therefore `example.com` and `example.com.` are treated as different host names. Similarly,
24967   /// `virtual-host-name` and `virtual-host-name.example.com` are treated as different host names
24968   /// even if the machine has a DNS suffix of `example.com`.
24969   ///
24970   /// Specify the minimal cross-origin access necessary to run the app. If there is not a need to
24971   /// access local resources from other origins, use COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY.
24972   ///
24973   /// \snippet AppWindow.cpp AddVirtualHostNameToFolderMapping
24974   ///
24975   /// \snippet AppWindow.cpp LocalUrlUsage
24976   HRESULT SetVirtualHostNameToFolderMapping(
24977       in LPCWSTR hostName,
24978       in LPCWSTR folderPath,
24979       in COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND accessKind);
24980 
24981   /// Clears a host name mapping for local folder that was added by `SetVirtualHostNameToFolderMapping`.
24982   HRESULT ClearVirtualHostNameToFolderMapping(
24983       in LPCWSTR hostName);
24984 }
24985 
24986 /// A continuation of the ICoreWebView2_3 interface to support FrameCreated and
24987 /// DownloadStarting events.
24988 const GUID IID_ICoreWebView2_4 = ICoreWebView2_4.iid;
24989 
24990 interface ICoreWebView2_4 : ICoreWebView2_3
24991 {
24992     static const GUID iid = { 0x20d02d59,0x6df2,0x42dc,[ 0xbd,0x06,0xf9,0x8a,0x69,0x4b,0x13,0x02 ] };
24993   /// Raised when a new iframe is created.
24994   /// Handle this event to get access to ICoreWebView2Frame objects.
24995   /// Use ICoreWebView2Frame.add_Destroyed to listen for when this iframe goes
24996   /// away.
24997   HRESULT add_FrameCreated(
24998       /+[in]+/ ICoreWebView2FrameCreatedEventHandler  eventHandler,
24999       @("out") EventRegistrationToken * token);
25000 
25001   /// Remove an event handler previously added with add_FrameCreated.
25002   HRESULT remove_FrameCreated(in EventRegistrationToken token);
25003 
25004   /// Add an event handler for the `DownloadStarting` event. This event is
25005   /// raised when a download has begun, blocking the default download dialog,
25006   /// but not blocking the progress of the download.
25007   ///
25008   /// The host can choose to cancel a download, change the result file path,
25009   /// and hide the default download dialog.
25010   /// If the host chooses to cancel the download, the download is not saved, no
25011   /// dialog is shown, and the state is changed to
25012   /// COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED with interrupt reason
25013   /// COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED. Otherwise, the
25014   /// download is saved to the default path after the event completes,
25015   /// and default download dialog is shown if the host did not choose to hide it.
25016   /// The host can change the visibility of the download dialog using the
25017   /// `Handled` property. If the event is not handled, downloads complete
25018   /// normally with the default dialog shown.
25019   ///
25020   /// \snippet ScenarioCustomDownloadExperience.cpp DownloadStarting
25021   HRESULT add_DownloadStarting(
25022     /+[in]+/ ICoreWebView2DownloadStartingEventHandler eventHandler,
25023     @("out") EventRegistrationToken* token);
25024 
25025   /// Remove an event handler previously added with `add_DownloadStarting`.
25026   HRESULT remove_DownloadStarting(
25027       in EventRegistrationToken token);
25028 }
25029 
25030 /// A continuation of the ICoreWebView2_4 interface to support ClientCertificateRequested
25031 /// event.
25032 const GUID IID_ICoreWebView2_5 = ICoreWebView2_5.iid;
25033 
25034 interface ICoreWebView2_5 : ICoreWebView2_4
25035 {
25036     static const GUID iid = { 0xbedb11b8,0xd63c,0x11eb,[ 0xb8,0xbc,0x02,0x42,0xac,0x13,0x00,0x03 ] };
25037   /// Add an event handler for the ClientCertificateRequested event.
25038   /// The ClientCertificateRequested event is raised when the WebView2
25039   /// is making a request to an HTTP server that needs a client certificate
25040   /// for HTTP authentication.
25041   /// Read more about HTTP client certificates at
25042   /// [RFC 8446 The Transport Layer Security (TLS) Protocol Version 1.3](https://tools.ietf.org/html/rfc8446).
25043   ///
25044   /// With this event you have several options for responding to client certificate requests:
25045   ///
25046   /// Scenario                                                   | Handled | Cancel | SelectedCertificate
25047   /// ---------------------------------------------------------- | ------- | ------ | -------------------
25048   /// Respond to server with a certificate                       | True    | False  | MutuallyTrustedCertificate value
25049   /// Respond to server without certificate                      | True    | False  | null
25050   /// Display default client certificate selection dialog prompt | False   | False  | n/a
25051   /// Cancel the request                                         | n/a     | True   | n/a
25052   ///
25053   /// If you don't handle the event, WebView2 will
25054   /// show the default client certificate selection dialog prompt to user.
25055   ///
25056   /// \snippet SettingsComponent.cpp ClientCertificateRequested1
25057   /// \snippet ScenarioClientCertificateRequested.cpp ClientCertificateRequested2
25058   HRESULT add_ClientCertificateRequested(
25059       /+[in]+/ ICoreWebView2ClientCertificateRequestedEventHandler eventHandler,
25060       @("out") EventRegistrationToken* token);
25061 
25062   /// Remove an event handler previously added with add_ClientCertificateRequested.
25063   HRESULT remove_ClientCertificateRequested(in EventRegistrationToken token);
25064 }
25065 
25066 /// This interface is an extension of `ICoreWebView2_5` that manages opening
25067 /// the browser task manager window.
25068 const GUID IID_ICoreWebView2_6 = ICoreWebView2_6.iid;
25069 
25070 interface ICoreWebView2_6 : ICoreWebView2_5
25071 {
25072     static const GUID iid = { 0x499aadac,0xd92c,0x4589,[ 0x8a,0x75,0x11,0x1b,0xfc,0x16,0x77,0x95 ] };
25073   /// Opens the Browser Task Manager view as a new window in the foreground.
25074   /// If the Browser Task Manager is already open, this will bring it into
25075   /// the foreground. WebView2 currently blocks the Shift+Esc shortcut for
25076   /// opening the task manager. An end user can open the browser task manager
25077   /// manually via the `Browser task manager` entry of the DevTools window's
25078   /// title bar's context menu.
25079   HRESULT OpenTaskManagerWindow();
25080 }
25081 
25082 /// This interface is an extension of `ICoreWebView2_6` that supports printing
25083 /// to PDF.
25084 const GUID IID_ICoreWebView2_7 = ICoreWebView2_7.iid;
25085 
25086 interface ICoreWebView2_7 : ICoreWebView2_6
25087 {
25088     static const GUID iid = { 0x79c24d83,0x09a3,0x45ae,[ 0x94,0x18,0x48,0x7f,0x32,0xa5,0x87,0x40 ] };
25089   /// Print the current page to PDF asynchronously with the provided settings.
25090   /// See `ICoreWebView2PrintSettings` for description of settings. Passing
25091   /// nullptr for `printSettings` results in default print settings used.
25092   ///
25093   /// Use `resultFilePath` to specify the path to the PDF file. The host should
25094   /// provide an absolute path, including file name. If the path
25095   /// points to an existing file, the file will be overwritten. If the path is
25096   /// not valid, the method fails with `E_INVALIDARG`.
25097   ///
25098   /// The async `PrintToPdf` operation completes when the data has been written
25099   /// to the PDF file. At this time the
25100   /// `ICoreWebView2PrintToPdfCompletedHandler` is invoked. If the
25101   /// application exits before printing is complete, the file is not saved.
25102   /// Only one `Printing` operation can be in progress at a time. If
25103   /// `PrintToPdf` is called while a `PrintToPdf` or `PrintToPdfStream` or `Print` or
25104   /// `ShowPrintUI` job is in progress, the completed handler is immediately invoked
25105   /// with `isSuccessful` set to FALSE.
25106   ///
25107   /// \snippet FileComponent.cpp PrintToPdf
25108   HRESULT PrintToPdf(
25109     in LPCWSTR resultFilePath,
25110     /+[in]+/ ICoreWebView2PrintSettings printSettings,
25111     /+[in]+/ ICoreWebView2PrintToPdfCompletedHandler handler);
25112 }
25113 
25114 /// This interface is an extension of `ICoreWebView2_7` that supports media features.
25115 const GUID IID_ICoreWebView2_8 = ICoreWebView2_8.iid;
25116 
25117 interface ICoreWebView2_8 : ICoreWebView2_7
25118 {
25119     static const GUID iid = { 0xE9632730,0x6E1E,0x43AB,[ 0xB7,0xB8,0x7B,0x2C,0x9E,0x62,0xE0,0x94 ] };
25120   /// Adds an event handler for the `IsMutedChanged` event.
25121   /// `IsMutedChanged` is raised when the IsMuted property changes value.
25122   ///
25123   /// \snippet AudioComponent.cpp IsMutedChanged
25124   HRESULT add_IsMutedChanged(
25125       /+[in]+/ ICoreWebView2IsMutedChangedEventHandler eventHandler,
25126       @("out") EventRegistrationToken* token);
25127 
25128   /// Remove an event handler previously added with `add_IsMutedChanged`.
25129   HRESULT remove_IsMutedChanged(
25130       in EventRegistrationToken token);
25131 
25132   /// Indicates whether all audio output from this CoreWebView2 is muted or not.
25133   ///
25134   /// \snippet AudioComponent.cpp ToggleIsMuted
25135   @(" propget")
25136 	HRESULT get_IsMuted(@("out, retval") BOOL* value);
25137 
25138   /// Sets the `IsMuted` property.
25139   ///
25140   /// \snippet AudioComponent.cpp ToggleIsMuted
25141   @(" propput")
25142 	HRESULT put_IsMuted(in BOOL value);
25143 
25144   /// Adds an event handler for the `IsDocumentPlayingAudioChanged` event.
25145   /// `IsDocumentPlayingAudioChanged` is raised when the IsDocumentPlayingAudio property changes value.
25146   ///
25147   /// \snippet AudioComponent.cpp IsDocumentPlayingAudioChanged
25148   HRESULT add_IsDocumentPlayingAudioChanged(
25149       /+[in]+/ ICoreWebView2IsDocumentPlayingAudioChangedEventHandler eventHandler,
25150       @("out") EventRegistrationToken* token);
25151 
25152   /// Remove an event handler previously added with `add_IsDocumentPlayingAudioChanged`.
25153   HRESULT remove_IsDocumentPlayingAudioChanged(
25154       in EventRegistrationToken token);
25155 
25156   /// Indicates whether any audio output from this CoreWebView2 is playing.
25157   /// This property will be true if audio is playing even if IsMuted is true.
25158   ///
25159   /// \snippet AudioComponent.cpp IsDocumentPlayingAudio
25160   @(" propget")
25161 	HRESULT get_IsDocumentPlayingAudio(@("out, retval") BOOL* value);
25162 }
25163 
25164 /// This interface is an extension of `ICoreWebView2_8` that default download
25165 /// dialog positioning and anchoring.
25166 const GUID IID_ICoreWebView2_9 = ICoreWebView2_9.iid;
25167 
25168 interface ICoreWebView2_9 : ICoreWebView2_8
25169 {
25170     static const GUID iid = { 0x4d7b2eab,0x9fdc,0x468d,[ 0xb9,0x98,0xa9,0x26,0x0b,0x5e,0xd6,0x51 ] };
25171   /// Raised when the `IsDefaultDownloadDialogOpen` property changes. This event
25172   /// comes after the `DownloadStarting` event. Setting the `Handled` property
25173   /// on the `DownloadStartingEventArgs` disables the default download dialog
25174   /// and ensures that this event is never raised.
25175   HRESULT add_IsDefaultDownloadDialogOpenChanged(
25176       /+[in]+/ ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler handler,
25177       @("out") EventRegistrationToken* token);
25178 
25179   /// Remove an event handler previously added with
25180   /// `add_IsDefaultDownloadDialogOpenChanged`.
25181   HRESULT remove_IsDefaultDownloadDialogOpenChanged(
25182       in EventRegistrationToken token);
25183 
25184   /// `TRUE` if the default download dialog is currently open. The value of this
25185   /// property changes only when the default download dialog is explicitly
25186   /// opened or closed. Hiding the WebView implicitly hides the dialog, but does
25187   /// not change the value of this property.
25188   @(" propget")
25189 	HRESULT get_IsDefaultDownloadDialogOpen(@("out, retval") BOOL* value);
25190 
25191   /// Open the default download dialog. If the dialog is opened before there
25192   /// are recent downloads, the dialog shows all past downloads for the
25193   /// current profile. Otherwise, the dialog shows only the recent downloads
25194   /// with a "See more" button for past downloads. Calling this method raises
25195   /// the `IsDefaultDownloadDialogOpenChanged` event if the dialog was closed.
25196   /// No effect if the dialog is already open.
25197   ///
25198   /// \snippet ViewComponent.cpp ToggleDefaultDownloadDialog
25199   HRESULT OpenDefaultDownloadDialog();
25200 
25201   /// Close the default download dialog. Calling this method raises the
25202   /// `IsDefaultDownloadDialogOpenChanged` event if the dialog was open. No
25203   /// effect if the dialog is already closed.
25204   HRESULT CloseDefaultDownloadDialog();
25205 
25206   /// Get the default download dialog corner alignment.
25207   @(" propget")
25208 	HRESULT get_DefaultDownloadDialogCornerAlignment(
25209       @("out, retval") COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT* value);
25210 
25211   /// Set the default download dialog corner alignment. The dialog can be
25212   /// aligned to any of the WebView corners (see
25213   /// COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT). When the WebView
25214   /// or dialog changes size, the dialog keeps its position relative to the
25215   /// corner. The dialog may become partially or completely outside of the
25216   /// WebView bounds if the WebView is small enough. Set the margin relative to
25217   /// the corner with the `DefaultDownloadDialogMargin` property. The corner
25218   /// alignment and margin should be set during initialization to ensure that
25219   /// they are correctly applied when the layout is first computed, otherwise
25220   /// they will not take effect until the next time the WebView position or size
25221   /// is updated.
25222   ///
25223   /// \snippet ViewComponent.cpp SetDefaultDownloadDialogPosition
25224   @(" propput")
25225 	HRESULT put_DefaultDownloadDialogCornerAlignment(
25226       in COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT value);
25227 
25228   /// Get the default download dialog margin.
25229   @(" propget")
25230 	HRESULT get_DefaultDownloadDialogMargin(@("out, retval") POINT* value);
25231 
25232   /// Set the default download dialog margin relative to the WebView corner
25233   /// specified by `DefaultDownloadDialogCornerAlignment`. The margin is a
25234   /// point that describes the vertical and horizontal distances between the
25235   /// chosen WebView corner and the default download dialog corner nearest to
25236   /// it. Positive values move the dialog towards the center of the WebView from
25237   /// the chosen WebView corner, and negative values move the dialog away from
25238   /// it. Use (0, 0) to align the dialog to the WebView corner with no margin.
25239   /// The corner alignment and margin should be set during initialization to
25240   /// ensure that they are correctly applied when the layout is first computed,
25241   /// otherwise they will not take effect until the next time the WebView
25242   /// position or size is updated.
25243   @(" propput")
25244 	HRESULT put_DefaultDownloadDialogMargin(in POINT value);
25245 }
25246 
25247 /// This interface is an extension of `ICoreWebView2_9` that supports
25248 /// BasicAuthenticationRequested event.
25249 const GUID IID_ICoreWebView2_10 = ICoreWebView2_10.iid;
25250 
25251 interface ICoreWebView2_10 : ICoreWebView2_9
25252 {
25253     static const GUID iid = { 0xb1690564,0x6f5a,0x4983,[ 0x8e,0x48,0x31,0xd1,0x14,0x3f,0xec,0xdb ] };
25254   /// Add an event handler for the BasicAuthenticationRequested event.
25255   /// BasicAuthenticationRequested event is raised when WebView encounters a
25256   /// Basic HTTP Authentication request as described in
25257   /// https://developer.mozilla.org/docs/Web/HTTP/Authentication, a Digest
25258   /// HTTP Authentication request as described in
25259   /// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization#digest,
25260   /// an NTLM authentication or a Proxy Authentication request.
25261   ///
25262   /// The host can provide a response with credentials for the authentication or
25263   /// cancel the request. If the host sets the Cancel property to false but does not
25264   /// provide either UserName or Password properties on the Response property, then
25265   /// WebView2 will show the default authentication challenge dialog prompt to
25266   /// the user.
25267   ///
25268   /// \snippet ScenarioAuthentication.cpp BasicAuthenticationRequested
25269   HRESULT add_BasicAuthenticationRequested(
25270       /+[in]+/ ICoreWebView2BasicAuthenticationRequestedEventHandler eventHandler,
25271       @("out") EventRegistrationToken* token);
25272 
25273   /// Remove an event handler previously added with add_BasicAuthenticationRequested.
25274   HRESULT remove_BasicAuthenticationRequested(
25275       in EventRegistrationToken token);
25276 }
25277 
25278 /// This interface is an extension of `ICoreWebView2_10` that supports sessionId
25279 /// for CDP method calls and ContextMenuRequested event.
25280 const GUID IID_ICoreWebView2_11 = ICoreWebView2_11.iid;
25281 
25282 interface ICoreWebView2_11 : ICoreWebView2_10
25283 {
25284     static const GUID iid = { 0x0be78e56,0xc193,0x4051,[ 0xb9,0x43,0x23,0xb4,0x60,0xc0,0x8b,0xdb ] };
25285   /// Runs an asynchronous `DevToolsProtocol` method for a specific session of
25286   /// an attached target.
25287   /// There could be multiple `DevToolsProtocol` targets in a WebView.
25288   /// Besides the top level page, iframes from different origin and web workers
25289   /// are also separate targets. Attaching to these targets allows interaction with them.
25290   /// When the DevToolsProtocol is attached to a target, the connection is identified
25291   /// by a sessionId.
25292   /// To use this API, you must set the `flatten` parameter to true when calling
25293   /// `Target.attachToTarget` or `Target.setAutoAttach` `DevToolsProtocol` method.
25294   /// Using `Target.setAutoAttach` is recommended as that would allow you to attach
25295   /// to dedicated worker targets, which are not discoverable via other APIs like
25296   /// `Target.getTargets`.
25297   /// For more information about targets and sessions, navigate to
25298   /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot/Target).
25299   /// For more information about available methods, navigate to
25300   /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot)
25301   /// The `sessionId` parameter is the sessionId for an attached target.
25302   /// nullptr or empty string is treated as the session for the default target for the top page.
25303   /// The `methodName` parameter is the full name of the method in the
25304   /// `{domain}.{method}` format.  The `parametersAsJson` parameter is a JSON
25305   /// formatted string containing the parameters for the corresponding method.
25306   /// The `Invoke` method of the `handler` is run when the method
25307   /// asynchronously completes.  `Invoke` is run with the return object of the
25308   /// method as a JSON string.  This function returns E_INVALIDARG if the `methodName` is
25309   /// unknown or the `parametersAsJson` has an error.  In the case of such an error, the
25310   /// `returnObjectAsJson` parameter of the handler will include information
25311   /// about the error.
25312   ///
25313   /// \snippet ScriptComponent.cpp DevToolsProtocolMethodMultiSession
25314   ///
25315   /// \snippet ScriptComponent.cpp CallDevToolsProtocolMethodForSession
25316   HRESULT CallDevToolsProtocolMethodForSession(
25317       in LPCWSTR sessionId,
25318       in LPCWSTR methodName,
25319       in LPCWSTR parametersAsJson,
25320       /+[in]+/ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler handler);
25321 
25322   /// Add an event handler for the `ContextMenuRequested` event.
25323   /// `ContextMenuRequested` event is raised when a context menu is requested by the user
25324   /// and the content inside WebView hasn't disabled context menus.
25325   /// The host has the option to create their own context menu with the information provided in
25326   /// the event or can add items to or remove items from WebView context menu.
25327   /// If the host doesn't handle the event, WebView will display the default context menu.
25328   ///
25329   /// \snippet SettingsComponent.cpp EnableCustomMenu
25330   HRESULT add_ContextMenuRequested(
25331       /+[in]+/ ICoreWebView2ContextMenuRequestedEventHandler eventHandler,
25332       @("out") EventRegistrationToken* token);
25333 
25334   /// Remove an event handler previously added with `add_ContextMenuRequested`.
25335   HRESULT remove_ContextMenuRequested(
25336       in EventRegistrationToken token);
25337 }
25338 
25339 /// This interface is an extension of `ICoreWebView2_11` that supports
25340 /// StatusBarTextChanged event.
25341 const GUID IID_ICoreWebView2_12 = ICoreWebView2_12.iid;
25342 
25343 interface ICoreWebView2_12 : ICoreWebView2_11
25344 {
25345     static const GUID iid = { 0x35D69927,0xBCFA,0x4566,[ 0x93,0x49,0x6B,0x3E,0x0D,0x15,0x4C,0xAC ] };
25346   /// Add an event handler for the `StatusBarTextChanged` event.
25347   /// `StatusBarTextChanged` fires when the WebView is showing a status message,
25348   /// a URL, or an empty string (an indication to hide the status bar).
25349   /// \snippet SettingsComponent.cpp StatusBarTextChanged
25350   HRESULT add_StatusBarTextChanged(
25351       /+[in]+/ ICoreWebView2StatusBarTextChangedEventHandler eventHandler,
25352       @("out") EventRegistrationToken* token);
25353 
25354   /// Remove an event handler previously added with `add_StatusBarTextChanged`.
25355   HRESULT remove_StatusBarTextChanged(in EventRegistrationToken token);
25356 
25357   /// The status message text.
25358   ///
25359   /// The caller must free the returned string with `CoTaskMemFree`.  See
25360   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
25361   @(" propget")
25362 	HRESULT get_StatusBarText(@("out, retval") LPWSTR* value);
25363 }
25364 
25365 /// This interface is an extension of `ICoreWebView2_12` that supports Profile
25366 /// API.
25367 const GUID IID_ICoreWebView2_13 = ICoreWebView2_13.iid;
25368 
25369 interface ICoreWebView2_13 : ICoreWebView2_12
25370 {
25371     static const GUID iid = { 0xF75F09A8,0x667E,0x4983,[ 0x88,0xD6,0xC8,0x77,0x3F,0x31,0x5E,0x84 ] };
25372   /// The associated `ICoreWebView2Profile` object. If this CoreWebView2 was created with a
25373   /// CoreWebView2ControllerOptions, the CoreWebView2Profile will match those specified options.
25374   /// Otherwise if this CoreWebView2 was created without a CoreWebView2ControllerOptions, then
25375   /// this will be the default CoreWebView2Profile for the corresponding CoreWebView2Environment.
25376   ///
25377   /// \snippet AppWindow.cpp CoreWebView2Profile
25378   @(" propget")
25379 	HRESULT get_Profile(@("out, retval") ICoreWebView2Profile * value);
25380 }
25381 
25382 /// This interface is an extension of `ICoreWebView2_13` that adds
25383 /// ServerCertificate support.
25384 const GUID IID_ICoreWebView2_14 = ICoreWebView2_14.iid;
25385 
25386 interface ICoreWebView2_14 : ICoreWebView2_13
25387 {
25388     static const GUID iid = { 0x6DAA4F10,0x4A90,0x4753,[ 0x88,0x98,0x77,0xC5,0xDF,0x53,0x41,0x65 ] };
25389   /// Add an event handler for the ServerCertificateErrorDetected event.
25390   /// The ServerCertificateErrorDetected event is raised when the WebView2
25391   /// cannot verify server's digital certificate while loading a web page.
25392   ///
25393   /// This event will raise for all web resources and follows the `WebResourceRequested` event.
25394   ///
25395   /// If you don't handle the event, WebView2 will show the default TLS interstitial error page to the user
25396   /// for navigations, and for non-navigations the web request is cancelled.
25397   ///
25398   /// Note that WebView2 before raising `ServerCertificateErrorDetected` raises a `NavigationCompleted` event
25399   /// with `IsSuccess` as FALSE and any of the below WebErrorStatuses that indicate a certificate failure.
25400   ///
25401   /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT
25402   /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED
25403   /// - COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS
25404   /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED
25405   /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID
25406   ///
25407   /// For more details see `ICoreWebView2NavigationCompletedEventArgs::get_IsSuccess` and handle
25408   /// ServerCertificateErrorDetected event or show the default TLS interstitial error page to the user
25409   /// according to the app needs.
25410   ///
25411   /// WebView2 caches the response when action is `COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_ALWAYS_ALLOW`
25412   /// for the RequestUri's host and the server certificate in the session and the `ServerCertificateErrorDetected`
25413   /// event won't be raised again.
25414   ///
25415   /// To raise the event again you must clear the cache using `ClearServerCertificateErrorActions`.
25416   ///
25417   /// \snippet SettingsComponent.cpp ServerCertificateErrorDetected1
25418   HRESULT add_ServerCertificateErrorDetected(
25419       /+[in]+/ ICoreWebView2ServerCertificateErrorDetectedEventHandler
25420           eventHandler,
25421       @("out") EventRegistrationToken* token);
25422   /// Remove an event handler previously added with add_ServerCertificateErrorDetected.
25423   HRESULT remove_ServerCertificateErrorDetected(in EventRegistrationToken token);
25424 
25425   /// Clears all cached decisions to proceed with TLS certificate errors from the
25426   /// ServerCertificateErrorDetected event for all WebView2's sharing the same session.
25427   HRESULT ClearServerCertificateErrorActions(
25428       /+[in]+/ ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler
25429       handler);
25430 }
25431 
25432 /// Receives `StatusBarTextChanged` events.
25433 const GUID IID_ICoreWebView2StatusBarTextChangedEventHandler = ICoreWebView2StatusBarTextChangedEventHandler.iid;
25434 
25435 interface ICoreWebView2StatusBarTextChangedEventHandler : IUnknown
25436 {
25437     static const GUID iid = { 0xA5E3B0D0,0x10DF,0x4156,[ 0xBF,0xAD,0x3B,0x43,0x86,0x7A,0xCA,0xC6 ] };
25438   /// Called to provide the implementer with the event args for the
25439   /// corresponding event. No event args exist and the `args`
25440   /// parameter is set to `null`.
25441   HRESULT Invoke(
25442       /+[in]+/ ICoreWebView2 sender,
25443       /+[in]+/ IUnknown args);
25444 }
25445 
25446 /// This interface is an extension of `ICoreWebView2_14` that supports status Favicons.
25447 const GUID IID_ICoreWebView2_15 = ICoreWebView2_15.iid;
25448 
25449 interface ICoreWebView2_15 : ICoreWebView2_14
25450 {
25451     static const GUID iid = { 0x517B2D1D,0x7DAE,0x4A66,[ 0xA4,0xF4,0x10,0x35,0x2F,0xFB,0x95,0x18 ] };
25452   /// Add an event handler for the `FaviconChanged` event.
25453   /// The `FaviconChanged` event is raised when the
25454   /// [favicon](https://developer.mozilla.org/docs/Glossary/Favicon)
25455   /// had a different URL then the previous URL.
25456   /// The FaviconChanged event will be raised for first navigating to a new
25457   /// document, whether or not a document declares a Favicon in HTML if the
25458   /// favicon is different from the previous fav icon. The event will
25459   /// be raised again if a favicon is declared in its HTML or has script
25460   /// to set its favicon. The favicon information can then be retrieved with
25461   /// `GetFavicon` and `FaviconUri`.
25462   HRESULT add_FaviconChanged(
25463       /+[in]+/ ICoreWebView2FaviconChangedEventHandler eventHandler,
25464       @("out") EventRegistrationToken* token);
25465 
25466   /// Remove the event handler for `FaviconChanged` event.
25467   HRESULT remove_FaviconChanged(
25468       in EventRegistrationToken token);
25469 
25470   /// Get the current Uri of the favicon as a string.
25471   /// If the value is null, then the return value is `E_POINTER`, otherwise it is `S_OK`.
25472   /// If a page has no favicon then the value is an empty string.
25473   @(" propget")
25474 	HRESULT get_FaviconUri(@("out, retval") LPWSTR* value);
25475 
25476   /// Async function for getting the actual image data of the favicon.
25477   /// The image is copied to the `imageStream` object in `ICoreWebView2GetFaviconCompletedHandler`.
25478   /// If there is no image then no data would be copied into the imageStream.
25479   /// The `format` is the file format to return the image stream.
25480   /// `completedHandler` is executed at the end of the operation.
25481   ///
25482   /// \snippet SettingsComponent.cpp FaviconChanged
25483   HRESULT GetFavicon(
25484         in COREWEBVIEW2_FAVICON_IMAGE_FORMAT format,
25485         /+[in]+/ ICoreWebView2GetFaviconCompletedHandler completedHandler);
25486 }
25487 
25488 /// A continuation of the `ICoreWebView2` interface to support printing.
25489 const GUID IID_ICoreWebView2_16 = ICoreWebView2_16.iid;
25490 
25491 interface ICoreWebView2_16 : ICoreWebView2_15
25492 {
25493     static const GUID iid = { 0x0EB34DC9,0x9F91,0x41E1,[ 0x86,0x39,0x95,0xCD,0x59,0x43,0x90,0x6B ] };
25494   /// Print the current web page asynchronously to the specified printer with the provided settings.
25495   /// See `ICoreWebView2PrintSettings` for description of settings. Passing
25496   /// nullptr for `printSettings` results in default print settings used.
25497   ///
25498   /// The handler will return `errorCode` as `S_OK` and `printStatus` as COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE
25499   /// if `printerName` doesn't match with the name of any installed printers on the user OS. The handler
25500   /// will return `errorCode` as `E_INVALIDARG` and `printStatus` as COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR
25501   /// if the caller provides invalid settings for a given printer.
25502   ///
25503   /// The async `Print` operation completes when it finishes printing to the printer.
25504   /// At this time the `ICoreWebView2PrintCompletedHandler` is invoked.
25505   /// Only one `Printing` operation can be in progress at a time. If `Print` is called while a `Print` or `PrintToPdf`
25506   /// or `PrintToPdfStream` or `ShowPrintUI` job is in progress, the completed handler is immediately invoked
25507   /// with `E_ABORT` and `printStatus` is COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR.
25508   /// This is only for printing operation on one webview.
25509   ///
25510   /// |       errorCode     |      printStatus                              |               Notes                                                                           |
25511   /// | --- | --- | --- |
25512   /// |        S_OK         | COREWEBVIEW2_PRINT_STATUS_SUCCEEDED           | Print operation succeeded.                                                                    |
25513   /// |        S_OK         | COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE | If specified printer is not found or printer status is not available, offline or error state. |
25514   /// |        S_OK         | COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR         | Print operation is failed.                                                                    |
25515   /// |     E_INVALIDARG    | COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR         | If the caller provides invalid settings for the specified printer.                            |
25516   /// |       E_ABORT       | COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR         | Print operation is failed as printing job already in progress.                                |
25517   ///
25518   /// \snippet AppWindow.cpp PrintToPrinter
25519   HRESULT Print(
25520     /+[in]+/ ICoreWebView2PrintSettings printSettings,
25521     /+[in]+/ ICoreWebView2PrintCompletedHandler handler);
25522 
25523   /// Opens the print dialog to print the current web page. See `COREWEBVIEW2_PRINT_DIALOG_KIND`
25524   /// for descriptions of print dialog kinds.
25525   ///
25526   /// Invoking browser or system print dialog doesn't open new print dialog if
25527   /// it is already open.
25528   ///
25529   /// \snippet AppWindow.cpp ShowPrintUI
25530   HRESULT ShowPrintUI(in COREWEBVIEW2_PRINT_DIALOG_KIND printDialogKind);
25531 
25532   /// Provides the Pdf data of current web page asynchronously for the provided settings.
25533   /// Stream will be rewound to the start of the pdf data.
25534   ///
25535   /// See `ICoreWebView2PrintSettings` for description of settings. Passing
25536   /// nullptr for `printSettings` results in default print settings used.
25537   ///
25538   /// The async `PrintToPdfStream` operation completes when it finishes
25539   /// writing to the stream. At this time the `ICoreWebView2PrintToPdfStreamCompletedHandler`
25540   /// is invoked. Only one `Printing` operation can be in progress at a time. If
25541   /// `PrintToPdfStream` is called while a `PrintToPdfStream` or `PrintToPdf` or `Print`
25542   /// or `ShowPrintUI` job is in progress, the completed handler is immediately invoked with `E_ABORT`.
25543   /// This is only for printing operation on one webview.
25544   ///
25545   /// \snippet AppWindow.cpp PrintToPdfStream
25546   HRESULT PrintToPdfStream(/+[in]+/ ICoreWebView2PrintSettings printSettings,
25547                            /+[in]+/ ICoreWebView2PrintToPdfStreamCompletedHandler handler);
25548 }
25549 
25550 /// Receives the result of the `Print` method.
25551 const GUID IID_ICoreWebView2PrintCompletedHandler = ICoreWebView2PrintCompletedHandler.iid;
25552 
25553 interface ICoreWebView2PrintCompletedHandler : IUnknown
25554 {
25555     static const GUID iid = { 0x8FD80075,0xED08,0x42DB,[ 0x85,0x70,0xF5,0xD1,0x49,0x77,0x46,0x1E ] };
25556   /// Provides the result of the corresponding asynchronous method.
25557   HRESULT Invoke(in HRESULT errorCode, in COREWEBVIEW2_PRINT_STATUS printStatus);
25558 }
25559 
25560 /// This interface is an extension of `ICoreWebView2_16` that supports shared buffer based on file mapping.
25561 const GUID IID_ICoreWebView2_17 = ICoreWebView2_17.iid;
25562 
25563 interface ICoreWebView2_17 : ICoreWebView2_16
25564 {
25565     static const GUID iid = { 0x702E75D4,0xFD44,0x434D,[ 0x9D,0x70,0x1A,0x68,0xA6,0xB1,0x19,0x2A ] };
25566   /// Share a shared buffer object with script of the main frame in the WebView.
25567   /// The script will receive a `sharedbufferreceived` event from chrome.webview.
25568   /// The event arg for that event will have the following methods and properties:
25569   ///   `getBuffer()`: return an ArrayBuffer object with the backing content from the shared buffer.
25570   ///   `additionalData`: an object as the result of parsing `additionalDataAsJson` as JSON string.
25571   ///           This property will be `undefined` if `additionalDataAsJson` is nullptr or empty string.
25572   ///   `source`: with a value set as `chrome.webview` object.
25573   /// If a string is provided as `additionalDataAsJson` but it is not a valid JSON string,
25574   /// the API will fail with `E_INVALIDARG`.
25575   /// If `access` is COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY, the script will only have read access to the buffer.
25576   /// If the script tries to modify the content in a read only buffer, it will cause an access
25577   /// violation in WebView renderer process and crash the renderer process.
25578   /// If the shared buffer is already closed, the API will fail with `RO_E_CLOSED`.
25579   ///
25580   /// The script code should call `chrome.webview.releaseBuffer` with
25581   /// the shared buffer as the parameter to release underlying resources as soon
25582   /// as it does not need access to the shared buffer any more.
25583   ///
25584   /// The application can post the same shared buffer object to multiple web pages or iframes, or
25585   /// post to the same web page or iframe multiple times. Each `PostSharedBufferToScript` will
25586   /// create a separate ArrayBuffer object with its own view of the memory and is separately
25587   /// released. The underlying shared memory will be released when all the views are released.
25588   ///
25589   /// For example, if we want to send data to script for one time read only consumption.
25590   ///
25591   /// \snippet ScenarioSharedBuffer.cpp OneTimeShareBuffer
25592   ///
25593   /// In the HTML document,
25594   ///
25595   /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_1
25596   ///
25597   /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_2
25598   ///
25599   /// Sharing a buffer to script has security risk. You should only share buffer with trusted site.
25600   /// If a buffer is shared to a untrusted site, possible sensitive information could be leaked.
25601   /// If a buffer is shared as modifiable by the script and the script modifies it in an unexpected way,
25602   /// it could result in corrupted data that might even crash the application.
25603   ///
25604   HRESULT PostSharedBufferToScript(
25605     /+[in]+/ ICoreWebView2SharedBuffer sharedBuffer,
25606     in COREWEBVIEW2_SHARED_BUFFER_ACCESS access,
25607     in LPCWSTR additionalDataAsJson);
25608 }
25609 
25610 /// Receives the result of the `PrintToPdfStream` method.
25611 /// `errorCode` returns S_OK if the PrintToPdfStream operation succeeded.
25612 /// The printable pdf data is returned in the `pdfStream` object.
25613 const GUID IID_ICoreWebView2PrintToPdfStreamCompletedHandler = ICoreWebView2PrintToPdfStreamCompletedHandler.iid;
25614 
25615 interface ICoreWebView2PrintToPdfStreamCompletedHandler : IUnknown
25616 {
25617     static const GUID iid = { 0x4C9F8229,0x8F93,0x444F,[ 0xA7,0x11,0x2C,0x0D,0xFD,0x63,0x59,0xD5 ] };
25618   /// Provides the result of the corresponding asynchronous method.
25619   HRESULT Invoke(in HRESULT errorCode, in IStream* pdfStream);
25620 }
25621 
25622 /// Settings used by the `Print` method.
25623 const GUID IID_ICoreWebView2PrintSettings2 = ICoreWebView2PrintSettings2.iid;
25624 
25625 interface ICoreWebView2PrintSettings2 : ICoreWebView2PrintSettings
25626 {
25627     static const GUID iid = { 0xCA7F0E1F,0x3484,0x41D1,[ 0x8C,0x1A,0x65,0xCD,0x44,0xA6,0x3F,0x8D ] };
25628   /// Page range to print. Defaults to empty string, which means print all pages.
25629   /// If the Page range is empty string or null, then it applies the default.
25630   ///
25631   /// The PageRanges property is a list of page ranges specifying one or more pages that
25632   /// should be printed separated by commas. Any whitespace between page ranges is ignored.
25633   /// A valid page range is either a single integer identifying the page to print, or a range
25634   /// in the form `[start page]-[last page]` where `start page` and `last page` are integers
25635   /// identifying the first and last inclusive pages respectively to print.
25636   /// Every page identifier is an integer greater than 0 unless wildcards are used (see below examples).
25637   /// The first page is 1.
25638   ///
25639   /// In a page range of the form `[start page]-[last page]` the start page number must be
25640   /// larger than 0 and less than or equal to the document's total page count.
25641   /// If the `start page` is not present, then 1 is used as the `start page`.
25642   /// The `last page` must be larger than the `start page`.
25643   /// If the `last page` is not present, then the document total page count is used as the `last page`.
25644   ///
25645   /// Repeating a page does not print it multiple times. To print multiple times, use the `Copies` property.
25646   ///
25647   /// The pages are always printed in ascending order, even if specified in non-ascending order.
25648   ///
25649   /// If page range is not valid or if a page is greater than document total page count,
25650   /// `ICoreWebView2PrintCompletedHandler` or `ICoreWebView2PrintToPdfStreamCompletedHandler`
25651   /// handler will return `E_INVALIDARG`.
25652   ///
25653   /// The following examples assume a document with 20 total pages.
25654   ///
25655   /// |       Example         |       Result      |               Notes                                              |
25656   /// | --- | --- | --- |
25657   /// | "2"                   |  Page 2           |                                                                  |
25658   /// | "1-4, 9, 3-6, 10, 11" |  Pages 1-6, 9-11  |                                                                  |
25659   /// | "1-4, -6"             |  Pages 1-6        | The "-6" is interpreted as "1-6".                                |
25660   /// | "2-"                  |  Pages 2-20       | The "2-" is interpreted as "pages 2 to the end of the document". |
25661   /// | "4-2, 11, -6"         |  Invalid          | "4-2" is an invalid range.                                       |
25662   /// | "-"                   |  Pages 1-20       | The "-" is interpreted as "page 1 to the end of the document".   |
25663   /// | "1-4dsf, 11"          |  Invalid          |                                                                  |
25664   /// | "2-2"                 |  Page 2           |                                                                  |
25665   ///
25666   /// The caller must free the returned string with `CoTaskMemFree`. See
25667   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings)
25668   @(" propget")
25669 	HRESULT get_PageRanges(@("out, retval") LPWSTR* value);
25670 
25671   /// Set the `PageRanges` property.
25672   @(" propput")
25673 	HRESULT put_PageRanges(in LPCWSTR value);
25674 
25675   /// Prints multiple pages of a document on a single piece of paper. Choose from 1, 2, 4, 6, 9 or 16.
25676   /// The default value is 1.
25677   @(" propget")
25678 	HRESULT get_PagesPerSide(@("out, retval") INT32* value);
25679 
25680   /// Set the `PagesPerSide` property. Returns `E_INVALIDARG` if an invalid value is
25681   /// provided, and the current value is not changed.
25682   ///
25683   /// Below examples shows print output for PagesPerSide and Duplex.
25684   ///
25685   /// |  PagesPerSide   |    Total pages   | Two-sided printing |              Result                                               |
25686   /// | --- | --- | --- | --- |
25687   /// |      1          |      1           |        -           | 1 page on the front side.                                         |
25688   /// |      2          |      1           |        Yes         | 1 page on the front side.                                         |
25689   /// |      2          |      4           |        -           | 2 pages on the first paper and 2 pages on the next paper.         |
25690   /// |      2          |      4           |        Yes         | 2 pages on the front side and 2 pages on back side.               |
25691   /// |      4          |      4           |        Yes         | 4 pages on the front side.                                        |
25692   /// |      4          |      8           |        Yes         | 4 pages on the front side and 4 pages on the back side.           |
25693   @(" propput")
25694 	HRESULT put_PagesPerSide(in INT32 value);
25695 
25696   /// Number of copies to print. Minimum value is `1` and the maximum copies count is `999`.
25697   /// The default value is 1.
25698   ///
25699   /// This value is ignored in PrintToPdfStream method.
25700   @(" propget")
25701 	HRESULT get_Copies(@("out, retval") INT32* value);
25702 
25703   /// Set the `Copies` property. Returns `E_INVALIDARG` if an invalid value is provided
25704   /// and the current value is not changed.
25705   @(" propput")
25706 	HRESULT put_Copies(in INT32 value);
25707 
25708   /// Printer collation. See `COREWEBVIEW2_PRINT_COLLATION` for descriptions of
25709   /// collation. The default value is `COREWEBVIEW2_PRINT_COLLATION_DEFAULT`.
25710   ///
25711   /// Printing uses default value of printer's collation if an invalid value is provided
25712   /// for the specific printer.
25713   ///
25714   /// This value is ignored in PrintToPdfStream method.
25715   @(" propget")
25716 	HRESULT get_Collation(@("out, retval") COREWEBVIEW2_PRINT_COLLATION* value);
25717 
25718   /// Set the `Collation` property.
25719   @(" propput")
25720 	HRESULT put_Collation(in COREWEBVIEW2_PRINT_COLLATION value);
25721 
25722   /// Printer color mode. See `COREWEBVIEW2_PRINT_COLOR_MODE` for descriptions
25723   /// of color modes. The default value is `COREWEBVIEW2_PRINT_COLOR_MODE_DEFAULT`.
25724   ///
25725   /// Printing uses default value of printer supported color if an invalid value is provided
25726   /// for the specific printer.
25727   @(" propget")
25728 	HRESULT get_ColorMode(@("out, retval") COREWEBVIEW2_PRINT_COLOR_MODE* value);
25729 
25730   /// Set the `ColorMode` property.
25731   @(" propput")
25732 	HRESULT put_ColorMode(in COREWEBVIEW2_PRINT_COLOR_MODE value);
25733 
25734   /// Printer duplex settings. See `COREWEBVIEW2_PRINT_DUPLEX` for descriptions of duplex.
25735   /// The default value is `COREWEBVIEW2_PRINT_DUPLEX_DEFAULT`.
25736   ///
25737   /// Printing uses default value of printer's duplex if an invalid value is provided
25738   /// for the specific printer.
25739   ///
25740   /// This value is ignored in PrintToPdfStream method.
25741   @(" propget")
25742 	HRESULT get_Duplex(@("out, retval") COREWEBVIEW2_PRINT_DUPLEX* value);
25743 
25744   /// Set the `Duplex` property.
25745   @(" propput")
25746 	HRESULT put_Duplex(in COREWEBVIEW2_PRINT_DUPLEX value);
25747 
25748   /// Printer media size. See `COREWEBVIEW2_PRINT_MEDIA_SIZE` for descriptions of media size.
25749   /// The default value is `COREWEBVIEW2_PRINT_MEDIA_SIZE_DEFAULT`.
25750   ///
25751   /// If media size is `COREWEBVIEW2_PRINT_MEDIA_SIZE_CUSTOM`, you should set the `PageWidth`
25752   /// and `PageHeight`.
25753   ///
25754   /// Printing uses default value of printer supported media size if an invalid value is provided
25755   /// for the specific printer.
25756   ///
25757   /// This value is ignored in PrintToPdfStream method.
25758   @(" propget")
25759 	HRESULT get_MediaSize(@("out, retval") COREWEBVIEW2_PRINT_MEDIA_SIZE* value);
25760 
25761   /// Set the `MediaSize` property.
25762   @(" propput")
25763 	HRESULT put_MediaSize(in COREWEBVIEW2_PRINT_MEDIA_SIZE value);
25764 
25765   /// The name of the printer to use. Defaults to empty string.
25766   /// If the printer name is empty string or null, then it prints to the default
25767   /// printer on the user OS.
25768   ///
25769   /// This value is ignored in PrintToPdfStream method.
25770   ///
25771   /// The caller must free the returned string with `CoTaskMemFree`. See
25772   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings)
25773   @(" propget")
25774 	HRESULT get_PrinterName(@("out, retval") LPWSTR* value);
25775 
25776   /// Set the `PrinterName` property. If provided printer name doesn't match
25777   /// with the name of any installed printers on the user OS,
25778   /// `ICoreWebView2PrintCompletedHandler` handler will return `errorCode` as
25779   /// `S_OK` and `printStatus` as COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE.
25780   ///
25781   /// Use [Enum Printers](/windows/win32/printdocs/enumprinters)
25782   /// to enumerate available printers.
25783   @(" propput")
25784 	HRESULT put_PrinterName(in LPCWSTR value);
25785 }
25786 
25787 /// This interface is an extension of `ICoreWebView2_17` that manages
25788 /// navigation requests to URI schemes registered with the OS.
25789 const GUID IID_ICoreWebView2_18 = ICoreWebView2_18.iid;
25790 
25791 interface ICoreWebView2_18 : ICoreWebView2_17
25792 {
25793     static const GUID iid = { 0x7A626017,0x28BE,0x49B2,[ 0xB8,0x65,0x3B,0xA2,0xB3,0x52,0x2D,0x90 ] };
25794   /// Add an event handler for the `LaunchingExternalUriScheme` event.
25795   /// The `LaunchingExternalUriScheme` event is raised when a navigation request is made to
25796   /// a URI scheme that is registered with the OS.
25797   /// The `LaunchingExternalUriScheme` event handler may suppress the default dialog
25798   /// or replace the default dialog with a custom dialog.
25799   ///
25800   /// If a deferral is not taken on the event args, the external URI scheme launch is
25801   /// blocked until the event handler returns.  If a deferral is taken, the
25802   /// external URI scheme launch is blocked until the deferral is completed.
25803   /// The host also has the option to cancel the URI scheme launch.
25804   ///
25805   /// The `NavigationStarting` and `NavigationCompleted` events will be raised,
25806   /// regardless of whether the `Cancel` property is set to `TRUE` or
25807   /// `FALSE`. The `NavigationCompleted` event will be raised with the `IsSuccess` property
25808   /// set to `FALSE` and the `WebErrorStatus` property set to `ConnectionAborted` regardless of
25809   /// whether the host sets the `Cancel` property on the
25810   /// `ICoreWebView2LaunchingExternalUriSchemeEventArgs`. The `SourceChanged`, `ContentLoading`,
25811   /// and `HistoryChanged` events will not be raised for this navigation to the external URI
25812   /// scheme regardless of the `Cancel` property.
25813   /// The `LaunchingExternalUriScheme` event will be raised after the
25814   /// `NavigationStarting` event and before the `NavigationCompleted` event.
25815   /// The default `CoreWebView2Settings` will also be updated upon navigation to an external
25816   /// URI scheme. If a setting on the `CoreWebView2Settings` interface has been changed,
25817   /// navigating to an external URI scheme will trigger the `CoreWebView2Settings` to update.
25818   ///
25819   /// The WebView2 may not display the default dialog based on user settings, browser settings,
25820   /// and whether the origin is determined as a
25821   /// [trustworthy origin](https://w3c.github.io/webappsec-secure-contexts#
25822   /// potentially-trustworthy-origin); however, the event will still be raised.
25823   ///
25824   /// If the request is initiated by a cross-origin frame without a user gesture,
25825   /// the request will be blocked and the `LaunchingExternalUriScheme` event will not
25826   /// be raised.
25827   /// \snippet SettingsComponent.cpp ToggleLaunchingExternalUriScheme
25828   HRESULT add_LaunchingExternalUriScheme(
25829       /+[in]+/ ICoreWebView2LaunchingExternalUriSchemeEventHandler eventHandler,
25830       @("out") EventRegistrationToken* token);
25831 
25832   /// Remove an event handler previously added with
25833   /// `add_LaunchingExternalUriScheme`.
25834   HRESULT remove_LaunchingExternalUriScheme(
25835       in EventRegistrationToken token);
25836 }
25837 
25838 /// This interface is an extension of `ICoreWebView2_18` that manages memory usage
25839 /// target level.
25840 const GUID IID_ICoreWebView2_19 = ICoreWebView2_19.iid;
25841 
25842 interface ICoreWebView2_19 : ICoreWebView2_18
25843 {
25844     static const GUID iid = { 0x6921F954,0x79B0,0x437F,[ 0xA9,0x97,0xC8,0x58,0x11,0x89,0x7C,0x68 ] };
25845 
25846   /// `MemoryUsageTargetLevel` indicates desired memory consumption level of
25847   /// WebView.
25848   @(" propget")
25849 	HRESULT get_MemoryUsageTargetLevel(
25850       @("out, retval") COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL* level);
25851 
25852   /// An app may set `MemoryUsageTargetLevel` to indicate desired memory
25853   /// consumption level of WebView. Scripts will not be impacted and continue
25854   /// to run. This is useful for inactive apps that still want to run scripts
25855   /// and/or keep network connections alive and therefore could not call
25856   /// `TrySuspend` and `Resume` to reduce memory consumption. These apps can
25857   /// set memory usage target level to `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_LOW`
25858   /// when the app becomes inactive, and set back to
25859   /// `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_NORMAL` when the app becomes
25860   /// active. It is not necessary to set CoreWebView2Controller's IsVisible
25861   /// property to false when setting the property.
25862   /// It is a best effort operation to change memory usage level, and the
25863   /// API will return before the operation completes.
25864   /// Setting the level to `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_LOW`
25865   /// could potentially cause memory for some WebView browser processes to be
25866   /// swapped out to disk in some circumstances.
25867   /// It is a best effort to reduce memory usage as much as possible. If a script
25868   /// runs after its related memory has been swapped out, the memory will be swapped
25869   /// back in to ensure the script can still run, but performance might be impacted.
25870   /// Therefore, the app should set the level back to
25871   /// `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_NORMAL` when the app becomes
25872   /// active again. Setting memory usage target level back to normal will not happen
25873   /// automatically.
25874   /// An app should choose to use either the combination of `TrySuspend` and `Resume`
25875   /// or the combination of setting MemoryUsageTargetLevel to low and normal. It is
25876   /// not advisable to mix them.
25877   /// Trying to set `MemoryUsageTargetLevel` while suspended will be ignored.
25878   /// The `TrySuspend` and `Resume` methods will change the `MemoryUsageTargetLevel`.
25879   /// `TrySuspend` will automatically set `MemoryUsageTargetLevel` to low while
25880   /// `Resume` on suspended WebView will automatically set `MemoryUsageTargetLevel`
25881   /// to normal. Calling `Resume` when the WebView is not suspended would not change
25882   /// `MemoryUsageTargetLevel`.
25883   ///
25884   /// \snippet ViewComponent.cpp MemoryUsageTargetLevel
25885   @(" propput")
25886 	HRESULT put_MemoryUsageTargetLevel(
25887       in COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL level);
25888 }
25889 
25890 /// This interface is an extension of `ICoreWebView2_19` that provides the `FrameId` property.
25891 const GUID IID_ICoreWebView2_20 = ICoreWebView2_20.iid;
25892 
25893 interface ICoreWebView2_20 : ICoreWebView2_19
25894 {
25895     static const GUID iid = { 0xb4bc1926,0x7305,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] };
25896   /// The unique identifier of the main frame. It's the same kind of ID as
25897   /// with the `FrameId` in `CoreWebView2Frame` and via `CoreWebView2FrameInfo`.
25898   /// Note that `FrameId` may not be valid if `CoreWebView2` has not done
25899   /// any navigation. It's safe to get this value during or after the first
25900   /// `ContentLoading` event. Otherwise, it could return the invalid frame Id 0.
25901   @(" propget")
25902 	HRESULT get_FrameId(@("out, retval") UINT32* id);
25903 }
25904 
25905 /// Event handler for the `LaunchingExternalUriScheme` event.
25906 const GUID IID_ICoreWebView2LaunchingExternalUriSchemeEventHandler = ICoreWebView2LaunchingExternalUriSchemeEventHandler.iid;
25907 
25908 interface ICoreWebView2LaunchingExternalUriSchemeEventHandler : IUnknown
25909 {
25910     static const GUID iid = { 0x74F712E0,0x8165,0x43A9,[ 0xA1,0x3F,0x0C,0xCE,0x59,0x7E,0x75,0xDF ] };
25911   /// Receives the event args for the corresponding event.
25912   HRESULT Invoke(
25913       /+[in]+/ ICoreWebView2 sender,
25914       /+[in]+/ ICoreWebView2LaunchingExternalUriSchemeEventArgs args);
25915 }
25916 
25917 /// Event args for `LaunchingExternalUriScheme` event.
25918 const GUID IID_ICoreWebView2LaunchingExternalUriSchemeEventArgs = ICoreWebView2LaunchingExternalUriSchemeEventArgs.iid;
25919 
25920 interface ICoreWebView2LaunchingExternalUriSchemeEventArgs : IUnknown
25921 {
25922     static const GUID iid = { 0x07D1A6C3,0x7175,0x4BA1,[ 0x93,0x06,0xE5,0x93,0xCA,0x07,0xE4,0x6C ] };
25923   /// The URI with the external URI scheme to be launched.
25924 
25925   @(" propget")
25926 	HRESULT get_Uri(@("out, retval") LPWSTR* value);
25927 
25928   /// The origin initiating the external URI scheme launch.
25929   /// The origin will be an empty string if the request is initiated by calling
25930   /// `CoreWebView2.Navigate` on the external URI scheme. If a script initiates
25931   /// the navigation, the `InitiatingOrigin` will be the top-level document's
25932   /// `Source`, for example, if `window.location` is set to `"calculator://", the
25933   /// `InitiatingOrigin` will be set to `calculator://`. If the request is initiated
25934   ///  from a child frame, the `InitiatingOrigin` will be the source of that child frame.
25935 
25936   @(" propget")
25937 	HRESULT get_InitiatingOrigin(@("out, retval") LPWSTR* value);
25938 
25939   /// `TRUE` when the external URI scheme request was initiated through a user gesture.
25940   ///
25941   /// \> [!NOTE]\n\> Being initiated through a user gesture does not mean that user intended
25942   /// to access the associated resource.
25943 
25944   @(" propget")
25945 	HRESULT get_IsUserInitiated(@("out, retval") BOOL* value);
25946 
25947   /// The event handler may set this property to `TRUE` to cancel the external URI scheme
25948   /// launch. If set to `TRUE`, the external URI scheme will not be launched, and the default
25949   /// dialog is not displayed. This property can be used to replace the normal
25950   /// handling of launching an external URI scheme.
25951   /// The initial value of the `Cancel` property is `FALSE`.
25952 
25953   @(" propget")
25954 	HRESULT get_Cancel(@("out, retval") BOOL* value);
25955 
25956   /// Sets the `Cancel` property.
25957 
25958   @(" propput")
25959 	HRESULT put_Cancel(in BOOL value);
25960 
25961   /// Returns an `ICoreWebView2Deferral` object.  Use this operation to
25962   /// complete the event at a later time.
25963 
25964   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * value);
25965 }
25966 
25967 /// The caller implements this interface to handle the BasicAuthenticationRequested event.
25968 const GUID IID_ICoreWebView2BasicAuthenticationRequestedEventHandler = ICoreWebView2BasicAuthenticationRequestedEventHandler.iid;
25969 
25970 interface ICoreWebView2BasicAuthenticationRequestedEventHandler : IUnknown
25971 {
25972     static const GUID iid = { 0x58b4d6c2,0x18d4,0x497e,[ 0xb3,0x9b,0x9a,0x96,0x53,0x3f,0xa2,0x78 ] };
25973   /// Called to provide the implementer with the event args for the
25974   /// corresponding event.
25975   HRESULT Invoke(
25976       /+[in]+/ ICoreWebView2 sender,
25977       /+[in]+/ ICoreWebView2BasicAuthenticationRequestedEventArgs args);
25978 }
25979 
25980 /// Implements the interface to receive `IsDefaultDownloadDialogOpenChanged`
25981 /// events.
25982 const GUID IID_ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler = ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler.iid;
25983 
25984 interface ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler : IUnknown
25985 {
25986     static const GUID iid = { 0x3117da26,0xae13,0x438d,[ 0xbd,0x46,0xed,0xbe,0xb2,0xc4,0xce,0x81 ] };
25987   /// Provides the event args for the corresponding event. No event args exist
25988   /// and the `args` parameter is set to `null`.
25989   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender,
25990                  /+[in]+/ IUnknown args);
25991 }
25992 
25993 /// Receives the result of the `PrintToPdf` method. If the print to PDF
25994 /// operation succeeds, `isSuccessful` is true. Otherwise, if the operation
25995 /// failed, `isSuccessful` is set to false. An invalid path returns
25996 /// `E_INVALIDARG`.
25997 const GUID IID_ICoreWebView2PrintToPdfCompletedHandler = ICoreWebView2PrintToPdfCompletedHandler.iid;
25998 
25999 interface ICoreWebView2PrintToPdfCompletedHandler : IUnknown
26000 {
26001     static const GUID iid = { 0xccf1ef04,0xfd8e,0x4d5f,[ 0xb2,0xde,0x09,0x83,0xe4,0x1b,0x8c,0x36 ] };
26002 
26003   /// Provides the result of the corresponding asynchronous method.
26004   HRESULT Invoke(in HRESULT errorCode, BOOL isSuccessful);
26005 }
26006 
26007 /// Settings used by the `PrintToPdf` method.
26008 const GUID IID_ICoreWebView2PrintSettings = ICoreWebView2PrintSettings.iid;
26009 
26010 interface ICoreWebView2PrintSettings : IUnknown
26011 {
26012     static const GUID iid = { 0x377f3721,0xc74e,0x48ca,[ 0x8d,0xb1,0xdf,0x68,0xe5,0x1d,0x60,0xe2 ] };
26013 
26014   /// The orientation can be portrait or landscape. The default orientation is
26015   /// portrait. See `COREWEBVIEW2_PRINT_ORIENTATION`.
26016   @(" propget")
26017 	HRESULT get_Orientation(
26018     @("out, retval") COREWEBVIEW2_PRINT_ORIENTATION* orientation);
26019 
26020   /// Sets the `Orientation` property.
26021   @(" propput")
26022 	HRESULT put_Orientation(
26023       in COREWEBVIEW2_PRINT_ORIENTATION orientation);
26024 
26025   /// The scale factor is a value between 0.1 and 2.0. The default is 1.0.
26026   @(" propget")
26027 	HRESULT get_ScaleFactor(@("out, retval") double* scaleFactor);
26028 
26029   /// Sets the `ScaleFactor` property. Returns `E_INVALIDARG` if an invalid
26030   /// value is provided, and the current value is not changed.
26031   @(" propput")
26032 	HRESULT put_ScaleFactor(in double scaleFactor);
26033 
26034   /// The page width in inches. The default width is 8.5 inches.
26035   @(" propget")
26036 	HRESULT get_PageWidth(@("out, retval") double* pageWidth);
26037 
26038   /// Sets the `PageWidth` property. Returns `E_INVALIDARG` if the page width is
26039   /// less than or equal to zero, and the current value is not changed.
26040   @(" propput")
26041 	HRESULT put_PageWidth(in double pageWidth);
26042 
26043   /// The page height in inches. The default height is 11 inches.
26044   @(" propget")
26045 	HRESULT get_PageHeight(@("out, retval") double* pageHeight);
26046 
26047   /// Sets the `PageHeight` property. Returns `E_INVALIDARG` if the page height
26048   /// is less than or equal to zero, and the current value is not changed.
26049   @(" propput")
26050 	HRESULT put_PageHeight(in double pageHeight);
26051 
26052   /// The top margin in inches. The default is 1 cm, or ~0.4 inches.
26053   @(" propget")
26054 	HRESULT get_MarginTop(@("out, retval") double* marginTop);
26055 
26056   /// Sets the `MarginTop` property. A margin cannot be less than zero.
26057   /// Returns `E_INVALIDARG` if an invalid value is provided, and the current
26058   /// value is not changed.
26059   @(" propput")
26060 	HRESULT put_MarginTop(in double marginTop);
26061 
26062   /// The bottom margin in inches. The default is 1 cm, or ~0.4 inches.
26063   @(" propget")
26064 	HRESULT get_MarginBottom(@("out, retval") double* marginBottom);
26065 
26066   /// Sets the `MarginBottom` property. A margin cannot be less than zero.
26067   /// Returns `E_INVALIDARG` if an invalid value is provided, and the current
26068   /// value is not changed.
26069   @(" propput")
26070 	HRESULT put_MarginBottom(in double marginBottom);
26071 
26072   /// The left margin in inches. The default is 1 cm, or ~0.4 inches.
26073   @(" propget")
26074 	HRESULT get_MarginLeft(@("out, retval") double* marginLeft);
26075 
26076   /// Sets the `MarginLeft` property. A margin cannot be less than zero.
26077   /// Returns `E_INVALIDARG` if an invalid value is provided, and the current
26078   /// value is not changed.
26079   @(" propput")
26080 	HRESULT put_MarginLeft(in double marginLeft);
26081 
26082   /// The right margin in inches. The default is 1 cm, or ~0.4 inches.
26083   @(" propget")
26084 	HRESULT get_MarginRight(@("out, retval") double* marginRight);
26085 
26086   /// Set the `MarginRight` property.A margin cannot be less than zero.
26087   /// Returns `E_INVALIDARG` if an invalid value is provided, and the current
26088   /// value is not changed.
26089   @(" propput")
26090 	HRESULT put_MarginRight(in double marginRight);
26091 
26092   /// `TRUE` if background colors and images should be printed. The default value
26093   /// is `FALSE`.
26094   @(" propget")
26095 	HRESULT get_ShouldPrintBackgrounds(
26096       @("out, retval") BOOL* shouldPrintBackgrounds);
26097 
26098   /// Set the `ShouldPrintBackgrounds` property.
26099   @(" propput")
26100 	HRESULT put_ShouldPrintBackgrounds(in BOOL shouldPrintBackgrounds);
26101 
26102   /// `TRUE` if only the current end user's selection of HTML in the document
26103   /// should be printed. The default value is `FALSE`.
26104   @(" propget")
26105 	HRESULT get_ShouldPrintSelectionOnly(
26106       @("out, retval") BOOL* shouldPrintSelectionOnly);
26107 
26108   /// Set the `ShouldPrintSelectionOnly` property.
26109   @(" propput")
26110 	HRESULT put_ShouldPrintSelectionOnly(
26111       in BOOL shouldPrintSelectionOnly);
26112 
26113   /// `TRUE` if header and footer should be printed. The default value is `FALSE`.
26114   /// The header consists of the date and time of printing, and the title of the
26115   /// page. The footer consists of the URI and page number. The height of the
26116   /// header and footer is 0.5 cm, or ~0.2 inches.
26117   @(" propget")
26118 	HRESULT get_ShouldPrintHeaderAndFooter(
26119       @("out, retval") BOOL* shouldPrintHeaderAndFooter);
26120 
26121   /// Set the `ShouldPrintHeaderAndFooter` property.
26122   @(" propput")
26123 	HRESULT put_ShouldPrintHeaderAndFooter(
26124       in BOOL shouldPrintHeaderAndFooter);
26125 
26126   /// The title in the header if `ShouldPrintHeaderAndFooter` is `TRUE`. The
26127   /// default value is the title of the current document.
26128   ///
26129   /// The caller must free the returned string with `CoTaskMemFree`.  See
26130   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
26131   @(" propget")
26132 	HRESULT get_HeaderTitle(@("out, retval") LPWSTR* headerTitle);
26133 
26134   /// Set the `HeaderTitle` property. If an empty string or null value is
26135   /// provided, no title is shown in the header.
26136   @(" propput")
26137 	HRESULT put_HeaderTitle(in LPCWSTR headerTitle);
26138 
26139   /// The URI in the footer if `ShouldPrintHeaderAndFooter` is `TRUE`. The
26140   /// default value is the current URI.
26141   ///
26142   /// The caller must free the returned string with `CoTaskMemFree`.  See
26143   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
26144   @(" propget")
26145 	HRESULT get_FooterUri(@("out, retval") LPWSTR* footerUri);
26146 
26147   /// Set the `FooterUri` property. If an empty string or null value is
26148   /// provided, no URI is shown in the footer.
26149   @(" propput")
26150 	HRESULT put_FooterUri(in LPCWSTR footerUri);
26151 }
26152 
26153 /// The caller implements this interface to receive the TrySuspend result.
26154 const GUID IID_ICoreWebView2TrySuspendCompletedHandler = ICoreWebView2TrySuspendCompletedHandler.iid;
26155 
26156 interface ICoreWebView2TrySuspendCompletedHandler : IUnknown
26157 {
26158     static const GUID iid = { 0x00F206A7,0x9D17,0x4605,[ 0x91,0xF6,0x4E,0x8E,0x4D,0xE1,0x92,0xE3 ] };
26159 
26160   /// Provides the result of the TrySuspend operation.
26161   /// See [Sleeping Tabs FAQ](https://techcommunity.microsoft.com/t5/articles/sleeping-tabs-faq/m-p/1705434)
26162   /// for conditions that might prevent WebView from being suspended. In those situations,
26163   /// isSuccessful will be false and errorCode is S_OK.
26164   HRESULT Invoke(in HRESULT errorCode, in BOOL isSuccessful);
26165 }
26166 
26167 /// The owner of the `CoreWebView2` object that provides support for resizing,
26168 /// showing and hiding, focusing, and other functionality related to
26169 /// windowing and composition.  The `CoreWebView2Controller` owns the
26170 /// `CoreWebView2`, and if all references to the `CoreWebView2Controller` go
26171 /// away, the WebView is closed.
26172 const GUID IID_ICoreWebView2Controller = ICoreWebView2Controller.iid;
26173 
26174 interface ICoreWebView2Controller : IUnknown
26175 {
26176     static const GUID iid = { 0x4d00c0d1,0x9434,0x4eb6,[ 0x80,0x78,0x86,0x97,0xa5,0x60,0x33,0x4f ] };
26177 
26178   /// The `IsVisible` property determines whether to show or hide the WebView2.
26179   ///   If `IsVisible` is set to `FALSE`, the WebView2 is transparent and is
26180   /// not rendered.   However, this does not affect the window containing the
26181   /// WebView2 (the `HWND` parameter that was passed to
26182   /// `CreateCoreWebView2Controller`).  If you want that window to disappear
26183   /// too, run `ShowWindow` on it directly in addition to modifying the
26184   /// `IsVisible` property.  WebView2 as a child window does not get window
26185   /// messages when the top window is minimized or restored.  For performance
26186   /// reasons, developers should set the `IsVisible` property of the WebView to
26187   /// `FALSE` when the app window is minimized and back to `TRUE` when the app
26188   /// window is restored. The app window does this by handling
26189   /// `SIZE_MINIMIZED and SIZE_RESTORED` command upon receiving `WM_SIZE`
26190   /// message.
26191   ///
26192   /// There are CPU and memory benefits when the page is hidden. For instance,
26193   /// Chromium has code that throttles activities on the page like animations
26194   /// and some tasks are run less frequently. Similarly, WebView2 will
26195   /// purge some caches to reduce memory usage.
26196   ///
26197   /// \snippet ViewComponent.cpp ToggleIsVisible
26198   @(" propget")
26199 	HRESULT get_IsVisible(@("out, retval") BOOL* isVisible);
26200 
26201   /// Sets the `IsVisible` property.
26202   ///
26203   /// \snippet ViewComponent.cpp ToggleIsVisibleOnMinimize
26204   @(" propput")
26205 	HRESULT put_IsVisible(in BOOL isVisible);
26206 
26207   /// The WebView bounds. Bounds are relative to the parent `HWND`.  The app
26208   /// has two ways to position a WebView.
26209   ///
26210   /// *   Create a child `HWND` that is the WebView parent `HWND`.  Position
26211   ///     the window where the WebView should be.  Use `(0, 0)` for the
26212   ///     top-left corner (the offset) of the `Bounds` of the WebView.
26213   /// *   Use the top-most window of the app as the WebView parent HWND.  For
26214   ///     example, to position WebView correctly in the app, set the top-left
26215   ///     corner of the Bound of the WebView.
26216   ///
26217   /// The values of `Bounds` are limited by the coordinate space of the host.
26218 
26219   @(" propget")
26220 	HRESULT get_Bounds(@("out, retval") RECT* bounds);
26221 
26222   /// Sets the `Bounds` property.
26223   ///
26224   /// \snippet ViewComponent.cpp ResizeWebView
26225 
26226   @(" propput")
26227 	HRESULT put_Bounds(in RECT bounds);
26228 
26229   /// The zoom factor for the WebView.
26230   ///
26231   /// \> [!NOTE]\n\> Changing zoom factor may cause `window.innerWidth`,
26232   /// `window.innerHeight`, both, and page layout to change.  A zoom factor
26233   /// that is applied by the host by running `ZoomFactor` becomes the new
26234   /// default zoom for the WebView.  The zoom factor applies across navigations
26235   /// and is the zoom factor WebView is returned to when the user chooses
26236   /// Ctrl+0.  When the zoom factor is changed by the user (resulting in
26237   /// the app receiving `ZoomFactorChanged`), that zoom applies only for the
26238   /// current page.  Any user applied zoom is only for the current page and is
26239   /// reset on a navigation.  Specifying a `zoomFactor` less than or equal to
26240   /// `0` is not allowed.  WebView also has an internal supported zoom factor
26241   /// range.  When a specified zoom factor is out of that range, it is
26242   /// normalized to be within the range, and a `ZoomFactorChanged` event is
26243   /// triggered for the real applied zoom factor.  When the range normalization
26244   /// happens, the `ZoomFactor` property reports the zoom factor specified
26245   /// during the previous modification of the `ZoomFactor` property until the
26246   /// `ZoomFactorChanged` event is received after WebView applies the
26247   /// normalized zoom factor.
26248 
26249   @(" propget")
26250 	HRESULT get_ZoomFactor(@("out, retval") double* zoomFactor);
26251 
26252   /// Sets the `ZoomFactor` property.
26253 
26254   @(" propput")
26255 	HRESULT put_ZoomFactor(in double zoomFactor);
26256 
26257   /// Adds an event handler for the `ZoomFactorChanged` event.
26258   /// `ZoomFactorChanged` runs when the `ZoomFactor` property of the WebView
26259   /// changes.  The event may run because the `ZoomFactor` property was
26260   /// modified, or due to the user manually modifying the zoom.  When it is
26261   /// modified using the `ZoomFactor` property, the internal zoom factor is
26262   /// updated immediately and no `ZoomFactorChanged` event is triggered.
26263   /// WebView associates the last used zoom factor for each site.  It is
26264   /// possible for the zoom factor to change when navigating to a different
26265   /// page.  When the zoom factor changes due to a navigation change, the
26266   /// `ZoomFactorChanged` event runs right after the `ContentLoading` event.
26267   ///
26268   /// \snippet ViewComponent.cpp ZoomFactorChanged
26269 
26270   HRESULT add_ZoomFactorChanged(
26271       /+[in]+/ ICoreWebView2ZoomFactorChangedEventHandler eventHandler,
26272       @("out") EventRegistrationToken* token);
26273 
26274   /// Remove an event handler previously added with `add_ZoomFactorChanged`.
26275 
26276   HRESULT remove_ZoomFactorChanged(
26277       in EventRegistrationToken token);
26278 
26279   /// Updates `Bounds` and `ZoomFactor` properties at the same time.  This
26280   /// operation is atomic from the perspective of the host.  After returning
26281   /// from this function, the `Bounds` and `ZoomFactor` properties are both
26282   /// updated if the function is successful, or neither is updated if the
26283   /// function fails.  If `Bounds` and `ZoomFactor` are both updated by the
26284   /// same scale (for example, `Bounds` and `ZoomFactor` are both doubled),
26285   /// then the page does not display a change in `window.innerWidth` or
26286   /// `window.innerHeight` and the WebView renders the content at the new size
26287   /// and zoom without intermediate renderings.  This function also updates
26288   /// just one of `ZoomFactor` or `Bounds` by passing in the new value for one
26289   /// and the current value for the other.
26290   ///
26291   /// \snippet ViewComponent.cpp SetBoundsAndZoomFactor
26292 
26293   HRESULT SetBoundsAndZoomFactor(in RECT bounds, in double zoomFactor);
26294 
26295   /// Moves focus into WebView.  WebView gets focus and focus is set to
26296   /// correspondent element in the page hosted in the WebView.  For
26297   /// Programmatic reason, focus is set to previously focused element or the
26298   /// default element if no previously focused element exists.  For `Next`
26299   /// reason, focus is set to the first element.  For `Previous` reason, focus
26300   /// is set to the last element.  WebView changes focus through user
26301   /// interaction including selecting into a WebView or Tab into it.  For
26302   /// tabbing, the app runs MoveFocus with Next or Previous to align with Tab
26303   /// and Shift+Tab respectively when it decides the WebView is the next
26304   /// element that may exist in a tab.  Or, the app runs `IsDialogMessage`
26305   /// as part of the associated message loop to allow the platform to auto
26306   /// handle tabbing.  The platform rotates through all windows with
26307   /// `WS_TABSTOP`.  When the WebView gets focus from `IsDialogMessage`, it is
26308   /// internally put the focus on the first or last element for tab and
26309   /// Shift+Tab respectively.
26310   ///
26311   /// \snippet App.cpp MoveFocus0
26312   ///
26313   /// \snippet ControlComponent.cpp MoveFocus1
26314   ///
26315   /// \snippet ControlComponent.cpp MoveFocus2
26316 
26317   HRESULT MoveFocus(in COREWEBVIEW2_MOVE_FOCUS_REASON reason);
26318 
26319   /// Adds an event handler for the `MoveFocusRequested` event.
26320   /// `MoveFocusRequested` runs when user tries to tab out of the WebView.  The
26321   /// focus of the WebView has not changed when this event is run.
26322   ///
26323   /// \snippet ControlComponent.cpp MoveFocusRequested
26324 
26325   HRESULT add_MoveFocusRequested(
26326       /+[in]+/ ICoreWebView2MoveFocusRequestedEventHandler eventHandler,
26327       @("out") EventRegistrationToken* token);
26328 
26329   /// Removes an event handler previously added with `add_MoveFocusRequested`.
26330 
26331   HRESULT remove_MoveFocusRequested(
26332       in EventRegistrationToken token);
26333 
26334   /// Adds an event handler for the `GotFocus` event.  `GotFocus` runs when
26335   /// WebView has focus.
26336 
26337   HRESULT add_GotFocus(
26338       /+[in]+/ ICoreWebView2FocusChangedEventHandler eventHandler,
26339       @("out") EventRegistrationToken* token);
26340 
26341   /// Removes an event handler previously added with `add_GotFocus`.
26342 
26343   HRESULT remove_GotFocus(
26344       in EventRegistrationToken token);
26345 
26346   /// Adds an event handler for the `LostFocus` event.  `LostFocus` runs when
26347   /// WebView loses focus.  In the case where `MoveFocusRequested` event is
26348   /// run, the focus is still on WebView when `MoveFocusRequested` event runs.
26349   /// `LostFocus` only runs afterwards when code of the app or default action
26350   /// of `MoveFocusRequested` event set focus away from WebView.
26351 
26352   HRESULT add_LostFocus(
26353       /+[in]+/ ICoreWebView2FocusChangedEventHandler eventHandler,
26354       @("out") EventRegistrationToken* token);
26355 
26356   /// Removes an event handler previously added with `add_LostFocus`.
26357 
26358   HRESULT remove_LostFocus(
26359       in EventRegistrationToken token);
26360 
26361   /// Adds an event handler for the `AcceleratorKeyPressed` event.
26362   /// `AcceleratorKeyPressed` runs when an accelerator key or key combo is
26363   /// pressed or released while the WebView is focused.  A key is considered an
26364   ///  accelerator if either of the following conditions are true.
26365   ///
26366   /// *   Ctrl or Alt is currently being held.
26367   /// *   The pressed key does not map to a character.
26368   ///
26369   /// A few specific keys are never considered accelerators, such as Shift.
26370   /// The `Escape` key is always considered an accelerator.
26371   ///
26372   /// Auto-repeated key events caused by holding the key down also triggers
26373   /// this event.  Filter out the auto-repeated key events by verifying the
26374   /// `KeyEventLParam` or `PhysicalKeyStatus` event args.
26375   ///
26376   /// In windowed mode, the event handler is run synchronously.  Until you
26377   /// run `Handled()` on the event args or the event handler returns, the
26378   /// browser process is blocked and outgoing cross-process COM requests fail
26379   /// with `RPC_E_CANTCALLOUT_ININPUTSYNCCALL`.  All `CoreWebView2` API methods
26380   /// work, however.
26381   ///
26382   /// In windowless mode, the event handler is run asynchronously.  Further
26383   /// input do not reach the browser until the event handler returns or
26384   /// `Handled()` is run, but the browser process is not blocked, and outgoing
26385   /// COM requests work normally.
26386   ///
26387   /// It is recommended to run `Handled(TRUE)` as early as are able to know
26388   /// that you want to handle the accelerator key.
26389   ///
26390   /// \snippet ControlComponent.cpp AcceleratorKeyPressed
26391 
26392   HRESULT add_AcceleratorKeyPressed(
26393     /+[in]+/ ICoreWebView2AcceleratorKeyPressedEventHandler eventHandler,
26394     @("out") EventRegistrationToken* token);
26395 
26396   /// Removes an event handler previously added with
26397   /// `add_AcceleratorKeyPressed`.
26398 
26399   HRESULT remove_AcceleratorKeyPressed(
26400     in EventRegistrationToken token);
26401 
26402   /// The parent window provided by the app that this WebView is using to
26403   /// render content.  This API initially returns the window passed into
26404   /// `CreateCoreWebView2Controller`.
26405 
26406   @(" propget")
26407 	HRESULT get_ParentWindow(@("out, retval") HWND* parentWindow);
26408 
26409   /// Sets the parent window for the WebView.  This causes the WebView to
26410   /// re-parent the main WebView window to the newly provided window.
26411 
26412   @(" propput")
26413 	HRESULT put_ParentWindow(in HWND parentWindow);
26414 
26415   /// This is a notification separate from `Bounds` that tells WebView that the
26416   ///  main WebView parent (or any ancestor) `HWND` moved.  This is needed
26417   /// for accessibility and certain dialogs in WebView to work correctly.
26418   ///
26419   /// \snippet ViewComponent.cpp NotifyParentWindowPositionChanged
26420 
26421   HRESULT NotifyParentWindowPositionChanged();
26422 
26423   /// Closes the WebView and cleans up the underlying browser instance.
26424   /// Cleaning up the browser instance releases the resources powering the
26425   /// WebView.  The browser instance is shut down if no other WebViews are
26426   /// using it.
26427   ///
26428   /// After running `Close`, most methods will fail and event handlers stop
26429   /// running.  Specifically, the WebView releases the associated references to
26430   /// any associated event handlers when `Close` is run.
26431   ///
26432   /// `Close` is implicitly run when the `CoreWebView2Controller` loses the
26433   /// final reference and is destructed.  But it is best practice to
26434   /// explicitly run `Close` to avoid any accidental cycle of references
26435   /// between the WebView and the app code.  Specifically, if you capture a
26436   /// reference to the WebView in an event handler you create a reference cycle
26437   /// between the WebView and the event handler.  Run `Close` to break the
26438   /// cycle by releasing all event handlers.  But to avoid the situation, it is
26439   /// best to both explicitly run `Close` on the WebView and to not capture a
26440   /// reference to the WebView to ensure the WebView is cleaned up correctly.
26441   /// `Close` is synchronous and won't trigger the `beforeunload` event.
26442   ///
26443   /// \snippet AppWindow.cpp Close
26444   HRESULT Close();
26445 
26446   /// Gets the `CoreWebView2` associated with this `CoreWebView2Controller`.
26447 
26448   @(" propget")
26449 	HRESULT get_CoreWebView2(@("out, retval") ICoreWebView2 * coreWebView2);
26450 }
26451 
26452 /// A continuation of the ICoreWebView2Controller interface.
26453 const GUID IID_ICoreWebView2Controller2 = ICoreWebView2Controller2.iid;
26454 
26455 interface ICoreWebView2Controller2 : ICoreWebView2Controller
26456 {
26457     static const GUID iid = { 0xc979903e,0xd4ca,0x4228,[ 0x92,0xeb,0x47,0xee,0x3f,0xa9,0x6e,0xab ] };
26458   /// The `DefaultBackgroundColor` property is the color WebView renders
26459   /// underneath all web content. This means WebView renders this color when
26460   /// there is no web content loaded such as before the initial navigation or
26461   /// between navigations. This also means web pages with undefined css
26462   /// background properties or background properties containing transparent
26463   /// pixels will render their contents over this color. Web pages with defined
26464   /// and opaque background properties that span the page will obscure the
26465   /// `DefaultBackgroundColor` and display normally. The default value for this
26466   /// property is white to resemble the native browser experience.
26467   ///
26468   /// The Color is specified by the COREWEBVIEW2_COLOR that represents an RGBA
26469   /// value. The `A` represents an Alpha value, meaning
26470   /// `DefaultBackgroundColor` can be transparent. In the case of a transparent
26471   /// `DefaultBackgroundColor` WebView will render hosting app content as the
26472   /// background. This Alpha value is not supported on Windows 7. Any `A` value
26473   /// other than 255 will result in E_INVALIDARG on Windows 7.
26474   /// It is supported on all other WebView compatible platforms.
26475   ///
26476   /// Semi-transparent colors are not currently supported by this API and
26477   /// setting `DefaultBackgroundColor` to a semi-transparent color will fail
26478   /// with E_INVALIDARG. The only supported alpha values are 0 and 255, all
26479   /// other values will result in E_INVALIDARG.
26480   /// `DefaultBackgroundColor` can only be an opaque color or transparent.
26481   ///
26482   /// This value may also be set by using the
26483   /// `WEBVIEW2_DEFAULT_BACKGROUND_COLOR` environment variable. There is a
26484   /// known issue with background color where setting the color by API can
26485   /// still leave the app with a white flicker before the
26486   /// `DefaultBackgroundColor` takes effect. Setting the color via environment
26487   /// variable solves this issue. The value must be a hex value that can
26488   /// optionally prepend a 0x. The value must account for the alpha value
26489   /// which is represented by the first 2 digits. So any hex value fewer than 8
26490   /// digits will assume a prepended 00 to the hex value and result in a
26491   /// transparent color.
26492   /// `get_DefaultBackgroundColor` will return the result of this environment
26493   /// variable if used. This environment variable can only set the
26494   /// `DefaultBackgroundColor` once. Subsequent updates to background color
26495   /// must be done through API call.
26496   ///
26497   /// \snippet ViewComponent.cpp DefaultBackgroundColor
26498   @(" propget")
26499 	HRESULT get_DefaultBackgroundColor(
26500     @("out, retval") COREWEBVIEW2_COLOR* backgroundColor);
26501 
26502   /// Sets the `DefaultBackgroundColor` property.
26503   @(" propput")
26504 	HRESULT put_DefaultBackgroundColor(
26505     in COREWEBVIEW2_COLOR backgroundColor);
26506 }
26507 
26508 /// A continuation of the ICoreWebView2Controller2 interface.
26509 const GUID IID_ICoreWebView2Controller3 = ICoreWebView2Controller3.iid;
26510 
26511 interface ICoreWebView2Controller3 : ICoreWebView2Controller2
26512 {
26513     static const GUID iid = { 0xf9614724,0x5d2b,0x41dc,[ 0xae,0xf7,0x73,0xd6,0x2b,0x51,0x54,0x3b ] };
26514   /// The rasterization scale for the WebView. The rasterization scale is the
26515   /// combination of the monitor DPI scale and text scaling set by the user.
26516   /// This value should be updated when the DPI scale of the app's top level
26517   /// window changes (i.e. monitor DPI scale changes or window changes monitor)
26518   /// or when the text scale factor of the system changes.
26519   ///
26520   /// \snippet AppWindow.cpp DPIChanged
26521   ///
26522   /// \snippet AppWindow.cpp TextScaleChanged1
26523   ///
26524   /// \snippet AppWindow.cpp TextScaleChanged2
26525   ///
26526   /// Rasterization scale applies to the WebView content, as well as
26527   /// popups, context menus, scroll bars, and so on. Normal app scaling
26528   /// scenarios should use the ZoomFactor property or SetBoundsAndZoomFactor
26529   /// API which only scale the rendered HTML content and not popups, context
26530   /// menus, scroll bars, and so on.
26531   ///
26532   /// \snippet ViewComponent.cpp RasterizationScale
26533   @(" propget")
26534 	HRESULT get_RasterizationScale(@("out, retval") double* scale);
26535   /// Set the rasterization scale property.
26536   @(" propput")
26537 	HRESULT put_RasterizationScale(in double scale);
26538 
26539   /// ShouldDetectMonitorScaleChanges property determines whether the WebView
26540   /// attempts to track monitor DPI scale changes. When true, the WebView will
26541   /// track monitor DPI scale changes, update the RasterizationScale property,
26542   /// and raises RasterizationScaleChanged event. When false, the WebView will
26543   /// not track monitor DPI scale changes, and the app must update the
26544   /// RasterizationScale property itself. RasterizationScaleChanged event will
26545   /// never raise when ShouldDetectMonitorScaleChanges is false. Apps that want
26546   /// to set their own rasterization scale should set this property to false to
26547   /// avoid the WebView2 updating the RasterizationScale property to match the
26548   /// monitor DPI scale.
26549   @(" propget")
26550 	HRESULT get_ShouldDetectMonitorScaleChanges(@("out, retval") BOOL* value);
26551   /// Set the ShouldDetectMonitorScaleChanges property.
26552   @(" propput")
26553 	HRESULT put_ShouldDetectMonitorScaleChanges(in BOOL value);
26554 
26555   /// Add an event handler for the RasterizationScaleChanged event.
26556   /// The event is raised when the WebView detects that the monitor DPI scale
26557   /// has changed, ShouldDetectMonitorScaleChanges is true, and the WebView has
26558   /// changed the RasterizationScale property.
26559   ///
26560   /// \snippet ViewComponent.cpp RasterizationScaleChanged
26561   HRESULT add_RasterizationScaleChanged(
26562     /+[in]+/ ICoreWebView2RasterizationScaleChangedEventHandler eventHandler,
26563     @("out") EventRegistrationToken* token);
26564   /// Remove an event handler previously added with
26565   /// add_RasterizationScaleChanged.
26566   HRESULT remove_RasterizationScaleChanged(
26567     in EventRegistrationToken token);
26568 
26569   /// BoundsMode affects how setting the Bounds and RasterizationScale
26570   /// properties work. Bounds mode can either be in COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS
26571   /// mode or COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE mode.
26572   ///
26573   /// When the mode is in COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS, setting the bounds
26574   /// property will set the size of the WebView in raw screen pixels. Changing
26575   /// the rasterization scale in this mode won't change the raw pixel size of
26576   /// the WebView and will only change the rasterization scale.
26577   ///
26578   /// When the mode is in COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE, setting the
26579   /// bounds property will change the logical size of the WebView which can be
26580   /// described by the following equation:
26581   /// ```text
26582   /// Logical size * rasterization scale = Raw Pixel size
26583   /// ```
26584   /// In this case, changing the rasterization scale will keep the logical size
26585   /// the same and change the raw pixel size.
26586   ///
26587   /// \snippet ViewComponent.cpp BoundsMode
26588   @(" propget")
26589 	HRESULT get_BoundsMode(
26590     @("out, retval") COREWEBVIEW2_BOUNDS_MODE* boundsMode);
26591   /// Set the BoundsMode property.
26592   @(" propput")
26593 	HRESULT put_BoundsMode(in COREWEBVIEW2_BOUNDS_MODE boundsMode);
26594 }
26595 
26596 /// This is the ICoreWebView2Controller4 interface.
26597 /// The ICoreWebView2Controller4 provides interface to enable/disable external drop.
26598 const GUID IID_ICoreWebView2Controller4 = ICoreWebView2Controller4.iid;
26599 
26600 interface ICoreWebView2Controller4 : ICoreWebView2Controller3
26601 {
26602     static const GUID iid = { 0x97d418d5,0xa426,0x4e49,[ 0xa1,0x51,0xe1,0xa1,0x0f,0x32,0x7d,0x9e ] };
26603   /// Gets the `AllowExternalDrop` property which is used to configure the
26604   /// capability that dragging objects from outside the bounds of webview2 and
26605   /// dropping into webview2 is allowed or disallowed. The default value is
26606   /// TRUE.
26607   ///
26608   /// \snippet SettingsComponent.cpp ToggleAllowExternalDrop
26609   @(" propget")
26610 	HRESULT get_AllowExternalDrop(@(" out, retval ") BOOL * value);
26611   /// Sets the `AllowExternalDrop` property which is used to configure the
26612   /// capability that dragging objects from outside the bounds of webview2 and
26613   /// dropping into webview2 is allowed or disallowed.
26614   ///
26615   /// \snippet SettingsComponent.cpp ToggleAllowExternalDrop
26616   @(" propput")
26617 	HRESULT put_AllowExternalDrop(in BOOL value);
26618 }
26619 
26620 /// This interface is an extension of the ICoreWebView2Controller interface to
26621 /// support visual hosting. An object implementing the
26622 /// ICoreWebView2CompositionController interface will also implement
26623 /// ICoreWebView2Controller. Callers are expected to use
26624 /// ICoreWebView2Controller for resizing, visibility, focus, and so on, and
26625 /// then use ICoreWebView2CompositionController to connect to a composition
26626 /// tree and provide input meant for the WebView.
26627 const GUID IID_ICoreWebView2CompositionController = ICoreWebView2CompositionController.iid;
26628 
26629 interface ICoreWebView2CompositionController : IUnknown
26630 {
26631     static const GUID iid = { 0x3df9b733,0xb9ae,0x4a15,[ 0x86,0xb4,0xeb,0x9e,0xe9,0x82,0x64,0x69 ] };
26632   /// The RootVisualTarget is a visual in the hosting app's visual tree. This
26633   /// visual is where the WebView will connect its visual tree. The app uses
26634   /// this visual to position the WebView within the app. The app still needs
26635   /// to use the Bounds property to size the WebView. The RootVisualTarget
26636   /// property can be an IDCompositionVisual or a
26637   /// Windows::UI::Composition::ContainerVisual. WebView will connect its visual
26638   /// tree to the provided visual before returning from the property setter. The
26639   /// app needs to commit on its device setting the RootVisualTarget property.
26640   /// The RootVisualTarget property supports being set to nullptr to disconnect
26641   /// the WebView from the app's visual tree.
26642   /// \snippet ViewComponent.cpp SetRootVisualTarget
26643   /// \snippet ViewComponent.cpp BuildDCompTree
26644   @(" propget")
26645 	HRESULT get_RootVisualTarget(@("out, retval") IUnknown * target);
26646   /// Set the RootVisualTarget property.
26647   @(" propput")
26648 	HRESULT put_RootVisualTarget(/+[in]+/ IUnknown target);
26649 
26650   /// If eventKind is COREWEBVIEW2_MOUSE_EVENT_KIND_HORIZONTAL_WHEEL or
26651   /// COREWEBVIEW2_MOUSE_EVENT_KIND_WHEEL, then mouseData specifies the amount of
26652   /// wheel movement. A positive value indicates that the wheel was rotated
26653   /// forward, away from the user; a negative value indicates that the wheel was
26654   /// rotated backward, toward the user. One wheel click is defined as
26655   /// WHEEL_DELTA, which is 120.
26656   /// If eventKind is COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOUBLE_CLICK
26657   /// COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOWN, or
26658   /// COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_UP, then mouseData specifies which X
26659   /// buttons were pressed or released. This value should be 1 if the first X
26660   /// button is pressed/released and 2 if the second X button is
26661   /// pressed/released.
26662   /// If eventKind is COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE, then virtualKeys,
26663   /// mouseData, and point should all be zero.
26664   /// If eventKind is any other value, then mouseData should be zero.
26665   /// Point is expected to be in the client coordinate space of the WebView.
26666   /// To track mouse events that start in the WebView and can potentially move
26667   /// outside of the WebView and host application, calling SetCapture and
26668   /// ReleaseCapture is recommended.
26669   /// To dismiss hover popups, it is also recommended to send
26670   /// COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE messages.
26671   /// \snippet ViewComponent.cpp SendMouseInput
26672   HRESULT SendMouseInput(
26673     in COREWEBVIEW2_MOUSE_EVENT_KIND eventKind,
26674     in COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS virtualKeys,
26675     in UINT32 mouseData,
26676     in POINT point);
26677 
26678   /// SendPointerInput accepts touch or pen pointer input of types defined in
26679   /// COREWEBVIEW2_POINTER_EVENT_KIND. Any pointer input from the system must be
26680   /// converted into an ICoreWebView2PointerInfo first.
26681   HRESULT SendPointerInput(
26682     in COREWEBVIEW2_POINTER_EVENT_KIND eventKind,
26683     /+[in]+/ ICoreWebView2PointerInfo pointerInfo);
26684 
26685   /// The current cursor that WebView thinks it should be. The cursor should be
26686   /// set in WM_SETCURSOR through \::SetCursor or set on the corresponding
26687   /// parent/ancestor HWND of the WebView through \::SetClassLongPtr. The HCURSOR
26688   /// can be freed so CopyCursor/DestroyCursor is recommended to keep your own
26689   /// copy if you are doing more than immediately setting the cursor.
26690   @(" propget")
26691 	HRESULT get_Cursor(@("out, retval") HCURSOR* cursor);
26692 
26693   /// The current system cursor ID reported by the underlying rendering engine
26694   /// for WebView. For example, most of the time, when the cursor is over text,
26695   /// this will return the int value for IDC_IBEAM. The systemCursorId is only
26696   /// valid if the rendering engine reports a default Windows cursor resource
26697   /// value. Navigate to
26698   /// [LoadCursorW](/windows/win32/api/winuser/nf-winuser-loadcursorw) for more
26699   /// details. Otherwise, if custom CSS cursors are being used, this will return
26700   /// 0. To actually use systemCursorId in LoadCursor or LoadImage,
26701   /// MAKEINTRESOURCE must be called on it first.
26702   ///
26703   /// \snippet ViewComponent.cpp SystemCursorId
26704   @(" propget")
26705 	HRESULT get_SystemCursorId(@("out, retval") UINT32* systemCursorId);
26706 
26707   /// Add an event handler for the CursorChanged event.
26708   /// The event is raised when WebView thinks the cursor should be changed. For
26709   /// example, when the mouse cursor is currently the default cursor but is then
26710   /// moved over text, it may try to change to the IBeam cursor.
26711   ///
26712   /// It is expected for the developer to send
26713   /// COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE messages (in addition to
26714   /// COREWEBVIEW2_MOUSE_EVENT_KIND_MOVE messages) through the SendMouseInput
26715   /// API. This is to ensure that the mouse is actually within the WebView that
26716   /// sends out CursorChanged events.
26717   ///
26718   /// \snippet ViewComponent.cpp CursorChanged
26719   HRESULT add_CursorChanged(
26720       /+[in]+/ ICoreWebView2CursorChangedEventHandler eventHandler,
26721       @("out") EventRegistrationToken* token);
26722   /// Remove an event handler previously added with add_CursorChanged.
26723   HRESULT remove_CursorChanged(
26724       in EventRegistrationToken token);
26725 }
26726 
26727 /// A continuation of the ICoreWebView2CompositionController interface.
26728 const GUID IID_ICoreWebView2CompositionController2 = ICoreWebView2CompositionController2.iid;
26729 
26730 interface ICoreWebView2CompositionController2 : ICoreWebView2CompositionController
26731 {
26732     static const GUID iid = { 0x0b6a3d24,0x49cb,0x4806,[ 0xba,0x20,0xb5,0xe0,0x73,0x4a,0x7b,0x26 ] };
26733   /// Returns the Automation Provider for the WebView. This object implements
26734   /// IRawElementProviderSimple.
26735   @(" propget")
26736 	HRESULT get_AutomationProvider(@("out, retval") IUnknown * provider);
26737 }
26738 
26739 /// This interface is the continuation of the
26740 /// ICoreWebView2CompositionController2 interface to manage drag and drop.
26741 const GUID IID_ICoreWebView2CompositionController3 = ICoreWebView2CompositionController3.iid;
26742 
26743 interface ICoreWebView2CompositionController3 : ICoreWebView2CompositionController2
26744 {
26745     static const GUID iid = { 0x9570570e,0x4d76,0x4361,[ 0x9e,0xe1,0xf0,0x4d,0x0d,0xbd,0xfb,0x1e ] };
26746   /// This function corresponds to [IDropTarget::DragEnter](/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragenter).
26747   ///
26748   /// This function has a dependency on AllowExternalDrop property of
26749   /// CoreWebView2Controller and return E_FAIL to callers to indicate this
26750   /// operation is not allowed if AllowExternalDrop property is set to false.
26751   ///
26752   /// The hosting application must register as an IDropTarget and implement
26753   /// and forward DragEnter calls to this function.
26754   ///
26755   /// point parameter must be modified to include the WebView's offset and be in
26756   /// the WebView's client coordinates (Similar to how SendMouseInput works).
26757   ///
26758   /// \snippet DropTarget.cpp DragEnter
26759   HRESULT DragEnter(
26760       in IDataObject* dataObject,
26761       in DWORD keyState,
26762       in POINT point,
26763       @("out, retval") DWORD* effect);
26764 
26765   /// This function corresponds to [IDropTarget::DragLeave](/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragleave).
26766   ///
26767   /// This function has a dependency on AllowExternalDrop property of
26768   /// CoreWebView2Controller and return E_FAIL to callers to indicate this
26769   /// operation is not allowed if AllowExternalDrop property is set to false.
26770   ///
26771   /// The hosting application must register as an IDropTarget and implement
26772   /// and forward DragLeave calls to this function.
26773   ///
26774   /// \snippet DropTarget.cpp DragLeave
26775   HRESULT DragLeave();
26776 
26777   /// This function corresponds to [IDropTarget::DragOver](/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragover).
26778   ///
26779   /// This function has a dependency on AllowExternalDrop property of
26780   /// CoreWebView2Controller and return E_FAIL to callers to indicate this
26781   /// operation is not allowed if AllowExternalDrop property is set to false.
26782   ///
26783   /// The hosting application must register as an IDropTarget and implement
26784   /// and forward DragOver calls to this function.
26785   ///
26786   /// point parameter must be modified to include the WebView's offset and be in
26787   /// the WebView's client coordinates (Similar to how SendMouseInput works).
26788   ///
26789   /// \snippet DropTarget.cpp DragOver
26790   HRESULT DragOver(
26791       in DWORD keyState,
26792       in POINT point,
26793       @("out, retval") DWORD* effect);
26794 
26795   /// This function corresponds to [IDropTarget::Drop](/windows/win32/api/oleidl/nf-oleidl-idroptarget-drop).
26796   ///
26797   /// This function has a dependency on AllowExternalDrop property of
26798   /// CoreWebView2Controller and return E_FAIL to callers to indicate this
26799   /// operation is not allowed if AllowExternalDrop property is set to false.
26800   ///
26801   /// The hosting application must register as an IDropTarget and implement
26802   /// and forward Drop calls to this function.
26803   ///
26804   /// point parameter must be modified to include the WebView's offset and be in
26805   /// the WebView's client coordinates (Similar to how SendMouseInput works).
26806   ///
26807   /// \snippet DropTarget.cpp Drop
26808   HRESULT Drop(
26809       in IDataObject* dataObject,
26810       in DWORD keyState,
26811       in POINT point,
26812       @("out, retval") DWORD* effect);
26813 }
26814 
26815 /// This interface is used to complete deferrals on event args that support
26816 /// getting deferrals using the `GetDeferral` method.
26817 
26818 const GUID IID_ICoreWebView2Deferral = ICoreWebView2Deferral.iid;
26819 
26820 interface ICoreWebView2Deferral : IUnknown
26821 {
26822     static const GUID iid = { 0xc10e7f7b,0xb585,0x46f0,[ 0xa6,0x23,0x8b,0xef,0xbf,0x3e,0x4e,0xe0 ] };
26823 
26824   /// Completes the associated deferred event.  Complete should only be run
26825   /// once for each deferral taken.
26826 
26827   HRESULT Complete();
26828 }
26829 
26830 /// Defines properties that enable, disable, or modify WebView features.
26831 /// Changes to `IsGeneralAutofillEnabled` and `IsPasswordAutosaveEnabled`
26832 /// apply immediately, while other setting changes made after `NavigationStarting`
26833 /// event do not apply until the next top-level navigation.
26834 
26835 const GUID IID_ICoreWebView2Settings = ICoreWebView2Settings.iid;
26836 
26837 interface ICoreWebView2Settings : IUnknown
26838 {
26839     static const GUID iid = { 0xe562e4f0,0xd7fa,0x43ac,[ 0x8d,0x71,0xc0,0x51,0x50,0x49,0x9f,0x00 ] };
26840 
26841   /// Controls if running JavaScript is enabled in all future navigations in
26842   /// the WebView.  This only affects scripts in the document.  Scripts
26843   /// injected with `ExecuteScript` runs even if script is disabled.
26844   /// The default value is `TRUE`.
26845   ///
26846   /// \snippet SettingsComponent.cpp IsScriptEnabled
26847   @(" propget")
26848 	HRESULT get_IsScriptEnabled(
26849       @("out, retval") BOOL* isScriptEnabled);
26850 
26851   /// Sets the `IsScriptEnabled` property.
26852   @(" propput")
26853 	HRESULT put_IsScriptEnabled(in BOOL isScriptEnabled);
26854 
26855   /// The `IsWebMessageEnabled` property is used when loading a new HTML
26856   /// document.  If set to `TRUE`, communication from the host to the top-level
26857   ///  HTML document of the WebView is allowed using `PostWebMessageAsJson`,
26858   /// `PostWebMessageAsString`, and message event of `window.chrome.webview`.
26859   /// For more information, navigate to PostWebMessageAsJson.  Communication
26860   /// from the top-level HTML document of the WebView to the host is allowed
26861   /// using the postMessage function of `window.chrome.webview` and
26862   /// `add_WebMessageReceived` method.  For more information, navigate to
26863   /// [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived).
26864   /// If set to false, then communication is disallowed.  `PostWebMessageAsJson`
26865   /// and `PostWebMessageAsString` fails with `E_ACCESSDENIED` and
26866   /// `window.chrome.webview.postMessage` fails by throwing an instance of an
26867   /// `Error` object. The default value is `TRUE`.
26868   ///
26869   /// \snippet ScenarioWebMessage.cpp IsWebMessageEnabled
26870   @(" propget")
26871 	HRESULT get_IsWebMessageEnabled(
26872       @("out, retval") BOOL* isWebMessageEnabled);
26873 
26874   /// Sets the `IsWebMessageEnabled` property.
26875   @(" propput")
26876 	HRESULT put_IsWebMessageEnabled(in BOOL isWebMessageEnabled);
26877 
26878   /// `AreDefaultScriptDialogsEnabled` is used when loading a new HTML
26879   /// document.  If set to `FALSE`, WebView2 does not render the default JavaScript
26880   /// dialog box (Specifically those displayed by the JavaScript alert,
26881   /// confirm, prompt functions and `beforeunload` event).  Instead, if an
26882   /// event handler is set using `add_ScriptDialogOpening`, WebView sends an
26883   /// event that contains all of the information for the dialog and allow the
26884   /// host app to show a custom UI.
26885   /// The default value is `TRUE`.
26886   @(" propget")
26887 	HRESULT get_AreDefaultScriptDialogsEnabled(
26888       @("out, retval") BOOL* areDefaultScriptDialogsEnabled);
26889 
26890   /// Sets the `AreDefaultScriptDialogsEnabled` property.
26891   @(" propput")
26892 	HRESULT put_AreDefaultScriptDialogsEnabled(
26893       in BOOL areDefaultScriptDialogsEnabled);
26894 
26895   /// `IsStatusBarEnabled` controls whether the status bar is displayed.  The
26896   /// status bar is usually displayed in the lower left of the WebView and
26897   /// shows things such as the URI of a link when the user hovers over it and
26898   /// other information.
26899   /// The default value is `TRUE`.
26900   /// The status bar UI can be altered by web content and should not be considered secure.
26901   @(" propget")
26902 	HRESULT get_IsStatusBarEnabled(@("out, retval") BOOL* isStatusBarEnabled);
26903 
26904   /// Sets the `IsStatusBarEnabled` property.
26905   @(" propput")
26906 	HRESULT put_IsStatusBarEnabled(in BOOL isStatusBarEnabled);
26907 
26908   /// `AreDevToolsEnabled` controls whether the user is able to use the context
26909   /// menu or keyboard shortcuts to open the DevTools window.
26910   /// The default value is `TRUE`.
26911   @(" propget")
26912 	HRESULT get_AreDevToolsEnabled(@("out, retval") BOOL* areDevToolsEnabled);
26913 
26914   /// Sets the `AreDevToolsEnabled` property.
26915   @(" propput")
26916 	HRESULT put_AreDevToolsEnabled(in BOOL areDevToolsEnabled);
26917 
26918   /// The `AreDefaultContextMenusEnabled` property is used to prevent default
26919   /// context menus from being shown to user in WebView.
26920   /// The default value is `TRUE`.
26921   ///
26922   /// \snippet SettingsComponent.cpp DisableContextMenu
26923   @(" propget")
26924 	HRESULT get_AreDefaultContextMenusEnabled(@("out, retval") BOOL* enabled);
26925 
26926   /// Sets the `AreDefaultContextMenusEnabled` property.
26927   @(" propput")
26928 	HRESULT put_AreDefaultContextMenusEnabled(in BOOL enabled);
26929 
26930   /// The `AreHostObjectsAllowed` property is used to control whether host
26931   /// objects are accessible from the page in WebView.
26932   /// The default value is `TRUE`.
26933   ///
26934   /// \snippet SettingsComponent.cpp HostObjectsAccess
26935   @(" propget")
26936 	HRESULT get_AreHostObjectsAllowed(@("out, retval") BOOL* allowed);
26937 
26938   /// Sets the `AreHostObjectsAllowed` property.
26939 
26940   @(" propput")
26941 	HRESULT put_AreHostObjectsAllowed(in BOOL allowed);
26942 
26943   /// The `IsZoomControlEnabled` property is used to prevent the user from
26944   /// impacting the zoom of the WebView.  When disabled, the user is not able
26945   /// to zoom using Ctrl++, Ctrl+-, or Ctrl+mouse wheel, but the zoom
26946   /// is set using `ZoomFactor` API.  The default value is `TRUE`.
26947   ///
26948   /// \snippet SettingsComponent.cpp DisableZoomControl
26949 
26950   @(" propget")
26951 	HRESULT get_IsZoomControlEnabled(@("out, retval") BOOL* enabled);
26952 
26953   /// Sets the `IsZoomControlEnabled` property.
26954 
26955   @(" propput")
26956 	HRESULT put_IsZoomControlEnabled(in BOOL enabled);
26957 
26958   /// The `IsBuiltInErrorPageEnabled` property is used to disable built in
26959   /// error page for navigation failure and render process failure.  When
26960   /// disabled, a blank page is displayed when the related error happens.
26961   /// The default value is `TRUE`.
26962   ///
26963   /// \snippet SettingsComponent.cpp BuiltInErrorPageEnabled
26964   @(" propget")
26965 	HRESULT get_IsBuiltInErrorPageEnabled(@("out, retval") BOOL* enabled);
26966 
26967   /// Sets the `IsBuiltInErrorPageEnabled` property.
26968   @(" propput")
26969 	HRESULT put_IsBuiltInErrorPageEnabled(in BOOL enabled);
26970 }
26971 
26972 /// A continuation of the ICoreWebView2Settings interface that manages the user agent.
26973 
26974 const GUID IID_ICoreWebView2Settings2 = ICoreWebView2Settings2.iid;
26975 
26976 interface ICoreWebView2Settings2 : ICoreWebView2Settings
26977 {
26978     static const GUID iid = { 0xee9a0f68,0xf46c,0x4e32,[ 0xac,0x23,0xef,0x8c,0xac,0x22,0x4d,0x2a ] };
26979   /// Returns the User Agent. The default value is the default User Agent of the
26980   /// Microsoft Edge browser.
26981   ///
26982   /// The caller must free the returned string with `CoTaskMemFree`.  See
26983   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
26984   ///
26985   /// \snippet SettingsComponent.cpp UserAgent
26986   @(" propget")
26987 	HRESULT get_UserAgent(@("out, retval") LPWSTR* userAgent);
26988   /// Sets the `UserAgent` property. This property may be overridden if
26989   /// the User-Agent header is set in a request. If the parameter is empty
26990   /// the User Agent will not be updated and the current User Agent will remain.
26991   /// Returns `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if the owning WebView is
26992   /// closed.
26993   @(" propput")
26994 	HRESULT put_UserAgent(in LPCWSTR userAgent);
26995 }
26996 
26997 /// A continuation of the ICoreWebView2Settings interface that manages whether
26998 /// browser accelerator keys are enabled.
26999 const GUID IID_ICoreWebView2Settings3 = ICoreWebView2Settings3.iid;
27000 
27001 interface ICoreWebView2Settings3 : ICoreWebView2Settings2
27002 {
27003     static const GUID iid = { 0xfdb5ab74,0xaf33,0x4854,[ 0x84,0xf0,0x0a,0x63,0x1d,0xeb,0x5e,0xba ] };
27004   /// When this setting is set to FALSE, it disables all accelerator keys that
27005   /// access features specific to a web browser, including but not limited to:
27006   ///  - Ctrl-F and F3 for Find on Page
27007   ///  - Ctrl-P for Print
27008   ///  - Ctrl-R and F5 for Reload
27009   ///  - Ctrl-Plus and Ctrl-Minus for zooming
27010   ///  - Ctrl-Shift-C and F12 for DevTools
27011   ///  - Special keys for browser functions, such as Back, Forward, and Search
27012   ///
27013   /// It does not disable accelerator keys related to movement and text editing,
27014   /// such as:
27015   ///  - Home, End, Page Up, and Page Down
27016   ///  - Ctrl-X, Ctrl-C, Ctrl-V
27017   ///  - Ctrl-A for Select All
27018   ///  - Ctrl-Z for Undo
27019   ///
27020   /// Those accelerator keys will always be enabled unless they are handled in
27021   /// the `AcceleratorKeyPressed` event.
27022   ///
27023   /// This setting has no effect on the `AcceleratorKeyPressed` event.  The event
27024   /// will be fired for all accelerator keys, whether they are enabled or not.
27025   ///
27026   /// The default value for `AreBrowserAcceleratorKeysEnabled` is TRUE.
27027   ///
27028   /// \snippet SettingsComponent.cpp AreBrowserAcceleratorKeysEnabled
27029   @(" propget")
27030 	HRESULT get_AreBrowserAcceleratorKeysEnabled(
27031       @("out, retval") BOOL* areBrowserAcceleratorKeysEnabled);
27032 
27033   /// Sets the `AreBrowserAcceleratorKeysEnabled` property.
27034   @(" propput")
27035 	HRESULT put_AreBrowserAcceleratorKeysEnabled(
27036       in BOOL areBrowserAcceleratorKeysEnabled);
27037 }
27038 
27039 /// A continuation of the ICoreWebView2Settings interface to manage autofill.
27040 const GUID IID_ICoreWebView2Settings4 = ICoreWebView2Settings4.iid;
27041 
27042 interface ICoreWebView2Settings4 : ICoreWebView2Settings3
27043 {
27044     static const GUID iid = { 0xcb56846c,0x4168,0x4d53,[ 0xb0,0x4f,0x03,0xb6,0xd6,0x79,0x6f,0xf2 ] };
27045   /// IsPasswordAutosaveEnabled controls whether autosave for password
27046   /// information is enabled. The IsPasswordAutosaveEnabled property behaves
27047   /// independently of the IsGeneralAutofillEnabled property. When IsPasswordAutosaveEnabled is
27048   /// false, no new password data is saved and no Save/Update Password prompts are displayed.
27049   /// However, if there was password data already saved before disabling this setting,
27050   /// then that password information is auto-populated, suggestions are shown and clicking on
27051   /// one will populate the fields.
27052   /// When IsPasswordAutosaveEnabled is true, password information is auto-populated,
27053   /// suggestions are shown and clicking on one will populate the fields, new data
27054   /// is saved, and a Save/Update Password prompt is displayed.
27055   /// It will take effect immediately after setting.
27056   /// The default value is `FALSE`.
27057   /// This property has the same value as
27058   /// `CoreWebView2Profile.IsPasswordAutosaveEnabled`, and changing one will
27059   /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile`
27060   /// will share the same value for this property, so for the `CoreWebView2`s
27061   /// with the same profile, their
27062   /// `CoreWebView2Settings.IsPasswordAutosaveEnabled` and
27063   /// `CoreWebView2Profile.IsPasswordAutosaveEnabled` will always have the same
27064   /// value.
27065   ///
27066   /// \snippet SettingsComponent.cpp PasswordAutosaveEnabled
27067   @(" propget")
27068 	HRESULT get_IsPasswordAutosaveEnabled(@("out, retval") BOOL* value);
27069 
27070   /// Set the IsPasswordAutosaveEnabled property.
27071   @(" propput")
27072 	HRESULT put_IsPasswordAutosaveEnabled(in BOOL value);
27073 
27074   /// IsGeneralAutofillEnabled controls whether autofill for information
27075   /// like names, street and email addresses, phone numbers, and arbitrary input
27076   /// is enabled. This excludes password and credit card information. When
27077   /// IsGeneralAutofillEnabled is false, no suggestions appear, and no new information
27078   /// is saved. When IsGeneralAutofillEnabled is true, information is saved, suggestions
27079   /// appear and clicking on one will populate the form fields.
27080   /// It will take effect immediately after setting.
27081   /// The default value is `TRUE`.
27082   /// This property has the same value as
27083   /// `CoreWebView2Profile.IsGeneralAutofillEnabled`, and changing one will
27084   /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile`
27085   /// will share the same value for this property, so for the `CoreWebView2`s
27086   /// with the same profile, their
27087   /// `CoreWebView2Settings.IsGeneralAutofillEnabled` and
27088   /// `CoreWebView2Profile.IsGeneralAutofillEnabled` will always have the same
27089   /// value.
27090   ///
27091   /// \snippet SettingsComponent.cpp GeneralAutofillEnabled
27092   @(" propget")
27093 	HRESULT get_IsGeneralAutofillEnabled(@("out, retval") BOOL* value);
27094 
27095   /// Set the IsGeneralAutofillEnabled property.
27096   @(" propput")
27097 	HRESULT put_IsGeneralAutofillEnabled(in BOOL value);
27098 }
27099 
27100 /// A continuation of the ICoreWebView2Settings interface to manage pinch zoom.
27101 const GUID IID_ICoreWebView2Settings5 = ICoreWebView2Settings5.iid;
27102 
27103 interface ICoreWebView2Settings5 : ICoreWebView2Settings4
27104 {
27105     static const GUID iid = { 0x183e7052,0x1d03,0x43a0,[ 0xab,0x99,0x98,0xe0,0x43,0xb6,0x6b,0x39 ] };
27106   /// Pinch-zoom, referred to as "Page Scale" zoom, is performed as a post-rendering step,
27107   /// it changes the page scale factor property and scales the surface the web page is
27108   /// rendered onto when user performs a pinch zooming action. It does not change the layout
27109   /// but rather changes the viewport and clips the web content, the content outside of the
27110   /// viewport isn't visible onscreen and users can't reach this content using mouse.
27111   ///
27112   /// The `IsPinchZoomEnabled` property enables or disables the ability of
27113   /// the end user to use a pinching motion on touch input enabled devices
27114   /// to scale the web content in the WebView2. It defaults to `TRUE`.
27115   /// When set to `FALSE`, the end user cannot pinch zoom after the next navigation.
27116   /// Disabling/Enabling `IsPinchZoomEnabled` only affects the end user's ability to use
27117   /// pinch motions and does not change the page scale factor.
27118   /// This API only affects the Page Scale zoom and has no effect on the
27119   /// existing browser zoom properties (`IsZoomControlEnabled` and `ZoomFactor`)
27120   /// or other end user mechanisms for zooming.
27121   ///
27122   /// \snippet SettingsComponent.cpp TogglePinchZoomEnabled
27123   @(" propget")
27124 	HRESULT get_IsPinchZoomEnabled(@("out, retval") BOOL* enabled);
27125   /// Set the `IsPinchZoomEnabled` property
27126   @(" propput")
27127 	HRESULT put_IsPinchZoomEnabled(in BOOL enabled);
27128 }
27129 
27130 /// A continuation of the ICoreWebView2Settings interface to manage swipe navigation.
27131 const GUID IID_ICoreWebView2Settings6 = ICoreWebView2Settings6.iid;
27132 
27133 interface ICoreWebView2Settings6 : ICoreWebView2Settings5
27134 {
27135     static const GUID iid = { 0x11cb3acd,0x9bc8,0x43b8,[ 0x83,0xbf,0xf4,0x07,0x53,0x71,0x4f,0x87 ] };
27136   /// The `IsSwipeNavigationEnabled` property enables or disables the ability of the
27137   /// end user to use swiping gesture on touch input enabled devices to
27138   /// navigate in WebView2. It defaults to `TRUE`.
27139   ///
27140   /// When this property is `TRUE`, then all configured navigation gestures are enabled:
27141   /// 1. Swiping left and right to navigate forward and backward is always configured.
27142   /// 2. Swiping down to refresh is off by default and not exposed via our API currently,
27143   /// it requires the "--pull-to-refresh" option to be included in the additional browser
27144   /// arguments to be configured. (See put_AdditionalBrowserArguments.)
27145   ///
27146   /// When set to `FALSE`, the end user cannot swipe to navigate or pull to refresh.
27147   /// This API only affects the overscrolling navigation functionality and has no
27148   /// effect on the scrolling interaction used to explore the web content shown
27149   /// in WebView2.
27150   ///
27151   /// Disabling/Enabling IsSwipeNavigationEnabled takes effect after the
27152   /// next navigation.
27153   ///
27154   /// \snippet SettingsComponent.cpp ToggleSwipeNavigationEnabled
27155   @(" propget")
27156 	HRESULT get_IsSwipeNavigationEnabled(@("out, retval") BOOL* enabled);
27157   /// Set the `IsSwipeNavigationEnabled` property
27158   @(" propput")
27159 	HRESULT put_IsSwipeNavigationEnabled(in BOOL enabled);
27160 }
27161 
27162 /// A continuation of the ICoreWebView2Settings interface to hide Pdf toolbar items.
27163 const GUID IID_ICoreWebView2Settings7 = ICoreWebView2Settings7.iid;
27164 
27165 interface ICoreWebView2Settings7 : ICoreWebView2Settings6
27166 {
27167     static const GUID iid = { 0x488dc902,0x35ef,0x42d2,[ 0xbc,0x7d,0x94,0xb6,0x5c,0x4b,0xc4,0x9c ] };
27168   /// `HiddenPdfToolbarItems` is used to customize the PDF toolbar items. By default, it is COREWEBVIEW2_PDF_TOOLBAR_ITEMS_NONE and so it displays all of the items.
27169   /// Changes to this property apply to all CoreWebView2s in the same environment and using the same profile.
27170   /// Changes to this setting apply only after the next navigation.
27171   /// \snippet SettingsComponent.cpp ToggleHidePdfToolbarItems
27172   @(" propget")
27173 	HRESULT get_HiddenPdfToolbarItems(@("out, retval") COREWEBVIEW2_PDF_TOOLBAR_ITEMS* hidden_pdf_toolbar_items);
27174 
27175   /// Set the `HiddenPdfToolbarItems` property.
27176   @(" propput")
27177 	HRESULT put_HiddenPdfToolbarItems(in COREWEBVIEW2_PDF_TOOLBAR_ITEMS hidden_pdf_toolbar_items);
27178 }
27179 
27180 /// A continuation of the ICoreWebView2Settings interface to manage smartscreen.
27181 const GUID IID_ICoreWebView2Settings8 = ICoreWebView2Settings8.iid;
27182 
27183 interface ICoreWebView2Settings8 : ICoreWebView2Settings7
27184 {
27185     static const GUID iid = { 0x9e6b0e8f,0x86ad,0x4e81,[ 0x81,0x47,0xa9,0xb5,0xed,0xb6,0x86,0x50 ] };
27186   /// SmartScreen helps webviews identify reported phishing and malware websites
27187   /// and also helps users make informed decisions about downloads.
27188   /// `IsReputationCheckingRequired` is used to control whether SmartScreen
27189   /// enabled or not. SmartScreen is enabled or disabled for all CoreWebView2s
27190   /// using the same user data folder. If
27191   /// CoreWebView2Setting.IsReputationCheckingRequired is true for any
27192   /// CoreWebView2 using the same user data folder, then SmartScreen is enabled.
27193   /// If CoreWebView2Setting.IsReputationCheckingRequired is false for all
27194   /// CoreWebView2 using the same user data folder, then SmartScreen is
27195   /// disabled. When it is changed, the change will be applied to all WebViews
27196   /// using the same user data folder on the next navigation or download. The
27197   /// default value for `IsReputationCheckingRequired` is true. If the newly
27198   /// created CoreWebview2 does not set SmartScreen to false, when
27199   /// navigating(Such as Navigate(), LoadDataUrl(), ExecuteScript(), etc.), the
27200   /// default value will be applied to all CoreWebview2 using the same user data
27201   /// folder.
27202   /// SmartScreen of WebView2 apps can be controlled by Windows system setting
27203   /// "SmartScreen for Microsoft Edge", specially, for WebView2 in Windows
27204   /// Store apps, SmartScreen is controlled by another Windows system setting
27205   /// "SmartScreen for Microsoft Store apps". When the Windows setting is enabled, the
27206   /// SmartScreen operates under the control of the `IsReputationCheckingRequired`.
27207   /// When the Windows setting is disabled, the SmartScreen will be disabled
27208   /// regardless of the `IsReputationCheckingRequired` value set in WebView2 apps.
27209   /// In other words, under this circumstance the value of
27210   /// `IsReputationCheckingRequired` will be saved but overridden by system setting.
27211   /// Upon re-enabling the Windows setting, the CoreWebview2 will reference the
27212   /// `IsReputationCheckingRequired` to determine the SmartScreen status.
27213   /// \snippet SettingsComponent.cpp ToggleSmartScreen
27214   @(" propget")
27215 	HRESULT get_IsReputationCheckingRequired(@("out, retval") BOOL* value);
27216 
27217   /// Sets whether this webview2 instance needs SmartScreen protection for its content.
27218   /// Set the `IsReputationCheckingRequired` property.
27219   @(" propput")
27220 	HRESULT put_IsReputationCheckingRequired(in BOOL value);
27221 }
27222 
27223 /// Event args for the `ProcessFailed` event.
27224 const GUID IID_ICoreWebView2ProcessFailedEventArgs = ICoreWebView2ProcessFailedEventArgs.iid;
27225 
27226 interface ICoreWebView2ProcessFailedEventArgs : IUnknown
27227 {
27228     static const GUID iid = { 0x8155a9a4,0x1474,0x4a86,[ 0x8c,0xae,0x15,0x1b,0x0f,0xa6,0xb8,0xca ] };
27229 
27230   /// The kind of process failure that has occurred. This is a combination of
27231   /// process kind (for example, browser, renderer, gpu) and failure (exit,
27232   /// unresponsiveness). Renderer processes are further divided in _main frame_
27233   /// renderer (`RenderProcessExited`, `RenderProcessUnresponsive`) and
27234   /// _subframe_ renderer (`FrameRenderProcessExited`). To learn about the
27235   /// conditions under which each failure kind occurs, see
27236   /// `COREWEBVIEW2_PROCESS_FAILED_KIND`.
27237   @(" propget")
27238 	HRESULT get_ProcessFailedKind(
27239       @("out, retval") COREWEBVIEW2_PROCESS_FAILED_KIND* processFailedKind);
27240 }
27241 
27242 /// Receives `ProcessFailed` events.
27243 const GUID IID_ICoreWebView2ProcessFailedEventHandler = ICoreWebView2ProcessFailedEventHandler.iid;
27244 
27245 interface ICoreWebView2ProcessFailedEventHandler : IUnknown
27246 {
27247     static const GUID iid = { 0x79e0aea4,0x990b,0x42d9,[ 0xaa,0x1d,0x0f,0xcc,0x2e,0x5b,0xc7,0xf1 ] };
27248 
27249   /// Provides the event args for the corresponding event.
27250 
27251   HRESULT Invoke(
27252       /+[in]+/ ICoreWebView2 sender,
27253       /+[in]+/ ICoreWebView2ProcessFailedEventArgs args);
27254 }
27255 
27256 /// Implements the interface to receive `ZoomFactorChanged` events.  Use the
27257 /// `ICoreWebView2Controller.ZoomFactor` property to get the modified zoom
27258 /// factor.
27259 
27260 const GUID IID_ICoreWebView2ZoomFactorChangedEventHandler = ICoreWebView2ZoomFactorChangedEventHandler.iid;
27261 
27262 interface ICoreWebView2ZoomFactorChangedEventHandler : IUnknown
27263 {
27264     static const GUID iid = { 0xb52d71d6,0xc4df,0x4543,[ 0xa9,0x0c,0x64,0xa3,0xe6,0x0f,0x38,0xcb ] };
27265 
27266   /// Provides the event args for the corresponding event.  No event args exist
27267   /// and the `args` parameter is set to `null`.
27268 
27269   HRESULT Invoke(/+[in]+/ ICoreWebView2Controller sender, /+[in]+/ IUnknown args);
27270 }
27271 
27272 /// Iterator for a collection of HTTP headers.  For more information, navigate
27273 /// to ICoreWebView2HttpRequestHeaders and ICoreWebView2HttpResponseHeaders.
27274 ///
27275 /// \snippet ScenarioWebViewEventMonitor.cpp HttpRequestHeaderIterator
27276 const GUID IID_ICoreWebView2HttpHeadersCollectionIterator = ICoreWebView2HttpHeadersCollectionIterator.iid;
27277 
27278 interface ICoreWebView2HttpHeadersCollectionIterator : IUnknown
27279 {
27280     static const GUID iid = { 0x0702fc30,0xf43b,0x47bb,[ 0xab,0x52,0xa4,0x2c,0xb5,0x52,0xad,0x9f ] };
27281 
27282   /// Get the name and value of the current HTTP header of the iterator.  If
27283   /// the previous `MoveNext` operation set the `hasNext` parameter to `FALSE`,
27284   /// this method fails.
27285   ///
27286   /// The caller must free the returned strings with `CoTaskMemFree`.  See
27287   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27288 
27289   HRESULT GetCurrentHeader(@("out") LPWSTR* name,
27290 		@("out") LPWSTR* value);
27291 
27292   /// `TRUE` when the iterator has not run out of headers.  If the collection
27293   /// over which the iterator is iterating is empty or if the iterator has gone
27294   ///  past the end of the collection then this is `FALSE`.
27295 
27296   @(" propget")
27297 	HRESULT get_HasCurrentHeader(@("out, retval") BOOL* hasCurrent);
27298 
27299   /// Move the iterator to the next HTTP header in the collection.
27300   ///
27301   /// \> [!NOTE]\n \> If no more HTTP headers exist, the `hasNext` parameter is set to
27302   /// `FALSE`.  After this occurs the `GetCurrentHeader` method fails.
27303 
27304   HRESULT MoveNext(@("out, retval") BOOL* hasNext);
27305 }
27306 
27307 /// HTTP request headers.  Used to inspect the HTTP request on
27308 /// `WebResourceRequested` event and `NavigationStarting` event.
27309 ///
27310 /// \> [!NOTE]\n\> It is possible to modify the HTTP request from a `WebResourceRequested`
27311 /// event, but not from a `NavigationStarting` event.
27312 const GUID IID_ICoreWebView2HttpRequestHeaders = ICoreWebView2HttpRequestHeaders.iid;
27313 
27314 interface ICoreWebView2HttpRequestHeaders : IUnknown
27315 {
27316     static const GUID iid = { 0xe86cac0e,0x5523,0x465c,[ 0xb5,0x36,0x8f,0xb9,0xfc,0x8c,0x8c,0x60 ] };
27317 
27318   /// Gets the header value matching the name.
27319   ///
27320   /// The caller must free the returned string with `CoTaskMemFree`.  See
27321   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27322 
27323   HRESULT GetHeader(in LPCWSTR name,
27324 		@("out, retval") LPWSTR* value);
27325 
27326   /// Gets the header value matching the name using an iterator.
27327 
27328   HRESULT GetHeaders(in LPCWSTR name,
27329 		@("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator);
27330 
27331   /// Verifies that the headers contain an entry that matches the header name.
27332 
27333   HRESULT Contains(in LPCWSTR name,
27334 		@("out, retval") BOOL* contains);
27335 
27336   /// Adds or updates header that matches the name.
27337 
27338   HRESULT SetHeader(in LPCWSTR name, in LPCWSTR value);
27339 
27340   /// Removes header that matches the name.
27341 
27342   HRESULT RemoveHeader(in LPCWSTR name);
27343 
27344   /// Gets an iterator over the collection of request headers.
27345 
27346   HRESULT GetIterator(
27347       @("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator);
27348 }
27349 
27350 /// HTTP response headers.  Used to construct a `WebResourceResponse` for the
27351 /// `WebResourceRequested` event.
27352 const GUID IID_ICoreWebView2HttpResponseHeaders = ICoreWebView2HttpResponseHeaders.iid;
27353 
27354 interface ICoreWebView2HttpResponseHeaders : IUnknown
27355 {
27356     static const GUID iid = { 0x03c5ff5a,0x9b45,0x4a88,[ 0x88,0x1c,0x89,0xa9,0xf3,0x28,0x61,0x9c ] };
27357 
27358   /// Appends header line with name and value.
27359 
27360   HRESULT AppendHeader(in LPCWSTR name, in LPCWSTR value);
27361 
27362   /// Verifies that the headers contain entries that match the header name.
27363 
27364   HRESULT Contains(in LPCWSTR name,
27365 		@("out, retval") BOOL* contains);
27366 
27367   /// Gets the first header value in the collection matching the name.
27368   ///
27369   /// The caller must free the returned string with `CoTaskMemFree`.  See
27370   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27371 
27372   HRESULT GetHeader(in LPCWSTR name,
27373 		@("out, retval") LPWSTR* value);
27374 
27375   /// Gets the header values matching the name.
27376 
27377   HRESULT GetHeaders(in LPCWSTR name,
27378 		@("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator);
27379 
27380   /// Gets an iterator over the collection of entire response headers.
27381 
27382   HRESULT GetIterator(
27383   @("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator);
27384 }
27385 
27386 /// An HTTP request used with the `WebResourceRequested` event.
27387 const GUID IID_ICoreWebView2WebResourceRequest = ICoreWebView2WebResourceRequest.iid;
27388 
27389 interface ICoreWebView2WebResourceRequest : IUnknown
27390 {
27391     static const GUID iid = { 0x97055cd4,0x512c,0x4264,[ 0x8b,0x5f,0xe3,0xf4,0x46,0xce,0xa6,0xa5 ] };
27392 
27393   /// The request URI.
27394   ///
27395   /// The caller must free the returned string with `CoTaskMemFree`.  See
27396   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27397 
27398   @(" propget")
27399 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
27400 
27401   /// Sets the `Uri` property.
27402 
27403   @(" propput")
27404 	HRESULT put_Uri(in LPCWSTR uri);
27405 
27406   /// The HTTP request method.
27407   ///
27408   /// The caller must free the returned string with `CoTaskMemFree`.  See
27409   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27410 
27411   @(" propget")
27412 	HRESULT get_Method(@("out, retval") LPWSTR* method);
27413 
27414   /// Sets the `Method` property.
27415 
27416   @(" propput")
27417 	HRESULT put_Method(in LPCWSTR method);
27418 
27419   /// The HTTP request message body as stream.  POST data should be here.  If a
27420   /// stream is set, which overrides the message body, the stream must have
27421   /// all the content data available by the time the `WebResourceRequested`
27422   /// event deferral of this response is completed.  Stream should be agile or
27423   /// be created from a background STA to prevent performance impact to the UI
27424   /// thread.  `Null` means no content data.  `IStream` semantics apply
27425   /// (return `S_OK` to `Read` runs until all data is exhausted).
27426 
27427   @(" propget")
27428 	HRESULT get_Content(@("out, retval") IStream** content);
27429 
27430   /// Sets the `Content` property.
27431 
27432   @(" propput")
27433 	HRESULT put_Content(in IStream* content);
27434 
27435   /// The mutable HTTP request headers
27436 
27437   @(" propget")
27438 	HRESULT get_Headers(@("out, retval") ICoreWebView2HttpRequestHeaders * headers);
27439 }
27440 
27441 /// An HTTP response used with the `WebResourceRequested` event.
27442 const GUID IID_ICoreWebView2WebResourceResponse = ICoreWebView2WebResourceResponse.iid;
27443 
27444 interface ICoreWebView2WebResourceResponse : IUnknown
27445 {
27446     static const GUID iid = { 0xaafcc94f,0xfa27,0x48fd,[ 0x97,0xdf,0x83,0x0e,0xf7,0x5a,0xae,0xc9 ] };
27447 
27448   /// HTTP response content as stream.  Stream must have all the content data
27449   /// available by the time the `WebResourceRequested` event deferral of this
27450   /// response is completed.  Stream should be agile or be created from a
27451   /// background thread to prevent performance impact to the UI thread.  `Null`
27452   ///  means no content data.  `IStream` semantics apply (return `S_OK` to
27453   /// `Read` runs until all data is exhausted).
27454   /// When providing the response data, you should consider relevant HTTP
27455   /// request headers just like an HTTP server would do. For example, if the
27456   /// request was for a video resource in a HTML video element, the request may
27457   /// contain the [Range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range)
27458   /// header to request only a part of the video that is streaming. In this
27459   /// case, your response stream should be only the portion of the video
27460   /// specified by the range HTTP request headers and you should set the
27461   /// appropriate
27462   /// [Content-Range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range)
27463   /// header in the response.
27464 
27465   @(" propget")
27466 	HRESULT get_Content(@("out, retval") IStream** content);
27467 
27468   /// Sets the `Content` property.
27469 
27470   @(" propput")
27471 	HRESULT put_Content(in IStream* content);
27472 
27473   /// Overridden HTTP response headers.
27474 
27475   @(" propget")
27476 	HRESULT get_Headers(@("out, retval") ICoreWebView2HttpResponseHeaders * headers);
27477 
27478   /// The HTTP response status code.
27479 
27480   @(" propget")
27481 	HRESULT get_StatusCode(@("out, retval") int* statusCode);
27482 
27483   /// Sets the `StatusCode` property.
27484 
27485   @(" propput")
27486 	HRESULT put_StatusCode(in int statusCode);
27487 
27488   /// The HTTP response reason phrase.
27489   ///
27490   /// The caller must free the returned string with `CoTaskMemFree`.  See
27491   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27492 
27493   @(" propget")
27494 	HRESULT get_ReasonPhrase(@("out, retval") LPWSTR* reasonPhrase);
27495 
27496   /// Sets the `ReasonPhrase` property.
27497 
27498   @(" propput")
27499 	HRESULT put_ReasonPhrase(in LPCWSTR reasonPhrase);
27500 }
27501 
27502 /// Event args for the `NavigationStarting` event.
27503 const GUID IID_ICoreWebView2NavigationStartingEventArgs = ICoreWebView2NavigationStartingEventArgs.iid;
27504 
27505 interface ICoreWebView2NavigationStartingEventArgs : IUnknown
27506 {
27507     static const GUID iid = { 0x5b495469,0xe119,0x438a,[ 0x9b,0x18,0x76,0x04,0xf2,0x5f,0x2e,0x49 ] };
27508 
27509   /// The uri of the requested navigation.
27510   ///
27511   /// The caller must free the returned string with `CoTaskMemFree`.  See
27512   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27513 
27514   @(" propget")
27515 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
27516 
27517   /// `TRUE` when the navigation was initiated through a user gesture as
27518   /// opposed to programmatic navigation by page script. Navigations initiated
27519   /// via WebView2 APIs are considered as user initiated.
27520 
27521   @(" propget")
27522 	HRESULT get_IsUserInitiated(@("out, retval") BOOL* isUserInitiated);
27523 
27524   /// `TRUE` when the navigation is redirected.
27525 
27526   @(" propget")
27527 	HRESULT get_IsRedirected(@("out, retval") BOOL* isRedirected);
27528 
27529   /// The HTTP request headers for the navigation.
27530   ///
27531   /// \> [!NOTE]\n\> You are not able to modify the HTTP request headers in a
27532   /// `NavigationStarting` event.
27533 
27534   @(" propget")
27535 	HRESULT get_RequestHeaders(@("out, retval") ICoreWebView2HttpRequestHeaders * requestHeaders);
27536 
27537   /// The host may set this flag to cancel the navigation.  If set, the
27538   /// navigation is not longer present and the content of the current page is
27539   /// intact.  For performance reasons, `GET` HTTP requests may happen, while
27540   /// the host is responding.  You may set cookies and use part of a request
27541   /// for the navigation.  Cancellation for navigation to `about:blank` or
27542   /// frame navigation to `srcdoc` is not supported.  Such attempts are
27543   /// ignored.  A cancelled navigation will fire a `NavigationCompleted` event
27544   /// with a `WebErrorStatus` of
27545   /// `COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED`.
27546 
27547   @(" propget")
27548 	HRESULT get_Cancel(@("out, retval") BOOL* cancel);
27549 
27550   /// Sets the `Cancel` property.
27551 
27552   @(" propput")
27553 	HRESULT put_Cancel(in BOOL cancel);
27554 
27555   /// The ID of the navigation.
27556 
27557   @(" propget")
27558 	HRESULT get_NavigationId(@("out, retval") UINT64* navigationId);
27559 }
27560 
27561 /// The AdditionalAllowedFrameAncestors API that enable developers to provide additional allowed frame ancestors.
27562 const GUID IID_ICoreWebView2NavigationStartingEventArgs2 = ICoreWebView2NavigationStartingEventArgs2.iid;
27563 
27564 interface ICoreWebView2NavigationStartingEventArgs2 : ICoreWebView2NavigationStartingEventArgs
27565 {
27566     static const GUID iid = { 0x9086BE93,0x91AA,0x472D,[ 0xA7,0xE0,0x57,0x9F,0x2B,0xA0,0x06,0xAD ] };
27567 
27568   /// Get additional allowed frame ancestors set by the host app.
27569   ///
27570   /// The caller must free the returned string with `CoTaskMemFree`.  See
27571   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27572   @(" propget")
27573 	HRESULT get_AdditionalAllowedFrameAncestors(@("out, retval") LPWSTR* value);
27574 
27575   /// The app may set this property to allow a frame to be embedded by additional ancestors besides what is allowed by
27576   /// http header [X-Frame-Options](https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Frame-Options)
27577   /// and [Content-Security-Policy frame-ancestors directive](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors).
27578   /// If set, a frame ancestor is allowed if it is allowed by the additional allowed frame
27579   /// ancestors or original http header from the site.
27580   /// Whether an ancestor is allowed by the additional allowed frame ancestors is done the same way as if the site provided
27581   /// it as the source list of the Content-Security-Policy frame-ancestors directive.
27582   /// For example, if `https://example.com` and `https://www.example.com` are the origins of the top
27583   /// page and intermediate iframes that embed a nested site-embedding iframe, and you fully trust
27584   /// those origins, you should set this property to `https://example.com https://www.example.com`.
27585   /// This property gives the app the ability to use iframe to embed sites that otherwise
27586   /// could not be embedded in an iframe in trusted app pages.
27587   /// This could potentially subject the embedded sites to [Clickjacking](https://en.wikipedia.org/wiki/Clickjacking)
27588   /// attack from the code running in the embedding web page. Therefore, you should only
27589   /// set this property with origins of fully trusted embedding page and any intermediate iframes.
27590   /// Whenever possible, you should use the list of specific origins of the top and intermediate
27591   /// frames instead of wildcard characters for this property.
27592   /// This API is to provide limited support for app scenarios that used to be supported by
27593   /// `<webview>` element in other solutions like JavaScript UWP apps and Electron.
27594   /// You should limit the usage of this property to trusted pages, and specific navigation
27595   /// target url, by checking the `Source` of the WebView2, and `Uri` of the event args.
27596   ///
27597   /// This property is ignored for top level document navigation.
27598   ///
27599   /// \snippet ScriptComponent.cpp AdditionalAllowedFrameAncestors_1
27600   ///
27601   /// \snippet ScriptComponent.cpp AdditionalAllowedFrameAncestors_2
27602   @(" propput")
27603 	HRESULT put_AdditionalAllowedFrameAncestors(in LPCWSTR value);
27604 }
27605 
27606 /// The NavigationKind API that enables developers to get more information about
27607 /// navigation type.
27608 const GUID IID_ICoreWebView2NavigationStartingEventArgs3 = ICoreWebView2NavigationStartingEventArgs3.iid;
27609 
27610 interface ICoreWebView2NavigationStartingEventArgs3 : ICoreWebView2NavigationStartingEventArgs2
27611 {
27612     static const GUID iid = { 0xDDFFE494,0x4942,0x4BD2,[ 0xAB,0x73,0x35,0xB8,0xFF,0x40,0xE1,0x9F ] };
27613 
27614   /// Get the navigation kind of this navigation.
27615   ///
27616   @(" propget")
27617 	HRESULT get_NavigationKind(@("out, retval") COREWEBVIEW2_NAVIGATION_KIND* navigation_kind);
27618 }
27619 
27620 /// Receives `NavigationStarting` events.
27621 const GUID IID_ICoreWebView2NavigationStartingEventHandler = ICoreWebView2NavigationStartingEventHandler.iid;
27622 
27623 interface ICoreWebView2NavigationStartingEventHandler : IUnknown
27624 {
27625     static const GUID iid = { 0x9adbe429,0xf36d,0x432b,[ 0x9d,0xdc,0xf8,0x88,0x1f,0xbd,0x76,0xe3 ] };
27626 
27627   /// Provides the event args for the corresponding event.
27628 
27629   HRESULT Invoke(
27630       /+[in]+/ ICoreWebView2 sender,
27631       /+[in]+/ ICoreWebView2NavigationStartingEventArgs args);
27632 }
27633 
27634 /// Event args for the `ContentLoading` event.
27635 const GUID IID_ICoreWebView2ContentLoadingEventArgs = ICoreWebView2ContentLoadingEventArgs.iid;
27636 
27637 interface ICoreWebView2ContentLoadingEventArgs : IUnknown
27638 {
27639     static const GUID iid = { 0x0c8a1275,0x9b6b,0x4901,[ 0x87,0xad,0x70,0xdf,0x25,0xba,0xfa,0x6e ] };
27640 
27641   /// `TRUE` if the loaded content is an error page.
27642 
27643   @(" propget")
27644 	HRESULT get_IsErrorPage(@("out, retval") BOOL* isErrorPage);
27645 
27646   /// The ID of the navigation.
27647 
27648   @(" propget")
27649 	HRESULT get_NavigationId(@("out, retval") UINT64* navigationId);
27650 }
27651 
27652 /// Receives `ContentLoading` events.
27653 const GUID IID_ICoreWebView2ContentLoadingEventHandler = ICoreWebView2ContentLoadingEventHandler.iid;
27654 
27655 interface ICoreWebView2ContentLoadingEventHandler : IUnknown
27656 {
27657     static const GUID iid = { 0x364471e7,0xf2be,0x4910,[ 0xbd,0xba,0xd7,0x20,0x77,0xd5,0x1c,0x4b ] };
27658 
27659   /// Provides the event args for the corresponding event.
27660 
27661   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ ICoreWebView2ContentLoadingEventArgs args);
27662 }
27663 
27664 /// Event args for the `SourceChanged` event.
27665 const GUID IID_ICoreWebView2SourceChangedEventArgs = ICoreWebView2SourceChangedEventArgs.iid;
27666 
27667 interface ICoreWebView2SourceChangedEventArgs : IUnknown
27668 {
27669     static const GUID iid = { 0x31e0e545,0x1dba,0x4266,[ 0x89,0x14,0xf6,0x38,0x48,0xa1,0xf7,0xd7 ] };
27670 
27671   /// `TRUE` if the page being navigated to is a new document.
27672 
27673   @(" propget")
27674 	HRESULT get_IsNewDocument(@("out, retval") BOOL* isNewDocument);
27675 }
27676 
27677 /// Receives `SourceChanged` events.
27678 const GUID IID_ICoreWebView2SourceChangedEventHandler = ICoreWebView2SourceChangedEventHandler.iid;
27679 
27680 interface ICoreWebView2SourceChangedEventHandler : IUnknown
27681 {
27682     static const GUID iid = { 0x3c067f9f,0x5388,0x4772,[ 0x8b,0x48,0x79,0xf7,0xef,0x1a,0xb3,0x7c ] };
27683 
27684   /// Provides the event args for the corresponding event.
27685 
27686   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ ICoreWebView2SourceChangedEventArgs args);
27687 }
27688 
27689 /// Receives `HistoryChanged` events.
27690 const GUID IID_ICoreWebView2HistoryChangedEventHandler = ICoreWebView2HistoryChangedEventHandler.iid;
27691 
27692 interface ICoreWebView2HistoryChangedEventHandler : IUnknown
27693 {
27694     static const GUID iid = { 0xc79a420c,0xefd9,0x4058,[ 0x92,0x95,0x3e,0x8b,0x4b,0xca,0xb6,0x45 ] };
27695 
27696   /// Provides the event args for the corresponding event.  No event args exist
27697   /// and the `args` parameter is set to `null`.
27698 
27699   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
27700 }
27701 
27702 /// Event args for the `ScriptDialogOpening` event.
27703 const GUID IID_ICoreWebView2ScriptDialogOpeningEventArgs = ICoreWebView2ScriptDialogOpeningEventArgs.iid;
27704 
27705 interface ICoreWebView2ScriptDialogOpeningEventArgs : IUnknown
27706 {
27707     static const GUID iid = { 0x7390bb70,0xabe0,0x4843,[ 0x95,0x29,0xf1,0x43,0xb3,0x1b,0x03,0xd6 ] };
27708 
27709   /// The URI of the page that requested the dialog box.
27710   ///
27711   /// The caller must free the returned string with `CoTaskMemFree`.  See
27712   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27713 
27714   @(" propget")
27715 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
27716 
27717   /// The kind of JavaScript dialog box.  `alert`, `confirm`, `prompt`, or
27718   /// `beforeunload`.
27719 
27720   @(" propget")
27721 	HRESULT get_Kind(@("out, retval") COREWEBVIEW2_SCRIPT_DIALOG_KIND* kind);
27722 
27723   /// The message of the dialog box.  From JavaScript this is the first
27724   /// parameter passed to `alert`, `confirm`, and `prompt` and is empty for
27725   /// `beforeunload`.
27726   ///
27727   /// The caller must free the returned string with `CoTaskMemFree`.  See
27728   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27729 
27730   @(" propget")
27731 	HRESULT get_Message(@("out, retval") LPWSTR* message);
27732 
27733   /// The host may run this to respond with **OK** to `confirm`, `prompt`, and
27734   /// `beforeunload` dialogs.  Do not run this method to indicate cancel.
27735   /// From JavaScript, this means that the `confirm` and `beforeunload` function
27736   /// returns `TRUE` if `Accept` is run.  And for the prompt function it returns
27737   /// the value of `ResultText` if `Accept` is run and otherwise returns
27738   /// `FALSE`.
27739 
27740   HRESULT Accept();
27741 
27742   /// The second parameter passed to the JavaScript prompt dialog.
27743   /// The result of the prompt JavaScript function uses this value as the
27744   /// default value.
27745   ///
27746   /// The caller must free the returned string with `CoTaskMemFree`.  See
27747   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27748 
27749   @(" propget")
27750 	HRESULT get_DefaultText(@("out, retval") LPWSTR* defaultText);
27751 
27752   /// The return value from the JavaScript prompt function if `Accept` is run.
27753   ///  This value is ignored for dialog kinds other than prompt.  If `Accept`
27754   /// is not run, this value is ignored and `FALSE` is returned from prompt.
27755   ///
27756   /// The caller must free the returned string with `CoTaskMemFree`.  See
27757   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27758 
27759   @(" propget")
27760 	HRESULT get_ResultText(@("out, retval") LPWSTR* resultText);
27761 
27762   /// Sets the `ResultText` property.
27763 
27764   @(" propput")
27765 	HRESULT put_ResultText(in LPCWSTR resultText);
27766 
27767   /// Returns an `ICoreWebView2Deferral` object.  Use this operation to
27768   /// complete the event at a later time.
27769 
27770   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
27771 }
27772 
27773 /// Receives `ScriptDialogOpening` events.
27774 const GUID IID_ICoreWebView2ScriptDialogOpeningEventHandler = ICoreWebView2ScriptDialogOpeningEventHandler.iid;
27775 
27776 interface ICoreWebView2ScriptDialogOpeningEventHandler : IUnknown
27777 {
27778     static const GUID iid = { 0xef381bf9,0xafa8,0x4e37,[ 0x91,0xc4,0x8a,0xc4,0x85,0x24,0xbd,0xfb ] };
27779 
27780   /// Provides the event args for the corresponding event.
27781 
27782   HRESULT Invoke(
27783       /+[in]+/ ICoreWebView2 sender,
27784       /+[in]+/ ICoreWebView2ScriptDialogOpeningEventArgs args);
27785 }
27786 
27787 /// Event args for the `NavigationCompleted` event.
27788 const GUID IID_ICoreWebView2NavigationCompletedEventArgs = ICoreWebView2NavigationCompletedEventArgs.iid;
27789 
27790 interface ICoreWebView2NavigationCompletedEventArgs : IUnknown
27791 {
27792     static const GUID iid = { 0x30d68b7d,0x20d9,0x4752,[ 0xa9,0xca,0xec,0x84,0x48,0xfb,0xb5,0xc1 ] };
27793 
27794   /// `TRUE` when the navigation is successful.  `FALSE` for a navigation that
27795   /// ended up in an error page (failures due to no network, DNS lookup
27796   /// failure, HTTP server responds with 4xx), but may also be `FALSE` for
27797   /// additional scenarios such as `window.stop()` run on navigated page.
27798   /// Note that WebView2 will report the navigation as 'unsuccessful' if the load
27799   /// for the navigation did not reach the expected completion for any reason. Such
27800   /// reasons include potentially catastrophic issues such network and certificate
27801   /// issues, but can also be the result of intended actions such as the app canceling a navigation or
27802   /// navigating away before the original navigation completed. Applications should not
27803   /// just rely on this flag, but also consider the reported WebErrorStatus to
27804   /// determine whether the failure is indeed catastrophic in their context.
27805   /// WebErrorStatuses that may indicate a non-catastrophic failure include:
27806   /// - COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED
27807   /// - COREWEBVIEW2_WEB_ERROR_STATUS_VALID_AUTHENTICATION_CREDENTIALS_REQUIRED
27808   /// - COREWEBVIEW2_WEB_ERROR_STATUS_VALID_PROXY_AUTHENTICATION_REQUIRED
27809 
27810   @(" propget")
27811 	HRESULT get_IsSuccess(@("out, retval") BOOL* isSuccess);
27812 
27813   /// The error code if the navigation failed.
27814 
27815   @(" propget")
27816 	HRESULT get_WebErrorStatus(@("out, retval") COREWEBVIEW2_WEB_ERROR_STATUS*
27817       webErrorStatus);
27818 
27819   /// The ID of the navigation.
27820 
27821   @(" propget")
27822 	HRESULT get_NavigationId(@("out, retval") UINT64* navigationId);
27823 }
27824 
27825 /// This is an interface for the StatusCode property of
27826 /// ICoreWebView2NavigationCompletedEventArgs
27827 const GUID IID_ICoreWebView2NavigationCompletedEventArgs2 = ICoreWebView2NavigationCompletedEventArgs2.iid;
27828 
27829 interface ICoreWebView2NavigationCompletedEventArgs2 : ICoreWebView2NavigationCompletedEventArgs
27830 {
27831     static const GUID iid = { 0xFDF8B738,0xEE1E,0x4DB2,[ 0xA3,0x29,0x8D,0x7D,0x7B,0x74,0xD7,0x92 ] };
27832   /// The HTTP status code of the navigation if it involved an HTTP request.
27833   /// For instance, this will usually be 200 if the request was successful, 404
27834   /// if a page was not found, etc.  See
27835   /// https://developer.mozilla.org/docs/Web/HTTP/Status for a list of
27836   /// common status codes.
27837   ///
27838   /// The `HttpStatusCode` property will be 0 in the following cases:
27839   /// * The navigation did not involve an HTTP request.  For instance, if it was
27840   ///   a navigation to a file:// URL, or if it was a same-document navigation.
27841   /// * The navigation failed before a response was received.  For instance, if
27842   ///   the hostname was not found, or if there was a network error.
27843   ///
27844   /// In those cases, you can get more information from the `IsSuccess` and
27845   /// `WebErrorStatus` properties.
27846   ///
27847   /// If the navigation receives a successful HTTP response, but the navigated
27848   /// page calls `window.stop()` before it finishes loading, then
27849   /// `HttpStatusCode` may contain a success code like 200, but `IsSuccess` will
27850   /// be FALSE and `WebErrorStatus` will be
27851   /// `COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED`.
27852   ///
27853   /// Since WebView2 handles HTTP continuations and redirects automatically, it
27854   /// is unlikely for `HttpStatusCode` to ever be in the 1xx or 3xx ranges.
27855   @(" propget")
27856 	HRESULT get_HttpStatusCode(@("out, retval") int* http_status_code);
27857 }
27858 
27859 /// Receives `NavigationCompleted` events.
27860 const GUID IID_ICoreWebView2NavigationCompletedEventHandler = ICoreWebView2NavigationCompletedEventHandler.iid;
27861 
27862 interface ICoreWebView2NavigationCompletedEventHandler : IUnknown
27863 {
27864     static const GUID iid = { 0xd33a35bf,0x1c49,0x4f98,[ 0x93,0xab,0x00,0x6e,0x05,0x33,0xfe,0x1c ] };
27865 
27866   /// Provides the event args for the corresponding event.
27867 
27868   HRESULT Invoke(
27869       /+[in]+/ ICoreWebView2 sender,
27870       /+[in]+/ ICoreWebView2NavigationCompletedEventArgs args);
27871 }
27872 
27873 /// Event args for the `PermissionRequested` event.
27874 const GUID IID_ICoreWebView2PermissionRequestedEventArgs = ICoreWebView2PermissionRequestedEventArgs.iid;
27875 
27876 interface ICoreWebView2PermissionRequestedEventArgs : IUnknown
27877 {
27878     static const GUID iid = { 0x973ae2ef,0xff18,0x4894,[ 0x8f,0xb2,0x3c,0x75,0x8f,0x04,0x68,0x10 ] };
27879 
27880   /// The origin of the web content that requests the permission.
27881   ///
27882   /// The caller must free the returned string with `CoTaskMemFree`.  See
27883   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27884 
27885   @(" propget")
27886 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
27887 
27888   /// The type of the permission that is requested.
27889 
27890   @(" propget")
27891 	HRESULT get_PermissionKind(@("out, retval") COREWEBVIEW2_PERMISSION_KIND* permissionKind);
27892 
27893   /// `TRUE` when the permission request was initiated through a user gesture.
27894   ///
27895   /// \> [!NOTE]\n\> Being initiated through a user gesture does not mean that user intended
27896   /// to access the associated resource.
27897 
27898   @(" propget")
27899 	HRESULT get_IsUserInitiated(@("out, retval") BOOL* isUserInitiated);
27900 
27901   /// The status of a permission request, (for example is the request is granted).
27902   /// The default value is `COREWEBVIEW2_PERMISSION_STATE_DEFAULT`.
27903 
27904   @(" propget")
27905 	HRESULT get_State(@("out, retval") COREWEBVIEW2_PERMISSION_STATE* state);
27906 
27907   /// Sets the `State` property.
27908 
27909   @(" propput")
27910 	HRESULT put_State(in COREWEBVIEW2_PERMISSION_STATE state);
27911 
27912   /// Gets an `ICoreWebView2Deferral` object.  Use the deferral object to make
27913   /// the permission decision at a later time. The deferral only applies to the
27914   /// current request, and does not prevent the `PermissionRequested` event from
27915   /// getting raised for new requests. However, for some permission kinds the
27916   /// WebView will avoid creating a new request if there is a pending request of
27917   /// the same kind.
27918 
27919   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
27920 }
27921 
27922 /// Receives `PermissionRequested` events.
27923 const GUID IID_ICoreWebView2PermissionRequestedEventHandler = ICoreWebView2PermissionRequestedEventHandler.iid;
27924 
27925 interface ICoreWebView2PermissionRequestedEventHandler : IUnknown
27926 {
27927     static const GUID iid = { 0x15e1c6a3,0xc72a,0x4df3,[ 0x91,0xd7,0xd0,0x97,0xfb,0xec,0x6b,0xfd ] };
27928 
27929   /// Provides the event args for the corresponding event.
27930 
27931   HRESULT Invoke(
27932       /+[in]+/ ICoreWebView2 sender,
27933       /+[in]+/ ICoreWebView2PermissionRequestedEventArgs args);
27934 }
27935 
27936 /// Receives the result of the `AddScriptToExecuteOnDocumentCreated` method.
27937 const GUID IID_ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler = ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler.iid;
27938 
27939 interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler : IUnknown
27940 {
27941     static const GUID iid = { 0xb99369f3,0x9b11,0x47b5,[ 0xbc,0x6f,0x8e,0x78,0x95,0xfc,0xea,0x17 ] };
27942 
27943   /// Provide the completion status and result of the corresponding
27944   /// asynchronous method.
27945 
27946   HRESULT Invoke(in HRESULT errorCode, in LPCWSTR id);
27947 }
27948 
27949 /// Receives the result of the `ExecuteScript` method.
27950 const GUID IID_ICoreWebView2ExecuteScriptCompletedHandler = ICoreWebView2ExecuteScriptCompletedHandler.iid;
27951 
27952 interface ICoreWebView2ExecuteScriptCompletedHandler : IUnknown
27953 {
27954     static const GUID iid = { 0x49511172,0xcc67,0x4bca,[ 0x99,0x23,0x13,0x71,0x12,0xf4,0xc4,0xcc ] };
27955 
27956   /// Provide the implementer with the completion status and result of the
27957   /// corresponding asynchronous method.
27958 
27959   HRESULT Invoke(in HRESULT errorCode, in LPCWSTR resultObjectAsJson);
27960 }
27961 
27962 /// Event args for the `WebResourceRequested` event.
27963 const GUID IID_ICoreWebView2WebResourceRequestedEventArgs = ICoreWebView2WebResourceRequestedEventArgs.iid;
27964 
27965 interface ICoreWebView2WebResourceRequestedEventArgs : IUnknown
27966 {
27967     static const GUID iid = { 0x453e667f,0x12c7,0x49d4,[ 0xbe,0x6d,0xdd,0xbe,0x79,0x56,0xf5,0x7a ] };
27968 
27969   /// The Web resource request.  The request object may be missing some headers
27970   /// that are added by network stack at a later time.
27971 
27972   @(" propget")
27973 	HRESULT get_Request(@("out, retval") ICoreWebView2WebResourceRequest * request);
27974 
27975   /// A placeholder for the web resource response object.  If this object is
27976   /// set, the web resource request is completed with the specified response.
27977 
27978   @(" propget")
27979 	HRESULT get_Response(@("out, retval") ICoreWebView2WebResourceResponse * response);
27980 
27981   /// Sets the `Response` property.  Create an empty web resource response
27982   /// object with `CreateWebResourceResponse` and then modify it to construct
27983   /// the response.
27984 
27985   @(" propput")
27986 	HRESULT put_Response(/+[in]+/ ICoreWebView2WebResourceResponse response);
27987 
27988   /// Obtain an `ICoreWebView2Deferral` object and put the event into a
27989   /// deferred state.  Use the `ICoreWebView2Deferral` object to complete the
27990   /// request at a later time.
27991 
27992   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
27993 
27994   /// The web resource request context.
27995 
27996   @(" propget")
27997 	HRESULT get_ResourceContext(@("out, retval") COREWEBVIEW2_WEB_RESOURCE_CONTEXT* context);
27998 }
27999 
28000 /// Runs when a URL request (through network, file, and so on) is made in
28001 /// the webview for a Web resource matching resource context filter and URL
28002 /// specified in `AddWebResourceRequestedFilter`.  The host views and modifies
28003 /// the request or provide a response in a similar pattern to HTTP, in which
28004 /// case the request immediately completed.  This may not contain any request
28005 /// headers that are added by the network stack, such as an `Authorization`
28006 /// header.
28007 const GUID IID_ICoreWebView2WebResourceRequestedEventHandler = ICoreWebView2WebResourceRequestedEventHandler.iid;
28008 
28009 interface ICoreWebView2WebResourceRequestedEventHandler : IUnknown
28010 {
28011     static const GUID iid = { 0xab00b74c,0x15f1,0x4646,[ 0x80,0xe8,0xe7,0x63,0x41,0xd2,0x5d,0x71 ] };
28012 
28013   /// Provides the event args for the corresponding event.
28014 
28015   HRESULT Invoke(
28016       /+[in]+/ ICoreWebView2 sender,
28017       /+[in]+/ ICoreWebView2WebResourceRequestedEventArgs args);
28018 }
28019 
28020 /// Receives the result of the `CapturePreview` method.  The result is written
28021 /// to the stream provided in the `CapturePreview` method.
28022 
28023 const GUID IID_ICoreWebView2CapturePreviewCompletedHandler = ICoreWebView2CapturePreviewCompletedHandler.iid;
28024 
28025 interface ICoreWebView2CapturePreviewCompletedHandler : IUnknown
28026 {
28027     static const GUID iid = { 0x697e05e9,0x3d8f,0x45fa,[ 0x96,0xf4,0x8f,0xfe,0x1e,0xde,0xda,0xf5 ] };
28028 
28029   /// Provides the completion status of the corresponding asynchronous method.
28030 
28031   HRESULT Invoke(in HRESULT errorCode);
28032 }
28033 
28034 /// Receives `GotFocus` and `LostFocus` events.
28035 
28036 const GUID IID_ICoreWebView2FocusChangedEventHandler = ICoreWebView2FocusChangedEventHandler.iid;
28037 
28038 interface ICoreWebView2FocusChangedEventHandler : IUnknown
28039 {
28040     static const GUID iid = { 0x05ea24bd,0x6452,0x4926,[ 0x90,0x14,0x4b,0x82,0xb4,0x98,0x13,0x5d ] };
28041 
28042   /// Provides the event args for the corresponding event.  No event args exist
28043   /// and the `args` parameter is set to `null`.
28044 
28045   HRESULT Invoke(
28046       /+[in]+/ ICoreWebView2Controller sender,
28047       /+[in]+/ IUnknown args);
28048 }
28049 
28050 /// Event args for the `MoveFocusRequested` event.
28051 
28052 const GUID IID_ICoreWebView2MoveFocusRequestedEventArgs = ICoreWebView2MoveFocusRequestedEventArgs.iid;
28053 
28054 interface ICoreWebView2MoveFocusRequestedEventArgs : IUnknown
28055 {
28056     static const GUID iid = { 0x2d6aa13b,0x3839,0x4a15,[ 0x92,0xfc,0xd8,0x8b,0x3c,0x0d,0x9c,0x9d ] };
28057 
28058   /// The reason for WebView to run the `MoveFocusRequested` event.
28059 
28060   @(" propget")
28061 	HRESULT get_Reason(@("out, retval") COREWEBVIEW2_MOVE_FOCUS_REASON* reason);
28062 
28063   /// Indicates whether the event has been handled by the app.  If the app has
28064   /// moved the focus to another desired location, it should set the `Handled`
28065   /// property to `TRUE`.  When the `Handled` property is `FALSE` after the
28066   /// event handler returns, default action is taken.  The default action is to
28067   /// try to find the next tab stop child window in the app and try to move
28068   /// focus to that window.  If no other window exists to move focus, focus is
28069   /// cycled within the web content of the WebView.
28070 
28071   @(" propget")
28072 	HRESULT get_Handled(@("out, retval") BOOL* value);
28073 
28074   /// Sets the `Handled` property.
28075 
28076   @(" propput")
28077 	HRESULT put_Handled(in BOOL value);
28078 }
28079 
28080 /// Receives `MoveFocusRequested` events.
28081 
28082 const GUID IID_ICoreWebView2MoveFocusRequestedEventHandler = ICoreWebView2MoveFocusRequestedEventHandler.iid;
28083 
28084 interface ICoreWebView2MoveFocusRequestedEventHandler : IUnknown
28085 {
28086     static const GUID iid = { 0x69035451,0x6dc7,0x4cb8,[ 0x9b,0xce,0xb2,0xbd,0x70,0xad,0x28,0x9f ] };
28087 
28088   /// Provides the event args for the corresponding event.
28089 
28090   HRESULT Invoke(
28091       /+[in]+/ ICoreWebView2Controller sender,
28092       /+[in]+/ ICoreWebView2MoveFocusRequestedEventArgs args);
28093 }
28094 
28095 /// Event args for the `WebMessageReceived` event.
28096 const GUID IID_ICoreWebView2WebMessageReceivedEventArgs = ICoreWebView2WebMessageReceivedEventArgs.iid;
28097 
28098 interface ICoreWebView2WebMessageReceivedEventArgs : IUnknown
28099 {
28100     static const GUID iid = { 0x0f99a40c,0xe962,0x4207,[ 0x9e,0x92,0xe3,0xd5,0x42,0xef,0xf8,0x49 ] };
28101 
28102   /// The URI of the document that sent this web message.
28103   ///
28104   /// The caller must free the returned string with `CoTaskMemFree`.  See
28105   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28106 
28107   @(" propget")
28108 	HRESULT get_Source(@("out, retval") LPWSTR* source);
28109 
28110   /// The message posted from the WebView content to the host converted to a
28111   /// JSON string.  Run this operation to communicate using JavaScript objects.
28112   ///
28113   /// For example, the following `postMessage` runs result in the following
28114   /// `WebMessageAsJson` values.
28115   ///
28116   /// ```json
28117   /// postMessage({'a': 'b'})      L"{\"a\": \"b\"}"
28118   /// postMessage(1.2)             L"1.2"
28119   /// postMessage('example')       L"\"example\""
28120   /// ```
28121   ///
28122   /// The caller must free the returned string with `CoTaskMemFree`.  See
28123   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28124 
28125   @(" propget")
28126 	HRESULT get_WebMessageAsJson(@("out, retval") LPWSTR* webMessageAsJson);
28127 
28128   /// If the message posted from the WebView content to the host is a string
28129   /// type, this method returns the value of that string.  If the message
28130   /// posted is some other kind of JavaScript type this method fails with the
28131   /// following error.
28132   ///
28133   /// ```text
28134   /// E_INVALIDARG
28135   /// ```
28136   ///
28137   /// Run this operation to communicate using simple strings.
28138   ///
28139   /// For example, the following `postMessage` runs result in the following
28140   /// `WebMessageAsString` values.
28141   ///
28142   /// ```json
28143   /// postMessage({'a': 'b'})      E_INVALIDARG
28144   /// postMessage(1.2)             E_INVALIDARG
28145   /// postMessage('example')       L"example"
28146   /// ```
28147   ///
28148   /// The caller must free the returned string with `CoTaskMemFree`.  See
28149   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28150 
28151   HRESULT TryGetWebMessageAsString(@("out, retval") LPWSTR* webMessageAsString);
28152 }
28153 
28154 /// Receives `WebMessageReceived` events.
28155 const GUID IID_ICoreWebView2WebMessageReceivedEventHandler = ICoreWebView2WebMessageReceivedEventHandler.iid;
28156 
28157 interface ICoreWebView2WebMessageReceivedEventHandler : IUnknown
28158 {
28159     static const GUID iid = { 0x57213f19,0x00e6,0x49fa,[ 0x8e,0x07,0x89,0x8e,0xa0,0x1e,0xcb,0xd2 ] };
28160 
28161   /// Provides the event args for the corresponding event.
28162 
28163   HRESULT Invoke(
28164       /+[in]+/ ICoreWebView2 sender,
28165       /+[in]+/ ICoreWebView2WebMessageReceivedEventArgs args);
28166 }
28167 
28168 /// Event args for the `DevToolsProtocolEventReceived` event.
28169 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventArgs = ICoreWebView2DevToolsProtocolEventReceivedEventArgs.iid;
28170 
28171 interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs : IUnknown
28172 {
28173     static const GUID iid = { 0x653c2959,0xbb3a,0x4377,[ 0x86,0x32,0xb5,0x8a,0xda,0x4e,0x66,0xc4 ] };
28174 
28175   /// The parameter object of the corresponding `DevToolsProtocol` event
28176   /// represented as a JSON string.
28177   ///
28178   /// The caller must free the returned string with `CoTaskMemFree`.  See
28179   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28180 
28181   @(" propget")
28182 	HRESULT get_ParameterObjectAsJson(@("out, retval") LPWSTR*
28183                                     parameterObjectAsJson);
28184 }
28185 
28186 /// This is a continuation of the `ICoreWebView2DevToolsProtocolEventReceivedEventArgs`
28187 /// interface that provides the session ID of the target where the event originates from.
28188 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 = ICoreWebView2DevToolsProtocolEventReceivedEventArgs2.iid;
28189 
28190 interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 : ICoreWebView2DevToolsProtocolEventReceivedEventArgs
28191 {
28192     static const GUID iid = { 0x2DC4959D,0x1494,0x4393,[ 0x95,0xBA,0xBE,0xA4,0xCB,0x9E,0xBD,0x1B ] };
28193 
28194   /// The sessionId of the target where the event originates from.
28195   /// Empty string is returned as sessionId if the event comes from the default
28196   /// session for the top page.
28197   ///
28198   /// The caller must free the returned string with `CoTaskMemFree`.  See
28199   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28200   ///
28201   /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceivedSessionId
28202   @(" propget")
28203 	HRESULT get_SessionId(@("out, retval") LPWSTR* sessionId);
28204 }
28205 
28206 /// Receives `DevToolsProtocolEventReceived` events from the WebView.
28207 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventHandler = ICoreWebView2DevToolsProtocolEventReceivedEventHandler.iid;
28208 
28209 interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler : IUnknown
28210 {
28211     static const GUID iid = { 0xe2fda4be,0x5456,0x406c,[ 0xa2,0x61,0x3d,0x45,0x21,0x38,0x36,0x2c ] };
28212 
28213   /// Provides the event args for the corresponding event.
28214 
28215   HRESULT Invoke(
28216       /+[in]+/ ICoreWebView2 sender,
28217       /+[in]+/ ICoreWebView2DevToolsProtocolEventReceivedEventArgs args);
28218 }
28219 
28220 /// Receives `CallDevToolsProtocolMethod` completion results.
28221 const GUID IID_ICoreWebView2CallDevToolsProtocolMethodCompletedHandler = ICoreWebView2CallDevToolsProtocolMethodCompletedHandler.iid;
28222 
28223 interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler : IUnknown
28224 {
28225     static const GUID iid = { 0x5c4889f0,0x5ef6,0x4c5a,[ 0x95,0x2c,0xd8,0xf1,0xb9,0x2d,0x05,0x74 ] };
28226 
28227   /// Provides the completion status and result of the corresponding
28228   /// asynchronous method.
28229 
28230   HRESULT Invoke(in HRESULT errorCode, in LPCWSTR returnObjectAsJson);
28231 }
28232 
28233 /// Receives the `CoreWebView2Controller` created using `CreateCoreWebView2Controller`.
28234 
28235 const GUID IID_ICoreWebView2CreateCoreWebView2ControllerCompletedHandler = ICoreWebView2CreateCoreWebView2ControllerCompletedHandler.iid;
28236 
28237 interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler : IUnknown
28238 {
28239     static const GUID iid = { 0x6c4819f3,0xc9b7,0x4260,[ 0x81,0x27,0xc9,0xf5,0xbd,0xe7,0xf6,0x8c ] };
28240 
28241   /// Provides the completion status and result of the corresponding
28242   /// asynchronous method.
28243 
28244   HRESULT Invoke(HRESULT errorCode, ICoreWebView2Controller createdController);
28245 }
28246 
28247 /// The caller implements this interface to receive the CoreWebView2Controller
28248 /// created via CreateCoreWebView2CompositionController.
28249 const GUID IID_ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler = ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler.iid;
28250 
28251 interface ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler : IUnknown
28252 {
28253     static const GUID iid = { 0x02fab84b,0x1428,0x4fb7,[ 0xad,0x45,0x1b,0x2e,0x64,0x73,0x61,0x84 ] };
28254   /// Called to provide the implementer with the completion status and result
28255   /// of the corresponding asynchronous method call.
28256   HRESULT Invoke(
28257       HRESULT errorCode,
28258       ICoreWebView2CompositionController webView);
28259 }
28260 
28261 /// Event args for the `NewWindowRequested` event.  The event is run when
28262 /// content inside webview requested to a open a new window (through
28263 /// `window.open()` and so on).
28264 const GUID IID_ICoreWebView2NewWindowRequestedEventArgs = ICoreWebView2NewWindowRequestedEventArgs.iid;
28265 
28266 interface ICoreWebView2NewWindowRequestedEventArgs : IUnknown
28267 {
28268     static const GUID iid = { 0x34acb11c,0xfc37,0x4418,[ 0x91,0x32,0xf9,0xc2,0x1d,0x1e,0xaf,0xb9 ] };
28269 
28270   /// The target uri of the new window requested.
28271   ///
28272   /// The caller must free the returned string with `CoTaskMemFree`.  See
28273   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28274 
28275   @(" propget")
28276 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
28277 
28278   /// Sets a CoreWebView2 as a result of the NewWindowRequested event. Provides
28279   /// a WebView as the target for a `window.open()` from inside the
28280   /// requesting WebView. If this is set, the top-level window of this WebView
28281   /// is returned as the opened
28282   /// [WindowProxy](https://developer.mozilla.org/en-US/docs/glossary/windowproxy)
28283   /// to the opener script. If this is not set, then `Handled` is checked to
28284   /// determine behavior for NewWindowRequested event.
28285   /// CoreWebView2 provided in the `NewWindow` property must be on the same
28286   /// Environment as the opener WebView and should not have been navigated
28287   /// previously. Don't use methods that cause navigation or interact with the
28288   /// DOM on this CoreWebView2 until the target content has loaded. Setting event
28289   /// handlers, changing Settings properties, or other methods are fine to call.
28290   /// Changes to settings should be made before `put_NewWindow` is called to
28291   /// ensure that those settings take effect for the newly setup WebView. Once the
28292   /// NewWindow is set the underlying web contents of this CoreWebView2 will be
28293   /// replaced and navigated as appropriate for the new window. After setting
28294   /// new window it cannot be changed and error will be return otherwise.
28295   ///
28296   /// The methods which should affect the new web contents like
28297   /// AddScriptToExecuteOnDocumentCreated has to be called and completed before setting NewWindow.
28298   /// Other methods which should affect the new web contents like add_WebResourceRequested have to be called after setting NewWindow.
28299   /// It is best not to use RemoveScriptToExecuteOnDocumentCreated before setting NewWindow, otherwise it may not work for later added scripts.
28300   ///
28301   /// The new WebView must have the same profile as the opener WebView.
28302 
28303   @(" propput")
28304 	HRESULT put_NewWindow(/+[in]+/ ICoreWebView2 newWindow);
28305 
28306   /// Gets the new window.
28307 
28308   @(" propget")
28309 	HRESULT get_NewWindow(@("out, retval") ICoreWebView2 * newWindow);
28310 
28311   /// Sets whether the `NewWindowRequested` event is handled by host.  If this
28312   /// is `FALSE` and no `NewWindow` is set, the WebView opens a popup window
28313   /// and it returns as opened `WindowProxy`.  If set to `TRUE` and no
28314   /// `NewWindow` is set for `window.open`, the opened `WindowProxy` is for an
28315   /// testing window object and no window loads.
28316   /// The default value is `FALSE`.
28317 
28318   @(" propput")
28319 	HRESULT put_Handled(in BOOL handled);
28320 
28321   /// Gets whether the `NewWindowRequested` event is handled by host.
28322 
28323   @(" propget")
28324 	HRESULT get_Handled(@("out, retval") BOOL* handled);
28325 
28326   /// `TRUE` when the new window request was initiated through a user gesture.
28327   /// Examples of user initiated requests are:
28328   ///
28329   /// - Selecting an anchor tag with target
28330   /// - Programmatic window open from a script that directly run as a result of
28331   /// user interaction such as via onclick handlers.
28332   ///
28333   /// Non-user initiated requests are programmatic window opens from a script
28334   /// that are not directly triggered by user interaction, such as those that
28335   /// run while loading a new page or via timers.
28336   /// The Microsoft Edge popup blocker is disabled for WebView so the app is
28337   /// able to use this flag to block non-user initiated popups.
28338 
28339   @(" propget")
28340 	HRESULT get_IsUserInitiated(@("out, retval") BOOL* isUserInitiated);
28341 
28342   /// Obtain an `ICoreWebView2Deferral` object and put the event into a
28343   /// deferred state.  Use the `ICoreWebView2Deferral` object to complete the
28344   /// window open request at a later time.  While this event is deferred the
28345   /// opener window returns a `WindowProxy` to an un-navigated window, which
28346   /// navigates when the deferral is complete.
28347 
28348   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
28349 
28350   /// Window features specified by the `window.open`.  The features should be
28351   /// considered for positioning and sizing of new webview windows.
28352 
28353   @(" propget")
28354 	HRESULT get_WindowFeatures(@("out, retval") ICoreWebView2WindowFeatures * value);
28355 }
28356 
28357 /// This is a continuation of the `ICoreWebView2NewWindowRequestedEventArgs` interface.
28358 const GUID IID_ICoreWebView2NewWindowRequestedEventArgs2 = ICoreWebView2NewWindowRequestedEventArgs2.iid;
28359 
28360 interface ICoreWebView2NewWindowRequestedEventArgs2 : ICoreWebView2NewWindowRequestedEventArgs
28361 {
28362     static const GUID iid = { 0xbbc7baed,0x74c6,0x4c92,[ 0xb6,0x3a,0x7f,0x5a,0xea,0xe0,0x3d,0xe3 ] };
28363   /// Gets the name of the new window. This window can be created via `window.open(url, windowName)`,
28364   /// where the windowName parameter corresponds to `Name` property.
28365   /// If no windowName is passed to `window.open`, then the `Name` property
28366   /// will be set to an empty string. Additionally, if window is opened through other means,
28367   /// such as `<a target="windowName">...</a>` or `<iframe name="windowName">...</iframe>`,
28368   /// then the `Name` property will be set accordingly. In the case of target=_blank,
28369   /// the `Name` property will be an empty string.
28370   /// Opening a window via ctrl+clicking a link would result in the `Name` property
28371   /// being set to an empty string.
28372   ///
28373   /// The caller must free the returned string with `CoTaskMemFree`.  See
28374   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28375   @(" propget")
28376 	HRESULT get_Name(@("out, retval") LPWSTR* value);
28377 }
28378 
28379 /// The window features for a WebView popup window.  The fields match the
28380 /// `windowFeatures` passed to `window.open` as specified in
28381 /// [Window features](https://developer.mozilla.org/docs/Web/API/Window/open#Window_features)
28382 /// on MDN.
28383 ///
28384 /// There is no requirement for you to respect the values.  If your app does
28385 /// not have corresponding UI features (for example, no toolbar) or if all
28386 /// instance of WebView are opened in tabs and do not have distinct size or
28387 /// positions, then your app does not respect the values.  You may want to
28388 /// respect values, but perhaps only some apply to the UI of you app.
28389 /// Accordingly, you may respect all, some, or none of the properties as
28390 /// appropriate for your app.  For all numeric properties, if the value that is
28391 /// passed to `window.open` is outside the range of an unsigned 32bit int, the
28392 /// resulting value is the absolute value of the maximum for unsigned 32bit
28393 /// integer.  If you are not able to parse the value an integer, it is
28394 /// considered `0`.  If the value is a floating point value, it is rounded down
28395 /// to an integer.
28396 ///
28397 /// In runtime versions 98 or later, the values of `ShouldDisplayMenuBar`,
28398 /// `ShouldDisplayStatus`, `ShouldDisplayToolbar`, and `ShouldDisplayScrollBars`
28399 /// will not directly depend on the equivalent fields in the `windowFeatures`
28400 /// string.  Instead, they will all be false if the window is expected to be a
28401 /// popup, and true if it is not.
28402 const GUID IID_ICoreWebView2WindowFeatures = ICoreWebView2WindowFeatures.iid;
28403 
28404 interface ICoreWebView2WindowFeatures : IUnknown
28405 {
28406     static const GUID iid = { 0x5eaf559f,0xb46e,0x4397,[ 0x88,0x60,0xe4,0x22,0xf2,0x87,0xff,0x1e ] };
28407 
28408   /// Specifies left and top values.
28409 
28410   @(" propget")
28411 	HRESULT get_HasPosition(@("out, retval") BOOL* value);
28412 
28413   /// Specifies height and width values.
28414 
28415   @(" propget")
28416 	HRESULT get_HasSize(@("out, retval") BOOL* value);
28417 
28418   /// Specifies the left position of the window.   If `HasPosition` is set to
28419   /// `FALSE`, this field is ignored.
28420 
28421   @(" propget")
28422 	HRESULT get_Left(@("out, retval") UINT32* value);
28423 
28424   /// Specifies the top position of the window.   If `HasPosition` is set to
28425   /// `FALSE`, this field is ignored.
28426 
28427   @(" propget")
28428 	HRESULT get_Top(@("out, retval") UINT32* value);
28429 
28430   /// Specifies the height of the window.  Minimum value is `100`.  If
28431   /// `HasSize` is set to `FALSE`, this field is ignored.
28432 
28433   @(" propget")
28434 	HRESULT get_Height(@("out, retval") UINT32* value);
28435 
28436   /// Specifies the width of the window.  Minimum value is `100`.  If `HasSize`
28437   /// is set to `FALSE`, this field is ignored.
28438 
28439   @(" propget")
28440 	HRESULT get_Width(@("out, retval") UINT32* value);
28441 
28442   /// Indicates that the menu bar is displayed.
28443 
28444   @(" propget")
28445 	HRESULT get_ShouldDisplayMenuBar(@("out, retval") BOOL* value);
28446 
28447   /// Indicates that the status bar is displayed.
28448 
28449   @(" propget")
28450 	HRESULT get_ShouldDisplayStatus(@("out, retval") BOOL* value);
28451 
28452   /// Indicates that the browser toolbar is displayed.
28453 
28454   @(" propget")
28455 	HRESULT get_ShouldDisplayToolbar(@("out, retval") BOOL* value);
28456 
28457   /// Indicates that the scroll bars are displayed.
28458 
28459   @(" propget")
28460 	HRESULT get_ShouldDisplayScrollBars(@("out, retval") BOOL* value);
28461 }
28462 
28463 /// Receives `NewWindowRequested` events.
28464 const GUID IID_ICoreWebView2NewWindowRequestedEventHandler = ICoreWebView2NewWindowRequestedEventHandler.iid;
28465 
28466 interface ICoreWebView2NewWindowRequestedEventHandler : IUnknown
28467 {
28468     static const GUID iid = { 0xd4c185fe,0xc81c,0x4989,[ 0x97,0xaf,0x2d,0x3f,0xa7,0xab,0x56,0x51 ] };
28469 
28470   /// Provides the event args for the corresponding event.
28471 
28472   HRESULT Invoke(
28473       /+[in]+/ ICoreWebView2 sender,
28474       /+[in]+/ ICoreWebView2NewWindowRequestedEventArgs args);
28475 }
28476 
28477 /// Receives `DocumentTitleChanged` events.  Use the `DocumentTitle` property
28478 /// to get the modified title.
28479 
28480 const GUID IID_ICoreWebView2DocumentTitleChangedEventHandler = ICoreWebView2DocumentTitleChangedEventHandler.iid;
28481 
28482 interface ICoreWebView2DocumentTitleChangedEventHandler : IUnknown
28483 {
28484     static const GUID iid = { 0xf5f2b923,0x953e,0x4042,[ 0x9f,0x95,0xf3,0xa1,0x18,0xe1,0xaf,0xd4 ] };
28485 
28486   /// Provides the event args for the corresponding event.  No event args exist
28487   /// and the `args` parameter is set to `null`.
28488 
28489   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
28490 }
28491 
28492 /// Event args for the `AcceleratorKeyPressed` event.
28493 
28494 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventArgs = ICoreWebView2AcceleratorKeyPressedEventArgs.iid;
28495 
28496 interface ICoreWebView2AcceleratorKeyPressedEventArgs : IUnknown
28497 {
28498     static const GUID iid = { 0x9f760f8a,0xfb79,0x42be,[ 0x99,0x90,0x7b,0x56,0x90,0x0f,0xa9,0xc7 ] };
28499 
28500   /// The key event type that caused the event to run.
28501 
28502   @(" propget")
28503 	HRESULT get_KeyEventKind(@("out, retval") COREWEBVIEW2_KEY_EVENT_KIND* keyEventKind);
28504 
28505   /// The Win32 virtual key code of the key that was pressed or released.  It
28506   /// is one of the Win32 virtual key constants such as `VK_RETURN` or an
28507   /// (uppercase) ASCII value such as `A`.  Verify whether Ctrl or Alt
28508   /// are pressed by running `GetKeyState(VK_CONTROL)` or
28509   /// `GetKeyState(VK_MENU)`.
28510 
28511   @(" propget")
28512 	HRESULT get_VirtualKey(@("out, retval") UINT* virtualKey);
28513 
28514   /// The `LPARAM` value that accompanied the window message.  For more
28515   /// information, navigate to [WM_KEYDOWN](/windows/win32/inputdev/wm-keydown)
28516   /// and [WM_KEYUP](/windows/win32/inputdev/wm-keyup).
28517 
28518   @(" propget")
28519 	HRESULT get_KeyEventLParam(@("out, retval") INT* lParam);
28520 
28521   /// A structure representing the information passed in the `LPARAM` of the
28522   /// window message.
28523 
28524   @(" propget")
28525 	HRESULT get_PhysicalKeyStatus(
28526       @("out, retval") COREWEBVIEW2_PHYSICAL_KEY_STATUS* physicalKeyStatus);
28527 
28528   /// During `AcceleratorKeyPressedEvent` handler invocation the WebView is
28529   /// blocked waiting for the decision of if the accelerator is handled by the
28530   /// host (or not).  If the `Handled` property is set to `TRUE` then this
28531   /// prevents the WebView from performing the default action for this
28532   /// accelerator key.  Otherwise the WebView performs the default action for
28533   /// the accelerator key.
28534 
28535   @(" propget")
28536 	HRESULT get_Handled(@("out, retval") BOOL* handled);
28537 
28538   /// Sets the `Handled` property.
28539 
28540   @(" propput")
28541 	HRESULT put_Handled(in BOOL handled);
28542 }
28543 
28544 /// This is This is a continuation of the ICoreWebView2AcceleratorKeyPressedEventArgs interface.
28545 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventArgs2 = ICoreWebView2AcceleratorKeyPressedEventArgs2.iid;
28546 
28547 interface ICoreWebView2AcceleratorKeyPressedEventArgs2 : ICoreWebView2AcceleratorKeyPressedEventArgs
28548 {
28549     static const GUID iid = { 0x03b2c8c8,0x7799,0x4e34,[ 0xbd,0x66,0xed,0x26,0xaa,0x85,0xf2,0xbf ] };
28550   /// This property allows developers to enable or disable the browser from handling a specific
28551   /// browser accelerator key such as Ctrl+P or F3, etc.
28552   ///
28553   /// Browser accelerator keys are the keys/key combinations that access features specific to
28554   /// a web browser, including but not limited to:
28555   ///  - Ctrl-F and F3 for Find on Page
28556   ///  - Ctrl-P for Print
28557   ///  - Ctrl-R and F5 for Reload
28558   ///  - Ctrl-Plus and Ctrl-Minus for zooming
28559   ///  - Ctrl-Shift-C and F12 for DevTools
28560   ///  - Special keys for browser functions, such as Back, Forward, and Search
28561   ///
28562   /// This property does not disable accelerator keys related to movement and text editing,
28563   /// such as:
28564   ///  - Home, End, Page Up, and Page Down
28565   ///  - Ctrl-X, Ctrl-C, Ctrl-V
28566   ///  - Ctrl-A for Select All
28567   ///  - Ctrl-Z for Undo
28568   ///
28569   /// The `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` API is a convenient setting
28570   /// for developers to disable all the browser accelerator keys together, and sets the default
28571   /// value for the `IsBrowserAcceleratorKeyEnabled` property.
28572   /// By default, `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` is `TRUE` and
28573   /// `IsBrowserAcceleratorKeyEnabled` is `TRUE`.
28574   /// When developers change `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` setting to `FALSE`,
28575   /// this will change default value for `IsBrowserAcceleratorKeyEnabled` to `FALSE`.
28576   /// If developers want specific keys to be handled by the browser after changing the
28577   /// `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` setting to `FALSE`, they need to enable
28578   /// these keys by setting `IsBrowserAcceleratorKeyEnabled` to `TRUE`.
28579   /// This API will give the event arg higher priority over the
28580   /// `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` setting when we handle the keys.
28581   ///
28582   /// For browser accelerator keys, when an accelerator key is pressed, the propagation and
28583   /// processing order is:
28584   /// 1. A CoreWebView2Controller.AcceleratorKeyPressed event is raised
28585   /// 2. WebView2 browser feature accelerator key handling
28586   /// 3. Web Content Handling: If the key combination isn't reserved for browser actions,
28587   /// the key event propagates to the web content, where JavaScript event listeners can
28588   /// capture and respond to it.
28589   ///
28590   /// `ICoreWebView2AcceleratorKeyPressedEventArgs` has a `Handled` property, that developers
28591   /// can use to mark a key as handled. When the key is marked as handled anywhere along
28592   /// the path, the event propagation stops, and web content will not receive the key.
28593   /// With `IsBrowserAcceleratorKeyEnabled` property, if developers mark
28594   /// `IsBrowserAcceleratorKeyEnabled` as `FALSE`, the browser will skip the WebView2
28595   /// browser feature accelerator key handling process, but the event propagation
28596   /// continues, and web content will receive the key combination.
28597   ///
28598   /// \snippet ScenarioAcceleratorKeyPressed.cpp IsBrowserAcceleratorKeyEnabled
28599   /// Gets the `IsBrowserAcceleratorKeyEnabled` property.
28600   @(" propget")
28601 	HRESULT get_IsBrowserAcceleratorKeyEnabled(@("out, retval") BOOL* value);
28602 
28603   /// Sets the `IsBrowserAcceleratorKeyEnabled` property.
28604   @(" propput")
28605 	HRESULT put_IsBrowserAcceleratorKeyEnabled(in BOOL value);
28606 }
28607 
28608 /// Receives `AcceleratorKeyPressed` events.
28609 
28610 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventHandler = ICoreWebView2AcceleratorKeyPressedEventHandler.iid;
28611 
28612 interface ICoreWebView2AcceleratorKeyPressedEventHandler : IUnknown
28613 {
28614     static const GUID iid = { 0xb29c7e28,0xfa79,0x41a8,[ 0x8e,0x44,0x65,0x81,0x1c,0x76,0xdc,0xb2 ] };
28615 
28616   /// Provides the event args for the corresponding event.
28617 
28618   HRESULT Invoke(
28619       /+[in]+/ ICoreWebView2Controller sender,
28620       /+[in]+/ ICoreWebView2AcceleratorKeyPressedEventArgs args);
28621 }
28622 
28623 /// Receives `NewBrowserVersionAvailable` events.
28624 const GUID IID_ICoreWebView2NewBrowserVersionAvailableEventHandler = ICoreWebView2NewBrowserVersionAvailableEventHandler.iid;
28625 
28626 interface ICoreWebView2NewBrowserVersionAvailableEventHandler : IUnknown
28627 {
28628     static const GUID iid = { 0xf9a2976e,0xd34e,0x44fc,[ 0xad,0xee,0x81,0xb6,0xb5,0x7c,0xa9,0x14 ] };
28629 
28630   /// Provides the event args for the corresponding event.
28631 
28632   HRESULT Invoke(/+[in]+/ ICoreWebView2Environment sender,
28633                  /+[in]+/ IUnknown args);
28634 }
28635 
28636 /// Receives `BrowserProcessExited` events.
28637 const GUID IID_ICoreWebView2BrowserProcessExitedEventHandler = ICoreWebView2BrowserProcessExitedEventHandler.iid;
28638 
28639 interface ICoreWebView2BrowserProcessExitedEventHandler : IUnknown
28640 {
28641     static const GUID iid = { 0xfa504257,0xa216,0x4911,[ 0xa8,0x60,0xfe,0x88,0x25,0x71,0x28,0x61 ] };
28642   /// Provides the event args for the corresponding event.
28643   HRESULT Invoke(
28644       /+[in]+/ ICoreWebView2Environment sender,
28645       /+[in]+/ ICoreWebView2BrowserProcessExitedEventArgs args);
28646 }
28647 
28648 /// Receives `ContainsFullScreenElementChanged` events.
28649 
28650 const GUID IID_ICoreWebView2ContainsFullScreenElementChangedEventHandler = ICoreWebView2ContainsFullScreenElementChangedEventHandler.iid;
28651 
28652 interface ICoreWebView2ContainsFullScreenElementChangedEventHandler : IUnknown
28653 {
28654     static const GUID iid = { 0xe45d98b1,0xafef,0x45be,[ 0x8b,0xaf,0x6c,0x77,0x28,0x86,0x7f,0x73 ] };
28655 
28656   /// Provides the event args for the corresponding event.  No event args exist
28657   /// and the `args` parameter is set to `null`.
28658 
28659   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
28660 }
28661 
28662 /// Receives `WindowCloseRequested` events.
28663 const GUID IID_ICoreWebView2WindowCloseRequestedEventHandler = ICoreWebView2WindowCloseRequestedEventHandler.iid;
28664 
28665 interface ICoreWebView2WindowCloseRequestedEventHandler : IUnknown
28666 {
28667     static const GUID iid = { 0x5c19e9e0,0x092f,0x486b,[ 0xaf,0xfa,0xca,0x82,0x31,0x91,0x30,0x39 ] };
28668 
28669   /// Provides the event args for the corresponding event.  No event args exist
28670   /// and the `args` parameter is set to `null`.
28671 
28672   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
28673 }
28674 
28675 /// Receives `WebResourceResponseReceived` events.
28676 const GUID IID_ICoreWebView2WebResourceResponseReceivedEventHandler = ICoreWebView2WebResourceResponseReceivedEventHandler.iid;
28677 
28678 interface ICoreWebView2WebResourceResponseReceivedEventHandler : IUnknown
28679 {
28680     static const GUID iid = { 0x7DE9898A,0x24F5,0x40C3,[ 0xA2,0xDE,0xD4,0xF4,0x58,0xE6,0x98,0x28 ] };
28681   /// Provides the event args for the corresponding event.
28682   HRESULT Invoke(
28683       /+[in]+/ ICoreWebView2 sender,
28684       /+[in]+/ ICoreWebView2WebResourceResponseReceivedEventArgs args);
28685 }
28686 
28687 /// Event args for the `BrowserProcessExited` event.
28688 const GUID IID_ICoreWebView2BrowserProcessExitedEventArgs = ICoreWebView2BrowserProcessExitedEventArgs.iid;
28689 
28690 interface ICoreWebView2BrowserProcessExitedEventArgs : IUnknown
28691 {
28692     static const GUID iid = { 0x1f00663f,0xaf8c,0x4782,[ 0x9c,0xdd,0xdd,0x01,0xc5,0x2e,0x34,0xcb ] };
28693   /// The kind of browser process exit that has occurred.
28694   @(" propget")
28695 	HRESULT get_BrowserProcessExitKind(
28696       @("out, retval") COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND* browserProcessExitKind);
28697 
28698   /// The process ID of the browser process that has exited.
28699   @(" propget")
28700 	HRESULT get_BrowserProcessId(@("out, retval") UINT32* value);
28701 }
28702 
28703 /// Event args for the WebResourceResponseReceived event.
28704 const GUID IID_ICoreWebView2WebResourceResponseReceivedEventArgs = ICoreWebView2WebResourceResponseReceivedEventArgs.iid;
28705 
28706 interface ICoreWebView2WebResourceResponseReceivedEventArgs : IUnknown
28707 {
28708     static const GUID iid = { 0xD1DB483D,0x6796,0x4B8B,[ 0x80,0xFC,0x13,0x71,0x2B,0xB7,0x16,0xF4 ] };
28709   /// The request object for the web resource, as committed. This includes
28710   /// headers added by the network stack that were not be included during the
28711   /// associated WebResourceRequested event, such as Authentication headers.
28712   /// Modifications to this object have no effect on how the request is
28713   /// processed as it has already been sent.
28714   @(" propget")
28715 	HRESULT get_Request(@("out, retval") ICoreWebView2WebResourceRequest * request);
28716   /// View of the response object received for the web resource.
28717   @(" propget")
28718 	HRESULT get_Response(@("out, retval") ICoreWebView2WebResourceResponseView * response);
28719 }
28720 
28721 /// View of the HTTP representation for a web resource response. The properties
28722 /// of this object are not mutable. This response view is used with the
28723 /// WebResourceResponseReceived event.
28724 const GUID IID_ICoreWebView2WebResourceResponseView = ICoreWebView2WebResourceResponseView.iid;
28725 
28726 interface ICoreWebView2WebResourceResponseView : IUnknown
28727 {
28728     static const GUID iid = { 0x79701053,0x7759,0x4162,[ 0x8F,0x7D,0xF1,0xB3,0xF0,0x84,0x92,0x8D ] };
28729   /// The HTTP response headers as received.
28730   @(" propget")
28731 	HRESULT get_Headers(
28732       @("out, retval") ICoreWebView2HttpResponseHeaders * headers);
28733   /// The HTTP response status code.
28734   @(" propget")
28735 	HRESULT get_StatusCode(@("out, retval") int* statusCode);
28736   /// The HTTP response reason phrase.
28737   ///
28738   /// The caller must free the returned string with `CoTaskMemFree`.  See
28739   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28740   @(" propget")
28741 	HRESULT get_ReasonPhrase(@("out, retval") LPWSTR* reasonPhrase);
28742 
28743   /// Get the response content asynchronously. The handler will receive the
28744   /// response content stream.
28745   ///
28746   /// This method returns null if content size is more than 123MB or for navigations that become downloads
28747   /// or if response is downloadable content type (e.g., application/octet-stream).
28748   /// See `add_DownloadStarting` event to handle the response.
28749   ///
28750   /// If this method is being called again before a first call has completed,
28751   /// the handler will be invoked at the same time the handlers from prior calls
28752   /// are invoked.
28753   /// If this method is being called after a first call has completed, the
28754   /// handler will be invoked immediately.
28755   /// \snippet ScenarioWebViewEventMonitor.cpp GetContent
28756   HRESULT GetContent(
28757       /+[in]+/ ICoreWebView2WebResourceResponseViewGetContentCompletedHandler handler);
28758 }
28759 
28760 /// Receives the result of the
28761 /// `ICoreWebView2WebResourceResponseView::GetContent` method.
28762 const GUID IID_ICoreWebView2WebResourceResponseViewGetContentCompletedHandler = ICoreWebView2WebResourceResponseViewGetContentCompletedHandler.iid;
28763 
28764 interface ICoreWebView2WebResourceResponseViewGetContentCompletedHandler : IUnknown
28765 {
28766     static const GUID iid = { 0x875738E1,0x9FA2,0x40E3,[ 0x8B,0x74,0x2E,0x89,0x72,0xDD,0x6F,0xE7 ] };
28767   /// Provides the completion status and result of the corresponding
28768   /// asynchronous method call. A failure `errorCode` will be passed if the
28769   /// content failed to load. `E_ABORT` means the response loading was blocked
28770   /// (e.g., by CORS policy); `ERROR_CANCELLED` means the response loading was
28771   /// cancelled. `ERROR_NO_DATA` means the response has no content data,
28772   /// `content` is `null` in this case. Note content (if any) is ignored for
28773   /// redirects, 204 No Content, 205 Reset Content, and HEAD-request responses.
28774   HRESULT Invoke(in HRESULT errorCode, in IStream* content);
28775 }
28776 
28777 /// Event args for the DOMContentLoaded event.
28778 const GUID IID_ICoreWebView2DOMContentLoadedEventArgs = ICoreWebView2DOMContentLoadedEventArgs.iid;
28779 
28780 interface ICoreWebView2DOMContentLoadedEventArgs : IUnknown
28781 {
28782     static const GUID iid = { 0x16B1E21A,0xC503,0x44F2,[ 0x84,0xC9,0x70,0xAB,0xA5,0x03,0x12,0x83 ] };
28783   /// The ID of the navigation which corresponds to other navigation ID properties on other navigation events.
28784   @(" propget")
28785 	HRESULT get_NavigationId(@("out, retval") UINT64* navigationId);
28786 }
28787 
28788 /// Receives `DOMContentLoaded` events.
28789 const GUID IID_ICoreWebView2DOMContentLoadedEventHandler = ICoreWebView2DOMContentLoadedEventHandler.iid;
28790 
28791 interface ICoreWebView2DOMContentLoadedEventHandler : IUnknown
28792 {
28793     static const GUID iid = { 0x4BAC7E9C,0x199E,0x49ED,[ 0x87,0xED,0x24,0x93,0x03,0xAC,0xF0,0x19 ] };
28794   /// Provides the event args for the corresponding event.
28795   HRESULT Invoke(
28796       /+[in]+/ ICoreWebView2 sender,
28797       /+[in]+/ ICoreWebView2DOMContentLoadedEventArgs args);
28798 }
28799 
28800 /// Provides a set of properties that are used to manage an
28801 /// ICoreWebView2Cookie.
28802 ///
28803 /// \snippet ScenarioCookieManagement.cpp CookieObject
28804 const GUID IID_ICoreWebView2Cookie = ICoreWebView2Cookie.iid;
28805 
28806 interface ICoreWebView2Cookie : IUnknown
28807 {
28808     static const GUID iid = { 0xAD26D6BE,0x1486,0x43E6,[ 0xBF,0x87,0xA2,0x03,0x40,0x06,0xCA,0x21 ] };
28809   /// Cookie name.
28810   ///
28811   /// The caller must free the returned string with `CoTaskMemFree`.  See
28812   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28813   @(" propget")
28814 	HRESULT get_Name(@("out, retval") LPWSTR* name);
28815 
28816   /// Cookie value.
28817   ///
28818   /// The caller must free the returned string with `CoTaskMemFree`.  See
28819   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28820   @(" propget")
28821 	HRESULT get_Value(@("out, retval") LPWSTR* value);
28822   /// Set the cookie value property.
28823   @(" propput")
28824 	HRESULT put_Value(in LPCWSTR value);
28825 
28826   /// The domain for which the cookie is valid.
28827   /// The default is the host that this cookie has been received from.
28828   /// Note that, for instance, ".bing.com", "bing.com", and "www.bing.com" are
28829   /// considered different domains.
28830   ///
28831   /// The caller must free the returned string with `CoTaskMemFree`.  See
28832   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28833   @(" propget")
28834 	HRESULT get_Domain(@("out, retval") LPWSTR* domain);
28835 
28836   /// The path for which the cookie is valid. The default is "/", which means
28837   /// this cookie will be sent to all pages on the Domain.
28838   ///
28839   /// The caller must free the returned string with `CoTaskMemFree`.  See
28840   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28841   @(" propget")
28842 	HRESULT get_Path(@("out, retval") LPWSTR* path);
28843 
28844   /// The expiration date and time for the cookie as the number of seconds since the UNIX epoch.
28845   /// The default is -1.0, which means cookies are session cookies by default.
28846   @(" propget")
28847 	HRESULT get_Expires(@("out, retval") double* expires);
28848   /// Set the Expires property. Cookies are session cookies and will not be
28849   /// persistent if Expires is set to -1.0. NaN, infinity, and any negative
28850   /// value set other than -1.0 is disallowed.
28851   @(" propput")
28852 	HRESULT put_Expires(in double expires);
28853 
28854   /// Whether this cookie is http-only.
28855   /// True if a page script or other active content cannot access this
28856   /// cookie. The default is false.
28857   @(" propget")
28858 	HRESULT get_IsHttpOnly(@("out, retval") BOOL* isHttpOnly);
28859   /// Set the IsHttpOnly property.
28860   @(" propput")
28861 	HRESULT put_IsHttpOnly(in BOOL isHttpOnly);
28862 
28863   /// SameSite status of the cookie which represents the enforcement mode of the cookie.
28864   /// The default is COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX.
28865   @(" propget")
28866 	HRESULT get_SameSite(@("out, retval") COREWEBVIEW2_COOKIE_SAME_SITE_KIND* sameSite);
28867   /// Set the SameSite property.
28868   @(" propput")
28869 	HRESULT put_SameSite(in COREWEBVIEW2_COOKIE_SAME_SITE_KIND sameSite);
28870 
28871   /// The security level of this cookie. True if the client is only to return
28872   /// the cookie in subsequent requests if those requests use HTTPS.
28873   /// The default is false.
28874   /// Note that cookie that requests COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE but
28875   /// is not marked Secure will be rejected.
28876   @(" propget")
28877 	HRESULT get_IsSecure(@("out, retval") BOOL* isSecure);
28878   /// Set the IsSecure property.
28879   @(" propput")
28880 	HRESULT put_IsSecure(in BOOL isSecure);
28881 
28882   /// Whether this is a session cookie. The default is false.
28883   @(" propget")
28884 	HRESULT get_IsSession(@("out, retval") BOOL* isSession);
28885 }
28886 
28887 /// Creates, adds or updates, gets, or or view the cookies. The changes would
28888 /// apply to the context of the user profile. That is, other WebViews under the
28889 /// same user profile could be affected.
28890 const GUID IID_ICoreWebView2CookieManager = ICoreWebView2CookieManager.iid;
28891 
28892 interface ICoreWebView2CookieManager : IUnknown
28893 {
28894     static const GUID iid = { 0x177CD9E7,0xB6F5,0x451A,[ 0x94,0xA0,0x5D,0x7A,0x3A,0x4C,0x41,0x41 ] };
28895   /// Create a cookie object with a specified name, value, domain, and path.
28896   /// One can set other optional properties after cookie creation.
28897   /// This only creates a cookie object and it is not added to the cookie
28898   /// manager until you call AddOrUpdateCookie.
28899   /// Leading or trailing whitespace(s), empty string, and special characters
28900   /// are not allowed for name.
28901   /// See ICoreWebView2Cookie for more details.
28902   HRESULT CreateCookie(
28903     in LPCWSTR name,
28904     in LPCWSTR value,
28905     in LPCWSTR domain,
28906     in LPCWSTR path,
28907     @("out, retval") ICoreWebView2Cookie * cookie);
28908 
28909   /// Creates a cookie whose params matches those of the specified cookie.
28910   HRESULT CopyCookie(
28911     /+[in]+/ ICoreWebView2Cookie cookieParam,
28912     @("out, retval") ICoreWebView2Cookie * cookie);
28913 
28914   /// Gets a list of cookies matching the specific URI.
28915   /// If uri is empty string or null, all cookies under the same profile are
28916   /// returned.
28917   /// You can modify the cookie objects by calling
28918   /// ICoreWebView2CookieManager::AddOrUpdateCookie, and the changes
28919   /// will be applied to the webview.
28920   /// \snippet ScenarioCookieManagement.cpp GetCookies
28921   HRESULT GetCookies(
28922     in LPCWSTR uri,
28923     /+[in]+/ ICoreWebView2GetCookiesCompletedHandler handler);
28924 
28925   /// Adds or updates a cookie with the given cookie data; may overwrite
28926   /// cookies with matching name, domain, and path if they exist.
28927   /// This method will fail if the domain of the given cookie is not specified.
28928   /// \snippet ScenarioCookieManagement.cpp AddOrUpdateCookie
28929   HRESULT AddOrUpdateCookie(/+[in]+/ ICoreWebView2Cookie cookie);
28930 
28931   /// Deletes a cookie whose name and domain/path pair
28932   /// match those of the specified cookie.
28933   HRESULT DeleteCookie(/+[in]+/ ICoreWebView2Cookie cookie);
28934 
28935   /// Deletes cookies with matching name and uri.
28936   /// Cookie name is required.
28937   /// All cookies with the given name where domain
28938   /// and path match provided URI are deleted.
28939   HRESULT DeleteCookies(in LPCWSTR name, in LPCWSTR uri);
28940 
28941   /// Deletes cookies with matching name and domain/path pair.
28942   /// Cookie name is required.
28943   /// If domain is specified, deletes only cookies with the exact domain.
28944   /// If path is specified, deletes only cookies with the exact path.
28945   HRESULT DeleteCookiesWithDomainAndPath(in LPCWSTR name, in LPCWSTR domain, in LPCWSTR path);
28946 
28947   /// Deletes all cookies under the same profile.
28948   /// This could affect other WebViews under the same user profile.
28949   HRESULT DeleteAllCookies();
28950 }
28951 
28952 /// A list of cookie objects. See `ICoreWebView2Cookie`.
28953 /// \snippet ScenarioCookieManagement.cpp GetCookies
28954 const GUID IID_ICoreWebView2CookieList = ICoreWebView2CookieList.iid;
28955 
28956 interface ICoreWebView2CookieList : IUnknown
28957 {
28958     static const GUID iid = { 0xF7F6F714,0x5D2A,0x43C6,[ 0x95,0x03,0x34,0x6E,0xCE,0x02,0xD1,0x86 ] };
28959   /// The number of cookies contained in the ICoreWebView2CookieList.
28960   @(" propget")
28961 	HRESULT get_Count(@("out, retval") UINT* count);
28962 
28963   /// Gets the cookie object at the given index.
28964   HRESULT GetValueAtIndex(in UINT index,
28965 		@("out, retval") ICoreWebView2Cookie * cookie);
28966 }
28967 
28968 /// Receives the result of the `GetCookies` method.  The result is written to
28969 /// the cookie list provided in the `GetCookies` method call.
28970 const GUID IID_ICoreWebView2GetCookiesCompletedHandler = ICoreWebView2GetCookiesCompletedHandler.iid;
28971 
28972 interface ICoreWebView2GetCookiesCompletedHandler : IUnknown
28973 {
28974     static const GUID iid = { 0x5A4F5069,0x5C15,0x47C3,[ 0x86,0x46,0xF4,0xDE,0x1C,0x11,0x66,0x70 ] };
28975   /// Provides the completion status of the corresponding asynchronous method
28976   /// call.
28977   HRESULT Invoke(HRESULT result, ICoreWebView2CookieList cookieList);
28978 }
28979 
28980 /// Provides access to the client certificate metadata.
28981 const GUID IID_ICoreWebView2ClientCertificate = ICoreWebView2ClientCertificate.iid;
28982 
28983 interface ICoreWebView2ClientCertificate : IUnknown
28984 {
28985     static const GUID iid = { 0xe7188076,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
28986   /// Subject of the certificate.
28987   ///
28988   /// The caller must free the returned string with `CoTaskMemFree`. See
28989   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28990   @(" propget")
28991 	HRESULT get_Subject(@("out, retval") LPWSTR* value);
28992   /// Name of the certificate authority that issued the certificate.
28993   ///
28994   /// The caller must free the returned string with `CoTaskMemFree`. See
28995   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28996   @(" propget")
28997 	HRESULT get_Issuer(@("out, retval") LPWSTR* value);
28998   /// The valid start date and time for the certificate as the number of seconds since
28999   /// the UNIX epoch.
29000   @(" propget")
29001 	HRESULT get_ValidFrom(@("out, retval") double* value);
29002   /// The valid expiration date and time for the certificate as the number of seconds since
29003   /// the UNIX epoch.
29004   @(" propget")
29005 	HRESULT get_ValidTo(@("out, retval") double* value);
29006   /// Base64 encoding of DER encoded serial number of the certificate.
29007   /// Read more about DER at [RFC 7468 DER]
29008   /// (https://tools.ietf.org/html/rfc7468#appendix-B).
29009   ///
29010   /// The caller must free the returned string with `CoTaskMemFree`. See
29011   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29012   @(" propget")
29013 	HRESULT get_DerEncodedSerialNumber(@("out, retval") LPWSTR* value);
29014   /// Display name for a certificate.
29015   ///
29016   /// The caller must free the returned string with `CoTaskMemFree`. See
29017   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29018   @(" propget")
29019 	HRESULT get_DisplayName(@("out, retval") LPWSTR* value);
29020   /// PEM encoded data for the certificate.
29021   /// Returns Base64 encoding of DER encoded certificate.
29022   /// Read more about PEM at [RFC 1421 Privacy Enhanced Mail]
29023   /// (https://tools.ietf.org/html/rfc1421).
29024   ///
29025   /// The caller must free the returned string with `CoTaskMemFree`. See
29026   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29027   HRESULT ToPemEncoding(@("out, retval") LPWSTR* pemEncodedData);
29028   /// Collection of PEM encoded client certificate issuer chain.
29029   /// In this collection first element is the current certificate followed by
29030   /// intermediate1, intermediate2...intermediateN-1. Root certificate is the
29031   /// last element in collection.
29032   @(" propget")
29033 	HRESULT get_PemEncodedIssuerCertificateChain(@("out, retval")
29034       ICoreWebView2StringCollection * value);
29035   /// Kind of a certificate (eg., smart card, pin, other).
29036   @(" propget")
29037 	HRESULT get_Kind(@("out, retval")
29038       COREWEBVIEW2_CLIENT_CERTIFICATE_KIND* value);
29039 }
29040 
29041 /// A collection of client certificate object.
29042 const GUID IID_ICoreWebView2ClientCertificateCollection = ICoreWebView2ClientCertificateCollection.iid;
29043 
29044 interface ICoreWebView2ClientCertificateCollection : IUnknown
29045 {
29046     static const GUID iid = { 0xef5674d2,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
29047   /// The number of client certificates contained in the
29048   /// ICoreWebView2ClientCertificateCollection.
29049   @(" propget")
29050 	HRESULT get_Count(@("out, retval") UINT* value);
29051   /// Gets the certificate object at the given index.
29052   HRESULT GetValueAtIndex(in UINT index,
29053       @("out, retval") ICoreWebView2ClientCertificate * certificate);
29054 }
29055 
29056 /// A collection of strings.
29057 const GUID IID_ICoreWebView2StringCollection = ICoreWebView2StringCollection.iid;
29058 
29059 interface ICoreWebView2StringCollection : IUnknown
29060 {
29061     static const GUID iid = { 0xf41f3f8a,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
29062   /// The number of strings contained in ICoreWebView2StringCollection.
29063   @(" propget")
29064 	HRESULT get_Count(@("out, retval") UINT* value);
29065 
29066   /// Gets the value at a given index.
29067   ///
29068   /// The caller must free the returned string with `CoTaskMemFree`.  See
29069   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29070   HRESULT GetValueAtIndex(in UINT index,
29071 		@("out, retval") LPWSTR* value);
29072 }
29073 
29074 /// An event handler for the `ClientCertificateRequested` event.
29075 const GUID IID_ICoreWebView2ClientCertificateRequestedEventHandler = ICoreWebView2ClientCertificateRequestedEventHandler.iid;
29076 
29077 interface ICoreWebView2ClientCertificateRequestedEventHandler : IUnknown
29078 {
29079     static const GUID iid = { 0xd7175ba2,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
29080   /// Provides the event args for the corresponding event.
29081   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender,
29082       /+[in]+/ ICoreWebView2ClientCertificateRequestedEventArgs args);
29083 }
29084 
29085 /// Event args for the `ClientCertificateRequested` event.
29086 const GUID IID_ICoreWebView2ClientCertificateRequestedEventArgs = ICoreWebView2ClientCertificateRequestedEventArgs.iid;
29087 
29088 interface ICoreWebView2ClientCertificateRequestedEventArgs : IUnknown
29089 {
29090     static const GUID iid = { 0xbc59db28,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
29091   /// Host name of the server that requested client certificate authentication.
29092   /// Normalization rules applied to the hostname are:
29093   /// * Convert to lowercase characters for ascii characters.
29094   /// * Punycode is used for representing non ascii characters.
29095   /// * Strip square brackets for IPV6 address.
29096   ///
29097   /// The caller must free the returned string with `CoTaskMemFree`. See
29098   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29099   @(" propget")
29100 	HRESULT get_Host(@("out, retval") LPWSTR* value);
29101 
29102   /// Port of the server that requested client certificate authentication.
29103   @(" propget")
29104 	HRESULT get_Port(@("out, retval") int* value);
29105 
29106   /// Returns true if the server that issued this request is an http proxy.
29107   /// Returns false if the server is the origin server.
29108   @(" propget")
29109 	HRESULT get_IsProxy(@("out, retval") BOOL* value);
29110 
29111   /// Returns the `ICoreWebView2StringCollection`.
29112   /// The collection contains Base64 encoding of DER encoded distinguished names of
29113   /// certificate authorities allowed by the server.
29114   @(" propget")
29115 	HRESULT get_AllowedCertificateAuthorities(@("out, retval")
29116       ICoreWebView2StringCollection * value);
29117 
29118   /// Returns the `ICoreWebView2ClientCertificateCollection` when client
29119   /// certificate authentication is requested. The collection contains mutually
29120   /// trusted CA certificates.
29121   @(" propget")
29122 	HRESULT get_MutuallyTrustedCertificates(@("out, retval")
29123       ICoreWebView2ClientCertificateCollection * value);
29124 
29125   /// Returns the selected certificate.
29126   @(" propget")
29127 	HRESULT get_SelectedCertificate(@("out, retval")
29128       ICoreWebView2ClientCertificate * value);
29129 
29130   /// Sets the certificate to respond to the server.
29131   @(" propput")
29132 	HRESULT put_SelectedCertificate(
29133       /+[in]+/ ICoreWebView2ClientCertificate value);
29134 
29135   /// You may set this flag to cancel the certificate selection. If canceled,
29136   /// the request is aborted regardless of the `Handled` property. By default the
29137   /// value is `FALSE`.
29138   @(" propget")
29139 	HRESULT get_Cancel(@("out, retval") BOOL* value);
29140 
29141   /// Sets the `Cancel` property.
29142   @(" propput")
29143 	HRESULT put_Cancel(in BOOL value);
29144 
29145   /// You may set this flag to `TRUE` to respond to the server with or
29146   /// without a certificate. If this flag is `TRUE` with a `SelectedCertificate`
29147   /// it responds to the server with the selected certificate otherwise respond to the
29148   /// server without a certificate. By default the value of `Handled` and `Cancel` are `FALSE`
29149   /// and display default client certificate selection dialog prompt to allow the user to
29150   /// choose a certificate. The `SelectedCertificate` is ignored unless `Handled` is set `TRUE`.
29151   @(" propget")
29152 	HRESULT get_Handled(@("out, retval") BOOL* value);
29153 
29154   /// Sets the `Handled` property.
29155   @(" propput")
29156 	HRESULT put_Handled(in BOOL value);
29157 
29158   /// Returns an `ICoreWebView2Deferral` object. Use this operation to
29159   /// complete the event at a later time.
29160   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
29161 }
29162 
29163 /// This mostly represents a combined win32
29164 /// POINTER_INFO/POINTER_TOUCH_INFO/POINTER_PEN_INFO object. It takes fields
29165 /// from all three and excludes some win32 specific data types like HWND and
29166 /// HANDLE. Note, sourceDevice is taken out but we expect the PointerDeviceRect
29167 /// and DisplayRect to cover the existing use cases of sourceDevice.
29168 /// Another big difference is that any of the point or rect locations are
29169 /// expected to be in WebView physical coordinates. That is, coordinates
29170 /// relative to the WebView and no DPI scaling applied.
29171 //
29172 // The PointerId, PointerFlags, ButtonChangeKind, PenFlags, PenMask, TouchFlags,
29173 // and TouchMask are all #defined flags or enums in the
29174 // POINTER_INFO/POINTER_TOUCH_INFO/POINTER_PEN_INFO structure. We define those
29175 // properties here as UINT32 or INT32 and expect the developer to know how to
29176 // populate those values based on the Windows definitions.
29177 const GUID IID_ICoreWebView2PointerInfo = ICoreWebView2PointerInfo.iid;
29178 
29179 interface ICoreWebView2PointerInfo : IUnknown
29180 {
29181     static const GUID iid = { 0xe6995887,0xd10d,0x4f5d,[ 0x93,0x59,0x4c,0xe4,0x6e,0x4f,0x96,0xb9 ] };
29182   /// Get the PointerKind of the pointer event. This corresponds to the
29183   /// pointerKind property of the POINTER_INFO struct. The values are defined by
29184   /// the POINTER_INPUT_KIND enum in the Windows SDK (winuser.h). Supports
29185   /// PT_PEN and PT_TOUCH.
29186   @(" propget")
29187 	HRESULT get_PointerKind(@("out, retval") DWORD* pointerKind);
29188   /// Set the PointerKind of the pointer event. This corresponds to the
29189   /// pointerKind property of the POINTER_INFO struct. The values are defined by
29190   /// the POINTER_INPUT_KIND enum in the Windows SDK (winuser.h). Supports
29191   /// PT_PEN and PT_TOUCH.
29192   @(" propput")
29193 	HRESULT put_PointerKind(in DWORD pointerKind);
29194 
29195   /// Get the PointerId of the pointer event. This corresponds to the pointerId
29196   /// property of the POINTER_INFO struct as defined in the Windows SDK
29197   /// (winuser.h).
29198   @(" propget")
29199 	HRESULT get_PointerId(@("out, retval") UINT32* pointerId);
29200   /// Set the PointerId of the pointer event. This corresponds to the pointerId
29201   /// property of the POINTER_INFO struct as defined in the Windows SDK
29202   /// (winuser.h).
29203   @(" propput")
29204 	HRESULT put_PointerId(in UINT32 pointerId);
29205 
29206   /// Get the FrameID of the pointer event. This corresponds to the frameId
29207   /// property of the POINTER_INFO struct as defined in the Windows SDK
29208   /// (winuser.h).
29209   @(" propget")
29210 	HRESULT get_FrameId(@("out, retval") UINT32* frameId);
29211   /// Set the FrameID of the pointer event. This corresponds to the frameId
29212   /// property of the POINTER_INFO struct as defined in the Windows SDK
29213   /// (winuser.h).
29214   @(" propput")
29215 	HRESULT put_FrameId(in UINT32 frameId);
29216 
29217   /// Get the PointerFlags of the pointer event. This corresponds to the
29218   /// pointerFlags property of the POINTER_INFO struct. The values are defined
29219   /// by the POINTER_FLAGS constants in the Windows SDK (winuser.h).
29220   @(" propget")
29221 	HRESULT get_PointerFlags(@("out, retval") UINT32* pointerFlags);
29222   /// Set the PointerFlags of the pointer event. This corresponds to the
29223   /// pointerFlags property of the POINTER_INFO struct. The values are defined
29224   /// by the POINTER_FLAGS constants in the Windows SDK (winuser.h).
29225   @(" propput")
29226 	HRESULT put_PointerFlags(in UINT32 pointerFlags);
29227 
29228   /// Get the PointerDeviceRect of the sourceDevice property of the
29229   /// POINTER_INFO struct as defined in the Windows SDK (winuser.h).
29230   @(" propget")
29231 	HRESULT get_PointerDeviceRect(@("out, retval") RECT* pointerDeviceRect);
29232   /// Set the PointerDeviceRect of the sourceDevice property of the
29233   /// POINTER_INFO struct as defined in the Windows SDK (winuser.h).
29234   @(" propput")
29235 	HRESULT put_PointerDeviceRect(in RECT pointerDeviceRect);
29236 
29237   /// Get the DisplayRect of the sourceDevice property of the POINTER_INFO
29238   /// struct as defined in the Windows SDK (winuser.h).
29239   @(" propget")
29240 	HRESULT get_DisplayRect(@("out, retval") RECT* displayRect);
29241   /// Set the DisplayRect of the sourceDevice property of the POINTER_INFO
29242   /// struct as defined in the Windows SDK (winuser.h).
29243   @(" propput")
29244 	HRESULT put_DisplayRect(in RECT displayRect);
29245 
29246   /// Get the PixelLocation of the pointer event. This corresponds to the
29247   /// ptPixelLocation property of the POINTER_INFO struct as defined in the
29248   /// Windows SDK (winuser.h).
29249   @(" propget")
29250 	HRESULT get_PixelLocation(@("out, retval") POINT* pixelLocation);
29251   /// Set the PixelLocation of the pointer event. This corresponds to the
29252   /// ptPixelLocation property of the POINTER_INFO struct as defined in the
29253   /// Windows SDK (winuser.h).
29254   @(" propput")
29255 	HRESULT put_PixelLocation(in POINT pixelLocation);
29256 
29257   /// Get the HimetricLocation of the pointer event. This corresponds to the
29258   /// ptHimetricLocation property of the POINTER_INFO struct as defined in the
29259   /// Windows SDK (winuser.h).
29260   @(" propget")
29261 	HRESULT get_HimetricLocation(@("out, retval") POINT* himetricLocation);
29262   /// Set the HimetricLocation of the pointer event. This corresponds to the
29263   /// ptHimetricLocation property of the POINTER_INFO struct as defined in the
29264   /// Windows SDK (winuser.h).
29265   @(" propput")
29266 	HRESULT put_HimetricLocation(in POINT himetricLocation);
29267 
29268   /// Get the PixelLocationRaw of the pointer event. This corresponds to the
29269   /// ptPixelLocationRaw property of the POINTER_INFO struct as defined in the
29270   /// Windows SDK (winuser.h).
29271   @(" propget")
29272 	HRESULT get_PixelLocationRaw(@("out, retval") POINT* pixelLocationRaw);
29273   /// Set the PixelLocationRaw of the pointer event. This corresponds to the
29274   /// ptPixelLocationRaw property of the POINTER_INFO struct as defined in the
29275   /// Windows SDK (winuser.h).
29276   @(" propput")
29277 	HRESULT put_PixelLocationRaw(in POINT pixelLocationRaw);
29278 
29279   /// Get the HimetricLocationRaw of the pointer event. This corresponds to the
29280   /// ptHimetricLocationRaw property of the POINTER_INFO struct as defined in
29281   /// the Windows SDK (winuser.h).
29282   @(" propget")
29283 	HRESULT get_HimetricLocationRaw(@("out, retval") POINT* himetricLocationRaw);
29284   /// Set the HimetricLocationRaw of the pointer event. This corresponds to the
29285   /// ptHimetricLocationRaw property of the POINTER_INFO struct as defined in
29286   /// the Windows SDK (winuser.h).
29287   @(" propput")
29288 	HRESULT put_HimetricLocationRaw(in POINT himetricLocationRaw);
29289 
29290   /// Get the Time of the pointer event. This corresponds to the dwTime property
29291   /// of the POINTER_INFO struct as defined in the Windows SDK (winuser.h).
29292   @(" propget")
29293 	HRESULT get_Time(@("out, retval") DWORD* time);
29294   /// Set the Time of the pointer event. This corresponds to the dwTime property
29295   /// of the POINTER_INFO struct as defined in the Windows SDK (winuser.h).
29296   @(" propput")
29297 	HRESULT put_Time(in DWORD time);
29298 
29299   /// Get the HistoryCount of the pointer event. This corresponds to the
29300   /// historyCount property of the POINTER_INFO struct as defined in the Windows
29301   /// SDK (winuser.h).
29302   @(" propget")
29303 	HRESULT get_HistoryCount(@("out, retval") UINT32* historyCount);
29304   /// Set the HistoryCount of the pointer event. This corresponds to the
29305   /// historyCount property of the POINTER_INFO struct as defined in the Windows
29306   /// SDK (winuser.h).
29307   @(" propput")
29308 	HRESULT put_HistoryCount(in UINT32 historyCount);
29309 
29310   /// Get the InputData of the pointer event. This corresponds to the InputData
29311   /// property of the POINTER_INFO struct as defined in the Windows SDK
29312   /// (winuser.h).
29313   @(" propget")
29314 	HRESULT get_InputData(@("out, retval") INT32* inputData);
29315   /// Set the InputData of the pointer event. This corresponds to the InputData
29316   /// property of the POINTER_INFO struct as defined in the Windows SDK
29317   /// (winuser.h).
29318   @(" propput")
29319 	HRESULT put_InputData(in INT32 inputData);
29320 
29321   /// Get the KeyStates of the pointer event. This corresponds to the
29322   /// dwKeyStates property of the POINTER_INFO struct as defined in the Windows
29323   /// SDK (winuser.h).
29324   @(" propget")
29325 	HRESULT get_KeyStates(@("out, retval") DWORD* keyStates);
29326   /// Set the KeyStates of the pointer event. This corresponds to the
29327   /// dwKeyStates property of the POINTER_INFO struct as defined in the Windows
29328   /// SDK (winuser.h).
29329   @(" propput")
29330 	HRESULT put_KeyStates(in DWORD keyStates);
29331 
29332   /// Get the PerformanceCount of the pointer event. This corresponds to the
29333   /// PerformanceCount property of the POINTER_INFO struct as defined in the
29334   /// Windows SDK (winuser.h).
29335   @(" propget")
29336 	HRESULT get_PerformanceCount(@("out, retval") UINT64* performanceCount);
29337   /// Set the PerformanceCount of the pointer event. This corresponds to the
29338   /// PerformanceCount property of the POINTER_INFO struct as defined in the
29339   /// Windows SDK (winuser.h).
29340   @(" propput")
29341 	HRESULT put_PerformanceCount(in UINT64 performanceCount);
29342 
29343   /// Get the ButtonChangeKind of the pointer event. This corresponds to the
29344   /// ButtonChangeKind property of the POINTER_INFO struct. The values are
29345   /// defined by the POINTER_BUTTON_CHANGE_KIND enum in the Windows SDK
29346   /// (winuser.h).
29347   @(" propget")
29348 	HRESULT get_ButtonChangeKind(@("out, retval") INT32* buttonChangeKind);
29349   /// Set the ButtonChangeKind of the pointer event. This corresponds to the
29350   /// ButtonChangeKind property of the POINTER_INFO struct. The values are
29351   /// defined by the POINTER_BUTTON_CHANGE_KIND enum in the Windows SDK
29352   /// (winuser.h).
29353   @(" propput")
29354 	HRESULT put_ButtonChangeKind(in INT32 buttonChangeKind);
29355 
29356   // Pen specific attributes
29357 
29358   /// Get the PenFlags of the pointer event. This corresponds to the penFlags
29359   /// property of the POINTER_PEN_INFO struct. The values are defined by the
29360   /// PEN_FLAGS constants in the Windows SDK (winuser.h).
29361   @(" propget")
29362 	HRESULT get_PenFlags(@("out, retval") UINT32* penFLags);
29363   /// Set the PenFlags of the pointer event. This corresponds to the penFlags
29364   /// property of the POINTER_PEN_INFO struct. The values are defined by the
29365   /// PEN_FLAGS constants in the Windows SDK (winuser.h).
29366   @(" propput")
29367 	HRESULT put_PenFlags(in UINT32 penFLags);
29368 
29369   /// Get the PenMask of the pointer event. This corresponds to the penMask
29370   /// property of the POINTER_PEN_INFO struct. The values are defined by the
29371   /// PEN_MASK constants in the Windows SDK (winuser.h).
29372   @(" propget")
29373 	HRESULT get_PenMask(@("out, retval") UINT32* penMask);
29374   /// Set the PenMask of the pointer event. This corresponds to the penMask
29375   /// property of the POINTER_PEN_INFO struct. The values are defined by the
29376   /// PEN_MASK constants in the Windows SDK (winuser.h).
29377   @(" propput")
29378 	HRESULT put_PenMask(in UINT32 penMask);
29379 
29380   /// Get the PenPressure of the pointer event. This corresponds to the pressure
29381   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
29382   /// (winuser.h).
29383   @(" propget")
29384 	HRESULT get_PenPressure(@("out, retval") UINT32* penPressure);
29385   /// Set the PenPressure of the pointer event. This corresponds to the pressure
29386   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
29387   /// (winuser.h).
29388   @(" propput")
29389 	HRESULT put_PenPressure(in UINT32 penPressure);
29390 
29391   /// Get the PenRotation of the pointer event. This corresponds to the rotation
29392   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
29393   /// (winuser.h).
29394   @(" propget")
29395 	HRESULT get_PenRotation(@("out, retval") UINT32* penRotation);
29396   /// Set the PenRotation of the pointer event. This corresponds to the rotation
29397   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
29398   /// (winuser.h).
29399   @(" propput")
29400 	HRESULT put_PenRotation(in UINT32 penRotation);
29401 
29402   /// Get the PenTiltX of the pointer event. This corresponds to the tiltX
29403   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
29404   /// (winuser.h).
29405   @(" propget")
29406 	HRESULT get_PenTiltX(@("out, retval") INT32* penTiltX);
29407   /// Set the PenTiltX of the pointer event. This corresponds to the tiltX
29408   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
29409   /// (winuser.h).
29410   @(" propput")
29411 	HRESULT put_PenTiltX(in INT32 penTiltX);
29412 
29413   /// Get the PenTiltY of the pointer event. This corresponds to the tiltY
29414   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
29415   /// (winuser.h).
29416   @(" propget")
29417 	HRESULT get_PenTiltY(@("out, retval") INT32* penTiltY);
29418   /// Set the PenTiltY of the pointer event. This corresponds to the tiltY
29419   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
29420   /// (winuser.h).
29421   @(" propput")
29422 	HRESULT put_PenTiltY(in INT32 penTiltY);
29423 
29424   // Touch specific attributes
29425 
29426   /// Get the TouchFlags of the pointer event. This corresponds to the
29427   /// touchFlags property of the POINTER_TOUCH_INFO struct. The values are
29428   /// defined by the TOUCH_FLAGS constants in the Windows SDK (winuser.h).
29429   @(" propget")
29430 	HRESULT get_TouchFlags(@("out, retval") UINT32* touchFlags);
29431   /// Set the TouchFlags of the pointer event. This corresponds to the
29432   /// touchFlags property of the POINTER_TOUCH_INFO struct. The values are
29433   /// defined by the TOUCH_FLAGS constants in the Windows SDK (winuser.h).
29434   @(" propput")
29435 	HRESULT put_TouchFlags(in UINT32 touchFlags);
29436 
29437   /// Get the TouchMask of the pointer event. This corresponds to the
29438   /// touchMask property of the POINTER_TOUCH_INFO struct. The values are
29439   /// defined by the TOUCH_MASK constants in the Windows SDK (winuser.h).
29440   @(" propget")
29441 	HRESULT get_TouchMask(@("out, retval") UINT32* touchMask);
29442   /// Set the TouchMask of the pointer event. This corresponds to the
29443   /// touchMask property of the POINTER_TOUCH_INFO struct. The values are
29444   /// defined by the TOUCH_MASK constants in the Windows SDK (winuser.h).
29445   @(" propput")
29446 	HRESULT put_TouchMask(in UINT32 touchMask);
29447 
29448   /// Get the TouchContact of the pointer event. This corresponds to the
29449   /// rcContact property of the POINTER_TOUCH_INFO struct as defined in the
29450   /// Windows SDK (winuser.h).
29451   @(" propget")
29452 	HRESULT get_TouchContact(@("out, retval") RECT* touchContact);
29453   /// Set the TouchContact of the pointer event. This corresponds to the
29454   /// rcContact property of the POINTER_TOUCH_INFO struct as defined in the
29455   /// Windows SDK (winuser.h).
29456   @(" propput")
29457 	HRESULT put_TouchContact(in RECT touchContact);
29458 
29459   /// Get the TouchContactRaw of the pointer event. This corresponds to the
29460   /// rcContactRaw property of the POINTER_TOUCH_INFO struct as defined in the
29461   /// Windows SDK (winuser.h).
29462   @(" propget")
29463 	HRESULT get_TouchContactRaw(@("out, retval") RECT* touchContactRaw);
29464   /// Set the TouchContactRaw of the pointer event. This corresponds to the
29465   /// rcContactRaw property of the POINTER_TOUCH_INFO struct as defined in the
29466   /// Windows SDK (winuser.h).
29467   @(" propput")
29468 	HRESULT put_TouchContactRaw(in RECT touchContactRaw);
29469 
29470   /// Get the TouchOrientation of the pointer event. This corresponds to the
29471   /// orientation property of the POINTER_TOUCH_INFO struct as defined in the
29472   /// Windows SDK (winuser.h).
29473   @(" propget")
29474 	HRESULT get_TouchOrientation(@("out, retval") UINT32* touchOrientation);
29475   /// Set the TouchOrientation of the pointer event. This corresponds to the
29476   /// orientation property of the POINTER_TOUCH_INFO struct as defined in the
29477   /// Windows SDK (winuser.h).
29478   @(" propput")
29479 	HRESULT put_TouchOrientation(in UINT32 touchOrientation);
29480 
29481   /// Get the TouchPressure of the pointer event. This corresponds to the
29482   /// pressure property of the POINTER_TOUCH_INFO struct as defined in the
29483   /// Windows SDK (winuser.h).
29484   @(" propget")
29485 	HRESULT get_TouchPressure(@("out, retval") UINT32* touchPressure);
29486   /// Set the TouchPressure of the pointer event. This corresponds to the
29487   /// pressure property of the POINTER_TOUCH_INFO struct as defined in the
29488   /// Windows SDK (winuser.h).
29489   @(" propput")
29490 	HRESULT put_TouchPressure(in UINT32 touchPressure);
29491 }
29492 
29493 /// The caller implements this interface to receive CursorChanged events. Use
29494 /// the Cursor property to get the new cursor.
29495 const GUID IID_ICoreWebView2CursorChangedEventHandler = ICoreWebView2CursorChangedEventHandler.iid;
29496 
29497 interface ICoreWebView2CursorChangedEventHandler : IUnknown
29498 {
29499     static const GUID iid = { 0x9da43ccc,0x26e1,0x4dad,[ 0xb5,0x6c,0xd8,0x96,0x1c,0x94,0xc5,0x71 ] };
29500   /// Called to provide the implementer with the event args for the
29501   /// corresponding event. There are no event args and the args
29502   /// parameter will be null.
29503   HRESULT Invoke(/+[in]+/ ICoreWebView2CompositionController sender, /+[in]+/ IUnknown args);
29504 }
29505 
29506 /// Receives `RasterizationScaleChanged` events.  Use the `RasterizationScale`
29507 /// property to get the modified scale.
29508 
29509 const GUID IID_ICoreWebView2RasterizationScaleChangedEventHandler = ICoreWebView2RasterizationScaleChangedEventHandler.iid;
29510 
29511 interface ICoreWebView2RasterizationScaleChangedEventHandler : IUnknown
29512 {
29513     static const GUID iid = { 0x9c98c8b1,0xac53,0x427e,[ 0xa3,0x45,0x30,0x49,0xb5,0x52,0x4b,0xbe ] };
29514   /// Called to provide the implementer with the event args for the
29515   /// corresponding event. There are no event args and the args
29516   /// parameter will be null.
29517   HRESULT Invoke(
29518     /+[in]+/ ICoreWebView2Controller sender,
29519     /+[in]+/ IUnknown args);
29520 }
29521 
29522 /// Represents the WebView2 Environment.  WebViews created from an environment
29523 /// run on the browser process specified with environment parameters and
29524 /// objects created from an environment should be used in the same
29525 /// environment.  Using it in different environments are not guaranteed to be
29526 ///  compatible and may fail.
29527 
29528 const GUID IID_ICoreWebView2Environment = ICoreWebView2Environment.iid;
29529 
29530 interface ICoreWebView2Environment : IUnknown
29531 {
29532     static const GUID iid = { 0xb96d755e,0x0319,0x4e92,[ 0xa2,0x96,0x23,0x43,0x6f,0x46,0xa1,0xfc ] };
29533 
29534   /// Asynchronously create a new WebView.
29535   ///
29536   /// `parentWindow` is the `HWND` in which the WebView should be displayed and
29537   /// from which receive input.  The WebView adds a child window to the
29538   /// provided window before this function returns.  Z-order and other things
29539   /// impacted by sibling window order are affected accordingly.  If you want to
29540   /// move the WebView to a different parent after it has been created, you must
29541   /// call put_ParentWindow to update tooltip positions, accessibility trees,
29542   /// and such.
29543   ///
29544   /// HWND_MESSAGE is a valid parameter for `parentWindow` for an invisible
29545   /// WebView for Windows 8 and above. In this case the window will never
29546   /// become visible. You are not able to reparent the window after you have
29547   /// created the WebView.  This is not supported in Windows 7 or below.
29548   /// Passing this parameter in Windows 7 or below will return
29549   /// ERROR_INVALID_WINDOW_HANDLE in the controller callback.
29550   ///
29551   /// It is recommended that the app set Application User Model ID for the
29552   /// process or the app window.  If none is set, during WebView creation a
29553   /// generated Application User Model ID is set to root window of
29554   /// `parentWindow`.
29555   ///
29556   /// \snippet AppWindow.cpp CreateCoreWebView2Controller
29557   ///
29558   /// It is recommended that the app handles restart manager messages, to
29559   /// gracefully restart it in the case when the app is using the WebView2
29560   /// Runtime from a certain installation and that installation is being
29561   /// uninstalled.  For example, if a user installs a version of the WebView2
29562   /// Runtime and opts to use another version of the WebView2 Runtime for
29563   /// testing the app, and then uninstalls the 1st version of the WebView2
29564   /// Runtime without closing the app, the app restarts to allow
29565   /// un-installation to succeed.
29566   ///
29567   /// \snippet AppWindow.cpp RestartManager
29568   ///
29569   /// The app should retry `CreateCoreWebView2Controller` upon failure, unless the
29570   /// error code is `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
29571   /// When the app retries `CreateCoreWebView2Controller` upon failure, it is
29572   /// recommended that the app restarts from creating a new WebView2
29573   /// Environment.  If a WebView2 Runtime update happens, the version
29574   /// associated with a WebView2 Environment may have been removed and causing
29575   /// the object to no longer work.  Creating a new WebView2 Environment works
29576   /// since it uses the latest version.
29577   ///
29578   /// WebView creation fails with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if a
29579   /// running instance using the same user data folder exists, and the Environment
29580   /// objects have different `EnvironmentOptions`.  For example, if a WebView was
29581   /// created with one language, an attempt to create a WebView with a different
29582   /// language using the same user data folder will fail.
29583   ///
29584   /// The creation will fail with `E_ABORT` if `parentWindow` is destroyed
29585   /// before the creation is finished.  If this is caused by a call to
29586   /// `DestroyWindow`, the creation completed handler will be invoked before
29587   /// `DestroyWindow` returns, so you can use this to cancel creation and clean
29588   /// up resources synchronously when quitting a thread.
29589   ///
29590   /// In rare cases the creation can fail with `E_UNEXPECTED` if runtime does not have
29591   /// permissions to the user data folder.
29592 
29593   HRESULT CreateCoreWebView2Controller(
29594     HWND parentWindow,
29595     ICoreWebView2CreateCoreWebView2ControllerCompletedHandler handler);
29596 
29597   /// Create a new web resource response object.  The `headers` parameter is
29598   /// the raw response header string delimited by newline.  It is also possible
29599   /// to create this object with null headers string and then use the
29600   /// `ICoreWebView2HttpResponseHeaders` to construct the headers line by line.
29601   /// For more information about other parameters, navigate to
29602   /// [ICoreWebView2WebResourceResponse](/microsoft-edge/webview2/reference/win32/icorewebview2webresourceresponse).
29603   ///
29604   /// \snippet SettingsComponent.cpp WebResourceRequested0
29605   /// \snippet SettingsComponent.cpp WebResourceRequested1
29606   HRESULT CreateWebResourceResponse(
29607     in IStream* content,
29608     in int statusCode,
29609     in LPCWSTR reasonPhrase,
29610     in LPCWSTR headers,
29611     @("out, retval") ICoreWebView2WebResourceResponse * response);
29612 
29613   /// The browser version info of the current `ICoreWebView2Environment`,
29614   /// including channel name if it is not the WebView2 Runtime.  It matches the
29615   /// format of the `GetAvailableCoreWebView2BrowserVersionString` API.
29616   /// Channel names are `beta`, `dev`, and `canary`.
29617   ///
29618   /// The caller must free the returned string with `CoTaskMemFree`.  See
29619   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29620   ///
29621   /// \snippet AppWindow.cpp GetBrowserVersionString
29622   @(" propget")
29623 	HRESULT get_BrowserVersionString(@("out, retval") LPWSTR* versionInfo);
29624 
29625   /// Add an event handler for the `NewBrowserVersionAvailable` event.
29626   /// `NewBrowserVersionAvailable` runs when a newer version of the WebView2
29627   /// Runtime is installed and available using WebView2.  To use the newer
29628   /// version of the browser you must create a new environment and WebView.
29629   /// The event only runs for new version from the same WebView2 Runtime from
29630   /// which the code is running. When not running with installed WebView2
29631   /// Runtime, no event is run.
29632   ///
29633   /// Because a user data folder is only able to be used by one browser
29634   /// process at a time, if you want to use the same user data folder in the
29635   /// WebView using the new version of the browser, you must close the
29636   /// environment and instance of WebView that are using the older version of
29637   /// the browser first.  Or simply prompt the user to restart the app.
29638   ///
29639   /// \snippet AppWindow.cpp NewBrowserVersionAvailable
29640   HRESULT add_NewBrowserVersionAvailable(
29641       /+[in]+/ ICoreWebView2NewBrowserVersionAvailableEventHandler eventHandler,
29642       @("out") EventRegistrationToken* token);
29643 
29644   /// Remove an event handler previously added with `add_NewBrowserVersionAvailable`.
29645   HRESULT remove_NewBrowserVersionAvailable(
29646       in EventRegistrationToken token);
29647 }
29648 
29649 /// A continuation of the ICoreWebView2Environment interface.
29650 const GUID IID_ICoreWebView2Environment2 = ICoreWebView2Environment2.iid;
29651 
29652 interface ICoreWebView2Environment2 : ICoreWebView2Environment
29653 {
29654     static const GUID iid = { 0x41F3632B,0x5EF4,0x404F,[ 0xAD,0x82,0x2D,0x60,0x6C,0x5A,0x9A,0x21 ] };
29655   /// Create a new web resource request object.
29656   /// URI parameter must be absolute URI.
29657   /// The headers string is the raw request header string delimited by CRLF
29658   /// (optional in last header).
29659   /// It's also possible to create this object with null headers string
29660   /// and then use the ICoreWebView2HttpRequestHeaders to construct the headers
29661   /// line by line.
29662   /// For information on other parameters see ICoreWebView2WebResourceRequest.
29663   ///
29664   /// \snippet ScenarioNavigateWithWebResourceRequest.cpp NavigateWithWebResourceRequest
29665   HRESULT CreateWebResourceRequest(in LPCWSTR uri,
29666                                    in LPCWSTR method,
29667                                    in IStream* postData,
29668                                    in LPCWSTR headers,
29669                                    @("out, retval") ICoreWebView2WebResourceRequest * request);
29670 }
29671 
29672 /// A continuation of the ICoreWebView2Environment2 interface.
29673 const GUID IID_ICoreWebView2Environment3 = ICoreWebView2Environment3.iid;
29674 
29675 interface ICoreWebView2Environment3 : ICoreWebView2Environment2
29676 {
29677     static const GUID iid = { 0x80a22ae3,0xbe7c,0x4ce2,[ 0xaf,0xe1,0x5a,0x50,0x05,0x6c,0xde,0xeb ] };
29678   /// Asynchronously create a new WebView for use with visual hosting.
29679   ///
29680   /// parentWindow is the HWND in which the app will connect the visual tree of
29681   /// the WebView. This will be the HWND that the app will receive pointer/
29682   /// mouse input meant for the WebView (and will need to use SendMouseInput/
29683   /// SendPointerInput to forward). If the app moves the WebView visual tree to
29684   /// underneath a different window, then it needs to call put_ParentWindow to
29685   /// update the new parent HWND of the visual tree.
29686   ///
29687   /// HWND_MESSAGE is not a valid parameter for `parentWindow` for visual hosting.
29688   /// The underlying implementation of supporting HWND_MESSAGE would break
29689   /// accessibility for visual hosting. This is supported in windowed
29690   /// WebViews - see CreateCoreWebView2Controller.
29691   ///
29692   /// Use put_RootVisualTarget on the created CoreWebView2CompositionController to
29693   /// provide a visual to host the browser's visual tree.
29694   ///
29695   /// It is recommended that the application set Application User Model ID for
29696   /// the process or the application window. If none is set, during WebView
29697   /// creation a generated Application User Model ID is set to root window of
29698   /// parentWindow.
29699   /// \snippet AppWindow.cpp CreateCoreWebView2Controller
29700   ///
29701   /// It is recommended that the application handles restart manager messages
29702   /// so that it can be restarted gracefully in the case when the app is using
29703   /// Edge for WebView from a certain installation and that installation is
29704   /// being uninstalled. For example, if a user installs Edge from Dev channel
29705   /// and opts to use Edge from that channel for testing the app, and then
29706   /// uninstalls Edge from that channel without closing the app, the app will
29707   /// be restarted to allow uninstallation of the dev channel to succeed.
29708   /// \snippet AppWindow.cpp RestartManager
29709   ///
29710   /// The app should retry `CreateCoreWebView2CompositionController` upon failure,
29711   /// unless the error code is `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
29712   /// When the app retries `CreateCoreWebView2CompositionController`
29713   /// upon failure, it is recommended that the app restarts from creating a new
29714   /// WebView2 Environment.  If a WebView2 Runtime update happens, the version
29715   /// associated with a WebView2 Environment may have been removed and causing
29716   /// the object to no longer work.  Creating a new WebView2 Environment works
29717   /// since it uses the latest version.
29718   ///
29719   /// WebView creation fails with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if a
29720   /// running instance using the same user data folder exists, and the Environment
29721   /// objects have different `EnvironmentOptions`.  For example, if a WebView was
29722   /// created with one language, an attempt to create a WebView with a different
29723   /// language using the same user data folder will fail.
29724   ///
29725   /// The creation will fail with `E_ABORT` if `parentWindow` is destroyed
29726   /// before the creation is finished.  If this is caused by a call to
29727   /// `DestroyWindow`, the creation completed handler will be invoked before
29728   /// `DestroyWindow` returns, so you can use this to cancel creation and clean
29729   /// up resources synchronously when quitting a thread.
29730   ///
29731   /// In rare cases the creation can fail with `E_UNEXPECTED` if runtime does not have
29732   /// permissions to the user data folder.
29733   ///
29734   /// CreateCoreWebView2CompositionController is supported in the following versions of Windows:
29735   ///
29736   /// - Windows 11
29737   /// - Windows 10
29738   /// - Windows Server 2019
29739   /// - Windows Server 2016
29740   ///
29741   HRESULT CreateCoreWebView2CompositionController(
29742       HWND parentWindow,
29743       ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler handler);
29744 
29745   /// Create an empty ICoreWebView2PointerInfo. The returned
29746   /// ICoreWebView2PointerInfo needs to be populated with all of the relevant
29747   /// info before calling SendPointerInput.
29748   HRESULT CreateCoreWebView2PointerInfo(
29749     @("out, retval") ICoreWebView2PointerInfo * pointerInfo);
29750 }
29751 
29752 /// A continuation of the ICoreWebView2Environment3 interface.
29753 const GUID IID_ICoreWebView2Environment4 = ICoreWebView2Environment4.iid;
29754 
29755 interface ICoreWebView2Environment4 : ICoreWebView2Environment3
29756 {
29757     static const GUID iid = { 0x20944379,0x6dcf,0x41d6,[ 0xa0,0xa0,0xab,0xc0,0xfc,0x50,0xde,0x0d ] };
29758   /// Returns the Automation Provider for the WebView that matches the provided
29759   /// window. Host apps are expected to implement
29760   /// IRawElementProviderHwndOverride. When GetOverrideProviderForHwnd is
29761   /// called, the app can pass the HWND to GetAutomationProviderForWindow to
29762   /// find the matching WebView Automation Provider.
29763   HRESULT GetAutomationProviderForWindow(in HWND hwnd,
29764                                          @("out, retval") IUnknown * provider);
29765 }
29766 
29767 /// A continuation of the `ICoreWebView2Environment4` interface that supports
29768 /// the `BrowserProcessExited` event.
29769 const GUID IID_ICoreWebView2Environment5 = ICoreWebView2Environment5.iid;
29770 
29771 interface ICoreWebView2Environment5 : ICoreWebView2Environment4
29772 {
29773     static const GUID iid = { 0x319e423d,0xe0d7,0x4b8d,[ 0x92,0x54,0xae,0x94,0x75,0xde,0x9b,0x17 ] };
29774   /// Add an event handler for the `BrowserProcessExited` event.
29775   /// The `BrowserProcessExited` event is raised when the collection of WebView2
29776   /// Runtime processes for the browser process of this environment terminate
29777   /// due to browser process failure or normal shutdown (for example, when all
29778   /// associated WebViews are closed), after all resources have been released
29779   /// (including the user data folder). To learn about what these processes are,
29780   /// go to [Process model](/microsoft-edge/webview2/concepts/process-model).
29781   ///
29782   /// A handler added with this method is called until removed with
29783   /// `remove_BrowserProcessExited`, even if a new browser process is bound to
29784   /// this environment after earlier `BrowserProcessExited` events are raised.
29785   ///
29786   /// Multiple app processes can share a browser process by creating their webviews
29787   /// from a `ICoreWebView2Environment` with the same user data folder. When the entire
29788   /// collection of WebView2Runtime processes for the browser process exit, all
29789   /// associated `ICoreWebView2Environment` objects receive the `BrowserProcessExited`
29790   /// event. Multiple processes sharing the same browser process need to coordinate
29791   /// their use of the shared user data folder to avoid race conditions and
29792   /// unnecessary waits. For example, one process should not clear the user data
29793   /// folder at the same time that another process recovers from a crash by recreating
29794   /// its WebView controls; one process should not block waiting for the event if
29795   /// other app processes are using the same browser process (the browser process will
29796   /// not exit until those other processes have closed their webviews too).
29797   ///
29798   /// Note this is an event from the `ICoreWebView2Environment3` interface, not
29799   /// the `ICoreWebView2` one. The difference between `BrowserProcessExited` and
29800   /// `ICoreWebView2`'s `ProcessFailed` is that `BrowserProcessExited` is
29801   /// raised for any **browser process** exit (expected or unexpected, after all
29802   /// associated processes have exited too), while `ProcessFailed` is raised for
29803   /// **unexpected** process exits of any kind (browser, render, GPU, and all
29804   /// other types), or for main frame **render process** unresponsiveness. To
29805   /// learn more about the WebView2 Process Model, go to
29806   /// [Process model](/microsoft-edge/webview2/concepts/process-model).
29807   ///
29808   /// In the case the browser process crashes, both `BrowserProcessExited` and
29809   /// `ProcessFailed` events are raised, but the order is not guaranteed. These
29810   /// events are intended for different scenarios. It is up to the app to
29811   /// coordinate the handlers so they do not try to perform reliability recovery
29812   /// while also trying to move to a new WebView2 Runtime version or remove the
29813   /// user data folder.
29814   ///
29815   /// \snippet AppWindow.cpp Close
29816   HRESULT add_BrowserProcessExited(
29817       /+[in]+/ ICoreWebView2BrowserProcessExitedEventHandler eventHandler,
29818       @("out") EventRegistrationToken* token);
29819 
29820   /// Remove an event handler previously added with `add_BrowserProcessExited`.
29821   HRESULT remove_BrowserProcessExited(in EventRegistrationToken token);
29822 }
29823 
29824 /// This interface is an extension of the ICoreWebView2Environment that supports
29825 /// creating print settings for printing to PDF.
29826 const GUID IID_ICoreWebView2Environment6 = ICoreWebView2Environment6.iid;
29827 
29828 interface ICoreWebView2Environment6 : ICoreWebView2Environment5
29829 {
29830     static const GUID iid = { 0xe59ee362,0xacbd,0x4857,[ 0x9a,0x8e,0xd3,0x64,0x4d,0x94,0x59,0xa9 ] };
29831     /// Creates the `ICoreWebView2PrintSettings` used by the `PrintToPdf`
29832     /// method.
29833     HRESULT CreatePrintSettings(
29834         @("out, retval") ICoreWebView2PrintSettings * printSettings);
29835 }
29836 
29837 /// This interface is an extension of the ICoreWebView2Environment. An object
29838 /// implementing the ICoreWebView2Environment7 interface will also
29839 /// implement ICoreWebView2Environment.
29840 const GUID IID_ICoreWebView2Environment7 = ICoreWebView2Environment7.iid;
29841 
29842 interface ICoreWebView2Environment7 : ICoreWebView2Environment6
29843 {
29844     static const GUID iid = { 0x43C22296,0x3BBD,0x43A4,[ 0x9C,0x00,0x5C,0x0D,0xF6,0xDD,0x29,0xA2 ] };
29845   /// Returns the user data folder that all CoreWebView2's created from this
29846   /// environment are using.
29847   /// This could be either the value passed in by the developer when creating
29848   /// the environment object or the calculated one for default handling.  It
29849   /// will always be an absolute path.
29850   ///
29851   /// The caller must free the returned string with `CoTaskMemFree`.  See
29852   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29853   ///
29854   /// \snippet AppWindow.cpp GetUserDataFolder
29855   @(" propget")
29856 	HRESULT get_UserDataFolder(@(" out, retval ") LPWSTR * value);
29857 }
29858 
29859 /// A continuation of the `ICoreWebView2Environment7` interface that supports
29860 /// the `ProcessInfosChanged` event.
29861 const GUID IID_ICoreWebView2Environment8 = ICoreWebView2Environment8.iid;
29862 
29863 interface ICoreWebView2Environment8 : ICoreWebView2Environment7
29864 {
29865     static const GUID iid = { 0xD6EB91DD,0xC3D2,0x45E5,[ 0xBD,0x29,0x6D,0xC2,0xBC,0x4D,0xE9,0xCF ] };
29866   /// Adds an event handler for the `ProcessInfosChanged` event.
29867   ///
29868   /// \snippet ProcessComponent.cpp ProcessInfosChanged
29869   /// \snippet ProcessComponent.cpp ProcessInfosChanged1
29870   HRESULT add_ProcessInfosChanged(
29871       /+[in]+/ ICoreWebView2ProcessInfosChangedEventHandler eventHandler,
29872       @("out") EventRegistrationToken* token);
29873 
29874   /// Remove an event handler previously added with `add_ProcessInfosChanged`.
29875   HRESULT remove_ProcessInfosChanged(
29876       in EventRegistrationToken token);
29877 
29878   /// Returns the `ICoreWebView2ProcessInfoCollection`
29879   /// Provide a list of all process using same user data folder except for crashpad process.
29880   HRESULT GetProcessInfos(@("out, retval")ICoreWebView2ProcessInfoCollection * value);
29881 }
29882 
29883 /// Provides a set of properties for a process in the `ICoreWebView2Environment`.
29884 const GUID IID_ICoreWebView2ProcessInfo = ICoreWebView2ProcessInfo.iid;
29885 
29886 interface ICoreWebView2ProcessInfo : IUnknown
29887 {
29888     static const GUID iid = { 0x84FA7612,0x3F3D,0x4FBF,[ 0x88,0x9D,0xFA,0xD0,0x00,0x49,0x2D,0x72 ] };
29889 
29890   /// The process id of the process.
29891   @(" propget")
29892 	HRESULT get_ProcessId(@("out, retval") INT32* value);
29893 
29894   /// The kind of the process.
29895   @(" propget")
29896 	HRESULT get_Kind(@("out, retval") COREWEBVIEW2_PROCESS_KIND* kind);
29897 }
29898 
29899 /// A continuation of the ICoreWebView2Environment interface for
29900 /// creating CoreWebView2 ContextMenuItem objects.
29901 const GUID IID_ICoreWebView2Environment9 = ICoreWebView2Environment9.iid;
29902 
29903 interface ICoreWebView2Environment9 : ICoreWebView2Environment8
29904 {
29905     static const GUID iid = { 0xf06f41bf,0x4b5a,0x49d8,[ 0xb9,0xf6,0xfa,0x16,0xcd,0x29,0xf2,0x74 ] };
29906   /// Create a custom `ContextMenuItem` object to insert into the WebView context menu.
29907   /// CoreWebView2 will rewind the icon stream before decoding.
29908   /// There is a limit of 1000 active custom context menu items at a given time.
29909   /// Attempting to create more before deleting existing ones will fail with
29910   /// ERROR_NOT_ENOUGH_QUOTA.
29911   /// It is recommended to reuse ContextMenuItems across ContextMenuRequested events
29912   /// for performance.
29913   /// The returned ContextMenuItem object's `IsEnabled` property will default to `TRUE`
29914   /// and `IsChecked` property will default to `FALSE`. A `CommandId` will be assigned
29915   /// to the ContextMenuItem object that's unique across active custom context menu items,
29916   /// but command ID values of deleted ContextMenuItems can be reassigned.
29917   HRESULT CreateContextMenuItem(
29918       in LPCWSTR label,
29919       in IStream* iconStream,
29920       in COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND kind,
29921       @("out, retval") ICoreWebView2ContextMenuItem * item);
29922 }
29923 
29924 /// This interface is used to create `ICoreWebView2ControllerOptions` object, which
29925 /// can be passed as a parameter in `CreateCoreWebView2ControllerWithOptions` and
29926 /// `CreateCoreWebView2CompositionControllerWithOptions` function for multiple profiles support.
29927 /// The profile will be created on disk or opened when calling `CreateCoreWebView2ControllerWithOptions` or
29928 /// `CreateCoreWebView2CompositionControllerWithOptions` no matter InPrivate mode is enabled or not, and
29929 /// it will be released in memory when the corresponding controller is closed but still remain on disk.
29930 /// If you create a WebView2Controller with {ProfileName="name", InPrivate=false} and then later create another
29931 /// one with {ProfileName="name", InPrivate=true}, these two controllers using the same profile would be allowed to
29932 /// run at the same time.
29933 /// As WebView2 is built on top of Edge browser, it follows Edge's behavior pattern. To create an InPrivate WebView,
29934 /// we gets an off-the-record profile (an InPrivate profile) from a regular profile, then create the WebView with the
29935 /// off-the-record profile.
29936 ///
29937 /// \snippet AppWindow.cpp CreateControllerWithOptions
29938 const GUID IID_ICoreWebView2Environment10 = ICoreWebView2Environment10.iid;
29939 
29940 interface ICoreWebView2Environment10 : ICoreWebView2Environment9
29941 {
29942     static const GUID iid = { 0xee0eb9df,0x6f12,0x46ce,[ 0xb5,0x3f,0x3f,0x47,0xb9,0xc9,0x28,0xe0 ] };
29943   /// Create a new ICoreWebView2ControllerOptions to be passed as a parameter of
29944   /// CreateCoreWebView2ControllerWithOptions and CreateCoreWebView2CompositionControllerWithOptions.
29945   /// The 'options' is settable and in it the default value for profile name is the empty string,
29946   /// and the default value for IsInPrivateModeEnabled is false.
29947   /// Also the profile name can be reused.
29948   HRESULT CreateCoreWebView2ControllerOptions(
29949       @("out, retval") ICoreWebView2ControllerOptions * options);
29950 
29951   /// Create a new WebView with options.
29952   HRESULT CreateCoreWebView2ControllerWithOptions(
29953       in HWND parentWindow,
29954       /+[in]+/ ICoreWebView2ControllerOptions options,
29955       /+[in]+/ ICoreWebView2CreateCoreWebView2ControllerCompletedHandler handler);
29956 
29957   /// Create a new WebView in visual hosting mode with options.
29958   HRESULT CreateCoreWebView2CompositionControllerWithOptions(
29959       in HWND parentWindow,
29960       /+[in]+/ ICoreWebView2ControllerOptions options,
29961       /+[in]+/ ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler handler);
29962 }
29963 
29964 /// A list containing process id and corresponding process type.
29965 const GUID IID_ICoreWebView2ProcessInfoCollection = ICoreWebView2ProcessInfoCollection.iid;
29966 
29967 interface ICoreWebView2ProcessInfoCollection : IUnknown
29968 {
29969     static const GUID iid = { 0x402B99CD,0xA0CC,0x4FA5,[ 0xB7,0xA5,0x51,0xD8,0x6A,0x1D,0x23,0x39 ] };
29970   /// The number of process contained in the ICoreWebView2ProcessInfoCollection.
29971   @(" propget")
29972 	HRESULT get_Count(@("out, retval") UINT* count);
29973 
29974   /// Gets the `ICoreWebView2ProcessInfo` located in the `ICoreWebView2ProcessInfoCollection`
29975   /// at the given index.
29976   HRESULT GetValueAtIndex(in UINT32 index,
29977                           @("out, retval") ICoreWebView2ProcessInfo * processInfo);
29978 }
29979 
29980 /// An event handler for the `ProcessInfosChanged` event.
29981 const GUID IID_ICoreWebView2ProcessInfosChangedEventHandler = ICoreWebView2ProcessInfosChangedEventHandler.iid;
29982 
29983 interface ICoreWebView2ProcessInfosChangedEventHandler : IUnknown
29984 {
29985     static const GUID iid = { 0xF4AF0C39,0x44B9,0x40E9,[ 0x8B,0x11,0x04,0x84,0xCF,0xB9,0xE0,0xA1 ] };
29986   /// Provides the event args for the corresponding event.  No event args exist
29987   /// and the `args` parameter is set to `null`.
29988   HRESULT Invoke(/+[in]+/ ICoreWebView2Environment sender, /+[in]+/ IUnknown args);
29989 }
29990 
29991 /// Options used to create WebView2 Environment.  A default implementation is
29992 /// provided in `WebView2EnvironmentOptions.h`.
29993 ///
29994 /// \snippet AppWindow.cpp CreateCoreWebView2EnvironmentWithOptions
29995 
29996 const GUID IID_ICoreWebView2EnvironmentOptions = ICoreWebView2EnvironmentOptions.iid;
29997 
29998 interface ICoreWebView2EnvironmentOptions : IUnknown
29999 {
30000     static const GUID iid = { 0x2fde08a8,0x1e9a,0x4766,[ 0x8c,0x05,0x95,0xa9,0xce,0xb9,0xd1,0xc5 ] };
30001 
30002   /// Changes the behavior of the WebView.  The arguments are passed to the
30003   /// browser process as part of the command.  For more information about
30004   /// using command-line switches with Chromium browser processes, navigate to
30005   /// [Run Chromium with Flags](https://www.chromium.org/developers/how-tos/run-chromium-with-flags).
30006   /// The value appended to a switch is appended to the browser process, for
30007   /// example, in `--edge-webview-switches=xxx` the value is `xxx`.  If you
30008   /// specify a switch that is important to WebView functionality, it is
30009   /// ignored, for example, `--user-data-dir`.  Specific features are disabled
30010   /// internally and blocked from being enabled.  If a switch is specified
30011   /// multiple times, only the last instance is used.
30012   ///
30013   /// \> [!NOTE]\n\> A merge of the different values of the same switch is not attempted,
30014   /// except for disabled and enabled features. The features specified by
30015   /// `--enable-features` and `--disable-features` are merged with simple
30016   /// logic.\n\> *   The features is the union of the specified features
30017   /// and built-in features.  If a feature is disabled, it is removed from the
30018   /// enabled features list.
30019   ///
30020   /// If you specify command-line switches and use the
30021   /// `additionalBrowserArguments` parameter, the `--edge-webview-switches`
30022   /// value takes precedence and is processed last.  If a switch fails to
30023   /// parse, the switch is ignored.  The default state for the operation is
30024   /// to run the browser process with no extra flags.
30025   ///
30026   /// The caller must free the returned string with `CoTaskMemFree`.  See
30027   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30028   @(" propget")
30029 	HRESULT get_AdditionalBrowserArguments(@("out, retval") LPWSTR* value);
30030 
30031   /// Sets the `AdditionalBrowserArguments` property.
30032   ///
30033   /// Please note that calling this API twice will replace the previous value
30034   /// rather than appending to it. If there are multiple switches, there
30035   /// should be a space in between them. The one exception is if multiple
30036   /// features are being enabled/disabled for a single switch, in which
30037   /// case the features should be comma-seperated.
30038   /// Ex. "--disable-features=feature1,feature2 --some-other-switch --do-something"
30039   @(" propput")
30040 	HRESULT put_AdditionalBrowserArguments(in LPCWSTR value);
30041 
30042   /// The default display language for WebView.  It applies to browser UI such as
30043   /// context menu and dialogs.  It also applies to the `accept-languages` HTTP
30044   ///  header that WebView sends to websites. The intended locale value is in the
30045   /// format of BCP 47 Language Tags. More information can be found from
30046   /// [IETF BCP47](https://www.ietf.org/rfc/bcp/bcp47.html).
30047   ///
30048   /// The caller must free the returned string with `CoTaskMemFree`.  See
30049   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30050   @(" propget")
30051 	HRESULT get_Language(@("out, retval") LPWSTR* value);
30052 
30053   /// Sets the `Language` property.
30054   @(" propput")
30055 	HRESULT put_Language(in LPCWSTR value);
30056 
30057   /// Specifies the version of the WebView2 Runtime binaries required to be
30058   /// compatible with your app.  This defaults to the WebView2 Runtime version
30059   /// that corresponds with the version of the SDK the app is using.  The
30060   /// format of this value is the same as the format of the
30061   /// `BrowserVersionString` property and other `BrowserVersion` values.  Only
30062   /// the version part of the `BrowserVersion` value is respected.  The channel
30063   ///  suffix, if it exists, is ignored.  The version of the WebView2 Runtime
30064   /// binaries actually used may be different from the specified
30065   /// `TargetCompatibleBrowserVersion`.  The binaries are only guaranteed to be
30066   /// compatible.  Verify the actual version on the `BrowserVersionString`
30067   /// property on the `ICoreWebView2Environment`.
30068   ///
30069   /// The caller must free the returned string with `CoTaskMemFree`.  See
30070   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30071   @(" propget")
30072 	HRESULT get_TargetCompatibleBrowserVersion(@("out, retval") LPWSTR* value);
30073 
30074   /// Sets the `TargetCompatibleBrowserVersion` property.
30075   @(" propput")
30076 	HRESULT put_TargetCompatibleBrowserVersion(in LPCWSTR value);
30077 
30078   /// The `AllowSingleSignOnUsingOSPrimaryAccount` property is used to enable
30079   /// single sign on with Azure Active Directory (AAD) and personal Microsoft
30080   /// Account (MSA) resources inside WebView. All AAD accounts, connected to
30081   /// Windows and shared for all apps, are supported. For MSA, SSO is only enabled
30082   /// for the account associated for Windows account login, if any.
30083   /// Default is disabled. Universal Windows Platform apps must also declare
30084   /// `enterpriseCloudSSO`
30085   /// [Restricted capabilities](/windows/uwp/packaging/app-capability-declarations\#restricted-capabilities)
30086   /// for the single sign on (SSO) to work.
30087   @(" propget")
30088 	HRESULT get_AllowSingleSignOnUsingOSPrimaryAccount(@("out, retval") BOOL* allow);
30089 
30090   /// Sets the `AllowSingleSignOnUsingOSPrimaryAccount` property.
30091   @(" propput")
30092 	HRESULT put_AllowSingleSignOnUsingOSPrimaryAccount(in BOOL allow);
30093 }
30094 
30095 /// Additional options used to create WebView2 Environment.  A default implementation is
30096 /// provided in `WebView2EnvironmentOptions.h`.
30097 ///
30098 /// \snippet AppWindow.cpp CreateCoreWebView2EnvironmentWithOptions
30099 
30100 // Note: ICoreWebView2EnvironmentOptions* interfaces derive from IUnknown to make moving
30101 // the API from experimental to public smoothier. These interfaces are mostly internal to
30102 // WebView's own code. Normal apps just use the objects we provided and never interact
30103 // with the interfaces. Advanced apps might implement their own options object. In that
30104 // case, it is also easier for them to implement the interface if it is derived from IUnknown.
30105 const GUID IID_ICoreWebView2EnvironmentOptions2 = ICoreWebView2EnvironmentOptions2.iid;
30106 
30107 interface ICoreWebView2EnvironmentOptions2 : IUnknown
30108 {
30109     static const GUID iid = { 0xFF85C98A,0x1BA7,0x4A6B,[ 0x90,0xC8,0x2B,0x75,0x2C,0x89,0xE9,0xE2 ] };
30110 
30111   /// Whether other processes can create WebView2 from WebView2Environment created with the
30112   /// same user data folder and therefore sharing the same WebView browser process instance.
30113   /// Default is FALSE.
30114   @(" propget")
30115 	HRESULT get_ExclusiveUserDataFolderAccess(@("out, retval") BOOL* value);
30116 
30117   /// Sets the `ExclusiveUserDataFolderAccess` property.
30118   /// The `ExclusiveUserDataFolderAccess` property specifies that the WebView environment
30119   /// obtains exclusive access to the user data folder.
30120   /// If the user data folder is already being used by another WebView environment with a
30121   /// different value for `ExclusiveUserDataFolderAccess` property, the creation of a WebView2Controller
30122   /// using the environment object will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
30123   /// When set as TRUE, no other WebView can be created from other processes using WebView2Environment
30124   /// objects with the same UserDataFolder. This prevents other processes from creating WebViews
30125   /// which share the same browser process instance, since sharing is performed among
30126   /// WebViews that have the same UserDataFolder. When another process tries to create a
30127   /// WebView2Controller from an WebView2Environment object created with the same user data folder,
30128   /// it will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
30129   @(" propput")
30130 	HRESULT put_ExclusiveUserDataFolderAccess(in BOOL value);
30131 }
30132 
30133 /// Additional options used to create WebView2 Environment to manage crash
30134 /// reporting.
30135 const GUID IID_ICoreWebView2EnvironmentOptions3 = ICoreWebView2EnvironmentOptions3.iid;
30136 
30137 interface ICoreWebView2EnvironmentOptions3 : IUnknown
30138 {
30139     static const GUID iid = { 0x4A5C436E,0xA9E3,0x4A2E,[ 0x89,0xC3,0x91,0x0D,0x35,0x13,0xF5,0xCC ] };
30140   /// When `IsCustomCrashReportingEnabled` is set to `TRUE`, Windows won't send crash data to Microsoft endpoint.
30141   /// `IsCustomCrashReportingEnabled` is default to be `FALSE`, in this case, WebView will respect OS consent.
30142   @(" propget")
30143 	HRESULT get_IsCustomCrashReportingEnabled(@("out, retval") BOOL* value);
30144 
30145   /// Sets the `IsCustomCrashReportingEnabled` property.
30146   @(" propput")
30147 	HRESULT put_IsCustomCrashReportingEnabled(in BOOL value);
30148 }
30149 
30150 /// Additional options used to create WebView2 Environment that manages custom scheme registration.
30151 const GUID IID_ICoreWebView2EnvironmentOptions4 = ICoreWebView2EnvironmentOptions4.iid;
30152 
30153 interface ICoreWebView2EnvironmentOptions4 : IUnknown
30154 {
30155     static const GUID iid = { 0xac52d13f,0x0d38,0x475a,[ 0x9d,0xca,0x87,0x65,0x80,0xd6,0x79,0x3e ] };
30156   /// Array of custom scheme registrations. The returned
30157   /// ICoreWebView2CustomSchemeRegistration pointers must be released, and the
30158   /// array itself must be deallocated with CoTaskMemFree.
30159   HRESULT GetCustomSchemeRegistrations(
30160       @("out") UINT32* count,
30161       @("out") ICoreWebView2CustomSchemeRegistration ** schemeRegistrations);
30162   /// Set the array of custom scheme registrations to be used.
30163   /// \snippet AppWindow.cpp CoreWebView2CustomSchemeRegistration
30164   HRESULT SetCustomSchemeRegistrations(
30165       in UINT32 count,
30166       /+[in]+/ ICoreWebView2CustomSchemeRegistration * schemeRegistrations);
30167 }
30168 
30169 /// Additional options used to create WebView2 Environment to manage tracking
30170 /// prevention.
30171 const GUID IID_ICoreWebView2EnvironmentOptions5 = ICoreWebView2EnvironmentOptions5.iid;
30172 
30173 interface ICoreWebView2EnvironmentOptions5 : IUnknown
30174 {
30175     static const GUID iid = { 0x0AE35D64,0xC47F,0x4464,[ 0x81,0x4E,0x25,0x9C,0x34,0x5D,0x15,0x01 ] };
30176   /// The `EnableTrackingPrevention` property is used to enable/disable tracking prevention
30177   /// feature in WebView2. This property enable/disable tracking prevention for all the
30178   /// WebView2's created in the same environment. By default this feature is enabled to block
30179   /// potentially harmful trackers and trackers from sites that aren't visited before and set to
30180   /// `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED` or whatever value was last changed/persisted
30181   /// on the profile.
30182   ///
30183   /// You can set this property to false to disable the tracking prevention feature if the app only
30184   /// renders content in the WebView2 that is known to be safe. Disabling this feature when creating
30185   /// environment also improves runtime performance by skipping related code.
30186   ///
30187   /// You shouldn't disable this property if WebView2 is being used as a "full browser" with arbitrary
30188   /// navigation and should protect end user privacy.
30189   ///
30190   /// There is `ICoreWebView2Profile3::PreferredTrackingPreventionLevel` property to control levels of
30191   /// tracking prevention of the WebView2's associated with a same profile. However, you can also disable
30192   /// tracking prevention later using `ICoreWebView2Profile3::PreferredTrackingPreventionLevel` property and
30193   /// `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE` value but that doesn't improves runtime performance.
30194   ///
30195   /// See `ICoreWebView2Profile3::PreferredTrackingPreventionLevel` for more details.
30196   ///
30197   /// Tracking prevention protects users from online tracking by restricting the ability of trackers to
30198   /// access browser-based storage as well as the network. See [Tracking prevention](/microsoft-edge/web-platform/tracking-prevention).
30199   @(" propget")
30200 	HRESULT get_EnableTrackingPrevention(@("out, retval") BOOL* value);
30201   /// Sets the `EnableTrackingPrevention` property.
30202   @(" propput")
30203 	HRESULT put_EnableTrackingPrevention(in BOOL value);
30204 }
30205 
30206 /// Additional options used to create WebView2 Environment to manage browser extensions.
30207 const GUID IID_ICoreWebView2EnvironmentOptions6 = ICoreWebView2EnvironmentOptions6.iid;
30208 
30209 interface ICoreWebView2EnvironmentOptions6 : IUnknown
30210 {
30211     static const GUID iid = { 0x57D29CC3,0xC84F,0x42A0,[ 0xB0,0xE2,0xEF,0xFB,0xD5,0xE1,0x79,0xDE ] };
30212   /// When `AreBrowserExtensionsEnabled` is set to `TRUE`, new extensions can be added to user
30213   /// profile and used. `AreBrowserExtensionsEnabled` is default to be `FALSE`, in this case,
30214   /// new extensions can't be installed, and already installed extension won't be
30215   /// available to use in user profile.
30216   /// If connecting to an already running environment with a different value for `AreBrowserExtensionsEnabled`
30217   /// property, it will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
30218   /// See `ICoreWebView2BrowserExtension` for Extensions API details.
30219   @(" propget")
30220 	HRESULT get_AreBrowserExtensionsEnabled(@("out, retval") BOOL* value);
30221   /// Sets the `AreBrowserExtensionsEnabled` property.
30222   @(" propput")
30223 	HRESULT put_AreBrowserExtensionsEnabled(in BOOL value);
30224 }
30225 
30226 /// A continuation of the ICoreWebView2Environment interface for
30227 /// getting the crash dump folder path.
30228 const GUID IID_ICoreWebView2Environment11 = ICoreWebView2Environment11.iid;
30229 
30230 interface ICoreWebView2Environment11 : ICoreWebView2Environment10
30231 {
30232     static const GUID iid = { 0xF0913DC6,0xA0EC,0x42EF,[ 0x98,0x05,0x91,0xDF,0xF3,0xA2,0x96,0x6A ] };
30233   /// `FailureReportFolderPath` returns the path of the folder where minidump files are written.
30234   /// Whenever a WebView2 process crashes, a crash dump file will be created in the crash dump folder.
30235   /// The crash dump format is minidump files. Please see
30236   /// [Minidump Files documentation](/windows/win32/debug/minidump-files) for detailed information.
30237   /// Normally when a single child process fails, a minidump will be generated and written to disk,
30238   /// then the `ProcessFailed` event is raised. But for unexpected crashes, a minidump file might not be generated
30239   /// at all, despite whether `ProcessFailed` event is raised. If there are multiple
30240   /// process failures at once, multiple minidump files could be generated. Thus `FailureReportFolderPath`
30241   /// could contain old minidump files that are not associated with a specific `ProcessFailed` event.
30242   /// \snippet AppWindow.cpp GetFailureReportFolder
30243   @(" propget")
30244 	HRESULT get_FailureReportFolderPath(@("out, retval") LPWSTR* value);
30245 }
30246 
30247 /// A continuation of the ICoreWebView2Environment interface for creating shared buffer object.
30248 const GUID IID_ICoreWebView2Environment12 = ICoreWebView2Environment12.iid;
30249 
30250 interface ICoreWebView2Environment12 : ICoreWebView2Environment11
30251 {
30252     static const GUID iid = { 0xF503DB9B,0x739F,0x48DD,[ 0xB1,0x51,0xFD,0xFC,0xF2,0x53,0xF5,0x4E ] };
30253   /// Create a shared memory based buffer with the specified size in bytes.
30254   /// The buffer can be shared with web contents in WebView by calling
30255   /// `PostSharedBufferToScript` on `CoreWebView2` or `CoreWebView2Frame` object.
30256   /// Once shared, the same content of the buffer will be accessible from both
30257   /// the app process and script in WebView. Modification to the content will be visible
30258   /// to all parties that have access to the buffer.
30259   /// The shared buffer is presented to the script as ArrayBuffer. All JavaScript APIs
30260   /// that work for ArrayBuffer including Atomics APIs can be used on it.
30261   /// There is currently a limitation that only size less than 2GB is supported.
30262   HRESULT CreateSharedBuffer(
30263     in UINT64 size,
30264     @("out, retval") ICoreWebView2SharedBuffer * shared_buffer);
30265 }
30266 
30267 /// Receives the `WebView2Environment` created using
30268 /// `CreateCoreWebView2Environment`.
30269 const GUID IID_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler = ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler.iid;
30270 
30271 interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler : IUnknown
30272 {
30273     static const GUID iid = { 0x4e8a3389,0xc9d8,0x4bd2,[ 0xb6,0xb5,0x12,0x4f,0xee,0x6c,0xc1,0x4d ] };
30274 
30275   /// Provides the completion status and result of the corresponding
30276   /// asynchronous method.
30277 
30278   HRESULT Invoke(HRESULT errorCode, ICoreWebView2Environment createdEnvironment);
30279 }
30280 
30281 /// A Receiver is created for a particular DevTools Protocol event and allows
30282 /// you to subscribe and unsubscribe from that event.  Obtained from the
30283 /// WebView object using `GetDevToolsProtocolEventReceiver`.
30284 const GUID IID_ICoreWebView2DevToolsProtocolEventReceiver = ICoreWebView2DevToolsProtocolEventReceiver.iid;
30285 
30286 interface ICoreWebView2DevToolsProtocolEventReceiver : IUnknown
30287 {
30288     static const GUID iid = { 0xb32ca51a,0x8371,0x45e9,[ 0x93,0x17,0xaf,0x02,0x1d,0x08,0x03,0x67 ] };
30289 
30290   /// Subscribe to a `DevToolsProtocol` event.  The `Invoke` method of the
30291   /// `handler` runs whenever the corresponding `DevToolsProtocol` event runs.
30292   /// `Invoke` runs with an event args object containing the parameter object
30293   /// of the DevTools Protocol event as a JSON string.
30294   ///
30295   /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceived
30296 
30297   HRESULT add_DevToolsProtocolEventReceived(
30298       /+[in]+/ ICoreWebView2DevToolsProtocolEventReceivedEventHandler handler,
30299       @("out") EventRegistrationToken* token);
30300 
30301   /// Remove an event handler previously added with
30302   /// `add_DevToolsProtocolEventReceived`.
30303 
30304   HRESULT remove_DevToolsProtocolEventReceived(
30305       in EventRegistrationToken token);
30306 }
30307 
30308 /// A continuation of the ICoreWebView2Environment interface for getting process
30309 /// with associated information.
30310 const GUID IID_ICoreWebView2Environment13 = ICoreWebView2Environment13.iid;
30311 
30312 interface ICoreWebView2Environment13 : ICoreWebView2Environment12
30313 {
30314     static const GUID iid = { 0xaf641f58,0x72b2,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] };
30315   /// Gets a snapshot collection of `ProcessExtendedInfo`s corresponding to all
30316   /// currently running processes associated with this `CoreWebView2Environment`
30317   /// excludes crashpad process.
30318   /// This provides the same list of `ProcessInfo`s as what's provided in
30319   /// `GetProcessInfos`, but additionally provides a list of associated `FrameInfo`s
30320   /// which are actively running (showing or hiding UI elements) in the renderer
30321   /// process. See `AssociatedFrameInfos` for more information.
30322   ///
30323   /// \snippet ProcessComponent.cpp GetProcessExtendedInfos
30324   HRESULT GetProcessExtendedInfos(/+[in]+/ ICoreWebView2GetProcessExtendedInfosCompletedHandler handler);
30325 }
30326 
30327 /// Receives the result of the `GetProcessExtendedInfos` method.
30328 /// The result is written to the collection of `ProcessExtendedInfo`s provided
30329 /// in the `GetProcessExtendedInfos` method call.
30330 const GUID IID_ICoreWebView2GetProcessExtendedInfosCompletedHandler = ICoreWebView2GetProcessExtendedInfosCompletedHandler.iid;
30331 
30332 interface ICoreWebView2GetProcessExtendedInfosCompletedHandler : IUnknown
30333 {
30334     static const GUID iid = { 0xf45e55aa,0x3bc2,0x11ee,[ 0xbe,0x56,0x02,0x42,0xac,0x12,0x00,0x02 ] };
30335   /// Provides the process extended info list for the `GetProcessExtendedInfos`.
30336   HRESULT Invoke(in HRESULT errorCode, /+[in]+/ ICoreWebView2ProcessExtendedInfoCollection value);
30337 }
30338 
30339 /// Provides process with associated extended information in the `ICoreWebView2Environment`.
30340 const GUID IID_ICoreWebView2ProcessExtendedInfo = ICoreWebView2ProcessExtendedInfo.iid;
30341 
30342 interface ICoreWebView2ProcessExtendedInfo : IUnknown
30343 {
30344     static const GUID iid = { 0xaf4c4c2e,0x45db,0x11ee,[ 0xbe,0x56,0x02,0x42,0xac,0x12,0x00,0x02 ] };
30345   /// The process info of the current process.
30346   @(" propget")
30347 	HRESULT get_ProcessInfo(
30348     @("out, retval") ICoreWebView2ProcessInfo * processInfo);
30349 
30350   /// The collection of associated `FrameInfo`s which are actively running
30351   /// (showing or hiding UI elements) in this renderer process. `AssociatedFrameInfos`
30352   /// will only be populated when this `CoreWebView2ProcessExtendedInfo`
30353   /// corresponds to a renderer process. Non-renderer processes will always
30354   /// have an empty `AssociatedFrameInfos`. The `AssociatedFrameInfos` may
30355   /// also be empty for renderer processes that have no active frames.
30356   ///
30357   /// \snippet ProcessComponent.cpp AssociatedFrameInfos
30358   @(" propget")
30359 	HRESULT get_AssociatedFrameInfos(
30360     @("out, retval") ICoreWebView2FrameInfoCollection * frames);
30361 }
30362 
30363 /// A list containing processInfo and associated extended information.
30364 const GUID IID_ICoreWebView2ProcessExtendedInfoCollection = ICoreWebView2ProcessExtendedInfoCollection.iid;
30365 
30366 interface ICoreWebView2ProcessExtendedInfoCollection : IUnknown
30367 {
30368     static const GUID iid = { 0x32efa696,0x407a,0x11ee,[ 0xbe,0x56,0x02,0x42,0xac,0x12,0x00,0x02 ] };
30369   /// The number of process contained in the `ICoreWebView2ProcessExtendedInfoCollection`.
30370   @(" propget")
30371 	HRESULT get_Count(@("out, retval") UINT* count);
30372 
30373   /// Gets the `ICoreWebView2ProcessExtendedInfo` located in the
30374   /// `ICoreWebView2ProcessExtendedInfoCollection` at the given index.
30375   HRESULT GetValueAtIndex(in UINT32 index,
30376                           @("out, retval") ICoreWebView2ProcessExtendedInfo * processInfo);
30377 }
30378 
30379 /// ICoreWebView2Frame provides direct access to the iframes information.
30380 /// You can get an ICoreWebView2Frame by handling the ICoreWebView2_4::add_FrameCreated event.
30381 const GUID IID_ICoreWebView2Frame = ICoreWebView2Frame.iid;
30382 
30383 interface ICoreWebView2Frame : IUnknown
30384 {
30385     static const GUID iid = { 0xf1131a5e,0x9ba9,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] };
30386   /// The name of the iframe from the iframe html tag declaring it.
30387   /// You can access this property even if the iframe is destroyed.
30388   ///
30389   /// The caller must free the returned string with `CoTaskMemFree`.  See
30390   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30391   @(" propget")
30392 	HRESULT get_Name(@(" out, retval ") LPWSTR * name);
30393   /// Raised when the iframe changes its window.name property.
30394   HRESULT add_NameChanged(
30395       /+[in]+/ ICoreWebView2FrameNameChangedEventHandler  eventHandler,
30396       @("out") EventRegistrationToken * token);
30397   /// Remove an event handler previously added with add_NameChanged.
30398   HRESULT remove_NameChanged(in EventRegistrationToken token);
30399 
30400   /// Add the provided host object to script running in the iframe with the
30401   /// specified name for the list of the specified origins. The host object
30402   /// will be accessible for this iframe only if the iframe's origin during
30403   /// access matches one of the origins which are passed. The provided origins
30404   /// will be normalized before comparing to the origin of the document.
30405   /// So the scheme name is made lower case, the host will be punycode decoded
30406   /// as appropriate, default port values will be removed, and so on.
30407   /// This means the origin's host may be punycode encoded or not and will match
30408   /// regardless. If list contains malformed origin the call will fail.
30409   /// The method can be called multiple times in a row without calling
30410   /// RemoveHostObjectFromScript for the same object name. It will replace
30411   /// the previous object with the new object and new list of origins.
30412   /// List of origins will be treated as following:
30413   /// 1. empty list - call will succeed and object will be added for the iframe
30414   /// but it will not be exposed to any origin;
30415   /// 2. list with origins - during access to host object from iframe the
30416   /// origin will be checked that it belongs to this list;
30417   /// 3. list with "*" element - host object will be available for iframe for
30418   /// all origins. We suggest not to use this feature without understanding
30419   /// security implications of giving access to host object from from iframes
30420   /// with unknown origins.
30421   /// 4. list with "file://" element - host object will be available for iframes
30422   /// loaded via file protocol.
30423   /// Calling this method fails if it is called after the iframe is destroyed.
30424   /// \snippet ScenarioAddHostObject.cpp AddHostObjectToScriptWithOrigins
30425   /// For more information about host objects navigate to
30426   /// ICoreWebView2::AddHostObjectToScript.
30427   HRESULT AddHostObjectToScriptWithOrigins(
30428       in LPCWSTR name,
30429       in VARIANT * object,
30430       in UINT32 originsCount,
30431       @(" size_is (originsCount)") in LPCWSTR * origins);
30432   /// Remove the host object specified by the name so that it is no longer
30433   /// accessible from JavaScript code in the iframe. While new access
30434   /// attempts are denied, if the object is already obtained by JavaScript code
30435   /// in the iframe, the JavaScript code continues to have access to that
30436   /// object. Calling this method for a name that is already removed or was
30437   /// never added fails. If the iframe is destroyed this method will return fail
30438   /// also.
30439   HRESULT RemoveHostObjectFromScript(in LPCWSTR name);
30440 
30441   /// The Destroyed event is raised when the iframe corresponding
30442   /// to this CoreWebView2Frame object is removed or the document
30443   /// containing that iframe is destroyed.
30444   HRESULT add_Destroyed(
30445       /+[in]+/ ICoreWebView2FrameDestroyedEventHandler  eventHandler,
30446       @("out") EventRegistrationToken * token);
30447   /// Remove an event handler previously added with add_Destroyed.
30448   HRESULT remove_Destroyed(in EventRegistrationToken token);
30449   /// Check whether a frame is destroyed. Returns true during
30450   /// the Destroyed event.
30451   HRESULT IsDestroyed(@(" out, retval ") BOOL * destroyed);
30452 }
30453 
30454 /// A continuation of the ICoreWebView2Frame interface with navigation events,
30455 /// executing script and posting web messages.
30456 const GUID IID_ICoreWebView2Frame2 = ICoreWebView2Frame2.iid;
30457 
30458 interface ICoreWebView2Frame2 : ICoreWebView2Frame
30459 {
30460     static const GUID iid = { 0x7a6a5834,0xd185,0x4dbf,[ 0xb6,0x3f,0x4a,0x9b,0xc4,0x31,0x07,0xd4 ] };
30461   /// Add an event handler for the `NavigationStarting` event.
30462   /// A frame navigation will raise a `NavigationStarting` event and
30463   /// a `CoreWebView2.FrameNavigationStarting` event. All of the
30464   /// `FrameNavigationStarting` event handlers for the current frame will be
30465   /// run before the `NavigationStarting` event handlers. All of the event handlers
30466   /// share a common `NavigationStartingEventArgs` object. Whichever event handler is
30467   /// last to change the `NavigationStartingEventArgs.Cancel` property will
30468   /// decide if the frame navigation will be cancelled. Redirects raise this
30469   /// event as well, and the navigation id is the same as the original one.
30470   ///
30471   /// Navigations will be blocked until all `NavigationStarting` and
30472   /// `CoreWebView2.FrameNavigationStarting` event handlers return.
30473   HRESULT add_NavigationStarting(
30474       /+[in]+/ ICoreWebView2FrameNavigationStartingEventHandler eventHandler,
30475       @("out") EventRegistrationToken* token);
30476 
30477   /// Remove an event handler previously added with `add_NavigationStarting`.
30478   HRESULT remove_NavigationStarting(
30479       in EventRegistrationToken token);
30480 
30481   /// Add an event handler for the `ContentLoading` event.  `ContentLoading`
30482   /// triggers before any content is loaded, including scripts added with
30483   /// `AddScriptToExecuteOnDocumentCreated`.  `ContentLoading` does not trigger
30484   /// if a same page navigation occurs (such as through `fragment`
30485   /// navigations or `history.pushState` navigations).  This operation
30486   /// follows the `NavigationStarting` and precedes `NavigationCompleted` events.
30487   HRESULT add_ContentLoading(
30488       /+[in]+/ ICoreWebView2FrameContentLoadingEventHandler  eventHandler,
30489       @("out") EventRegistrationToken* token);
30490 
30491   /// Remove an event handler previously added with `add_ContentLoading`.
30492   HRESULT remove_ContentLoading(
30493       in EventRegistrationToken token);
30494 
30495   /// Add an event handler for the `NavigationCompleted` event.
30496   /// `NavigationCompleted` runs when the CoreWebView2Frame has completely
30497   /// loaded (concurrently when `body.onload` runs) or loading stopped with error.
30498   HRESULT add_NavigationCompleted(
30499       /+[in]+/ ICoreWebView2FrameNavigationCompletedEventHandler
30500           eventHandler,
30501       @("out") EventRegistrationToken* token);
30502 
30503   /// Remove an event handler previously added with `add_NavigationCompleted`.
30504   HRESULT remove_NavigationCompleted(
30505       in EventRegistrationToken token);
30506 
30507   /// Add an event handler for the DOMContentLoaded event.
30508   /// DOMContentLoaded is raised when the iframe html document has been parsed.
30509   /// This aligns with the document's DOMContentLoaded event in html.
30510   HRESULT add_DOMContentLoaded(
30511       /+[in]+/ ICoreWebView2FrameDOMContentLoadedEventHandler  eventHandler,
30512       @("out") EventRegistrationToken* token);
30513   /// Remove an event handler previously added with add_DOMContentLoaded.
30514   HRESULT remove_DOMContentLoaded(
30515       in EventRegistrationToken token);
30516 
30517   /// Run JavaScript code from the javascript parameter in the current frame.
30518   /// The result of evaluating the provided JavaScript is passed to the completion handler.
30519   /// The result value is a JSON encoded string. If the result is undefined,
30520   /// contains a reference cycle, or otherwise is not able to be encoded into
30521   /// JSON, then the result is considered to be null, which is encoded
30522   /// in JSON as the string "null".
30523   ///
30524   /// \> [!NOTE]\n\> A function that has no explicit return value returns undefined. If the
30525   /// script that was run throws an unhandled exception, then the result is
30526   /// also "null". This method is applied asynchronously. If the method is
30527   /// run before `ContentLoading`, the script will not be executed
30528   /// and the string "null" will be returned.
30529   /// This operation executes the script even if `ICoreWebView2Settings::IsScriptEnabled` is
30530   /// set to `FALSE`.
30531   ///
30532   /// \snippet ScenarioDOMContentLoaded.cpp ExecuteScriptFrame
30533   HRESULT ExecuteScript(
30534       in LPCWSTR javaScript,
30535       /+[in]+/ ICoreWebView2ExecuteScriptCompletedHandler handler);
30536 
30537   /// Posts the specified webMessage to the frame.
30538   /// The frame receives the message by subscribing to the `message` event of
30539   /// the `window.chrome.webview` of the frame document.
30540   ///
30541   /// ```cpp
30542   /// window.chrome.webview.addEventListener('message', handler)
30543   /// window.chrome.webview.removeEventListener('message', handler)
30544   /// ```
30545   ///
30546   /// The event args is an instances of `MessageEvent`. The
30547   /// `ICoreWebView2Settings::IsWebMessageEnabled` setting must be `TRUE` or
30548   /// the message will not be sent. The `data` property of the event
30549   /// args is the `webMessage` string parameter parsed as a JSON string into a
30550   /// JavaScript object. The `source` property of the event args is a reference
30551   /// to the `window.chrome.webview` object.  For information about sending
30552   /// messages from the HTML document in the WebView to the host, navigate to
30553   /// [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived).
30554   /// The message is delivered asynchronously. If a navigation occurs before the
30555   /// message is posted to the page, the message is discarded.
30556   HRESULT PostWebMessageAsJson(in LPCWSTR webMessageAsJson);
30557 
30558   /// Posts a message that is a simple string rather than a JSON string
30559   /// representation of a JavaScript object. This behaves in exactly the same
30560   /// manner as `PostWebMessageAsJson`, but the `data` property of the event
30561   /// args of the `window.chrome.webview` message is a string with the same
30562   /// value as `webMessageAsString`. Use this instead of
30563   /// `PostWebMessageAsJson` if you want to communicate using simple strings
30564   /// rather than JSON objects.
30565   HRESULT PostWebMessageAsString(in LPCWSTR webMessageAsString);
30566 
30567   /// Add an event handler for the `WebMessageReceived` event.
30568   /// `WebMessageReceived` runs when the
30569   /// `ICoreWebView2Settings::IsWebMessageEnabled` setting is set and the
30570   /// frame document runs `window.chrome.webview.postMessage`.
30571   /// The `postMessage` function is `void postMessage(object)`
30572   /// where object is any object supported by JSON conversion.
30573   ///
30574   /// \snippet assets\ScenarioWebMessage.html chromeWebView
30575   ///
30576   /// When the frame calls `postMessage`, the object parameter is converted to a
30577   /// JSON string and is posted asynchronously to the host process. This will
30578   /// result in the handlers `Invoke` method being called with the JSON string
30579   /// as its parameter.
30580   ///
30581   /// \snippet ScenarioWebMessage.cpp WebMessageReceivedIFrame
30582   HRESULT add_WebMessageReceived(
30583       /+[in]+/ ICoreWebView2FrameWebMessageReceivedEventHandler
30584           handler,
30585       @("out") EventRegistrationToken * token);
30586 
30587   /// Remove an event handler previously added with `add_WebMessageReceived`.
30588   HRESULT remove_WebMessageReceived(in EventRegistrationToken token);
30589 }
30590 
30591 /// Receives `FrameCreated` event.
30592 const GUID IID_ICoreWebView2FrameCreatedEventHandler = ICoreWebView2FrameCreatedEventHandler.iid;
30593 
30594 interface ICoreWebView2FrameCreatedEventHandler : IUnknown
30595 {
30596     static const GUID iid = { 0x38059770,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] };
30597   /// Provides the result for the iframe created event.
30598   HRESULT Invoke(/+[in]+/ ICoreWebView2  sender,
30599                  /+[in]+/ ICoreWebView2FrameCreatedEventArgs  args);
30600 }
30601 
30602 /// Receives `FrameNameChanged` event.
30603 const GUID IID_ICoreWebView2FrameNameChangedEventHandler = ICoreWebView2FrameNameChangedEventHandler.iid;
30604 
30605 interface ICoreWebView2FrameNameChangedEventHandler : IUnknown
30606 {
30607     static const GUID iid = { 0x435c7dc8,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] };
30608   /// Provides the result for the iframe name changed event.
30609   /// No event args exist and the `args` parameter is set to `null`.
30610   HRESULT Invoke(/+[in]+/ ICoreWebView2Frame  sender, /+[in]+/ IUnknown  args);
30611 }
30612 
30613 /// Receives `NavigationStarting` events for iframe.
30614 const GUID IID_ICoreWebView2FrameNavigationStartingEventHandler = ICoreWebView2FrameNavigationStartingEventHandler.iid;
30615 
30616 interface ICoreWebView2FrameNavigationStartingEventHandler : IUnknown
30617 {
30618     static const GUID iid = { 0xe79908bf,0x2d5d,0x4968,[ 0x83,0xdb,0x26,0x3f,0xea,0x2c,0x1d,0xa3 ] };
30619   /// Provides the event args for the corresponding event.
30620   HRESULT Invoke(
30621       /+[in]+/ ICoreWebView2Frame sender,
30622       /+[in]+/ ICoreWebView2NavigationStartingEventArgs args);
30623 }
30624 
30625 /// Receives `ContentLoading` events for iframe.
30626 const GUID IID_ICoreWebView2FrameContentLoadingEventHandler = ICoreWebView2FrameContentLoadingEventHandler.iid;
30627 
30628 interface ICoreWebView2FrameContentLoadingEventHandler : IUnknown
30629 {
30630     static const GUID iid = { 0x0d6156f2,0xd332,0x49a7,[ 0x9e,0x03,0x7d,0x8f,0x2f,0xee,0xee,0x54 ] };
30631   /// Provides the event args for the corresponding event.
30632   HRESULT Invoke(
30633       /+[in]+/ ICoreWebView2Frame sender,
30634       /+[in]+/ ICoreWebView2ContentLoadingEventArgs args);
30635 }
30636 
30637 /// Receives `NavigationCompleted` events for iframe.
30638 const GUID IID_ICoreWebView2FrameNavigationCompletedEventHandler = ICoreWebView2FrameNavigationCompletedEventHandler.iid;
30639 
30640 interface ICoreWebView2FrameNavigationCompletedEventHandler : IUnknown
30641 {
30642     static const GUID iid = { 0x609302ad,0x0e36,0x4f9a,[ 0xa2,0x10,0x6a,0x45,0x27,0x28,0x42,0xa9 ] };
30643   /// Provides the event args for the corresponding event.
30644   HRESULT Invoke(
30645       /+[in]+/ ICoreWebView2Frame sender,
30646       /+[in]+/ ICoreWebView2NavigationCompletedEventArgs args);
30647 }
30648 
30649 /// Receives `DOMContentLoaded` events for iframe.
30650 const GUID IID_ICoreWebView2FrameDOMContentLoadedEventHandler = ICoreWebView2FrameDOMContentLoadedEventHandler.iid;
30651 
30652 interface ICoreWebView2FrameDOMContentLoadedEventHandler : IUnknown
30653 {
30654     static const GUID iid = { 0x38d9520d,0x340f,0x4d1e,[ 0xa7,0x75,0x43,0xfc,0xe9,0x75,0x36,0x83 ] };
30655   /// Provides the event args for the corresponding event.
30656   HRESULT Invoke(
30657       /+[in]+/ ICoreWebView2Frame sender,
30658       /+[in]+/ ICoreWebView2DOMContentLoadedEventArgs args);
30659 }
30660 
30661 /// Receives `WebMessageReceived` events for iframe.
30662 const GUID IID_ICoreWebView2FrameWebMessageReceivedEventHandler = ICoreWebView2FrameWebMessageReceivedEventHandler.iid;
30663 
30664 interface ICoreWebView2FrameWebMessageReceivedEventHandler : IUnknown
30665 {
30666     static const GUID iid = { 0xe371e005,0x6d1d,0x4517,[ 0x93,0x4b,0xa8,0xf1,0x62,0x9c,0x62,0xa5 ] };
30667   /// Provides the event args for the corresponding event.
30668   HRESULT Invoke(
30669       /+[in]+/ ICoreWebView2Frame sender,
30670       /+[in]+/ ICoreWebView2WebMessageReceivedEventArgs args);
30671 }
30672 
30673 /// Event args for the `FrameCreated` events.
30674 const GUID IID_ICoreWebView2FrameCreatedEventArgs = ICoreWebView2FrameCreatedEventArgs.iid;
30675 
30676 interface ICoreWebView2FrameCreatedEventArgs : IUnknown
30677 {
30678     static const GUID iid = { 0x4d6e7b5e,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] };
30679   /// The frame which was created.
30680   @(" propget")
30681 	HRESULT get_Frame(@(" out, retval ") ICoreWebView2Frame *frame);
30682 }
30683 
30684 /// Receives `FrameDestroyed` event.
30685 const GUID IID_ICoreWebView2FrameDestroyedEventHandler = ICoreWebView2FrameDestroyedEventHandler.iid;
30686 
30687 interface ICoreWebView2FrameDestroyedEventHandler : IUnknown
30688 {
30689     static const GUID iid = { 0x59dd7b4c,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] };
30690   /// Provides the result for the iframe destroyed event.
30691   /// No event args exist and the `args` parameter is set to `null`.
30692   HRESULT Invoke(/+[in]+/ ICoreWebView2Frame  sender, /+[in]+/ IUnknown  args);
30693 }
30694 
30695 /// Add an event handler for the `DownloadStarting` event.
30696 const GUID IID_ICoreWebView2DownloadStartingEventHandler = ICoreWebView2DownloadStartingEventHandler.iid;
30697 
30698 interface ICoreWebView2DownloadStartingEventHandler : IUnknown
30699 {
30700     static const GUID iid = { 0xefedc989,0xc396,0x41ca,[ 0x83,0xf7,0x07,0xf8,0x45,0xa5,0x57,0x24 ] };
30701   /// Provides the event args for the corresponding event.
30702   HRESULT Invoke(
30703       /+[in]+/ ICoreWebView2 sender,
30704       /+[in]+/ ICoreWebView2DownloadStartingEventArgs args);
30705 }
30706 
30707 /// Event args for the `DownloadStarting` event.
30708 const GUID IID_ICoreWebView2DownloadStartingEventArgs = ICoreWebView2DownloadStartingEventArgs.iid;
30709 
30710 interface ICoreWebView2DownloadStartingEventArgs : IUnknown
30711 {
30712     static const GUID iid = { 0xe99bbe21,0x43e9,0x4544,[ 0xa7,0x32,0x28,0x27,0x64,0xea,0xfa,0x60 ] };
30713   /// Returns the `ICoreWebView2DownloadOperation` for the download that
30714   /// has started.
30715   @(" propget")
30716 	HRESULT get_DownloadOperation(
30717       @("out, retval") ICoreWebView2DownloadOperation * downloadOperation);
30718 
30719   /// The host may set this flag to cancel the download. If canceled, the
30720   /// download save dialog is not displayed regardless of the
30721   /// `Handled` property.
30722   @(" propget")
30723 	HRESULT get_Cancel(@("out, retval") BOOL* cancel);
30724 
30725   /// Sets the `Cancel` property.
30726   @(" propput")
30727 	HRESULT put_Cancel(in BOOL cancel);
30728 
30729   /// The path to the file. If setting the path, the host should ensure that it
30730   /// is an absolute path, including the file name, and that the path does not
30731   /// point to an existing file. If the path points to an existing file, the
30732   /// file will be overwritten. If the directory does not exist, it is created.
30733   ///
30734   /// The caller must free the returned string with `CoTaskMemFree`.  See
30735   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30736   @(" propget")
30737 	HRESULT get_ResultFilePath(@("out, retval") LPWSTR* resultFilePath);
30738 
30739   /// Sets the `ResultFilePath` property.
30740   @(" propput")
30741 	HRESULT put_ResultFilePath(in LPCWSTR resultFilePath);
30742 
30743   /// The host may set this flag to `TRUE` to hide the default download dialog
30744   /// for this download. The download will progress as normal if it is not
30745   /// canceled, there will just be no default UI shown. By default the value is
30746   /// `FALSE` and the default download dialog is shown.
30747   @(" propget")
30748 	HRESULT get_Handled(@("out, retval") BOOL* handled);
30749 
30750   /// Sets the `Handled` property.
30751   @(" propput")
30752 	HRESULT put_Handled(in BOOL handled);
30753 
30754   /// Returns an `ICoreWebView2Deferral` object.  Use this operation to
30755   /// complete the event at a later time.
30756   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
30757 }
30758 
30759 /// Implements the interface to receive `BytesReceivedChanged` event.  Use the
30760 /// `ICoreWebView2DownloadOperation.BytesReceived` property to get the received
30761 /// bytes count.
30762 const GUID IID_ICoreWebView2BytesReceivedChangedEventHandler = ICoreWebView2BytesReceivedChangedEventHandler.iid;
30763 
30764 interface ICoreWebView2BytesReceivedChangedEventHandler : IUnknown
30765 {
30766     static const GUID iid = { 0x828e8ab6,0xd94c,0x4264,[ 0x9c,0xef,0x52,0x17,0x17,0x0d,0x62,0x51 ] };
30767   /// Provides the event args for the corresponding event. No event args exist
30768   /// and the `args` parameter is set to `null`.
30769   HRESULT Invoke(
30770       /+[in]+/ ICoreWebView2DownloadOperation sender, /+[in]+/ IUnknown args);
30771 }
30772 
30773 /// Implements the interface to receive `EstimatedEndTimeChanged` event. Use the
30774 /// `ICoreWebView2DownloadOperation.EstimatedEndTime` property to get the new
30775 /// estimated end time.
30776 const GUID IID_ICoreWebView2EstimatedEndTimeChangedEventHandler = ICoreWebView2EstimatedEndTimeChangedEventHandler.iid;
30777 
30778 interface ICoreWebView2EstimatedEndTimeChangedEventHandler : IUnknown
30779 {
30780     static const GUID iid = { 0x28f0d425,0x93fe,0x4e63,[ 0x9f,0x8d,0x2a,0xee,0xc6,0xd3,0xba,0x1e ] };
30781   /// Provides the event args for the corresponding event. No event args exist
30782   /// and the `args` parameter is set to `null`.
30783   HRESULT Invoke(
30784       /+[in]+/ ICoreWebView2DownloadOperation sender, /+[in]+/ IUnknown args);
30785 }
30786 
30787 /// Implements the interface to receive `StateChanged` event. Use the
30788 /// `ICoreWebView2DownloadOperation.State` property to get the current state,
30789 /// which can be in progress, interrupted, or completed. Use the
30790 /// `ICoreWebView2DownloadOperation.InterruptReason` property to get the
30791 /// interrupt reason if the download is interrupted.
30792 const GUID IID_ICoreWebView2StateChangedEventHandler = ICoreWebView2StateChangedEventHandler.iid;
30793 
30794 interface ICoreWebView2StateChangedEventHandler : IUnknown
30795 {
30796     static const GUID iid = { 0x81336594,0x7ede,0x4ba9,[ 0xbf,0x71,0xac,0xf0,0xa9,0x5b,0x58,0xdd ] };
30797   /// Provides the event args for the corresponding event. No event args exist
30798   /// and the `args` parameter is set to `null`.
30799   HRESULT Invoke(
30800       /+[in]+/ ICoreWebView2DownloadOperation sender, /+[in]+/ IUnknown args);
30801 }
30802 
30803 /// Represents a download operation. Gives access to the download's metadata
30804 /// and supports a user canceling, pausing, or resuming the download.
30805 const GUID IID_ICoreWebView2DownloadOperation = ICoreWebView2DownloadOperation.iid;
30806 
30807 interface ICoreWebView2DownloadOperation : IUnknown
30808 {
30809     static const GUID iid = { 0x3d6b6cf2,0xafe1,0x44c7,[ 0xa9,0x95,0xc6,0x51,0x17,0x71,0x43,0x36 ] };
30810   /// Add an event handler for the `BytesReceivedChanged` event.
30811   ///
30812   /// \snippet ScenarioCustomDownloadExperience.cpp BytesReceivedChanged
30813   HRESULT add_BytesReceivedChanged(
30814     /+[in]+/ ICoreWebView2BytesReceivedChangedEventHandler eventHandler,
30815     @("out") EventRegistrationToken* token);
30816 
30817   /// Remove an event handler previously added with `add_BytesReceivedChanged`.
30818   HRESULT remove_BytesReceivedChanged(
30819       in EventRegistrationToken token);
30820 
30821   /// Add an event handler for the `EstimatedEndTimeChanged` event.
30822   HRESULT add_EstimatedEndTimeChanged(
30823     /+[in]+/ ICoreWebView2EstimatedEndTimeChangedEventHandler eventHandler,
30824     @("out") EventRegistrationToken* token);
30825 
30826   /// Remove an event handler previously added with `add_EstimatedEndTimeChanged`.
30827   HRESULT remove_EstimatedEndTimeChanged(
30828       in EventRegistrationToken token);
30829 
30830   /// Add an event handler for the `StateChanged` event.
30831   ///
30832   /// \snippet ScenarioCustomDownloadExperience.cpp StateChanged
30833   HRESULT add_StateChanged(
30834     /+[in]+/ ICoreWebView2StateChangedEventHandler eventHandler,
30835     @("out") EventRegistrationToken* token);
30836 
30837   /// Remove an event handler previously added with `add_StateChanged`.
30838   HRESULT remove_StateChanged(
30839       in EventRegistrationToken token);
30840 
30841   /// The URI of the download.
30842   ///
30843   /// The caller must free the returned string with `CoTaskMemFree`.  See
30844   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30845   @(" propget")
30846 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
30847 
30848   /// The Content-Disposition header value from the download's HTTP response.
30849   ///
30850   /// The caller must free the returned string with `CoTaskMemFree`.  See
30851   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30852   @(" propget")
30853 	HRESULT get_ContentDisposition(@("out, retval") LPWSTR* contentDisposition);
30854 
30855   /// MIME type of the downloaded content.
30856   ///
30857   /// The caller must free the returned string with `CoTaskMemFree`.  See
30858   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30859   @(" propget")
30860 	HRESULT get_MimeType(@("out, retval") LPWSTR* mimeType);
30861 
30862   /// The expected size of the download in total number of bytes based on the
30863   /// HTTP Content-Length header. Returns -1 if the size is unknown.
30864   @(" propget")
30865 	HRESULT get_TotalBytesToReceive(@("out, retval") INT64* totalBytesToReceive);
30866 
30867   /// The number of bytes that have been written to the download file.
30868   @(" propget")
30869 	HRESULT get_BytesReceived(@("out, retval") INT64* bytesReceived);
30870 
30871   /// The estimated end time in [ISO 8601 Date and Time Format](https://www.iso.org/iso-8601-date-and-time-format.html).
30872   ///
30873   /// The caller must free the returned string with `CoTaskMemFree`.  See
30874   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30875   @(" propget")
30876 	HRESULT get_EstimatedEndTime(@("out, retval") LPWSTR* estimatedEndTime);
30877 
30878   /// The absolute path to the download file, including file name. Host can change
30879   /// this from `ICoreWebView2DownloadStartingEventArgs`.
30880   ///
30881   /// The caller must free the returned string with `CoTaskMemFree`.  See
30882   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30883   @(" propget")
30884 	HRESULT get_ResultFilePath(@("out, retval") LPWSTR* resultFilePath);
30885 
30886   /// The state of the download. A download can be in progress, interrupted, or
30887   /// completed. See `COREWEBVIEW2_DOWNLOAD_STATE` for descriptions of states.
30888   @(" propget")
30889 	HRESULT get_State(@("out, retval") COREWEBVIEW2_DOWNLOAD_STATE* downloadState);
30890 
30891   /// The reason why connection with file host was broken.
30892   @(" propget")
30893 	HRESULT get_InterruptReason(
30894       @("out, retval") COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON* interruptReason);
30895 
30896   /// Cancels the download. If canceled, the default download dialog shows
30897   /// that the download was canceled. Host should set the `Cancel` property from
30898   /// `ICoreWebView2SDownloadStartingEventArgs` if the download should be
30899   /// canceled without displaying the default download dialog.
30900   HRESULT Cancel();
30901 
30902   /// Pauses the download. If paused, the default download dialog shows that the
30903   /// download is paused. No effect if download is already paused. Pausing a
30904   /// download changes the state to `COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED`
30905   /// with `InterruptReason` set to `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_PAUSED`.
30906   HRESULT Pause();
30907 
30908   /// Resumes a paused download. May also resume a download that was interrupted
30909   /// for another reason, if `CanResume` returns true. Resuming a download changes
30910   /// the state from `COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED` to
30911   /// `COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS`.
30912   HRESULT Resume();
30913 
30914   /// Returns true if an interrupted download can be resumed. Downloads with
30915   /// the following interrupt reasons may automatically resume without you
30916   /// calling any methods:
30917   /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE`,
30918   /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH`,
30919   /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT`.
30920   /// In these cases download progress may be restarted with `BytesReceived`
30921   /// reset to 0.
30922   @(" propget")
30923 	HRESULT get_CanResume(@("out, retval") BOOL* canResume);
30924 }
30925 
30926 /// A continuation of the `ICoreWebView2ProcessFailedEventArgs` interface.
30927 const GUID IID_ICoreWebView2ProcessFailedEventArgs2 = ICoreWebView2ProcessFailedEventArgs2.iid;
30928 
30929 interface ICoreWebView2ProcessFailedEventArgs2 : ICoreWebView2ProcessFailedEventArgs
30930 {
30931     static const GUID iid = { 0x4dab9422,0x46fa,0x4c3e,[ 0xa5,0xd2,0x41,0xd2,0x07,0x1d,0x36,0x80 ] };
30932 
30933   /// The reason for the process failure. Some of the reasons are only
30934   /// applicable to specific values of
30935   /// `ICoreWebView2ProcessFailedEventArgs::ProcessFailedKind`, and the
30936   /// following `ProcessFailedKind` values always return the indicated reason
30937   /// value:
30938   ///
30939   /// ProcessFailedKind | Reason
30940   /// ---|---
30941   /// COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED | COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED
30942   /// COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE | COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE
30943   ///
30944   /// For other `ProcessFailedKind` values, the reason may be any of the reason
30945   /// values. To learn about what these values mean, see
30946   /// `COREWEBVIEW2_PROCESS_FAILED_REASON`.
30947   @(" propget")
30948 	HRESULT get_Reason(
30949       @("out, retval") COREWEBVIEW2_PROCESS_FAILED_REASON* reason);
30950 
30951   /// The exit code of the failing process, for telemetry purposes. The exit
30952   /// code is always `STILL_ACTIVE` (`259`) when `ProcessFailedKind` is
30953   /// `COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE`.
30954   @(" propget")
30955 	HRESULT get_ExitCode(
30956       @("out, retval") int* exitCode);
30957 
30958   /// Description of the process assigned by the WebView2 Runtime. This is a
30959   /// technical English term appropriate for logging or development purposes,
30960   /// and not localized for the end user. It applies to utility processes (for
30961   /// example, "Audio Service", "Video Capture") and plugin processes (for
30962   /// example, "Flash"). The returned `processDescription` is empty if the
30963   /// WebView2 Runtime did not assign a description to the process.
30964   ///
30965   /// The caller must free the returned string with `CoTaskMemFree`.  See
30966   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30967   @(" propget")
30968 	HRESULT get_ProcessDescription(
30969       @("out, retval") LPWSTR* processDescription);
30970 
30971   /// The collection of `FrameInfo`s for frames in the `ICoreWebView2` that were
30972   /// being rendered by the failed process. The content in these frames is
30973   /// replaced with an error page.
30974   /// This is only available when `ProcessFailedKind` is
30975   /// `COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED`;
30976   /// `frames` is `null` for all other process failure kinds, including the case
30977   /// in which the failed process was the renderer for the main frame and
30978   /// subframes within it, for which the failure kind is
30979   /// `COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED`.
30980   @(" propget")
30981 	HRESULT get_FrameInfosForFailedProcess(
30982       @("out, retval") ICoreWebView2FrameInfoCollection * frames);
30983 }
30984 
30985 /// Collection of `FrameInfo`s (name and source). Used to list the affected
30986 /// frames' info when a frame-only render process failure occurs in the
30987 /// `ICoreWebView2`.
30988 const GUID IID_ICoreWebView2FrameInfoCollection = ICoreWebView2FrameInfoCollection.iid;
30989 
30990 interface ICoreWebView2FrameInfoCollection : IUnknown
30991 {
30992     static const GUID iid = { 0x8f834154,0xd38e,0x4d90,[ 0xaf,0xfb,0x68,0x00,0xa7,0x27,0x28,0x39 ] };
30993 
30994   /// Gets an iterator over the collection of `FrameInfo`s.
30995 
30996   HRESULT GetIterator(
30997       @("out, retval") ICoreWebView2FrameInfoCollectionIterator * iterator);
30998 }
30999 
31000 /// Iterator for a collection of `FrameInfo`s. For more info, see
31001 /// `ICoreWebView2ProcessFailedEventArgs2` and
31002 /// `ICoreWebView2FrameInfoCollection`.
31003 const GUID IID_ICoreWebView2FrameInfoCollectionIterator = ICoreWebView2FrameInfoCollectionIterator.iid;
31004 
31005 interface ICoreWebView2FrameInfoCollectionIterator : IUnknown
31006 {
31007     static const GUID iid = { 0x1bf89e2d,0x1b2b,0x4629,[ 0xb2,0x8f,0x05,0x09,0x9b,0x41,0xbb,0x03 ] };
31008 
31009   /// `TRUE` when the iterator has not run out of `FrameInfo`s.  If the
31010   /// collection over which the iterator is iterating is empty or if the
31011   /// iterator has gone past the end of the collection, then this is `FALSE`.
31012 
31013   @(" propget")
31014 	HRESULT get_HasCurrent(@("out, retval") BOOL* hasCurrent);
31015 
31016   /// Get the current `ICoreWebView2FrameInfo` of the iterator.
31017   /// Returns `HRESULT_FROM_WIN32(ERROR_INVALID_INDEX)` if HasCurrent is
31018   /// `FALSE`.
31019 
31020   HRESULT GetCurrent(@("out, retval") ICoreWebView2FrameInfo * frameInfo);
31021 
31022   /// Move the iterator to the next `FrameInfo` in the collection.
31023 
31024   HRESULT MoveNext(@("out, retval") BOOL* hasNext);
31025 }
31026 
31027 /// Provides a set of properties for a frame in the `ICoreWebView2`.
31028 const GUID IID_ICoreWebView2FrameInfo = ICoreWebView2FrameInfo.iid;
31029 
31030 interface ICoreWebView2FrameInfo : IUnknown
31031 {
31032     static const GUID iid = { 0xda86b8a1,0xbdf3,0x4f11,[ 0x99,0x55,0x52,0x8c,0xef,0xa5,0x97,0x27 ] };
31033 
31034   /// The name attribute of the frame, as in `<iframe name="frame-name" ...>`.
31035   /// The returned string is empty when the frame has no name attribute.
31036   ///
31037   /// The caller must free the returned string with `CoTaskMemFree`.  See
31038   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31039 
31040   @(" propget")
31041 	HRESULT get_Name(@("out, retval") LPWSTR* name);
31042 
31043   /// The URI of the document in the frame.
31044   ///
31045   /// The caller must free the returned string with `CoTaskMemFree`.  See
31046   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31047 
31048   @(" propget")
31049 	HRESULT get_Source(@("out, retval") LPWSTR* source);
31050 }
31051 
31052 /// A continuation of the ICoreWebView2FrameInfo interface that provides
31053 /// `ParentFrameInfo`, `FrameId` and `FrameKind` properties.
31054 const GUID IID_ICoreWebView2FrameInfo2 = ICoreWebView2FrameInfo2.iid;
31055 
31056 interface ICoreWebView2FrameInfo2 : ICoreWebView2FrameInfo
31057 {
31058     static const GUID iid = { 0x56f85cfa,0x72c4,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] };
31059   /// This parent frame's `FrameInfo`. `ParentFrameInfo` will only be
31060   /// populated when obtained via calling
31061   ///`CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos`.
31062   /// `CoreWebView2FrameInfo` objects obtained via `CoreWebView2.ProcessFailed` will
31063   /// always have a `null` `ParentFrameInfo`. This property is also `null` for the
31064   /// main frame in the WebView2 which has no parent frame.
31065   /// Note that this `ParentFrameInfo` could be out of date as it's a snapshot.
31066   @(" propget")
31067 	HRESULT get_ParentFrameInfo(@("out, retval") ICoreWebView2FrameInfo * frameInfo);
31068   /// The unique identifier of the frame associated with the current `FrameInfo`.
31069   /// It's the same kind of ID as with the `FrameId` in `CoreWebView2` and via
31070   /// `CoreWebView2Frame`. `FrameId` will only be populated (non-zero) when obtained
31071   /// calling `CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos`.
31072   /// `CoreWebView2FrameInfo` objects obtained via `CoreWebView2.ProcessFailed` will
31073   /// always have an invalid frame Id 0.
31074   /// Note that this `FrameId` could be out of date as it's a snapshot.
31075   /// If there's WebView2 created or destroyed or `FrameCreated/FrameDestroyed` events
31076   /// after the asynchronous call `CoreWebView2Environment.GetProcessExtendedInfos`
31077   /// starts, you may want to call asynchronous method again to get the updated `FrameInfo`s.
31078   @(" propget")
31079 	HRESULT get_FrameId(@("out, retval") UINT32* id);
31080   /// The frame kind of the frame. `FrameKind` will only be populated when
31081   /// obtained calling `CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos`.
31082   /// `CoreWebView2FrameInfo` objects obtained via `CoreWebView2.ProcessFailed`
31083   /// will always have the default value `COREWEBVIEW2_FRAME_KIND_UNKNOWN`.
31084   /// Note that this `FrameKind` could be out of date as it's a snapshot.
31085   @(" propget")
31086 	HRESULT get_FrameKind(@("out, retval") COREWEBVIEW2_FRAME_KIND* kind);
31087 }
31088 
31089 /// Represents a Basic HTTP authentication response that contains a user name
31090 /// and a password as according to RFC7617 (https://tools.ietf.org/html/rfc7617)
31091 const GUID IID_ICoreWebView2BasicAuthenticationResponse = ICoreWebView2BasicAuthenticationResponse.iid;
31092 
31093 interface ICoreWebView2BasicAuthenticationResponse : IUnknown
31094 {
31095     static const GUID iid = { 0x07023f7d,0x2d77,0x4d67,[ 0x90,0x40,0x6e,0x7d,0x42,0x8c,0x6a,0x40 ] };
31096   /// User name provided for authentication.
31097   ///
31098   /// The caller must free the returned string with `CoTaskMemFree`.  See
31099   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31100   @(" propget")
31101 	HRESULT get_UserName(@("out, retval") LPWSTR* userName);
31102   /// Set user name property
31103   @(" propput")
31104 	HRESULT put_UserName(in LPCWSTR userName);
31105 
31106   /// Password provided for authentication.
31107   ///
31108   /// The caller must free the returned string with `CoTaskMemFree`.  See
31109   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31110   @(" propget")
31111 	HRESULT get_Password(@("out, retval") LPWSTR* password);
31112   /// Set password property
31113   @(" propput")
31114 	HRESULT put_Password(in LPCWSTR password);
31115 }
31116 
31117 /// Event args for the BasicAuthenticationRequested event. Will contain the
31118 /// request that led to the HTTP authorization challenge, the challenge
31119 /// and allows the host to provide authentication response or cancel the request.
31120 const GUID IID_ICoreWebView2BasicAuthenticationRequestedEventArgs = ICoreWebView2BasicAuthenticationRequestedEventArgs.iid;
31121 
31122 interface ICoreWebView2BasicAuthenticationRequestedEventArgs : IUnknown
31123 {
31124     static const GUID iid = { 0xef05516f,0xd897,0x4f9e,[ 0xb6,0x72,0xd8,0xe2,0x30,0x7a,0x3f,0xb0 ] };
31125   /// The URI that led to the authentication challenge. For proxy authentication
31126   /// requests, this will be the URI of the proxy server.
31127   ///
31128   /// The caller must free the returned string with `CoTaskMemFree`.  See
31129   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31130   @(" propget")
31131 	HRESULT get_Uri(@("out, retval") LPWSTR* value);
31132 
31133   /// The authentication challenge string
31134   ///
31135   /// The caller must free the returned string with `CoTaskMemFree`.  See
31136   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31137   @(" propget")
31138 	HRESULT get_Challenge(@("out, retval") LPWSTR* challenge);
31139 
31140   /// Response to the authentication request with credentials. This object will be populated by the app
31141   /// if the host would like to provide authentication credentials.
31142   @(" propget")
31143 	HRESULT get_Response(@("out, retval") ICoreWebView2BasicAuthenticationResponse * response);
31144 
31145   /// Cancel the authentication request. False by default.
31146   /// If set to true, Response will be ignored.
31147   @(" propget")
31148 	HRESULT get_Cancel(@("out, retval") BOOL* cancel);
31149   /// Set the Cancel property.
31150   @(" propput")
31151 	HRESULT put_Cancel(in BOOL cancel);
31152 
31153   /// Returns an `ICoreWebView2Deferral` object. Use this deferral to
31154   /// defer the decision to show the Basic Authentication dialog.
31155   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
31156 }
31157 
31158 /// Implements the interface to receive `IsDocumentPlayingAudioChanged` events.  Use the
31159 /// IsDocumentPlayingAudio property to get the audio playing state.
31160 const GUID IID_ICoreWebView2IsDocumentPlayingAudioChangedEventHandler = ICoreWebView2IsDocumentPlayingAudioChangedEventHandler.iid;
31161 
31162 interface ICoreWebView2IsDocumentPlayingAudioChangedEventHandler : IUnknown
31163 {
31164     static const GUID iid = { 0x5DEF109A,0x2F4B,0x49FA,[ 0xB7,0xF6,0x11,0xC3,0x9E,0x51,0x33,0x28 ] };
31165   /// Provides the event args for the corresponding event.  No event args exist
31166   /// and the `args` parameter is set to `null`.
31167   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
31168 }
31169 
31170 /// Implements the interface to receive `IsMutedChanged` events.  Use the
31171 /// IsMuted property to get the mute state.
31172 const GUID IID_ICoreWebView2IsMutedChangedEventHandler = ICoreWebView2IsMutedChangedEventHandler.iid;
31173 
31174 interface ICoreWebView2IsMutedChangedEventHandler : IUnknown
31175 {
31176     static const GUID iid = { 0x57D90347,0xCD0E,0x4952,[ 0xA4,0xA2,0x74,0x83,0xA2,0x75,0x6F,0x08 ] };
31177   /// Provides the event args for the corresponding event.  No event args exist
31178   /// and the `args` parameter is set to `null`.
31179   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
31180 }
31181 
31182 /// This is an extension of the ICoreWebView2Frame interface that supports PermissionRequested
31183 const GUID IID_ICoreWebView2Frame3 = ICoreWebView2Frame3.iid;
31184 
31185 interface ICoreWebView2Frame3 : ICoreWebView2Frame2
31186 {
31187     static const GUID iid = { 0xb50d82cc,0xcc28,0x481d,[ 0x96,0x14,0xcb,0x04,0x88,0x95,0xe6,0xa0 ] };
31188   /// Add an event handler for the `PermissionRequested` event.
31189   /// `PermissionRequested` is raised when content in an iframe any of its
31190   /// descendant iframes requests permission to privileged resources.
31191   ///
31192   /// This relates to the `PermissionRequested` event on the `CoreWebView2`.
31193   /// Both these events will be raised in the case of an iframe requesting
31194   /// permission. The `CoreWebView2Frame`'s event handlers will be invoked
31195   /// before the event handlers on the `CoreWebView2`. If the `Handled` property
31196   /// of the `PermissionRequestedEventArgs` is set to TRUE within the
31197   /// `CoreWebView2Frame` event handler, then the event will not be
31198   /// raised on the `CoreWebView2`, and it's event handlers will not be invoked.
31199   ///
31200   /// In the case of nested iframes, the 'PermissionRequested' event will
31201   /// be raised from the top level iframe.
31202   ///
31203   /// If a deferral is not taken on the event args, the subsequent scripts are
31204   /// blocked until the event handler returns.  If a deferral is taken, the
31205   /// scripts are blocked until the deferral is completed.
31206   ///
31207   /// \snippet ScenarioIFrameDevicePermission.cpp PermissionRequested0
31208   /// \snippet ScenarioIFrameDevicePermission.cpp PermissionRequested1
31209   HRESULT add_PermissionRequested(
31210       /+[in]+/ ICoreWebView2FramePermissionRequestedEventHandler handler,
31211       @("out") EventRegistrationToken* token);
31212 
31213   /// Remove an event handler previously added with `add_PermissionRequested`
31214   HRESULT remove_PermissionRequested(
31215       in EventRegistrationToken token);
31216 }
31217 
31218 /// This is an extension of the ICoreWebView2Frame interface that supports shared buffer based on file mapping.
31219 const GUID IID_ICoreWebView2Frame4 = ICoreWebView2Frame4.iid;
31220 
31221 interface ICoreWebView2Frame4 : ICoreWebView2Frame3
31222 {
31223     static const GUID iid = { 0x188782DC,0x92AA,0x4732,[ 0xAB,0x3C,0xFC,0xC5,0x9F,0x6F,0x68,0xB9 ] };
31224   /// Share a shared buffer object with script of the iframe in the WebView.
31225   /// The script will receive a `sharedbufferreceived` event from chrome.webview.
31226   /// The event arg for that event will have the following methods and properties:
31227   ///   `getBuffer()`: return an ArrayBuffer object with the backing content from the shared buffer.
31228   ///   `additionalData`: an object as the result of parsing `additionalDataAsJson` as JSON string.
31229   ///           This property will be `undefined` if `additionalDataAsJson` is nullptr or empty string.
31230   ///   `source`: with a value set as `chrome.webview` object.
31231   /// If a string is provided as `additionalDataAsJson` but it is not a valid JSON string,
31232   /// the API will fail with `E_INVALIDARG`.
31233   /// If `access` is COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY, the script will only have read access to the buffer.
31234   /// If the script tries to modify the content in a read only buffer, it will cause an access
31235   /// violation in WebView renderer process and crash the renderer process.
31236   /// If the shared buffer is already closed, the API will fail with `RO_E_CLOSED`.
31237   ///
31238   /// The script code should call `chrome.webview.releaseBuffer` with
31239   /// the shared buffer as the parameter to release underlying resources as soon
31240   /// as it does not need access to the shared buffer any more.
31241   ///
31242   /// The application can post the same shared buffer object to multiple web pages or iframes, or
31243   /// post to the same web page or iframe multiple times. Each `PostSharedBufferToScript` will
31244   /// create a separate ArrayBuffer object with its own view of the memory and is separately
31245   /// released. The underlying shared memory will be released when all the views are released.
31246   ///
31247   /// For example, if we want to send data to script for one time read only consumption.
31248   ///
31249   /// \snippet ScenarioSharedBuffer.cpp OneTimeShareBuffer
31250   ///
31251   /// In the HTML document,
31252   ///
31253   /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_1
31254   ///
31255   /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_2
31256   ///
31257   /// Sharing a buffer to script has security risk. You should only share buffer with trusted site.
31258   /// If a buffer is shared to a untrusted site, possible sensitive information could be leaked.
31259   /// If a buffer is shared as modifiable by the script and the script modifies it in an unexpected way,
31260   /// it could result in corrupted data that might even crash the application.
31261   HRESULT PostSharedBufferToScript(
31262     /+[in]+/ ICoreWebView2SharedBuffer sharedBuffer,
31263     in COREWEBVIEW2_SHARED_BUFFER_ACCESS access,
31264     in LPCWSTR additionalDataAsJson);
31265 }
31266 
31267 /// This is an extension of the ICoreWebView2Frame interface that provides the `FrameId` property.
31268 const GUID IID_ICoreWebView2Frame5 = ICoreWebView2Frame5.iid;
31269 
31270 interface ICoreWebView2Frame5 : ICoreWebView2Frame4
31271 {
31272     static const GUID iid = { 0x99d199c4,0x7305,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] };
31273   /// The unique identifier of the current frame. It's the same kind of ID as
31274   /// with the `FrameId` in `CoreWebView2` and via `CoreWebView2FrameInfo`.
31275   @(" propget")
31276 	HRESULT get_FrameId(@("out, retval") UINT32* id);
31277 }
31278 
31279 /// Receives `PermissionRequested` events for iframes.
31280 const GUID IID_ICoreWebView2FramePermissionRequestedEventHandler = ICoreWebView2FramePermissionRequestedEventHandler.iid;
31281 
31282 interface ICoreWebView2FramePermissionRequestedEventHandler : IUnknown
31283 {
31284     static const GUID iid = { 0x845d0edd,0x8bd8,0x429b,[ 0x99,0x15,0x48,0x21,0x78,0x9f,0x23,0xe9 ] };
31285   /// Provides the event args for the corresponding event.
31286   HRESULT Invoke(
31287       /+[in]+/ ICoreWebView2Frame sender,
31288       /+[in]+/ ICoreWebView2PermissionRequestedEventArgs2 args);
31289 }
31290 
31291 /// This is a continuation of the `ICoreWebView2PermissionRequestedEventArgs` interface.
31292 const GUID IID_ICoreWebView2PermissionRequestedEventArgs2 = ICoreWebView2PermissionRequestedEventArgs2.iid;
31293 
31294 interface ICoreWebView2PermissionRequestedEventArgs2 : ICoreWebView2PermissionRequestedEventArgs
31295 {
31296     static const GUID iid = { 0x74d7127f,0x9de6,0x4200,[ 0x87,0x34,0x42,0xd6,0xfb,0x4f,0xf7,0x41 ] };
31297   /// By default, both the `PermissionRequested` event handlers on the
31298   /// `CoreWebView2Frame` and the `CoreWebView2` will be invoked, with the
31299   /// `CoreWebView2Frame` event handlers invoked first. The host may
31300   /// set this flag to `TRUE` within the `CoreWebView2Frame` event handlers
31301   /// to prevent the remaining `CoreWebView2` event handlers from being invoked.
31302   ///
31303   /// If a deferral is taken on the event args, then you must synchronously
31304   /// set `Handled` to TRUE prior to taking your deferral to prevent the
31305   /// `CoreWebView2`s event handlers from being invoked.
31306   @(" propget")
31307 	HRESULT get_Handled(@("out, retval") BOOL* handled);
31308 
31309   /// Sets the `Handled` property.
31310   @(" propput")
31311 	HRESULT put_Handled(in BOOL handled);
31312 }
31313 
31314 /// Represents a context menu item of a context menu displayed by WebView.
31315 const GUID IID_ICoreWebView2ContextMenuItem = ICoreWebView2ContextMenuItem.iid;
31316 
31317 interface ICoreWebView2ContextMenuItem : IUnknown
31318 {
31319     static const GUID iid = { 0x7aed49e3,0xa93f,0x497a,[ 0x81,0x1c,0x74,0x9c,0x6b,0x6b,0x6c,0x65 ] };
31320   /// Gets the unlocalized name for the `ContextMenuItem`. Use this to
31321   /// distinguish between context menu item types. This will be the English
31322   /// label of the menu item in lower camel case. For example, the "Save as"
31323   /// menu item will be "saveAs". Extension menu items will be "extension",
31324   /// custom menu items will be "custom" and spellcheck items will be
31325   /// "spellCheck".
31326   /// Some example context menu item names are:
31327   /// - "saveAs"
31328   /// - "copyImage"
31329   /// - "openLinkInNewWindow"
31330   /// - "cut"
31331   /// - "copy"
31332   /// - "paste"
31333   ///
31334   /// The caller must free the returned string with `CoTaskMemFree`.  See
31335   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31336   @(" propget")
31337 	HRESULT get_Name(@("out, retval") LPWSTR* value);
31338 
31339   /// Gets the localized label for the `ContextMenuItem`. Will contain an
31340   /// ampersand for characters to be used as keyboard accelerator.
31341   ///
31342   /// The caller must free the returned string with `CoTaskMemFree`.  See
31343   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31344   @(" propget")
31345 	HRESULT get_Label(@("out, retval") LPWSTR* value);
31346 
31347   /// Gets the Command ID for the `ContextMenuItem`. Use this to report the
31348   /// `SelectedCommandId` in `ContextMenuRequested` event.
31349   @(" propget")
31350 	HRESULT get_CommandId(@("out, retval") INT32* value);
31351 
31352   /// Gets the localized keyboard shortcut for this ContextMenuItem. It will be
31353   /// the empty string if there is no keyboard shortcut. This is text intended
31354   /// to be displayed to the end user to show the keyboard shortcut. For example
31355   /// this property is Ctrl+Shift+I for the "Inspect" `ContextMenuItem`.
31356   ///
31357   /// The caller must free the returned string with `CoTaskMemFree`.  See
31358   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31359   @(" propget")
31360 	HRESULT get_ShortcutKeyDescription(@("out, retval") LPWSTR* value);
31361 
31362   /// Gets the Icon for the `ContextMenuItem` in PNG, Bitmap or SVG formats in the form of an IStream.
31363   /// Stream will be rewound to the start of the image data.
31364   @(" propget")
31365 	HRESULT get_Icon(@("out, retval") IStream** value);
31366 
31367   /// Gets the `ContextMenuItem` kind.
31368   @(" propget")
31369 	HRESULT get_Kind(@("out, retval") COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND* value);
31370 
31371   /// Sets the enabled property of the `ContextMenuItem`. Must only be used in the case of a
31372   /// custom context menu item. The default value for this is `TRUE`.
31373   @(" propput")
31374 	HRESULT put_IsEnabled(in BOOL value);
31375 
31376   /// Gets the enabled property of the `ContextMenuItem`.
31377   @(" propget")
31378 	HRESULT get_IsEnabled(@("out, retval") BOOL* value);
31379 
31380   /// Sets the checked property of the `ContextMenuItem`. Must only be used for custom context
31381   /// menu items that are of kind Check box or Radio.
31382   @(" propput")
31383 	HRESULT put_IsChecked(in BOOL value);
31384 
31385   /// Gets the checked property of the `ContextMenuItem`, used if the kind is Check box or Radio.
31386   @(" propget")
31387 	HRESULT get_IsChecked(@("out, retval") BOOL* value);
31388 
31389   /// Gets the list of children menu items through a `ContextMenuItemCollection`
31390   /// if the kind is Submenu. If the kind is not submenu, will return null.
31391   @(" propget")
31392 	HRESULT get_Children(@("out, retval") ICoreWebView2ContextMenuItemCollection * value);
31393 
31394   /// Add an event handler for the `CustomItemSelected` event.
31395   /// `CustomItemSelected` event is raised when the user selects this `ContextMenuItem`.
31396   /// Will only be raised for end developer created context menu items
31397   HRESULT add_CustomItemSelected(
31398       /+[in]+/ ICoreWebView2CustomItemSelectedEventHandler eventHandler,
31399       @("out") EventRegistrationToken* token);
31400 
31401   /// Remove an event handler previously added with `add_CustomItemSelected`.
31402   HRESULT remove_CustomItemSelected(
31403       in EventRegistrationToken token);
31404 }
31405 
31406 /// Represents a collection of `ContextMenuItem` objects. Used to get, remove and add
31407 /// `ContextMenuItem` objects at the specified index.
31408 const GUID IID_ICoreWebView2ContextMenuItemCollection = ICoreWebView2ContextMenuItemCollection.iid;
31409 
31410 interface ICoreWebView2ContextMenuItemCollection : IUnknown
31411 {
31412     static const GUID iid = { 0xf562a2f5,0xc415,0x45cf,[ 0xb9,0x09,0xd4,0xb7,0xc1,0xe2,0x76,0xd3 ] };
31413   /// Gets the number of `ContextMenuItem` objects contained in the `ContextMenuItemCollection`.
31414   @(" propget")
31415 	HRESULT get_Count(@("out, retval") UINT32* value);
31416 
31417   /// Gets the `ContextMenuItem` at the specified index.
31418   HRESULT GetValueAtIndex(in UINT32 index,
31419       @("out, retval") ICoreWebView2ContextMenuItem * value);
31420 
31421   /// Removes the `ContextMenuItem` at the specified index.
31422   HRESULT RemoveValueAtIndex(in UINT32 index);
31423 
31424   /// Inserts the `ContextMenuItem` at the specified index.
31425   HRESULT InsertValueAtIndex(
31426       in UINT32 index,
31427         /+[in]+/ ICoreWebView2ContextMenuItem value);
31428 }
31429 
31430 /// Receives `ContextMenuRequested` events.
31431 const GUID IID_ICoreWebView2ContextMenuRequestedEventHandler = ICoreWebView2ContextMenuRequestedEventHandler.iid;
31432 
31433 interface ICoreWebView2ContextMenuRequestedEventHandler : IUnknown
31434 {
31435     static const GUID iid = { 0x04d3fe1d,0xab87,0x42fb,[ 0xa8,0x98,0xda,0x24,0x1d,0x35,0xb6,0x3c ] };
31436   /// Called to provide the event args when a context menu is requested on a
31437   /// WebView element.
31438   HRESULT Invoke(
31439       /+[in]+/ ICoreWebView2 sender,
31440       /+[in]+/ ICoreWebView2ContextMenuRequestedEventArgs args);
31441 }
31442 
31443 /// Raised to notify the host that the end user selected a custom
31444 /// `ContextMenuItem`. `CustomItemSelected` event is raised on the specific
31445 /// `ContextMenuItem` that the end user selected.
31446 const GUID IID_ICoreWebView2CustomItemSelectedEventHandler = ICoreWebView2CustomItemSelectedEventHandler.iid;
31447 
31448 interface ICoreWebView2CustomItemSelectedEventHandler : IUnknown
31449 {
31450     static const GUID iid = { 0x49e1d0bc,0xfe9e,0x4481,[ 0xb7,0xc2,0x32,0x32,0x4a,0xa2,0x19,0x98 ] };
31451   /// Provides the event args for the corresponding event. No event args exist
31452   /// and the `args` parameter is set to `null`.
31453   HRESULT Invoke(
31454       /+[in]+/ ICoreWebView2ContextMenuItem sender, /+[in]+/ IUnknown args);
31455 }
31456 
31457 /// Represents the information regarding the context menu target.
31458 /// Includes the context selected and the appropriate data used for the actions of a context menu.
31459 const GUID IID_ICoreWebView2ContextMenuTarget = ICoreWebView2ContextMenuTarget.iid;
31460 
31461 interface ICoreWebView2ContextMenuTarget : IUnknown
31462 {
31463     static const GUID iid = { 0xb8611d99,0xeed6,0x4f3f,[ 0x90,0x2c,0xa1,0x98,0x50,0x2a,0xd4,0x72 ] };
31464   /// Gets the kind of context that the user selected.
31465   @(" propget")
31466 	HRESULT get_Kind(@("out, retval") COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND* value);
31467 
31468   /// Returns TRUE if the context menu is requested on an editable component.
31469   @(" propget")
31470 	HRESULT get_IsEditable(@("out, retval") BOOL* value);
31471 
31472   /// Returns TRUE if the context menu was requested on the main frame and
31473   /// FALSE if invoked on another frame.
31474   @(" propget")
31475 	HRESULT get_IsRequestedForMainFrame(@("out, retval") BOOL* value);
31476 
31477   /// Gets the uri of the page.
31478   ///
31479   /// The caller must free the returned string with `CoTaskMemFree`.  See
31480   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31481   @(" propget")
31482 	HRESULT get_PageUri(@("out, retval") LPWSTR* value);
31483 
31484   /// Gets the uri of the frame. Will match the PageUri if `IsRequestedForMainFrame` is TRUE.
31485   ///
31486   /// The caller must free the returned string with `CoTaskMemFree`.  See
31487   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31488   @(" propget")
31489 	HRESULT get_FrameUri(@("out, retval") LPWSTR* value);
31490 
31491   /// Returns TRUE if the context menu is requested on HTML containing an anchor tag.
31492   @(" propget")
31493 	HRESULT get_HasLinkUri(@("out, retval") BOOL* value);
31494 
31495   /// Gets the uri of the link (if `HasLinkUri` is TRUE, null otherwise).
31496   ///
31497   /// The caller must free the returned string with `CoTaskMemFree`.  See
31498   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31499   @(" propget")
31500 	HRESULT get_LinkUri(@("out, retval") LPWSTR* value);
31501 
31502   /// Returns TRUE if the context menu is requested on text element that contains an anchor tag.
31503   @(" propget")
31504 	HRESULT get_HasLinkText(@("out, retval") BOOL* value);
31505 
31506   /// Gets the text of the link (if `HasLinkText` is TRUE, null otherwise).
31507   ///
31508   /// The caller must free the returned string with `CoTaskMemFree`.  See
31509   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31510   @(" propget")
31511 	HRESULT get_LinkText(@("out, retval") LPWSTR * value);
31512 
31513   /// Returns TRUE if the context menu is requested on HTML containing a source uri.
31514   @(" propget")
31515 	HRESULT get_HasSourceUri(@("out, retval") BOOL* value);
31516 
31517   /// Gets the active source uri of element (if `HasSourceUri` is TRUE, null otherwise).
31518   ///
31519   /// The caller must free the returned string with `CoTaskMemFree`.  See
31520   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31521   @(" propget")
31522 	HRESULT get_SourceUri(@("out, retval") LPWSTR* value);
31523 
31524   /// Returns TRUE if the context menu is requested on a selection.
31525   @(" propget")
31526 	HRESULT get_HasSelection(@("out, retval") BOOL* value);
31527 
31528   /// Gets the selected text (if `HasSelection` is TRUE, null otherwise).
31529   ///
31530   /// The caller must free the returned string with `CoTaskMemFree`.  See
31531   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31532   @(" propget")
31533 	HRESULT get_SelectionText(@("out, retval") LPWSTR* value);
31534 }
31535 
31536 /// Event args for the `ContextMenuRequested` event. Will contain the selection information
31537 /// and a collection of all of the default context menu items that the WebView
31538 /// would show. Allows the app to draw its own context menu or add/remove
31539 /// from the default context menu.
31540 const GUID IID_ICoreWebView2ContextMenuRequestedEventArgs = ICoreWebView2ContextMenuRequestedEventArgs.iid;
31541 
31542 interface ICoreWebView2ContextMenuRequestedEventArgs : IUnknown
31543 {
31544     static const GUID iid = { 0xa1d309ee,0xc03f,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
31545   /// Gets the collection of `ContextMenuItem` objects.
31546   /// See `ICoreWebView2ContextMenuItemCollection` for more details.
31547   @(" propget")
31548 	HRESULT get_MenuItems(@("out, retval") ICoreWebView2ContextMenuItemCollection * value);
31549 
31550   /// Gets the target information associated with the requested context menu.
31551   /// See `ICoreWebView2ContextMenuTarget` for more details.
31552   @(" propget")
31553 	HRESULT get_ContextMenuTarget(@("out, retval") ICoreWebView2ContextMenuTarget * value);
31554 
31555   /// Gets the coordinates where the context menu request occurred in relation to the upper
31556   /// left corner of the WebView bounds.
31557   @(" propget")
31558 	HRESULT get_Location(@("out, retval") POINT* value);
31559 
31560   /// Sets the selected context menu item's command ID. When this is set,
31561   /// WebView will execute the selected command. This
31562   /// value should always be obtained via the selected `ContextMenuItem`'s `CommandId` property.
31563   /// The default value is -1 which means that no selection occurred. The app can
31564   /// also report the selected command ID for a custom context menu item, which
31565   /// will cause the `CustomItemSelected` event to be fired for the custom item, however
31566   /// while command IDs for each custom context menu item is unique
31567   /// during a ContextMenuRequested event, CoreWebView2 may reassign command ID
31568   /// values of deleted custom ContextMenuItems to new objects and the command
31569   /// ID assigned to the same custom item can be different between each app runtime.
31570   @(" propput")
31571 	HRESULT put_SelectedCommandId(in INT32 value);
31572 
31573   /// Gets the selected CommandId.
31574   @(" propget")
31575 	HRESULT get_SelectedCommandId(@("out, retval") INT32* value);
31576 
31577   /// Sets whether the `ContextMenuRequested` event is handled by host after
31578   /// the event handler completes or if there is a deferral then after the deferral is completed.
31579   /// If `Handled` is set to TRUE then WebView will not display a context menu and will instead
31580   /// use the `SelectedCommandId` property to indicate which, if any, context menu item command to invoke.
31581   /// If after the event handler or deferral completes `Handled` is set to FALSE then WebView
31582   /// will display a context menu based on the contents of the `MenuItems` property.
31583   /// The default value is FALSE.
31584   @(" propput")
31585 	HRESULT put_Handled(in BOOL value);
31586 
31587   /// Gets whether the `ContextMenuRequested` event is handled by host.
31588   @(" propget")
31589 	HRESULT get_Handled(@("out, retval") BOOL* value);
31590 
31591   /// Returns an `ICoreWebView2Deferral` object. Use this operation to
31592   /// complete the event when the custom context menu is closed.
31593   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
31594 }
31595 
31596 /// This interface is used to manage profile options that created by 'CreateCoreWebView2ControllerOptions'.
31597 ///
31598 /// \snippet AppWindow.cpp CreateControllerWithOptions
31599 const GUID IID_ICoreWebView2ControllerOptions = ICoreWebView2ControllerOptions.iid;
31600 
31601 interface ICoreWebView2ControllerOptions : IUnknown
31602 {
31603     static const GUID iid = { 0x12aae616,0x8ccb,0x44ec,[ 0xbc,0xb3,0xeb,0x18,0x31,0x88,0x16,0x35 ] };
31604   /// `ProfileName` property is to specify a profile name, which is only allowed to contain
31605   /// the following ASCII characters. It has a maximum length of 64 characters excluding the null-terminator.
31606   /// It is ASCII case insensitive.
31607   ///
31608   /// * alphabet characters: a-z and A-Z
31609   /// * digit characters: 0-9
31610   /// * and '#', '@', '$', '(', ')', '+', '-', '_', '~', '.', ' ' (space).
31611   ///
31612   /// Note: the text must not end with a period '.' or ' ' (space). And, although upper-case letters are
31613   /// allowed, they're treated just as lower-case counterparts because the profile name will be mapped to
31614   /// the real profile directory path on disk and Windows file system handles path names in a case-insensitive way.
31615   ///
31616   /// The caller must free the returned string with `CoTaskMemFree`.  See
31617   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31618   @(" propget")
31619 	HRESULT get_ProfileName(@("out, retval") LPWSTR* value);
31620   /// Sets the `ProfileName` property.
31621   @(" propput")
31622 	HRESULT put_ProfileName(in LPCWSTR value);
31623 
31624   /// `IsInPrivateModeEnabled` property is to enable/disable InPrivate mode.
31625   @(" propget")
31626 	HRESULT get_IsInPrivateModeEnabled(@("out, retval") BOOL* value);
31627   /// Sets the `IsInPrivateModeEnabled` property.
31628   @(" propput")
31629 	HRESULT put_IsInPrivateModeEnabled(in BOOL value);
31630 }
31631 
31632 /// Provides a set of properties to configure a Profile object.
31633 ///
31634 /// \snippet AppWindow.cpp OnCreateCoreWebView2ControllerCompleted
31635 const GUID IID_ICoreWebView2Profile = ICoreWebView2Profile.iid;
31636 
31637 interface ICoreWebView2Profile : IUnknown
31638 {
31639     static const GUID iid = { 0x79110ad3,0xcd5d,0x4373,[ 0x8b,0xc3,0xc6,0x06,0x58,0xf1,0x7a,0x5f ] };
31640   /// Name of the profile.
31641   ///
31642   /// The caller must free the returned string with `CoTaskMemFree`.  See
31643   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31644   @(" propget")
31645 	HRESULT get_ProfileName(@("out, retval") LPWSTR* value);
31646 
31647   /// InPrivate mode is enabled or not.
31648   @(" propget")
31649 	HRESULT get_IsInPrivateModeEnabled(@("out, retval") BOOL* value);
31650 
31651   /// Full path of the profile directory.
31652   ///
31653   /// The caller must free the returned string with `CoTaskMemFree`.  See
31654   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31655   @(" propget")
31656 	HRESULT get_ProfilePath(@("out, retval") LPWSTR* value);
31657 
31658   /// Gets the `DefaultDownloadFolderPath` property. The default value is the
31659   /// system default download folder path for the user.
31660   ///
31661   /// The caller must free the returned string with `CoTaskMemFree`.  See
31662   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31663   @(" propget")
31664 	HRESULT get_DefaultDownloadFolderPath(@("out, retval") LPWSTR* value);
31665 
31666   /// Sets the `DefaultDownloadFolderPath` property. The default download folder
31667   /// path is persisted in the user data folder across sessions. The value
31668   /// should be an absolute path to a folder that the user and application can
31669   /// write to. Returns `E_INVALIDARG` if the value is invalid, and the default
31670   /// download folder path is not changed. Otherwise the path is changed
31671   /// immediately. If the directory does not yet exist, it is created at the
31672   /// time of the next download. If the host application does not have
31673   /// permission to create the directory, then the user is prompted to provide a
31674   /// new path through the Save As dialog. The user can override the default
31675   /// download folder path for a given download by choosing a different path in
31676   /// the Save As dialog.
31677   @(" propput")
31678 	HRESULT put_DefaultDownloadFolderPath(in LPCWSTR value);
31679 
31680   /// The PreferredColorScheme property sets the overall color scheme of the
31681   /// WebView2s associated with this profile. This sets the color scheme for
31682   /// WebView2 UI like dialogs, prompts, and context menus by setting the
31683   /// media feature `prefers-color-scheme` for websites to respond to.
31684   ///
31685   /// The default value for this is COREWEBVIEW2_PREFERRED_COLOR_AUTO,
31686   /// which will follow whatever theme the OS is currently set to.
31687   ///
31688   /// \snippet ViewComponent.cpp SetPreferredColorScheme
31689   /// Returns the value of the `PreferredColorScheme` property.
31690   @(" propget")
31691 	HRESULT get_PreferredColorScheme(
31692     @("out, retval") COREWEBVIEW2_PREFERRED_COLOR_SCHEME* value);
31693 
31694   /// Sets the `PreferredColorScheme` property.
31695   @(" propput")
31696 	HRESULT put_PreferredColorScheme(
31697     in COREWEBVIEW2_PREFERRED_COLOR_SCHEME value);
31698 }
31699 
31700 /// Provides access to the certificate metadata.
31701 const GUID IID_ICoreWebView2Certificate = ICoreWebView2Certificate.iid;
31702 
31703 interface ICoreWebView2Certificate : IUnknown
31704 {
31705     static const GUID iid = { 0xC5FB2FCE,0x1CAC,0x4AEE,[ 0x9C,0x79,0x5E,0xD0,0x36,0x2E,0xAA,0xE0 ] };
31706   /// Subject of the certificate.
31707   ///
31708   /// The caller must free the returned string with `CoTaskMemFree`. See
31709   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31710   @(" propget")
31711 	HRESULT get_Subject(@("out, retval") LPWSTR* value);
31712   /// Name of the certificate authority that issued the certificate.
31713   ///
31714   /// The caller must free the returned string with `CoTaskMemFree`. See
31715   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31716   @(" propget")
31717 	HRESULT get_Issuer(@("out, retval") LPWSTR* value);
31718   /// The valid start date and time for the certificate as the number of seconds since
31719   /// the UNIX epoch.
31720   @(" propget")
31721 	HRESULT get_ValidFrom(@("out, retval") double* value);
31722   /// The valid expiration date and time for the certificate as the number of seconds since
31723   /// the UNIX epoch.
31724   @(" propget")
31725 	HRESULT get_ValidTo(@("out, retval") double* value);
31726   /// Base64 encoding of DER encoded serial number of the certificate.
31727   /// Read more about DER at [RFC 7468 DER]
31728   /// (https://tools.ietf.org/html/rfc7468#appendix-B).
31729   ///
31730   /// The caller must free the returned string with `CoTaskMemFree`. See
31731   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31732   @(" propget")
31733 	HRESULT get_DerEncodedSerialNumber(@("out, retval") LPWSTR* value);
31734   /// Display name for a certificate.
31735   ///
31736   /// The caller must free the returned string with `CoTaskMemFree`. See
31737   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings)
31738   @(" propget")
31739 	HRESULT get_DisplayName(@("out, retval") LPWSTR* value);
31740   /// PEM encoded data for the certificate.
31741   /// Returns Base64 encoding of DER encoded certificate.
31742   /// Read more about PEM at [RFC 1421 Privacy Enhanced Mail]
31743   /// (https://tools.ietf.org/html/rfc1421).
31744   ///
31745   /// The caller must free the returned string with `CoTaskMemFree`. See
31746   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings)
31747   HRESULT ToPemEncoding(@("out, retval") LPWSTR* pemEncodedData);
31748   /// Collection of PEM encoded certificate issuer chain.
31749   /// In this collection first element is the current certificate followed by
31750   /// intermediate1, intermediate2...intermediateN-1. Root certificate is the
31751   /// last element in collection.
31752   @(" propget")
31753 	HRESULT get_PemEncodedIssuerCertificateChain(@("out, retval")
31754       ICoreWebView2StringCollection * value);
31755 }
31756 
31757 /// An event handler for the `ServerCertificateErrorDetected` event.
31758 const GUID IID_ICoreWebView2ServerCertificateErrorDetectedEventHandler = ICoreWebView2ServerCertificateErrorDetectedEventHandler.iid;
31759 
31760 interface ICoreWebView2ServerCertificateErrorDetectedEventHandler : IUnknown
31761 {
31762     static const GUID iid = { 0x969B3A26,0xD85E,0x4795,[ 0x81,0x99,0xFE,0xF5,0x73,0x44,0xDA,0x22 ] };
31763   /// Provides the event args for the corresponding event.
31764   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender,
31765       /+[in]+/ ICoreWebView2ServerCertificateErrorDetectedEventArgs
31766                      args);
31767 }
31768 
31769 /// Event args for the `ServerCertificateErrorDetected` event.
31770 const GUID IID_ICoreWebView2ServerCertificateErrorDetectedEventArgs = ICoreWebView2ServerCertificateErrorDetectedEventArgs.iid;
31771 
31772 interface ICoreWebView2ServerCertificateErrorDetectedEventArgs : IUnknown
31773 {
31774     static const GUID iid = { 0x012193ED,0x7C13,0x48FF,[ 0x96,0x9D,0xA8,0x4C,0x1F,0x43,0x2A,0x14 ] };
31775   /// The TLS error code for the invalid certificate.
31776   @(" propget")
31777 	HRESULT get_ErrorStatus(@("out, retval") COREWEBVIEW2_WEB_ERROR_STATUS* value);
31778 
31779   /// URI associated with the request for the invalid certificate.
31780   ///
31781   /// The caller must free the returned string with `CoTaskMemFree`.  See
31782   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31783   @(" propget")
31784 	HRESULT get_RequestUri(@("out, retval") LPWSTR* value);
31785 
31786   /// Returns the server certificate.
31787   @(" propget")
31788 	HRESULT get_ServerCertificate(@("out, retval") ICoreWebView2Certificate * value);
31789 
31790   /// The action of the server certificate error detection.
31791   /// The default value is `COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_DEFAULT`.
31792   @(" propget")
31793 	HRESULT get_Action(@("out, retval") COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION* value);
31794 
31795   /// Sets the `Action` property.
31796   @(" propput")
31797 	HRESULT put_Action(in COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION value);
31798 
31799   /// Returns an `ICoreWebView2Deferral` object. Use this operation to
31800   /// complete the event at a later time.
31801   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
31802 }
31803 
31804 /// Receives the result of the `ClearServerCertificateErrorActions` method.
31805 const GUID IID_ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler = ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler.iid;
31806 
31807 interface ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler : IUnknown
31808 {
31809     static const GUID iid = { 0x3B40AAC6,0xACFE,0x4FFD,[ 0x82,0x11,0xF6,0x07,0xB9,0x6E,0x2D,0x5B ] };
31810   /// Provides the result of the corresponding asynchronous method.
31811   HRESULT Invoke(in HRESULT errorCode);
31812 }
31813 
31814 /// Profile2 interface.
31815 ///
31816 const GUID IID_ICoreWebView2Profile2 = ICoreWebView2Profile2.iid;
31817 
31818 interface ICoreWebView2Profile2 : ICoreWebView2Profile
31819 {
31820     static const GUID iid = { 0xfa740d4b,0x5eae,0x4344,[ 0xa8,0xad,0x74,0xbe,0x31,0x92,0x53,0x97 ] };
31821 
31822   /// Clear browsing data based on a data type. This method takes two parameters,
31823   /// the first being a mask of one or more `COREWEBVIEW2_BROWSING_DATA_KINDS`. OR
31824   /// operation(s) can be applied to multiple `COREWEBVIEW2_BROWSING_DATA_KINDS` to
31825   /// create a mask representing those data types. The browsing data kinds that are
31826   /// supported are listed below. These data kinds follow a hierarchical structure in
31827   /// which nested bullet points are included in their parent bullet point's data kind.
31828   /// Ex: All DOM storage is encompassed in all site data which is encompassed in
31829   /// all profile data.
31830   /// * All Profile
31831   ///   * All Site Data
31832   ///     * All DOM Storage: File Systems, Indexed DB, Local Storage, Web SQL, Cache
31833   ///         Storage
31834   ///     * Cookies
31835   ///   * Disk Cache
31836   ///   * Download History
31837   ///   * General Autofill
31838   ///   * Password Autosave
31839   ///   * Browsing History
31840   ///   * Settings
31841   /// The completed handler will be invoked when the browsing data has been cleared and
31842   /// will indicate if the specified data was properly cleared. In the case in which
31843   /// the operation is interrupted and the corresponding data is not fully cleared
31844   /// the handler will return `E_ABORT` and otherwise will return `S_OK`.
31845   /// Because this is an asynchronous operation, code that is dependent on the cleared
31846   /// data must be placed in the callback of this operation.
31847   /// If the WebView object is closed before the clear browsing data operation
31848   /// has completed, the handler will be released, but not invoked. In this case
31849   /// the clear browsing data operation may or may not be completed.
31850   /// ClearBrowsingData clears the `dataKinds` regardless of timestamp.
31851 
31852   HRESULT ClearBrowsingData(
31853       in COREWEBVIEW2_BROWSING_DATA_KINDS dataKinds,
31854       /+[in]+/ ICoreWebView2ClearBrowsingDataCompletedHandler handler);
31855 
31856   /// ClearBrowsingDataInTimeRange behaves like ClearBrowsingData except that it
31857   /// takes in two additional parameters for the start and end time for which it
31858   /// should clear the data between.  The `startTime` and `endTime`
31859   /// parameters correspond to the number of seconds since the UNIX epoch.
31860   /// `startTime` is inclusive while `endTime` is exclusive, therefore the data will
31861   /// be cleared between [startTime, endTime).
31862 
31863   HRESULT ClearBrowsingDataInTimeRange(
31864       in COREWEBVIEW2_BROWSING_DATA_KINDS dataKinds,
31865       in double startTime,
31866       in double endTime,
31867       /+[in]+/ ICoreWebView2ClearBrowsingDataCompletedHandler handler);
31868 
31869   /// ClearBrowsingDataAll behaves like ClearBrowsingData except that it
31870   /// clears the entirety of the data associated with the profile it is called on.
31871   /// It clears the data regardless of timestamp.
31872   ///
31873   /// \snippet AppWindow.cpp ClearBrowsingData
31874 
31875   HRESULT ClearBrowsingDataAll(
31876     /+[in]+/ ICoreWebView2ClearBrowsingDataCompletedHandler handler);
31877 }
31878 
31879 /// The caller implements this interface to receive the ClearBrowsingData result.
31880 const GUID IID_ICoreWebView2ClearBrowsingDataCompletedHandler = ICoreWebView2ClearBrowsingDataCompletedHandler.iid;
31881 
31882 interface ICoreWebView2ClearBrowsingDataCompletedHandler : IUnknown
31883 {
31884     static const GUID iid = { 0xe9710a06,0x1d1d,0x49b2,[ 0x82,0x34,0x22,0x6f,0x35,0x84,0x6a,0xe5 ] };
31885 
31886   /// Provide the completion status of the corresponding asynchronous method.
31887   HRESULT Invoke(in HRESULT errorCode);
31888 }
31889 
31890 /// This is an extension of the ICoreWebView2Profile interface to control levels of tracking prevention.
31891 const GUID IID_ICoreWebView2Profile3 = ICoreWebView2Profile3.iid;
31892 
31893 interface ICoreWebView2Profile3 : ICoreWebView2Profile2
31894 {
31895     static const GUID iid = { 0xB188E659,0x5685,0x4E05,[ 0xBD,0xBA,0xFC,0x64,0x0E,0x0F,0x19,0x92 ] };
31896   /// The `PreferredTrackingPreventionLevel` property allows you to control levels of tracking prevention for WebView2
31897   /// which are associated with a profile. This level would apply to the context of the profile. That is, all WebView2s
31898   /// sharing the same profile will be affected and also the value is persisted in the user data folder.
31899   ///
31900   /// See `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL` for descriptions of levels.
31901   ///
31902   /// If tracking prevention feature is enabled when creating the WebView2 environment, you can also disable tracking
31903   /// prevention later using this property and `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE` value but that doesn't
31904   /// improves runtime performance.
31905   ///
31906   /// There is `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` property to enable/disable tracking prevention feature
31907   /// for all the WebView2's created in the same environment. If enabled, `PreferredTrackingPreventionLevel` is set to
31908   /// `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED` by default for all the WebView2's and profiles created in the same
31909   /// environment or is set to the level whatever value was last changed/persisted to the profile. If disabled
31910   /// `PreferredTrackingPreventionLevel` is not respected by WebView2. If `PreferredTrackingPreventionLevel` is set when the
31911   /// feature is disabled, the property value get changed and persisted but it will takes effect only if
31912   /// `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` is true.
31913   ///
31914   /// See `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` for more details.
31915   /// \snippet SettingsComponent.cpp SetTrackingPreventionLevel
31916   @(" propget")
31917 	HRESULT get_PreferredTrackingPreventionLevel(
31918       @("out, retval") COREWEBVIEW2_TRACKING_PREVENTION_LEVEL* value);
31919   /// Set the `PreferredTrackingPreventionLevel` property.
31920   ///
31921   /// If `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` is false, this property will be changed and persisted
31922   /// to the profile but the WebView2 ignores the level silently.
31923   @(" propput")
31924 	HRESULT put_PreferredTrackingPreventionLevel(
31925       in COREWEBVIEW2_TRACKING_PREVENTION_LEVEL value);
31926 }
31927 
31928 /// This interface is a handler for when the `Favicon` is changed.
31929 /// The sender is the ICoreWebView2 object the top-level document of
31930 /// which has changed favicon and the eventArgs is nullptr. Use the
31931 /// FaviconUri property and GetFavicon method to obtain the favicon
31932 /// data. The second argument is always null.
31933 /// For more information see `add_FaviconChanged`.
31934 const GUID IID_ICoreWebView2FaviconChangedEventHandler = ICoreWebView2FaviconChangedEventHandler.iid;
31935 
31936 interface ICoreWebView2FaviconChangedEventHandler : IUnknown
31937 {
31938     static const GUID iid = { 0x2913DA94,0x833D,0x4DE0,[ 0x8D,0xCA,0x90,0x0F,0xC5,0x24,0xA1,0xA4 ] };
31939   /// Called to notify the favicon changed. The event args are always null.
31940   HRESULT Invoke(
31941       /+[in]+/ ICoreWebView2 sender,
31942       /+[in]+/ IUnknown args);
31943 }
31944 
31945 /// This interface is a handler for the completion of the population of
31946 /// `imageStream`.
31947 /// `errorCode` returns S_OK if the API succeeded.
31948 /// The image is returned in the `faviconStream` object. If there is no image
31949 /// then no data would be copied into the imageStream.
31950 /// For more details, see the `GetFavicon` API.
31951 const GUID IID_ICoreWebView2GetFaviconCompletedHandler = ICoreWebView2GetFaviconCompletedHandler.iid;
31952 
31953 interface ICoreWebView2GetFaviconCompletedHandler : IUnknown
31954 {
31955     static const GUID iid = { 0xA2508329,0x7DA8,0x49D7,[ 0x8C,0x05,0xFA,0x12,0x5E,0x4A,0xEE,0x8D ] };
31956   /// Called to notify the favicon has been retrieved.
31957   HRESULT Invoke(
31958       in HRESULT errorCode,
31959       in IStream* faviconStream);
31960 }
31961 
31962 /// Represents the registration of a custom scheme with the
31963 /// CoreWebView2Environment.
31964 /// This allows the WebView2 app to be able to handle WebResourceRequested
31965 /// event for requests with the specified scheme and be able to navigate the
31966 /// WebView2 to the custom scheme. Once the environment is created, the
31967 /// registrations are valid and immutable throughout the lifetime of the
31968 /// associated WebView2s' browser process and any WebView2 environments
31969 /// sharing the browser process must be created with identical custom scheme
31970 /// registrations, otherwise the environment creation will fail.
31971 /// Any further attempts to register the same scheme will fail during environment creation.
31972 /// The URIs of registered custom schemes will be treated similar to http
31973 /// URIs for their origins.
31974 /// They will have tuple origins for URIs with host and opaque origins for
31975 /// URIs without host as specified in
31976 /// [7.5 Origin - HTML Living Standard](https://html.spec.whatwg.org/multipage/origin.html)
31977 ///
31978 /// Example:
31979 /// `custom-scheme-with-host://hostname/path/to/resource` has origin of
31980 /// `custom-scheme-with-host://hostname`.
31981 /// `custom-scheme-without-host:path/to/resource` has origin of
31982 /// `custom-scheme-without-host:path/to/resource`.
31983 /// For WebResourceRequested event, the cases of request URIs and filter URIs
31984 /// with custom schemes will be normalized according to generic URI syntax
31985 /// rules. Any non-ASCII characters will be preserved.
31986 /// The registered custom schemes also participate in
31987 /// [CORS](https://developer.mozilla.org/docs/Web/HTTP/CORS) and
31988 /// adheres to [CSP](https://developer.mozilla.org/docs/Web/HTTP/CSP).
31989 /// The app needs to set the appropriate access headers in its
31990 /// WebResourceRequested event handler to allow CORS requests.
31991 /// \snippet AppWindow.cpp CoreWebView2CustomSchemeRegistration
31992 const GUID IID_ICoreWebView2CustomSchemeRegistration = ICoreWebView2CustomSchemeRegistration.iid;
31993 
31994 interface ICoreWebView2CustomSchemeRegistration : IUnknown
31995 {
31996     static const GUID iid = { 0xd60ac92c,0x37a6,0x4b26,[ 0xa3,0x9e,0x95,0xcf,0xe5,0x90,0x47,0xbb ] };
31997   /// The name of the custom scheme to register.
31998   @(" propget")
31999 	HRESULT get_SchemeName(@("out, retval") LPWSTR* schemeName);
32000 
32001   /// Whether the sites with this scheme will be treated as a
32002   /// [Secure Context](https://developer.mozilla.org/docs/Web/Security/Secure_Contexts)
32003   /// like an HTTPS site. This flag is only effective when HasAuthorityComponent
32004   /// is also set to `true`.
32005   /// `false` by default.
32006   @(" propget")
32007 	HRESULT get_TreatAsSecure(@("out, retval") BOOL* treatAsSecure);
32008   /// Set if the scheme will be treated as a Secure Context.
32009   @(" propput")
32010 	HRESULT put_TreatAsSecure(in BOOL value);
32011 
32012   /// List of origins that are allowed to issue requests with the custom
32013   /// scheme, such as XHRs and subresource requests that have an Origin header.
32014   /// The origin of any request (requests that have the
32015   /// [Origin header](https://developer.mozilla.org/docs/Web/HTTP/Headers/Origin))
32016   /// to the custom scheme URI needs to be in this list. No-origin requests
32017   /// are requests that do not have an Origin header, such as link
32018   /// navigations, embedded images and are always allowed.
32019   /// Note: POST requests always contain an Origin header, therefore
32020   /// AllowedOrigins must be set for even for same origin POST requests.
32021   /// Note that cross-origin restrictions still apply.
32022   /// From any opaque origin (Origin header is null), no cross-origin requests
32023   /// are allowed.
32024   /// If the list is empty, no cross-origin request to this scheme is
32025   /// allowed.
32026   /// Origins are specified as a string in the format of
32027   /// scheme://host:port.
32028   /// The origins are string pattern matched with `*` (matches 0 or more
32029   /// characters) and `?` (matches 0 or 1 character) wildcards just like
32030   /// the URI matching in the
32031   /// [AddWebResourceRequestedFilter API](/dotnet/api/microsoft.web.webview2.core.corewebview2.addwebresourcerequestedfilter).
32032   /// For example, "http://*.example.com:80".
32033   /// Here's a set of examples of what is allowed and not:
32034   ///
32035   /// | Request URI | Originating URL | AllowedOrigins | Allowed |
32036   /// | -- | -- | -- | -- |
32037   /// | `custom-scheme:request` | `https://www.example.com` | {"https://www.example.com"} | Yes |
32038   /// | `custom-scheme:request` | `https://www.example.com` | {"https://*.example.com"} | Yes |
32039   /// | `custom-scheme:request` | `https://www.example.com` | {"https://www.example2.com"} | No |
32040   /// | `custom-scheme-with-authority://host/path` | `custom-scheme-with-authority://host2` | {""} | No |
32041   /// | `custom-scheme-with-authority://host/path` | `custom-scheme-with-authority2://host` | {"custom-scheme-with-authority2://*"} | Yes |
32042   /// | `custom-scheme-without-authority:path` | custom-scheme-without-authority:path2 | {"custom-scheme-without-authority:*"} | No |
32043   /// | `custom-scheme-without-authority:path` | custom-scheme-without-authority:path2 | {"*"} | Yes |
32044   ///
32045   /// The returned strings and the array itself must be deallocated with
32046   /// CoTaskMemFree.
32047   HRESULT GetAllowedOrigins(
32048     @("out") UINT32* allowedOriginsCount,
32049     @("out") LPWSTR** allowedOrigins);
32050   /// Set the array of origins that are allowed to use the scheme.
32051   HRESULT SetAllowedOrigins(
32052     in UINT32 allowedOriginsCount,
32053     in LPCWSTR* allowedOrigins);
32054 
32055   /// Set this property to `true` if the URIs with this custom
32056   /// scheme will have an authority component (a host for custom schemes).
32057   /// Specifically, if you have a URI of the following form you should set the
32058   /// `HasAuthorityComponent` value as listed.
32059   ///
32060   /// | URI | Recommended HasAuthorityComponent value |
32061   /// | -- | -- |
32062   /// | `custom-scheme-with-authority://host/path` | `true` |
32063   /// | `custom-scheme-without-authority:path` | `false` |
32064   ///
32065   /// When this property is set to `true`, the URIs with this scheme will be
32066   /// interpreted as having a
32067   /// [scheme and host](https://html.spec.whatwg.org/multipage/origin.html#concept-origin-tuple)
32068   /// origin similar to an http URI. Note that the port and user
32069   /// information are never included in the computation of origins for
32070   /// custom schemes.
32071   /// If this property is set to `false`, URIs with this scheme will have an
32072   /// [opaque origin](https://html.spec.whatwg.org/multipage/origin.html#concept-origin-opaque)
32073   /// similar to a data URI.
32074   /// This property is `false` by default.
32075   ///
32076   /// Note: For custom schemes registered as having authority component,
32077   /// navigations to URIs without authority of such custom schemes will fail.
32078   /// However, if the content inside WebView2 references
32079   /// a subresource with a URI that does not have
32080   /// an authority component, but of a custom scheme that is registered as
32081   /// having authority component, the URI will be interpreted as a relative path
32082   /// as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986).
32083   /// For example, `custom-scheme-with-authority:path` will be interpreted
32084   /// as `custom-scheme-with-authority://host/path`.
32085   /// However, this behavior cannot be guaranteed to remain in future
32086   /// releases so it is recommended not to rely on this behavior.
32087   @(" propget")
32088 	HRESULT get_HasAuthorityComponent(@("out, retval") BOOL* hasAuthorityComponent);
32089 
32090   /// Get has authority component.
32091   @(" propput")
32092 	HRESULT put_HasAuthorityComponent(in BOOL  hasAuthorityComponent);
32093 }
32094 
32095 /// This is a continuation of the `ICoreWebView2PermissionRequestedEventArgs2`
32096 /// interface.
32097 const GUID IID_ICoreWebView2PermissionRequestedEventArgs3 = ICoreWebView2PermissionRequestedEventArgs3.iid;
32098 
32099 interface ICoreWebView2PermissionRequestedEventArgs3 :
32100     ICoreWebView2PermissionRequestedEventArgs2
32101 {
32102     static const GUID iid = { 0xe61670bc,0x3dce,0x4177,[ 0x86,0xd2,0xc6,0x29,0xae,0x3c,0xb6,0xac ] };
32103   /// The permission state set from the `PermissionRequested` event is saved in
32104   /// the profile by default; it persists across sessions and becomes the new
32105   /// default behavior for future `PermissionRequested` events. Browser
32106   /// heuristics can affect whether the event continues to be raised when the
32107   /// state is saved in the profile. Set the `SavesInProfile` property to
32108   /// `FALSE` to not persist the state beyond the current request, and to
32109   /// continue to receive `PermissionRequested`
32110   /// events for this origin and permission kind.
32111   @(" propget")
32112 	HRESULT get_SavesInProfile(@("out, retval") BOOL* value);
32113 
32114   /// Sets the `SavesInProfile` property.
32115   @(" propput")
32116 	HRESULT put_SavesInProfile(in BOOL value);
32117 }
32118 
32119 /// The caller implements this interface to handle the result of
32120 /// `SetPermissionState`.
32121 const GUID IID_ICoreWebView2SetPermissionStateCompletedHandler = ICoreWebView2SetPermissionStateCompletedHandler.iid;
32122 
32123 interface ICoreWebView2SetPermissionStateCompletedHandler : IUnknown
32124 {
32125     static const GUID iid = { 0xfc77fb30,0x9c9e,0x4076,[ 0xb8,0xc7,0x76,0x44,0xa7,0x03,0xca,0x1b ] };
32126   /// Provide the completion status of the corresponding asynchronous method.
32127   HRESULT Invoke(in HRESULT errorCode);
32128 }
32129 
32130 /// The caller implements this interface to handle the result of
32131 /// `GetNonDefaultPermissionSettings`.
32132 const GUID IID_ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler = ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler.iid;
32133 
32134 interface ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler : IUnknown
32135 {
32136     static const GUID iid = { 0x38274481,0xa15c,0x4563,[ 0x94,0xcf,0x99,0x0e,0xdc,0x9a,0xeb,0x95 ] };
32137   /// Provides the permission setting collection for the requested permission kind.
32138   HRESULT Invoke(in HRESULT errorCode,
32139       /+[in]+/ ICoreWebView2PermissionSettingCollectionView collectionView);
32140 }
32141 
32142 /// This is the ICoreWebView2Profile interface for the permission management APIs.
32143 const GUID IID_ICoreWebView2Profile4 = ICoreWebView2Profile4.iid;
32144 
32145 interface ICoreWebView2Profile4 : ICoreWebView2Profile3
32146 {
32147     static const GUID iid = { 0x8F4ae680,0x192e,0x4eC8,[ 0x83,0x3a,0x21,0xcf,0xad,0xae,0xf6,0x28 ] };
32148   /// Sets permission state for the given permission kind and origin
32149   /// asynchronously. The change persists across sessions until it is changed by
32150   /// another call to `SetPermissionState`, or by setting the `State` property
32151   /// in `PermissionRequestedEventArgs`. Setting the state to
32152   /// `COREWEBVIEW2_PERMISSION_STATE_DEFAULT` will erase any state saved in the
32153   /// profile and restore the default behavior.
32154   /// The origin should have a valid scheme and host (e.g. "https://www.example.com"),
32155   /// otherwise the method fails with `E_INVALIDARG`. Additional URI parts like
32156   /// path and fragment are ignored. For example, "https://wwww.example.com/app1/index.html/"
32157   /// is treated the same as "https://wwww.example.com". See the
32158   /// [MDN origin definition](https://developer.mozilla.org/en-US/docs/Glossary/Origin)
32159   /// for more details.
32160   ///
32161   /// \snippet ScenarioPermissionManagement.cpp SetPermissionState
32162   HRESULT SetPermissionState(
32163         in COREWEBVIEW2_PERMISSION_KIND permissionKind,
32164         in LPCWSTR origin,
32165         in COREWEBVIEW2_PERMISSION_STATE state,
32166         /+[in]+/ ICoreWebView2SetPermissionStateCompletedHandler completedHandler);
32167 
32168   /// Invokes the handler with a collection of all nondefault permission settings.
32169   /// Use this method to get the permission state set in the current and previous
32170   /// sessions.
32171   ///
32172   /// \snippet ScenarioPermissionManagement.cpp GetNonDefaultPermissionSettings
32173   HRESULT GetNonDefaultPermissionSettings(
32174       /+[in]+/ ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler completedHandler);
32175 }
32176 
32177 /// Read-only collection of `PermissionSetting`s (origin, kind, and state). Used to list
32178 /// the nondefault permission settings on the profile that are persisted across
32179 /// sessions.
32180 const GUID IID_ICoreWebView2PermissionSettingCollectionView = ICoreWebView2PermissionSettingCollectionView.iid;
32181 
32182 interface ICoreWebView2PermissionSettingCollectionView : IUnknown
32183 {
32184     static const GUID iid = { 0xf5596f62,0x3de5,0x47b1,[ 0x91,0xe8,0xa4,0x10,0x4b,0x59,0x6b,0x96 ] };
32185   /// Gets the `ICoreWebView2PermissionSetting` at the specified index.
32186   HRESULT GetValueAtIndex(
32187       in UINT32 index,
32188       @("out, retval") ICoreWebView2PermissionSetting * permissionSetting);
32189 
32190   /// The number of `ICoreWebView2PermissionSetting`s in the collection.
32191   @(" propget")
32192 	HRESULT get_Count(@("out, retval") UINT32* value);
32193 }
32194 
32195 /// Provides a set of properties for a permission setting.
32196 const GUID IID_ICoreWebView2PermissionSetting = ICoreWebView2PermissionSetting.iid;
32197 
32198 interface ICoreWebView2PermissionSetting : IUnknown
32199 {
32200     static const GUID iid = { 0x792b6eca,0x5576,0x421c,[ 0x91,0x19,0x74,0xeb,0xb3,0xa4,0xff,0xb3 ] };
32201   /// The kind of the permission setting. See `COREWEBVIEW2_PERMISSION_KIND` for
32202   /// more details.
32203   @(" propget")
32204 	HRESULT get_PermissionKind(
32205       @("out, retval") COREWEBVIEW2_PERMISSION_KIND* value);
32206 
32207   /// The origin of the permission setting.
32208   @(" propget")
32209 	HRESULT get_PermissionOrigin(@("out, retval") LPWSTR* value);
32210 
32211   /// The state of the permission setting.
32212   @(" propget")
32213 	HRESULT get_PermissionState(
32214       @("out, retval") COREWEBVIEW2_PERMISSION_STATE* value);
32215 }
32216 
32217 /// This is the interface in ControllerOptions for ScriptLocale.
32218 const GUID IID_ICoreWebView2ControllerOptions2 = ICoreWebView2ControllerOptions2.iid;
32219 
32220 interface ICoreWebView2ControllerOptions2 : ICoreWebView2ControllerOptions
32221 {
32222     static const GUID iid = { 0x06c991d8,0x9e7e,0x11ed,[ 0xa8,0xfc,0x02,0x42,0xac,0x12,0x00,0x02 ] };
32223   /// The default locale for the WebView2.  It sets the default locale for all
32224   /// Intl JavaScript APIs and other JavaScript APIs that depend on it, namely
32225   /// `Intl.DateTimeFormat()` which affects string formatting like
32226   /// in the time/date formats. Example: `Intl.DateTimeFormat().format(new Date())`
32227   /// The intended locale value is in the format of
32228   /// BCP 47 Language Tags. More information can be found from
32229   /// [IETF BCP47](https://www.ietf.org/rfc/bcp/bcp47.html).
32230   ///
32231   /// This property sets the locale for a CoreWebView2Environment used to create the
32232   /// WebView2ControllerOptions object, which is passed as a parameter in
32233   /// `CreateCoreWebView2ControllerWithOptions`.
32234   ///
32235   /// Changes to the ScriptLocale property apply to renderer processes created after
32236   /// the change. Any existing renderer processes will continue to use the previous
32237   /// ScriptLocale value. To ensure changes are applied to all renderer process,
32238   /// close and restart the CoreWebView2Environment and all associated WebView2 objects.
32239   ///
32240   /// The default value for ScriptLocale will depend on the WebView2 language
32241   /// and OS region. If the language portions of the WebView2 language and OS region
32242   /// match, then it will use the OS region. Otherwise, it will use the WebView2
32243   /// language.
32244   ///
32245   /// | OS Region | WebView2 Language | Default WebView2 ScriptLocale |
32246   /// |-----------|-------------------|-------------------------------|
32247   /// | en-GB     | en-US             | en-GB                         |
32248   /// | es-MX     | en-US             | en-US                         |
32249   /// | en-US     | en-GB             | en-US                         |
32250   ///
32251   /// You can set the ScriptLocale to the empty string to get the default ScriptLocale value.
32252   ///
32253   /// Use OS specific APIs to determine the OS region to use with this property
32254   /// if you want to match the OS. For example:
32255   ///
32256   /// Win32 C++:
32257   /// ```cpp
32258   ///   wchar_t osLocale[LOCALE_NAME_MAX_LENGTH] = {0};
32259   ///   GetUserDefaultLocaleName(osLocale, LOCALE_NAME_MAX_LENGTH);
32260   /// ```
32261   ///
32262   /// The caller must free the returned string with `CoTaskMemFree`.  See
32263   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32264   /// \snippet AppWindow.cpp ScriptLocaleSetting
32265   @(" propget")
32266 	HRESULT get_ScriptLocale(@("out, retval") LPWSTR* locale);
32267   /// Sets the `ScriptLocale` property.
32268   @(" propput")
32269 	HRESULT put_ScriptLocale(in LPCWSTR locale);
32270 }
32271 
32272 /// The shared buffer object that is created by [CreateSharedBuffer](/microsoft-edge/webview2/reference/win32/icorewebview2environment12#createsharedbuffer).
32273 /// The object is presented to script as ArrayBuffer when posted to script with
32274 /// [PostSharedBufferToScript](/microsoft-edge/webview2/reference/win32/icorewebview2_17#postsharedbuffertoscript).
32275 const GUID IID_ICoreWebView2SharedBuffer = ICoreWebView2SharedBuffer.iid;
32276 
32277 interface ICoreWebView2SharedBuffer : IUnknown
32278 {
32279     static const GUID iid = { 0xB747A495,0x0C6F,0x449E,[ 0x97,0xB8,0x2F,0x81,0xE9,0xD6,0xAB,0x43 ] };
32280   /// The size of the shared buffer in bytes.
32281   @(" propget")
32282 	HRESULT get_Size(@("out, retval") UINT64* value);
32283 
32284   /// The memory address of the shared buffer.
32285   @(" propget")
32286 	HRESULT get_Buffer(@("out, retval") BYTE** value);
32287 
32288   /// Get an IStream object that can be used to access the shared buffer.
32289   HRESULT OpenStream(@("out, retval") IStream** value);
32290 
32291   /// Returns a handle to the file mapping object that backs this shared buffer.
32292   /// The returned handle is owned by the shared buffer object. You should not
32293   /// call CloseHandle on it.
32294   /// Normal app should use `Buffer` or `OpenStream` to get memory address
32295   /// or IStream object to access the buffer.
32296   /// For advanced scenarios, you could use file mapping APIs to obtain other views
32297   /// or duplicate this handle to another application process and create a view from
32298   /// the duplicated handle in that process to access the buffer from that separate process.
32299   @(" propget")
32300 	HRESULT get_FileMappingHandle(@("out, retval") HANDLE* value);
32301 
32302   /// Release the backing shared memory. The application should call this API when no
32303   /// access to the buffer is needed any more, to ensure that the underlying resources
32304   /// are released timely even if the shared buffer object itself is not released due to
32305   /// some leaked reference.
32306   /// After the shared buffer is closed, the buffer address and file mapping handle previously
32307   /// obtained becomes invalid and cannot be used anymore. Accessing properties of the object
32308   /// will fail with `RO_E_CLOSED`. Operations like Read or Write on the IStream objects returned
32309   /// from `OpenStream` will fail with `RO_E_CLOSED`. `PostSharedBufferToScript` will also
32310   /// fail with `RO_E_CLOSED`.
32311   ///
32312   /// The script code should call `chrome.webview.releaseBuffer` with
32313   /// the shared buffer as the parameter to release underlying resources as soon
32314   /// as it does not need access the shared buffer any more.
32315   /// When script tries to access the buffer after calling `chrome.webview.releaseBuffer`,
32316   /// JavaScript `TypeError` exception will be raised complaining about accessing a
32317   /// detached ArrayBuffer, the same exception when trying to access a transferred ArrayBuffer.
32318   ///
32319   /// Closing the buffer object on native side doesn't impact access from Script and releasing
32320   /// the buffer from script doesn't impact access to the buffer from native side.
32321   /// The underlying shared memory will be released by the OS when both native and script side
32322   /// release the buffer.
32323   HRESULT Close();
32324 }
32325 
32326 /// Representation of a DOM
32327 /// [File](https://developer.mozilla.org/en-US/docs/Web/API/File) object
32328 /// passed via WebMessage. You can use this object to obtain the path of a
32329 /// File dropped on WebView2.
32330 /// \snippet ScenarioDragDrop.cpp DroppedFilePath
32331 const GUID IID_ICoreWebView2File = ICoreWebView2File.iid;
32332 
32333 interface ICoreWebView2File : IUnknown
32334 {
32335     static const GUID iid = { 0xf2c19559,0x6bc1,0x4583,[ 0xa7,0x57,0x90,0x02,0x1b,0xe9,0xaf,0xec ] };
32336   /// Get the absolute file path.
32337   @(" propget")
32338 	HRESULT get_Path(@("out, retval") LPWSTR* path);
32339 }
32340 
32341 /// Read-only collection of generic objects.
32342 const GUID IID_ICoreWebView2ObjectCollectionView = ICoreWebView2ObjectCollectionView.iid;
32343 
32344 interface ICoreWebView2ObjectCollectionView : IUnknown
32345 {
32346     static const GUID iid = { 0x0f36fd87,0x4f69,0x4415,[ 0x98,0xda,0x88,0x8f,0x89,0xfb,0x9a,0x33 ] };
32347   /// Gets the number of items in the collection.
32348   @(" propget")
32349 	HRESULT get_Count(@("out, retval") UINT32* value);
32350 
32351   /// Gets the object at the specified index. Cast the object to the native type
32352   /// to access its specific properties.
32353   HRESULT GetValueAtIndex(in UINT32 index,
32354       @("out, retval") IUnknown * value);
32355 }
32356 
32357 /// Extension of WebMessageReceivedEventArgs to provide access to additional
32358 /// WebMessage objects.
32359 const GUID IID_ICoreWebView2WebMessageReceivedEventArgs2 = ICoreWebView2WebMessageReceivedEventArgs2.iid;
32360 
32361 interface ICoreWebView2WebMessageReceivedEventArgs2 : ICoreWebView2WebMessageReceivedEventArgs
32362 {
32363     static const GUID iid = { 0x06fc7ab7,0xc90c,0x4297,[ 0x93,0x89,0x33,0xca,0x01,0xcf,0x6d,0x5e ] };
32364   /// Additional received WebMessage objects. To pass `additionalObjects` via
32365   /// WebMessage to the app, use the
32366   /// `chrome.webview.postMessageWithAdditionalObjects` content API.
32367   /// Any DOM object type that can be natively representable that has been
32368   /// passed in to `additionalObjects` parameter will be accessible here.
32369   /// Currently a WebMessage object can be the `ICoreWebView2File` type.
32370   /// Entries in the collection can be `nullptr` if `null` or `undefined` was
32371   /// passed.
32372   @(" propget")
32373 	HRESULT get_AdditionalObjects(
32374       @("out, retval") ICoreWebView2ObjectCollectionView * value);
32375 }
32376 
32377 /// This is the ICoreWebView2Profile interface for cookie manager.
32378 const GUID IID_ICoreWebView2Profile5 = ICoreWebView2Profile5.iid;
32379 
32380 interface ICoreWebView2Profile5 : ICoreWebView2Profile4
32381 {
32382     static const GUID iid = { 0x2EE5B76E,0x6E80,0x4DF2,[ 0xBC,0xD3,0xD4,0xEC,0x33,0x40,0xA0,0x1B ] };
32383   /// Get the cookie manager for the profile. All CoreWebView2s associated with this
32384   /// profile share the same cookie values. Changes to cookies in this cookie manager apply to all
32385   /// CoreWebView2s associated with this profile.
32386   /// See ICoreWebView2CookieManager.
32387   ///
32388   /// \snippet ScenarioCookieManagement.cpp CookieManagerProfile
32389   @(" propget")
32390 	HRESULT get_CookieManager(@("out, retval") ICoreWebView2CookieManager * cookieManager);
32391 }
32392 
32393 /// Interfaces in profile for managing password-autosave and general-autofill.
32394 const GUID IID_ICoreWebView2Profile6 = ICoreWebView2Profile6.iid;
32395 
32396 interface ICoreWebView2Profile6 : ICoreWebView2Profile5
32397 {
32398     static const GUID iid = { 0xBD82FA6A,0x1D65,0x4C33,[ 0xB2,0xB4,0x03,0x93,0x02,0x0C,0xC6,0x1B ] };
32399   /// IsPasswordAutosaveEnabled controls whether autosave for password
32400   /// information is enabled. The IsPasswordAutosaveEnabled property behaves
32401   /// independently of the IsGeneralAutofillEnabled property. When IsPasswordAutosaveEnabled is
32402   /// false, no new password data is saved and no Save/Update Password prompts are displayed.
32403   /// However, if there was password data already saved before disabling this setting,
32404   /// then that password information is auto-populated, suggestions are shown and clicking on
32405   /// one will populate the fields.
32406   /// When IsPasswordAutosaveEnabled is true, password information is auto-populated,
32407   /// suggestions are shown and clicking on one will populate the fields, new data
32408   /// is saved, and a Save/Update Password prompt is displayed.
32409   /// It will take effect immediately after setting.
32410   /// The default value is `FALSE`.
32411   /// This property has the same value as
32412   /// `CoreWebView2Settings.IsPasswordAutosaveEnabled`, and changing one will
32413   /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile`
32414   /// will share the same value for this property, so for the `CoreWebView2`s
32415   /// with the same profile, their
32416   /// `CoreWebView2Settings.IsPasswordAutosaveEnabled` and
32417   /// `CoreWebView2Profile.IsPasswordAutosaveEnabled` will always have the same
32418   /// value.
32419   ///
32420   /// \snippet SettingsComponent.cpp ToggleProfilePasswordAutosaveEnabled
32421   @(" propget")
32422 	HRESULT get_IsPasswordAutosaveEnabled(@("out, retval") BOOL* value);
32423 
32424   /// Set the IsPasswordAutosaveEnabled property.
32425   @(" propput")
32426 	HRESULT put_IsPasswordAutosaveEnabled(in BOOL value);
32427 
32428   /// IsGeneralAutofillEnabled controls whether autofill for information
32429   /// like names, street and email addresses, phone numbers, and arbitrary input
32430   /// is enabled. This excludes password and credit card information. When
32431   /// IsGeneralAutofillEnabled is false, no suggestions appear, and no new information
32432   /// is saved. When IsGeneralAutofillEnabled is true, information is saved, suggestions
32433   /// appear and clicking on one will populate the form fields.
32434   /// It will take effect immediately after setting.
32435   /// The default value is `TRUE`.
32436   /// This property has the same value as
32437   /// `CoreWebView2Settings.IsGeneralAutofillEnabled`, and changing one will
32438   /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile`
32439   /// will share the same value for this property, so for the `CoreWebView2`s
32440   /// with the same profile, their
32441   /// `CoreWebView2Settings.IsGeneralAutofillEnabled` and
32442   /// `CoreWebView2Profile.IsGeneralAutofillEnabled` will always have the same
32443   /// value.
32444   ///
32445   /// \snippet SettingsComponent.cpp ToggleProfileGeneralAutofillEnabled
32446   @(" propget")
32447 	HRESULT get_IsGeneralAutofillEnabled(@("out, retval") BOOL* value);
32448 
32449   /// Set the IsGeneralAutofillEnabled property.
32450   @(" propput")
32451 	HRESULT put_IsGeneralAutofillEnabled(in BOOL value);
32452 }
32453 
32454 /// This is a continuation of the `ICoreWebView2NewWindowRequestedEventArgs` interface.
32455 const GUID IID_ICoreWebView2NewWindowRequestedEventArgs3 = ICoreWebView2NewWindowRequestedEventArgs3.iid;
32456 
32457 interface ICoreWebView2NewWindowRequestedEventArgs3 : ICoreWebView2NewWindowRequestedEventArgs2
32458 {
32459     static const GUID iid = { 0x842bed3c,0x6ad6,0x4dd9,[ 0xb9,0x38,0x28,0xc9,0x66,0x67,0xad,0x66 ] };
32460   /// The frame info of the frame where the new window request originated. The
32461   /// `OriginalSourceFrameInfo` is a snapshot of frame information at the time when the
32462   /// new window was requested. See `ICoreWebView2FrameInfo` for details on frame
32463   /// properties.
32464   @(" propget")
32465 	HRESULT get_OriginalSourceFrameInfo(
32466       @("out, retval") ICoreWebView2FrameInfo * frameInfo);
32467 }
32468 
32469 /// Interfaces in profile for managing browser extensions.
32470 const GUID IID_ICoreWebView2Profile7 = ICoreWebView2Profile7.iid;
32471 
32472 interface ICoreWebView2Profile7 : ICoreWebView2Profile6
32473 {
32474     static const GUID iid = { 0x7b4c7906,0xa1aa,0x4cb4,[ 0xb7,0x23,0xdb,0x09,0xf8,0x13,0xd5,0x41 ] };
32475     /// Adds the [browser extension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions)
32476     /// using the extension path for unpacked extensions from the local device. Extension is
32477     /// running right after installation.
32478     /// The extension folder path is the topmost folder of an unpacked browser extension and
32479     /// contains the browser extension manifest file.
32480     /// If the `extensionFolderPath` is an invalid path or doesn't contain the extension manifest.json
32481     /// file, this function will return `ERROR_FILE_NOT_FOUND` to callers.
32482     /// Installed extension will default `IsEnabled` to true.
32483     /// When `AreBrowserExtensionsEnabled` is `FALSE`, `AddBrowserExtension` will fail and return
32484     /// HRESULT `ERROR_NOT_SUPPORTED`.
32485     /// During installation, the content of the extension is not copied to the user data folder.
32486     /// Once the extension is installed, changing the content of the extension will cause the
32487     /// extension to be removed from the installed profile.
32488     /// When an extension is added the extension is persisted in the corresponding profile. The
32489     /// extension will still be installed the next time you use this profile.
32490     /// When an extension is installed from a folder path, adding the same extension from the same
32491     /// folder path means reinstalling this extension. When two extensions with the same Id are
32492     /// installed, only the later installed extension will be kept.
32493     ///
32494     /// Extensions that are designed to include any UI interactions (e.g. icon, badge, pop up, etc.)
32495     /// can be loaded and used but will have missing UI entry points due to the lack of browser
32496     /// UI elements to host these entry points in WebView2.
32497     ///
32498     /// The following summarizes the possible error values that can be returned from
32499     /// `AddBrowserExtension` and a description of why these errors occur.
32500     ///
32501     /// Error value                                     | Description
32502     /// ----------------------------------------------- | --------------------------
32503     /// `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)`       | Extensions are disabled.
32504     /// `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)`      | Cannot find `manifest.json` file or it is not a valid extension manifest.
32505     /// `E_ACCESSDENIED`                                | Cannot load extension with file or directory name starting with \"_\", reserved for use by the system.
32506     /// `E_FAIL`                                        | Extension failed to install with other unknown reasons.
32507     HRESULT AddBrowserExtension(in LPCWSTR extensionFolderPath, /+[in]+/ ICoreWebView2ProfileAddBrowserExtensionCompletedHandler handler);
32508     /// Gets a snapshot of the set of extensions installed at the time `GetBrowserExtensions` is
32509     /// called. If an extension is installed or uninstalled after `GetBrowserExtensions` completes,
32510     /// the list returned by `GetBrowserExtensions` remains the same.
32511     /// When `AreBrowserExtensionsEnabled` is `FALSE`, `GetBrowserExtensions` won't return any
32512     /// extensions on current user profile.
32513     HRESULT GetBrowserExtensions(/+[in]+/ ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler handler);
32514 }
32515 
32516 /// Provides a set of properties for managing an Extension, which includes
32517 /// an ID, name, and whether it is enabled or not, and the ability to Remove
32518 /// the Extension, and enable or disable it.
32519 const GUID IID_ICoreWebView2BrowserExtension = ICoreWebView2BrowserExtension.iid;
32520 
32521 interface ICoreWebView2BrowserExtension : IUnknown
32522 {
32523     static const GUID iid = { 0x7EF7FFA0,0xFAC5,0x462C,[ 0xB1,0x89,0x3D,0x9E,0xDB,0xE5,0x75,0xDA ] };
32524     /// This is the browser extension's ID. This is the same browser extension ID returned by
32525     /// the browser extension API [`chrome.runtime.id`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/id).
32526     /// Please see that documentation for more details on how the ID is generated.
32527     /// After an extension is removed, calling `Id` will return the id of the extension that is removed.
32528     /// The caller must free the returned string with `CoTaskMemFree`.  See
32529     /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32530     @(" propget")
32531 	HRESULT get_Id(@("out, retval") LPWSTR* value);
32532     /// This is the browser extension's name. This value is defined in this browser extension's
32533     /// manifest.json file. If manifest.json define extension's localized name, this value will
32534     /// be the localized version of the name.
32535     /// Please see [Manifest.json name](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/name)
32536     /// for more details.
32537     /// After an extension is removed, calling `Name` will return the name of the extension that is removed.
32538     /// The caller must free the returned string with `CoTaskMemFree`.  See
32539     /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32540     @(" propget")
32541 	HRESULT get_Name(@("out, retval") LPWSTR* value);
32542     /// Removes this browser extension from its WebView2 Profile. The browser extension is removed
32543     /// immediately including from all currently running HTML documents associated with this
32544     /// WebView2 Profile. The removal is persisted and future uses of this profile will not have this
32545     /// extension installed. After an extension is removed, calling `Remove` again will cause an exception.
32546     HRESULT Remove(/+[in]+/ ICoreWebView2BrowserExtensionRemoveCompletedHandler handler);
32547     /// If `isEnabled` is true then the Extension is enabled and running in WebView instances.
32548     /// If it is false then the Extension is disabled and not running in WebView instances.
32549     /// When a Extension is first installed, `IsEnable` are default to be `TRUE`.
32550     /// `isEnabled` is persisted per profile.
32551     /// After an extension is removed, calling `isEnabled` will return the value at the time it was removed.
32552     @(" propget")
32553 	HRESULT get_IsEnabled(@("out, retval") BOOL* value);
32554     /// Sets whether this browser extension is enabled or disabled. This change applies immediately
32555     /// to the extension in all HTML documents in all WebView2s associated with this profile.
32556     /// After an extension is removed, calling `Enable` will not change the value of `IsEnabled`.
32557     HRESULT Enable(in BOOL isEnabled, /+[in]+/ ICoreWebView2BrowserExtensionEnableCompletedHandler handler);
32558 }
32559 
32560 /// The caller implements this interface to receive the result of removing
32561 /// the browser Extension from the Profile.
32562 const GUID IID_ICoreWebView2BrowserExtensionRemoveCompletedHandler = ICoreWebView2BrowserExtensionRemoveCompletedHandler.iid;
32563 
32564 interface ICoreWebView2BrowserExtensionRemoveCompletedHandler : IUnknown
32565 {
32566     static const GUID iid = { 0x8E41909A,0x9B18,0x4BB1,[ 0x8C,0xDF,0x93,0x0F,0x46,0x7A,0x50,0xBE ] };
32567     /// Provides the result of the browser extension Remove operation.
32568     HRESULT Invoke(in HRESULT errorCode);
32569 }
32570 
32571 /// The caller implements this interface to receive the result of setting the
32572 /// browser Extension as enabled or disabled. If enabled, the browser Extension is
32573 /// running in WebView instances. If disabled, the browser Extension is not running in WebView instances.
32574 const GUID IID_ICoreWebView2BrowserExtensionEnableCompletedHandler = ICoreWebView2BrowserExtensionEnableCompletedHandler.iid;
32575 
32576 interface ICoreWebView2BrowserExtensionEnableCompletedHandler : IUnknown
32577 {
32578     static const GUID iid = { 0x30C186CE,0x7FAD,0x421F,[ 0xA3,0xBC,0xA8,0xEA,0xF0,0x71,0xDD,0xB8 ] };
32579     /// Provides the result of the browser extension enable operation.
32580     HRESULT Invoke(in HRESULT errorCode);
32581 }
32582 
32583 /// Provides a set of properties for managing browser Extension Lists from user profile. This
32584 /// includes the number of browser Extensions in the list, and the ability to get an browser
32585 /// Extension from the list at a particular index.
32586 const GUID IID_ICoreWebView2BrowserExtensionList = ICoreWebView2BrowserExtensionList.iid;
32587 
32588 interface ICoreWebView2BrowserExtensionList : IUnknown
32589 {
32590     static const GUID iid = { 0x2EF3D2DC,0xBD5F,0x4F4D,[ 0x90,0xAF,0xFD,0x67,0x79,0x8F,0x0C,0x2F ] };
32591     /// The number of browser Extensions in the list.
32592     @(" propget")
32593 	HRESULT get_Count(@("out, retval") UINT* count);
32594     /// Gets the browser Extension located in the browser Extension List at the given index.
32595     HRESULT GetValueAtIndex(in UINT index,
32596 		@("out, retval") ICoreWebView2BrowserExtension * extension);
32597 }
32598 
32599 /// The caller implements this interface to receive the result of
32600 /// getting the browser Extensions.
32601 const GUID IID_ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler = ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler.iid;
32602 
32603 interface ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler : IUnknown
32604 {
32605     static const GUID iid = { 0xFCE16A1C,0xF107,0x4601,[ 0x8B,0x75,0xFC,0x49,0x40,0xAE,0x25,0xD0 ] };
32606     /// Provides the browser extension list for the requested user profile.
32607     HRESULT Invoke(in HRESULT errorCode, /+[in]+/ ICoreWebView2BrowserExtensionList extensionList);
32608 }
32609 
32610 /// The caller implements this interface to receive the result
32611 /// of loading an browser Extension.
32612 const GUID IID_ICoreWebView2ProfileAddBrowserExtensionCompletedHandler = ICoreWebView2ProfileAddBrowserExtensionCompletedHandler.iid;
32613 
32614 interface ICoreWebView2ProfileAddBrowserExtensionCompletedHandler : IUnknown
32615 {
32616     static const GUID iid = { 0xDF1AAB27,0x82B9,0x4AB6,[ 0xAA,0xE8,0x01,0x7A,0x49,0x39,0x8C,0x14 ] };
32617     /// Provides the result of the `AddBrowserExtension` operation.g
32618     HRESULT Invoke(in HRESULT errorCode, /+[in]+/ ICoreWebView2BrowserExtension extension);
32619 }
32620 
32621 /// This is the profile interface that manages profile
32622 /// deletion.
32623 const GUID IID_ICoreWebView2Profile8 = ICoreWebView2Profile8.iid;
32624 
32625 interface ICoreWebView2Profile8 : ICoreWebView2Profile7
32626 {
32627     static const GUID iid = { 0xfbf70c2f,0xeb1f,0x4383,[ 0x85,0xa0,0x16,0x3e,0x92,0x04,0x40,0x11 ] };
32628   /// After the API is called, the profile will be marked for deletion. The
32629   /// local profile's directory will be deleted at browser process exit. If it
32630   /// fails to delete, because something else is holding the files open,
32631   /// WebView2 will try to delete the profile at all future browser process
32632   /// starts until successful.
32633   /// The corresponding CoreWebView2s will be closed and the
32634   /// CoreWebView2Profile.Deleted event will be raised. See
32635   /// `CoreWebView2Profile.Deleted` for more information.
32636   /// If you try to create a new profile with the same name as an existing
32637   /// profile that has been marked as deleted but hasn't yet been deleted,
32638   /// profile creation will fail with HRESULT_FROM_WIN32(ERROR_DELETE_PENDING).
32639   ///
32640   /// \snippet SettingsComponent.cpp DeleteProfile
32641   HRESULT Delete();
32642 
32643   /// Add an event handler for the `Deleted` event. The `Deleted` event is
32644   /// raised when the profile is marked for deletion. When this event is
32645   /// raised, the CoreWebView2Profile and its corresponding CoreWebView2s have
32646   /// been closed, and cannot be used anymore.
32647   ///
32648   /// \snippet AppWindow.cpp ProfileDeleted
32649   HRESULT add_Deleted(
32650       /+[in]+/ ICoreWebView2ProfileDeletedEventHandler eventHandler,
32651       @("out") EventRegistrationToken* token);
32652 
32653   /// Removes an event handler previously added with `add_Deleted`.
32654   HRESULT remove_Deleted(
32655       in EventRegistrationToken token);
32656 }
32657 
32658 /// Receives the `CoreWebView2Profile.Deleted` event.
32659 const GUID IID_ICoreWebView2ProfileDeletedEventHandler = ICoreWebView2ProfileDeletedEventHandler.iid;
32660 
32661 interface ICoreWebView2ProfileDeletedEventHandler : IUnknown
32662 {
32663     static const GUID iid = { 0xDF35055D,0x772E,0x4DBE,[ 0xB7,0x43,0x5F,0xBF,0x74,0xA2,0xB2,0x58 ] };
32664   /// Called to provide the implementer with the event args for the
32665   /// profile deleted event. No event args exist and the `args`
32666   /// parameter is set to `null`.
32667   HRESULT Invoke(
32668       /+[in]+/ ICoreWebView2Profile sender,
32669       /+[in]+/ IUnknown args);
32670 }
32671 
32672 // End of interfaces
32673 
32674 /// DLL export to create a WebView2 environment with a custom version of
32675 /// WebView2 Runtime, user data folder, and with or without additional options.
32676 ///
32677 /// When WebView2 experimental APIs are used, make sure to provide a valid `environmentOptions`
32678 /// so that WebView2 runtime knows which version of the SDK that the app is using. Otherwise,
32679 /// WebView2 runtime assumes that the version of the SDK being used is the latest
32680 /// version known to it, which might not be the version of the SDK being used.
32681 /// This wrong SDK version assumption could result in some experimental APIs not being available.
32682 ///
32683 /// The WebView2 environment and all other WebView2 objects are single threaded
32684 ///  and have dependencies on Windows components that require COM to be
32685 /// initialized for a single-threaded apartment.  The app is expected to run
32686 /// `CoInitializeEx` before running `CreateCoreWebView2EnvironmentWithOptions`.
32687 ///
32688 /// ```text
32689 /// CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
32690 /// ```
32691 ///
32692 /// If `CoInitializeEx` did not run or previously ran with
32693 /// `COINIT_MULTITHREADED`, `CreateCoreWebView2EnvironmentWithOptions` fails
32694 /// with one of the following errors.
32695 ///
32696 /// ```text
32697 /// CO_E_NOTINITIALIZED -  if CoInitializeEx was not called
32698 /// RPC_E_CHANGED_MODE  -  if CoInitializeEx was previously called with
32699 ///                        COINIT_MULTITHREADED
32700 /// ```
32701 ///
32702 ///
32703 /// Use `browserExecutableFolder` to specify whether WebView2 controls use a
32704 /// fixed or installed version of the WebView2 Runtime that exists on a user
32705 /// machine.  To use a fixed version of the WebView2 Runtime, pass the
32706 /// folder path that contains the fixed version of the WebView2 Runtime to
32707 /// `browserExecutableFolder`. BrowserExecutableFolder supports both relative
32708 ///  (to the application's executable) and absolute files paths.
32709 /// To create WebView2 controls that use the
32710 /// installed version of the WebView2 Runtime that exists on user machines,
32711 /// pass a `null` or empty string to `browserExecutableFolder`.  In this
32712 /// scenario, the API tries to find a compatible version of the WebView2
32713 /// Runtime that is installed on the user machine (first at the machine level,
32714 ///  and then per user) using the selected channel preference.  The path of
32715 /// fixed version of the WebView2 Runtime should not contain
32716 /// `\Edge\Application\`. When such a path is used, the API fails
32717 /// with `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)`.
32718 ///
32719 /// The default channel search order is the WebView2 Runtime, Beta, Dev, and
32720 /// Canary.  When an override `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE` environment
32721 ///  variable or applicable `releaseChannelPreference` registry value is set to
32722 ///  `1`, the channel search order is reversed.
32723 ///
32724 /// You may specify the `userDataFolder` to change the default user data
32725 /// folder location for WebView2.  The path is either an absolute file path
32726 /// or a relative file path that is interpreted as relative to the compiled
32727 /// code for the current process.  For UWP apps, the default user data
32728 /// folder is the app data folder for the package.  For non-UWP apps, the
32729 /// default user data (`{Executable File Name}.WebView2`) folder is
32730 /// created in the same directory next to the compiled code for the app.
32731 /// WebView2 creation fails if the compiled code is running in a directory in
32732 /// which the process does not have permission to create a new directory.  The
32733 /// app is responsible to clean up the associated user data folder when it
32734 /// is done.
32735 ///
32736 /// \> [!NOTE]\n\> As a browser process may be shared among WebViews, WebView creation fails
32737 /// with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if the specified options
32738 /// does not match the options of the WebViews that are currently running in
32739 /// the shared browser process.
32740 ///
32741 /// `environmentCreatedHandler` is the handler result to the async operation
32742 /// that contains the `WebView2Environment` that was created.
32743 ///
32744 /// The `browserExecutableFolder`, `userDataFolder` and
32745 /// `additionalBrowserArguments` of the `environmentOptions` may be overridden
32746 /// by values either specified in environment variables or in the registry.
32747 ///
32748 /// When creating a `WebView2Environment` the following environment variables
32749 /// are verified.
32750 ///
32751 /// ```text
32752 /// WEBVIEW2_BROWSER_EXECUTABLE_FOLDER
32753 /// WEBVIEW2_USER_DATA_FOLDER
32754 /// WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS
32755 /// WEBVIEW2_RELEASE_CHANNEL_PREFERENCE
32756 /// ```
32757 ///
32758 /// If you find an override environment variable, use the
32759 /// `browserExecutableFolder` and `userDataFolder` values as replacements for
32760 /// the corresponding values in `CreateCoreWebView2EnvironmentWithOptions`
32761 /// parameters.  If `additionalBrowserArguments` is specified in environment
32762 /// variable or in the registry, it is appended to the corresponding values in
32763 /// `CreateCoreWebView2EnvironmentWithOptions` parameters.
32764 ///
32765 /// While not strictly overrides, additional environment variables may be set.
32766 ///
32767 /// ```text
32768 /// WEBVIEW2_WAIT_FOR_SCRIPT_DEBUGGER
32769 /// ```
32770 ///
32771 /// When found with a non-empty value, this indicates that the WebView is being
32772 ///  launched under a script debugger.  In this case, the WebView issues a
32773 /// `Page.waitForDebugger` CDP command that runs the script inside the WebView
32774 /// to pause on launch, until a debugger issues a corresponding
32775 /// `Runtime.runIfWaitingForDebugger` CDP command to resume the runtime.
32776 ///
32777 /// \> [!NOTE]\n\> The following environment variable does not have a registry key
32778 /// equivalent: `WEBVIEW2_WAIT_FOR_SCRIPT_DEBUGGER`.
32779 ///
32780 /// When found with a non-empty value, it indicates that the WebView is being
32781 /// launched under a script debugger that also supports host apps that use
32782 /// multiple WebViews.  The value is used as the identifier for a named pipe
32783 /// that is opened and written to when a new WebView is created by the host
32784 /// app.  The payload should match the payload of the `remote-debugging-port`
32785 /// JSON target and an external debugger may use it to attach to a specific
32786 /// WebView instance.  The format of the pipe created by the debugger should be
32787 /// `\\.\pipe\WebView2\Debugger\{app_name}\{pipe_name}`, where the following
32788 /// are true.
32789 ///
32790 /// *   `{app_name}` is the host app exe file name, for example,
32791 ///     `WebView2Example.exe`
32792 /// *   `{pipe_name}` is the value set for `WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER`
32793 ///
32794 /// To enable debugging of the targets identified by the JSON, you must set the
32795 ///  `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS` environment variable to send
32796 /// `--remote-debugging-port={port_num}`, where the following is true.
32797 ///
32798 /// *   `{port_num}` is the port on which the CDP server binds.
32799 ///
32800 /// \> [!WARNING]\n\> If you set both `WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER` and
32801 /// `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS` environment variables, the
32802 /// WebViews hosted in your app and associated contents may exposed to 3rd
32803 /// party apps such as debuggers.
32804 ///
32805 /// \> [!NOTE]\n\> The following environment variable does not have a registry key
32806 /// equivalent: `WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER`.
32807 ///
32808 /// If none of those environment variables exist, then the registry is examined
32809 /// next.  The following registry values are verified.
32810 ///
32811 /// ```text
32812 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder
32813 /// "{AppId}"=""
32814 ///
32815 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannelPreference
32816 /// "{AppId}"=""
32817 ///
32818 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\AdditionalBrowserArguments
32819 /// "{AppId}"=""
32820 ///
32821 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\UserDataFolder
32822 /// "{AppId}"=""
32823 /// ```
32824 ///
32825 /// Use a group policy under **Administrative Templates** >
32826 /// **Microsoft Edge WebView2** to configure `browserExecutableFolder` and
32827 /// `releaseChannelPreference`.
32828 ///
32829 /// In the unlikely scenario where some instances of WebView are open during a
32830 /// browser update, the deletion of the previous WebView2 Runtime may be
32831 /// blocked.  To avoid running out of disk space, a new WebView creation fails
32832 /// with `HRESULT_FROM_WIN32(ERROR_DISK_FULL)` if it detects that too many
32833 /// previous WebView2 Runtime versions exist.
32834 ///
32835 /// The default maximum number of WebView2 Runtime versions allowed is `20`.
32836 /// To override the maximum number of the previous WebView2 Runtime versions
32837 /// allowed, set the value of the following environment variable.
32838 ///
32839 /// ```text
32840 /// COREWEBVIEW2_MAX_INSTANCES
32841 /// ```
32842 ///
32843 /// If the Webview depends upon an installed WebView2 Runtime version and it is
32844 /// uninstalled, any subsequent creation fails with
32845 /// `HRESULT_FROM_WIN32(ERROR_PRODUCT_UNINSTALLED)`.
32846 ///
32847 /// First verify with Root as `HKLM` and then `HKCU`.  `AppId` is first set to
32848 /// the Application User Model ID of the process, then if no corresponding
32849 /// registry key, the `AppId` is set to the compiled code name of the process,
32850 /// or if that is not a registry key then `*`.  If an override registry key is
32851 /// found, use the `browserExecutableFolder` and `userDataFolder` registry
32852 /// values as replacements and append `additionalBrowserArguments` registry
32853 /// values for the corresponding values in
32854 /// `CreateCoreWebView2EnvironmentWithOptions` parameters.
32855 ///
32856 /// The following summarizes the possible error values that can be returned from
32857 /// `CreateCoreWebView2EnvironmentWithOptions` and a description of why these
32858 /// errors occur.
32859 ///
32860 /// Error value                                     | Description
32861 /// ----------------------------------------------- | --------------------------
32862 /// `CO_E_NOTINITIALIZED`                           | CoInitializeEx was not called.
32863 /// `RPC_E_CHANGED_MODE`                            | CoInitializeEx was previously called with COINIT_MULTITHREADED.
32864 /// `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)`       | *\\Edge\\Application* path used in browserExecutableFolder.
32865 /// `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`       | Specified options do not match the options of the WebViews that are currently running in the shared browser process.
32866 /// `HRESULT_FROM_WIN32(ERROR_DISK_FULL)`           | In the unlikely scenario where some instances of WebView are open during a browser update, the deletion of the previous WebView2 Runtime may be blocked. To avoid running out of disk space, a new WebView creation fails with `HRESULT_FROM_WIN32(ERROR_DISK_FULL)` if it detects that too many previous WebView2 Runtime versions exist.
32867 /// `HRESULT_FROM_WIN32(ERROR_PRODUCT_UNINSTALLED)` | If the Webview depends upon an installed WebView2 Runtime version and it is uninstalled.
32868 /// `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)`      | Could not find Edge installation.
32869 /// `HRESULT_FROM_WIN32(ERROR_FILE_EXISTS)`         | User data folder cannot be created because a file with the same name already exists.
32870 /// `E_ACCESSDENIED`                                | Unable to create user data folder, Access Denied.
32871 /// `E_FAIL`                                        | Edge runtime unable to start.
32872 
32873 extern(Windows) HRESULT CreateCoreWebView2EnvironmentWithOptions(PCWSTR browserExecutableFolder, PCWSTR userDataFolder, ICoreWebView2EnvironmentOptions environmentOptions, ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environmentCreatedHandler);
32874 
32875 /// Creates an evergreen WebView2 Environment using the installed WebView2
32876 /// Runtime version.  This is equivalent to running
32877 /// `CreateCoreWebView2EnvironmentWithOptions` with `nullptr` for
32878 /// `browserExecutableFolder`, `userDataFolder`, `additionalBrowserArguments`.
32879 /// For more information, navigate to
32880 /// `CreateCoreWebView2EnvironmentWithOptions`.
32881 
32882 extern(Windows) HRESULT CreateCoreWebView2Environment(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environmentCreatedHandler);
32883 
32884 /// Get the browser version info including channel name if it is not the
32885 /// WebView2 Runtime.  Channel names are Beta, Dev, and Canary.
32886 /// If an override exists for the `browserExecutableFolder` or the channel
32887 /// preference, the override is used.  If an override is not specified, then
32888 /// the parameter value passed to
32889 /// `GetAvailableCoreWebView2BrowserVersionString` is used.
32890 /// Returns `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)` if it fails to find an
32891 /// installed WebView2 runtime or non-stable Microsoft Edge installation.
32892 ///
32893 /// The caller must free the returned string with `CoTaskMemFree`.  See
32894 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32895 
32896 extern(Windows) HRESULT GetAvailableCoreWebView2BrowserVersionString(PCWSTR browserExecutableFolder, LPWSTR* versionInfo);
32897 
32898 /// This method is for anyone want to compare version correctly to determine
32899 /// which version is newer, older or same.  Use it to determine whether
32900 /// to use webview2 or certain feature based upon version.  Sets the value of
32901 /// result to `-1`, `0` or `1` if `version1` is less than, equal or greater
32902 /// than `version2` respectively.  Returns `E_INVALIDARG` if it fails to parse
32903 /// any of the version strings or any input parameter is `null`.  Directly use
32904 /// the `versionInfo` obtained from
32905 /// `GetAvailableCoreWebView2BrowserVersionString` with input, channel
32906 /// information is ignored.
32907 
32908 extern(Windows) HRESULT CompareBrowserVersions(PCWSTR version1, PCWSTR version2, int* result);
32909 
32910 }
32911 }
32912 }