The OpenD Programming Language

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 	July 2024-present: 126.2.10+g61241e4+chromium-126.0.6478.127
13 
14 	November 2023: cef_binary_119.3.1+gf768881+chromium-119.0.6045.124_linux64_minimal.tar.bz2
15 
16 	November 2022: cef_binary_107.1.9+g1f0a21a+chromium-107.0.5304.110_linux64_minimal.tar.bz2
17 
18 	November 2021: 95.7.17+g4208276+chromium-95.0.4638.69
19 
20 	Note my ceftranslate.d for instructions to start the update process.
21 
22 	Then to install the cef put in the Resources in the Release directory (*.pak and *.dat
23 	out of Resources, failure to do this will cause an abort on ICU file descriptor things)
24 	and copy the locales to /opt/cef/Resources/Locales
25 
26 	You can download compatible builds from https://cef-builds.spotifycdn.com/index.html
27 	just make sure to put in the version filter and check "all builds" to match it.
28 
29 	You do NOT actually need the cef to build the application, but it must be
30 	on the user's machine to run it. It looks in /opt/cef/ on Linux.
31 
32 	Work in progress. DO NOT USE YET as I am prolly gonna break everything too.
33 
34 	On Windows, you need to distribute the WebView2Loader.dll with your exe. That
35 	is found in the web view 2 sdk. Furthermore, users will have to install the runtime.
36 
37 	Please note; the Microsoft terms and conditions say they may be able to collect
38 	information about your users if you use this on Windows.
39 	see: https://developer.microsoft.com/en-us/microsoft-edge/webview2/
40 
41 
42 +/
43 module arsd.webview;
44 
45 enum WebviewEngine {
46 	none,
47 	cef,
48 	wv2,
49 	webkit_gtk
50 }
51 // see activeEngine which is an enum you can static if on
52 
53 
54 // I might recover this gtk thing but i don't like gtk
55 // dmdi webview -version=linux_gtk -version=Demo
56 
57 // the setup link for Microsoft:
58 // https://go.microsoft.com/fwlink/p/?LinkId=2124703
59 
60 
61 version(Windows) {
62 import arsd.simpledisplay;
63 import arsd.com;
64 import core.atomic;
65 
66 //import std.stdio;
67 
68 private template InvokerArgFor(T, Context) {
69 	alias invoker = typeof(&T.init.Invoke);
70 	static if(is(invoker fntype == delegate)) {
71 		static if(is(fntype Params == __parameters))
72 			alias InvokerArgFor = HRESULT function(Params, Context);
73 		else
74 			static assert(0);
75 	}
76 }
77 
78 T callback(T, Context)(InvokerArgFor!(T, Context) dg, Context ctx) {
79 	return new class(dg, ctx) T {
80 		extern(Windows):
81 
82 		static if(is(typeof(T.init.Invoke) R == return))
83 		static if(is(typeof(T.init.Invoke) P == __parameters))
84   		override R Invoke(P _args_) {
85 			return dgMember(_args_, ctxMember);
86 		}
87 
88 		InvokerArgFor!(T, Context) dgMember;
89 		Context ctxMember;
90 
91 		this(typeof(dgMember) dg_, Context ctx_) {
92 			this.dgMember = dg_;
93 			this.ctxMember = ctx_;
94 			AddRef();
95 		}
96 
97 		override HRESULT QueryInterface(const (IID)*riid, LPVOID *ppv) {
98 			if (IID_IUnknown == *riid) {
99 				*ppv = cast(void*) cast(IUnknown) this;
100 			}
101 			else if (T.iid == *riid) {
102 				*ppv = cast(void*) cast(T) this;
103 			}
104 			else {
105 				*ppv = null;
106 				return E_NOINTERFACE;
107 			}
108 
109 			AddRef();
110 			return NOERROR;
111 		}
112 
113 		shared LONG count = 0;
114 		ULONG AddRef() {
115 			auto cnt = atomicOp!"+="(count, 1);
116 			if(cnt == 1) {
117 				import core.memory;
118 				GC.addRoot(cast(void*) this);
119 			}
120 			return cnt;
121 		}
122 		ULONG Release() {
123 			auto cnt = atomicOp!"-="(count, 1);
124 			if(cnt == 0) {
125 				import core.memory;
126 				GC.removeRoot(cast(void*) this);
127 			}
128 			return cnt;
129 		}
130 	};
131 }
132 
133 enum activeEngine = WebviewEngine.wv2;
134 
135 struct RC(T) {
136 	private T object;
137 	this(T t, bool addRef = true) {
138 		object = t;
139 		if(addRef && object)
140 			object.AddRef();
141 	}
142 	this(this) {
143 		if(object is null) return;
144 		object.AddRef();
145 	}
146 	~this() {
147 		if(object is null) return;
148 		object.Release();
149 		object = null;
150 	}
151 
152 	RC!I queryInterface(I)() {
153 		I i;
154 		auto err = object.QueryInterface(&I.iid, cast(void**) &i);
155 		if(err != S_OK)
156 			return RC!I(null, false);
157 		else
158 			return RC!I(i, false); // QueryInterface already calls AddRef
159 	}
160 
161 	bool opCast(T:bool)() nothrow {
162 		return object !is null;
163 	}
164 
165 	void opAssign(T obj) {
166 		obj.AddRef();
167 		if(object)
168 			object.Release();
169 		this.object = obj;
170 	}
171 
172 	T raw() { return object; }
173 
174 	T returnable() {
175 		if(object is null) return null;
176 		return object;
177 	}
178 
179 	T passable() {
180 		if(object is null) return null;
181 		object.AddRef();
182 		return object;
183 	}
184 
185 	static foreach(memberName; __traits(allMembers /*derivedMembers*/, T)) {
186 		mixin ForwardMethod!(memberName);
187 	}
188 }
189 
190 /+
191 // does NOT add ref, use after you queryInterface
192 RC!T makeRcd(T)(T t) {
193 	return RC!T(t, false);
194 }
195 +/
196 
197 extern(Windows)
198 alias StringMethod = int delegate(wchar**);
199 
200 string toGC(scope StringMethod dg) {
201 	wchar* t;
202 	auto res = dg(&t);
203 	if(res != S_OK)
204 		throw new ComException(res);
205 
206 	auto ot = t;
207 
208 	string s;
209 
210 	while(*t) {
211 		import std.utf;
212 		char[4] buffer;
213 		wchar item = *t;
214 		t++;
215 		if(item >= 0xD800 && item <= 0xDFFF) {
216 			wchar second = *t;
217 			t++;
218 			wchar low, high;
219 			if(item >= 0xD800 && item <= 0xDBFF) {
220 				high = item;
221 				low = second;
222 			} else {
223 				high = second;
224 				low = item;
225 			}
226 
227 			if(
228 				high >= 0xD800 && high <= 0xDBFF
229 				&&
230 				low >= 0xDC00 && low <= 0xDCFF
231 			 ) {
232 				dchar d = (high - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000;
233 
234 				s ~= buffer[0 .. encode(buffer, d)];
235 			} else {
236 				// we could probably throw something tbh
237 			}
238 		} else {
239 			s ~= buffer[0 .. encode(buffer, item)];
240 		}
241 	}
242 
243 	auto ret = s;
244 
245 	CoTaskMemFree(ot);
246 
247 	return ret;
248 }
249 
250 class ComException : Exception {
251 	HRESULT errorCode;
252 	this(HRESULT errorCode) {
253 		import std.format;
254 		super(format("HRESULT: 0x%08x", errorCode));
255 		// FIXME: call FormatMessage
256 	}
257 }
258 
259 mixin template ForwardMethod(string methodName) {
260 	static if(methodName.length > 4 && methodName[0 .. 4] == "put_") {
261 		static if(is(typeof(__traits(getMember, T, memberName)) Params == function))
262 			private alias Type = Params[0];
263 		mixin(q{ @property void } ~ memberName[4 .. $] ~ q{(Type v) {
264 			auto errorCode = __traits(getMember, object, memberName)(v);
265 			if(errorCode)
266 				throw new ComException(errorCode);
267 		}
268 		});
269 	} else
270 	static if(methodName.length > 4 && methodName[0 .. 4] == "get_") {
271 		static if(is(typeof(__traits(getMember, T, memberName)) Params == function))
272 			private alias Type = typeof(*(Params[0].init));
273 		mixin(q{ @property Type } ~ memberName[4 .. $] ~ q{() {
274 			Type response;
275 			auto errorCode = __traits(getMember, object, memberName)(&response);
276 			if(errorCode)
277 				throw new ComException(errorCode);
278 			return response;
279 		}
280 		});
281 	} else
282 	static if(methodName.length > 4 && methodName[0 .. 4] == "add_") {
283 		static if(is(typeof(__traits(getMember, T, memberName)) Params == function))
284 			alias Handler = Params[0];
285 		mixin(q{ EventRegistrationToken } ~ memberName ~ q{ (Context)(InvokerArgFor!(Handler, Context) handler, Context ctx) {
286 			EventRegistrationToken token;
287 			__traits(getMember, object, memberName)(callback!(Handler, Context)(handler, ctx), &token);
288 			return token;
289 		}});
290 	} else
291 	static if(methodName.length > 7 && methodName[0 .. 4] == "remove_") {
292 		mixin(q{ void } ~ memberName ~ q{ (EventRegistrationToken token) {
293 			__traits(getMember, object, memberName)(token);
294 		}});
295 	} else {
296 		// I could do the return value things by looking for these comments:
297 		// /+[out]+/ but be warned it is possible or a thing to have multiple out params (only one such function in here though i think)
298 		// /+[out, retval]+/
299 		// a find/replace could make them a UDA or something.
300 
301 		static if(is(typeof(__traits(getMember, T, memberName)) Params == function))
302 		static if(is(typeof(__traits(getMember, T, memberName)) Return == return))
303 
304 		mixin(q{ Return } ~ memberName ~ q{ (Params p) {
305 			// FIXME: check the return value and throw
306 			return __traits(getMember, object, memberName)(p);
307 		}
308 		});
309 
310 	}
311 }
312 
313 struct Wv2App {
314 	static bool active = false;
315 
316 	static HRESULT code;
317 	static bool initialized = false;
318 	static RC!ICoreWebView2Environment webview_env;
319 
320 	@disable this(this);
321 
322 	static void delegate(RC!ICoreWebView2Environment)[] pending;
323 	this(void delegate(RC!ICoreWebView2Environment) withEnvironment) {
324 		if(withEnvironment)
325 			pending ~= withEnvironment;
326 
327 		import core.sys.windows.com;
328 		CoInitializeEx(null, COINIT_APARTMENTTHREADED);
329 
330 		active = true;
331 
332 		auto lib = LoadLibraryW("WebView2Loader.dll"w.ptr);
333 		typeof(&CreateCoreWebView2EnvironmentWithOptions) func;
334 
335 		if(lib is null)
336 			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.");
337 		func = cast(typeof(func)) GetProcAddress(lib, CreateCoreWebView2EnvironmentWithOptions.mangleof);
338 		if(func is null)
339 			throw new Exception("CreateCoreWebView2EnvironmentWithOptions failed from WebView2Loader...");
340 
341 		auto result = func(null, null, null,
342 			callback!(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler, Wv2App*)(
343 				function(error, env, this_) {
344 					this_.initialized = true;
345 					this_.code = error;
346 
347 					if(error)
348 						return error;
349 
350 					this_.webview_env = env;
351 
352 					auto len = pending.length;
353 					foreach(item; this_.pending) {
354 						item(this_.webview_env);
355 					}
356 
357 					this_.pending = this_.pending[len .. $];
358 
359 					return S_OK;
360 				}
361 			, &this)
362 		);
363 
364 		if(result != S_OK) {
365 			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) {
366 				import std.process;
367 				browse("https://go.microsoft.com/fwlink/p/?LinkId=2124703");
368 			}
369 			throw new ComException(result);
370 		}
371 	}
372 
373 	@disable this();
374 
375 	~this() {
376 		active = false;
377 	}
378 
379 	static void useEnvironment(void delegate(RC!ICoreWebView2Environment) withEnvironment) {
380 		assert(active);
381 		assert(withEnvironment !is null);
382 		if(initialized) {
383 			if(code)
384 				throw new ComException(code);
385 			withEnvironment(webview_env);
386 		} else
387 			pending ~= withEnvironment;
388 	}
389 }
390 }
391 
392 
393 
394 /+
395 interface WebView {
396 	void refresh();
397 	void back();
398 	void forward();
399 	void stop();
400 
401 	void navigate(string url);
402 
403 	// the url and line are for error reporting purposes
404 	void executeJavascript(string code, string url = null, int line = 0);
405 
406 	void showDevTools();
407 
408 	// these are get/set properties that you can subscribe to with some system
409 
410 	mixin Observable!(string, "title");
411 	mixin Observable!(string, "url");
412 	mixin Observable!(string, "status");
413 	mixin Observable!(int, "loadingProgress");
414 }
415 +/
416 
417 
418 version(linux) {
419 version(linux_gtk) {} else
420 	version=cef;
421 }
422 
423 
424 version(cef) {
425 import arsd.simpledisplay;
426 
427 //pragma(lib, "cef");
428 
429 class BrowserProcessHandler : CEF!cef_browser_process_handler_t {
430 	this(void delegate(string dir, string[] args) onAlreadyRunningAppRelaunch) {
431 		this.onAlreadyRunningAppRelaunch = onAlreadyRunningAppRelaunch;
432 	}
433 
434 	private void delegate(string dir, string[] args) onAlreadyRunningAppRelaunch;
435 
436 	override void on_context_initialized() { }
437 
438 	override void on_before_child_process_launch(RC!cef_command_line_t) { }
439 	override void on_schedule_message_pump_work(long delayMs) { }
440 	override cef_client_t* get_default_client() { return null; }
441 	override void on_register_custom_preferences(cef_preferences_type_t, cef_preference_registrar_t*) {}
442 
443 	override int on_already_running_app_relaunch(RC!(cef_command_line_t) command_line, const(cef_string_utf16_t)* current_directory) nothrow {
444 		if(onAlreadyRunningAppRelaunch) {
445 
446 			string[] argList;
447 
448 			if(command_line.has_arguments()) {
449 				cef_string_list_t thing = libcef.string_list_alloc();
450 
451 				command_line.get_arguments(thing);
452 
453 				auto count = libcef.string_list_size(thing);
454 				foreach(i; 0 .. count) {
455 					cef_string_utf16_t v;
456 
457 					libcef.string_list_value(thing, i, &v);
458 
459 					argList ~= toGC(&v);
460 				}
461 				libcef.string_list_free(thing);
462 			}
463 
464 			try {
465 				onAlreadyRunningAppRelaunch(
466 					toGC(current_directory),
467 					argList
468 				);
469 			} catch(Exception e) {
470 
471 			}
472 
473 			return 1;
474 		} else {
475 			return 0;
476 		}
477 	}
478 	override cef_request_context_handler_t* get_default_request_context_handler() nothrow {
479 		return null;
480 	}
481 }
482 
483 
484 int cefProcessHelper() {
485 	import core.runtime;
486 	import core.stdc.stdlib;
487 
488 	cef_main_args_t main_args;
489 	version(linux) {
490 		main_args.argc = Runtime.cArgs.argc;
491 		main_args.argv = Runtime.cArgs.argv;
492 	} else version(Windows) {
493 		main_args.instance = GetModuleHandle(null);
494 	}
495 
496 	if(libcef.loadDynamicLibrary()) {
497 		int code = libcef.execute_process(&main_args, null, null);
498 		if(code >= 0)
499 			exit(code);
500 		return code;
501 	}
502 	return -1;
503 }
504 
505 shared static this() {
506 	cefProcessHelper();
507 }
508 
509 public struct CefApp {
510 	static bool active() {
511 		return count > 0;
512 	}
513 
514 	private __gshared int count = 0;
515 
516 	@disable this(this);
517 	@disable new();
518 	this(void delegate(cef_settings_t* settings) setSettings, void delegate(string dir, string[] args) onAlreadyRunningAppRelaunch) {
519 
520 		if(!libcef.loadDynamicLibrary())
521 			throw new Exception("failed to load cef dll");
522 
523 		count++;
524 
525 		import core.runtime;
526 		import core.stdc.stdlib;
527 
528 		cef_main_args_t main_args;
529 		version(linux) {
530 			main_args.argc = Runtime.cArgs.argc;
531 			main_args.argv = Runtime.cArgs.argv;
532 		} else version(Windows) {
533 			main_args.instance = GetModuleHandle(null);
534 		}
535 
536 		cef_settings_t settings;
537 		settings.size = cef_settings_t.sizeof;
538 		//settings.log_severity = cef_log_severity_t.LOGSEVERITY_DISABLE; // Show only warnings/errors
539 		settings.log_severity = cef_log_severity_t.LOGSEVERITY_INFO; // Show only warnings/errors
540 		settings.multi_threaded_message_loop = 1;
541 		settings.no_sandbox = 1;
542 
543 		version(linux)
544 		settings.locales_dir_path = cef_string_t("/opt/cef/Resources/locales");
545 
546 		if(setSettings !is null)
547 			setSettings(&settings);
548 
549 
550 		auto app = new class(onAlreadyRunningAppRelaunch) CEF!cef_app_t {
551 			BrowserProcessHandler bph;
552 			this(void delegate(string dir, string[] args) onAlreadyRunningAppRelaunch) {
553 				bph = new BrowserProcessHandler(onAlreadyRunningAppRelaunch);
554 			}
555 			override void on_before_command_line_processing(const(cef_string_t)*, RC!cef_command_line_t) {}
556 
557 			override cef_resource_bundle_handler_t* get_resource_bundle_handler() {
558 				return null;
559 			}
560 			override cef_browser_process_handler_t* get_browser_process_handler() {
561 				return bph.returnable;
562 			}
563 			override cef_render_process_handler_t* get_render_process_handler() {
564 				return null;
565 			}
566 			override void on_register_custom_schemes(cef_scheme_registrar_t*) {
567 
568 			}
569 		};
570 
571 		if(!libcef.initialize(&main_args, &settings, app.passable, null)) {
572 			throw new Exception("cef_initialize failed");
573 		}
574 	}
575 
576 	~this() {
577 		count--;
578 		// this call hangs and idk why.
579 		// FIXME
580 		//libcef.shutdown();
581 	}
582 }
583 
584 
585 version(Demo)
586 void main() {
587 	auto app = CefApp(null);
588 
589 	auto window = new SimpleWindow(640, 480, "D Browser", Resizability.allowResizing);
590 	flushGui;
591 
592 	cef_window_info_t window_info;
593 	/*
594 	window_info.x = 100;
595 	window_info.y = 100;
596 	window_info.width = 300;
597 	window_info.height = 300;
598 	*/
599 	//window_info.parent_window = window.nativeWindowHandle;
600 
601 	cef_string_t cef_url = cef_string_t("http://dpldocs.info/");//"http://youtube.com/"w);
602 
603 	//string url = "http://arsdnet.net/";
604 	//cef_string_utf8_to_utf16(url.ptr, url.length, &cef_url);
605 
606 	cef_browser_settings_t browser_settings;
607 	browser_settings.size = cef_browser_settings_t.sizeof;
608 
609 	auto client = new MyCefClient();
610 
611 	auto got = libcef.browser_host_create_browser(&window_info, client.passable, &cef_url, &browser_settings, null, null); // or _sync
612 
613 	window.eventLoop(0);
614 }
615 
616 
617 /++
618 	This gives access to the CEF functions. If you get a linker error for using an undefined function,
619 	it is probably because you did NOT go through this when dynamically loading.
620 
621 	(...similarly, if you get a segfault, it is probably because you DID go through this when static binding.)
622 +/
623 struct libcef {
624 	static __gshared:
625 
626 	bool isLoaded;
627 	bool loadAttempted;
628 	void* libHandle;
629 
630 	/// Make sure you call this only from one thread, probably at process startup. It caches internally and returns true if the load was successful.
631 	bool loadDynamicLibrary() {
632 		if(loadAttempted)
633 			return isLoaded;
634 
635 		loadAttempted = true;
636 
637 		version(linux) {
638 			import core.sys.posix.dlfcn;
639 			libHandle = dlopen("libcef.so", RTLD_NOW);
640 
641 			static void* loadsym(const char* name) {
642 				return dlsym(libHandle, name);
643 			}
644 		} else version(Windows) {
645 			import core.sys.windows.windows;
646 			libHandle = LoadLibrary("libcef.dll");
647 
648 			static void* loadsym(const char* name) {
649 				return GetProcAddress(libHandle, name);
650 			}
651 		}
652 
653 		//import std.stdio;
654 		if(libHandle is null) {
655 			// import std.stdio; writeln("libhandle null");
656 			import core.stdc.stdio; printf("%s\n", dlerror());
657 			// import core.stdc.errno; writeln(errno);
658 			return false;
659 		}
660 		foreach(memberName; __traits(allMembers, libcef)[4 .. $]) { // cutting off everything until the actual static foreach below; this trims off isLoaded to loadDynamicLibrary
661 			alias mem = __traits(getMember, libcef, memberName);
662 			mem = cast(typeof(mem)) loadsym("cef_" ~ memberName);
663 			if(mem is null) {
664 				 // import std.stdio; writeln(memberName); throw new Exception("cef_" ~ memberName ~ " failed to load");
665 				return false;
666 			}
667 		}
668 
669 		import core.stdc.string;
670 		if(strcmp(libcef.api_hash(1), CEF_API_HASH_UNIVERSAL) != 0)
671 			throw new Exception("libcef versions not matching bindings");
672 
673 		isLoaded = true;
674 		return true;
675 	}
676 
677 	static foreach(memberName; __traits(allMembers, arsd.webview))
678 	static if(is(typeof(__traits(getMember, arsd.webview, memberName)) == function))
679 	static if(memberName.length > 4 && memberName[0 .. 4] == "cef_") {
680 		mixin(q{ typeof(&__traits(getMember, arsd.webview, memberName)) } ~ memberName[4 .. $] ~ ";"); // = &" ~ memberName ~ ";");
681 	}
682 }
683 
684 }
685 
686 version(linux_gtk)
687 version(Demo)
688 void main() {
689 	auto wv = new WebView(true, null);
690 	wv.navigate("http://dpldocs.info/");
691 	wv.setTitle("omg a D webview");
692 	wv.setSize(500, 500, true);
693 	wv.eval("console.log('just testing');");
694 	wv.run();
695 }
696 
697 version(linux_gtk)
698 enum activeEngine = WebviewEngine.webkit_gtk;
699 
700 /++
701 
702 +/
703 version(linux_gtk)
704 class WebView : browser_engine {
705 
706 	/++
707 		Creates a new webview instance. If dbg is non-zero - developer tools will
708 		be enabled (if the platform supports them). Window parameter can be a
709 		pointer to the native window handle. If it's non-null - then child WebView
710 		is embedded into the given parent window. Otherwise a new window is created.
711 		Depending on the platform, a GtkWindow, NSWindow or HWND pointer can be
712 		passed here.
713 	+/
714 	this(bool dbg, void* window) {
715 		super(&on_message, dbg, window);
716 	}
717 
718 	extern(C)
719 	static void on_message(const char*) {}
720 
721 	/// Destroys a webview and closes the native window.
722 	void destroy() {
723 
724 	}
725 
726 	/// Runs the main loop until it's terminated. After this function exits - you
727 	/// must destroy the webview.
728 	override void run() { super.run(); }
729 
730 	/// Stops the main loop. It is safe to call this function from another other
731 	/// background thread.
732 	override void terminate() { super.terminate(); }
733 
734 	/+
735 	/// Posts a function to be executed on the main thread. You normally do not need
736 	/// to call this function, unless you want to tweak the native window.
737 	void dispatch(void function(WebView w, void *arg) fn, void *arg) {}
738 	+/
739 
740 	/// Returns a native window handle pointer. When using GTK backend the pointer
741 	/// is GtkWindow pointer, when using Cocoa backend the pointer is NSWindow
742 	/// pointer, when using Win32 backend the pointer is HWND pointer.
743 	void* getWindow() { return m_window; }
744 
745 	/// Updates the title of the native window. Must be called from the UI thread.
746 	override void setTitle(const char *title) { super.setTitle(title); }
747 
748 	/// Navigates webview to the given URL. URL may be a data URI.
749 	override void navigate(const char *url) { super.navigate(url); }
750 
751 	/// Injects JavaScript code at the initialization of the new page. Every time
752 	/// the webview will open a the new page - this initialization code will be
753 	/// executed. It is guaranteed that code is executed before window.onload.
754 	override void init(const char *js) { super.init(js); }
755 
756 	/// Evaluates arbitrary JavaScript code. Evaluation happens asynchronously, also
757 	/// the result of the expression is ignored. Use RPC bindings if you want to
758 	/// receive notifications about the results of the evaluation.
759 	override void eval(const char *js) { super.eval(js); }
760 
761 	/// Binds a native C callback so that it will appear under the given name as a
762 	/// global JavaScript function. Internally it uses webview_init(). Callback
763 	/// receives a request string and a user-provided argument pointer. Request
764 	/// string is a JSON array of all the arguments passed to the JavaScript
765 	/// function.
766 	void bind(const char *name, void function(const char *, void *) fn, void *arg) {}
767 
768 	/// Allows to return a value from the native binding. Original request pointer
769 	/// must be provided to help internal RPC engine match requests with responses.
770 	/// If status is zero - result is expected to be a valid JSON result value.
771 	/// If status is not zero - result is an error JSON object.
772 	void webview_return(const char *req, int status, const char *result) {}
773 
774   /*
775   void on_message(const char *msg) {
776     auto seq = json_parse(msg, "seq", 0);
777     auto name = json_parse(msg, "name", 0);
778     auto args = json_parse(msg, "args", 0);
779     auto fn = bindings[name];
780     if (fn == null) {
781       return;
782     }
783     std::async(std::launch::async, [=]() {
784       auto result = (*fn)(args);
785       dispatch([=]() {
786         eval(("var b = window['" + name + "'];b['callbacks'][" + seq + "](" +
787               result + ");b['callbacks'][" + seq +
788               "] = undefined;b['errors'][" + seq + "] = undefined;")
789                  .c_str());
790       });
791     });
792   }
793   std::map<std::string, binding_t *> bindings;
794 
795   alias binding_t = std::function<std::string(std::string)>;
796 
797   void bind(const char *name, binding_t f) {
798     auto js = "(function() { var name = '" + std::string(name) + "';" + R"(
799       window[name] = function() {
800         var me = window[name];
801         var errors = me['errors'];
802         var callbacks = me['callbacks'];
803         if (!callbacks) {
804           callbacks = {};
805           me['callbacks'] = callbacks;
806         }
807         if (!errors) {
808           errors = {};
809           me['errors'] = errors;
810         }
811         var seq = (me['lastSeq'] || 0) + 1;
812         me['lastSeq'] = seq;
813         var promise = new Promise(function(resolve, reject) {
814           callbacks[seq] = resolve;
815           errors[seq] = reject;
816         });
817         window.external.invoke(JSON.stringify({
818           name: name,
819           seq:seq,
820           args: Array.prototype.slice.call(arguments),
821         }));
822         return promise;
823       }
824     })())";
825     init(js.c_str());
826     bindings[name] = new binding_t(f);
827   }
828 
829 */
830 }
831 
832 private extern(C) {
833 	alias dispatch_fn_t = void function();
834 	alias msg_cb_t = void function(const char *msg);
835 }
836 
837 version(linux_gtk) {
838 
839 
840 /* Original https://github.com/zserge/webview notice below:
841  * MIT License
842  *
843  * Copyright (c) 2017 Serge Zaitsev
844  *
845  * Permission is hereby granted, free of charge, to any person obtaining a copy
846  * of this software and associated documentation files (the "Software"), to deal
847  * in the Software without restriction, including without limitation the rights
848  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
849  * copies of the Software, and to permit persons to whom the Software is
850  * furnished to do so, subject to the following conditions:
851  *
852  * The above copyright notice and this permission notice shall be included in
853  * all copies or substantial portions of the Software.
854  *
855  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
856  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
857  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
858  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
859  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
860  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
861  * SOFTWARE.
862  */
863 
864 /*
865 	Port to D by Adam D. Ruppe, November 30, 2019
866 */
867 
868 
869 	pragma(lib, "gtk-3");
870 	pragma(lib, "glib-2.0");
871 	pragma(lib, "gobject-2.0");
872 	pragma(lib, "webkit2gtk-4.0");
873 	pragma(lib, "javascriptcoregtk-4.0");
874 
875 	private extern(C) {
876 		import core.stdc.config;
877 		alias GtkWidget = void;
878 		enum GtkWindowType {
879 			GTK_WINDOW_TOPLEVEL = 0
880 		}
881 		bool gtk_init_check(int*, char***);
882 		GtkWidget* gtk_window_new(GtkWindowType);
883 		c_ulong g_signal_connect_data(void*, const char*, void* /* function pointer!!! */, void*, void*, int);
884 		GtkWidget* webkit_web_view_new();
885 		alias WebKitUserContentManager = void;
886 		WebKitUserContentManager* webkit_web_view_get_user_content_manager(GtkWidget*);
887 
888 		void gtk_container_add(GtkWidget*, GtkWidget*);
889 		void gtk_widget_grab_focus(GtkWidget*);
890 		void gtk_widget_show_all(GtkWidget*);
891 		void gtk_main();
892 		void gtk_main_quit();
893 		void webkit_web_view_load_uri(GtkWidget*, const char*);
894 		alias WebKitSettings = void;
895 		WebKitSettings* webkit_web_view_get_settings(GtkWidget*);
896 		void webkit_settings_set_enable_write_console_messages_to_stdout(WebKitSettings*, bool);
897 		void webkit_settings_set_enable_developer_extras(WebKitSettings*, bool);
898 		void webkit_user_content_manager_register_script_message_handler(WebKitUserContentManager*, const char*);
899 		alias JSCValue = void;
900 		alias WebKitJavascriptResult = void;
901 		JSCValue* webkit_javascript_result_get_js_value(WebKitJavascriptResult*);
902 		char* jsc_value_to_string(JSCValue*);
903 		void g_free(void*);
904 		void webkit_web_view_run_javascript(GtkWidget*, const char*, void*, void*, void*);
905 		alias WebKitUserScript = void;
906 		void webkit_user_content_manager_add_script(WebKitUserContentManager*, WebKitUserScript*);
907 		WebKitUserScript* webkit_user_script_new(const char*, WebKitUserContentInjectedFrames, WebKitUserScriptInjectionTime, const char*, const char*);
908 		enum WebKitUserContentInjectedFrames {
909 			WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES,
910 			WEBKIT_USER_CONTENT_INJECT_TOP_FRAME
911 		}
912 		enum WebKitUserScriptInjectionTime {
913 			WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START,
914 			WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_END
915 		}
916 		void gtk_window_set_title(GtkWidget*, const char*);
917 
918 		void gtk_window_set_resizable(GtkWidget*, bool);
919 		void gtk_window_set_default_size(GtkWidget*, int, int);
920 		void gtk_widget_set_size_request(GtkWidget*, int, int);
921 	}
922 
923 	private class browser_engine {
924 
925 		static extern(C)
926 		void ondestroy (GtkWidget *w, void* arg) {
927 			(cast(browser_engine) arg).terminate();
928 		}
929 
930 		static extern(C)
931 		void smr(WebKitUserContentManager* m, WebKitJavascriptResult* r, void* arg) {
932 			auto w = cast(browser_engine) arg;
933 			JSCValue *value = webkit_javascript_result_get_js_value(r);
934 			auto s = jsc_value_to_string(value);
935 			w.m_cb(s);
936 			g_free(s);
937 		}
938 
939 		this(msg_cb_t cb, bool dbg, void* window) {
940 			m_cb = cb;
941 
942 			gtk_init_check(null, null);
943 			m_window = cast(GtkWidget*) window;
944 			if (m_window == null)
945 				m_window = gtk_window_new(GtkWindowType.GTK_WINDOW_TOPLEVEL);
946 
947 			g_signal_connect_data(m_window, "destroy", &ondestroy, cast(void*) this, null, 0);
948 
949 			m_webview = webkit_web_view_new();
950 			WebKitUserContentManager* manager = webkit_web_view_get_user_content_manager(m_webview);
951 
952 			g_signal_connect_data(manager, "script-message-received::external", &smr, cast(void*) this, null, 0);
953 			webkit_user_content_manager_register_script_message_handler(manager, "external");
954 			init("window.external={invoke:function(s){window.webkit.messageHandlers.external.postMessage(s);}}");
955 
956 			gtk_container_add(m_window, m_webview);
957 			gtk_widget_grab_focus(m_webview);
958 
959 			if (dbg) {
960 				WebKitSettings *settings = webkit_web_view_get_settings(m_webview);
961 				webkit_settings_set_enable_write_console_messages_to_stdout(settings, true);
962 				webkit_settings_set_enable_developer_extras(settings, true);
963 			}
964 
965 			gtk_widget_show_all(m_window);
966 		}
967 		void run() { gtk_main(); }
968 		void terminate() { gtk_main_quit(); }
969 
970 		void navigate(const char *url) {
971 			webkit_web_view_load_uri(m_webview, url);
972 		}
973 
974 		void setTitle(const char* title) {
975 			gtk_window_set_title(m_window, title);
976 		}
977 
978 		/+
979 			void dispatch(std::function<void()> f) {
980 				g_idle_add_full(G_PRIORITY_HIGH_IDLE, (GSourceFunc)([](void *f) -> int {
981 							(*static_cast<dispatch_fn_t *>(f))();
982 							return G_SOURCE_REMOVE;
983 							}),
984 						new std::function<void()>(f),
985 						[](void *f) { delete static_cast<dispatch_fn_t *>(f); });
986 			}
987 		+/
988 
989 		void setSize(int width, int height, bool resizable) {
990 			gtk_window_set_resizable(m_window, resizable);
991 			if (resizable) {
992 				gtk_window_set_default_size(m_window, width, height);
993 			}
994 			gtk_widget_set_size_request(m_window, width, height);
995 		}
996 
997 		void init(const char *js) {
998 			WebKitUserContentManager *manager = webkit_web_view_get_user_content_manager(m_webview);
999 			webkit_user_content_manager_add_script(
1000 				manager, webkit_user_script_new(
1001 					js, WebKitUserContentInjectedFrames.WEBKIT_USER_CONTENT_INJECT_TOP_FRAME,
1002 					WebKitUserScriptInjectionTime.WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START, null, null));
1003 			}
1004 
1005 		void eval(const char *js) {
1006 			webkit_web_view_run_javascript(m_webview, js, null, null, null);
1007 		}
1008 
1009 		protected:
1010 		GtkWidget* m_window;
1011 		GtkWidget* m_webview;
1012 		msg_cb_t m_cb;
1013 	}
1014 } else version(WEBVIEW_COCOA) {
1015 /+
1016 
1017 //
1018 // ====================================================================
1019 //
1020 // This implementation uses Cocoa WKWebView backend on macOS. It is
1021 // written using ObjC runtime and uses WKWebView class as a browser runtime.
1022 // You should pass "-framework Webkit" flag to the compiler.
1023 //
1024 // ====================================================================
1025 //
1026 
1027 #define OBJC_OLD_DISPATCH_PROTOTYPES 1
1028 #include <CoreGraphics/CoreGraphics.h>
1029 #include <objc/objc-runtime.h>
1030 
1031 #define NSBackingStoreBuffered 2
1032 
1033 #define NSWindowStyleMaskResizable 8
1034 #define NSWindowStyleMaskMiniaturizable 4
1035 #define NSWindowStyleMaskTitled 1
1036 #define NSWindowStyleMaskClosable 2
1037 
1038 #define NSApplicationActivationPolicyRegular 0
1039 
1040 #define WKUserScriptInjectionTimeAtDocumentStart 0
1041 
1042 id operator"" _cls(const char *s, std::size_t sz) {
1043   return (id)objc_getClass(s);
1044 }
1045 SEL operator"" _sel(const char *s, std::size_t sz) {
1046   return sel_registerName(s);
1047 }
1048 id operator"" _str(const char *s, std::size_t sz) {
1049   return objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, s);
1050 }
1051 
1052 class browser_engine {
1053 public:
1054   browser_engine(msg_cb_t cb, bool dbg, void *window) : m_cb(cb) {
1055     // Application
1056     id app = objc_msgSend("NSApplication"_cls, "sharedApplication"_sel);
1057     objc_msgSend(app, "setActivationPolicy:"_sel,
1058                  NSApplicationActivationPolicyRegular);
1059 
1060     // Delegate
1061     auto cls = objc_allocateClassPair((Class) "NSObject"_cls, "AppDelegate", 0);
1062     class_addProtocol(cls, objc_getProtocol("NSApplicationDelegate"));
1063     class_addProtocol(cls, objc_getProtocol("WKScriptMessageHandler"));
1064     class_addMethod(
1065         cls, "applicationShouldTerminateAfterLastWindowClosed:"_sel,
1066         (IMP)(+[](id self, SEL cmd, id notification) -> BOOL { return 1; }),
1067         "c@:@");
1068     class_addMethod(
1069         cls, "userContentController:didReceiveScriptMessage:"_sel,
1070         (IMP)(+[](id self, SEL cmd, id notification, id msg) {
1071           auto w = (browser_engine *)objc_getAssociatedObject(self, "webview");
1072           w->m_cb((const char *)objc_msgSend(objc_msgSend(msg, "body"_sel),
1073                                              "UTF8String"_sel));
1074         }),
1075         "v@:@@");
1076     objc_registerClassPair(cls);
1077 
1078     auto delegate = objc_msgSend((id)cls, "new"_sel);
1079     objc_setAssociatedObject(delegate, "webview", (id)this,
1080                              OBJC_ASSOCIATION_ASSIGN);
1081     objc_msgSend(app, sel_registerName("setDelegate:"), delegate);
1082 
1083     // Main window
1084     if (window is null) {
1085       m_window = objc_msgSend("NSWindow"_cls, "alloc"_sel);
1086       m_window = objc_msgSend(
1087           m_window, "initWithContentRect:styleMask:backing:defer:"_sel,
1088           CGRectMake(0, 0, 0, 0), 0, NSBackingStoreBuffered, 0);
1089       setSize(480, 320, true);
1090     } else {
1091       m_window = (id)window;
1092     }
1093 
1094     // Webview
1095     auto config = objc_msgSend("WKWebViewConfiguration"_cls, "new"_sel);
1096     m_manager = objc_msgSend(config, "userContentController"_sel);
1097     m_webview = objc_msgSend("WKWebView"_cls, "alloc"_sel);
1098     objc_msgSend(m_webview, "initWithFrame:configuration:"_sel,
1099                  CGRectMake(0, 0, 0, 0), config);
1100     objc_msgSend(m_manager, "addScriptMessageHandler:name:"_sel, delegate,
1101                  "external"_str);
1102     init(R"script(
1103                       window.external = {
1104                         invoke: function(s) {
1105                           window.webkit.messageHandlers.external.postMessage(s);
1106                         },
1107                       };
1108                      )script");
1109     if (dbg) {
1110       objc_msgSend(objc_msgSend(config, "preferences"_sel),
1111                    "setValue:forKey:"_sel, 1, "developerExtrasEnabled"_str);
1112     }
1113     objc_msgSend(m_window, "setContentView:"_sel, m_webview);
1114     objc_msgSend(m_window, "makeKeyAndOrderFront:"_sel, null);
1115   }
1116   ~browser_engine() { close(); }
1117   void terminate() { close(); objc_msgSend("NSApp"_cls, "terminate:"_sel, null); }
1118   void run() {
1119     id app = objc_msgSend("NSApplication"_cls, "sharedApplication"_sel);
1120     dispatch([&]() { objc_msgSend(app, "activateIgnoringOtherApps:"_sel, 1); });
1121     objc_msgSend(app, "run"_sel);
1122   }
1123   void dispatch(std::function<void()> f) {
1124     dispatch_async_f(dispatch_get_main_queue(), new dispatch_fn_t(f),
1125                      (dispatch_function_t)([](void *arg) {
1126                        auto f = static_cast<dispatch_fn_t *>(arg);
1127                        (*f)();
1128                        delete f;
1129                      }));
1130   }
1131   void setTitle(const char *title) {
1132     objc_msgSend(
1133         m_window, "setTitle:"_sel,
1134         objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, title));
1135   }
1136   void setSize(int width, int height, bool resizable) {
1137     auto style = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |
1138                  NSWindowStyleMaskMiniaturizable;
1139     if (resizable) {
1140       style = style | NSWindowStyleMaskResizable;
1141     }
1142     objc_msgSend(m_window, "setStyleMask:"_sel, style);
1143     objc_msgSend(m_window, "setFrame:display:animate:"_sel,
1144                  CGRectMake(0, 0, width, height), 1, 0);
1145   }
1146   void navigate(const char *url) {
1147     auto nsurl = objc_msgSend(
1148         "NSURL"_cls, "URLWithString:"_sel,
1149         objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, url));
1150     objc_msgSend(
1151         m_webview, "loadRequest:"_sel,
1152         objc_msgSend("NSURLRequest"_cls, "requestWithURL:"_sel, nsurl));
1153   }
1154   void init(const char *js) {
1155     objc_msgSend(
1156         m_manager, "addUserScript:"_sel,
1157         objc_msgSend(
1158             objc_msgSend("WKUserScript"_cls, "alloc"_sel),
1159             "initWithSource:injectionTime:forMainFrameOnly:"_sel,
1160             objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, js),
1161             WKUserScriptInjectionTimeAtDocumentStart, 1));
1162   }
1163   void eval(const char *js) {
1164     objc_msgSend(m_webview, "evaluateJavaScript:completionHandler:"_sel,
1165                  objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, js),
1166                  null);
1167   }
1168 
1169 protected:
1170   void close() { objc_msgSend(m_window, "close"_sel); }
1171   id m_window;
1172   id m_webview;
1173   id m_manager;
1174   msg_cb_t m_cb;
1175 };
1176 
1177 +/
1178 
1179 }
1180 
1181 version(cef)  {
1182 
1183 /++
1184 	This creates a base class for a thing to help you implement the function pointers.
1185 
1186 	class MyApp : CEF!cef_app_t {
1187 
1188 	}
1189 +/
1190 abstract class CEF(Base) {
1191 	private struct Inner {
1192 		Base c;
1193 		CEF d_object;
1194 	}
1195 	private Inner inner;
1196 
1197 	this() nothrow {
1198 		if(!__ctfe) construct();
1199 	}
1200 
1201 	// ONLY call this if you did a ctfe construction
1202 	void construct() nothrow {
1203 		assert(inner.c.base.size == 0);
1204 
1205 		import core.memory;
1206 		GC.addRoot(cast(void*) this);
1207 		inner.c.base.size = Inner.sizeof;
1208 		inner.c.base.add_ref = &c_add_ref;
1209 		inner.c.base.release = &c_release;
1210 		inner.c.base.has_one_ref = &c_has_one_ref;
1211 		inner.c.base.has_at_least_one_ref = &c_has_at_least_one_ref;
1212 		inner.d_object = this;
1213 
1214 		static foreach(memberName; __traits(allMembers, Base)) {
1215 			static if(is(typeof(__traits(getMember, Base, memberName)) == return)) {
1216 				__traits(getMember, inner.c, memberName) = mixin("&c_" ~ memberName);
1217 			}
1218 		}
1219 	}
1220 
1221 	private static nothrow @nogc extern(System) {
1222 		void c_add_ref(cef_base_ref_counted_t* self) {
1223 			return ((cast(Inner*) self).d_object).add_ref();
1224 		}
1225 		int c_release(cef_base_ref_counted_t* self) {
1226 			return ((cast(Inner*) self).d_object).release();
1227 		}
1228 		int c_has_one_ref(cef_base_ref_counted_t* self) {
1229 			return ((cast(Inner*) self).d_object).has_one_ref();
1230 		}
1231 		int c_has_at_least_one_ref(cef_base_ref_counted_t* self) {
1232 			return ((cast(Inner*) self).d_object).has_at_least_one_ref();
1233 		}
1234 	}
1235 
1236 	private shared(int) refcount = 1;
1237 	final void add_ref() {
1238 		import core.atomic;
1239 		atomicOp!"+="(refcount, 1);
1240 	}
1241 	final int release() {
1242 		import core.atomic;
1243 		auto v = atomicOp!"-="(refcount, 1);
1244 		if(v == 0) {
1245 			import core.memory;
1246 			GC.removeRoot(cast(void*) this);
1247 			return 1;
1248 		}
1249 		return 0;
1250 	}
1251 	final int has_one_ref() {
1252 		return (cast() refcount) == 1;
1253 	}
1254 	final int has_at_least_one_ref() {
1255 		return (cast() refcount) >= 1;
1256 	}
1257 
1258 	/// Call this to pass to CEF. It will add ref for you.
1259 	final Base* passable() {
1260 		assert(inner.c.base.size);
1261 		add_ref();
1262 		return returnable();
1263 	}
1264 
1265 	final Base* returnable() {
1266 		assert(inner.c.base.size);
1267 		return &inner.c;
1268 	}
1269 
1270 	static foreach(memberName; __traits(allMembers, Base)) {
1271 		static if(is(typeof(__traits(getMember, Base, memberName)) == return)) {
1272 			mixin AbstractMethod!(memberName);
1273 		} else {
1274 			mixin(q{final ref @property } ~ memberName ~ q{() { return __traits(getMember, inner.c, memberName); }});
1275 		}
1276 	}
1277 }
1278 
1279 // you implement this in D...
1280 private mixin template AbstractMethod(string name) {
1281 	alias ptr = typeof(__traits(getMember, Base, name));
1282 	static if(is(ptr Return == return))
1283 	static if(is(typeof(*ptr) Params == function))
1284 	{
1285 		mixin(q{abstract nothrow Return } ~ name ~ q{(CefToD!(Params[1 .. $]) p);});
1286 		// mixin(q{abstract nothrow Return } ~ name ~ q{(Params[1 .. $] p);});
1287 
1288 		mixin(q{
1289 		private static nothrow extern(System)
1290 		Return c_}~name~q{(Params p) {
1291 			Base* self = p[0]; // a bit of a type check here...
1292 			auto dobj = (cast(Inner*) self).d_object; // ...before this cast.
1293 
1294 			//return __traits(getMember, dobj, name)(p[1 .. $]);
1295 			mixin(() {
1296 				string code = "return __traits(getMember, dobj, name)(";
1297 
1298 				static foreach(idx; 1 .. p.length) {
1299 					if(idx > 1)
1300 						code ~= ", ";
1301 					code ~= "cefToD(p[" ~ idx.stringof ~ "])";
1302 				}
1303 				code ~= ");";
1304 				return code;
1305 			}());
1306 		}
1307 		});
1308 	}
1309 	else static assert(0, name ~ " params");
1310 	else static assert(0, name ~ " return");
1311 }
1312 
1313 // you call this from D...
1314 private mixin template ForwardMethod(string name) {
1315 	alias ptr = typeof(__traits(getMember, Base, name));
1316 	static if(is(ptr Return == return))
1317 	static if(is(typeof(*ptr) Params == function))
1318 	{
1319 		mixin(q{nothrow auto } ~ name ~ q{(Params[1 .. $] p) {
1320 			Base* self = inner; // a bit of a type check here...
1321 			static if(is(Return == void))
1322 				return __traits(getMember, inner, name)(self, p);
1323 			else
1324 				return cefToD(__traits(getMember, inner, name)(self, p));
1325 		}});
1326 	}
1327 	else static assert(0, name ~ " params");
1328 	else static assert(0, name ~ " return");
1329 }
1330 
1331 
1332 private alias AliasSeq(T...) = T;
1333 
1334 private template CefToD(T...) {
1335 	static if(T.length == 0) {
1336 		alias CefToD = T;
1337 	} else static if(T.length == 1) {
1338 		static if(is(typeof(T[0].base) == cef_base_ref_counted_t)) {
1339 			alias CefToD = RC!(typeof(*T[0]));
1340 			/+
1341 			static if(is(T[0] == I*, I)) {
1342 				alias CefToD = CEF!(I);
1343 			} else static assert(0, T[0]);
1344 			+/
1345 		} else
1346 			alias CefToD = T[0];
1347 	} else {
1348 		alias CefToD = AliasSeq!(CefToD!(T[0]), CefToD!(T[1..$]));
1349 
1350 	}
1351 }
1352 
1353 enum activeEngine = WebviewEngine.cef;
1354 
1355 struct RC(Base) {
1356 	private Base* inner;
1357 
1358 	this(Base* t) nothrow {
1359 		inner = t;
1360 		// assuming the refcount is already set here
1361 	}
1362 	this(this) nothrow {
1363 		if(inner is null) return;
1364 		inner.base.add_ref(&inner.base);
1365 	}
1366 	~this() nothrow {
1367 		if(inner is null) return;
1368 		inner.base.release(&inner.base);
1369 		inner = null;
1370 		//sdpyPrintDebugString("omg release");
1371 	}
1372 	bool opCast(T:bool)() nothrow {
1373 		return inner !is null;
1374 	}
1375 
1376 	Base* getRawPointer() nothrow {
1377 		return inner;
1378 	}
1379 
1380 	Base* passable() nothrow {
1381 		if(inner is null)
1382 			return inner;
1383 
1384 		inner.base.add_ref(&inner.base);
1385 		return inner;
1386 	}
1387 
1388 	static foreach(memberName; __traits(allMembers, Base)) {
1389 		static if(is(typeof(__traits(getMember, Base, memberName)) == return)) {
1390 			mixin ForwardMethod!(memberName);
1391 		} else {
1392 			mixin(q{final ref @property } ~ memberName ~ q{() { return __traits(getMember, inner, memberName); }});
1393 		}
1394 	}
1395 }
1396 
1397 auto cefToD(T)(T t) {
1398 	static if(is(typeof(T.base) == cef_base_ref_counted_t)) {
1399 		return RC!(typeof(*T))(t);
1400 	} else {
1401 		return t;
1402 	}
1403 }
1404 
1405 
1406 string toGC(const cef_string_utf16_t str) nothrow {
1407 	if(str.str is null)
1408 		return null;
1409 
1410 	string s;
1411 	s.reserve(str.length);
1412 
1413 	try
1414 	foreach(char ch; str.str[0 .. str.length])
1415 		s ~= ch;
1416 	catch(Exception e) {}
1417 	return s;
1418 }
1419 
1420 string toGC(const cef_string_utf16_t* str) nothrow {
1421 	if(str is null)
1422 		return null;
1423 	return toGC(*str);
1424 }
1425 
1426 string toGCAndFree(const cef_string_userfree_t str) nothrow {
1427 	if(str is null)
1428 		return null;
1429 
1430 	string s = toGC(str);
1431 	libcef.string_userfree_utf16_free(str);
1432 	//str = null;
1433 	return s;
1434 }
1435 
1436 // bindings follow, first some hand-written ones for Linux, then some machine translated things. More comments about the machine translation when it comes.
1437 
1438 version(linux)
1439 struct cef_main_args_t {
1440 	int argc;
1441 	char** argv;
1442 }
1443 version(Windows)
1444 struct cef_main_args_t {
1445 	HINSTANCE instance;
1446 }
1447 
1448 // 0 - CEF_VERSION_MAJOR
1449 // 1 - CEF_VERSION_MINOR
1450 // 2 - CEF_VERSION_PATCH
1451 // 3 - CEF_COMMIT_NUMBER
1452 // 4 - CHROME_VERSION_MAJOR
1453 // 5 - CHROME_VERSION_MINOR
1454 // 6 - CHROME_VERSION_BUILD
1455 // 7 - CHROME_VERSION_PATCH
1456 
1457 extern(C) nothrow
1458 int cef_string_utf8_to_utf16(const char* src, size_t src_len, cef_string_utf16_t* output);
1459 
1460 struct cef_string_utf8_t {
1461   char* str;
1462   size_t length;
1463   void* dtor;// void (*dtor)(char* str);
1464 }
1465 
1466 struct cef_basetime_t {
1467 	long val;
1468 }
1469 
1470 
1471 struct cef_string_utf16_t {
1472   char16* str;
1473   size_t length;
1474   void* dtor; // voiod (*dtor)(char16* str);
1475 
1476   this(wstring s) nothrow {
1477 	this.str = cast(char16*) s.ptr;
1478 	this.length = s.length;
1479   }
1480 
1481   this(string s) nothrow {
1482 	libcef.string_utf8_to_utf16(s.ptr, s.length, &this);
1483   }
1484 }
1485 
1486 alias cef_string_t = cef_string_utf16_t;
1487 alias cef_window_handle_t = NativeWindowHandle;
1488 version(Windows)
1489 	alias cef_cursor_handle_t = HCURSOR;
1490 else
1491 	alias cef_cursor_handle_t = XID;
1492 
1493 struct cef_time_t {
1494   int year;          // Four or five digit year "2007" (1601 to 30827 on
1495                      //   Windows, 1970 to 2038 on 32-bit POSIX)
1496   int month;         // 1-based month (values 1 = January, etc.)
1497   int day_of_week;   // 0-based day of week (0 = Sunday, etc.)
1498   int day_of_month;  // 1-based day of month (1-31)
1499   int hour;          // Hour within the current day (0-23)
1500   int minute;        // Minute within the current hour (0-59)
1501   int second;        // Second within the current minute (0-59 plus leap
1502                      //   seconds which may take it up to 60).
1503   int millisecond;   // Milliseconds within the current second (0-999)
1504 }
1505 
1506 version(linux)
1507 struct cef_window_info_t {
1508   cef_string_t window_name;
1509 
1510   uint x;
1511   uint y;
1512   uint width;
1513   uint height;
1514 
1515   cef_window_handle_t parent_window;
1516 
1517   int windowless_rendering_enabled;
1518 
1519   int shared_texture_enabled;
1520 
1521   int external_begin_frame_enabled;
1522 
1523   cef_window_handle_t window;
1524 }
1525 
1526 version(Windows)
1527 struct cef_window_info_t {
1528 	DWORD ex_style;
1529 	cef_string_t window_name;
1530 	DWORD style;
1531 	cef_rect_t bounds;
1532 	cef_window_handle_t parent_window;
1533 	HMENU menu;
1534 	int windowless_rendering_enabled;
1535 	int shared_texture_enabled;
1536 	int external_begin_frame_enabled;
1537 	cef_window_handle_t window;
1538 }
1539 
1540 
1541 
1542 import core.stdc.config;
1543 alias int16 = short;
1544 alias uint16 = ushort;
1545 alias int32 = int;
1546 alias uint32 = uint;
1547 alias char16 = wchar;
1548 alias int64 = long;
1549 alias uint64 = ulong;
1550 
1551 // these are supposed to just be opaque pointers but i want some type safety. this same abi wise.......... RIGHT?
1552 struct cef_string_list_t { void* r; }
1553 struct cef_string_multimap_t { void* r; }
1554 struct cef_string_map_t { void* r; }
1555 
1556 
1557 extern(C) nothrow {
1558 	cef_string_list_t cef_string_list_alloc();
1559 	size_t cef_string_list_size(cef_string_list_t list);
1560 	int cef_string_list_value(cef_string_list_t list, size_t index, cef_string_t* value);
1561 	void cef_string_list_append(cef_string_list_t list, const cef_string_t* value);
1562 	void cef_string_list_clear(cef_string_list_t list);
1563 	void cef_string_list_free(cef_string_list_t list);
1564 	cef_string_list_t cef_string_list_copy(cef_string_list_t list);
1565 }
1566 
1567 
1568 version(linux) {
1569 	import core.sys.posix.sys.types;
1570 	alias pid_t cef_platform_thread_id_t;
1571 	alias OS_EVENT = XEvent;
1572 } else {
1573 	import core.sys.windows.windows;
1574 	alias HANDLE cef_platform_thread_id_t;
1575 	alias OS_EVENT = void;
1576 }
1577 
1578 nothrow @nogc extern(C) void cef_string_userfree_utf16_free(const cef_string_userfree_utf16_t str);
1579 struct cef_string_userfree_utf16_t { cef_string_utf16_t* it; alias it this; }
1580 alias cef_string_userfree_t = cef_string_userfree_utf16_t;
1581 
1582 // **************
1583 
1584 // cef/include/capi$ for i in *.h; do dstep -I../.. $i; done
1585 // also dstep include/cef_version.h
1586 // update the CEF_VERSION and the CEF_API_HASH_UNIVERSAL out of cef_version.h and cef_api_hash.h
1587 // then concatenate the bodies of them and delete the translated macros and `struct .*;` stuff
1588 // 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
1589 // then select all and global replace s/_cef/cef/g
1590 // 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.
1591 
1592 // and make sure version(linux) void cef_register_widevine_cdm ( if it is there.
1593 
1594 // and extern (C) is wrong on the callbacks, they should all be extern(System)
1595 // `/function (<ENTER>Oextern(System)<ESC>`
1596 
1597 
1598 version=embedded_cef_bindings;
1599 
1600 // everything inside these brackets are the bindings you can replace if update needed
1601 
1602 version(embedded_cef_bindings) {
1603 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
1604 //
1605 // Redistribution and use in source and binary forms, with or without
1606 // modification, are permitted provided that the following conditions are
1607 // met:
1608 //
1609 //    * Redistributions of source code must retain the above copyright
1610 // notice, this list of conditions and the following disclaimer.
1611 //    * Redistributions in binary form must reproduce the above
1612 // copyright notice, this list of conditions and the following disclaimer
1613 // in the documentation and/or other materials provided with the
1614 // distribution.
1615 //    * Neither the name of Google Inc. nor the name Chromium Embedded
1616 // Framework nor the names of its contributors may be used to endorse
1617 // or promote products derived from this software without specific prior
1618 // written permission.
1619 //
1620 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1621 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1622 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1623 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1624 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1625 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1626 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1627 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1628 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1629 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1630 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1631 //
1632 // ---------------------------------------------------------------------------
1633 //
1634 // This file was generated by the make_version_header.py tool.
1635 //
1636 
1637 extern (C):
1638 
1639 enum CEF_VERSION = "126.2.10+g61241e4+chromium-126.0.6478.127";
1640 enum CEF_VERSION_MAJOR = 126;
1641 enum CEF_VERSION_MINOR = 2;
1642 enum CEF_VERSION_PATCH = 10;
1643 enum CEF_COMMIT_NUMBER = 3011;
1644 enum CEF_COMMIT_HASH = "61241e448276eee53d2b20ca045f5b5ae53a937a";
1645 enum COPYRIGHT_YEAR = 2024;
1646 
1647 enum CHROME_VERSION_MAJOR = 126;
1648 enum CHROME_VERSION_MINOR = 0;
1649 enum CHROME_VERSION_BUILD = 6478;
1650 enum CHROME_VERSION_PATCH = 127;
1651 
1652 
1653 
1654 // Returns CEF version information for the libcef library. The |entry|
1655 // parameter describes which version component will be returned:
1656 // 0 - CEF_VERSION_MAJOR
1657 // 1 - CEF_VERSION_MINOR
1658 // 2 - CEF_VERSION_PATCH
1659 // 3 - CEF_COMMIT_NUMBER
1660 // 4 - CHROME_VERSION_MAJOR
1661 // 5 - CHROME_VERSION_MINOR
1662 // 6 - CHROME_VERSION_BUILD
1663 // 7 - CHROME_VERSION_PATCH
1664 ///
1665 int cef_version_info (int entry);
1666 
1667 // APSTUDIO_HIDDEN_SYMBOLS
1668 
1669 // CEF_INCLUDE_CEF_VERSION_H_
1670 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
1671 //
1672 // Redistribution and use in source and binary forms, with or without
1673 // modification, are permitted provided that the following conditions are
1674 // met:
1675 //
1676 //    * Redistributions of source code must retain the above copyright
1677 // notice, this list of conditions and the following disclaimer.
1678 //    * Redistributions in binary form must reproduce the above
1679 // copyright notice, this list of conditions and the following disclaimer
1680 // in the documentation and/or other materials provided with the
1681 // distribution.
1682 //    * Neither the name of Google Inc. nor the name Chromium Embedded
1683 // Framework nor the names of its contributors may be used to endorse
1684 // or promote products derived from this software without specific prior
1685 // written permission.
1686 //
1687 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1688 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1689 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1690 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1691 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1692 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1693 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1694 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1695 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1696 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1697 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1698 //
1699 // ---------------------------------------------------------------------------
1700 //
1701 // This file was generated by the make_api_hash_header.py tool.
1702 //
1703 
1704 extern (C):
1705 
1706 // The API hash is created by analyzing CEF header files for C API type
1707 // definitions. The hash value will change when header files are modified in a
1708 // way that may cause binary incompatibility with other builds. The universal
1709 // hash value will change if any platform is affected whereas the platform hash
1710 // values will change only if that particular platform is affected.
1711 enum CEF_API_HASH_UNIVERSAL = "ed1dfa5ff8a041241f8fb72eb7454811f358f0d3";
1712 
1713 enum CEF_API_HASH_PLATFORM = "09d3e280ed38f7a082b794c56ff71c52f86f0ea8";
1714 
1715 ///
1716 // Returns CEF API hashes for the libcef library. The returned string is owned
1717 // by the library and should not be freed. The |entry| parameter describes which
1718 // hash value will be returned:
1719 // 0 - CEF_API_HASH_PLATFORM
1720 // 1 - CEF_API_HASH_UNIVERSAL
1721 // 2 - CEF_COMMIT_HASH (from cef_version.h)
1722 ///
1723 const(char)* cef_api_hash (int entry);
1724 
1725 // CEF_INCLUDE_API_HASH_H_
1726 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
1727 //
1728 // Redistribution and use in source and binary forms, with or without
1729 // modification, are permitted provided that the following conditions are
1730 // met:
1731 //
1732 //    * Redistributions of source code must retain the above copyright
1733 // notice, this list of conditions and the following disclaimer.
1734 //    * Redistributions in binary form must reproduce the above
1735 // copyright notice, this list of conditions and the following disclaimer
1736 // in the documentation and/or other materials provided with the
1737 // distribution.
1738 //    * Neither the name of Google Inc. nor the name Chromium Embedded
1739 // Framework nor the names of its contributors may be used to endorse
1740 // or promote products derived from this software without specific prior
1741 // written permission.
1742 //
1743 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1744 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1745 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1746 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1747 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1748 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1749 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1750 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1751 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1752 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1753 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1754 
1755 extern (C):
1756 
1757 ///
1758 /// Structure representing a point.
1759 ///
1760 struct cef_point_t
1761 {
1762     int x;
1763     int y;
1764 }
1765 
1766 
1767 
1768 ///
1769 /// Structure representing a rectangle.
1770 ///
1771 struct cef_rect_t
1772 {
1773     int x;
1774     int y;
1775     int width;
1776     int height;
1777 }
1778 
1779 
1780 
1781 ///
1782 /// Structure representing a size.
1783 ///
1784 struct cef_size_t
1785 {
1786     int width;
1787     int height;
1788 }
1789 
1790 
1791 
1792 ///
1793 /// Structure representing insets.
1794 ///
1795 struct cef_insets_t
1796 {
1797     int top;
1798     int left;
1799     int bottom;
1800     int right;
1801 }
1802 
1803 
1804 
1805 // CEF_INCLUDE_INTERNAL_CEF_TYPES_GEOMETRY_H_
1806 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
1807 //
1808 // Redistribution and use in source and binary forms, with or without
1809 // modification, are permitted provided that the following conditions are
1810 // met:
1811 //
1812 //    * Redistributions of source code must retain the above copyright
1813 // notice, this list of conditions and the following disclaimer.
1814 //    * Redistributions in binary form must reproduce the above
1815 // copyright notice, this list of conditions and the following disclaimer
1816 // in the documentation and/or other materials provided with the
1817 // distribution.
1818 //    * Neither the name of Google Inc. nor the name Chromium Embedded
1819 // Framework nor the names of its contributors may be used to endorse
1820 // or promote products derived from this software without specific prior
1821 // written permission.
1822 //
1823 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1824 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1825 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1826 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1827 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1828 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1829 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1830 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1831 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1832 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1833 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1834 
1835 extern (C):
1836 
1837 ///
1838 /// Supported content setting types. Some types are platform-specific or only
1839 /// supported with the Chrome runtime. Should be kept in sync with Chromium's
1840 /// ContentSettingsType type.
1841 ///
1842 enum cef_content_setting_types_t
1843 {
1844     // This setting governs whether cookies are enabled by the user in the
1845     /// provided context. However, it may be overridden by other settings. This
1846     /// enum should NOT be read directly to determine whether cookies are enabled;
1847     /// the client should instead rely on the CookieSettings API.
1848     CEF_CONTENT_SETTING_TYPE_COOKIES = 0,
1849     CEF_CONTENT_SETTING_TYPE_IMAGES = 1,
1850     CEF_CONTENT_SETTING_TYPE_JAVASCRIPT = 2,
1851 
1852     /// This setting governs both popups and unwanted redirects like tab-unders
1853     /// and framebusting.
1854     CEF_CONTENT_SETTING_TYPE_POPUPS = 3,
1855 
1856     CEF_CONTENT_SETTING_TYPE_GEOLOCATION = 4,
1857     CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS = 5,
1858     CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE = 6,
1859     CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT = 7,
1860     CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC = 8,
1861     CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA = 9,
1862     CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS = 10,
1863     CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER = 11,
1864     CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS = 12,
1865 
1866     /// Advanced device-specific functions on MIDI devices. MIDI-SysEx
1867     /// communications can be used for changing the MIDI device's persistent state
1868     /// such as firmware.
1869     CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX = 13,
1870 
1871     CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS = 14,
1872     CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER = 15,
1873     CEF_CONTENT_SETTING_TYPE_APP_BANNER = 16,
1874     CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT = 17,
1875     CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE = 18,
1876     CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA = 19,
1877     CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD = 20,
1878     CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC = 21,
1879     CEF_CONTENT_SETTING_TYPE_AUTOPLAY = 22,
1880     CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO = 23,
1881     CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA = 24,
1882     CEF_CONTENT_SETTING_TYPE_ADS = 25,
1883 
1884     /// Website setting which stores metadata for the subresource filter to aid in
1885     /// decisions for whether or not to show the UI.
1886     CEF_CONTENT_SETTING_TYPE_ADS_DATA = 26,
1887 
1888     /// MIDI stands for Musical Instrument Digital Interface. It is a standard
1889     /// that allows electronic musical instruments, computers, and other devices
1890     /// to communicate with each other.
1891     CEF_CONTENT_SETTING_TYPE_MIDI = 27,
1892 
1893     /// This content setting type is for caching password protection service's
1894     /// verdicts of each origin.
1895     CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION = 28,
1896 
1897     /// Website setting which stores engagement data for media related to a
1898     /// specific origin.
1899     CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT = 29,
1900 
1901     /// Content setting which stores whether or not the site can play audible
1902     /// sound. This will not block playback but instead the user will not hear it.
1903     CEF_CONTENT_SETTING_TYPE_SOUND = 30,
1904 
1905     /// Website setting which stores the list of client hints that the origin
1906     /// requested the browser to remember. The browser is expected to send all
1907     /// client hints in the HTTP request headers for every resource requested
1908     /// from that origin.
1909     CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS = 31,
1910 
1911     /// Generic Sensor API covering ambient-light-sensor, accelerometer, gyroscope
1912     /// and magnetometer are all mapped to a single content_settings_type.
1913     /// Setting for the Generic Sensor API covering ambient-light-sensor,
1914     /// accelerometer, gyroscope and magnetometer. These are all mapped to a
1915     /// single ContentSettingsType.
1916     CEF_CONTENT_SETTING_TYPE_SENSORS = 32,
1917 
1918     /// Content setting which stores whether or not the user has granted the site
1919     /// permission to respond to accessibility events, which can be used to
1920     /// provide a custom accessibility experience. Requires explicit user consent
1921     /// because some users may not want sites to know they're using assistive
1922     /// technology.
1923     CEF_CONTENT_SETTING_TYPE_ACCESSIBILITY_EVENTS = 33,
1924 
1925     /// Used to store whether to allow a website to install a payment handler.
1926     CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER = 34,
1927 
1928     /// Content setting which stores whether to allow sites to ask for permission
1929     /// to access USB devices. If this is allowed specific device permissions are
1930     /// stored under USB_CHOOSER_DATA.
1931     CEF_CONTENT_SETTING_TYPE_USB_GUARD = 35,
1932 
1933     /// Nothing is stored in this setting at present. Please refer to
1934     /// BackgroundFetchPermissionContext for details on how this permission
1935     /// is ascertained.
1936     CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH = 36,
1937 
1938     /// Website setting which stores the amount of times the user has dismissed
1939     /// intent picker UI without explicitly choosing an option.
1940     CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY = 37,
1941 
1942     /// Used to store whether to allow a website to detect user active/idle state.
1943     CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION = 38,
1944 
1945     /// Content settings for access to serial ports. The "guard" content setting
1946     /// stores whether to allow sites to ask for permission to access a port. The
1947     /// permissions granted to access particular ports are stored in the "chooser
1948     /// data" website setting.
1949     CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD = 39,
1950     CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA = 40,
1951 
1952     /// Nothing is stored in this setting at present. Please refer to
1953     /// PeriodicBackgroundSyncPermissionContext for details on how this permission
1954     /// is ascertained.
1955     /// This content setting is not registered because it does not require access
1956     /// to any existing providers.
1957     CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC = 41,
1958 
1959     /// Content setting which stores whether to allow sites to ask for permission
1960     /// to do Bluetooth scanning.
1961     CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING = 42,
1962 
1963     /// Content settings for access to HID devices. The "guard" content setting
1964     /// stores whether to allow sites to ask for permission to access a device.
1965     /// The permissions granted to access particular devices are stored in the
1966     /// "chooser data" website setting.
1967     CEF_CONTENT_SETTING_TYPE_HID_GUARD = 43,
1968     CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA = 44,
1969 
1970     /// Wake Lock API, which has two lock types: screen and system locks.
1971     /// Currently, screen locks do not need any additional permission, and system
1972     /// locks are always denied while the right UI is worked out.
1973     CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN = 45,
1974     CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM = 46,
1975 
1976     /// Legacy SameSite cookie behavior. This disables SameSite=Lax-by-default,
1977     /// SameSite=None requires Secure, and Schemeful Same-Site, forcing the
1978     /// legacy behavior wherein 1) cookies that don't specify SameSite are treated
1979     /// as SameSite=None, 2) SameSite=None cookies are not required to be Secure,
1980     /// and 3) schemeful same-site is not active.
1981     ///
1982     /// This will also be used to revert to legacy behavior when future changes
1983     /// in cookie handling are introduced.
1984     CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS = 47,
1985 
1986     /// Content settings which stores whether to allow sites to ask for permission
1987     /// to save changes to an original file selected by the user through the
1988     /// File System Access API.
1989     CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD = 48,
1990 
1991     /// Used to store whether to allow a website to exchange data with NFC
1992     /// devices.
1993     CEF_CONTENT_SETTING_TYPE_NFC = 49,
1994 
1995     /// Website setting to store permissions granted to access particular
1996     /// Bluetooth devices.
1997     CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA = 50,
1998 
1999     /// Full access to the system clipboard (sanitized read without user gesture,
2000     /// and unsanitized read and write with user gesture).
2001     CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE = 51,
2002 
2003     /// This is special-cased in the permissions layer to always allow, and as
2004     /// such doesn't have associated prefs data.
2005     CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE = 52,
2006 
2007     /// This content setting type is for caching safe browsing real time url
2008     /// check's verdicts of each origin.
2009     CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA = 53,
2010 
2011     /// Used to store whether a site is allowed to request AR or VR sessions with
2012     /// the WebXr Device API.
2013     CEF_CONTENT_SETTING_TYPE_VR = 54,
2014     CEF_CONTENT_SETTING_TYPE_AR = 55,
2015 
2016     /// Content setting which stores whether to allow site to open and read files
2017     /// and directories selected through the File System Access API.
2018     CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD = 56,
2019 
2020     /// Access to first party storage in a third-party context. Exceptions are
2021     /// scoped to the combination of requesting/top-level origin, and are managed
2022     /// through the Storage Access API. For the time being, this content setting
2023     /// exists in parallel to third-party cookie rules stored in COOKIES.
2024     CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS = 57,
2025 
2026     /// Content setting which stores whether to allow a site to control camera
2027     /// movements. It does not give access to camera.
2028     CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM = 58,
2029 
2030     /// Content setting for Screen Enumeration and Screen Detail functionality.
2031     /// Permits access to detailed multi-screen information, like size and
2032     /// position. Permits placing fullscreen and windowed content on specific
2033     /// screens. See also: https://w3c.github.io/window-placement
2034     CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT = 59,
2035 
2036     /// Stores whether to allow insecure websites to make private network
2037     /// requests.
2038     /// See also: https://wicg.github.io/cors-rfc1918
2039     /// Set through enterprise policies only.
2040     CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK = 60,
2041 
2042     /// Content setting which stores whether or not a site can access low-level
2043     /// locally installed font data using the Local Fonts Access API.
2044     CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS = 61,
2045 
2046     /// Stores per-origin state for permission auto-revocation (for all permission
2047     /// types).
2048     CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA = 62,
2049 
2050     /// Stores per-origin state of the most recently selected directory for the
2051     /// use by the File System Access API.
2052     CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY = 63,
2053 
2054     /// Controls access to the getDisplayMedia API.
2055     CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE = 64,
2056 
2057     /// Website setting to store permissions metadata granted to paths on the
2058     /// local file system via the File System Access API.
2059     /// |FILE_SYSTEM_WRITE_GUARD| is the corresponding "guard" setting. The stored
2060     /// data represents valid permission only if
2061     /// |FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION| is enabled via user opt-in.
2062     /// Otherwise, they represent "recently granted but revoked permission", which
2063     /// are used to restore the permission.
2064     CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA = 65,
2065 
2066     /// Stores a grant that allows a relying party to send a request for identity
2067     /// information to specified identity providers, potentially through any
2068     /// anti-tracking measures that would otherwise prevent it. This setting is
2069     /// associated with the relying party's origin.
2070     CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING = 66,
2071 
2072     /// Whether to use the v8 optimized JIT for running JavaScript on the page.
2073     CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT = 67,
2074 
2075     /// Content setting which stores user decisions to allow loading a site over
2076     /// HTTP. Entries are added by hostname when a user bypasses the HTTPS-First
2077     /// Mode interstitial warning when a site does not support HTTPS. Allowed
2078     /// hosts are exact hostname matches -- subdomains of a host on the allowlist
2079     /// must be separately allowlisted.
2080     CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED = 68,
2081 
2082     /// Stores metadata related to form fill, such as e.g. whether user data was
2083     /// autofilled on a specific website.
2084     CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA = 69,
2085 
2086     /// Setting to indicate that there is an active federated sign-in session
2087     /// between a specified relying party and a specified identity provider for
2088     /// a specified account. When this is present it allows access to session
2089     /// management capabilities between the sites. This setting is associated
2090     /// with the relying party's origin.
2091     // Obsolete on Nov 2023.
2092     CEF_CONTENT_SETTING_TYPE_DEPRECATED_FEDERATED_IDENTITY_ACTIVE_SESSION = 70,
2093 
2094     /// Setting to indicate whether Chrome should automatically apply darkening to
2095     /// web content.
2096     CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT = 71,
2097 
2098     /// Setting to indicate whether Chrome should request the desktop view of a
2099     /// site instead of the mobile one.
2100     CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE = 72,
2101 
2102     /// Setting to indicate whether browser should allow signing into a website
2103     /// via the browser FedCM API.
2104     CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API = 73,
2105 
2106     /// Stores notification interactions per origin for the past 90 days.
2107     /// Interactions per origin are pre-aggregated over seven-day windows: A
2108     /// notification interaction or display is assigned to the last Monday
2109     /// midnight in local time.
2110     CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS = 74,
2111 
2112     /// Website setting which stores the last reduced accept language negotiated
2113     /// for a given origin, to be used on future visits to the origin.
2114     CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE = 75,
2115 
2116     /// Website setting which is used for NotificationPermissionReviewService to
2117     /// store origin blocklist from review notification permissions feature.
2118     CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW = 76,
2119 
2120     /// Website setting to store permissions granted to access particular devices
2121     /// in private network.
2122     CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD = 77,
2123     CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA = 78,
2124 
2125     /// Website setting which stores whether the browser has observed the user
2126     /// signing into an identity-provider based on observing the IdP-SignIn-Status
2127     /// HTTP header.
2128     CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS = 79,
2129 
2130     /// Website setting which is used for UnusedSitePermissionsService to
2131     /// store revoked permissions of unused sites from unused site permissions
2132     /// feature.
2133     CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS = 80,
2134 
2135     /// Similar to STORAGE_ACCESS, but applicable at the page-level rather than
2136     /// being specific to a frame.
2137     CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS = 81,
2138 
2139     /// Setting to indicate whether user has opted in to allowing auto re-authn
2140     /// via the FedCM API.
2141     CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION = 82,
2142 
2143     /// Website setting which stores whether the user has explicitly registered
2144     /// a website as an identity-provider.
2145     CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION = 83,
2146 
2147     /// Content setting which is used to indicate whether anti-abuse functionality
2148     /// should be enabled.
2149     CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE = 84,
2150 
2151     /// Content setting used to indicate whether third-party storage partitioning
2152     /// should be enabled.
2153     CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING = 85,
2154 
2155     /// Used to indicate whether HTTPS-First Mode is enabled on the hostname.
2156     CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED = 86,
2157 
2158     /// Setting for enabling the `getAllScreensMedia` API. Spec link:
2159     /// https://github.com/screen-share/capture-all-screens
2160     CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE = 87,
2161 
2162     /// Stores per origin metadata for cookie controls.
2163     CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA = 88,
2164 
2165     /// Content Setting for temporary 3PC accesses granted by user behavior
2166     /// heuristics.
2167     CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS = 89,
2168 
2169     /// Content Setting for 3PC accesses granted by metadata delivered via the
2170     /// component updater service. This type will only be used when
2171     /// `net::features::kTpcdMetadataGrants` is enabled.
2172     CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS = 90,
2173 
2174     /// Content Setting for 3PC accesses granted via 3PC deprecation trial.
2175     CEF_CONTENT_SETTING_TYPE_TPCD_TRIAL = 91,
2176 
2177     /// Content Setting for 3PC accesses granted via top-level 3PC deprecation
2178     /// trial. Similar to TPCD_TRIAL, but applicable at the page-level for the
2179     /// lifetime of the page that served the token, rather than being specific to
2180     /// a requesting-origin/top-level-site combination and persistent.
2181     CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_TRIAL = 92,
2182 
2183     /// Content Setting for a first-party origin trial that allows websites to
2184     /// enable third-party cookie deprecation.
2185     /// ALLOW (default): no effect (e.g. third-party cookies allowed, if not
2186     ///                  blocked otherwise).
2187     /// BLOCK: third-party cookies blocked, but 3PCD mitigations enabled.
2188     CEF_CONTENT_SETTING_TOP_LEVEL_TPCD_ORIGIN_TRIAL = 93,
2189 
2190     /// Content setting used to indicate whether entering picture-in-picture
2191     /// automatically should be enabled.
2192     CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE = 94,
2193 
2194     /// Whether user has opted into keeping file/directory permissions persistent
2195     /// between visits for a given origin. When enabled, permission metadata
2196     /// stored under |FILE_SYSTEM_ACCESS_CHOOSER_DATA| can auto-grant incoming
2197     /// permission request.
2198     CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION = 95,
2199 
2200     /// Whether the FSA Persistent Permissions restore prompt is eligible to be
2201     /// shown to the user, for a given origin.
2202     CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_RESTORE_PERMISSION = 96,
2203 
2204     /// Whether an application capturing another tab, may scroll and zoom
2205     /// the captured tab.
2206     CEF_CONTENT_SETTING_TYPE_CAPTURED_SURFACE_CONTROL = 97,
2207 
2208     /// Content setting for access to smart card readers.
2209     /// The "guard" content setting stores whether to allow sites to access the
2210     /// Smart Card API.
2211     CEF_CONTENT_SETTING_TYPE_SMART_CARD_GUARD = 98,
2212     CEF_CONTENT_SETTING_TYPE_SMART_CARD_DATA = 99,
2213 
2214     /// Content settings for access to printers for the Web Printing API.
2215     CEF_CONTENT_SETTING_TYPE_WEB_PRINTING = 100,
2216 
2217     /// Content setting used to indicate whether entering HTML Fullscreen
2218     /// automatically (i.e. without transient activation) should be enabled.
2219     CEF_CONTENT_SETTING_TYPE_AUTOMATIC_FULLSCREEN = 101,
2220 
2221     /// Content settings used to indicate that a web app is allowed to prompt the
2222     /// user for the installation of sub apps.
2223     CEF_CONTENT_SETTING_TYPE_SUB_APP_INSTALLATION_PROMPTS = 102,
2224 
2225     /// Whether an application can enumerate audio output device.
2226     CEF_CONTENT_SETTING_TYPE_SPEAKER_SELECTION = 103,
2227 
2228     /// Content settings for access to the Direct Sockets API.
2229     CEF_CONTENT_SETTING_TYPE_DIRECT_SOCKETS = 104,
2230 
2231     /// Keyboard Lock API allows a site to capture keyboard inputs that would
2232     /// otherwise be handled by the OS or the browser.
2233     CEF_CONTENT_SETTING_TYPE_KEYBOARD_LOCK = 105,
2234 
2235     /// Pointer Lock API allows a site to hide the cursor and have exclusive
2236     /// access to mouse inputs.
2237     CEF_CONTENT_SETTING_TYPE_POINTER_LOCK = 106,
2238 
2239     /// Website setting which is used for UnusedSitePermissionsService to store
2240     /// auto-revoked notification permissions from abusive sites.
2241     REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS = 107,
2242 
2243     /// Content setting that controls tracking protection status per site.
2244     /// BLOCK: Protections enabled. This is the default state.
2245     /// ALLOW: Protections disabled.
2246     TRACKING_PROTECTION = 108
2247 }
2248 
2249 alias CEF_CONTENT_SETTING_TYPE_COOKIES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_COOKIES;
2250 alias CEF_CONTENT_SETTING_TYPE_IMAGES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IMAGES;
2251 alias CEF_CONTENT_SETTING_TYPE_JAVASCRIPT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_JAVASCRIPT;
2252 alias CEF_CONTENT_SETTING_TYPE_POPUPS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_POPUPS;
2253 alias CEF_CONTENT_SETTING_TYPE_GEOLOCATION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_GEOLOCATION;
2254 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS;
2255 alias CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE;
2256 alias CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT;
2257 alias CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC;
2258 alias CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA;
2259 alias CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS;
2260 alias CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER;
2261 alias CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS;
2262 alias CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX;
2263 alias CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS;
2264 alias CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER;
2265 alias CEF_CONTENT_SETTING_TYPE_APP_BANNER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_APP_BANNER;
2266 alias CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT;
2267 alias CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE;
2268 alias CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA;
2269 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD;
2270 alias CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC;
2271 alias CEF_CONTENT_SETTING_TYPE_AUTOPLAY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTOPLAY;
2272 alias CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO;
2273 alias CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA;
2274 alias CEF_CONTENT_SETTING_TYPE_ADS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ADS;
2275 alias CEF_CONTENT_SETTING_TYPE_ADS_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ADS_DATA;
2276 alias CEF_CONTENT_SETTING_TYPE_MIDI = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIDI;
2277 alias CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION;
2278 alias CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT;
2279 alias CEF_CONTENT_SETTING_TYPE_SOUND = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SOUND;
2280 alias CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS;
2281 alias CEF_CONTENT_SETTING_TYPE_SENSORS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SENSORS;
2282 alias CEF_CONTENT_SETTING_TYPE_ACCESSIBILITY_EVENTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ACCESSIBILITY_EVENTS;
2283 alias CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER;
2284 alias CEF_CONTENT_SETTING_TYPE_USB_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_USB_GUARD;
2285 alias CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH;
2286 alias CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY;
2287 alias CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION;
2288 alias CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD;
2289 alias CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA;
2290 alias CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC;
2291 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING;
2292 alias CEF_CONTENT_SETTING_TYPE_HID_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HID_GUARD;
2293 alias CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA;
2294 alias CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN;
2295 alias CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM;
2296 alias CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS;
2297 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD;
2298 alias CEF_CONTENT_SETTING_TYPE_NFC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NFC;
2299 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA;
2300 alias CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE;
2301 alias CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE;
2302 alias CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA;
2303 alias CEF_CONTENT_SETTING_TYPE_VR = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_VR;
2304 alias CEF_CONTENT_SETTING_TYPE_AR = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AR;
2305 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD;
2306 alias CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS;
2307 alias CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM;
2308 alias CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT;
2309 alias CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK;
2310 alias CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS;
2311 alias CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA;
2312 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY;
2313 alias CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE;
2314 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA;
2315 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING;
2316 alias CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT;
2317 alias CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED;
2318 alias CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA;
2319 alias CEF_CONTENT_SETTING_TYPE_DEPRECATED_FEDERATED_IDENTITY_ACTIVE_SESSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DEPRECATED_FEDERATED_IDENTITY_ACTIVE_SESSION;
2320 alias CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT;
2321 alias CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE;
2322 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API;
2323 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS;
2324 alias CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE;
2325 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW;
2326 alias CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD;
2327 alias CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA;
2328 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;
2329 alias CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS;
2330 alias CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS;
2331 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION;
2332 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION;
2333 alias CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE;
2334 alias CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING;
2335 alias CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED;
2336 alias CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE;
2337 alias CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA;
2338 alias CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS;
2339 alias CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS;
2340 alias CEF_CONTENT_SETTING_TYPE_TPCD_TRIAL = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TPCD_TRIAL;
2341 alias CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_TRIAL = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_TRIAL;
2342 alias CEF_CONTENT_SETTING_TOP_LEVEL_TPCD_ORIGIN_TRIAL = cef_content_setting_types_t.CEF_CONTENT_SETTING_TOP_LEVEL_TPCD_ORIGIN_TRIAL;
2343 alias CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE;
2344 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION;
2345 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_RESTORE_PERMISSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_RESTORE_PERMISSION;
2346 alias CEF_CONTENT_SETTING_TYPE_CAPTURED_SURFACE_CONTROL = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CAPTURED_SURFACE_CONTROL;
2347 alias CEF_CONTENT_SETTING_TYPE_SMART_CARD_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SMART_CARD_GUARD;
2348 alias CEF_CONTENT_SETTING_TYPE_SMART_CARD_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SMART_CARD_DATA;
2349 alias CEF_CONTENT_SETTING_TYPE_WEB_PRINTING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WEB_PRINTING;
2350 alias CEF_CONTENT_SETTING_TYPE_AUTOMATIC_FULLSCREEN = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTOMATIC_FULLSCREEN;
2351 alias CEF_CONTENT_SETTING_TYPE_SUB_APP_INSTALLATION_PROMPTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SUB_APP_INSTALLATION_PROMPTS;
2352 alias CEF_CONTENT_SETTING_TYPE_SPEAKER_SELECTION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SPEAKER_SELECTION;
2353 alias CEF_CONTENT_SETTING_TYPE_DIRECT_SOCKETS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DIRECT_SOCKETS;
2354 alias CEF_CONTENT_SETTING_TYPE_KEYBOARD_LOCK = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_KEYBOARD_LOCK;
2355 alias CEF_CONTENT_SETTING_TYPE_POINTER_LOCK = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_POINTER_LOCK;
2356 alias REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS = cef_content_setting_types_t.REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS;
2357 alias TRACKING_PROTECTION = cef_content_setting_types_t.TRACKING_PROTECTION;
2358 
2359 ///
2360 /// Supported content setting values. Should be kept in sync with Chromium's
2361 /// ContentSetting type.
2362 ///
2363 enum cef_content_setting_values_t
2364 {
2365     CEF_CONTENT_SETTING_VALUE_DEFAULT = 0,
2366     CEF_CONTENT_SETTING_VALUE_ALLOW = 1,
2367     CEF_CONTENT_SETTING_VALUE_BLOCK = 2,
2368     CEF_CONTENT_SETTING_VALUE_ASK = 3,
2369     CEF_CONTENT_SETTING_VALUE_SESSION_ONLY = 4,
2370     CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT = 5,
2371 
2372     CEF_CONTENT_SETTING_VALUE_NUM_VALUES = 6
2373 }
2374 
2375 alias CEF_CONTENT_SETTING_VALUE_DEFAULT = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_DEFAULT;
2376 alias CEF_CONTENT_SETTING_VALUE_ALLOW = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_ALLOW;
2377 alias CEF_CONTENT_SETTING_VALUE_BLOCK = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_BLOCK;
2378 alias CEF_CONTENT_SETTING_VALUE_ASK = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_ASK;
2379 alias CEF_CONTENT_SETTING_VALUE_SESSION_ONLY = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_SESSION_ONLY;
2380 alias CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT;
2381 alias CEF_CONTENT_SETTING_VALUE_NUM_VALUES = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_NUM_VALUES;
2382 
2383 // CEF_INCLUDE_INTERNAL_CEF_TYPES_CONTENT_SETTINGS_H_
2384 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
2385 //
2386 // Redistribution and use in source and binary forms, with or without
2387 // modification, are permitted provided that the following conditions are
2388 // met:
2389 //
2390 //    * Redistributions of source code must retain the above copyright
2391 // notice, this list of conditions and the following disclaimer.
2392 //    * Redistributions in binary form must reproduce the above
2393 // copyright notice, this list of conditions and the following disclaimer
2394 // in the documentation and/or other materials provided with the
2395 // distribution.
2396 //    * Neither the name of Google Inc. nor the name Chromium Embedded
2397 // Framework nor the names of its contributors may be used to endorse
2398 // or promote products derived from this software without specific prior
2399 // written permission.
2400 //
2401 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2402 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2403 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2404 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2405 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2406 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2407 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2408 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2409 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2410 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2411 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2412 
2413 import core.stdc.config;
2414 import core.stdc.limits;
2415 
2416 extern (C):
2417 
2418 // Bring in platform-specific definitions.
2419 
2420 // 32-bit ARGB color value, not premultiplied. The color components are always
2421 // in a known order. Equivalent to the SkColor type.
2422 alias cef_color_t = uint;
2423 
2424 // Return the alpha byte from a cef_color_t value.
2425 
2426 
2427 // Return the red byte from a cef_color_t value.
2428 
2429 
2430 // Return the green byte from a cef_color_t value.
2431 
2432 
2433 // Return the blue byte from a cef_color_t value.
2434 
2435 
2436 // Return an cef_color_t value with the specified byte component values.
2437 
2438 
2439 // Return an int64_t value with the specified low and high int32_t component
2440 // values.
2441 
2442 
2443 // Return the low int32_t value from an int64_t value.
2444 
2445 
2446 // Return the high int32_t value from an int64_t value.
2447 
2448 
2449 ///
2450 /// Log severity levels.
2451 ///
2452 enum cef_log_severity_t
2453 {
2454     ///
2455     /// Default logging (currently INFO logging).
2456     ///
2457     LOGSEVERITY_DEFAULT = 0,
2458 
2459     ///
2460     /// Verbose logging.
2461     ///
2462     LOGSEVERITY_VERBOSE = 1,
2463 
2464     ///
2465     /// DEBUG logging.
2466     ///
2467     LOGSEVERITY_DEBUG = LOGSEVERITY_VERBOSE,
2468 
2469     ///
2470     /// INFO logging.
2471     ///
2472     LOGSEVERITY_INFO = 2,
2473 
2474     ///
2475     /// WARNING logging.
2476     ///
2477     LOGSEVERITY_WARNING = 3,
2478 
2479     ///
2480     /// ERROR logging.
2481     ///
2482     LOGSEVERITY_ERROR = 4,
2483 
2484     ///
2485     /// FATAL logging.
2486     ///
2487     LOGSEVERITY_FATAL = 5,
2488 
2489     ///
2490     /// Disable logging to file for all messages, and to stderr for messages with
2491     /// severity less than FATAL.
2492     ///
2493     LOGSEVERITY_DISABLE = 99
2494 }
2495 
2496 alias LOGSEVERITY_DEFAULT = cef_log_severity_t.LOGSEVERITY_DEFAULT;
2497 alias LOGSEVERITY_VERBOSE = cef_log_severity_t.LOGSEVERITY_VERBOSE;
2498 alias LOGSEVERITY_DEBUG = cef_log_severity_t.LOGSEVERITY_DEBUG;
2499 alias LOGSEVERITY_INFO = cef_log_severity_t.LOGSEVERITY_INFO;
2500 alias LOGSEVERITY_WARNING = cef_log_severity_t.LOGSEVERITY_WARNING;
2501 alias LOGSEVERITY_ERROR = cef_log_severity_t.LOGSEVERITY_ERROR;
2502 alias LOGSEVERITY_FATAL = cef_log_severity_t.LOGSEVERITY_FATAL;
2503 alias LOGSEVERITY_DISABLE = cef_log_severity_t.LOGSEVERITY_DISABLE;
2504 
2505 ///
2506 /// Log items prepended to each log line.
2507 ///
2508 enum cef_log_items_t
2509 {
2510     ///
2511     /// Prepend the default list of items.
2512     ///
2513     LOG_ITEMS_DEFAULT = 0,
2514 
2515     ///
2516     /// Prepend no items.
2517     ///
2518     LOG_ITEMS_NONE = 1,
2519 
2520     ///
2521     /// Prepend the process ID.
2522     ///
2523     LOG_ITEMS_FLAG_PROCESS_ID = 1 << 1,
2524 
2525     ///
2526     /// Prepend the thread ID.
2527     ///
2528     LOG_ITEMS_FLAG_THREAD_ID = 1 << 2,
2529 
2530     ///
2531     /// Prepend the timestamp.
2532     ///
2533     LOG_ITEMS_FLAG_TIME_STAMP = 1 << 3,
2534 
2535     ///
2536     /// Prepend the tickcount.
2537     ///
2538     LOG_ITEMS_FLAG_TICK_COUNT = 1 << 4
2539 }
2540 
2541 alias LOG_ITEMS_DEFAULT = cef_log_items_t.LOG_ITEMS_DEFAULT;
2542 alias LOG_ITEMS_NONE = cef_log_items_t.LOG_ITEMS_NONE;
2543 alias LOG_ITEMS_FLAG_PROCESS_ID = cef_log_items_t.LOG_ITEMS_FLAG_PROCESS_ID;
2544 alias LOG_ITEMS_FLAG_THREAD_ID = cef_log_items_t.LOG_ITEMS_FLAG_THREAD_ID;
2545 alias LOG_ITEMS_FLAG_TIME_STAMP = cef_log_items_t.LOG_ITEMS_FLAG_TIME_STAMP;
2546 alias LOG_ITEMS_FLAG_TICK_COUNT = cef_log_items_t.LOG_ITEMS_FLAG_TICK_COUNT;
2547 
2548 ///
2549 /// Represents the state of a setting.
2550 ///
2551 enum cef_state_t
2552 {
2553     ///
2554     /// Use the default state for the setting.
2555     ///
2556     STATE_DEFAULT = 0,
2557 
2558     ///
2559     /// Enable or allow the setting.
2560     ///
2561     STATE_ENABLED = 1,
2562 
2563     ///
2564     /// Disable or disallow the setting.
2565     ///
2566     STATE_DISABLED = 2
2567 }
2568 
2569 alias STATE_DEFAULT = cef_state_t.STATE_DEFAULT;
2570 alias STATE_ENABLED = cef_state_t.STATE_ENABLED;
2571 alias STATE_DISABLED = cef_state_t.STATE_DISABLED;
2572 
2573 ///
2574 /// Initialization settings. Specify NULL or 0 to get the recommended default
2575 /// values. Many of these and other settings can also configured using command-
2576 /// line switches.
2577 ///
2578 struct cef_settings_t
2579 {
2580     ///
2581     /// Size of this structure.
2582     ///
2583     alias size_t = c_ulong;
2584     size_t size;
2585 
2586     ///
2587     /// Set to true (1) to disable the sandbox for sub-processes. See
2588     /// cef_sandbox_win.h for requirements to enable the sandbox on Windows. Also
2589     /// configurable using the "no-sandbox" command-line switch.
2590     ///
2591     int no_sandbox;
2592 
2593     ///
2594     /// The path to a separate executable that will be launched for sub-processes.
2595     /// If this value is empty on Windows or Linux then the main process
2596     /// executable will be used. If this value is empty on macOS then a helper
2597     /// executable must exist at "Contents/Frameworks/<app>
2598     /// Helper.app/Contents/MacOS/<app> Helper" in the top-level app bundle. See
2599     /// the comments on CefExecuteProcess() for details. If this value is
2600     /// non-empty then it must be an absolute path. Also configurable using the
2601     /// "browser-subprocess-path" command-line switch.
2602     ///
2603     alias cef_string_t = cef_string_utf16_t;
2604     cef_string_t browser_subprocess_path;
2605 
2606     ///
2607     /// The path to the CEF framework directory on macOS. If this value is empty
2608     /// then the framework must exist at "Contents/Frameworks/Chromium Embedded
2609     /// Framework.framework" in the top-level app bundle. If this value is
2610     /// non-empty then it must be an absolute path. Also configurable using the
2611     /// "framework-dir-path" command-line switch.
2612     ///
2613     cef_string_t framework_dir_path;
2614 
2615     ///
2616     /// The path to the main bundle on macOS. If this value is empty then it
2617     /// defaults to the top-level app bundle. If this value is non-empty then it
2618     /// must be an absolute path. Also configurable using the "main-bundle-path"
2619     /// command-line switch.
2620     ///
2621     cef_string_t main_bundle_path;
2622 
2623     ///
2624     /// Set to true (1) to enable use of the Chrome runtime in CEF. This feature
2625     /// is considered experimental and is not recommended for most users at this
2626     /// time. See issue #2969 for details.
2627     ///
2628     int chrome_runtime;
2629 
2630     ///
2631     /// Set to true (1) to have the browser process message loop run in a separate
2632     /// thread. If false (0) then the CefDoMessageLoopWork() function must be
2633     /// called from your application message loop. This option is only supported
2634     /// on Windows and Linux.
2635     ///
2636     int multi_threaded_message_loop;
2637 
2638     ///
2639     /// Set to true (1) to control browser process main (UI) thread message pump
2640     /// scheduling via the CefBrowserProcessHandler::OnScheduleMessagePumpWork()
2641     /// callback. This option is recommended for use in combination with the
2642     /// CefDoMessageLoopWork() function in cases where the CEF message loop must
2643     /// be integrated into an existing application message loop (see additional
2644     /// comments and warnings on CefDoMessageLoopWork). Enabling this option is
2645     /// not recommended for most users; leave this option disabled and use either
2646     /// the CefRunMessageLoop() function or multi_threaded_message_loop if
2647     /// possible.
2648     ///
2649     int external_message_pump;
2650 
2651     ///
2652     /// Set to true (1) to enable windowless (off-screen) rendering support. Do
2653     /// not enable this value if the application does not use windowless rendering
2654     /// as it may reduce rendering performance on some systems.
2655     ///
2656     int windowless_rendering_enabled;
2657 
2658     ///
2659     /// Set to true (1) to disable configuration of browser process features using
2660     /// standard CEF and Chromium command-line arguments. Configuration can still
2661     /// be specified using CEF data structures or via the
2662     /// CefApp::OnBeforeCommandLineProcessing() method.
2663     ///
2664     int command_line_args_disabled;
2665 
2666     ///
2667     /// The directory where data for the global browser cache will be stored on
2668     /// disk. If this value is non-empty then it must be an absolute path that is
2669     /// either equal to or a child directory of CefSettings.root_cache_path. If
2670     /// this value is empty then browsers will be created in "incognito mode"
2671     /// where in-memory caches are used for storage and no profile-specific data
2672     /// is persisted to disk (installation-specific data will still be persisted
2673     /// in root_cache_path). HTML5 databases such as localStorage will only
2674     /// persist across sessions if a cache path is specified. Can be overridden
2675     /// for individual CefRequestContext instances via the
2676     /// CefRequestContextSettings.cache_path value. When using the Chrome runtime
2677     /// any child directory value will be ignored and the "default" profile (also
2678     /// a child directory) will be used instead.
2679     ///
2680     cef_string_t cache_path;
2681 
2682     ///
2683     /// The root directory for installation-specific data and the parent directory
2684     /// for profile-specific data. All CefSettings.cache_path and
2685     /// CefRequestContextSettings.cache_path values must have this parent
2686     /// directory in common. If this value is empty and CefSettings.cache_path is
2687     /// non-empty then it will default to the CefSettings.cache_path value. Any
2688     /// non-empty value must be an absolute path. If both values are empty then
2689     /// the default platform-specific directory will be used
2690     /// ("~/.config/cef_user_data" directory on Linux, "~/Library/Application
2691     /// Support/CEF/User Data" directory on MacOS, "AppData\Local\CEF\User Data"
2692     /// directory under the user profile directory on Windows). Use of the default
2693     /// directory is not recommended in production applications (see below).
2694     ///
2695     /// Multiple application instances writing to the same root_cache_path
2696     /// directory could result in data corruption. A process singleton lock based
2697     /// on the root_cache_path value is therefore used to protect against this.
2698     /// This singleton behavior applies to all CEF-based applications using
2699     /// version 120 or newer. You should customize root_cache_path for your
2700     /// application and implement CefBrowserProcessHandler::
2701     /// OnAlreadyRunningAppRelaunch, which will then be called on any app relaunch
2702     /// with the same root_cache_path value.
2703     ///
2704     /// Failure to set the root_cache_path value correctly may result in startup
2705     /// crashes or other unexpected behaviors (for example, the sandbox blocking
2706     /// read/write access to certain files).
2707     ///
2708     cef_string_t root_cache_path;
2709 
2710     ///
2711     /// To persist session cookies (cookies without an expiry date or validity
2712     /// interval) by default when using the global cookie manager set this value
2713     /// to true (1). Session cookies are generally intended to be transient and
2714     /// most Web browsers do not persist them. A |cache_path| value must also be
2715     /// specified to enable this feature. Also configurable using the
2716     /// "persist-session-cookies" command-line switch. Can be overridden for
2717     /// individual CefRequestContext instances via the
2718     /// CefRequestContextSettings.persist_session_cookies value.
2719     ///
2720     int persist_session_cookies;
2721 
2722     ///
2723     /// To persist user preferences as a JSON file in the cache path directory set
2724     /// this value to true (1). A |cache_path| value must also be specified
2725     /// to enable this feature. Also configurable using the
2726     /// "persist-user-preferences" command-line switch. Can be overridden for
2727     /// individual CefRequestContext instances via the
2728     /// CefRequestContextSettings.persist_user_preferences value.
2729     ///
2730     int persist_user_preferences;
2731 
2732     ///
2733     /// Value that will be returned as the User-Agent HTTP header. If empty the
2734     /// default User-Agent string will be used. Also configurable using the
2735     /// "user-agent" command-line switch.
2736     ///
2737     cef_string_t user_agent;
2738 
2739     ///
2740     /// Value that will be inserted as the product portion of the default
2741     /// User-Agent string. If empty the Chromium product version will be used. If
2742     /// |userAgent| is specified this value will be ignored. Also configurable
2743     /// using the "user-agent-product" command-line switch.
2744     ///
2745     cef_string_t user_agent_product;
2746 
2747     ///
2748     /// The locale string that will be passed to WebKit. If empty the default
2749     /// locale of "en-US" will be used. This value is ignored on Linux where
2750     /// locale is determined using environment variable parsing with the
2751     /// precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also
2752     /// configurable using the "lang" command-line switch.
2753     ///
2754     cef_string_t locale;
2755 
2756     ///
2757     /// The directory and file name to use for the debug log. If empty a default
2758     /// log file name and location will be used. On Windows and Linux a
2759     /// "debug.log" file will be written in the main executable directory. On
2760     /// MacOS a "~/Library/Logs/[app name]_debug.log" file will be written where
2761     /// [app name] is the name of the main app executable. Also configurable using
2762     /// the "log-file" command-line switch.
2763     ///
2764     cef_string_t log_file;
2765 
2766     ///
2767     /// The log severity. Only messages of this severity level or higher will be
2768     /// logged. When set to DISABLE no messages will be written to the log file,
2769     /// but FATAL messages will still be output to stderr. Also configurable using
2770     /// the "log-severity" command-line switch with a value of "verbose", "info",
2771     /// "warning", "error", "fatal" or "disable".
2772     ///
2773     cef_log_severity_t log_severity;
2774 
2775     ///
2776     /// The log items prepended to each log line. If not set the default log items
2777     /// will be used. Also configurable using the "log-items" command-line switch
2778     /// with a value of "none" for no log items, or a comma-delimited list of
2779     /// values "pid", "tid", "timestamp" or "tickcount" for custom log items.
2780     ///
2781     cef_log_items_t log_items;
2782 
2783     ///
2784     /// Custom flags that will be used when initializing the V8 JavaScript engine.
2785     /// The consequences of using custom flags may not be well tested. Also
2786     /// configurable using the "js-flags" command-line switch.
2787     ///
2788     cef_string_t javascript_flags;
2789 
2790     ///
2791     /// The fully qualified path for the resources directory. If this value is
2792     /// empty the *.pak files must be located in the module directory on
2793     /// Windows/Linux or the app bundle Resources directory on MacOS. If this
2794     /// value is non-empty then it must be an absolute path. Also configurable
2795     /// using the "resources-dir-path" command-line switch.
2796     ///
2797     cef_string_t resources_dir_path;
2798 
2799     ///
2800     /// The fully qualified path for the locales directory. If this value is empty
2801     /// the locales directory must be located in the module directory. If this
2802     /// value is non-empty then it must be an absolute path. This value is ignored
2803     /// on MacOS where pack files are always loaded from the app bundle Resources
2804     /// directory. Also configurable using the "locales-dir-path" command-line
2805     /// switch.
2806     ///
2807     cef_string_t locales_dir_path;
2808 
2809     ///
2810     /// Set to true (1) to disable loading of pack files for resources and
2811     /// locales. A resource bundle handler must be provided for the browser and
2812     /// render processes via CefApp::GetResourceBundleHandler() if loading of pack
2813     /// files is disabled. Also configurable using the "disable-pack-loading"
2814     /// command- line switch.
2815     ///
2816     int pack_loading_disabled;
2817 
2818     ///
2819     /// Set to a value between 1024 and 65535 to enable remote debugging on the
2820     /// specified port. Also configurable using the "remote-debugging-port"
2821     /// command-line switch. Specifying 0 via the command-line switch will result
2822     /// in the selection of an ephemeral port and the port number will be printed
2823     /// as part of the WebSocket endpoint URL to stderr. If a cache directory path
2824     /// is provided the port will also be written to the
2825     /// <cache-dir>/DevToolsActivePort file. Remote debugging can be accessed by
2826     /// loading the chrome://inspect page in Google Chrome. Port numbers 9222 and
2827     /// 9229 are discoverable by default. Other port numbers may need to be
2828     /// configured via "Discover network targets" on the Devices tab.
2829     ///
2830     int remote_debugging_port;
2831 
2832     ///
2833     /// The number of stack trace frames to capture for uncaught exceptions.
2834     /// Specify a positive value to enable the
2835     /// CefRenderProcessHandler::OnUncaughtException() callback. Specify 0
2836     /// (default value) and OnUncaughtException() will not be called. Also
2837     /// configurable using the "uncaught-exception-stack-size" command-line
2838     /// switch.
2839     ///
2840     int uncaught_exception_stack_size;
2841 
2842     ///
2843     /// Background color used for the browser before a document is loaded and when
2844     /// no document color is specified. The alpha component must be either fully
2845     /// opaque (0xFF) or fully transparent (0x00). If the alpha component is fully
2846     /// opaque then the RGB components will be used as the background color. If
2847     /// the alpha component is fully transparent for a windowed browser then the
2848     /// default value of opaque white be used. If the alpha component is fully
2849     /// transparent for a windowless (off-screen) browser then transparent
2850     /// painting will be enabled.
2851     ///
2852     cef_color_t background_color;
2853 
2854     ///
2855     /// Comma delimited ordered list of language codes without any whitespace that
2856     /// will be used in the "Accept-Language" HTTP request header and
2857     /// "navigator.language" JS attribute. Can be overridden for individual
2858     /// CefRequestContext instances via the
2859     /// CefRequestContextSettings.accept_language_list value.
2860     ///
2861     cef_string_t accept_language_list;
2862 
2863     ///
2864     /// Comma delimited list of schemes supported by the associated
2865     /// CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0)
2866     /// the default schemes ("http", "https", "ws" and "wss") will also be
2867     /// supported. Not specifying a |cookieable_schemes_list| value and setting
2868     /// |cookieable_schemes_exclude_defaults| to true (1) will disable all loading
2869     /// and saving of cookies. These settings will only impact the global
2870     /// CefRequestContext. Individual CefRequestContext instances can be
2871     /// configured via the CefRequestContextSettings.cookieable_schemes_list and
2872     /// CefRequestContextSettings.cookieable_schemes_exclude_defaults values.
2873     ///
2874     cef_string_t cookieable_schemes_list;
2875     int cookieable_schemes_exclude_defaults;
2876 
2877     ///
2878     /// Specify an ID to enable Chrome policy management via Platform and OS-user
2879     /// policies. On Windows, this is a registry key like
2880     /// "SOFTWARE\\Policies\\Google\\Chrome". On MacOS, this is a bundle ID like
2881     /// "com.google.Chrome". On Linux, this is an absolute directory path like
2882     /// "/etc/opt/chrome/policies". Only supported with the Chrome runtime. See
2883     /// https://support.google.com/chrome/a/answer/9037717 for details.
2884     ///
2885     /// Chrome Browser Cloud Management integration, when enabled via the
2886     /// "enable-chrome-browser-cloud-management" command-line flag, will also use
2887     /// the specified ID. See https://support.google.com/chrome/a/answer/9116814
2888     /// for details.
2889     ///
2890     cef_string_t chrome_policy_id;
2891 
2892     ///
2893     /// Specify an ID for an ICON resource that can be loaded from the main
2894     /// executable and used when creating default Chrome windows such as DevTools
2895     /// and Task Manager. If unspecified the default Chromium ICON (IDR_MAINFRAME
2896     /// [101]) will be loaded from libcef.dll. Only supported with the Chrome
2897     /// runtime on Windows.
2898     ///
2899     int chrome_app_icon_id;
2900 }
2901 
2902 
2903 
2904 ///
2905 /// Request context initialization settings. Specify NULL or 0 to get the
2906 /// recommended default values.
2907 ///
2908 struct cef_request_context_settings_t
2909 {
2910     ///
2911     /// Size of this structure.
2912     ///
2913     size_t size;
2914 
2915     ///
2916     /// The directory where cache data for this request context will be stored on
2917     /// disk. If this value is non-empty then it must be an absolute path that is
2918     /// either equal to or a child directory of CefSettings.root_cache_path. If
2919     /// this value is empty then browsers will be created in "incognito mode"
2920     /// where in-memory caches are used for storage and no profile-specific data
2921     /// is persisted to disk (installation-specific data will still be persisted
2922     /// in root_cache_path). HTML5 databases such as localStorage will only
2923     /// persist across sessions if a cache path is specified. To share the global
2924     /// browser cache and related configuration set this value to match the
2925     /// CefSettings.cache_path value.
2926     ///
2927     cef_string_t cache_path;
2928 
2929     ///
2930     /// To persist session cookies (cookies without an expiry date or validity
2931     /// interval) by default when using the global cookie manager set this value
2932     /// to true (1). Session cookies are generally intended to be transient and
2933     /// most Web browsers do not persist them. Can be set globally using the
2934     /// CefSettings.persist_session_cookies value. This value will be ignored if
2935     /// |cache_path| is empty or if it matches the CefSettings.cache_path value.
2936     ///
2937     int persist_session_cookies;
2938 
2939     ///
2940     /// To persist user preferences as a JSON file in the cache path directory set
2941     /// this value to true (1). Can be set globally using the
2942     /// CefSettings.persist_user_preferences value. This value will be ignored if
2943     /// |cache_path| is empty or if it matches the CefSettings.cache_path value.
2944     ///
2945     int persist_user_preferences;
2946 
2947     ///
2948     /// Comma delimited ordered list of language codes without any whitespace that
2949     /// will be used in the "Accept-Language" HTTP request header and
2950     /// "navigator.language" JS attribute. Can be set globally using the
2951     /// CefSettings.accept_language_list value. If all values are empty then
2952     /// "en-US,en" will be used. This value will be ignored if |cache_path|
2953     /// matches the CefSettings.cache_path value.
2954     ///
2955     cef_string_t accept_language_list;
2956 
2957     ///
2958     /// Comma delimited list of schemes supported by the associated
2959     /// CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0)
2960     /// the default schemes ("http", "https", "ws" and "wss") will also be
2961     /// supported. Not specifying a |cookieable_schemes_list| value and setting
2962     /// |cookieable_schemes_exclude_defaults| to true (1) will disable all loading
2963     /// and saving of cookies. These values will be ignored if |cache_path|
2964     /// matches the CefSettings.cache_path value.
2965     ///
2966     cef_string_t cookieable_schemes_list;
2967     int cookieable_schemes_exclude_defaults;
2968 }
2969 
2970 
2971 
2972 ///
2973 /// Browser initialization settings. Specify NULL or 0 to get the recommended
2974 /// default values. The consequences of using custom values may not be well
2975 /// tested. Many of these and other settings can also configured using command-
2976 /// line switches.
2977 ///
2978 struct cef_browser_settings_t
2979 {
2980     ///
2981     /// Size of this structure.
2982     ///
2983     size_t size;
2984 
2985     ///
2986     /// The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint
2987     /// will be called for a windowless browser. The actual fps may be lower if
2988     /// the browser cannot generate frames at the requested rate. The minimum
2989     /// value is 1 and the maximum value is 60 (default 30). This value can also
2990     /// be changed dynamically via CefBrowserHost::SetWindowlessFrameRate.
2991     ///
2992     int windowless_frame_rate;
2993 
2994     /// BEGIN values that map to WebPreferences settings.
2995 
2996     ///
2997     /// Font settings.
2998     ///
2999     cef_string_t standard_font_family;
3000     cef_string_t fixed_font_family;
3001     cef_string_t serif_font_family;
3002     cef_string_t sans_serif_font_family;
3003     cef_string_t cursive_font_family;
3004     cef_string_t fantasy_font_family;
3005     int default_font_size;
3006     int default_fixed_font_size;
3007     int minimum_font_size;
3008     int minimum_logical_font_size;
3009 
3010     ///
3011     /// Default encoding for Web content. If empty "ISO-8859-1" will be used. Also
3012     /// configurable using the "default-encoding" command-line switch.
3013     ///
3014     cef_string_t default_encoding;
3015 
3016     ///
3017     /// Controls the loading of fonts from remote sources. Also configurable using
3018     /// the "disable-remote-fonts" command-line switch.
3019     ///
3020     cef_state_t remote_fonts;
3021 
3022     ///
3023     /// Controls whether JavaScript can be executed. Also configurable using the
3024     /// "disable-javascript" command-line switch.
3025     ///
3026     cef_state_t javascript;
3027 
3028     ///
3029     /// Controls whether JavaScript can be used to close windows that were not
3030     /// opened via JavaScript. JavaScript can still be used to close windows that
3031     /// were opened via JavaScript or that have no back/forward history. Also
3032     /// configurable using the "disable-javascript-close-windows" command-line
3033     /// switch.
3034     ///
3035     cef_state_t javascript_close_windows;
3036 
3037     ///
3038     /// Controls whether JavaScript can access the clipboard. Also configurable
3039     /// using the "disable-javascript-access-clipboard" command-line switch.
3040     ///
3041     cef_state_t javascript_access_clipboard;
3042 
3043     ///
3044     /// Controls whether DOM pasting is supported in the editor via
3045     /// execCommand("paste"). The |javascript_access_clipboard| setting must also
3046     /// be enabled. Also configurable using the "disable-javascript-dom-paste"
3047     /// command-line switch.
3048     ///
3049     cef_state_t javascript_dom_paste;
3050 
3051     ///
3052     /// Controls whether image URLs will be loaded from the network. A cached
3053     /// image will still be rendered if requested. Also configurable using the
3054     /// "disable-image-loading" command-line switch.
3055     ///
3056     cef_state_t image_loading;
3057 
3058     ///
3059     /// Controls whether standalone images will be shrunk to fit the page. Also
3060     /// configurable using the "image-shrink-standalone-to-fit" command-line
3061     /// switch.
3062     ///
3063     cef_state_t image_shrink_standalone_to_fit;
3064 
3065     ///
3066     /// Controls whether text areas can be resized. Also configurable using the
3067     /// "disable-text-area-resize" command-line switch.
3068     ///
3069     cef_state_t text_area_resize;
3070 
3071     ///
3072     /// Controls whether the tab key can advance focus to links. Also configurable
3073     /// using the "disable-tab-to-links" command-line switch.
3074     ///
3075     cef_state_t tab_to_links;
3076 
3077     ///
3078     /// Controls whether local storage can be used. Also configurable using the
3079     /// "disable-local-storage" command-line switch.
3080     ///
3081     cef_state_t local_storage;
3082 
3083     ///
3084     /// Controls whether databases can be used. Also configurable using the
3085     /// "disable-databases" command-line switch.
3086     ///
3087     cef_state_t databases;
3088 
3089     ///
3090     /// Controls whether WebGL can be used. Note that WebGL requires hardware
3091     /// support and may not work on all systems even when enabled. Also
3092     /// configurable using the "disable-webgl" command-line switch.
3093     ///
3094     cef_state_t webgl;
3095 
3096     /// END values that map to WebPreferences settings.
3097 
3098     ///
3099     /// Background color used for the browser before a document is loaded and when
3100     /// no document color is specified. The alpha component must be either fully
3101     /// opaque (0xFF) or fully transparent (0x00). If the alpha component is fully
3102     /// opaque then the RGB components will be used as the background color. If
3103     /// the alpha component is fully transparent for a windowed browser then the
3104     /// CefSettings.background_color value will be used. If the alpha component is
3105     /// fully transparent for a windowless (off-screen) browser then transparent
3106     /// painting will be enabled.
3107     ///
3108     cef_color_t background_color;
3109 
3110     ///
3111     /// Controls whether the Chrome status bubble will be used. Only supported
3112     /// with the Chrome runtime. For details about the status bubble see
3113     /// https://www.chromium.org/user-experience/status-bubble/
3114     ///
3115     cef_state_t chrome_status_bubble;
3116 
3117     ///
3118     /// Controls whether the Chrome zoom bubble will be shown when zooming. Only
3119     /// supported with the Chrome runtime.
3120     ///
3121     cef_state_t chrome_zoom_bubble;
3122 }
3123 
3124 
3125 
3126 ///
3127 /// Return value types.
3128 ///
3129 enum cef_return_value_t
3130 {
3131     ///
3132     /// Cancel immediately.
3133     ///
3134     RV_CANCEL = 0,
3135 
3136     ///
3137     /// Continue immediately.
3138     ///
3139     RV_CONTINUE = 1,
3140 
3141     ///
3142     /// Continue asynchronously (usually via a callback).
3143     ///
3144     RV_CONTINUE_ASYNC = 2
3145 }
3146 
3147 alias RV_CANCEL = cef_return_value_t.RV_CANCEL;
3148 alias RV_CONTINUE = cef_return_value_t.RV_CONTINUE;
3149 alias RV_CONTINUE_ASYNC = cef_return_value_t.RV_CONTINUE_ASYNC;
3150 
3151 ///
3152 /// URL component parts.
3153 ///
3154 struct cef_urlparts_t
3155 {
3156     ///
3157     /// The complete URL specification.
3158     ///
3159     cef_string_t spec;
3160 
3161     ///
3162     /// Scheme component not including the colon (e.g., "http").
3163     ///
3164     cef_string_t scheme;
3165 
3166     ///
3167     /// User name component.
3168     ///
3169     cef_string_t username;
3170 
3171     ///
3172     /// Password component.
3173     ///
3174     cef_string_t password;
3175 
3176     ///
3177     /// Host component. This may be a hostname, an IPv4 address or an IPv6 literal
3178     /// surrounded by square brackets (e.g., "[2001:db8::1]").
3179     ///
3180     cef_string_t host;
3181 
3182     ///
3183     /// Port number component.
3184     ///
3185     cef_string_t port;
3186 
3187     ///
3188     /// Origin contains just the scheme, host, and port from a URL. Equivalent to
3189     /// clearing any username and password, replacing the path with a slash, and
3190     /// clearing everything after that. This value will be empty for non-standard
3191     /// URLs.
3192     ///
3193     cef_string_t origin;
3194 
3195     ///
3196     /// Path component including the first slash following the host.
3197     ///
3198     cef_string_t path;
3199 
3200     ///
3201     /// Query string component (i.e., everything following the '?').
3202     ///
3203     cef_string_t query;
3204 
3205     ///
3206     /// Fragment (hash) identifier component (i.e., the string following the '#').
3207     ///
3208     cef_string_t fragment;
3209 }
3210 
3211 
3212 
3213 ///
3214 /// Cookie priority values.
3215 ///
3216 enum cef_cookie_priority_t
3217 {
3218     CEF_COOKIE_PRIORITY_LOW = -1,
3219     CEF_COOKIE_PRIORITY_MEDIUM = 0,
3220     CEF_COOKIE_PRIORITY_HIGH = 1
3221 }
3222 
3223 alias CEF_COOKIE_PRIORITY_LOW = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_LOW;
3224 alias CEF_COOKIE_PRIORITY_MEDIUM = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_MEDIUM;
3225 alias CEF_COOKIE_PRIORITY_HIGH = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_HIGH;
3226 
3227 ///
3228 /// Cookie same site values.
3229 ///
3230 enum cef_cookie_same_site_t
3231 {
3232     CEF_COOKIE_SAME_SITE_UNSPECIFIED = 0,
3233     CEF_COOKIE_SAME_SITE_NO_RESTRICTION = 1,
3234     CEF_COOKIE_SAME_SITE_LAX_MODE = 2,
3235     CEF_COOKIE_SAME_SITE_STRICT_MODE = 3
3236 }
3237 
3238 alias CEF_COOKIE_SAME_SITE_UNSPECIFIED = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_UNSPECIFIED;
3239 alias CEF_COOKIE_SAME_SITE_NO_RESTRICTION = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_NO_RESTRICTION;
3240 alias CEF_COOKIE_SAME_SITE_LAX_MODE = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_LAX_MODE;
3241 alias CEF_COOKIE_SAME_SITE_STRICT_MODE = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_STRICT_MODE;
3242 
3243 ///
3244 /// Cookie information.
3245 ///
3246 struct cef_cookie_t
3247 {
3248     ///
3249     /// The cookie name.
3250     ///
3251     cef_string_t name;
3252 
3253     ///
3254     /// The cookie value.
3255     ///
3256     cef_string_t value;
3257 
3258     ///
3259     /// If |domain| is empty a host cookie will be created instead of a domain
3260     /// cookie. Domain cookies are stored with a leading "." and are visible to
3261     /// sub-domains whereas host cookies are not.
3262     ///
3263     cef_string_t domain;
3264 
3265     ///
3266     /// If |path| is non-empty only URLs at or below the path will get the cookie
3267     /// value.
3268     ///
3269     cef_string_t path;
3270 
3271     ///
3272     /// If |secure| is true the cookie will only be sent for HTTPS requests.
3273     ///
3274     int secure;
3275 
3276     ///
3277     /// If |httponly| is true the cookie will only be sent for HTTP requests.
3278     ///
3279     int httponly;
3280 
3281     ///
3282     /// The cookie creation date. This is automatically populated by the system on
3283     /// cookie creation.
3284     ///
3285 
3286     cef_basetime_t creation;
3287 
3288     ///
3289     /// The cookie last access date. This is automatically populated by the system
3290     /// on access.
3291     ///
3292     cef_basetime_t last_access;
3293 
3294     ///
3295     /// The cookie expiration date is only valid if |has_expires| is true.
3296     ///
3297     int has_expires;
3298     cef_basetime_t expires;
3299 
3300     ///
3301     /// Same site.
3302     ///
3303     cef_cookie_same_site_t same_site;
3304 
3305     ///
3306     /// Priority.
3307     ///
3308     cef_cookie_priority_t priority;
3309 }
3310 
3311 
3312 
3313 ///
3314 /// Process termination status values.
3315 ///
3316 enum cef_termination_status_t
3317 {
3318     ///
3319     /// Non-zero exit status.
3320     ///
3321     TS_ABNORMAL_TERMINATION = 0,
3322 
3323     ///
3324     /// SIGKILL or task manager kill.
3325     ///
3326     TS_PROCESS_WAS_KILLED = 1,
3327 
3328     ///
3329     /// Segmentation fault.
3330     ///
3331     TS_PROCESS_CRASHED = 2,
3332 
3333     ///
3334     /// Out of memory. Some platforms may use TS_PROCESS_CRASHED instead.
3335     ///
3336     TS_PROCESS_OOM = 3,
3337 
3338     ///
3339     /// Child process never launched.
3340     ///
3341     TS_LAUNCH_FAILED = 4,
3342 
3343     ///
3344     /// On Windows, the OS terminated the process due to code integrity failure.
3345     ///
3346     TS_INTEGRITY_FAILURE = 5
3347 }
3348 
3349 alias TS_ABNORMAL_TERMINATION = cef_termination_status_t.TS_ABNORMAL_TERMINATION;
3350 alias TS_PROCESS_WAS_KILLED = cef_termination_status_t.TS_PROCESS_WAS_KILLED;
3351 alias TS_PROCESS_CRASHED = cef_termination_status_t.TS_PROCESS_CRASHED;
3352 alias TS_PROCESS_OOM = cef_termination_status_t.TS_PROCESS_OOM;
3353 alias TS_LAUNCH_FAILED = cef_termination_status_t.TS_LAUNCH_FAILED;
3354 alias TS_INTEGRITY_FAILURE = cef_termination_status_t.TS_INTEGRITY_FAILURE;
3355 
3356 ///
3357 /// Path key values.
3358 ///
3359 enum cef_path_key_t
3360 {
3361     ///
3362     /// Current directory.
3363     ///
3364     PK_DIR_CURRENT = 0,
3365 
3366     ///
3367     /// Directory containing PK_FILE_EXE.
3368     ///
3369     PK_DIR_EXE = 1,
3370 
3371     ///
3372     /// Directory containing PK_FILE_MODULE.
3373     ///
3374     PK_DIR_MODULE = 2,
3375 
3376     ///
3377     /// Temporary directory.
3378     ///
3379     PK_DIR_TEMP = 3,
3380 
3381     ///
3382     /// Path and filename of the current executable.
3383     ///
3384     PK_FILE_EXE = 4,
3385 
3386     ///
3387     /// Path and filename of the module containing the CEF code (usually the
3388     /// libcef module).
3389     ///
3390     PK_FILE_MODULE = 5,
3391 
3392     ///
3393     /// "Local Settings\Application Data" directory under the user profile
3394     /// directory on Windows.
3395     ///
3396     PK_LOCAL_APP_DATA = 6,
3397 
3398     ///
3399     /// "Application Data" directory under the user profile directory on Windows
3400     /// and "~/Library/Application Support" directory on MacOS.
3401     ///
3402     PK_USER_DATA = 7,
3403 
3404     ///
3405     /// Directory containing application resources. Can be configured via
3406     /// CefSettings.resources_dir_path.
3407     ///
3408     PK_DIR_RESOURCES = 8
3409 }
3410 
3411 alias PK_DIR_CURRENT = cef_path_key_t.PK_DIR_CURRENT;
3412 alias PK_DIR_EXE = cef_path_key_t.PK_DIR_EXE;
3413 alias PK_DIR_MODULE = cef_path_key_t.PK_DIR_MODULE;
3414 alias PK_DIR_TEMP = cef_path_key_t.PK_DIR_TEMP;
3415 alias PK_FILE_EXE = cef_path_key_t.PK_FILE_EXE;
3416 alias PK_FILE_MODULE = cef_path_key_t.PK_FILE_MODULE;
3417 alias PK_LOCAL_APP_DATA = cef_path_key_t.PK_LOCAL_APP_DATA;
3418 alias PK_USER_DATA = cef_path_key_t.PK_USER_DATA;
3419 alias PK_DIR_RESOURCES = cef_path_key_t.PK_DIR_RESOURCES;
3420 
3421 ///
3422 /// Storage types.
3423 ///
3424 enum cef_storage_type_t
3425 {
3426     ST_LOCALSTORAGE = 0,
3427     ST_SESSIONSTORAGE = 1
3428 }
3429 
3430 alias ST_LOCALSTORAGE = cef_storage_type_t.ST_LOCALSTORAGE;
3431 alias ST_SESSIONSTORAGE = cef_storage_type_t.ST_SESSIONSTORAGE;
3432 
3433 ///
3434 /// Supported error code values. For the complete list of error values see
3435 /// "include/base/internal/cef_net_error_list.h".
3436 ///
3437 enum cef_errorcode_t
3438 {
3439     // No error.
3440     ERR_NONE = 0,
3441     ERR_IO_PENDING = -1,
3442     ERR_FAILED = -2,
3443     ERR_ABORTED = -3,
3444     ERR_INVALID_ARGUMENT = -4,
3445     ERR_INVALID_HANDLE = -5,
3446     ERR_FILE_NOT_FOUND = -6,
3447     ERR_TIMED_OUT = -7,
3448     ERR_FILE_TOO_BIG = -8,
3449     ERR_UNEXPECTED = -9,
3450     ERR_ACCESS_DENIED = -10,
3451     ERR_NOT_IMPLEMENTED = -11,
3452     ERR_INSUFFICIENT_RESOURCES = -12,
3453     ERR_OUT_OF_MEMORY = -13,
3454     ERR_UPLOAD_FILE_CHANGED = -14,
3455     ERR_SOCKET_NOT_CONNECTED = -15,
3456     ERR_FILE_EXISTS = -16,
3457     ERR_FILE_PATH_TOO_LONG = -17,
3458     ERR_FILE_NO_SPACE = -18,
3459     ERR_FILE_VIRUS_INFECTED = -19,
3460     ERR_BLOCKED_BY_CLIENT = -20,
3461     ERR_NETWORK_CHANGED = -21,
3462     ERR_BLOCKED_BY_ADMINISTRATOR = -22,
3463     ERR_SOCKET_IS_CONNECTED = -23,
3464     ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = -25,
3465     ERR_CONTEXT_SHUT_DOWN = -26,
3466     ERR_BLOCKED_BY_RESPONSE = -27,
3467     ERR_CLEARTEXT_NOT_PERMITTED = -29,
3468     ERR_BLOCKED_BY_CSP = -30,
3469     ERR_H2_OR_QUIC_REQUIRED = -31,
3470     ERR_BLOCKED_BY_ORB = -32,
3471     ERR_NETWORK_ACCESS_REVOKED = -33,
3472     ERR_CONNECTION_CLOSED = -100,
3473     ERR_CONNECTION_RESET = -101,
3474     ERR_CONNECTION_REFUSED = -102,
3475     ERR_CONNECTION_ABORTED = -103,
3476     ERR_CONNECTION_FAILED = -104,
3477     ERR_NAME_NOT_RESOLVED = -105,
3478     ERR_INTERNET_DISCONNECTED = -106,
3479     ERR_SSL_PROTOCOL_ERROR = -107,
3480     ERR_ADDRESS_INVALID = -108,
3481     ERR_ADDRESS_UNREACHABLE = -109,
3482     ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110,
3483     ERR_TUNNEL_CONNECTION_FAILED = -111,
3484     ERR_NO_SSL_VERSIONS_ENABLED = -112,
3485     ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113,
3486     ERR_SSL_RENEGOTIATION_REQUESTED = -114,
3487     ERR_PROXY_AUTH_UNSUPPORTED = -115,
3488     ERR_BAD_SSL_CLIENT_AUTH_CERT = -117,
3489     ERR_CONNECTION_TIMED_OUT = -118,
3490     ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = -119,
3491     ERR_SOCKS_CONNECTION_FAILED = -120,
3492     ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = -121,
3493     ERR_ALPN_NEGOTIATION_FAILED = -122,
3494     ERR_SSL_NO_RENEGOTIATION = -123,
3495     ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = -124,
3496     ERR_SSL_DECOMPRESSION_FAILURE_ALERT = -125,
3497     ERR_SSL_BAD_RECORD_MAC_ALERT = -126,
3498     ERR_PROXY_AUTH_REQUESTED = -127,
3499     ERR_PROXY_CONNECTION_FAILED = -130,
3500     ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = -131,
3501     ERR_PRECONNECT_MAX_SOCKET_LIMIT = -133,
3502     ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = -134,
3503     ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = -135,
3504     ERR_PROXY_CERTIFICATE_INVALID = -136,
3505     ERR_NAME_RESOLUTION_FAILED = -137,
3506     ERR_NETWORK_ACCESS_DENIED = -138,
3507     ERR_TEMPORARILY_THROTTLED = -139,
3508     ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = -140,
3509     ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = -141,
3510     ERR_MSG_TOO_BIG = -142,
3511     ERR_WS_PROTOCOL_ERROR = -145,
3512     ERR_ADDRESS_IN_USE = -147,
3513     ERR_SSL_HANDSHAKE_NOT_COMPLETED = -148,
3514     ERR_SSL_BAD_PEER_PUBLIC_KEY = -149,
3515     ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = -150,
3516     ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = -151,
3517     ERR_SSL_DECRYPT_ERROR_ALERT = -153,
3518     ERR_WS_THROTTLE_QUEUE_TOO_LARGE = -154,
3519     ERR_SSL_SERVER_CERT_CHANGED = -156,
3520     ERR_SSL_UNRECOGNIZED_NAME_ALERT = -159,
3521     ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = -160,
3522     ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = -161,
3523     ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = -162,
3524     ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = -163,
3525     ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = -164,
3526     ERR_ICANN_NAME_COLLISION = -166,
3527     ERR_SSL_SERVER_CERT_BAD_FORMAT = -167,
3528     ERR_CT_STH_PARSING_FAILED = -168,
3529     ERR_CT_STH_INCOMPLETE = -169,
3530     ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = -170,
3531     ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = -171,
3532     ERR_SSL_OBSOLETE_CIPHER = -172,
3533     ERR_WS_UPGRADE = -173,
3534     ERR_READ_IF_READY_NOT_IMPLEMENTED = -174,
3535     ERR_NO_BUFFER_SPACE = -176,
3536     ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = -177,
3537     ERR_EARLY_DATA_REJECTED = -178,
3538     ERR_WRONG_VERSION_ON_EARLY_DATA = -179,
3539     ERR_TLS13_DOWNGRADE_DETECTED = -180,
3540     ERR_SSL_KEY_USAGE_INCOMPATIBLE = -181,
3541     ERR_INVALID_ECH_CONFIG_LIST = -182,
3542     ERR_ECH_NOT_NEGOTIATED = -183,
3543     ERR_ECH_FALLBACK_CERTIFICATE_INVALID = -184,
3544     ERR_CERT_COMMON_NAME_INVALID = -200,
3545     ERR_CERT_DATE_INVALID = -201,
3546     ERR_CERT_AUTHORITY_INVALID = -202,
3547     ERR_CERT_CONTAINS_ERRORS = -203,
3548     ERR_CERT_NO_REVOCATION_MECHANISM = -204,
3549     ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205,
3550     ERR_CERT_REVOKED = -206,
3551     ERR_CERT_INVALID = -207,
3552     ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208,
3553     ERR_CERT_NON_UNIQUE_NAME = -210,
3554     ERR_CERT_WEAK_KEY = -211,
3555     ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212,
3556     ERR_CERT_VALIDITY_TOO_LONG = -213,
3557     ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = -214,
3558     ERR_CERT_SYMANTEC_LEGACY = -215,
3559     ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = -217,
3560     ERR_CERT_END = -219,
3561     ERR_INVALID_URL = -300,
3562     ERR_DISALLOWED_URL_SCHEME = -301,
3563     ERR_UNKNOWN_URL_SCHEME = -302,
3564     ERR_INVALID_REDIRECT = -303,
3565     ERR_TOO_MANY_REDIRECTS = -310,
3566     ERR_UNSAFE_REDIRECT = -311,
3567     ERR_UNSAFE_PORT = -312,
3568     ERR_INVALID_RESPONSE = -320,
3569     ERR_INVALID_CHUNKED_ENCODING = -321,
3570     ERR_METHOD_NOT_SUPPORTED = -322,
3571     ERR_UNEXPECTED_PROXY_AUTH = -323,
3572     ERR_EMPTY_RESPONSE = -324,
3573     ERR_RESPONSE_HEADERS_TOO_BIG = -325,
3574     ERR_PAC_SCRIPT_FAILED = -327,
3575     ERR_REQUEST_RANGE_NOT_SATISFIABLE = -328,
3576     ERR_MALFORMED_IDENTITY = -329,
3577     ERR_CONTENT_DECODING_FAILED = -330,
3578     ERR_NETWORK_IO_SUSPENDED = -331,
3579     ERR_SYN_REPLY_NOT_RECEIVED = -332,
3580     ERR_ENCODING_CONVERSION_FAILED = -333,
3581     ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = -334,
3582     ERR_NO_SUPPORTED_PROXIES = -336,
3583     ERR_HTTP2_PROTOCOL_ERROR = -337,
3584     ERR_INVALID_AUTH_CREDENTIALS = -338,
3585     ERR_UNSUPPORTED_AUTH_SCHEME = -339,
3586     ERR_ENCODING_DETECTION_FAILED = -340,
3587     ERR_MISSING_AUTH_CREDENTIALS = -341,
3588     ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = -342,
3589     ERR_MISCONFIGURED_AUTH_ENVIRONMENT = -343,
3590     ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = -344,
3591     ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = -345,
3592     ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = -346,
3593     ERR_INCOMPLETE_HTTP2_HEADERS = -347,
3594     ERR_PAC_NOT_IN_DHCP = -348,
3595     ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = -349,
3596     ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = -350,
3597     ERR_HTTP2_SERVER_REFUSED_STREAM = -351,
3598     ERR_HTTP2_PING_FAILED = -352,
3599     ERR_CONTENT_LENGTH_MISMATCH = -354,
3600     ERR_INCOMPLETE_CHUNKED_ENCODING = -355,
3601     ERR_QUIC_PROTOCOL_ERROR = -356,
3602     ERR_RESPONSE_HEADERS_TRUNCATED = -357,
3603     ERR_QUIC_HANDSHAKE_FAILED = -358,
3604     ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = -360,
3605     ERR_HTTP2_FLOW_CONTROL_ERROR = -361,
3606     ERR_HTTP2_FRAME_SIZE_ERROR = -362,
3607     ERR_HTTP2_COMPRESSION_ERROR = -363,
3608     ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = -364,
3609     ERR_HTTP_1_1_REQUIRED = -365,
3610     ERR_PROXY_HTTP_1_1_REQUIRED = -366,
3611     ERR_PAC_SCRIPT_TERMINATED = -367,
3612     ERR_INVALID_HTTP_RESPONSE = -370,
3613     ERR_CONTENT_DECODING_INIT_FAILED = -371,
3614     ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = -372,
3615     ERR_TOO_MANY_RETRIES = -375,
3616     ERR_HTTP2_STREAM_CLOSED = -376,
3617     ERR_HTTP_RESPONSE_CODE_FAILURE = -379,
3618     ERR_QUIC_CERT_ROOT_NOT_KNOWN = -380,
3619     ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = -381,
3620     ERR_TOO_MANY_ACCEPT_CH_RESTARTS = -382,
3621     ERR_INCONSISTENT_IP_ADDRESS_SPACE = -383,
3622     ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_POLICY = -384,
3623     ERR_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_CHECKS = -385,
3624     ERR_ZSTD_WINDOW_SIZE_TOO_BIG = -386,
3625     ERR_DICTIONARY_LOAD_FAILED = -387,
3626     ERR_UNEXPECTED_CONTENT_DICTIONARY_HEADER = -388,
3627     ERR_CACHE_MISS = -400,
3628     ERR_CACHE_READ_FAILURE = -401,
3629     ERR_CACHE_WRITE_FAILURE = -402,
3630     ERR_CACHE_OPERATION_NOT_SUPPORTED = -403,
3631     ERR_CACHE_OPEN_FAILURE = -404,
3632     ERR_CACHE_CREATE_FAILURE = -405,
3633     ERR_CACHE_RACE = -406,
3634     ERR_CACHE_CHECKSUM_READ_FAILURE = -407,
3635     ERR_CACHE_CHECKSUM_MISMATCH = -408,
3636     ERR_CACHE_LOCK_TIMEOUT = -409,
3637     ERR_CACHE_AUTH_FAILURE_AFTER_READ = -410,
3638     ERR_CACHE_ENTRY_NOT_SUITABLE = -411,
3639     ERR_CACHE_DOOM_FAILURE = -412,
3640     ERR_CACHE_OPEN_OR_CREATE_FAILURE = -413,
3641     ERR_INSECURE_RESPONSE = -501,
3642     ERR_NO_PRIVATE_KEY_FOR_CERT = -502,
3643     ERR_ADD_USER_CERT_FAILED = -503,
3644     ERR_INVALID_SIGNED_EXCHANGE = -504,
3645     ERR_INVALID_WEB_BUNDLE = -505,
3646     ERR_TRUST_TOKEN_OPERATION_FAILED = -506,
3647 
3648     ///
3649     /// Supported certificate status code values. See net\cert\cert_status_flags.h
3650     /// for more information. CERT_STATUS_NONE is new in CEF because we use an
3651     /// enum while cert_status_flags.h uses a typedef and static const variables.
3652     ///
3653     ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = -507,
3654 
3655     // 1 << 3 is reserved for ERR_CERT_CONTAINS_ERRORS (not useful with WinHTTP).
3656 
3657     // 1 << 9 was used for CERT_STATUS_NOT_IN_DNS
3658 
3659     // 1 << 12 was used for CERT_STATUS_WEAK_DH_KEY
3660     ERR_PKCS12_IMPORT_BAD_PASSWORD = -701,
3661 
3662     // Bits 16 to 31 are for non-error statuses.
3663     ERR_PKCS12_IMPORT_FAILED = -702,
3664 
3665     // Bit 18 was CERT_STATUS_IS_DNSSEC
3666     ERR_IMPORT_CA_CERT_NOT_CA = -703,
3667 
3668     ///
3669     /// Process result codes. This is not a comprehensive list, as result codes
3670     /// might also include platform-specific crash values (Posix signal or Windows
3671     ERR_IMPORT_CERT_ALREADY_EXISTS = -704,
3672     /// hardware exception), or internal-only implementation values.
3673     ERR_IMPORT_CA_CERT_FAILED = -705,
3674     ///
3675 
3676     // The following values should be kept in sync with Chromium's
3677     ERR_IMPORT_SERVER_CERT_FAILED = -706,
3678     // content::ResultCode type.
3679 
3680     /// Process was killed by user or system.
3681     ERR_PKCS12_IMPORT_INVALID_MAC = -707,
3682 
3683     /// Process hung.
3684     ERR_PKCS12_IMPORT_INVALID_FILE = -708,
3685 
3686     /// A bad message caused the process termination.
3687 
3688     /// The GPU process exited because initialization failed.
3689     ERR_PKCS12_IMPORT_UNSUPPORTED = -709,
3690     ERR_KEY_GENERATION_FAILED = -710,
3691 
3692     // The following values should be kept in sync with Chromium's
3693     // chrome::ResultCode type. Unused chrome values are excluded.
3694     ERR_PRIVATE_KEY_EXPORT_FAILED = -712,
3695 
3696     /// A critical chrome file is missing.
3697     ERR_SELF_SIGNED_CERT_GENERATION_FAILED = -713,
3698 
3699     /// Command line parameter is not supported.
3700     ERR_CERT_DATABASE_CHANGED = -714,
3701 
3702     /// The profile was in use on another host.
3703 
3704     /// Failed to pack an extension via the command line.
3705     ERR_CERT_VERIFIER_CHANGED = -716,
3706 
3707     /// The browser process exited early by passing the command line to another
3708     ERR_DNS_MALFORMED_RESPONSE = -800,
3709     /// running browser.
3710     ERR_DNS_SERVER_REQUIRES_TCP = -801,
3711 
3712     /// A browser process was sandboxed. This should never happen.
3713 
3714     /// Cloud policy enrollment failed or was given up by user.
3715 
3716     /// The GPU process was terminated due to context lost.
3717 
3718     /// An early startup command was executed and the browser must exit.
3719 
3720     /// The browser process exited because system resources are exhausted. The
3721     ERR_DNS_SERVER_FAILED = -802,
3722     /// system state can't be recovered and will be unstable.
3723     ERR_DNS_TIMED_OUT = -803,
3724 
3725     // The following values should be kept in sync with Chromium's
3726     // sandbox::TerminationCodes type.
3727     ERR_DNS_CACHE_MISS = -804,
3728 
3729     /// Windows sandbox could not set the integrity level.
3730     ERR_DNS_SEARCH_EMPTY = -805,
3731 
3732     /// Windows sandbox could not lower the token.
3733     ERR_DNS_SORT_ERROR = -806,
3734 
3735     /// Windows sandbox failed to flush registry handles.
3736     ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = -808,
3737 
3738     /// Windows sandbox failed to forbid HCKU caching.
3739 
3740     /// Windows sandbox failed to close pending handles.
3741 
3742     /// Windows sandbox could not set the mitigation policy.
3743     ERR_DNS_NAME_HTTPS_ONLY = -809,
3744 
3745     /// Windows sandbox exceeded the job memory limit.
3746     ERR_DNS_REQUEST_CANCELLED = -810,
3747 
3748     /// Windows sandbox failed to warmup.
3749     ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = -811,
3750 
3751     ///
3752     /// The manner in which a link click should be opened. These constants match
3753     /// their equivalents in Chromium's window_open_disposition.h and should not be
3754     /// renumbered.
3755     ///
3756     ERR_DNS_SECURE_PROBE_RECORD_INVALID = -814
3757 }
3758 
3759 alias ERR_NONE = cef_errorcode_t.ERR_NONE;
3760 alias ERR_IO_PENDING = cef_errorcode_t.ERR_IO_PENDING;
3761 alias ERR_FAILED = cef_errorcode_t.ERR_FAILED;
3762 alias ERR_ABORTED = cef_errorcode_t.ERR_ABORTED;
3763 alias ERR_INVALID_ARGUMENT = cef_errorcode_t.ERR_INVALID_ARGUMENT;
3764 alias ERR_INVALID_HANDLE = cef_errorcode_t.ERR_INVALID_HANDLE;
3765 alias ERR_FILE_NOT_FOUND = cef_errorcode_t.ERR_FILE_NOT_FOUND;
3766 alias ERR_TIMED_OUT = cef_errorcode_t.ERR_TIMED_OUT;
3767 alias ERR_FILE_TOO_BIG = cef_errorcode_t.ERR_FILE_TOO_BIG;
3768 alias ERR_UNEXPECTED = cef_errorcode_t.ERR_UNEXPECTED;
3769 alias ERR_ACCESS_DENIED = cef_errorcode_t.ERR_ACCESS_DENIED;
3770 alias ERR_NOT_IMPLEMENTED = cef_errorcode_t.ERR_NOT_IMPLEMENTED;
3771 alias ERR_INSUFFICIENT_RESOURCES = cef_errorcode_t.ERR_INSUFFICIENT_RESOURCES;
3772 alias ERR_OUT_OF_MEMORY = cef_errorcode_t.ERR_OUT_OF_MEMORY;
3773 alias ERR_UPLOAD_FILE_CHANGED = cef_errorcode_t.ERR_UPLOAD_FILE_CHANGED;
3774 alias ERR_SOCKET_NOT_CONNECTED = cef_errorcode_t.ERR_SOCKET_NOT_CONNECTED;
3775 alias ERR_FILE_EXISTS = cef_errorcode_t.ERR_FILE_EXISTS;
3776 alias ERR_FILE_PATH_TOO_LONG = cef_errorcode_t.ERR_FILE_PATH_TOO_LONG;
3777 alias ERR_FILE_NO_SPACE = cef_errorcode_t.ERR_FILE_NO_SPACE;
3778 alias ERR_FILE_VIRUS_INFECTED = cef_errorcode_t.ERR_FILE_VIRUS_INFECTED;
3779 alias ERR_BLOCKED_BY_CLIENT = cef_errorcode_t.ERR_BLOCKED_BY_CLIENT;
3780 alias ERR_NETWORK_CHANGED = cef_errorcode_t.ERR_NETWORK_CHANGED;
3781 alias ERR_BLOCKED_BY_ADMINISTRATOR = cef_errorcode_t.ERR_BLOCKED_BY_ADMINISTRATOR;
3782 alias ERR_SOCKET_IS_CONNECTED = cef_errorcode_t.ERR_SOCKET_IS_CONNECTED;
3783 alias ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = cef_errorcode_t.ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED;
3784 alias ERR_CONTEXT_SHUT_DOWN = cef_errorcode_t.ERR_CONTEXT_SHUT_DOWN;
3785 alias ERR_BLOCKED_BY_RESPONSE = cef_errorcode_t.ERR_BLOCKED_BY_RESPONSE;
3786 alias ERR_CLEARTEXT_NOT_PERMITTED = cef_errorcode_t.ERR_CLEARTEXT_NOT_PERMITTED;
3787 alias ERR_BLOCKED_BY_CSP = cef_errorcode_t.ERR_BLOCKED_BY_CSP;
3788 alias ERR_H2_OR_QUIC_REQUIRED = cef_errorcode_t.ERR_H2_OR_QUIC_REQUIRED;
3789 alias ERR_BLOCKED_BY_ORB = cef_errorcode_t.ERR_BLOCKED_BY_ORB;
3790 alias ERR_NETWORK_ACCESS_REVOKED = cef_errorcode_t.ERR_NETWORK_ACCESS_REVOKED;
3791 alias ERR_CONNECTION_CLOSED = cef_errorcode_t.ERR_CONNECTION_CLOSED;
3792 alias ERR_CONNECTION_RESET = cef_errorcode_t.ERR_CONNECTION_RESET;
3793 alias ERR_CONNECTION_REFUSED = cef_errorcode_t.ERR_CONNECTION_REFUSED;
3794 alias ERR_CONNECTION_ABORTED = cef_errorcode_t.ERR_CONNECTION_ABORTED;
3795 alias ERR_CONNECTION_FAILED = cef_errorcode_t.ERR_CONNECTION_FAILED;
3796 alias ERR_NAME_NOT_RESOLVED = cef_errorcode_t.ERR_NAME_NOT_RESOLVED;
3797 alias ERR_INTERNET_DISCONNECTED = cef_errorcode_t.ERR_INTERNET_DISCONNECTED;
3798 alias ERR_SSL_PROTOCOL_ERROR = cef_errorcode_t.ERR_SSL_PROTOCOL_ERROR;
3799 alias ERR_ADDRESS_INVALID = cef_errorcode_t.ERR_ADDRESS_INVALID;
3800 alias ERR_ADDRESS_UNREACHABLE = cef_errorcode_t.ERR_ADDRESS_UNREACHABLE;
3801 alias ERR_SSL_CLIENT_AUTH_CERT_NEEDED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_NEEDED;
3802 alias ERR_TUNNEL_CONNECTION_FAILED = cef_errorcode_t.ERR_TUNNEL_CONNECTION_FAILED;
3803 alias ERR_NO_SSL_VERSIONS_ENABLED = cef_errorcode_t.ERR_NO_SSL_VERSIONS_ENABLED;
3804 alias ERR_SSL_VERSION_OR_CIPHER_MISMATCH = cef_errorcode_t.ERR_SSL_VERSION_OR_CIPHER_MISMATCH;
3805 alias ERR_SSL_RENEGOTIATION_REQUESTED = cef_errorcode_t.ERR_SSL_RENEGOTIATION_REQUESTED;
3806 alias ERR_PROXY_AUTH_UNSUPPORTED = cef_errorcode_t.ERR_PROXY_AUTH_UNSUPPORTED;
3807 alias ERR_BAD_SSL_CLIENT_AUTH_CERT = cef_errorcode_t.ERR_BAD_SSL_CLIENT_AUTH_CERT;
3808 alias ERR_CONNECTION_TIMED_OUT = cef_errorcode_t.ERR_CONNECTION_TIMED_OUT;
3809 alias ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = cef_errorcode_t.ERR_HOST_RESOLVER_QUEUE_TOO_LARGE;
3810 alias ERR_SOCKS_CONNECTION_FAILED = cef_errorcode_t.ERR_SOCKS_CONNECTION_FAILED;
3811 alias ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = cef_errorcode_t.ERR_SOCKS_CONNECTION_HOST_UNREACHABLE;
3812 alias ERR_ALPN_NEGOTIATION_FAILED = cef_errorcode_t.ERR_ALPN_NEGOTIATION_FAILED;
3813 alias ERR_SSL_NO_RENEGOTIATION = cef_errorcode_t.ERR_SSL_NO_RENEGOTIATION;
3814 alias ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = cef_errorcode_t.ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES;
3815 alias ERR_SSL_DECOMPRESSION_FAILURE_ALERT = cef_errorcode_t.ERR_SSL_DECOMPRESSION_FAILURE_ALERT;
3816 alias ERR_SSL_BAD_RECORD_MAC_ALERT = cef_errorcode_t.ERR_SSL_BAD_RECORD_MAC_ALERT;
3817 alias ERR_PROXY_AUTH_REQUESTED = cef_errorcode_t.ERR_PROXY_AUTH_REQUESTED;
3818 alias ERR_PROXY_CONNECTION_FAILED = cef_errorcode_t.ERR_PROXY_CONNECTION_FAILED;
3819 alias ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = cef_errorcode_t.ERR_MANDATORY_PROXY_CONFIGURATION_FAILED;
3820 alias ERR_PRECONNECT_MAX_SOCKET_LIMIT = cef_errorcode_t.ERR_PRECONNECT_MAX_SOCKET_LIMIT;
3821 alias ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED;
3822 alias ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY;
3823 alias ERR_PROXY_CERTIFICATE_INVALID = cef_errorcode_t.ERR_PROXY_CERTIFICATE_INVALID;
3824 alias ERR_NAME_RESOLUTION_FAILED = cef_errorcode_t.ERR_NAME_RESOLUTION_FAILED;
3825 alias ERR_NETWORK_ACCESS_DENIED = cef_errorcode_t.ERR_NETWORK_ACCESS_DENIED;
3826 alias ERR_TEMPORARILY_THROTTLED = cef_errorcode_t.ERR_TEMPORARILY_THROTTLED;
3827 alias ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = cef_errorcode_t.ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT;
3828 alias ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
3829 alias ERR_MSG_TOO_BIG = cef_errorcode_t.ERR_MSG_TOO_BIG;
3830 alias ERR_WS_PROTOCOL_ERROR = cef_errorcode_t.ERR_WS_PROTOCOL_ERROR;
3831 alias ERR_ADDRESS_IN_USE = cef_errorcode_t.ERR_ADDRESS_IN_USE;
3832 alias ERR_SSL_HANDSHAKE_NOT_COMPLETED = cef_errorcode_t.ERR_SSL_HANDSHAKE_NOT_COMPLETED;
3833 alias ERR_SSL_BAD_PEER_PUBLIC_KEY = cef_errorcode_t.ERR_SSL_BAD_PEER_PUBLIC_KEY;
3834 alias ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = cef_errorcode_t.ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN;
3835 alias ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = cef_errorcode_t.ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED;
3836 alias ERR_SSL_DECRYPT_ERROR_ALERT = cef_errorcode_t.ERR_SSL_DECRYPT_ERROR_ALERT;
3837 alias ERR_WS_THROTTLE_QUEUE_TOO_LARGE = cef_errorcode_t.ERR_WS_THROTTLE_QUEUE_TOO_LARGE;
3838 alias ERR_SSL_SERVER_CERT_CHANGED = cef_errorcode_t.ERR_SSL_SERVER_CERT_CHANGED;
3839 alias ERR_SSL_UNRECOGNIZED_NAME_ALERT = cef_errorcode_t.ERR_SSL_UNRECOGNIZED_NAME_ALERT;
3840 alias ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = cef_errorcode_t.ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR;
3841 alias ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = cef_errorcode_t.ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR;
3842 alias ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = cef_errorcode_t.ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE;
3843 alias ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = cef_errorcode_t.ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE;
3844 alias ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT;
3845 alias ERR_ICANN_NAME_COLLISION = cef_errorcode_t.ERR_ICANN_NAME_COLLISION;
3846 alias ERR_SSL_SERVER_CERT_BAD_FORMAT = cef_errorcode_t.ERR_SSL_SERVER_CERT_BAD_FORMAT;
3847 alias ERR_CT_STH_PARSING_FAILED = cef_errorcode_t.ERR_CT_STH_PARSING_FAILED;
3848 alias ERR_CT_STH_INCOMPLETE = cef_errorcode_t.ERR_CT_STH_INCOMPLETE;
3849 alias ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = cef_errorcode_t.ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH;
3850 alias ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = cef_errorcode_t.ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED;
3851 alias ERR_SSL_OBSOLETE_CIPHER = cef_errorcode_t.ERR_SSL_OBSOLETE_CIPHER;
3852 alias ERR_WS_UPGRADE = cef_errorcode_t.ERR_WS_UPGRADE;
3853 alias ERR_READ_IF_READY_NOT_IMPLEMENTED = cef_errorcode_t.ERR_READ_IF_READY_NOT_IMPLEMENTED;
3854 alias ERR_NO_BUFFER_SPACE = cef_errorcode_t.ERR_NO_BUFFER_SPACE;
3855 alias ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS;
3856 alias ERR_EARLY_DATA_REJECTED = cef_errorcode_t.ERR_EARLY_DATA_REJECTED;
3857 alias ERR_WRONG_VERSION_ON_EARLY_DATA = cef_errorcode_t.ERR_WRONG_VERSION_ON_EARLY_DATA;
3858 alias ERR_TLS13_DOWNGRADE_DETECTED = cef_errorcode_t.ERR_TLS13_DOWNGRADE_DETECTED;
3859 alias ERR_SSL_KEY_USAGE_INCOMPATIBLE = cef_errorcode_t.ERR_SSL_KEY_USAGE_INCOMPATIBLE;
3860 alias ERR_INVALID_ECH_CONFIG_LIST = cef_errorcode_t.ERR_INVALID_ECH_CONFIG_LIST;
3861 alias ERR_ECH_NOT_NEGOTIATED = cef_errorcode_t.ERR_ECH_NOT_NEGOTIATED;
3862 alias ERR_ECH_FALLBACK_CERTIFICATE_INVALID = cef_errorcode_t.ERR_ECH_FALLBACK_CERTIFICATE_INVALID;
3863 alias ERR_CERT_COMMON_NAME_INVALID = cef_errorcode_t.ERR_CERT_COMMON_NAME_INVALID;
3864 alias ERR_CERT_DATE_INVALID = cef_errorcode_t.ERR_CERT_DATE_INVALID;
3865 alias ERR_CERT_AUTHORITY_INVALID = cef_errorcode_t.ERR_CERT_AUTHORITY_INVALID;
3866 alias ERR_CERT_CONTAINS_ERRORS = cef_errorcode_t.ERR_CERT_CONTAINS_ERRORS;
3867 alias ERR_CERT_NO_REVOCATION_MECHANISM = cef_errorcode_t.ERR_CERT_NO_REVOCATION_MECHANISM;
3868 alias ERR_CERT_UNABLE_TO_CHECK_REVOCATION = cef_errorcode_t.ERR_CERT_UNABLE_TO_CHECK_REVOCATION;
3869 alias ERR_CERT_REVOKED = cef_errorcode_t.ERR_CERT_REVOKED;
3870 alias ERR_CERT_INVALID = cef_errorcode_t.ERR_CERT_INVALID;
3871 alias ERR_CERT_WEAK_SIGNATURE_ALGORITHM = cef_errorcode_t.ERR_CERT_WEAK_SIGNATURE_ALGORITHM;
3872 alias ERR_CERT_NON_UNIQUE_NAME = cef_errorcode_t.ERR_CERT_NON_UNIQUE_NAME;
3873 alias ERR_CERT_WEAK_KEY = cef_errorcode_t.ERR_CERT_WEAK_KEY;
3874 alias ERR_CERT_NAME_CONSTRAINT_VIOLATION = cef_errorcode_t.ERR_CERT_NAME_CONSTRAINT_VIOLATION;
3875 alias ERR_CERT_VALIDITY_TOO_LONG = cef_errorcode_t.ERR_CERT_VALIDITY_TOO_LONG;
3876 alias ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = cef_errorcode_t.ERR_CERTIFICATE_TRANSPARENCY_REQUIRED;
3877 alias ERR_CERT_SYMANTEC_LEGACY = cef_errorcode_t.ERR_CERT_SYMANTEC_LEGACY;
3878 alias ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = cef_errorcode_t.ERR_CERT_KNOWN_INTERCEPTION_BLOCKED;
3879 alias ERR_CERT_END = cef_errorcode_t.ERR_CERT_END;
3880 alias ERR_INVALID_URL = cef_errorcode_t.ERR_INVALID_URL;
3881 alias ERR_DISALLOWED_URL_SCHEME = cef_errorcode_t.ERR_DISALLOWED_URL_SCHEME;
3882 alias ERR_UNKNOWN_URL_SCHEME = cef_errorcode_t.ERR_UNKNOWN_URL_SCHEME;
3883 alias ERR_INVALID_REDIRECT = cef_errorcode_t.ERR_INVALID_REDIRECT;
3884 alias ERR_TOO_MANY_REDIRECTS = cef_errorcode_t.ERR_TOO_MANY_REDIRECTS;
3885 alias ERR_UNSAFE_REDIRECT = cef_errorcode_t.ERR_UNSAFE_REDIRECT;
3886 alias ERR_UNSAFE_PORT = cef_errorcode_t.ERR_UNSAFE_PORT;
3887 alias ERR_INVALID_RESPONSE = cef_errorcode_t.ERR_INVALID_RESPONSE;
3888 alias ERR_INVALID_CHUNKED_ENCODING = cef_errorcode_t.ERR_INVALID_CHUNKED_ENCODING;
3889 alias ERR_METHOD_NOT_SUPPORTED = cef_errorcode_t.ERR_METHOD_NOT_SUPPORTED;
3890 alias ERR_UNEXPECTED_PROXY_AUTH = cef_errorcode_t.ERR_UNEXPECTED_PROXY_AUTH;
3891 alias ERR_EMPTY_RESPONSE = cef_errorcode_t.ERR_EMPTY_RESPONSE;
3892 alias ERR_RESPONSE_HEADERS_TOO_BIG = cef_errorcode_t.ERR_RESPONSE_HEADERS_TOO_BIG;
3893 alias ERR_PAC_SCRIPT_FAILED = cef_errorcode_t.ERR_PAC_SCRIPT_FAILED;
3894 alias ERR_REQUEST_RANGE_NOT_SATISFIABLE = cef_errorcode_t.ERR_REQUEST_RANGE_NOT_SATISFIABLE;
3895 alias ERR_MALFORMED_IDENTITY = cef_errorcode_t.ERR_MALFORMED_IDENTITY;
3896 alias ERR_CONTENT_DECODING_FAILED = cef_errorcode_t.ERR_CONTENT_DECODING_FAILED;
3897 alias ERR_NETWORK_IO_SUSPENDED = cef_errorcode_t.ERR_NETWORK_IO_SUSPENDED;
3898 alias ERR_SYN_REPLY_NOT_RECEIVED = cef_errorcode_t.ERR_SYN_REPLY_NOT_RECEIVED;
3899 alias ERR_ENCODING_CONVERSION_FAILED = cef_errorcode_t.ERR_ENCODING_CONVERSION_FAILED;
3900 alias ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = cef_errorcode_t.ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT;
3901 alias ERR_NO_SUPPORTED_PROXIES = cef_errorcode_t.ERR_NO_SUPPORTED_PROXIES;
3902 alias ERR_HTTP2_PROTOCOL_ERROR = cef_errorcode_t.ERR_HTTP2_PROTOCOL_ERROR;
3903 alias ERR_INVALID_AUTH_CREDENTIALS = cef_errorcode_t.ERR_INVALID_AUTH_CREDENTIALS;
3904 alias ERR_UNSUPPORTED_AUTH_SCHEME = cef_errorcode_t.ERR_UNSUPPORTED_AUTH_SCHEME;
3905 alias ERR_ENCODING_DETECTION_FAILED = cef_errorcode_t.ERR_ENCODING_DETECTION_FAILED;
3906 alias ERR_MISSING_AUTH_CREDENTIALS = cef_errorcode_t.ERR_MISSING_AUTH_CREDENTIALS;
3907 alias ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = cef_errorcode_t.ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS;
3908 alias ERR_MISCONFIGURED_AUTH_ENVIRONMENT = cef_errorcode_t.ERR_MISCONFIGURED_AUTH_ENVIRONMENT;
3909 alias ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = cef_errorcode_t.ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS;
3910 alias ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = cef_errorcode_t.ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN;
3911 alias ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH;
3912 alias ERR_INCOMPLETE_HTTP2_HEADERS = cef_errorcode_t.ERR_INCOMPLETE_HTTP2_HEADERS;
3913 alias ERR_PAC_NOT_IN_DHCP = cef_errorcode_t.ERR_PAC_NOT_IN_DHCP;
3914 alias ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION;
3915 alias ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION;
3916 alias ERR_HTTP2_SERVER_REFUSED_STREAM = cef_errorcode_t.ERR_HTTP2_SERVER_REFUSED_STREAM;
3917 alias ERR_HTTP2_PING_FAILED = cef_errorcode_t.ERR_HTTP2_PING_FAILED;
3918 alias ERR_CONTENT_LENGTH_MISMATCH = cef_errorcode_t.ERR_CONTENT_LENGTH_MISMATCH;
3919 alias ERR_INCOMPLETE_CHUNKED_ENCODING = cef_errorcode_t.ERR_INCOMPLETE_CHUNKED_ENCODING;
3920 alias ERR_QUIC_PROTOCOL_ERROR = cef_errorcode_t.ERR_QUIC_PROTOCOL_ERROR;
3921 alias ERR_RESPONSE_HEADERS_TRUNCATED = cef_errorcode_t.ERR_RESPONSE_HEADERS_TRUNCATED;
3922 alias ERR_QUIC_HANDSHAKE_FAILED = cef_errorcode_t.ERR_QUIC_HANDSHAKE_FAILED;
3923 alias ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = cef_errorcode_t.ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY;
3924 alias ERR_HTTP2_FLOW_CONTROL_ERROR = cef_errorcode_t.ERR_HTTP2_FLOW_CONTROL_ERROR;
3925 alias ERR_HTTP2_FRAME_SIZE_ERROR = cef_errorcode_t.ERR_HTTP2_FRAME_SIZE_ERROR;
3926 alias ERR_HTTP2_COMPRESSION_ERROR = cef_errorcode_t.ERR_HTTP2_COMPRESSION_ERROR;
3927 alias ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = cef_errorcode_t.ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION;
3928 alias ERR_HTTP_1_1_REQUIRED = cef_errorcode_t.ERR_HTTP_1_1_REQUIRED;
3929 alias ERR_PROXY_HTTP_1_1_REQUIRED = cef_errorcode_t.ERR_PROXY_HTTP_1_1_REQUIRED;
3930 alias ERR_PAC_SCRIPT_TERMINATED = cef_errorcode_t.ERR_PAC_SCRIPT_TERMINATED;
3931 alias ERR_INVALID_HTTP_RESPONSE = cef_errorcode_t.ERR_INVALID_HTTP_RESPONSE;
3932 alias ERR_CONTENT_DECODING_INIT_FAILED = cef_errorcode_t.ERR_CONTENT_DECODING_INIT_FAILED;
3933 alias ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = cef_errorcode_t.ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED;
3934 alias ERR_TOO_MANY_RETRIES = cef_errorcode_t.ERR_TOO_MANY_RETRIES;
3935 alias ERR_HTTP2_STREAM_CLOSED = cef_errorcode_t.ERR_HTTP2_STREAM_CLOSED;
3936 alias ERR_HTTP_RESPONSE_CODE_FAILURE = cef_errorcode_t.ERR_HTTP_RESPONSE_CODE_FAILURE;
3937 alias ERR_QUIC_CERT_ROOT_NOT_KNOWN = cef_errorcode_t.ERR_QUIC_CERT_ROOT_NOT_KNOWN;
3938 alias ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = cef_errorcode_t.ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED;
3939 alias ERR_TOO_MANY_ACCEPT_CH_RESTARTS = cef_errorcode_t.ERR_TOO_MANY_ACCEPT_CH_RESTARTS;
3940 alias ERR_INCONSISTENT_IP_ADDRESS_SPACE = cef_errorcode_t.ERR_INCONSISTENT_IP_ADDRESS_SPACE;
3941 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;
3942 alias ERR_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_CHECKS = cef_errorcode_t.ERR_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_CHECKS;
3943 alias ERR_ZSTD_WINDOW_SIZE_TOO_BIG = cef_errorcode_t.ERR_ZSTD_WINDOW_SIZE_TOO_BIG;
3944 alias ERR_DICTIONARY_LOAD_FAILED = cef_errorcode_t.ERR_DICTIONARY_LOAD_FAILED;
3945 alias ERR_UNEXPECTED_CONTENT_DICTIONARY_HEADER = cef_errorcode_t.ERR_UNEXPECTED_CONTENT_DICTIONARY_HEADER;
3946 alias ERR_CACHE_MISS = cef_errorcode_t.ERR_CACHE_MISS;
3947 alias ERR_CACHE_READ_FAILURE = cef_errorcode_t.ERR_CACHE_READ_FAILURE;
3948 alias ERR_CACHE_WRITE_FAILURE = cef_errorcode_t.ERR_CACHE_WRITE_FAILURE;
3949 alias ERR_CACHE_OPERATION_NOT_SUPPORTED = cef_errorcode_t.ERR_CACHE_OPERATION_NOT_SUPPORTED;
3950 alias ERR_CACHE_OPEN_FAILURE = cef_errorcode_t.ERR_CACHE_OPEN_FAILURE;
3951 alias ERR_CACHE_CREATE_FAILURE = cef_errorcode_t.ERR_CACHE_CREATE_FAILURE;
3952 alias ERR_CACHE_RACE = cef_errorcode_t.ERR_CACHE_RACE;
3953 alias ERR_CACHE_CHECKSUM_READ_FAILURE = cef_errorcode_t.ERR_CACHE_CHECKSUM_READ_FAILURE;
3954 alias ERR_CACHE_CHECKSUM_MISMATCH = cef_errorcode_t.ERR_CACHE_CHECKSUM_MISMATCH;
3955 alias ERR_CACHE_LOCK_TIMEOUT = cef_errorcode_t.ERR_CACHE_LOCK_TIMEOUT;
3956 alias ERR_CACHE_AUTH_FAILURE_AFTER_READ = cef_errorcode_t.ERR_CACHE_AUTH_FAILURE_AFTER_READ;
3957 alias ERR_CACHE_ENTRY_NOT_SUITABLE = cef_errorcode_t.ERR_CACHE_ENTRY_NOT_SUITABLE;
3958 alias ERR_CACHE_DOOM_FAILURE = cef_errorcode_t.ERR_CACHE_DOOM_FAILURE;
3959 alias ERR_CACHE_OPEN_OR_CREATE_FAILURE = cef_errorcode_t.ERR_CACHE_OPEN_OR_CREATE_FAILURE;
3960 alias ERR_INSECURE_RESPONSE = cef_errorcode_t.ERR_INSECURE_RESPONSE;
3961 alias ERR_NO_PRIVATE_KEY_FOR_CERT = cef_errorcode_t.ERR_NO_PRIVATE_KEY_FOR_CERT;
3962 alias ERR_ADD_USER_CERT_FAILED = cef_errorcode_t.ERR_ADD_USER_CERT_FAILED;
3963 alias ERR_INVALID_SIGNED_EXCHANGE = cef_errorcode_t.ERR_INVALID_SIGNED_EXCHANGE;
3964 alias ERR_INVALID_WEB_BUNDLE = cef_errorcode_t.ERR_INVALID_WEB_BUNDLE;
3965 alias ERR_TRUST_TOKEN_OPERATION_FAILED = cef_errorcode_t.ERR_TRUST_TOKEN_OPERATION_FAILED;
3966 alias ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = cef_errorcode_t.ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST;
3967 alias ERR_PKCS12_IMPORT_BAD_PASSWORD = cef_errorcode_t.ERR_PKCS12_IMPORT_BAD_PASSWORD;
3968 alias ERR_PKCS12_IMPORT_FAILED = cef_errorcode_t.ERR_PKCS12_IMPORT_FAILED;
3969 alias ERR_IMPORT_CA_CERT_NOT_CA = cef_errorcode_t.ERR_IMPORT_CA_CERT_NOT_CA;
3970 alias ERR_IMPORT_CERT_ALREADY_EXISTS = cef_errorcode_t.ERR_IMPORT_CERT_ALREADY_EXISTS;
3971 alias ERR_IMPORT_CA_CERT_FAILED = cef_errorcode_t.ERR_IMPORT_CA_CERT_FAILED;
3972 alias ERR_IMPORT_SERVER_CERT_FAILED = cef_errorcode_t.ERR_IMPORT_SERVER_CERT_FAILED;
3973 alias ERR_PKCS12_IMPORT_INVALID_MAC = cef_errorcode_t.ERR_PKCS12_IMPORT_INVALID_MAC;
3974 alias ERR_PKCS12_IMPORT_INVALID_FILE = cef_errorcode_t.ERR_PKCS12_IMPORT_INVALID_FILE;
3975 alias ERR_PKCS12_IMPORT_UNSUPPORTED = cef_errorcode_t.ERR_PKCS12_IMPORT_UNSUPPORTED;
3976 alias ERR_KEY_GENERATION_FAILED = cef_errorcode_t.ERR_KEY_GENERATION_FAILED;
3977 alias ERR_PRIVATE_KEY_EXPORT_FAILED = cef_errorcode_t.ERR_PRIVATE_KEY_EXPORT_FAILED;
3978 alias ERR_SELF_SIGNED_CERT_GENERATION_FAILED = cef_errorcode_t.ERR_SELF_SIGNED_CERT_GENERATION_FAILED;
3979 alias ERR_CERT_DATABASE_CHANGED = cef_errorcode_t.ERR_CERT_DATABASE_CHANGED;
3980 alias ERR_CERT_VERIFIER_CHANGED = cef_errorcode_t.ERR_CERT_VERIFIER_CHANGED;
3981 alias ERR_DNS_MALFORMED_RESPONSE = cef_errorcode_t.ERR_DNS_MALFORMED_RESPONSE;
3982 alias ERR_DNS_SERVER_REQUIRES_TCP = cef_errorcode_t.ERR_DNS_SERVER_REQUIRES_TCP;
3983 alias ERR_DNS_SERVER_FAILED = cef_errorcode_t.ERR_DNS_SERVER_FAILED;
3984 alias ERR_DNS_TIMED_OUT = cef_errorcode_t.ERR_DNS_TIMED_OUT;
3985 alias ERR_DNS_CACHE_MISS = cef_errorcode_t.ERR_DNS_CACHE_MISS;
3986 alias ERR_DNS_SEARCH_EMPTY = cef_errorcode_t.ERR_DNS_SEARCH_EMPTY;
3987 alias ERR_DNS_SORT_ERROR = cef_errorcode_t.ERR_DNS_SORT_ERROR;
3988 alias ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = cef_errorcode_t.ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED;
3989 alias ERR_DNS_NAME_HTTPS_ONLY = cef_errorcode_t.ERR_DNS_NAME_HTTPS_ONLY;
3990 alias ERR_DNS_REQUEST_CANCELLED = cef_errorcode_t.ERR_DNS_REQUEST_CANCELLED;
3991 alias ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = cef_errorcode_t.ERR_DNS_NO_MATCHING_SUPPORTED_ALPN;
3992 alias ERR_DNS_SECURE_PROBE_RECORD_INVALID = cef_errorcode_t.ERR_DNS_SECURE_PROBE_RECORD_INVALID;
3993 
3994 enum cef_cert_status_t
3995 {
3996     CERT_STATUS_NONE = 0,
3997     CERT_STATUS_COMMON_NAME_INVALID = 1 << 0,
3998     CERT_STATUS_DATE_INVALID = 1 << 1,
3999     CERT_STATUS_AUTHORITY_INVALID = 1 << 2,
4000     CERT_STATUS_NO_REVOCATION_MECHANISM = 1 << 4,
4001     CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = 1 << 5,
4002     CERT_STATUS_REVOKED = 1 << 6,
4003     CERT_STATUS_INVALID = 1 << 7,
4004     CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = 1 << 8,
4005     CERT_STATUS_NON_UNIQUE_NAME = 1 << 10,
4006     CERT_STATUS_WEAK_KEY = 1 << 11,
4007     CERT_STATUS_PINNED_KEY_MISSING = 1 << 13,
4008     CERT_STATUS_NAME_CONSTRAINT_VIOLATION = 1 << 14,
4009     CERT_STATUS_VALIDITY_TOO_LONG = 1 << 15,
4010     CERT_STATUS_IS_EV = 1 << 16,
4011     CERT_STATUS_REV_CHECKING_ENABLED = 1 << 17,
4012     CERT_STATUS_SHA1_SIGNATURE_PRESENT = 1 << 19,
4013     CERT_STATUS_CT_COMPLIANCE_FAILED = 1 << 20
4014 }
4015 
4016 alias CERT_STATUS_NONE = cef_cert_status_t.CERT_STATUS_NONE;
4017 alias CERT_STATUS_COMMON_NAME_INVALID = cef_cert_status_t.CERT_STATUS_COMMON_NAME_INVALID;
4018 alias CERT_STATUS_DATE_INVALID = cef_cert_status_t.CERT_STATUS_DATE_INVALID;
4019 alias CERT_STATUS_AUTHORITY_INVALID = cef_cert_status_t.CERT_STATUS_AUTHORITY_INVALID;
4020 alias CERT_STATUS_NO_REVOCATION_MECHANISM = cef_cert_status_t.CERT_STATUS_NO_REVOCATION_MECHANISM;
4021 alias CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = cef_cert_status_t.CERT_STATUS_UNABLE_TO_CHECK_REVOCATION;
4022 alias CERT_STATUS_REVOKED = cef_cert_status_t.CERT_STATUS_REVOKED;
4023 alias CERT_STATUS_INVALID = cef_cert_status_t.CERT_STATUS_INVALID;
4024 alias CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = cef_cert_status_t.CERT_STATUS_WEAK_SIGNATURE_ALGORITHM;
4025 alias CERT_STATUS_NON_UNIQUE_NAME = cef_cert_status_t.CERT_STATUS_NON_UNIQUE_NAME;
4026 alias CERT_STATUS_WEAK_KEY = cef_cert_status_t.CERT_STATUS_WEAK_KEY;
4027 alias CERT_STATUS_PINNED_KEY_MISSING = cef_cert_status_t.CERT_STATUS_PINNED_KEY_MISSING;
4028 alias CERT_STATUS_NAME_CONSTRAINT_VIOLATION = cef_cert_status_t.CERT_STATUS_NAME_CONSTRAINT_VIOLATION;
4029 alias CERT_STATUS_VALIDITY_TOO_LONG = cef_cert_status_t.CERT_STATUS_VALIDITY_TOO_LONG;
4030 alias CERT_STATUS_IS_EV = cef_cert_status_t.CERT_STATUS_IS_EV;
4031 alias CERT_STATUS_REV_CHECKING_ENABLED = cef_cert_status_t.CERT_STATUS_REV_CHECKING_ENABLED;
4032 alias CERT_STATUS_SHA1_SIGNATURE_PRESENT = cef_cert_status_t.CERT_STATUS_SHA1_SIGNATURE_PRESENT;
4033 alias CERT_STATUS_CT_COMPLIANCE_FAILED = cef_cert_status_t.CERT_STATUS_CT_COMPLIANCE_FAILED;
4034 
4035 enum cef_resultcode_t
4036 {
4037     CEF_RESULT_CODE_NORMAL_EXIT = 0,
4038     CEF_RESULT_CODE_KILLED = 1,
4039     CEF_RESULT_CODE_HUNG = 2,
4040     CEF_RESULT_CODE_KILLED_BAD_MESSAGE = 3,
4041     CEF_RESULT_CODE_GPU_DEAD_ON_ARRIVAL = 4,
4042     CEF_RESULT_CODE_CHROME_FIRST = 5,
4043     CEF_RESULT_CODE_MISSING_DATA = 7,
4044     CEF_RESULT_CODE_UNSUPPORTED_PARAM = 13,
4045     CEF_RESULT_CODE_PROFILE_IN_USE = 21,
4046     CEF_RESULT_CODE_PACK_EXTENSION_ERROR = 22,
4047     CEF_RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED = 24,
4048     CEF_RESULT_CODE_INVALID_SANDBOX_STATE = 31,
4049     CEF_RESULT_CODE_CLOUD_POLICY_ENROLLMENT_FAILED = 32,
4050     CEF_RESULT_CODE_GPU_EXIT_ON_CONTEXT_LOST = 34,
4051     CEF_RESULT_CODE_NORMAL_EXIT_PACK_EXTENSION_SUCCESS = 36,
4052     CEF_RESULT_CODE_SYSTEM_RESOURCE_EXHAUSTED = 37,
4053     CEF_RESULT_CODE_CHROME_LAST = 39,
4054     CEF_RESULT_CODE_SANDBOX_FATAL_FIRST = 7006,
4055     CEF_RESULT_CODE_SANDBOX_FATAL_INTEGRITY = CEF_RESULT_CODE_SANDBOX_FATAL_FIRST,
4056     CEF_RESULT_CODE_SANDBOX_FATAL_DROPTOKEN = 7007,
4057     CEF_RESULT_CODE_SANDBOX_FATAL_FLUSHANDLES = 7008,
4058     CEF_RESULT_CODE_SANDBOX_FATAL_CACHEDISABLE = 7009,
4059     CEF_RESULT_CODE_SANDBOX_FATAL_CLOSEHANDLES = 7010,
4060     CEF_RESULT_CODE_SANDBOX_FATAL_MITIGATION = 7011,
4061     CEF_RESULT_CODE_SANDBOX_FATAL_MEMORY_EXCEEDED = 7012,
4062     CEF_RESULT_CODE_SANDBOX_FATAL_WARMUP = 7013,
4063     CEF_RESULT_CODE_SANDBOX_FATAL_LAST = 7014
4064 }
4065 
4066 alias CEF_RESULT_CODE_NORMAL_EXIT = cef_resultcode_t.CEF_RESULT_CODE_NORMAL_EXIT;
4067 alias CEF_RESULT_CODE_KILLED = cef_resultcode_t.CEF_RESULT_CODE_KILLED;
4068 alias CEF_RESULT_CODE_HUNG = cef_resultcode_t.CEF_RESULT_CODE_HUNG;
4069 alias CEF_RESULT_CODE_KILLED_BAD_MESSAGE = cef_resultcode_t.CEF_RESULT_CODE_KILLED_BAD_MESSAGE;
4070 alias CEF_RESULT_CODE_GPU_DEAD_ON_ARRIVAL = cef_resultcode_t.CEF_RESULT_CODE_GPU_DEAD_ON_ARRIVAL;
4071 alias CEF_RESULT_CODE_CHROME_FIRST = cef_resultcode_t.CEF_RESULT_CODE_CHROME_FIRST;
4072 alias CEF_RESULT_CODE_MISSING_DATA = cef_resultcode_t.CEF_RESULT_CODE_MISSING_DATA;
4073 alias CEF_RESULT_CODE_UNSUPPORTED_PARAM = cef_resultcode_t.CEF_RESULT_CODE_UNSUPPORTED_PARAM;
4074 alias CEF_RESULT_CODE_PROFILE_IN_USE = cef_resultcode_t.CEF_RESULT_CODE_PROFILE_IN_USE;
4075 alias CEF_RESULT_CODE_PACK_EXTENSION_ERROR = cef_resultcode_t.CEF_RESULT_CODE_PACK_EXTENSION_ERROR;
4076 alias CEF_RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED = cef_resultcode_t.CEF_RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED;
4077 alias CEF_RESULT_CODE_INVALID_SANDBOX_STATE = cef_resultcode_t.CEF_RESULT_CODE_INVALID_SANDBOX_STATE;
4078 alias CEF_RESULT_CODE_CLOUD_POLICY_ENROLLMENT_FAILED = cef_resultcode_t.CEF_RESULT_CODE_CLOUD_POLICY_ENROLLMENT_FAILED;
4079 alias CEF_RESULT_CODE_GPU_EXIT_ON_CONTEXT_LOST = cef_resultcode_t.CEF_RESULT_CODE_GPU_EXIT_ON_CONTEXT_LOST;
4080 alias CEF_RESULT_CODE_NORMAL_EXIT_PACK_EXTENSION_SUCCESS = cef_resultcode_t.CEF_RESULT_CODE_NORMAL_EXIT_PACK_EXTENSION_SUCCESS;
4081 alias CEF_RESULT_CODE_SYSTEM_RESOURCE_EXHAUSTED = cef_resultcode_t.CEF_RESULT_CODE_SYSTEM_RESOURCE_EXHAUSTED;
4082 alias CEF_RESULT_CODE_CHROME_LAST = cef_resultcode_t.CEF_RESULT_CODE_CHROME_LAST;
4083 alias CEF_RESULT_CODE_SANDBOX_FATAL_FIRST = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_FIRST;
4084 alias CEF_RESULT_CODE_SANDBOX_FATAL_INTEGRITY = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_INTEGRITY;
4085 alias CEF_RESULT_CODE_SANDBOX_FATAL_DROPTOKEN = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_DROPTOKEN;
4086 alias CEF_RESULT_CODE_SANDBOX_FATAL_FLUSHANDLES = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_FLUSHANDLES;
4087 alias CEF_RESULT_CODE_SANDBOX_FATAL_CACHEDISABLE = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_CACHEDISABLE;
4088 alias CEF_RESULT_CODE_SANDBOX_FATAL_CLOSEHANDLES = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_CLOSEHANDLES;
4089 alias CEF_RESULT_CODE_SANDBOX_FATAL_MITIGATION = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_MITIGATION;
4090 alias CEF_RESULT_CODE_SANDBOX_FATAL_MEMORY_EXCEEDED = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_MEMORY_EXCEEDED;
4091 alias CEF_RESULT_CODE_SANDBOX_FATAL_WARMUP = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_WARMUP;
4092 alias CEF_RESULT_CODE_SANDBOX_FATAL_LAST = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_LAST;
4093 
4094 enum cef_window_open_disposition_t
4095 {
4096     CEF_WOD_UNKNOWN = 0,
4097 
4098     ///
4099     /// Current tab. This is the default in most cases.
4100     ///
4101     CEF_WOD_CURRENT_TAB = 1,
4102 
4103     ///
4104     /// Indicates that only one tab with the url should exist in the same window.
4105     ///
4106     CEF_WOD_SINGLETON_TAB = 2,
4107 
4108     ///
4109     /// Shift key + Middle mouse button or meta/ctrl key while clicking.
4110     ///
4111     CEF_WOD_NEW_FOREGROUND_TAB = 3,
4112 
4113     ///
4114     /// Middle mouse button or meta/ctrl key while clicking.
4115     ///
4116     CEF_WOD_NEW_BACKGROUND_TAB = 4,
4117 
4118     ///
4119     /// New popup window.
4120     ///
4121     CEF_WOD_NEW_POPUP = 5,
4122 
4123     ///
4124     /// Shift key while clicking.
4125     ///
4126     CEF_WOD_NEW_WINDOW = 6,
4127 
4128     ///
4129     /// Alt key while clicking.
4130     ///
4131     CEF_WOD_SAVE_TO_DISK = 7,
4132 
4133     ///
4134     /// New off-the-record (incognito) window.
4135     ///
4136     CEF_WOD_OFF_THE_RECORD = 8,
4137 
4138     ///
4139     /// Special case error condition from the renderer.
4140     ///
4141     CEF_WOD_IGNORE_ACTION = 9,
4142 
4143     ///
4144     /// Activates an existing tab containing the url, rather than navigating.
4145     /// This is similar to SINGLETON_TAB, but searches across all windows from
4146     /// the current profile and anonymity (instead of just the current one);
4147     /// closes the current tab on switching if the current tab was the NTP with
4148     /// no session history; and behaves like CURRENT_TAB instead of
4149     /// NEW_FOREGROUND_TAB when no existing tab is found.
4150     ///
4151     CEF_WOD_SWITCH_TO_TAB = 10,
4152 
4153     ///
4154     /// Creates a new document picture-in-picture window showing a child WebView.
4155     ///
4156     CEF_WOD_NEW_PICTURE_IN_PICTURE = 11,
4157 
4158     CEF_WOD_MAX_VALUE = CEF_WOD_NEW_PICTURE_IN_PICTURE
4159 }
4160 
4161 alias CEF_WOD_UNKNOWN = cef_window_open_disposition_t.CEF_WOD_UNKNOWN;
4162 alias CEF_WOD_CURRENT_TAB = cef_window_open_disposition_t.CEF_WOD_CURRENT_TAB;
4163 alias CEF_WOD_SINGLETON_TAB = cef_window_open_disposition_t.CEF_WOD_SINGLETON_TAB;
4164 alias CEF_WOD_NEW_FOREGROUND_TAB = cef_window_open_disposition_t.CEF_WOD_NEW_FOREGROUND_TAB;
4165 alias CEF_WOD_NEW_BACKGROUND_TAB = cef_window_open_disposition_t.CEF_WOD_NEW_BACKGROUND_TAB;
4166 alias CEF_WOD_NEW_POPUP = cef_window_open_disposition_t.CEF_WOD_NEW_POPUP;
4167 alias CEF_WOD_NEW_WINDOW = cef_window_open_disposition_t.CEF_WOD_NEW_WINDOW;
4168 alias CEF_WOD_SAVE_TO_DISK = cef_window_open_disposition_t.CEF_WOD_SAVE_TO_DISK;
4169 alias CEF_WOD_OFF_THE_RECORD = cef_window_open_disposition_t.CEF_WOD_OFF_THE_RECORD;
4170 alias CEF_WOD_IGNORE_ACTION = cef_window_open_disposition_t.CEF_WOD_IGNORE_ACTION;
4171 alias CEF_WOD_SWITCH_TO_TAB = cef_window_open_disposition_t.CEF_WOD_SWITCH_TO_TAB;
4172 alias CEF_WOD_NEW_PICTURE_IN_PICTURE = cef_window_open_disposition_t.CEF_WOD_NEW_PICTURE_IN_PICTURE;
4173 alias CEF_WOD_MAX_VALUE = cef_window_open_disposition_t.CEF_WOD_MAX_VALUE;
4174 
4175 ///
4176 /// "Verb" of a drag-and-drop operation as negotiated between the source and
4177 /// destination. These constants match their equivalents in WebCore's
4178 /// DragActions.h and should not be renumbered.
4179 ///
4180 enum cef_drag_operations_mask_t
4181 {
4182     DRAG_OPERATION_NONE = 0,
4183     DRAG_OPERATION_COPY = 1,
4184     DRAG_OPERATION_LINK = 2,
4185     DRAG_OPERATION_GENERIC = 4,
4186     DRAG_OPERATION_PRIVATE = 8,
4187     DRAG_OPERATION_MOVE = 16,
4188     DRAG_OPERATION_DELETE = 32,
4189     DRAG_OPERATION_EVERY = UINT_MAX
4190 }
4191 
4192 alias DRAG_OPERATION_NONE = cef_drag_operations_mask_t.DRAG_OPERATION_NONE;
4193 alias DRAG_OPERATION_COPY = cef_drag_operations_mask_t.DRAG_OPERATION_COPY;
4194 alias DRAG_OPERATION_LINK = cef_drag_operations_mask_t.DRAG_OPERATION_LINK;
4195 alias DRAG_OPERATION_GENERIC = cef_drag_operations_mask_t.DRAG_OPERATION_GENERIC;
4196 alias DRAG_OPERATION_PRIVATE = cef_drag_operations_mask_t.DRAG_OPERATION_PRIVATE;
4197 alias DRAG_OPERATION_MOVE = cef_drag_operations_mask_t.DRAG_OPERATION_MOVE;
4198 alias DRAG_OPERATION_DELETE = cef_drag_operations_mask_t.DRAG_OPERATION_DELETE;
4199 alias DRAG_OPERATION_EVERY = cef_drag_operations_mask_t.DRAG_OPERATION_EVERY;
4200 
4201 ///
4202 /// Input mode of a virtual keyboard. These constants match their equivalents
4203 /// in Chromium's text_input_mode.h and should not be renumbered.
4204 /// See https://html.spec.whatwg.org/#input-modalities:-the-inputmode-attribute
4205 ///
4206 enum cef_text_input_mode_t
4207 {
4208     CEF_TEXT_INPUT_MODE_DEFAULT = 0,
4209     CEF_TEXT_INPUT_MODE_NONE = 1,
4210     CEF_TEXT_INPUT_MODE_TEXT = 2,
4211     CEF_TEXT_INPUT_MODE_TEL = 3,
4212     CEF_TEXT_INPUT_MODE_URL = 4,
4213     CEF_TEXT_INPUT_MODE_EMAIL = 5,
4214     CEF_TEXT_INPUT_MODE_NUMERIC = 6,
4215     CEF_TEXT_INPUT_MODE_DECIMAL = 7,
4216     CEF_TEXT_INPUT_MODE_SEARCH = 8,
4217 
4218     CEF_TEXT_INPUT_MODE_MAX = CEF_TEXT_INPUT_MODE_SEARCH
4219 }
4220 
4221 alias CEF_TEXT_INPUT_MODE_DEFAULT = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_DEFAULT;
4222 alias CEF_TEXT_INPUT_MODE_NONE = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_NONE;
4223 alias CEF_TEXT_INPUT_MODE_TEXT = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_TEXT;
4224 alias CEF_TEXT_INPUT_MODE_TEL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_TEL;
4225 alias CEF_TEXT_INPUT_MODE_URL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_URL;
4226 alias CEF_TEXT_INPUT_MODE_EMAIL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_EMAIL;
4227 alias CEF_TEXT_INPUT_MODE_NUMERIC = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_NUMERIC;
4228 alias CEF_TEXT_INPUT_MODE_DECIMAL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_DECIMAL;
4229 alias CEF_TEXT_INPUT_MODE_SEARCH = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_SEARCH;
4230 alias CEF_TEXT_INPUT_MODE_MAX = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_MAX;
4231 
4232 ///
4233 /// V8 property attribute values.
4234 ///
4235 enum cef_v8_propertyattribute_t
4236 {
4237     ///
4238     /// Writeable, Enumerable, Configurable
4239     ///
4240     V8_PROPERTY_ATTRIBUTE_NONE = 0,
4241 
4242     ///
4243     /// Not writeable
4244     ///
4245     V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0,
4246 
4247     ///
4248     /// Not enumerable
4249     ///
4250     V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1,
4251 
4252     ///
4253     /// Not configurable
4254     ///
4255     V8_PROPERTY_ATTRIBUTE_DONTDELETE = 1 << 2
4256 }
4257 
4258 alias V8_PROPERTY_ATTRIBUTE_NONE = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_NONE;
4259 alias V8_PROPERTY_ATTRIBUTE_READONLY = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_READONLY;
4260 alias V8_PROPERTY_ATTRIBUTE_DONTENUM = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_DONTENUM;
4261 alias V8_PROPERTY_ATTRIBUTE_DONTDELETE = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_DONTDELETE;
4262 
4263 ///
4264 /// Post data elements may represent either bytes or files.
4265 ///
4266 enum cef_postdataelement_type_t
4267 {
4268     PDE_TYPE_EMPTY = 0,
4269     PDE_TYPE_BYTES = 1,
4270     PDE_TYPE_FILE = 2
4271 }
4272 
4273 alias PDE_TYPE_EMPTY = cef_postdataelement_type_t.PDE_TYPE_EMPTY;
4274 alias PDE_TYPE_BYTES = cef_postdataelement_type_t.PDE_TYPE_BYTES;
4275 alias PDE_TYPE_FILE = cef_postdataelement_type_t.PDE_TYPE_FILE;
4276 
4277 ///
4278 /// Resource type for a request. These constants match their equivalents in
4279 /// Chromium's ResourceType and should not be renumbered.
4280 ///
4281 enum cef_resource_type_t
4282 {
4283     ///
4284     /// Top level page.
4285     ///
4286     RT_MAIN_FRAME = 0,
4287 
4288     ///
4289     /// Frame or iframe.
4290     ///
4291     RT_SUB_FRAME = 1,
4292 
4293     ///
4294     /// CSS stylesheet.
4295     ///
4296     RT_STYLESHEET = 2,
4297 
4298     ///
4299     /// External script.
4300     ///
4301     RT_SCRIPT = 3,
4302 
4303     ///
4304     /// Image (jpg/gif/png/etc).
4305     ///
4306     RT_IMAGE = 4,
4307 
4308     ///
4309     /// Font.
4310     ///
4311     RT_FONT_RESOURCE = 5,
4312 
4313     ///
4314     /// Some other subresource. This is the default type if the actual type is
4315     /// unknown.
4316     ///
4317     RT_SUB_RESOURCE = 6,
4318 
4319     ///
4320     /// Object (or embed) tag for a plugin, or a resource that a plugin requested.
4321     ///
4322     RT_OBJECT = 7,
4323 
4324     ///
4325     /// Media resource.
4326     ///
4327     RT_MEDIA = 8,
4328 
4329     ///
4330     /// Main resource of a dedicated worker.
4331     ///
4332     RT_WORKER = 9,
4333 
4334     ///
4335     /// Main resource of a shared worker.
4336     ///
4337     RT_SHARED_WORKER = 10,
4338 
4339     ///
4340     /// Explicitly requested prefetch.
4341     ///
4342     RT_PREFETCH = 11,
4343 
4344     ///
4345     /// Favicon.
4346     ///
4347     RT_FAVICON = 12,
4348 
4349     ///
4350     /// XMLHttpRequest.
4351     ///
4352     RT_XHR = 13,
4353 
4354     ///
4355     /// A request for a "<ping>".
4356     ///
4357     RT_PING = 14,
4358 
4359     ///
4360     /// Main resource of a service worker.
4361     ///
4362     RT_SERVICE_WORKER = 15,
4363 
4364     ///
4365     /// A report of Content Security Policy violations.
4366     ///
4367     RT_CSP_REPORT = 16,
4368 
4369     ///
4370     /// A resource that a plugin requested.
4371     ///
4372     RT_PLUGIN_RESOURCE = 17,
4373 
4374     ///
4375     /// A main-frame service worker navigation preload request.
4376     ///
4377     RT_NAVIGATION_PRELOAD_MAIN_FRAME = 19,
4378 
4379     ///
4380     /// A sub-frame service worker navigation preload request.
4381     ///
4382     RT_NAVIGATION_PRELOAD_SUB_FRAME = 20
4383 }
4384 
4385 alias RT_MAIN_FRAME = cef_resource_type_t.RT_MAIN_FRAME;
4386 alias RT_SUB_FRAME = cef_resource_type_t.RT_SUB_FRAME;
4387 alias RT_STYLESHEET = cef_resource_type_t.RT_STYLESHEET;
4388 alias RT_SCRIPT = cef_resource_type_t.RT_SCRIPT;
4389 alias RT_IMAGE = cef_resource_type_t.RT_IMAGE;
4390 alias RT_FONT_RESOURCE = cef_resource_type_t.RT_FONT_RESOURCE;
4391 alias RT_SUB_RESOURCE = cef_resource_type_t.RT_SUB_RESOURCE;
4392 alias RT_OBJECT = cef_resource_type_t.RT_OBJECT;
4393 alias RT_MEDIA = cef_resource_type_t.RT_MEDIA;
4394 alias RT_WORKER = cef_resource_type_t.RT_WORKER;
4395 alias RT_SHARED_WORKER = cef_resource_type_t.RT_SHARED_WORKER;
4396 alias RT_PREFETCH = cef_resource_type_t.RT_PREFETCH;
4397 alias RT_FAVICON = cef_resource_type_t.RT_FAVICON;
4398 alias RT_XHR = cef_resource_type_t.RT_XHR;
4399 alias RT_PING = cef_resource_type_t.RT_PING;
4400 alias RT_SERVICE_WORKER = cef_resource_type_t.RT_SERVICE_WORKER;
4401 alias RT_CSP_REPORT = cef_resource_type_t.RT_CSP_REPORT;
4402 alias RT_PLUGIN_RESOURCE = cef_resource_type_t.RT_PLUGIN_RESOURCE;
4403 alias RT_NAVIGATION_PRELOAD_MAIN_FRAME = cef_resource_type_t.RT_NAVIGATION_PRELOAD_MAIN_FRAME;
4404 alias RT_NAVIGATION_PRELOAD_SUB_FRAME = cef_resource_type_t.RT_NAVIGATION_PRELOAD_SUB_FRAME;
4405 
4406 ///
4407 /// Transition type for a request. Made up of one source value and 0 or more
4408 /// qualifiers.
4409 ///
4410 enum cef_transition_type_t
4411 {
4412     ///
4413     /// Source is a link click or the JavaScript window.open function. This is
4414     /// also the default value for requests like sub-resource loads that are not
4415     /// navigations.
4416     ///
4417     TT_LINK = 0,
4418 
4419     ///
4420     /// Source is some other "explicit" navigation. This is the default value for
4421     /// navigations where the actual type is unknown. See also
4422     /// TT_DIRECT_LOAD_FLAG.
4423     ///
4424     TT_EXPLICIT = 1,
4425 
4426     ///
4427     /// User got to this page through a suggestion in the UI (for example, via the
4428     /// destinations page). Chrome runtime only.
4429     ///
4430     TT_AUTO_BOOKMARK = 2,
4431 
4432     ///
4433     /// Source is a subframe navigation. This is any content that is automatically
4434     /// loaded in a non-toplevel frame. For example, if a page consists of several
4435     /// frames containing ads, those ad URLs will have this transition type.
4436     /// The user may not even realize the content in these pages is a separate
4437     /// frame, so may not care about the URL.
4438     ///
4439     TT_AUTO_SUBFRAME = 3,
4440 
4441     ///
4442     /// Source is a subframe navigation explicitly requested by the user that will
4443     /// generate new navigation entries in the back/forward list. These are
4444     /// probably more important than frames that were automatically loaded in
4445     /// the background because the user probably cares about the fact that this
4446     /// link was loaded.
4447     ///
4448     TT_MANUAL_SUBFRAME = 4,
4449 
4450     ///
4451     /// User got to this page by typing in the URL bar and selecting an entry
4452     /// that did not look like a URL.  For example, a match might have the URL
4453     /// of a Google search result page, but appear like "Search Google for ...".
4454     /// These are not quite the same as EXPLICIT navigations because the user
4455     /// didn't type or see the destination URL. Chrome runtime only.
4456     /// See also TT_KEYWORD.
4457     ///
4458     TT_GENERATED = 5,
4459 
4460     ///
4461     /// This is a toplevel navigation. This is any content that is automatically
4462     /// loaded in a toplevel frame.  For example, opening a tab to show the ASH
4463     /// screen saver, opening the devtools window, opening the NTP after the safe
4464     /// browsing warning, opening web-based dialog boxes are examples of
4465     /// AUTO_TOPLEVEL navigations. Chrome runtime only.
4466     ///
4467     TT_AUTO_TOPLEVEL = 6,
4468 
4469     ///
4470     /// Source is a form submission by the user. NOTE: In some situations
4471     /// submitting a form does not result in this transition type. This can happen
4472     /// if the form uses a script to submit the contents.
4473     ///
4474     TT_FORM_SUBMIT = 7,
4475 
4476     ///
4477     /// Source is a "reload" of the page via the Reload function or by re-visiting
4478     /// the same URL. NOTE: This is distinct from the concept of whether a
4479     /// particular load uses "reload semantics" (i.e. bypasses cached data).
4480     ///
4481     TT_RELOAD = 8,
4482 
4483     ///
4484     /// The url was generated from a replaceable keyword other than the default
4485     /// search provider. If the user types a keyword (which also applies to
4486     /// tab-to-search) in the omnibox this qualifier is applied to the transition
4487     /// type of the generated url. TemplateURLModel then may generate an
4488     /// additional visit with a transition type of TT_KEYWORD_GENERATED against
4489     /// the url 'http://' + keyword. For example, if you do a tab-to-search
4490     /// against wikipedia the generated url has a transition qualifer of
4491     /// TT_KEYWORD, and TemplateURLModel generates a visit for 'wikipedia.org'
4492     /// with a transition type of TT_KEYWORD_GENERATED. Chrome runtime only.
4493     ///
4494     TT_KEYWORD = 9,
4495 
4496     ///
4497     /// Corresponds to a visit generated for a keyword. See description of
4498     /// TT_KEYWORD for more details. Chrome runtime only.
4499     ///
4500     TT_KEYWORD_GENERATED = 10,
4501 
4502     ///
4503     /// General mask defining the bits used for the source values.
4504     ///
4505     TT_SOURCE_MASK = 0xFF,
4506 
4507     /// Qualifiers.
4508     /// Any of the core values above can be augmented by one or more qualifiers.
4509     /// These qualifiers further define the transition.
4510 
4511     ///
4512     /// Attempted to visit a URL but was blocked.
4513     ///
4514     TT_BLOCKED_FLAG = 0x00800000,
4515 
4516     ///
4517     /// Used the Forward or Back function to navigate among browsing history.
4518     /// Will be ORed to the transition type for the original load.
4519     ///
4520     TT_FORWARD_BACK_FLAG = 0x01000000,
4521 
4522     ///
4523     /// Loaded a URL directly via CreateBrowser, LoadURL or LoadRequest.
4524     ///
4525     TT_DIRECT_LOAD_FLAG = 0x02000000,
4526 
4527     ///
4528     /// User is navigating to the home page. Chrome runtime only.
4529     ///
4530     TT_HOME_PAGE_FLAG = 0x04000000,
4531 
4532     ///
4533     /// The transition originated from an external application; the exact
4534     /// definition of this is embedder dependent. Chrome runtime and
4535     /// extension system only.
4536     ///
4537     TT_FROM_API_FLAG = 0x08000000,
4538 
4539     ///
4540     /// The beginning of a navigation chain.
4541     ///
4542     TT_CHAIN_START_FLAG = 0x10000000,
4543 
4544     ///
4545     /// The last transition in a redirect chain.
4546     ///
4547     TT_CHAIN_END_FLAG = 0x20000000,
4548 
4549     ///
4550     /// Redirects caused by JavaScript or a meta refresh tag on the page.
4551     ///
4552     TT_CLIENT_REDIRECT_FLAG = 0x40000000,
4553 
4554     ///
4555     /// Redirects sent from the server by HTTP headers.
4556     ///
4557     TT_SERVER_REDIRECT_FLAG = 0x80000000,
4558 
4559     ///
4560     /// Used to test whether a transition involves a redirect.
4561     ///
4562     TT_IS_REDIRECT_MASK = 0xC0000000,
4563 
4564     ///
4565     /// General mask defining the bits used for the qualifiers.
4566     ///
4567     TT_QUALIFIER_MASK = 0xFFFFFF00
4568 }
4569 
4570 alias TT_LINK = cef_transition_type_t.TT_LINK;
4571 alias TT_EXPLICIT = cef_transition_type_t.TT_EXPLICIT;
4572 alias TT_AUTO_BOOKMARK = cef_transition_type_t.TT_AUTO_BOOKMARK;
4573 alias TT_AUTO_SUBFRAME = cef_transition_type_t.TT_AUTO_SUBFRAME;
4574 alias TT_MANUAL_SUBFRAME = cef_transition_type_t.TT_MANUAL_SUBFRAME;
4575 alias TT_GENERATED = cef_transition_type_t.TT_GENERATED;
4576 alias TT_AUTO_TOPLEVEL = cef_transition_type_t.TT_AUTO_TOPLEVEL;
4577 alias TT_FORM_SUBMIT = cef_transition_type_t.TT_FORM_SUBMIT;
4578 alias TT_RELOAD = cef_transition_type_t.TT_RELOAD;
4579 alias TT_KEYWORD = cef_transition_type_t.TT_KEYWORD;
4580 alias TT_KEYWORD_GENERATED = cef_transition_type_t.TT_KEYWORD_GENERATED;
4581 alias TT_SOURCE_MASK = cef_transition_type_t.TT_SOURCE_MASK;
4582 alias TT_BLOCKED_FLAG = cef_transition_type_t.TT_BLOCKED_FLAG;
4583 alias TT_FORWARD_BACK_FLAG = cef_transition_type_t.TT_FORWARD_BACK_FLAG;
4584 alias TT_DIRECT_LOAD_FLAG = cef_transition_type_t.TT_DIRECT_LOAD_FLAG;
4585 alias TT_HOME_PAGE_FLAG = cef_transition_type_t.TT_HOME_PAGE_FLAG;
4586 alias TT_FROM_API_FLAG = cef_transition_type_t.TT_FROM_API_FLAG;
4587 alias TT_CHAIN_START_FLAG = cef_transition_type_t.TT_CHAIN_START_FLAG;
4588 alias TT_CHAIN_END_FLAG = cef_transition_type_t.TT_CHAIN_END_FLAG;
4589 alias TT_CLIENT_REDIRECT_FLAG = cef_transition_type_t.TT_CLIENT_REDIRECT_FLAG;
4590 alias TT_SERVER_REDIRECT_FLAG = cef_transition_type_t.TT_SERVER_REDIRECT_FLAG;
4591 alias TT_IS_REDIRECT_MASK = cef_transition_type_t.TT_IS_REDIRECT_MASK;
4592 alias TT_QUALIFIER_MASK = cef_transition_type_t.TT_QUALIFIER_MASK;
4593 
4594 ///
4595 /// Flags used to customize the behavior of CefURLRequest.
4596 ///
4597 enum cef_urlrequest_flags_t
4598 {
4599     ///
4600     /// Default behavior.
4601     ///
4602     UR_FLAG_NONE = 0,
4603 
4604     ///
4605     /// If set the cache will be skipped when handling the request. Setting this
4606     /// value is equivalent to specifying the "Cache-Control: no-cache" request
4607     /// header. Setting this value in combination with UR_FLAG_ONLY_FROM_CACHE
4608     /// will cause the request to fail.
4609     ///
4610     UR_FLAG_SKIP_CACHE = 1 << 0,
4611 
4612     ///
4613     /// If set the request will fail if it cannot be served from the cache (or
4614     /// some equivalent local store). Setting this value is equivalent to
4615     /// specifying the "Cache-Control: only-if-cached" request header. Setting
4616     /// this value in combination with UR_FLAG_SKIP_CACHE or UR_FLAG_DISABLE_CACHE
4617     /// will cause the request to fail.
4618     ///
4619     UR_FLAG_ONLY_FROM_CACHE = 1 << 1,
4620 
4621     ///
4622     /// If set the cache will not be used at all. Setting this value is equivalent
4623     /// to specifying the "Cache-Control: no-store" request header. Setting this
4624     /// value in combination with UR_FLAG_ONLY_FROM_CACHE will cause the request
4625     /// to fail.
4626     ///
4627     UR_FLAG_DISABLE_CACHE = 1 << 2,
4628 
4629     ///
4630     /// If set user name, password, and cookies may be sent with the request, and
4631     /// cookies may be saved from the response.
4632     ///
4633     UR_FLAG_ALLOW_STORED_CREDENTIALS = 1 << 3,
4634 
4635     ///
4636     /// If set upload progress events will be generated when a request has a body.
4637     ///
4638     UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 4,
4639 
4640     ///
4641     /// If set the CefURLRequestClient::OnDownloadData method will not be called.
4642     ///
4643     UR_FLAG_NO_DOWNLOAD_DATA = 1 << 5,
4644 
4645     ///
4646     /// If set 5XX redirect errors will be propagated to the observer instead of
4647     /// automatically re-tried. This currently only applies for requests
4648     /// originated in the browser process.
4649     ///
4650     UR_FLAG_NO_RETRY_ON_5XX = 1 << 6,
4651 
4652     ///
4653     /// If set 3XX responses will cause the fetch to halt immediately rather than
4654     /// continue through the redirect.
4655     ///
4656     UR_FLAG_STOP_ON_REDIRECT = 1 << 7
4657 }
4658 
4659 alias UR_FLAG_NONE = cef_urlrequest_flags_t.UR_FLAG_NONE;
4660 alias UR_FLAG_SKIP_CACHE = cef_urlrequest_flags_t.UR_FLAG_SKIP_CACHE;
4661 alias UR_FLAG_ONLY_FROM_CACHE = cef_urlrequest_flags_t.UR_FLAG_ONLY_FROM_CACHE;
4662 alias UR_FLAG_DISABLE_CACHE = cef_urlrequest_flags_t.UR_FLAG_DISABLE_CACHE;
4663 alias UR_FLAG_ALLOW_STORED_CREDENTIALS = cef_urlrequest_flags_t.UR_FLAG_ALLOW_STORED_CREDENTIALS;
4664 alias UR_FLAG_REPORT_UPLOAD_PROGRESS = cef_urlrequest_flags_t.UR_FLAG_REPORT_UPLOAD_PROGRESS;
4665 alias UR_FLAG_NO_DOWNLOAD_DATA = cef_urlrequest_flags_t.UR_FLAG_NO_DOWNLOAD_DATA;
4666 alias UR_FLAG_NO_RETRY_ON_5XX = cef_urlrequest_flags_t.UR_FLAG_NO_RETRY_ON_5XX;
4667 alias UR_FLAG_STOP_ON_REDIRECT = cef_urlrequest_flags_t.UR_FLAG_STOP_ON_REDIRECT;
4668 
4669 ///
4670 /// Flags that represent CefURLRequest status.
4671 ///
4672 enum cef_urlrequest_status_t
4673 {
4674     ///
4675     /// Unknown status.
4676     ///
4677     UR_UNKNOWN = 0,
4678 
4679     ///
4680     /// Request succeeded.
4681     ///
4682     UR_SUCCESS = 1,
4683 
4684     ///
4685     /// An IO request is pending, and the caller will be informed when it is
4686     /// completed.
4687     ///
4688     UR_IO_PENDING = 2,
4689 
4690     ///
4691     /// Request was canceled programatically.
4692     ///
4693     UR_CANCELED = 3,
4694 
4695     ///
4696     /// Request failed for some reason.
4697     ///
4698     UR_FAILED = 4
4699 }
4700 
4701 alias UR_UNKNOWN = cef_urlrequest_status_t.UR_UNKNOWN;
4702 alias UR_SUCCESS = cef_urlrequest_status_t.UR_SUCCESS;
4703 alias UR_IO_PENDING = cef_urlrequest_status_t.UR_IO_PENDING;
4704 alias UR_CANCELED = cef_urlrequest_status_t.UR_CANCELED;
4705 alias UR_FAILED = cef_urlrequest_status_t.UR_FAILED;
4706 
4707 /// Structure representing a draggable region.
4708 ///
4709 struct cef_draggable_region_t
4710 {
4711     ///
4712     /// Bounds of the region.
4713     ///
4714 
4715     cef_rect_t bounds;
4716 
4717     ///
4718     /// True (1) this this region is draggable and false (0) otherwise.
4719     ///
4720     int draggable;
4721 }
4722 
4723 
4724 
4725 ///
4726 /// Existing process IDs.
4727 ///
4728 enum cef_process_id_t
4729 {
4730     ///
4731     /// Browser process.
4732     ///
4733     PID_BROWSER = 0,
4734     ///
4735     /// Renderer process.
4736     ///
4737     PID_RENDERER = 1
4738 }
4739 
4740 alias PID_BROWSER = cef_process_id_t.PID_BROWSER;
4741 alias PID_RENDERER = cef_process_id_t.PID_RENDERER;
4742 
4743 ///
4744 /// Existing thread IDs.
4745 ///
4746 enum cef_thread_id_t
4747 {
4748     // BROWSER PROCESS THREADS -- Only available in the browser process.
4749 
4750     ///
4751     /// The main thread in the browser. This will be the same as the main
4752     /// application thread if CefInitialize() is called with a
4753     /// CefSettings.multi_threaded_message_loop value of false. Do not perform
4754     /// blocking tasks on this thread. All tasks posted after
4755     /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
4756     /// are guaranteed to run. This thread will outlive all other CEF threads.
4757     ///
4758     TID_UI = 0,
4759 
4760     ///
4761     /// Used for blocking tasks like file system access where the user won't
4762     /// notice if the task takes an arbitrarily long time to complete. All tasks
4763     /// posted after CefBrowserProcessHandler::OnContextInitialized() and before
4764     /// CefShutdown() are guaranteed to run.
4765     ///
4766     TID_FILE_BACKGROUND = 1,
4767 
4768     ///
4769     /// Used for blocking tasks like file system access that affect UI or
4770     /// responsiveness of future user interactions. Do not use if an immediate
4771     /// response to a user interaction is expected. All tasks posted after
4772     /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
4773     /// are guaranteed to run.
4774     /// Examples:
4775     /// - Updating the UI to reflect progress on a long task.
4776     /// - Loading data that might be shown in the UI after a future user
4777     ///   interaction.
4778     ///
4779     TID_FILE_USER_VISIBLE = 2,
4780 
4781     ///
4782     /// Used for blocking tasks like file system access that affect UI
4783     /// immediately after a user interaction. All tasks posted after
4784     /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
4785     /// are guaranteed to run.
4786     /// Example: Generating data shown in the UI immediately after a click.
4787     ///
4788     TID_FILE_USER_BLOCKING = 3,
4789 
4790     ///
4791     /// Used to launch and terminate browser processes.
4792     ///
4793     TID_PROCESS_LAUNCHER = 4,
4794 
4795     ///
4796     /// Used to process IPC and network messages. Do not perform blocking tasks on
4797     /// this thread. All tasks posted after
4798     /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
4799     /// are guaranteed to run.
4800     ///
4801     TID_IO = 5,
4802 
4803     // RENDER PROCESS THREADS -- Only available in the render process.
4804 
4805     ///
4806     /// The main thread in the renderer. Used for all WebKit and V8 interaction.
4807     /// Tasks may be posted to this thread after
4808     /// CefRenderProcessHandler::OnWebKitInitialized but are not guaranteed to
4809     /// run before sub-process termination (sub-processes may be killed at any
4810     /// time without warning).
4811     ///
4812     TID_RENDERER = 6
4813 }
4814 
4815 alias TID_UI = cef_thread_id_t.TID_UI;
4816 alias TID_FILE_BACKGROUND = cef_thread_id_t.TID_FILE_BACKGROUND;
4817 alias TID_FILE_USER_VISIBLE = cef_thread_id_t.TID_FILE_USER_VISIBLE;
4818 alias TID_FILE_USER_BLOCKING = cef_thread_id_t.TID_FILE_USER_BLOCKING;
4819 alias TID_PROCESS_LAUNCHER = cef_thread_id_t.TID_PROCESS_LAUNCHER;
4820 alias TID_IO = cef_thread_id_t.TID_IO;
4821 alias TID_RENDERER = cef_thread_id_t.TID_RENDERER;
4822 
4823 ///
4824 /// Thread priority values listed in increasing order of importance.
4825 ///
4826 enum cef_thread_priority_t
4827 {
4828     ///
4829     /// Suitable for threads that shouldn't disrupt high priority work.
4830     ///
4831     TP_BACKGROUND = 0,
4832 
4833     ///
4834     /// Default priority level.
4835     ///
4836     TP_NORMAL = 1,
4837 
4838     ///
4839     /// Suitable for threads which generate data for the display (at ~60Hz).
4840     ///
4841     TP_DISPLAY = 2,
4842 
4843     ///
4844     /// Suitable for low-latency, glitch-resistant audio.
4845     ///
4846     TP_REALTIME_AUDIO = 3
4847 }
4848 
4849 alias TP_BACKGROUND = cef_thread_priority_t.TP_BACKGROUND;
4850 alias TP_NORMAL = cef_thread_priority_t.TP_NORMAL;
4851 alias TP_DISPLAY = cef_thread_priority_t.TP_DISPLAY;
4852 alias TP_REALTIME_AUDIO = cef_thread_priority_t.TP_REALTIME_AUDIO;
4853 
4854 ///
4855 /// Message loop types. Indicates the set of asynchronous events that a message
4856 /// loop can process.
4857 ///
4858 enum cef_message_loop_type_t
4859 {
4860     ///
4861     /// Supports tasks and timers.
4862     ///
4863     ML_TYPE_DEFAULT = 0,
4864 
4865     ///
4866     /// Supports tasks, timers and native UI events (e.g. Windows messages).
4867     ///
4868     ML_TYPE_UI = 1,
4869 
4870     ///
4871     /// Supports tasks, timers and asynchronous IO events.
4872     ///
4873     ML_TYPE_IO = 2
4874 }
4875 
4876 alias ML_TYPE_DEFAULT = cef_message_loop_type_t.ML_TYPE_DEFAULT;
4877 alias ML_TYPE_UI = cef_message_loop_type_t.ML_TYPE_UI;
4878 alias ML_TYPE_IO = cef_message_loop_type_t.ML_TYPE_IO;
4879 
4880 ///
4881 /// Windows COM initialization mode. Specifies how COM will be initialized for a
4882 /// new thread.
4883 ///
4884 enum cef_com_init_mode_t
4885 {
4886     ///
4887     /// No COM initialization.
4888     ///
4889     COM_INIT_MODE_NONE = 0,
4890 
4891     ///
4892     /// Initialize COM using single-threaded apartments.
4893     ///
4894     COM_INIT_MODE_STA = 1,
4895 
4896     ///
4897     /// Initialize COM using multi-threaded apartments.
4898     ///
4899     COM_INIT_MODE_MTA = 2
4900 }
4901 
4902 alias COM_INIT_MODE_NONE = cef_com_init_mode_t.COM_INIT_MODE_NONE;
4903 alias COM_INIT_MODE_STA = cef_com_init_mode_t.COM_INIT_MODE_STA;
4904 alias COM_INIT_MODE_MTA = cef_com_init_mode_t.COM_INIT_MODE_MTA;
4905 
4906 ///
4907 /// Supported value types.
4908 ///
4909 enum cef_value_type_t
4910 {
4911     VTYPE_INVALID = 0,
4912     VTYPE_NULL = 1,
4913     VTYPE_BOOL = 2,
4914     VTYPE_INT = 3,
4915     VTYPE_DOUBLE = 4,
4916     VTYPE_STRING = 5,
4917     VTYPE_BINARY = 6,
4918     VTYPE_DICTIONARY = 7,
4919     VTYPE_LIST = 8
4920 }
4921 
4922 alias VTYPE_INVALID = cef_value_type_t.VTYPE_INVALID;
4923 alias VTYPE_NULL = cef_value_type_t.VTYPE_NULL;
4924 alias VTYPE_BOOL = cef_value_type_t.VTYPE_BOOL;
4925 alias VTYPE_INT = cef_value_type_t.VTYPE_INT;
4926 alias VTYPE_DOUBLE = cef_value_type_t.VTYPE_DOUBLE;
4927 alias VTYPE_STRING = cef_value_type_t.VTYPE_STRING;
4928 alias VTYPE_BINARY = cef_value_type_t.VTYPE_BINARY;
4929 alias VTYPE_DICTIONARY = cef_value_type_t.VTYPE_DICTIONARY;
4930 alias VTYPE_LIST = cef_value_type_t.VTYPE_LIST;
4931 
4932 ///
4933 /// Supported JavaScript dialog types.
4934 ///
4935 enum cef_jsdialog_type_t
4936 {
4937     JSDIALOGTYPE_ALERT = 0,
4938     JSDIALOGTYPE_CONFIRM = 1,
4939     JSDIALOGTYPE_PROMPT = 2
4940 }
4941 
4942 alias JSDIALOGTYPE_ALERT = cef_jsdialog_type_t.JSDIALOGTYPE_ALERT;
4943 alias JSDIALOGTYPE_CONFIRM = cef_jsdialog_type_t.JSDIALOGTYPE_CONFIRM;
4944 alias JSDIALOGTYPE_PROMPT = cef_jsdialog_type_t.JSDIALOGTYPE_PROMPT;
4945 
4946 ///
4947 /// Screen information used when window rendering is disabled. This structure is
4948 /// passed as a parameter to CefRenderHandler::GetScreenInfo and should be
4949 /// filled in by the client.
4950 ///
4951 struct cef_screen_info_t
4952 {
4953     ///
4954     /// Device scale factor. Specifies the ratio between physical and logical
4955     /// pixels.
4956     ///
4957     float device_scale_factor;
4958 
4959     ///
4960     /// The screen depth in bits per pixel.
4961     ///
4962     int depth;
4963 
4964     ///
4965     /// The bits per color component. This assumes that the colors are balanced
4966     /// equally.
4967     ///
4968     int depth_per_component;
4969 
4970     ///
4971     /// This can be true for black and white printers.
4972     ///
4973     int is_monochrome;
4974 
4975     ///
4976     /// This is set from the rcMonitor member of MONITORINFOEX, to whit:
4977     ///   "A RECT structure that specifies the display monitor rectangle,
4978     ///   expressed in virtual-screen coordinates. Note that if the monitor
4979     ///   is not the primary display monitor, some of the rectangle's
4980     ///   coordinates may be negative values."
4981     //
4982     /// The |rect| and |available_rect| properties are used to determine the
4983     /// available surface for rendering popup views.
4984     ///
4985     cef_rect_t rect;
4986 
4987     ///
4988     /// This is set from the rcWork member of MONITORINFOEX, to whit:
4989     ///   "A RECT structure that specifies the work area rectangle of the
4990     ///   display monitor that can be used by applications, expressed in
4991     ///   virtual-screen coordinates. Windows uses this rectangle to
4992     ///   maximize an application on the monitor. The rest of the area in
4993     ///   rcMonitor contains system windows such as the task bar and side
4994     ///   bars. Note that if the monitor is not the primary display monitor,
4995     ///   some of the rectangle's coordinates may be negative values".
4996     //
4997     /// The |rect| and |available_rect| properties are used to determine the
4998     /// available surface for rendering popup views.
4999     ///
5000     cef_rect_t available_rect;
5001 }
5002 
5003 
5004 
5005 ///
5006 /// Supported menu IDs. Non-English translations can be provided for the
5007 /// IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString().
5008 ///
5009 enum cef_menu_id_t
5010 {
5011     // Navigation.
5012     MENU_ID_BACK = 100,
5013     MENU_ID_FORWARD = 101,
5014     MENU_ID_RELOAD = 102,
5015     MENU_ID_RELOAD_NOCACHE = 103,
5016     MENU_ID_STOPLOAD = 104,
5017 
5018     // Editing.
5019     MENU_ID_UNDO = 110,
5020     MENU_ID_REDO = 111,
5021     MENU_ID_CUT = 112,
5022     MENU_ID_COPY = 113,
5023     MENU_ID_PASTE = 114,
5024     MENU_ID_DELETE = 115,
5025     MENU_ID_SELECT_ALL = 116,
5026 
5027     // Miscellaneous.
5028     MENU_ID_FIND = 130,
5029     MENU_ID_PRINT = 131,
5030     MENU_ID_VIEW_SOURCE = 132,
5031 
5032     // Spell checking word correction suggestions.
5033     MENU_ID_SPELLCHECK_SUGGESTION_0 = 200,
5034     MENU_ID_SPELLCHECK_SUGGESTION_1 = 201,
5035     MENU_ID_SPELLCHECK_SUGGESTION_2 = 202,
5036     MENU_ID_SPELLCHECK_SUGGESTION_3 = 203,
5037     MENU_ID_SPELLCHECK_SUGGESTION_4 = 204,
5038     MENU_ID_SPELLCHECK_SUGGESTION_LAST = 204,
5039     MENU_ID_NO_SPELLING_SUGGESTIONS = 205,
5040     MENU_ID_ADD_TO_DICTIONARY = 206,
5041 
5042     // Custom menu items originating from the renderer process.
5043     MENU_ID_CUSTOM_FIRST = 220,
5044     MENU_ID_CUSTOM_LAST = 250,
5045 
5046     // All user-defined menu IDs should come between MENU_ID_USER_FIRST and
5047     // MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges
5048     // defined in the tools/gritsettings/resource_ids file.
5049     MENU_ID_USER_FIRST = 26500,
5050     MENU_ID_USER_LAST = 28500
5051 }
5052 
5053 alias MENU_ID_BACK = cef_menu_id_t.MENU_ID_BACK;
5054 alias MENU_ID_FORWARD = cef_menu_id_t.MENU_ID_FORWARD;
5055 alias MENU_ID_RELOAD = cef_menu_id_t.MENU_ID_RELOAD;
5056 alias MENU_ID_RELOAD_NOCACHE = cef_menu_id_t.MENU_ID_RELOAD_NOCACHE;
5057 alias MENU_ID_STOPLOAD = cef_menu_id_t.MENU_ID_STOPLOAD;
5058 alias MENU_ID_UNDO = cef_menu_id_t.MENU_ID_UNDO;
5059 alias MENU_ID_REDO = cef_menu_id_t.MENU_ID_REDO;
5060 alias MENU_ID_CUT = cef_menu_id_t.MENU_ID_CUT;
5061 alias MENU_ID_COPY = cef_menu_id_t.MENU_ID_COPY;
5062 alias MENU_ID_PASTE = cef_menu_id_t.MENU_ID_PASTE;
5063 alias MENU_ID_DELETE = cef_menu_id_t.MENU_ID_DELETE;
5064 alias MENU_ID_SELECT_ALL = cef_menu_id_t.MENU_ID_SELECT_ALL;
5065 alias MENU_ID_FIND = cef_menu_id_t.MENU_ID_FIND;
5066 alias MENU_ID_PRINT = cef_menu_id_t.MENU_ID_PRINT;
5067 alias MENU_ID_VIEW_SOURCE = cef_menu_id_t.MENU_ID_VIEW_SOURCE;
5068 alias MENU_ID_SPELLCHECK_SUGGESTION_0 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_0;
5069 alias MENU_ID_SPELLCHECK_SUGGESTION_1 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_1;
5070 alias MENU_ID_SPELLCHECK_SUGGESTION_2 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_2;
5071 alias MENU_ID_SPELLCHECK_SUGGESTION_3 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_3;
5072 alias MENU_ID_SPELLCHECK_SUGGESTION_4 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_4;
5073 alias MENU_ID_SPELLCHECK_SUGGESTION_LAST = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_LAST;
5074 alias MENU_ID_NO_SPELLING_SUGGESTIONS = cef_menu_id_t.MENU_ID_NO_SPELLING_SUGGESTIONS;
5075 alias MENU_ID_ADD_TO_DICTIONARY = cef_menu_id_t.MENU_ID_ADD_TO_DICTIONARY;
5076 alias MENU_ID_CUSTOM_FIRST = cef_menu_id_t.MENU_ID_CUSTOM_FIRST;
5077 alias MENU_ID_CUSTOM_LAST = cef_menu_id_t.MENU_ID_CUSTOM_LAST;
5078 alias MENU_ID_USER_FIRST = cef_menu_id_t.MENU_ID_USER_FIRST;
5079 alias MENU_ID_USER_LAST = cef_menu_id_t.MENU_ID_USER_LAST;
5080 
5081 ///
5082 /// Mouse button types.
5083 ///
5084 enum cef_mouse_button_type_t
5085 {
5086     MBT_LEFT = 0,
5087     MBT_MIDDLE = 1,
5088     MBT_RIGHT = 2
5089 }
5090 
5091 alias MBT_LEFT = cef_mouse_button_type_t.MBT_LEFT;
5092 alias MBT_MIDDLE = cef_mouse_button_type_t.MBT_MIDDLE;
5093 alias MBT_RIGHT = cef_mouse_button_type_t.MBT_RIGHT;
5094 
5095 ///
5096 /// Structure representing mouse event information.
5097 ///
5098 struct cef_mouse_event_t
5099 {
5100     ///
5101     /// X coordinate relative to the left side of the view.
5102     ///
5103     int x;
5104 
5105     ///
5106     /// Y coordinate relative to the top side of the view.
5107     ///
5108     int y;
5109 
5110     ///
5111     /// Bit flags describing any pressed modifier keys. See
5112     /// cef_event_flags_t for values.
5113     ///
5114     uint modifiers;
5115 }
5116 
5117 
5118 
5119 ///
5120 /// Touch points states types.
5121 ///
5122 enum cef_touch_event_type_t
5123 {
5124     CEF_TET_RELEASED = 0,
5125     CEF_TET_PRESSED = 1,
5126     CEF_TET_MOVED = 2,
5127     CEF_TET_CANCELLED = 3
5128 }
5129 
5130 alias CEF_TET_RELEASED = cef_touch_event_type_t.CEF_TET_RELEASED;
5131 alias CEF_TET_PRESSED = cef_touch_event_type_t.CEF_TET_PRESSED;
5132 alias CEF_TET_MOVED = cef_touch_event_type_t.CEF_TET_MOVED;
5133 alias CEF_TET_CANCELLED = cef_touch_event_type_t.CEF_TET_CANCELLED;
5134 
5135 ///
5136 /// The device type that caused the event.
5137 ///
5138 enum cef_pointer_type_t
5139 {
5140     CEF_POINTER_TYPE_TOUCH = 0,
5141     CEF_POINTER_TYPE_MOUSE = 1,
5142     CEF_POINTER_TYPE_PEN = 2,
5143     CEF_POINTER_TYPE_ERASER = 3,
5144     CEF_POINTER_TYPE_UNKNOWN = 4
5145 }
5146 
5147 alias CEF_POINTER_TYPE_TOUCH = cef_pointer_type_t.CEF_POINTER_TYPE_TOUCH;
5148 alias CEF_POINTER_TYPE_MOUSE = cef_pointer_type_t.CEF_POINTER_TYPE_MOUSE;
5149 alias CEF_POINTER_TYPE_PEN = cef_pointer_type_t.CEF_POINTER_TYPE_PEN;
5150 alias CEF_POINTER_TYPE_ERASER = cef_pointer_type_t.CEF_POINTER_TYPE_ERASER;
5151 alias CEF_POINTER_TYPE_UNKNOWN = cef_pointer_type_t.CEF_POINTER_TYPE_UNKNOWN;
5152 
5153 ///
5154 /// Structure representing touch event information.
5155 ///
5156 struct cef_touch_event_t
5157 {
5158     ///
5159     /// Id of a touch point. Must be unique per touch, can be any number except
5160     /// -1. Note that a maximum of 16 concurrent touches will be tracked; touches
5161     /// beyond that will be ignored.
5162     ///
5163     int id;
5164 
5165     ///
5166     /// X coordinate relative to the left side of the view.
5167     ///
5168     float x;
5169 
5170     ///
5171     /// Y coordinate relative to the top side of the view.
5172     ///
5173     float y;
5174 
5175     ///
5176     /// X radius in pixels. Set to 0 if not applicable.
5177     ///
5178     float radius_x;
5179 
5180     ///
5181     /// Y radius in pixels. Set to 0 if not applicable.
5182     ///
5183     float radius_y;
5184 
5185     ///
5186     /// Rotation angle in radians. Set to 0 if not applicable.
5187     ///
5188     float rotation_angle;
5189 
5190     ///
5191     /// The normalized pressure of the pointer input in the range of [0,1].
5192     /// Set to 0 if not applicable.
5193     ///
5194     float pressure;
5195 
5196     ///
5197     /// The state of the touch point. Touches begin with one CEF_TET_PRESSED event
5198     /// followed by zero or more CEF_TET_MOVED events and finally one
5199     /// CEF_TET_RELEASED or CEF_TET_CANCELLED event. Events not respecting this
5200     /// order will be ignored.
5201     ///
5202     cef_touch_event_type_t type;
5203 
5204     ///
5205     /// Bit flags describing any pressed modifier keys. See
5206     /// cef_event_flags_t for values.
5207     ///
5208     uint modifiers;
5209 
5210     ///
5211     /// The device type that caused the event.
5212     ///
5213     cef_pointer_type_t pointer_type;
5214 }
5215 
5216 
5217 
5218 ///
5219 /// Paint element types.
5220 ///
5221 enum cef_paint_element_type_t
5222 {
5223     PET_VIEW = 0,
5224     PET_POPUP = 1
5225 }
5226 
5227 alias PET_VIEW = cef_paint_element_type_t.PET_VIEW;
5228 alias PET_POPUP = cef_paint_element_type_t.PET_POPUP;
5229 
5230 ///
5231 /// Supported event bit flags.
5232 ///
5233 enum cef_event_flags_t
5234 {
5235     EVENTFLAG_NONE = 0,
5236     EVENTFLAG_CAPS_LOCK_ON = 1 << 0,
5237     EVENTFLAG_SHIFT_DOWN = 1 << 1,
5238     EVENTFLAG_CONTROL_DOWN = 1 << 2,
5239     EVENTFLAG_ALT_DOWN = 1 << 3,
5240     EVENTFLAG_LEFT_MOUSE_BUTTON = 1 << 4,
5241     EVENTFLAG_MIDDLE_MOUSE_BUTTON = 1 << 5,
5242     EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6,
5243     /// Mac OS-X command key.
5244     EVENTFLAG_COMMAND_DOWN = 1 << 7,
5245     EVENTFLAG_NUM_LOCK_ON = 1 << 8,
5246     EVENTFLAG_IS_KEY_PAD = 1 << 9,
5247     EVENTFLAG_IS_LEFT = 1 << 10,
5248     EVENTFLAG_IS_RIGHT = 1 << 11,
5249     EVENTFLAG_ALTGR_DOWN = 1 << 12,
5250     EVENTFLAG_IS_REPEAT = 1 << 13
5251 }
5252 
5253 alias EVENTFLAG_NONE = cef_event_flags_t.EVENTFLAG_NONE;
5254 alias EVENTFLAG_CAPS_LOCK_ON = cef_event_flags_t.EVENTFLAG_CAPS_LOCK_ON;
5255 alias EVENTFLAG_SHIFT_DOWN = cef_event_flags_t.EVENTFLAG_SHIFT_DOWN;
5256 alias EVENTFLAG_CONTROL_DOWN = cef_event_flags_t.EVENTFLAG_CONTROL_DOWN;
5257 alias EVENTFLAG_ALT_DOWN = cef_event_flags_t.EVENTFLAG_ALT_DOWN;
5258 alias EVENTFLAG_LEFT_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_LEFT_MOUSE_BUTTON;
5259 alias EVENTFLAG_MIDDLE_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_MIDDLE_MOUSE_BUTTON;
5260 alias EVENTFLAG_RIGHT_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_RIGHT_MOUSE_BUTTON;
5261 alias EVENTFLAG_COMMAND_DOWN = cef_event_flags_t.EVENTFLAG_COMMAND_DOWN;
5262 alias EVENTFLAG_NUM_LOCK_ON = cef_event_flags_t.EVENTFLAG_NUM_LOCK_ON;
5263 alias EVENTFLAG_IS_KEY_PAD = cef_event_flags_t.EVENTFLAG_IS_KEY_PAD;
5264 alias EVENTFLAG_IS_LEFT = cef_event_flags_t.EVENTFLAG_IS_LEFT;
5265 alias EVENTFLAG_IS_RIGHT = cef_event_flags_t.EVENTFLAG_IS_RIGHT;
5266 alias EVENTFLAG_ALTGR_DOWN = cef_event_flags_t.EVENTFLAG_ALTGR_DOWN;
5267 alias EVENTFLAG_IS_REPEAT = cef_event_flags_t.EVENTFLAG_IS_REPEAT;
5268 
5269 ///
5270 /// Supported menu item types.
5271 ///
5272 enum cef_menu_item_type_t
5273 {
5274     MENUITEMTYPE_NONE = 0,
5275     MENUITEMTYPE_COMMAND = 1,
5276     MENUITEMTYPE_CHECK = 2,
5277     MENUITEMTYPE_RADIO = 3,
5278     MENUITEMTYPE_SEPARATOR = 4,
5279     MENUITEMTYPE_SUBMENU = 5
5280 }
5281 
5282 alias MENUITEMTYPE_NONE = cef_menu_item_type_t.MENUITEMTYPE_NONE;
5283 alias MENUITEMTYPE_COMMAND = cef_menu_item_type_t.MENUITEMTYPE_COMMAND;
5284 alias MENUITEMTYPE_CHECK = cef_menu_item_type_t.MENUITEMTYPE_CHECK;
5285 alias MENUITEMTYPE_RADIO = cef_menu_item_type_t.MENUITEMTYPE_RADIO;
5286 alias MENUITEMTYPE_SEPARATOR = cef_menu_item_type_t.MENUITEMTYPE_SEPARATOR;
5287 alias MENUITEMTYPE_SUBMENU = cef_menu_item_type_t.MENUITEMTYPE_SUBMENU;
5288 
5289 ///
5290 /// Supported context menu type flags.
5291 ///
5292 enum cef_context_menu_type_flags_t
5293 {
5294     ///
5295     /// No node is selected.
5296     ///
5297     CM_TYPEFLAG_NONE = 0,
5298     ///
5299     /// The top page is selected.
5300     ///
5301     CM_TYPEFLAG_PAGE = 1 << 0,
5302     ///
5303     /// A subframe page is selected.
5304     ///
5305     CM_TYPEFLAG_FRAME = 1 << 1,
5306     ///
5307     /// A link is selected.
5308     ///
5309     CM_TYPEFLAG_LINK = 1 << 2,
5310     ///
5311     /// A media node is selected.
5312     ///
5313     CM_TYPEFLAG_MEDIA = 1 << 3,
5314     ///
5315     /// There is a textual or mixed selection that is selected.
5316     ///
5317     CM_TYPEFLAG_SELECTION = 1 << 4,
5318     ///
5319     /// An editable element is selected.
5320     ///
5321     CM_TYPEFLAG_EDITABLE = 1 << 5
5322 }
5323 
5324 alias CM_TYPEFLAG_NONE = cef_context_menu_type_flags_t.CM_TYPEFLAG_NONE;
5325 alias CM_TYPEFLAG_PAGE = cef_context_menu_type_flags_t.CM_TYPEFLAG_PAGE;
5326 alias CM_TYPEFLAG_FRAME = cef_context_menu_type_flags_t.CM_TYPEFLAG_FRAME;
5327 alias CM_TYPEFLAG_LINK = cef_context_menu_type_flags_t.CM_TYPEFLAG_LINK;
5328 alias CM_TYPEFLAG_MEDIA = cef_context_menu_type_flags_t.CM_TYPEFLAG_MEDIA;
5329 alias CM_TYPEFLAG_SELECTION = cef_context_menu_type_flags_t.CM_TYPEFLAG_SELECTION;
5330 alias CM_TYPEFLAG_EDITABLE = cef_context_menu_type_flags_t.CM_TYPEFLAG_EDITABLE;
5331 
5332 ///
5333 /// Supported context menu media types. These constants match their equivalents
5334 /// in Chromium's ContextMenuDataMediaType and should not be renumbered.
5335 ///
5336 enum cef_context_menu_media_type_t
5337 {
5338     ///
5339     /// No special node is in context.
5340     ///
5341     CM_MEDIATYPE_NONE = 0,
5342     ///
5343     /// An image node is selected.
5344     ///
5345     CM_MEDIATYPE_IMAGE = 1,
5346     ///
5347     /// A video node is selected.
5348     ///
5349     CM_MEDIATYPE_VIDEO = 2,
5350     ///
5351     /// An audio node is selected.
5352     ///
5353     CM_MEDIATYPE_AUDIO = 3,
5354     ///
5355     /// An canvas node is selected.
5356     ///
5357     CM_MEDIATYPE_CANVAS = 4,
5358     ///
5359     /// A file node is selected.
5360     ///
5361     CM_MEDIATYPE_FILE = 5,
5362     ///
5363     /// A plugin node is selected.
5364     ///
5365     CM_MEDIATYPE_PLUGIN = 6
5366 }
5367 
5368 alias CM_MEDIATYPE_NONE = cef_context_menu_media_type_t.CM_MEDIATYPE_NONE;
5369 alias CM_MEDIATYPE_IMAGE = cef_context_menu_media_type_t.CM_MEDIATYPE_IMAGE;
5370 alias CM_MEDIATYPE_VIDEO = cef_context_menu_media_type_t.CM_MEDIATYPE_VIDEO;
5371 alias CM_MEDIATYPE_AUDIO = cef_context_menu_media_type_t.CM_MEDIATYPE_AUDIO;
5372 alias CM_MEDIATYPE_CANVAS = cef_context_menu_media_type_t.CM_MEDIATYPE_CANVAS;
5373 alias CM_MEDIATYPE_FILE = cef_context_menu_media_type_t.CM_MEDIATYPE_FILE;
5374 alias CM_MEDIATYPE_PLUGIN = cef_context_menu_media_type_t.CM_MEDIATYPE_PLUGIN;
5375 
5376 ///
5377 /// Supported context menu media state bit flags. These constants match their
5378 /// equivalents in Chromium's ContextMenuData::MediaFlags and should not be
5379 /// renumbered.
5380 ///
5381 enum cef_context_menu_media_state_flags_t
5382 {
5383     CM_MEDIAFLAG_NONE = 0,
5384     CM_MEDIAFLAG_IN_ERROR = 1 << 0,
5385     CM_MEDIAFLAG_PAUSED = 1 << 1,
5386     CM_MEDIAFLAG_MUTED = 1 << 2,
5387     CM_MEDIAFLAG_LOOP = 1 << 3,
5388     CM_MEDIAFLAG_CAN_SAVE = 1 << 4,
5389     CM_MEDIAFLAG_HAS_AUDIO = 1 << 5,
5390     CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS = 1 << 6,
5391     CM_MEDIAFLAG_CONTROLS = 1 << 7,
5392     CM_MEDIAFLAG_CAN_PRINT = 1 << 8,
5393     CM_MEDIAFLAG_CAN_ROTATE = 1 << 9,
5394     CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE = 1 << 10,
5395     CM_MEDIAFLAG_PICTURE_IN_PICTURE = 1 << 11,
5396     CM_MEDIAFLAG_CAN_LOOP = 1 << 12
5397 }
5398 
5399 alias CM_MEDIAFLAG_NONE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_NONE;
5400 alias CM_MEDIAFLAG_IN_ERROR = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_IN_ERROR;
5401 alias CM_MEDIAFLAG_PAUSED = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_PAUSED;
5402 alias CM_MEDIAFLAG_MUTED = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_MUTED;
5403 alias CM_MEDIAFLAG_LOOP = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_LOOP;
5404 alias CM_MEDIAFLAG_CAN_SAVE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_SAVE;
5405 alias CM_MEDIAFLAG_HAS_AUDIO = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_HAS_AUDIO;
5406 alias CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS;
5407 alias CM_MEDIAFLAG_CONTROLS = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CONTROLS;
5408 alias CM_MEDIAFLAG_CAN_PRINT = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_PRINT;
5409 alias CM_MEDIAFLAG_CAN_ROTATE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_ROTATE;
5410 alias CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE;
5411 alias CM_MEDIAFLAG_PICTURE_IN_PICTURE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_PICTURE_IN_PICTURE;
5412 alias CM_MEDIAFLAG_CAN_LOOP = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_LOOP;
5413 
5414 ///
5415 /// Supported context menu edit state bit flags. These constants match their
5416 /// equivalents in Chromium's ContextMenuDataEditFlags and should not be
5417 /// renumbered.
5418 ///
5419 enum cef_context_menu_edit_state_flags_t
5420 {
5421     CM_EDITFLAG_NONE = 0,
5422     CM_EDITFLAG_CAN_UNDO = 1 << 0,
5423     CM_EDITFLAG_CAN_REDO = 1 << 1,
5424     CM_EDITFLAG_CAN_CUT = 1 << 2,
5425     CM_EDITFLAG_CAN_COPY = 1 << 3,
5426     CM_EDITFLAG_CAN_PASTE = 1 << 4,
5427     CM_EDITFLAG_CAN_DELETE = 1 << 5,
5428     CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6,
5429     CM_EDITFLAG_CAN_TRANSLATE = 1 << 7,
5430     CM_EDITFLAG_CAN_EDIT_RICHLY = 1 << 8
5431 }
5432 
5433 alias CM_EDITFLAG_NONE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_NONE;
5434 alias CM_EDITFLAG_CAN_UNDO = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_UNDO;
5435 alias CM_EDITFLAG_CAN_REDO = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_REDO;
5436 alias CM_EDITFLAG_CAN_CUT = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_CUT;
5437 alias CM_EDITFLAG_CAN_COPY = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_COPY;
5438 alias CM_EDITFLAG_CAN_PASTE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_PASTE;
5439 alias CM_EDITFLAG_CAN_DELETE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_DELETE;
5440 alias CM_EDITFLAG_CAN_SELECT_ALL = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_SELECT_ALL;
5441 alias CM_EDITFLAG_CAN_TRANSLATE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_TRANSLATE;
5442 alias CM_EDITFLAG_CAN_EDIT_RICHLY = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_EDIT_RICHLY;
5443 
5444 ///
5445 /// Supported quick menu state bit flags.
5446 ///
5447 enum cef_quick_menu_edit_state_flags_t
5448 {
5449     QM_EDITFLAG_NONE = 0,
5450     QM_EDITFLAG_CAN_ELLIPSIS = 1 << 0,
5451     QM_EDITFLAG_CAN_CUT = 1 << 1,
5452     QM_EDITFLAG_CAN_COPY = 1 << 2,
5453     QM_EDITFLAG_CAN_PASTE = 1 << 3
5454 }
5455 
5456 alias QM_EDITFLAG_NONE = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_NONE;
5457 alias QM_EDITFLAG_CAN_ELLIPSIS = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_ELLIPSIS;
5458 alias QM_EDITFLAG_CAN_CUT = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_CUT;
5459 alias QM_EDITFLAG_CAN_COPY = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_COPY;
5460 alias QM_EDITFLAG_CAN_PASTE = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_PASTE;
5461 
5462 ///
5463 /// Key event types.
5464 ///
5465 enum cef_key_event_type_t
5466 {
5467     ///
5468     /// Notification that a key transitioned from "up" to "down".
5469     ///
5470     KEYEVENT_RAWKEYDOWN = 0,
5471 
5472     ///
5473     /// Notification that a key was pressed. This does not necessarily correspond
5474     /// to a character depending on the key and language. Use KEYEVENT_CHAR for
5475     /// character input.
5476     ///
5477     KEYEVENT_KEYDOWN = 1,
5478 
5479     ///
5480     /// Notification that a key was released.
5481     ///
5482     KEYEVENT_KEYUP = 2,
5483 
5484     ///
5485     /// Notification that a character was typed. Use this for text input. Key
5486     /// down events may generate 0, 1, or more than one character event depending
5487     /// on the key, locale, and operating system.
5488     ///
5489     KEYEVENT_CHAR = 3
5490 }
5491 
5492 alias KEYEVENT_RAWKEYDOWN = cef_key_event_type_t.KEYEVENT_RAWKEYDOWN;
5493 alias KEYEVENT_KEYDOWN = cef_key_event_type_t.KEYEVENT_KEYDOWN;
5494 alias KEYEVENT_KEYUP = cef_key_event_type_t.KEYEVENT_KEYUP;
5495 alias KEYEVENT_CHAR = cef_key_event_type_t.KEYEVENT_CHAR;
5496 
5497 ///
5498 /// Structure representing keyboard event information.
5499 ///
5500 struct cef_key_event_t
5501 {
5502     ///
5503     /// The type of keyboard event.
5504     ///
5505     cef_key_event_type_t type;
5506 
5507     ///
5508     /// Bit flags describing any pressed modifier keys. See
5509     /// cef_event_flags_t for values.
5510     ///
5511     uint modifiers;
5512 
5513     ///
5514     /// The Windows key code for the key event. This value is used by the DOM
5515     /// specification. Sometimes it comes directly from the event (i.e. on
5516     /// Windows) and sometimes it's determined using a mapping function. See
5517     /// WebCore/platform/chromium/KeyboardCodes.h for the list of values.
5518     ///
5519     int windows_key_code;
5520 
5521     ///
5522     /// The actual key code genenerated by the platform.
5523     ///
5524     int native_key_code;
5525 
5526     ///
5527     /// Indicates whether the event is considered a "system key" event (see
5528     /// http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details).
5529     /// This value will always be false on non-Windows platforms.
5530     ///
5531     int is_system_key;
5532 
5533     ///
5534     /// The character generated by the keystroke.
5535     ///
5536     alias char16_t = ushort;
5537     char16_t character;
5538 
5539     ///
5540     /// Same as |character| but unmodified by any concurrently-held modifiers
5541     /// (except shift). This is useful for working out shortcut keys.
5542     ///
5543     char16_t unmodified_character;
5544 
5545     ///
5546     /// True if the focus is currently on an editable field on the page. This is
5547     /// useful for determining if standard key events should be intercepted.
5548     ///
5549     int focus_on_editable_field;
5550 }
5551 
5552 
5553 
5554 ///
5555 /// Focus sources.
5556 ///
5557 enum cef_focus_source_t
5558 {
5559     ///
5560     /// The source is explicit navigation via the API (LoadURL(), etc).
5561     ///
5562     FOCUS_SOURCE_NAVIGATION = 0,
5563     ///
5564     /// The source is a system-generated focus event.
5565     ///
5566     FOCUS_SOURCE_SYSTEM = 1
5567 }
5568 
5569 alias FOCUS_SOURCE_NAVIGATION = cef_focus_source_t.FOCUS_SOURCE_NAVIGATION;
5570 alias FOCUS_SOURCE_SYSTEM = cef_focus_source_t.FOCUS_SOURCE_SYSTEM;
5571 
5572 ///
5573 /// Navigation types.
5574 ///
5575 enum cef_navigation_type_t
5576 {
5577     NAVIGATION_LINK_CLICKED = 0,
5578     NAVIGATION_FORM_SUBMITTED = 1,
5579     NAVIGATION_BACK_FORWARD = 2,
5580     NAVIGATION_RELOAD = 3,
5581     NAVIGATION_FORM_RESUBMITTED = 4,
5582     NAVIGATION_OTHER = 5
5583 }
5584 
5585 alias NAVIGATION_LINK_CLICKED = cef_navigation_type_t.NAVIGATION_LINK_CLICKED;
5586 alias NAVIGATION_FORM_SUBMITTED = cef_navigation_type_t.NAVIGATION_FORM_SUBMITTED;
5587 alias NAVIGATION_BACK_FORWARD = cef_navigation_type_t.NAVIGATION_BACK_FORWARD;
5588 alias NAVIGATION_RELOAD = cef_navigation_type_t.NAVIGATION_RELOAD;
5589 alias NAVIGATION_FORM_RESUBMITTED = cef_navigation_type_t.NAVIGATION_FORM_RESUBMITTED;
5590 alias NAVIGATION_OTHER = cef_navigation_type_t.NAVIGATION_OTHER;
5591 
5592 ///
5593 /// Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and
5594 /// UTF16 (LE and BE) by default. All other types must be translated to UTF8
5595 /// before being passed to the parser. If a BOM is detected and the correct
5596 /// decoder is available then that decoder will be used automatically.
5597 ///
5598 enum cef_xml_encoding_type_t
5599 {
5600     XML_ENCODING_NONE = 0,
5601     XML_ENCODING_UTF8 = 1,
5602     XML_ENCODING_UTF16LE = 2,
5603     XML_ENCODING_UTF16BE = 3,
5604     XML_ENCODING_ASCII = 4
5605 }
5606 
5607 alias XML_ENCODING_NONE = cef_xml_encoding_type_t.XML_ENCODING_NONE;
5608 alias XML_ENCODING_UTF8 = cef_xml_encoding_type_t.XML_ENCODING_UTF8;
5609 alias XML_ENCODING_UTF16LE = cef_xml_encoding_type_t.XML_ENCODING_UTF16LE;
5610 alias XML_ENCODING_UTF16BE = cef_xml_encoding_type_t.XML_ENCODING_UTF16BE;
5611 alias XML_ENCODING_ASCII = cef_xml_encoding_type_t.XML_ENCODING_ASCII;
5612 
5613 ///
5614 /// XML node types.
5615 ///
5616 enum cef_xml_node_type_t
5617 {
5618     XML_NODE_UNSUPPORTED = 0,
5619     XML_NODE_PROCESSING_INSTRUCTION = 1,
5620     XML_NODE_DOCUMENT_TYPE = 2,
5621     XML_NODE_ELEMENT_START = 3,
5622     XML_NODE_ELEMENT_END = 4,
5623     XML_NODE_ATTRIBUTE = 5,
5624     XML_NODE_TEXT = 6,
5625     XML_NODE_CDATA = 7,
5626     XML_NODE_ENTITY_REFERENCE = 8,
5627     XML_NODE_WHITESPACE = 9,
5628     XML_NODE_COMMENT = 10
5629 }
5630 
5631 alias XML_NODE_UNSUPPORTED = cef_xml_node_type_t.XML_NODE_UNSUPPORTED;
5632 alias XML_NODE_PROCESSING_INSTRUCTION = cef_xml_node_type_t.XML_NODE_PROCESSING_INSTRUCTION;
5633 alias XML_NODE_DOCUMENT_TYPE = cef_xml_node_type_t.XML_NODE_DOCUMENT_TYPE;
5634 alias XML_NODE_ELEMENT_START = cef_xml_node_type_t.XML_NODE_ELEMENT_START;
5635 alias XML_NODE_ELEMENT_END = cef_xml_node_type_t.XML_NODE_ELEMENT_END;
5636 alias XML_NODE_ATTRIBUTE = cef_xml_node_type_t.XML_NODE_ATTRIBUTE;
5637 alias XML_NODE_TEXT = cef_xml_node_type_t.XML_NODE_TEXT;
5638 alias XML_NODE_CDATA = cef_xml_node_type_t.XML_NODE_CDATA;
5639 alias XML_NODE_ENTITY_REFERENCE = cef_xml_node_type_t.XML_NODE_ENTITY_REFERENCE;
5640 alias XML_NODE_WHITESPACE = cef_xml_node_type_t.XML_NODE_WHITESPACE;
5641 alias XML_NODE_COMMENT = cef_xml_node_type_t.XML_NODE_COMMENT;
5642 
5643 ///
5644 /// Popup window features.
5645 ///
5646 struct cef_popup_features_t
5647 {
5648     int x;
5649     int xSet;
5650     int y;
5651     int ySet;
5652     int width;
5653     int widthSet;
5654     int height;
5655     int heightSet;
5656 
5657     /// True (1) if browser interface elements should be hidden.
5658     int isPopup;
5659 }
5660 
5661 
5662 
5663 ///
5664 /// DOM document types.
5665 ///
5666 enum cef_dom_document_type_t
5667 {
5668     DOM_DOCUMENT_TYPE_UNKNOWN = 0,
5669     DOM_DOCUMENT_TYPE_HTML = 1,
5670     DOM_DOCUMENT_TYPE_XHTML = 2,
5671     DOM_DOCUMENT_TYPE_PLUGIN = 3
5672 }
5673 
5674 alias DOM_DOCUMENT_TYPE_UNKNOWN = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_UNKNOWN;
5675 alias DOM_DOCUMENT_TYPE_HTML = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_HTML;
5676 alias DOM_DOCUMENT_TYPE_XHTML = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_XHTML;
5677 alias DOM_DOCUMENT_TYPE_PLUGIN = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_PLUGIN;
5678 
5679 ///
5680 /// DOM event category flags.
5681 ///
5682 enum cef_dom_event_category_t
5683 {
5684     DOM_EVENT_CATEGORY_UNKNOWN = 0x0,
5685     DOM_EVENT_CATEGORY_UI = 0x1,
5686     DOM_EVENT_CATEGORY_MOUSE = 0x2,
5687     DOM_EVENT_CATEGORY_MUTATION = 0x4,
5688     DOM_EVENT_CATEGORY_KEYBOARD = 0x8,
5689     DOM_EVENT_CATEGORY_TEXT = 0x10,
5690     DOM_EVENT_CATEGORY_COMPOSITION = 0x20,
5691     DOM_EVENT_CATEGORY_DRAG = 0x40,
5692     DOM_EVENT_CATEGORY_CLIPBOARD = 0x80,
5693     DOM_EVENT_CATEGORY_MESSAGE = 0x100,
5694     DOM_EVENT_CATEGORY_WHEEL = 0x200,
5695     DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = 0x400,
5696     DOM_EVENT_CATEGORY_OVERFLOW = 0x800,
5697     DOM_EVENT_CATEGORY_PAGE_TRANSITION = 0x1000,
5698     DOM_EVENT_CATEGORY_POPSTATE = 0x2000,
5699     DOM_EVENT_CATEGORY_PROGRESS = 0x4000,
5700     DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000
5701 }
5702 
5703 alias DOM_EVENT_CATEGORY_UNKNOWN = cef_dom_event_category_t.DOM_EVENT_CATEGORY_UNKNOWN;
5704 alias DOM_EVENT_CATEGORY_UI = cef_dom_event_category_t.DOM_EVENT_CATEGORY_UI;
5705 alias DOM_EVENT_CATEGORY_MOUSE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MOUSE;
5706 alias DOM_EVENT_CATEGORY_MUTATION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MUTATION;
5707 alias DOM_EVENT_CATEGORY_KEYBOARD = cef_dom_event_category_t.DOM_EVENT_CATEGORY_KEYBOARD;
5708 alias DOM_EVENT_CATEGORY_TEXT = cef_dom_event_category_t.DOM_EVENT_CATEGORY_TEXT;
5709 alias DOM_EVENT_CATEGORY_COMPOSITION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_COMPOSITION;
5710 alias DOM_EVENT_CATEGORY_DRAG = cef_dom_event_category_t.DOM_EVENT_CATEGORY_DRAG;
5711 alias DOM_EVENT_CATEGORY_CLIPBOARD = cef_dom_event_category_t.DOM_EVENT_CATEGORY_CLIPBOARD;
5712 alias DOM_EVENT_CATEGORY_MESSAGE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MESSAGE;
5713 alias DOM_EVENT_CATEGORY_WHEEL = cef_dom_event_category_t.DOM_EVENT_CATEGORY_WHEEL;
5714 alias DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = cef_dom_event_category_t.DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED;
5715 alias DOM_EVENT_CATEGORY_OVERFLOW = cef_dom_event_category_t.DOM_EVENT_CATEGORY_OVERFLOW;
5716 alias DOM_EVENT_CATEGORY_PAGE_TRANSITION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_PAGE_TRANSITION;
5717 alias DOM_EVENT_CATEGORY_POPSTATE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_POPSTATE;
5718 alias DOM_EVENT_CATEGORY_PROGRESS = cef_dom_event_category_t.DOM_EVENT_CATEGORY_PROGRESS;
5719 alias DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = cef_dom_event_category_t.DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS;
5720 
5721 ///
5722 /// DOM event processing phases.
5723 ///
5724 enum cef_dom_event_phase_t
5725 {
5726     DOM_EVENT_PHASE_UNKNOWN = 0,
5727     DOM_EVENT_PHASE_CAPTURING = 1,
5728     DOM_EVENT_PHASE_AT_TARGET = 2,
5729     DOM_EVENT_PHASE_BUBBLING = 3
5730 }
5731 
5732 alias DOM_EVENT_PHASE_UNKNOWN = cef_dom_event_phase_t.DOM_EVENT_PHASE_UNKNOWN;
5733 alias DOM_EVENT_PHASE_CAPTURING = cef_dom_event_phase_t.DOM_EVENT_PHASE_CAPTURING;
5734 alias DOM_EVENT_PHASE_AT_TARGET = cef_dom_event_phase_t.DOM_EVENT_PHASE_AT_TARGET;
5735 alias DOM_EVENT_PHASE_BUBBLING = cef_dom_event_phase_t.DOM_EVENT_PHASE_BUBBLING;
5736 
5737 ///
5738 /// DOM node types.
5739 ///
5740 enum cef_dom_node_type_t
5741 {
5742     DOM_NODE_TYPE_UNSUPPORTED = 0,
5743     DOM_NODE_TYPE_ELEMENT = 1,
5744     DOM_NODE_TYPE_ATTRIBUTE = 2,
5745     DOM_NODE_TYPE_TEXT = 3,
5746     DOM_NODE_TYPE_CDATA_SECTION = 4,
5747     DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS = 5,
5748     DOM_NODE_TYPE_COMMENT = 6,
5749     DOM_NODE_TYPE_DOCUMENT = 7,
5750     DOM_NODE_TYPE_DOCUMENT_TYPE = 8,
5751     DOM_NODE_TYPE_DOCUMENT_FRAGMENT = 9
5752 }
5753 
5754 alias DOM_NODE_TYPE_UNSUPPORTED = cef_dom_node_type_t.DOM_NODE_TYPE_UNSUPPORTED;
5755 alias DOM_NODE_TYPE_ELEMENT = cef_dom_node_type_t.DOM_NODE_TYPE_ELEMENT;
5756 alias DOM_NODE_TYPE_ATTRIBUTE = cef_dom_node_type_t.DOM_NODE_TYPE_ATTRIBUTE;
5757 alias DOM_NODE_TYPE_TEXT = cef_dom_node_type_t.DOM_NODE_TYPE_TEXT;
5758 alias DOM_NODE_TYPE_CDATA_SECTION = cef_dom_node_type_t.DOM_NODE_TYPE_CDATA_SECTION;
5759 alias DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS = cef_dom_node_type_t.DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS;
5760 alias DOM_NODE_TYPE_COMMENT = cef_dom_node_type_t.DOM_NODE_TYPE_COMMENT;
5761 alias DOM_NODE_TYPE_DOCUMENT = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT;
5762 alias DOM_NODE_TYPE_DOCUMENT_TYPE = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT_TYPE;
5763 alias DOM_NODE_TYPE_DOCUMENT_FRAGMENT = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT_FRAGMENT;
5764 
5765 ///
5766 /// DOM form control types. Should be kept in sync with Chromium's
5767 /// blink::mojom::FormControlType type.
5768 ///
5769 enum cef_dom_form_control_type_t
5770 {
5771     DOM_FORM_CONTROL_TYPE_UNSUPPORTED = 0,
5772     DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON = 1,
5773     DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT = 2,
5774     DOM_FORM_CONTROL_TYPE_BUTTON_RESET = 3,
5775     DOM_FORM_CONTROL_TYPE_BUTTON_SELECT_LIST = 4,
5776     DOM_FORM_CONTROL_TYPE_BUTTON_POPOVER = 5,
5777     DOM_FORM_CONTROL_TYPE_FIELDSET = 6,
5778     DOM_FORM_CONTROL_TYPE_INPUT_BUTTON = 7,
5779     DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX = 8,
5780     DOM_FORM_CONTROL_TYPE_INPUT_COLOR = 9,
5781     DOM_FORM_CONTROL_TYPE_INPUT_DATE = 10,
5782     DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL = 11,
5783     DOM_FORM_CONTROL_TYPE_INPUT_EMAIL = 12,
5784     DOM_FORM_CONTROL_TYPE_INPUT_FILE = 13,
5785     DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN = 14,
5786     DOM_FORM_CONTROL_TYPE_INPUT_IMAGE = 15,
5787     DOM_FORM_CONTROL_TYPE_INPUT_MONTH = 16,
5788     DOM_FORM_CONTROL_TYPE_INPUT_NUMBER = 17,
5789     DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD = 18,
5790     DOM_FORM_CONTROL_TYPE_INPUT_RADIO = 19,
5791     DOM_FORM_CONTROL_TYPE_INPUT_RANGE = 20,
5792     DOM_FORM_CONTROL_TYPE_INPUT_RESET = 21,
5793     DOM_FORM_CONTROL_TYPE_INPUT_SEARCH = 22,
5794     DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT = 23,
5795     DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE = 24,
5796     DOM_FORM_CONTROL_TYPE_INPUT_TEXT = 25,
5797     DOM_FORM_CONTROL_TYPE_INPUT_TIME = 26,
5798     DOM_FORM_CONTROL_TYPE_INPUT_URL = 27,
5799     DOM_FORM_CONTROL_TYPE_INPUT_WEEK = 28,
5800     DOM_FORM_CONTROL_TYPE_OUTPUT = 29,
5801     DOM_FORM_CONTROL_TYPE_SELECT_ONE = 30,
5802     DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE = 31,
5803     DOM_FORM_CONTROL_TYPE_SELECT_LIST = 32,
5804     DOM_FORM_CONTROL_TYPE_TEXT_AREA = 33
5805 }
5806 
5807 alias DOM_FORM_CONTROL_TYPE_UNSUPPORTED = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_UNSUPPORTED;
5808 alias DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON;
5809 alias DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT;
5810 alias DOM_FORM_CONTROL_TYPE_BUTTON_RESET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_RESET;
5811 alias DOM_FORM_CONTROL_TYPE_BUTTON_SELECT_LIST = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_SELECT_LIST;
5812 alias DOM_FORM_CONTROL_TYPE_BUTTON_POPOVER = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_POPOVER;
5813 alias DOM_FORM_CONTROL_TYPE_FIELDSET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_FIELDSET;
5814 alias DOM_FORM_CONTROL_TYPE_INPUT_BUTTON = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_BUTTON;
5815 alias DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX;
5816 alias DOM_FORM_CONTROL_TYPE_INPUT_COLOR = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_COLOR;
5817 alias DOM_FORM_CONTROL_TYPE_INPUT_DATE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_DATE;
5818 alias DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL;
5819 alias DOM_FORM_CONTROL_TYPE_INPUT_EMAIL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_EMAIL;
5820 alias DOM_FORM_CONTROL_TYPE_INPUT_FILE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_FILE;
5821 alias DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN;
5822 alias DOM_FORM_CONTROL_TYPE_INPUT_IMAGE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_IMAGE;
5823 alias DOM_FORM_CONTROL_TYPE_INPUT_MONTH = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_MONTH;
5824 alias DOM_FORM_CONTROL_TYPE_INPUT_NUMBER = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_NUMBER;
5825 alias DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD;
5826 alias DOM_FORM_CONTROL_TYPE_INPUT_RADIO = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RADIO;
5827 alias DOM_FORM_CONTROL_TYPE_INPUT_RANGE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RANGE;
5828 alias DOM_FORM_CONTROL_TYPE_INPUT_RESET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RESET;
5829 alias DOM_FORM_CONTROL_TYPE_INPUT_SEARCH = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_SEARCH;
5830 alias DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT;
5831 alias DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE;
5832 alias DOM_FORM_CONTROL_TYPE_INPUT_TEXT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TEXT;
5833 alias DOM_FORM_CONTROL_TYPE_INPUT_TIME = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TIME;
5834 alias DOM_FORM_CONTROL_TYPE_INPUT_URL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_URL;
5835 alias DOM_FORM_CONTROL_TYPE_INPUT_WEEK = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_WEEK;
5836 alias DOM_FORM_CONTROL_TYPE_OUTPUT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_OUTPUT;
5837 alias DOM_FORM_CONTROL_TYPE_SELECT_ONE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_SELECT_ONE;
5838 alias DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE;
5839 alias DOM_FORM_CONTROL_TYPE_SELECT_LIST = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_SELECT_LIST;
5840 alias DOM_FORM_CONTROL_TYPE_TEXT_AREA = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_TEXT_AREA;
5841 
5842 ///
5843 /// Supported file dialog modes.
5844 ///
5845 enum cef_file_dialog_mode_t
5846 {
5847     ///
5848     /// Requires that the file exists before allowing the user to pick it.
5849     ///
5850     FILE_DIALOG_OPEN = 0,
5851 
5852     ///
5853     /// Like Open, but allows picking multiple files to open.
5854     ///
5855     FILE_DIALOG_OPEN_MULTIPLE = 1,
5856 
5857     ///
5858     /// Like Open, but selects a folder to open.
5859     ///
5860     FILE_DIALOG_OPEN_FOLDER = 2,
5861 
5862     ///
5863     /// Allows picking a nonexistent file, and prompts to overwrite if the file
5864     /// already exists.
5865     ///
5866     FILE_DIALOG_SAVE = 3
5867 }
5868 
5869 alias FILE_DIALOG_OPEN = cef_file_dialog_mode_t.FILE_DIALOG_OPEN;
5870 alias FILE_DIALOG_OPEN_MULTIPLE = cef_file_dialog_mode_t.FILE_DIALOG_OPEN_MULTIPLE;
5871 alias FILE_DIALOG_OPEN_FOLDER = cef_file_dialog_mode_t.FILE_DIALOG_OPEN_FOLDER;
5872 alias FILE_DIALOG_SAVE = cef_file_dialog_mode_t.FILE_DIALOG_SAVE;
5873 
5874 ///
5875 /// Print job color mode values.
5876 ///
5877 enum cef_color_model_t
5878 {
5879     COLOR_MODEL_UNKNOWN = 0,
5880     COLOR_MODEL_GRAY = 1,
5881     COLOR_MODEL_COLOR = 2,
5882     COLOR_MODEL_CMYK = 3,
5883     COLOR_MODEL_CMY = 4,
5884     COLOR_MODEL_KCMY = 5,
5885     COLOR_MODEL_CMY_K = 6, // CMY_K represents CMY+K.
5886     COLOR_MODEL_BLACK = 7,
5887     COLOR_MODEL_GRAYSCALE = 8,
5888     COLOR_MODEL_RGB = 9,
5889     COLOR_MODEL_RGB16 = 10,
5890     COLOR_MODEL_RGBA = 11,
5891     COLOR_MODEL_COLORMODE_COLOR = 12, // Used in samsung printer ppds.
5892     COLOR_MODEL_COLORMODE_MONOCHROME = 13, // Used in samsung printer ppds.
5893     COLOR_MODEL_HP_COLOR_COLOR = 14, // Used in HP color printer ppds.
5894     COLOR_MODEL_HP_COLOR_BLACK = 15, // Used in HP color printer ppds.
5895     COLOR_MODEL_PRINTOUTMODE_NORMAL = 16, // Used in foomatic ppds.
5896     COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY = 17, // Used in foomatic ppds.
5897     COLOR_MODEL_PROCESSCOLORMODEL_CMYK = 18, // Used in canon printer ppds.
5898     COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE = 19, // Used in canon printer ppds.
5899     COLOR_MODEL_PROCESSCOLORMODEL_RGB = 20 // Used in canon printer ppds
5900 }
5901 
5902 alias COLOR_MODEL_UNKNOWN = cef_color_model_t.COLOR_MODEL_UNKNOWN;
5903 alias COLOR_MODEL_GRAY = cef_color_model_t.COLOR_MODEL_GRAY;
5904 alias COLOR_MODEL_COLOR = cef_color_model_t.COLOR_MODEL_COLOR;
5905 alias COLOR_MODEL_CMYK = cef_color_model_t.COLOR_MODEL_CMYK;
5906 alias COLOR_MODEL_CMY = cef_color_model_t.COLOR_MODEL_CMY;
5907 alias COLOR_MODEL_KCMY = cef_color_model_t.COLOR_MODEL_KCMY;
5908 alias COLOR_MODEL_CMY_K = cef_color_model_t.COLOR_MODEL_CMY_K;
5909 alias COLOR_MODEL_BLACK = cef_color_model_t.COLOR_MODEL_BLACK;
5910 alias COLOR_MODEL_GRAYSCALE = cef_color_model_t.COLOR_MODEL_GRAYSCALE;
5911 alias COLOR_MODEL_RGB = cef_color_model_t.COLOR_MODEL_RGB;
5912 alias COLOR_MODEL_RGB16 = cef_color_model_t.COLOR_MODEL_RGB16;
5913 alias COLOR_MODEL_RGBA = cef_color_model_t.COLOR_MODEL_RGBA;
5914 alias COLOR_MODEL_COLORMODE_COLOR = cef_color_model_t.COLOR_MODEL_COLORMODE_COLOR;
5915 alias COLOR_MODEL_COLORMODE_MONOCHROME = cef_color_model_t.COLOR_MODEL_COLORMODE_MONOCHROME;
5916 alias COLOR_MODEL_HP_COLOR_COLOR = cef_color_model_t.COLOR_MODEL_HP_COLOR_COLOR;
5917 alias COLOR_MODEL_HP_COLOR_BLACK = cef_color_model_t.COLOR_MODEL_HP_COLOR_BLACK;
5918 alias COLOR_MODEL_PRINTOUTMODE_NORMAL = cef_color_model_t.COLOR_MODEL_PRINTOUTMODE_NORMAL;
5919 alias COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY = cef_color_model_t.COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY;
5920 alias COLOR_MODEL_PROCESSCOLORMODEL_CMYK = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_CMYK;
5921 alias COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE;
5922 alias COLOR_MODEL_PROCESSCOLORMODEL_RGB = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_RGB;
5923 
5924 ///
5925 /// Print job duplex mode values.
5926 ///
5927 enum cef_duplex_mode_t
5928 {
5929     DUPLEX_MODE_UNKNOWN = -1,
5930     DUPLEX_MODE_SIMPLEX = 0,
5931     DUPLEX_MODE_LONG_EDGE = 1,
5932     DUPLEX_MODE_SHORT_EDGE = 2
5933 }
5934 
5935 alias DUPLEX_MODE_UNKNOWN = cef_duplex_mode_t.DUPLEX_MODE_UNKNOWN;
5936 alias DUPLEX_MODE_SIMPLEX = cef_duplex_mode_t.DUPLEX_MODE_SIMPLEX;
5937 alias DUPLEX_MODE_LONG_EDGE = cef_duplex_mode_t.DUPLEX_MODE_LONG_EDGE;
5938 alias DUPLEX_MODE_SHORT_EDGE = cef_duplex_mode_t.DUPLEX_MODE_SHORT_EDGE;
5939 
5940 ///
5941 /// Cursor type values.
5942 ///
5943 enum cef_cursor_type_t
5944 {
5945     CT_POINTER = 0,
5946     CT_CROSS = 1,
5947     CT_HAND = 2,
5948     CT_IBEAM = 3,
5949     CT_WAIT = 4,
5950     CT_HELP = 5,
5951     CT_EASTRESIZE = 6,
5952     CT_NORTHRESIZE = 7,
5953     CT_NORTHEASTRESIZE = 8,
5954     CT_NORTHWESTRESIZE = 9,
5955     CT_SOUTHRESIZE = 10,
5956     CT_SOUTHEASTRESIZE = 11,
5957     CT_SOUTHWESTRESIZE = 12,
5958     CT_WESTRESIZE = 13,
5959     CT_NORTHSOUTHRESIZE = 14,
5960     CT_EASTWESTRESIZE = 15,
5961     CT_NORTHEASTSOUTHWESTRESIZE = 16,
5962     CT_NORTHWESTSOUTHEASTRESIZE = 17,
5963     CT_COLUMNRESIZE = 18,
5964     CT_ROWRESIZE = 19,
5965     CT_MIDDLEPANNING = 20,
5966     CT_EASTPANNING = 21,
5967     CT_NORTHPANNING = 22,
5968     CT_NORTHEASTPANNING = 23,
5969     CT_NORTHWESTPANNING = 24,
5970     CT_SOUTHPANNING = 25,
5971     CT_SOUTHEASTPANNING = 26,
5972     CT_SOUTHWESTPANNING = 27,
5973     CT_WESTPANNING = 28,
5974     CT_MOVE = 29,
5975     CT_VERTICALTEXT = 30,
5976     CT_CELL = 31,
5977     CT_CONTEXTMENU = 32,
5978     CT_ALIAS = 33,
5979     CT_PROGRESS = 34,
5980     CT_NODROP = 35,
5981     CT_COPY = 36,
5982     CT_NONE = 37,
5983     CT_NOTALLOWED = 38,
5984     CT_ZOOMIN = 39,
5985     CT_ZOOMOUT = 40,
5986     CT_GRAB = 41,
5987     CT_GRABBING = 42,
5988     CT_MIDDLE_PANNING_VERTICAL = 43,
5989     CT_MIDDLE_PANNING_HORIZONTAL = 44,
5990     CT_CUSTOM = 45,
5991     CT_DND_NONE = 46,
5992     CT_DND_MOVE = 47,
5993     CT_DND_COPY = 48,
5994     CT_DND_LINK = 49
5995 }
5996 
5997 alias CT_POINTER = cef_cursor_type_t.CT_POINTER;
5998 alias CT_CROSS = cef_cursor_type_t.CT_CROSS;
5999 alias CT_HAND = cef_cursor_type_t.CT_HAND;
6000 alias CT_IBEAM = cef_cursor_type_t.CT_IBEAM;
6001 alias CT_WAIT = cef_cursor_type_t.CT_WAIT;
6002 alias CT_HELP = cef_cursor_type_t.CT_HELP;
6003 alias CT_EASTRESIZE = cef_cursor_type_t.CT_EASTRESIZE;
6004 alias CT_NORTHRESIZE = cef_cursor_type_t.CT_NORTHRESIZE;
6005 alias CT_NORTHEASTRESIZE = cef_cursor_type_t.CT_NORTHEASTRESIZE;
6006 alias CT_NORTHWESTRESIZE = cef_cursor_type_t.CT_NORTHWESTRESIZE;
6007 alias CT_SOUTHRESIZE = cef_cursor_type_t.CT_SOUTHRESIZE;
6008 alias CT_SOUTHEASTRESIZE = cef_cursor_type_t.CT_SOUTHEASTRESIZE;
6009 alias CT_SOUTHWESTRESIZE = cef_cursor_type_t.CT_SOUTHWESTRESIZE;
6010 alias CT_WESTRESIZE = cef_cursor_type_t.CT_WESTRESIZE;
6011 alias CT_NORTHSOUTHRESIZE = cef_cursor_type_t.CT_NORTHSOUTHRESIZE;
6012 alias CT_EASTWESTRESIZE = cef_cursor_type_t.CT_EASTWESTRESIZE;
6013 alias CT_NORTHEASTSOUTHWESTRESIZE = cef_cursor_type_t.CT_NORTHEASTSOUTHWESTRESIZE;
6014 alias CT_NORTHWESTSOUTHEASTRESIZE = cef_cursor_type_t.CT_NORTHWESTSOUTHEASTRESIZE;
6015 alias CT_COLUMNRESIZE = cef_cursor_type_t.CT_COLUMNRESIZE;
6016 alias CT_ROWRESIZE = cef_cursor_type_t.CT_ROWRESIZE;
6017 alias CT_MIDDLEPANNING = cef_cursor_type_t.CT_MIDDLEPANNING;
6018 alias CT_EASTPANNING = cef_cursor_type_t.CT_EASTPANNING;
6019 alias CT_NORTHPANNING = cef_cursor_type_t.CT_NORTHPANNING;
6020 alias CT_NORTHEASTPANNING = cef_cursor_type_t.CT_NORTHEASTPANNING;
6021 alias CT_NORTHWESTPANNING = cef_cursor_type_t.CT_NORTHWESTPANNING;
6022 alias CT_SOUTHPANNING = cef_cursor_type_t.CT_SOUTHPANNING;
6023 alias CT_SOUTHEASTPANNING = cef_cursor_type_t.CT_SOUTHEASTPANNING;
6024 alias CT_SOUTHWESTPANNING = cef_cursor_type_t.CT_SOUTHWESTPANNING;
6025 alias CT_WESTPANNING = cef_cursor_type_t.CT_WESTPANNING;
6026 alias CT_MOVE = cef_cursor_type_t.CT_MOVE;
6027 alias CT_VERTICALTEXT = cef_cursor_type_t.CT_VERTICALTEXT;
6028 alias CT_CELL = cef_cursor_type_t.CT_CELL;
6029 alias CT_CONTEXTMENU = cef_cursor_type_t.CT_CONTEXTMENU;
6030 alias CT_ALIAS = cef_cursor_type_t.CT_ALIAS;
6031 alias CT_PROGRESS = cef_cursor_type_t.CT_PROGRESS;
6032 alias CT_NODROP = cef_cursor_type_t.CT_NODROP;
6033 alias CT_COPY = cef_cursor_type_t.CT_COPY;
6034 alias CT_NONE = cef_cursor_type_t.CT_NONE;
6035 alias CT_NOTALLOWED = cef_cursor_type_t.CT_NOTALLOWED;
6036 alias CT_ZOOMIN = cef_cursor_type_t.CT_ZOOMIN;
6037 alias CT_ZOOMOUT = cef_cursor_type_t.CT_ZOOMOUT;
6038 alias CT_GRAB = cef_cursor_type_t.CT_GRAB;
6039 alias CT_GRABBING = cef_cursor_type_t.CT_GRABBING;
6040 alias CT_MIDDLE_PANNING_VERTICAL = cef_cursor_type_t.CT_MIDDLE_PANNING_VERTICAL;
6041 alias CT_MIDDLE_PANNING_HORIZONTAL = cef_cursor_type_t.CT_MIDDLE_PANNING_HORIZONTAL;
6042 alias CT_CUSTOM = cef_cursor_type_t.CT_CUSTOM;
6043 alias CT_DND_NONE = cef_cursor_type_t.CT_DND_NONE;
6044 alias CT_DND_MOVE = cef_cursor_type_t.CT_DND_MOVE;
6045 alias CT_DND_COPY = cef_cursor_type_t.CT_DND_COPY;
6046 alias CT_DND_LINK = cef_cursor_type_t.CT_DND_LINK;
6047 
6048 ///
6049 /// Structure representing cursor information. |buffer| will be
6050 /// |size.width|*|size.height|*4 bytes in size and represents a BGRA image with
6051 /// an upper-left origin.
6052 ///
6053 struct cef_cursor_info_t
6054 {
6055 
6056     cef_point_t hotspot;
6057     float image_scale_factor;
6058     void* buffer;
6059 
6060     cef_size_t size;
6061 }
6062 
6063 
6064 
6065 ///
6066 /// URI unescape rules passed to CefURIDecode().
6067 ///
6068 enum cef_uri_unescape_rule_t
6069 {
6070     ///
6071     /// Don't unescape anything at all.
6072     ///
6073     UU_NONE = 0,
6074 
6075     ///
6076     /// Don't unescape anything special, but all normal unescaping will happen.
6077     /// This is a placeholder and can't be combined with other flags (since it's
6078     /// just the absence of them). All other unescape rules imply "normal" in
6079     /// addition to their special meaning. Things like escaped letters, digits,
6080     /// and most symbols will get unescaped with this mode.
6081     ///
6082     UU_NORMAL = 1 << 0,
6083 
6084     ///
6085     /// Convert %20 to spaces. In some places where we're showing URLs, we may
6086     /// want this. In places where the URL may be copied and pasted out, then
6087     /// you wouldn't want this since it might not be interpreted in one piece
6088     /// by other applications.
6089     ///
6090     UU_SPACES = 1 << 1,
6091 
6092     ///
6093     /// Unescapes '/' and '\\'. If these characters were unescaped, the resulting
6094     /// URL won't be the same as the source one. Moreover, they are dangerous to
6095     /// unescape in strings that will be used as file paths or names. This value
6096     /// should only be used when slashes don't have special meaning, like data
6097     /// URLs.
6098     ///
6099     UU_PATH_SEPARATORS = 1 << 2,
6100 
6101     ///
6102     /// Unescapes various characters that will change the meaning of URLs,
6103     /// including '%', '+', '&', '#'. Does not unescape path separators.
6104     /// If these characters were unescaped, the resulting URL won't be the same
6105     /// as the source one. This flag is used when generating final output like
6106     /// filenames for URLs where we won't be interpreting as a URL and want to do
6107     /// as much unescaping as possible.
6108     ///
6109     UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 << 3,
6110 
6111     ///
6112     /// URL queries use "+" for space. This flag controls that replacement.
6113     ///
6114     UU_REPLACE_PLUS_WITH_SPACE = 1 << 4
6115 }
6116 
6117 alias UU_NONE = cef_uri_unescape_rule_t.UU_NONE;
6118 alias UU_NORMAL = cef_uri_unescape_rule_t.UU_NORMAL;
6119 alias UU_SPACES = cef_uri_unescape_rule_t.UU_SPACES;
6120 alias UU_PATH_SEPARATORS = cef_uri_unescape_rule_t.UU_PATH_SEPARATORS;
6121 alias UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = cef_uri_unescape_rule_t.UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS;
6122 alias UU_REPLACE_PLUS_WITH_SPACE = cef_uri_unescape_rule_t.UU_REPLACE_PLUS_WITH_SPACE;
6123 
6124 ///
6125 /// Options that can be passed to CefParseJSON.
6126 ///
6127 enum cef_json_parser_options_t
6128 {
6129     ///
6130     /// Parses the input strictly according to RFC 4627. See comments in
6131     /// Chromium's base/json/json_reader.h file for known limitations/
6132     /// deviations from the RFC.
6133     ///
6134     JSON_PARSER_RFC = 0,
6135 
6136     ///
6137     /// Allows commas to exist after the last element in structures.
6138     ///
6139     JSON_PARSER_ALLOW_TRAILING_COMMAS = 1 << 0
6140 }
6141 
6142 alias JSON_PARSER_RFC = cef_json_parser_options_t.JSON_PARSER_RFC;
6143 alias JSON_PARSER_ALLOW_TRAILING_COMMAS = cef_json_parser_options_t.JSON_PARSER_ALLOW_TRAILING_COMMAS;
6144 
6145 ///
6146 /// Options that can be passed to CefWriteJSON.
6147 ///
6148 enum cef_json_writer_options_t
6149 {
6150     ///
6151     /// Default behavior.
6152     ///
6153     JSON_WRITER_DEFAULT = 0,
6154 
6155     ///
6156     /// This option instructs the writer that if a Binary value is encountered,
6157     /// the value (and key if within a dictionary) will be omitted from the
6158     /// output, and success will be returned. Otherwise, if a binary value is
6159     /// encountered, failure will be returned.
6160     ///
6161     JSON_WRITER_OMIT_BINARY_VALUES = 1 << 0,
6162 
6163     ///
6164     /// This option instructs the writer to write doubles that have no fractional
6165     /// part as a normal integer (i.e., without using exponential notation
6166     /// or appending a '.0') as long as the value is within the range of a
6167     /// 64-bit int.
6168     ///
6169     JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = 1 << 1,
6170 
6171     ///
6172     /// Return a slightly nicer formatted json string (pads with whitespace to
6173     /// help with readability).
6174     ///
6175     JSON_WRITER_PRETTY_PRINT = 1 << 2
6176 }
6177 
6178 alias JSON_WRITER_DEFAULT = cef_json_writer_options_t.JSON_WRITER_DEFAULT;
6179 alias JSON_WRITER_OMIT_BINARY_VALUES = cef_json_writer_options_t.JSON_WRITER_OMIT_BINARY_VALUES;
6180 alias JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = cef_json_writer_options_t.JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION;
6181 alias JSON_WRITER_PRETTY_PRINT = cef_json_writer_options_t.JSON_WRITER_PRETTY_PRINT;
6182 
6183 ///
6184 /// Margin type for PDF printing.
6185 ///
6186 enum cef_pdf_print_margin_type_t
6187 {
6188     ///
6189     /// Default margins of 1cm (~0.4 inches).
6190     ///
6191     PDF_PRINT_MARGIN_DEFAULT = 0,
6192 
6193     ///
6194     /// No margins.
6195     ///
6196     PDF_PRINT_MARGIN_NONE = 1,
6197 
6198     ///
6199     /// Custom margins using the |margin_*| values from cef_pdf_print_settings_t.
6200     ///
6201     PDF_PRINT_MARGIN_CUSTOM = 2
6202 }
6203 
6204 alias PDF_PRINT_MARGIN_DEFAULT = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_DEFAULT;
6205 alias PDF_PRINT_MARGIN_NONE = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_NONE;
6206 alias PDF_PRINT_MARGIN_CUSTOM = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_CUSTOM;
6207 
6208 ///
6209 /// Structure representing PDF print settings. These values match the parameters
6210 /// supported by the DevTools Page.printToPDF function. See
6211 /// https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
6212 ///
6213 struct cef_pdf_print_settings_t
6214 {
6215     ///
6216     /// Set to true (1) for landscape mode or false (0) for portrait mode.
6217     ///
6218     int landscape;
6219 
6220     ///
6221     /// Set to true (1) to print background graphics.
6222     ///
6223     int print_background;
6224 
6225     ///
6226     /// The percentage to scale the PDF by before printing (e.g. .5 is 50%).
6227     /// If this value is less than or equal to zero the default value of 1.0
6228     /// will be used.
6229     ///
6230     double scale;
6231 
6232     ///
6233     /// Output paper size in inches. If either of these values is less than or
6234     /// equal to zero then the default paper size (letter, 8.5 x 11 inches) will
6235     /// be used.
6236     ///
6237     double paper_width;
6238     double paper_height;
6239 
6240     ///
6241     /// Set to true (1) to prefer page size as defined by css. Defaults to false
6242     /// (0), in which case the content will be scaled to fit the paper size.
6243     ///
6244     int prefer_css_page_size;
6245 
6246     ///
6247     /// Margin type.
6248     ///
6249     cef_pdf_print_margin_type_t margin_type;
6250 
6251     ///
6252     /// Margins in inches. Only used if |margin_type| is set to
6253     /// PDF_PRINT_MARGIN_CUSTOM.
6254     ///
6255     double margin_top;
6256     double margin_right;
6257     double margin_bottom;
6258     double margin_left;
6259 
6260     ///
6261     /// Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed
6262     /// in the document order, not in the order specified, and no more than once.
6263     /// Defaults to empty string, which implies the entire document is printed.
6264     /// The page numbers are quietly capped to actual page count of the document,
6265     /// and ranges beyond the end of the document are ignored. If this results in
6266     /// no pages to print, an error is reported. It is an error to specify a range
6267     /// with start greater than end.
6268     ///
6269     cef_string_t page_ranges;
6270 
6271     ///
6272     /// Set to true (1) to display the header and/or footer. Modify
6273     /// |header_template| and/or |footer_template| to customize the display.
6274     ///
6275     int display_header_footer;
6276 
6277     ///
6278     /// HTML template for the print header. Only displayed if
6279     /// |display_header_footer| is true (1). Should be valid HTML markup with
6280     /// the following classes used to inject printing values into them:
6281     ///
6282     /// - date: formatted print date
6283     /// - title: document title
6284     /// - url: document location
6285     /// - pageNumber: current page number
6286     /// - totalPages: total pages in the document
6287     ///
6288     /// For example, "<span class=title></span>" would generate a span containing
6289     /// the title.
6290     ///
6291     cef_string_t header_template;
6292 
6293     ///
6294     /// HTML template for the print footer. Only displayed if
6295     /// |display_header_footer| is true (1). Uses the same format as
6296     /// |header_template|.
6297     ///
6298     cef_string_t footer_template;
6299 
6300     ///
6301     /// Set to true (1) to generate tagged (accessible) PDF.
6302     ///
6303     int generate_tagged_pdf;
6304 
6305     ///
6306     /// Set to true (1) to generate a document outline.
6307     ///
6308     int generate_document_outline;
6309 }
6310 
6311 
6312 
6313 ///
6314 /// Supported UI scale factors for the platform. SCALE_FACTOR_NONE is used for
6315 /// density independent resources such as string, html/js files or an image that
6316 /// can be used for any scale factors (such as wallpapers).
6317 ///
6318 enum cef_scale_factor_t
6319 {
6320     SCALE_FACTOR_NONE = 0,
6321     SCALE_FACTOR_100P = 1,
6322     SCALE_FACTOR_125P = 2,
6323     SCALE_FACTOR_133P = 3,
6324     SCALE_FACTOR_140P = 4,
6325     SCALE_FACTOR_150P = 5,
6326     SCALE_FACTOR_180P = 6,
6327     SCALE_FACTOR_200P = 7,
6328     SCALE_FACTOR_250P = 8,
6329     SCALE_FACTOR_300P = 9
6330 }
6331 
6332 alias SCALE_FACTOR_NONE = cef_scale_factor_t.SCALE_FACTOR_NONE;
6333 alias SCALE_FACTOR_100P = cef_scale_factor_t.SCALE_FACTOR_100P;
6334 alias SCALE_FACTOR_125P = cef_scale_factor_t.SCALE_FACTOR_125P;
6335 alias SCALE_FACTOR_133P = cef_scale_factor_t.SCALE_FACTOR_133P;
6336 alias SCALE_FACTOR_140P = cef_scale_factor_t.SCALE_FACTOR_140P;
6337 alias SCALE_FACTOR_150P = cef_scale_factor_t.SCALE_FACTOR_150P;
6338 alias SCALE_FACTOR_180P = cef_scale_factor_t.SCALE_FACTOR_180P;
6339 alias SCALE_FACTOR_200P = cef_scale_factor_t.SCALE_FACTOR_200P;
6340 alias SCALE_FACTOR_250P = cef_scale_factor_t.SCALE_FACTOR_250P;
6341 alias SCALE_FACTOR_300P = cef_scale_factor_t.SCALE_FACTOR_300P;
6342 
6343 ///
6344 /// Policy for how the Referrer HTTP header value will be sent during
6345 /// navigation. If the `--no-referrers` command-line flag is specified then the
6346 /// policy value will be ignored and the Referrer value will never be sent. Must
6347 /// be kept synchronized with net::URLRequest::ReferrerPolicy from Chromium.
6348 ///
6349 enum cef_referrer_policy_t
6350 {
6351     ///
6352     /// Clear the referrer header if the header value is HTTPS but the request
6353     /// destination is HTTP. This is the default behavior.
6354     ///
6355     REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 0,
6356     REFERRER_POLICY_DEFAULT = REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
6357 
6358     ///
6359     /// A slight variant on CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE:
6360     /// If the request destination is HTTP, an HTTPS referrer will be cleared. If
6361     /// the request's destination is cross-origin with the referrer (but does not
6362     /// downgrade), the referrer's granularity will be stripped down to an origin
6363     /// rather than a full URL. Same-origin requests will send the full referrer.
6364     ///
6365     REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = 1,
6366 
6367     ///
6368     /// Strip the referrer down to an origin when the origin of the referrer is
6369     /// different from the destination's origin.
6370     ///
6371     REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = 2,
6372 
6373     ///
6374     /// Never change the referrer.
6375     ///
6376     REFERRER_POLICY_NEVER_CLEAR_REFERRER = 3,
6377 
6378     ///
6379     /// Strip the referrer down to the origin regardless of the redirect location.
6380     ///
6381     REFERRER_POLICY_ORIGIN = 4,
6382 
6383     ///
6384     /// Clear the referrer when the request's referrer is cross-origin with the
6385     /// request's destination.
6386     ///
6387     REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = 5,
6388 
6389     ///
6390     /// Strip the referrer down to the origin, but clear it entirely if the
6391     /// referrer value is HTTPS and the destination is HTTP.
6392     ///
6393     REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 6,
6394 
6395     ///
6396     /// Always clear the referrer regardless of the request destination.
6397     ///
6398     REFERRER_POLICY_NO_REFERRER = 7,
6399 
6400     /// Always the last value in this enumeration.
6401     REFERRER_POLICY_LAST_VALUE = REFERRER_POLICY_NO_REFERRER
6402 }
6403 
6404 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;
6405 alias REFERRER_POLICY_DEFAULT = cef_referrer_policy_t.REFERRER_POLICY_DEFAULT;
6406 alias REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN;
6407 alias REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN;
6408 alias REFERRER_POLICY_NEVER_CLEAR_REFERRER = cef_referrer_policy_t.REFERRER_POLICY_NEVER_CLEAR_REFERRER;
6409 alias REFERRER_POLICY_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_ORIGIN;
6410 alias REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN;
6411 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;
6412 alias REFERRER_POLICY_NO_REFERRER = cef_referrer_policy_t.REFERRER_POLICY_NO_REFERRER;
6413 alias REFERRER_POLICY_LAST_VALUE = cef_referrer_policy_t.REFERRER_POLICY_LAST_VALUE;
6414 
6415 ///
6416 /// Return values for CefResponseFilter::Filter().
6417 ///
6418 enum cef_response_filter_status_t
6419 {
6420     ///
6421     /// Some or all of the pre-filter data was read successfully but more data is
6422     /// needed in order to continue filtering (filtered output is pending).
6423     ///
6424     RESPONSE_FILTER_NEED_MORE_DATA = 0,
6425 
6426     ///
6427     /// Some or all of the pre-filter data was read successfully and all available
6428     /// filtered output has been written.
6429     ///
6430     RESPONSE_FILTER_DONE = 1,
6431 
6432     ///
6433     /// An error occurred during filtering.
6434     ///
6435     RESPONSE_FILTER_ERROR = 2
6436 }
6437 
6438 alias RESPONSE_FILTER_NEED_MORE_DATA = cef_response_filter_status_t.RESPONSE_FILTER_NEED_MORE_DATA;
6439 alias RESPONSE_FILTER_DONE = cef_response_filter_status_t.RESPONSE_FILTER_DONE;
6440 alias RESPONSE_FILTER_ERROR = cef_response_filter_status_t.RESPONSE_FILTER_ERROR;
6441 
6442 ///
6443 /// Describes how to interpret the alpha component of a pixel.
6444 ///
6445 enum cef_alpha_type_t
6446 {
6447     ///
6448     /// No transparency. The alpha component is ignored.
6449     ///
6450     CEF_ALPHA_TYPE_OPAQUE = 0,
6451 
6452     ///
6453     /// Transparency with pre-multiplied alpha component.
6454     ///
6455     CEF_ALPHA_TYPE_PREMULTIPLIED = 1,
6456 
6457     ///
6458     /// Transparency with post-multiplied alpha component.
6459     ///
6460     CEF_ALPHA_TYPE_POSTMULTIPLIED = 2
6461 }
6462 
6463 alias CEF_ALPHA_TYPE_OPAQUE = cef_alpha_type_t.CEF_ALPHA_TYPE_OPAQUE;
6464 alias CEF_ALPHA_TYPE_PREMULTIPLIED = cef_alpha_type_t.CEF_ALPHA_TYPE_PREMULTIPLIED;
6465 alias CEF_ALPHA_TYPE_POSTMULTIPLIED = cef_alpha_type_t.CEF_ALPHA_TYPE_POSTMULTIPLIED;
6466 
6467 ///
6468 /// Text style types. Should be kepy in sync with gfx::TextStyle.
6469 ///
6470 enum cef_text_style_t
6471 {
6472     CEF_TEXT_STYLE_BOLD = 0,
6473     CEF_TEXT_STYLE_ITALIC = 1,
6474     CEF_TEXT_STYLE_STRIKE = 2,
6475     CEF_TEXT_STYLE_DIAGONAL_STRIKE = 3,
6476     CEF_TEXT_STYLE_UNDERLINE = 4
6477 }
6478 
6479 alias CEF_TEXT_STYLE_BOLD = cef_text_style_t.CEF_TEXT_STYLE_BOLD;
6480 alias CEF_TEXT_STYLE_ITALIC = cef_text_style_t.CEF_TEXT_STYLE_ITALIC;
6481 alias CEF_TEXT_STYLE_STRIKE = cef_text_style_t.CEF_TEXT_STYLE_STRIKE;
6482 alias CEF_TEXT_STYLE_DIAGONAL_STRIKE = cef_text_style_t.CEF_TEXT_STYLE_DIAGONAL_STRIKE;
6483 alias CEF_TEXT_STYLE_UNDERLINE = cef_text_style_t.CEF_TEXT_STYLE_UNDERLINE;
6484 
6485 ///
6486 /// Specifies where along the axis the CefBoxLayout child views should be laid
6487 /// out. Should be kept in sync with Chromium's views::LayoutAlignment type.
6488 ///
6489 enum cef_axis_alignment_t
6490 {
6491     /// Child views will be left/top-aligned.
6492     CEF_AXIS_ALIGNMENT_START = 0,
6493 
6494     /// Child views will be center-aligned.
6495     CEF_AXIS_ALIGNMENT_CENTER = 1,
6496 
6497     /// Child views will be right/bottom-aligned.
6498     CEF_AXIS_ALIGNMENT_END = 2,
6499 
6500     /// Child views will be stretched to fit.
6501     CEF_AXIS_ALIGNMENT_STRETCH = 3
6502 }
6503 
6504 alias CEF_AXIS_ALIGNMENT_START = cef_axis_alignment_t.CEF_AXIS_ALIGNMENT_START;
6505 alias CEF_AXIS_ALIGNMENT_CENTER = cef_axis_alignment_t.CEF_AXIS_ALIGNMENT_CENTER;
6506 alias CEF_AXIS_ALIGNMENT_END = cef_axis_alignment_t.CEF_AXIS_ALIGNMENT_END;
6507 alias CEF_AXIS_ALIGNMENT_STRETCH = cef_axis_alignment_t.CEF_AXIS_ALIGNMENT_STRETCH;
6508 
6509 ///
6510 /// Settings used when initializing a CefBoxLayout.
6511 ///
6512 struct cef_box_layout_settings_t
6513 {
6514     ///
6515     /// If true (1) the layout will be horizontal, otherwise the layout will be
6516     /// vertical.
6517     ///
6518     int horizontal;
6519 
6520     ///
6521     /// Adds additional horizontal space between the child view area and the host
6522     /// view border.
6523     ///
6524     int inside_border_horizontal_spacing;
6525 
6526     ///
6527     /// Adds additional vertical space between the child view area and the host
6528     /// view border.
6529     ///
6530     int inside_border_vertical_spacing;
6531 
6532     ///
6533     /// Adds additional space around the child view area.
6534     ///
6535 
6536     cef_insets_t inside_border_insets;
6537 
6538     ///
6539     /// Adds additional space between child views.
6540     ///
6541     int between_child_spacing;
6542 
6543     ///
6544     /// Specifies where along the main axis the child views should be laid out.
6545     ///
6546     cef_axis_alignment_t main_axis_alignment;
6547 
6548     ///
6549     /// Specifies where along the cross axis the child views should be laid out.
6550     ///
6551     cef_axis_alignment_t cross_axis_alignment;
6552 
6553     ///
6554     /// Minimum cross axis size.
6555     ///
6556     int minimum_cross_axis_size;
6557 
6558     ///
6559     /// Default flex for views when none is specified via CefBoxLayout methods.
6560     /// Using the preferred size as the basis, free space along the main axis is
6561     /// distributed to views in the ratio of their flex weights. Similarly, if the
6562     /// views will overflow the parent, space is subtracted in these ratios. A
6563     /// flex of 0 means this view is not resized. Flex values must not be
6564     /// negative.
6565     ///
6566     int default_flex;
6567 }
6568 
6569 
6570 
6571 ///
6572 /// Specifies the button display state.
6573 ///
6574 enum cef_button_state_t
6575 {
6576     CEF_BUTTON_STATE_NORMAL = 0,
6577     CEF_BUTTON_STATE_HOVERED = 1,
6578     CEF_BUTTON_STATE_PRESSED = 2,
6579     CEF_BUTTON_STATE_DISABLED = 3
6580 }
6581 
6582 alias CEF_BUTTON_STATE_NORMAL = cef_button_state_t.CEF_BUTTON_STATE_NORMAL;
6583 alias CEF_BUTTON_STATE_HOVERED = cef_button_state_t.CEF_BUTTON_STATE_HOVERED;
6584 alias CEF_BUTTON_STATE_PRESSED = cef_button_state_t.CEF_BUTTON_STATE_PRESSED;
6585 alias CEF_BUTTON_STATE_DISABLED = cef_button_state_t.CEF_BUTTON_STATE_DISABLED;
6586 
6587 ///
6588 /// Specifies the horizontal text alignment mode.
6589 ///
6590 enum cef_horizontal_alignment_t
6591 {
6592     ///
6593     /// Align the text's left edge with that of its display area.
6594     ///
6595     CEF_HORIZONTAL_ALIGNMENT_LEFT = 0,
6596 
6597     ///
6598     /// Align the text's center with that of its display area.
6599     ///
6600     CEF_HORIZONTAL_ALIGNMENT_CENTER = 1,
6601 
6602     ///
6603     /// Align the text's right edge with that of its display area.
6604     ///
6605     CEF_HORIZONTAL_ALIGNMENT_RIGHT = 2
6606 }
6607 
6608 alias CEF_HORIZONTAL_ALIGNMENT_LEFT = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_LEFT;
6609 alias CEF_HORIZONTAL_ALIGNMENT_CENTER = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_CENTER;
6610 alias CEF_HORIZONTAL_ALIGNMENT_RIGHT = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_RIGHT;
6611 
6612 ///
6613 /// Specifies how a menu will be anchored for non-RTL languages. The opposite
6614 /// position will be used for RTL languages.
6615 ///
6616 enum cef_menu_anchor_position_t
6617 {
6618     CEF_MENU_ANCHOR_TOPLEFT = 0,
6619     CEF_MENU_ANCHOR_TOPRIGHT = 1,
6620     CEF_MENU_ANCHOR_BOTTOMCENTER = 2
6621 }
6622 
6623 alias CEF_MENU_ANCHOR_TOPLEFT = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_TOPLEFT;
6624 alias CEF_MENU_ANCHOR_TOPRIGHT = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_TOPRIGHT;
6625 alias CEF_MENU_ANCHOR_BOTTOMCENTER = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_BOTTOMCENTER;
6626 
6627 ///
6628 /// Supported color types for menu items.
6629 ///
6630 enum cef_menu_color_type_t
6631 {
6632     CEF_MENU_COLOR_TEXT = 0,
6633     CEF_MENU_COLOR_TEXT_HOVERED = 1,
6634     CEF_MENU_COLOR_TEXT_ACCELERATOR = 2,
6635     CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED = 3,
6636     CEF_MENU_COLOR_BACKGROUND = 4,
6637     CEF_MENU_COLOR_BACKGROUND_HOVERED = 5,
6638     CEF_MENU_COLOR_COUNT = 6
6639 }
6640 
6641 alias CEF_MENU_COLOR_TEXT = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT;
6642 alias CEF_MENU_COLOR_TEXT_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_HOVERED;
6643 alias CEF_MENU_COLOR_TEXT_ACCELERATOR = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_ACCELERATOR;
6644 alias CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED;
6645 alias CEF_MENU_COLOR_BACKGROUND = cef_menu_color_type_t.CEF_MENU_COLOR_BACKGROUND;
6646 alias CEF_MENU_COLOR_BACKGROUND_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_BACKGROUND_HOVERED;
6647 alias CEF_MENU_COLOR_COUNT = cef_menu_color_type_t.CEF_MENU_COLOR_COUNT;
6648 
6649 /// Supported SSL version values. See net/ssl/ssl_connection_status_flags.h
6650 /// for more information.
6651 enum cef_ssl_version_t
6652 {
6653     SSL_CONNECTION_VERSION_UNKNOWN = 0, // Unknown SSL version.
6654     SSL_CONNECTION_VERSION_SSL2 = 1,
6655     SSL_CONNECTION_VERSION_SSL3 = 2,
6656     SSL_CONNECTION_VERSION_TLS1 = 3,
6657     SSL_CONNECTION_VERSION_TLS1_1 = 4,
6658     SSL_CONNECTION_VERSION_TLS1_2 = 5,
6659     SSL_CONNECTION_VERSION_TLS1_3 = 6,
6660     SSL_CONNECTION_VERSION_QUIC = 7
6661 }
6662 
6663 alias SSL_CONNECTION_VERSION_UNKNOWN = cef_ssl_version_t.SSL_CONNECTION_VERSION_UNKNOWN;
6664 alias SSL_CONNECTION_VERSION_SSL2 = cef_ssl_version_t.SSL_CONNECTION_VERSION_SSL2;
6665 alias SSL_CONNECTION_VERSION_SSL3 = cef_ssl_version_t.SSL_CONNECTION_VERSION_SSL3;
6666 alias SSL_CONNECTION_VERSION_TLS1 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1;
6667 alias SSL_CONNECTION_VERSION_TLS1_1 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_1;
6668 alias SSL_CONNECTION_VERSION_TLS1_2 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_2;
6669 alias SSL_CONNECTION_VERSION_TLS1_3 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_3;
6670 alias SSL_CONNECTION_VERSION_QUIC = cef_ssl_version_t.SSL_CONNECTION_VERSION_QUIC;
6671 
6672 /// Supported SSL content status flags. See content/public/common/ssl_status.h
6673 /// for more information.
6674 enum cef_ssl_content_status_t
6675 {
6676     SSL_CONTENT_NORMAL_CONTENT = 0,
6677     SSL_CONTENT_DISPLAYED_INSECURE_CONTENT = 1 << 0,
6678     SSL_CONTENT_RAN_INSECURE_CONTENT = 1 << 1
6679 }
6680 
6681 alias SSL_CONTENT_NORMAL_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_NORMAL_CONTENT;
6682 alias SSL_CONTENT_DISPLAYED_INSECURE_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_DISPLAYED_INSECURE_CONTENT;
6683 alias SSL_CONTENT_RAN_INSECURE_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_RAN_INSECURE_CONTENT;
6684 
6685 //
6686 /// Configuration options for registering a custom scheme.
6687 /// These values are used when calling AddCustomScheme.
6688 //
6689 enum cef_scheme_options_t
6690 {
6691     CEF_SCHEME_OPTION_NONE = 0,
6692 
6693     ///
6694     /// If CEF_SCHEME_OPTION_STANDARD is set the scheme will be treated as a
6695     /// standard scheme. Standard schemes are subject to URL canonicalization and
6696     /// parsing rules as defined in the Common Internet Scheme Syntax RFC 1738
6697     /// Section 3.1 available at http://www.ietf.org/rfc/rfc1738.txt
6698     //
6699     /// In particular, the syntax for standard scheme URLs must be of the form:
6700     /// <pre>
6701     ///  [scheme]://[username]:[password]@[host]:[port]/[url-path]
6702     /// </pre> Standard scheme URLs must have a host component that is a fully
6703     /// qualified domain name as defined in Section 3.5 of RFC 1034 [13] and
6704     /// Section 2.1 of RFC 1123. These URLs will be canonicalized to
6705     /// "scheme://host/path" in the simplest case and
6706     /// "scheme://username:password@host:port/path" in the most explicit case. For
6707     /// example, "scheme:host/path" and "scheme:///host/path" will both be
6708     /// canonicalized to "scheme://host/path". The origin of a standard scheme URL
6709     /// is the combination of scheme, host and port (i.e., "scheme://host:port" in
6710     /// the most explicit case).
6711     //
6712     /// For non-standard scheme URLs only the "scheme:" component is parsed and
6713     /// canonicalized. The remainder of the URL will be passed to the handler as-
6714     /// is. For example, "scheme:///some%20text" will remain the same.
6715     /// Non-standard scheme URLs cannot be used as a target for form submission.
6716     ///
6717     CEF_SCHEME_OPTION_STANDARD = 1 << 0,
6718 
6719     ///
6720     /// If CEF_SCHEME_OPTION_LOCAL is set the scheme will be treated with the same
6721     /// security rules as those applied to "file" URLs. Normal pages cannot link
6722     /// to or access local URLs. Also, by default, local URLs can only perform
6723     /// XMLHttpRequest calls to the same URL (origin + path) that originated the
6724     /// request. To allow XMLHttpRequest calls from a local URL to other URLs with
6725     /// the same origin set the CefSettings.file_access_from_file_urls_allowed
6726     /// value to true (1). To allow XMLHttpRequest calls from a local URL to all
6727     /// origins set the CefSettings.universal_access_from_file_urls_allowed value
6728     /// to true (1).
6729     ///
6730     CEF_SCHEME_OPTION_LOCAL = 1 << 1,
6731 
6732     ///
6733     /// If CEF_SCHEME_OPTION_DISPLAY_ISOLATED is set the scheme can only be
6734     /// displayed from other content hosted with the same scheme. For example,
6735     /// pages in other origins cannot create iframes or hyperlinks to URLs with
6736     /// the scheme. For schemes that must be accessible from other schemes don't
6737     /// set this, set CEF_SCHEME_OPTION_CORS_ENABLED, and use CORS
6738     /// "Access-Control-Allow-Origin" headers to further restrict access.
6739     ///
6740     CEF_SCHEME_OPTION_DISPLAY_ISOLATED = 1 << 2,
6741 
6742     ///
6743     /// If CEF_SCHEME_OPTION_SECURE is set the scheme will be treated with the
6744     /// same security rules as those applied to "https" URLs. For example, loading
6745     /// this scheme from other secure schemes will not trigger mixed content
6746     /// warnings.
6747     ///
6748     CEF_SCHEME_OPTION_SECURE = 1 << 3,
6749 
6750     ///
6751     /// If CEF_SCHEME_OPTION_CORS_ENABLED is set the scheme can be sent CORS
6752     /// requests. This value should be set in most cases where
6753     /// CEF_SCHEME_OPTION_STANDARD is set.
6754     ///
6755     CEF_SCHEME_OPTION_CORS_ENABLED = 1 << 4,
6756 
6757     ///
6758     /// If CEF_SCHEME_OPTION_CSP_BYPASSING is set the scheme can bypass Content-
6759     /// Security-Policy (CSP) checks. This value should not be set in most cases
6760     /// where CEF_SCHEME_OPTION_STANDARD is set.
6761     ///
6762     CEF_SCHEME_OPTION_CSP_BYPASSING = 1 << 5,
6763 
6764     ///
6765     /// If CEF_SCHEME_OPTION_FETCH_ENABLED is set the scheme can perform Fetch API
6766     /// requests.
6767     ///
6768     CEF_SCHEME_OPTION_FETCH_ENABLED = 1 << 6
6769 }
6770 
6771 alias CEF_SCHEME_OPTION_NONE = cef_scheme_options_t.CEF_SCHEME_OPTION_NONE;
6772 alias CEF_SCHEME_OPTION_STANDARD = cef_scheme_options_t.CEF_SCHEME_OPTION_STANDARD;
6773 alias CEF_SCHEME_OPTION_LOCAL = cef_scheme_options_t.CEF_SCHEME_OPTION_LOCAL;
6774 alias CEF_SCHEME_OPTION_DISPLAY_ISOLATED = cef_scheme_options_t.CEF_SCHEME_OPTION_DISPLAY_ISOLATED;
6775 alias CEF_SCHEME_OPTION_SECURE = cef_scheme_options_t.CEF_SCHEME_OPTION_SECURE;
6776 alias CEF_SCHEME_OPTION_CORS_ENABLED = cef_scheme_options_t.CEF_SCHEME_OPTION_CORS_ENABLED;
6777 alias CEF_SCHEME_OPTION_CSP_BYPASSING = cef_scheme_options_t.CEF_SCHEME_OPTION_CSP_BYPASSING;
6778 alias CEF_SCHEME_OPTION_FETCH_ENABLED = cef_scheme_options_t.CEF_SCHEME_OPTION_FETCH_ENABLED;
6779 
6780 ///
6781 /// Structure representing a range.
6782 ///
6783 struct cef_range_t
6784 {
6785     uint from;
6786     uint to;
6787 }
6788 
6789 
6790 
6791 ///
6792 /// Composition underline style.
6793 ///
6794 enum cef_composition_underline_style_t
6795 {
6796     CEF_CUS_SOLID = 0,
6797     CEF_CUS_DOT = 1,
6798     CEF_CUS_DASH = 2,
6799     CEF_CUS_NONE = 3
6800 }
6801 
6802 alias CEF_CUS_SOLID = cef_composition_underline_style_t.CEF_CUS_SOLID;
6803 alias CEF_CUS_DOT = cef_composition_underline_style_t.CEF_CUS_DOT;
6804 alias CEF_CUS_DASH = cef_composition_underline_style_t.CEF_CUS_DASH;
6805 alias CEF_CUS_NONE = cef_composition_underline_style_t.CEF_CUS_NONE;
6806 
6807 ///
6808 /// Structure representing IME composition underline information. This is a thin
6809 /// wrapper around Blink's WebCompositionUnderline class and should be kept in
6810 /// sync with that.
6811 ///
6812 struct cef_composition_underline_t
6813 {
6814     ///
6815     /// Underline character range.
6816     ///
6817     cef_range_t range;
6818 
6819     ///
6820     /// Text color.
6821     ///
6822     cef_color_t color;
6823 
6824     ///
6825     /// Background color.
6826     ///
6827     cef_color_t background_color;
6828 
6829     ///
6830     /// Set to true (1) for thick underline.
6831     ///
6832     int thick;
6833 
6834     ///
6835     /// Style.
6836     ///
6837     cef_composition_underline_style_t style;
6838 }
6839 
6840 
6841 
6842 ///
6843 /// Enumerates the various representations of the ordering of audio channels.
6844 /// Must be kept synchronized with media::ChannelLayout from Chromium.
6845 /// See media\base\channel_layout.h
6846 ///
6847 enum cef_channel_layout_t
6848 {
6849     CEF_CHANNEL_LAYOUT_NONE = 0,
6850     CEF_CHANNEL_LAYOUT_UNSUPPORTED = 1,
6851 
6852     /// Front C
6853     CEF_CHANNEL_LAYOUT_MONO = 2,
6854 
6855     /// Front L, Front R
6856     CEF_CHANNEL_LAYOUT_STEREO = 3,
6857 
6858     /// Front L, Front R, Back C
6859     CEF_CHANNEL_LAYOUT_2_1 = 4,
6860 
6861     /// Front L, Front R, Front C
6862     CEF_CHANNEL_LAYOUT_SURROUND = 5,
6863 
6864     /// Front L, Front R, Front C, Back C
6865     CEF_CHANNEL_LAYOUT_4_0 = 6,
6866 
6867     /// Front L, Front R, Side L, Side R
6868     CEF_CHANNEL_LAYOUT_2_2 = 7,
6869 
6870     /// Front L, Front R, Back L, Back R
6871     CEF_CHANNEL_LAYOUT_QUAD = 8,
6872 
6873     /// Front L, Front R, Front C, Side L, Side R
6874     CEF_CHANNEL_LAYOUT_5_0 = 9,
6875 
6876     /// Front L, Front R, Front C, LFE, Side L, Side R
6877     CEF_CHANNEL_LAYOUT_5_1 = 10,
6878 
6879     /// Front L, Front R, Front C, Back L, Back R
6880     CEF_CHANNEL_LAYOUT_5_0_BACK = 11,
6881 
6882     /// Front L, Front R, Front C, LFE, Back L, Back R
6883     CEF_CHANNEL_LAYOUT_5_1_BACK = 12,
6884 
6885     /// Front L, Front R, Front C, Back L, Back R, Side L, Side R
6886     CEF_CHANNEL_LAYOUT_7_0 = 13,
6887 
6888     /// Front L, Front R, Front C, LFE, Back L, Back R, Side L, Side R
6889     CEF_CHANNEL_LAYOUT_7_1 = 14,
6890 
6891     /// Front L, Front R, Front C, LFE, Front LofC, Front RofC, Side L, Side R
6892     CEF_CHANNEL_LAYOUT_7_1_WIDE = 15,
6893 
6894     /// Front L, Front R
6895     CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX = 16,
6896 
6897     /// Front L, Front R, LFE
6898     CEF_CHANNEL_LAYOUT_2POINT1 = 17,
6899 
6900     /// Front L, Front R, Front C, LFE
6901     CEF_CHANNEL_LAYOUT_3_1 = 18,
6902 
6903     /// Front L, Front R, Front C, LFE, Back C
6904     CEF_CHANNEL_LAYOUT_4_1 = 19,
6905 
6906     /// Front L, Front R, Front C, Back C, Side L, Side R
6907     CEF_CHANNEL_LAYOUT_6_0 = 20,
6908 
6909     /// Front L, Front R, Front LofC, Front RofC, Side L, Side R
6910     CEF_CHANNEL_LAYOUT_6_0_FRONT = 21,
6911 
6912     /// Front L, Front R, Front C, Back L, Back R, Back C
6913     CEF_CHANNEL_LAYOUT_HEXAGONAL = 22,
6914 
6915     /// Front L, Front R, Front C, LFE, Back C, Side L, Side R
6916     CEF_CHANNEL_LAYOUT_6_1 = 23,
6917 
6918     /// Front L, Front R, Front C, LFE, Back L, Back R, Back C
6919     CEF_CHANNEL_LAYOUT_6_1_BACK = 24,
6920 
6921     /// Front L, Front R, LFE, Front LofC, Front RofC, Side L, Side R
6922     CEF_CHANNEL_LAYOUT_6_1_FRONT = 25,
6923 
6924     /// Front L, Front R, Front C, Front LofC, Front RofC, Side L, Side R
6925     CEF_CHANNEL_LAYOUT_7_0_FRONT = 26,
6926 
6927     /// Front L, Front R, Front C, LFE, Back L, Back R, Front LofC, Front RofC
6928     CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK = 27,
6929 
6930     /// Front L, Front R, Front C, Back L, Back R, Back C, Side L, Side R
6931     CEF_CHANNEL_LAYOUT_OCTAGONAL = 28,
6932 
6933     /// Channels are not explicitly mapped to speakers.
6934     CEF_CHANNEL_LAYOUT_DISCRETE = 29,
6935 
6936     /// Deprecated, but keeping the enum value for UMA consistency.
6937     /// Front L, Front R, Front C. Front C contains the keyboard mic audio. This
6938     /// layout is only intended for input for WebRTC. The Front C channel
6939     /// is stripped away in the WebRTC audio input pipeline and never seen outside
6940     /// of that.
6941     CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = 30,
6942 
6943     /// Front L, Front R, LFE, Side L, Side R
6944     CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE = 31,
6945 
6946     /// Actual channel layout is specified in the bitstream and the actual channel
6947     /// count is unknown at Chromium media pipeline level (useful for audio
6948     /// pass-through mode).
6949     CEF_CHANNEL_LAYOUT_BITSTREAM = 32,
6950 
6951     /// Front L, Front R, Front C, LFE, Side L, Side R,
6952     /// Front Height L, Front Height R, Rear Height L, Rear Height R
6953     /// Will be represented as six channels (5.1) due to eight channel limit
6954     /// kMaxConcurrentChannels
6955     CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX = 33,
6956 
6957     /// Front C, LFE
6958     CEF_CHANNEL_LAYOUT_1_1 = 34,
6959 
6960     /// Front L, Front R, LFE, Back C
6961     CEF_CHANNEL_LAYOUT_3_1_BACK = 35,
6962 
6963     /// Max value, must always equal the largest entry ever logged.
6964     CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_3_1_BACK
6965 }
6966 
6967 alias CEF_CHANNEL_LAYOUT_NONE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_NONE;
6968 alias CEF_CHANNEL_LAYOUT_UNSUPPORTED = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_UNSUPPORTED;
6969 alias CEF_CHANNEL_LAYOUT_MONO = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_MONO;
6970 alias CEF_CHANNEL_LAYOUT_STEREO = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO;
6971 alias CEF_CHANNEL_LAYOUT_2_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2_1;
6972 alias CEF_CHANNEL_LAYOUT_SURROUND = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_SURROUND;
6973 alias CEF_CHANNEL_LAYOUT_4_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_0;
6974 alias CEF_CHANNEL_LAYOUT_2_2 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2_2;
6975 alias CEF_CHANNEL_LAYOUT_QUAD = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_QUAD;
6976 alias CEF_CHANNEL_LAYOUT_5_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_0;
6977 alias CEF_CHANNEL_LAYOUT_5_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1;
6978 alias CEF_CHANNEL_LAYOUT_5_0_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_0_BACK;
6979 alias CEF_CHANNEL_LAYOUT_5_1_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1_BACK;
6980 alias CEF_CHANNEL_LAYOUT_7_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_0;
6981 alias CEF_CHANNEL_LAYOUT_7_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1;
6982 alias CEF_CHANNEL_LAYOUT_7_1_WIDE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1_WIDE;
6983 alias CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX;
6984 alias CEF_CHANNEL_LAYOUT_2POINT1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2POINT1;
6985 alias CEF_CHANNEL_LAYOUT_3_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_3_1;
6986 alias CEF_CHANNEL_LAYOUT_4_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_1;
6987 alias CEF_CHANNEL_LAYOUT_6_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_0;
6988 alias CEF_CHANNEL_LAYOUT_6_0_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_0_FRONT;
6989 alias CEF_CHANNEL_LAYOUT_HEXAGONAL = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_HEXAGONAL;
6990 alias CEF_CHANNEL_LAYOUT_6_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1;
6991 alias CEF_CHANNEL_LAYOUT_6_1_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1_BACK;
6992 alias CEF_CHANNEL_LAYOUT_6_1_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1_FRONT;
6993 alias CEF_CHANNEL_LAYOUT_7_0_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_0_FRONT;
6994 alias CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK;
6995 alias CEF_CHANNEL_LAYOUT_OCTAGONAL = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_OCTAGONAL;
6996 alias CEF_CHANNEL_LAYOUT_DISCRETE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_DISCRETE;
6997 alias CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC;
6998 alias CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE;
6999 alias CEF_CHANNEL_LAYOUT_BITSTREAM = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_BITSTREAM;
7000 alias CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX;
7001 alias CEF_CHANNEL_LAYOUT_1_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_1_1;
7002 alias CEF_CHANNEL_LAYOUT_3_1_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_3_1_BACK;
7003 alias CEF_CHANNEL_LAYOUT_MAX = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_MAX;
7004 
7005 ///
7006 /// Structure representing the audio parameters for setting up the audio
7007 /// handler.
7008 ///
7009 struct cef_audio_parameters_t
7010 {
7011     ///
7012     /// Layout of the audio channels
7013     ///
7014     cef_channel_layout_t channel_layout;
7015 
7016     ///
7017     /// Sample rate
7018     //
7019     int sample_rate;
7020 
7021     ///
7022     /// Number of frames per buffer
7023     ///
7024     int frames_per_buffer;
7025 }
7026 
7027 
7028 
7029 ///
7030 /// Result codes for CefMediaRouter::CreateRoute. Should be kept in sync with
7031 /// Chromium's media_router::mojom::RouteRequestResultCode type.
7032 ///
7033 enum cef_media_route_create_result_t
7034 {
7035     CEF_MRCR_UNKNOWN_ERROR = 0,
7036     CEF_MRCR_OK = 1,
7037     CEF_MRCR_TIMED_OUT = 2,
7038     CEF_MRCR_ROUTE_NOT_FOUND = 3,
7039     CEF_MRCR_SINK_NOT_FOUND = 4,
7040     CEF_MRCR_INVALID_ORIGIN = 5,
7041     CEF_MRCR_NO_SUPPORTED_PROVIDER = 7,
7042     CEF_MRCR_CANCELLED = 8,
7043     CEF_MRCR_ROUTE_ALREADY_EXISTS = 9,
7044     CEF_MRCR_ROUTE_ALREADY_TERMINATED = 11
7045 }
7046 
7047 alias CEF_MRCR_UNKNOWN_ERROR = cef_media_route_create_result_t.CEF_MRCR_UNKNOWN_ERROR;
7048 alias CEF_MRCR_OK = cef_media_route_create_result_t.CEF_MRCR_OK;
7049 alias CEF_MRCR_TIMED_OUT = cef_media_route_create_result_t.CEF_MRCR_TIMED_OUT;
7050 alias CEF_MRCR_ROUTE_NOT_FOUND = cef_media_route_create_result_t.CEF_MRCR_ROUTE_NOT_FOUND;
7051 alias CEF_MRCR_SINK_NOT_FOUND = cef_media_route_create_result_t.CEF_MRCR_SINK_NOT_FOUND;
7052 alias CEF_MRCR_INVALID_ORIGIN = cef_media_route_create_result_t.CEF_MRCR_INVALID_ORIGIN;
7053 alias CEF_MRCR_NO_SUPPORTED_PROVIDER = cef_media_route_create_result_t.CEF_MRCR_NO_SUPPORTED_PROVIDER;
7054 alias CEF_MRCR_CANCELLED = cef_media_route_create_result_t.CEF_MRCR_CANCELLED;
7055 alias CEF_MRCR_ROUTE_ALREADY_EXISTS = cef_media_route_create_result_t.CEF_MRCR_ROUTE_ALREADY_EXISTS;
7056 alias CEF_MRCR_ROUTE_ALREADY_TERMINATED = cef_media_route_create_result_t.CEF_MRCR_ROUTE_ALREADY_TERMINATED;
7057 
7058 ///
7059 /// Connection state for a MediaRoute object.
7060 ///
7061 enum cef_media_route_connection_state_t
7062 {
7063     CEF_MRCS_UNKNOWN = 0,
7064     CEF_MRCS_CONNECTING = 1,
7065     CEF_MRCS_CONNECTED = 2,
7066     CEF_MRCS_CLOSED = 3,
7067     CEF_MRCS_TERMINATED = 4
7068 }
7069 
7070 alias CEF_MRCS_UNKNOWN = cef_media_route_connection_state_t.CEF_MRCS_UNKNOWN;
7071 alias CEF_MRCS_CONNECTING = cef_media_route_connection_state_t.CEF_MRCS_CONNECTING;
7072 alias CEF_MRCS_CONNECTED = cef_media_route_connection_state_t.CEF_MRCS_CONNECTED;
7073 alias CEF_MRCS_CLOSED = cef_media_route_connection_state_t.CEF_MRCS_CLOSED;
7074 alias CEF_MRCS_TERMINATED = cef_media_route_connection_state_t.CEF_MRCS_TERMINATED;
7075 
7076 ///
7077 /// Icon types for a MediaSink object. Should be kept in sync with Chromium's
7078 /// media_router::SinkIconType type.
7079 ///
7080 enum cef_media_sink_icon_type_t
7081 {
7082     CEF_MSIT_CAST = 0,
7083     CEF_MSIT_CAST_AUDIO_GROUP = 1,
7084     CEF_MSIT_CAST_AUDIO = 2,
7085     CEF_MSIT_MEETING = 3,
7086     CEF_MSIT_HANGOUT = 4,
7087     CEF_MSIT_EDUCATION = 5,
7088     CEF_MSIT_WIRED_DISPLAY = 6,
7089     CEF_MSIT_GENERIC = 7,
7090 
7091     CEF_MSIT_TOTAL_COUNT = 8 // The total number of values.
7092 }
7093 
7094 alias CEF_MSIT_CAST = cef_media_sink_icon_type_t.CEF_MSIT_CAST;
7095 alias CEF_MSIT_CAST_AUDIO_GROUP = cef_media_sink_icon_type_t.CEF_MSIT_CAST_AUDIO_GROUP;
7096 alias CEF_MSIT_CAST_AUDIO = cef_media_sink_icon_type_t.CEF_MSIT_CAST_AUDIO;
7097 alias CEF_MSIT_MEETING = cef_media_sink_icon_type_t.CEF_MSIT_MEETING;
7098 alias CEF_MSIT_HANGOUT = cef_media_sink_icon_type_t.CEF_MSIT_HANGOUT;
7099 alias CEF_MSIT_EDUCATION = cef_media_sink_icon_type_t.CEF_MSIT_EDUCATION;
7100 alias CEF_MSIT_WIRED_DISPLAY = cef_media_sink_icon_type_t.CEF_MSIT_WIRED_DISPLAY;
7101 alias CEF_MSIT_GENERIC = cef_media_sink_icon_type_t.CEF_MSIT_GENERIC;
7102 alias CEF_MSIT_TOTAL_COUNT = cef_media_sink_icon_type_t.CEF_MSIT_TOTAL_COUNT;
7103 
7104 ///
7105 /// Device information for a MediaSink object.
7106 ///
7107 struct cef_media_sink_device_info_t
7108 {
7109     cef_string_t ip_address;
7110     int port;
7111     cef_string_t model_name;
7112 }
7113 
7114 
7115 
7116 ///
7117 /// Represents commands available to TextField.
7118 ///
7119 enum cef_text_field_commands_t
7120 {
7121     CEF_TFC_CUT = 1,
7122     CEF_TFC_COPY = 2,
7123     CEF_TFC_PASTE = 3,
7124     CEF_TFC_UNDO = 4,
7125     CEF_TFC_DELETE = 5,
7126     CEF_TFC_SELECT_ALL = 6
7127 }
7128 
7129 alias CEF_TFC_CUT = cef_text_field_commands_t.CEF_TFC_CUT;
7130 alias CEF_TFC_COPY = cef_text_field_commands_t.CEF_TFC_COPY;
7131 alias CEF_TFC_PASTE = cef_text_field_commands_t.CEF_TFC_PASTE;
7132 alias CEF_TFC_UNDO = cef_text_field_commands_t.CEF_TFC_UNDO;
7133 alias CEF_TFC_DELETE = cef_text_field_commands_t.CEF_TFC_DELETE;
7134 alias CEF_TFC_SELECT_ALL = cef_text_field_commands_t.CEF_TFC_SELECT_ALL;
7135 
7136 ///
7137 /// Chrome toolbar types.
7138 ///
7139 enum cef_chrome_toolbar_type_t
7140 {
7141     CEF_CTT_NONE = 1,
7142     CEF_CTT_NORMAL = 2,
7143     CEF_CTT_LOCATION = 3
7144 }
7145 
7146 alias CEF_CTT_NONE = cef_chrome_toolbar_type_t.CEF_CTT_NONE;
7147 alias CEF_CTT_NORMAL = cef_chrome_toolbar_type_t.CEF_CTT_NORMAL;
7148 alias CEF_CTT_LOCATION = cef_chrome_toolbar_type_t.CEF_CTT_LOCATION;
7149 
7150 ///
7151 /// Chrome page action icon types. Should be kept in sync with Chromium's
7152 /// PageActionIconType type.
7153 ///
7154 enum cef_chrome_page_action_icon_type_t
7155 {
7156     CEF_CPAIT_BOOKMARK_STAR = 0,
7157     CEF_CPAIT_CLICK_TO_CALL = 1,
7158     CEF_CPAIT_COOKIE_CONTROLS = 2,
7159     CEF_CPAIT_FILE_SYSTEM_ACCESS = 3,
7160     CEF_CPAIT_FIND = 4,
7161     CEF_CPAIT_MEMORY_SAVER = 5,
7162     CEF_CPAIT_INTENT_PICKER = 6,
7163     CEF_CPAIT_LOCAL_CARD_MIGRATION = 7,
7164     CEF_CPAIT_MANAGE_PASSWORDS = 8,
7165     CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION = 9,
7166     CEF_CPAIT_PRICE_TRACKING = 10,
7167     CEF_CPAIT_PWA_INSTALL = 11,
7168     CEF_CPAIT_QR_CODE_GENERATOR_DEPRECATED = 12,
7169     CEF_CPAIT_READER_MODE_DEPRECATED = 13,
7170     CEF_CPAIT_SAVE_AUTOFILL_ADDRESS = 14,
7171     CEF_CPAIT_SAVE_CARD = 15,
7172     CEF_CPAIT_SEND_TAB_TO_SELF_DEPRECATED = 16,
7173     CEF_CPAIT_SHARING_HUB = 17,
7174     CEF_CPAIT_SIDE_SEARCH = 18,
7175     CEF_CPAIT_SMS_REMOTE_FETCHER = 19,
7176     CEF_CPAIT_TRANSLATE = 20,
7177     CEF_CPAIT_VIRTUAL_CARD_ENROLL = 21,
7178     CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK = 22,
7179     CEF_CPAIT_ZOOM = 23,
7180     CEF_CPAIT_SAVE_IBAN = 24,
7181     CEF_CPAIT_MANDATORY_REAUTH = 25,
7182     CEF_CPAIT_PRICE_INSIGHTS = 26,
7183     CEF_CPAIT_PRICE_READ_ANYTHING = 27,
7184     CEF_CPAIT_PRODUCT_SPECIFICATIONS = 28,
7185     CEF_CPAIT_LENS_OVERLAY = 29,
7186     CEF_CPAIT_MAX_VALUE = CEF_CPAIT_LENS_OVERLAY
7187 }
7188 
7189 alias CEF_CPAIT_BOOKMARK_STAR = cef_chrome_page_action_icon_type_t.CEF_CPAIT_BOOKMARK_STAR;
7190 alias CEF_CPAIT_CLICK_TO_CALL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_CLICK_TO_CALL;
7191 alias CEF_CPAIT_COOKIE_CONTROLS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_COOKIE_CONTROLS;
7192 alias CEF_CPAIT_FILE_SYSTEM_ACCESS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_FILE_SYSTEM_ACCESS;
7193 alias CEF_CPAIT_FIND = cef_chrome_page_action_icon_type_t.CEF_CPAIT_FIND;
7194 alias CEF_CPAIT_MEMORY_SAVER = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MEMORY_SAVER;
7195 alias CEF_CPAIT_INTENT_PICKER = cef_chrome_page_action_icon_type_t.CEF_CPAIT_INTENT_PICKER;
7196 alias CEF_CPAIT_LOCAL_CARD_MIGRATION = cef_chrome_page_action_icon_type_t.CEF_CPAIT_LOCAL_CARD_MIGRATION;
7197 alias CEF_CPAIT_MANAGE_PASSWORDS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MANAGE_PASSWORDS;
7198 alias CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION;
7199 alias CEF_CPAIT_PRICE_TRACKING = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PRICE_TRACKING;
7200 alias CEF_CPAIT_PWA_INSTALL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PWA_INSTALL;
7201 alias CEF_CPAIT_QR_CODE_GENERATOR_DEPRECATED = cef_chrome_page_action_icon_type_t.CEF_CPAIT_QR_CODE_GENERATOR_DEPRECATED;
7202 alias CEF_CPAIT_READER_MODE_DEPRECATED = cef_chrome_page_action_icon_type_t.CEF_CPAIT_READER_MODE_DEPRECATED;
7203 alias CEF_CPAIT_SAVE_AUTOFILL_ADDRESS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_AUTOFILL_ADDRESS;
7204 alias CEF_CPAIT_SAVE_CARD = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_CARD;
7205 alias CEF_CPAIT_SEND_TAB_TO_SELF_DEPRECATED = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SEND_TAB_TO_SELF_DEPRECATED;
7206 alias CEF_CPAIT_SHARING_HUB = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SHARING_HUB;
7207 alias CEF_CPAIT_SIDE_SEARCH = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SIDE_SEARCH;
7208 alias CEF_CPAIT_SMS_REMOTE_FETCHER = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SMS_REMOTE_FETCHER;
7209 alias CEF_CPAIT_TRANSLATE = cef_chrome_page_action_icon_type_t.CEF_CPAIT_TRANSLATE;
7210 alias CEF_CPAIT_VIRTUAL_CARD_ENROLL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_VIRTUAL_CARD_ENROLL;
7211 alias CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK = cef_chrome_page_action_icon_type_t.CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK;
7212 alias CEF_CPAIT_ZOOM = cef_chrome_page_action_icon_type_t.CEF_CPAIT_ZOOM;
7213 alias CEF_CPAIT_SAVE_IBAN = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_IBAN;
7214 alias CEF_CPAIT_MANDATORY_REAUTH = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MANDATORY_REAUTH;
7215 alias CEF_CPAIT_PRICE_INSIGHTS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PRICE_INSIGHTS;
7216 alias CEF_CPAIT_PRICE_READ_ANYTHING = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PRICE_READ_ANYTHING;
7217 alias CEF_CPAIT_PRODUCT_SPECIFICATIONS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PRODUCT_SPECIFICATIONS;
7218 alias CEF_CPAIT_LENS_OVERLAY = cef_chrome_page_action_icon_type_t.CEF_CPAIT_LENS_OVERLAY;
7219 alias CEF_CPAIT_MAX_VALUE = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MAX_VALUE;
7220 
7221 ///
7222 /// Chrome toolbar button types. Should be kept in sync with CEF's internal
7223 /// ToolbarButtonType type.
7224 ///
7225 enum cef_chrome_toolbar_button_type_t
7226 {
7227     CEF_CTBT_CAST = 0,
7228     CEF_CTBT_DOWNLOAD = 1,
7229     CEF_CTBT_SEND_TAB_TO_SELF = 2,
7230     CEF_CTBT_SIDE_PANEL = 3,
7231     CEF_CTBT_MAX_VALUE = CEF_CTBT_SIDE_PANEL
7232 }
7233 
7234 alias CEF_CTBT_CAST = cef_chrome_toolbar_button_type_t.CEF_CTBT_CAST;
7235 alias CEF_CTBT_DOWNLOAD = cef_chrome_toolbar_button_type_t.CEF_CTBT_DOWNLOAD;
7236 alias CEF_CTBT_SEND_TAB_TO_SELF = cef_chrome_toolbar_button_type_t.CEF_CTBT_SEND_TAB_TO_SELF;
7237 alias CEF_CTBT_SIDE_PANEL = cef_chrome_toolbar_button_type_t.CEF_CTBT_SIDE_PANEL;
7238 alias CEF_CTBT_MAX_VALUE = cef_chrome_toolbar_button_type_t.CEF_CTBT_MAX_VALUE;
7239 
7240 ///
7241 /// Docking modes supported by CefWindow::AddOverlay.
7242 ///
7243 enum cef_docking_mode_t
7244 {
7245     CEF_DOCKING_MODE_TOP_LEFT = 1,
7246     CEF_DOCKING_MODE_TOP_RIGHT = 2,
7247     CEF_DOCKING_MODE_BOTTOM_LEFT = 3,
7248     CEF_DOCKING_MODE_BOTTOM_RIGHT = 4,
7249     CEF_DOCKING_MODE_CUSTOM = 5
7250 }
7251 
7252 alias CEF_DOCKING_MODE_TOP_LEFT = cef_docking_mode_t.CEF_DOCKING_MODE_TOP_LEFT;
7253 alias CEF_DOCKING_MODE_TOP_RIGHT = cef_docking_mode_t.CEF_DOCKING_MODE_TOP_RIGHT;
7254 alias CEF_DOCKING_MODE_BOTTOM_LEFT = cef_docking_mode_t.CEF_DOCKING_MODE_BOTTOM_LEFT;
7255 alias CEF_DOCKING_MODE_BOTTOM_RIGHT = cef_docking_mode_t.CEF_DOCKING_MODE_BOTTOM_RIGHT;
7256 alias CEF_DOCKING_MODE_CUSTOM = cef_docking_mode_t.CEF_DOCKING_MODE_CUSTOM;
7257 
7258 ///
7259 /// Show states supported by CefWindowDelegate::GetInitialShowState.
7260 ///
7261 enum cef_show_state_t
7262 {
7263     // Show the window as normal.
7264     CEF_SHOW_STATE_NORMAL = 1,
7265 
7266     // Show the window as minimized.
7267     CEF_SHOW_STATE_MINIMIZED = 2,
7268 
7269     // Show the window as maximized.
7270     CEF_SHOW_STATE_MAXIMIZED = 3,
7271 
7272     // Show the window as fullscreen.
7273     CEF_SHOW_STATE_FULLSCREEN = 4,
7274 
7275     // Show the window as hidden (no dock thumbnail).
7276     // Only supported on MacOS.
7277     CEF_SHOW_STATE_HIDDEN = 5
7278 }
7279 
7280 alias CEF_SHOW_STATE_NORMAL = cef_show_state_t.CEF_SHOW_STATE_NORMAL;
7281 alias CEF_SHOW_STATE_MINIMIZED = cef_show_state_t.CEF_SHOW_STATE_MINIMIZED;
7282 alias CEF_SHOW_STATE_MAXIMIZED = cef_show_state_t.CEF_SHOW_STATE_MAXIMIZED;
7283 alias CEF_SHOW_STATE_FULLSCREEN = cef_show_state_t.CEF_SHOW_STATE_FULLSCREEN;
7284 alias CEF_SHOW_STATE_HIDDEN = cef_show_state_t.CEF_SHOW_STATE_HIDDEN;
7285 
7286 ///
7287 /// Values indicating what state of the touch handle is set.
7288 ///
7289 enum cef_touch_handle_state_flags_t
7290 {
7291     CEF_THS_FLAG_NONE = 0,
7292     CEF_THS_FLAG_ENABLED = 1 << 0,
7293     CEF_THS_FLAG_ORIENTATION = 1 << 1,
7294     CEF_THS_FLAG_ORIGIN = 1 << 2,
7295     CEF_THS_FLAG_ALPHA = 1 << 3
7296 }
7297 
7298 alias CEF_THS_FLAG_NONE = cef_touch_handle_state_flags_t.CEF_THS_FLAG_NONE;
7299 alias CEF_THS_FLAG_ENABLED = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ENABLED;
7300 alias CEF_THS_FLAG_ORIENTATION = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ORIENTATION;
7301 alias CEF_THS_FLAG_ORIGIN = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ORIGIN;
7302 alias CEF_THS_FLAG_ALPHA = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ALPHA;
7303 
7304 struct cef_touch_handle_state_t
7305 {
7306     ///
7307     /// Touch handle id. Increments for each new touch handle.
7308     ///
7309     int touch_handle_id;
7310 
7311     ///
7312     /// Combination of cef_touch_handle_state_flags_t values indicating what state
7313     /// is set.
7314     ///
7315     uint flags;
7316 
7317     ///
7318     /// Enabled state. Only set if |flags| contains CEF_THS_FLAG_ENABLED.
7319     ///
7320     int enabled;
7321 
7322     ///
7323     /// Orientation state. Only set if |flags| contains CEF_THS_FLAG_ORIENTATION.
7324     ///
7325     cef_horizontal_alignment_t orientation;
7326     int mirror_vertical;
7327     int mirror_horizontal;
7328 
7329     ///
7330     /// Origin state. Only set if |flags| contains CEF_THS_FLAG_ORIGIN.
7331     ///
7332     cef_point_t origin;
7333 
7334     ///
7335     /// Alpha state. Only set if |flags| contains CEF_THS_FLAG_ALPHA.
7336     ///
7337     float alpha;
7338 }
7339 
7340 
7341 
7342 ///
7343 /// Media access permissions used by OnRequestMediaAccessPermission.
7344 ///
7345 enum cef_media_access_permission_types_t
7346 {
7347     ///
7348     /// No permission.
7349     ///
7350     CEF_MEDIA_PERMISSION_NONE = 0,
7351 
7352     ///
7353     /// Device audio capture permission.
7354     ///
7355     CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE = 1 << 0,
7356 
7357     ///
7358     /// Device video capture permission.
7359     ///
7360     CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE = 1 << 1,
7361 
7362     ///
7363     /// Desktop audio capture permission.
7364     ///
7365     CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE = 1 << 2,
7366 
7367     ///
7368     /// Desktop video capture permission.
7369     ///
7370     CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE = 1 << 3
7371 }
7372 
7373 alias CEF_MEDIA_PERMISSION_NONE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_NONE;
7374 alias CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE;
7375 alias CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE;
7376 alias CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE;
7377 alias CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE;
7378 
7379 ///
7380 /// Permission types used with OnShowPermissionPrompt. Some types are
7381 /// platform-specific or only supported with the Chrome runtime. Should be kept
7382 /// in sync with Chromium's permissions::RequestType type.
7383 ///
7384 enum cef_permission_request_types_t
7385 {
7386     CEF_PERMISSION_TYPE_NONE = 0,
7387     CEF_PERMISSION_TYPE_ACCESSIBILITY_EVENTS = 1 << 0,
7388     CEF_PERMISSION_TYPE_AR_SESSION = 1 << 1,
7389     CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = 1 << 2,
7390     CEF_PERMISSION_TYPE_CAMERA_STREAM = 1 << 3,
7391     CEF_PERMISSION_TYPE_CAPTURED_SURFACE_CONTROL = 1 << 4,
7392     CEF_PERMISSION_TYPE_CLIPBOARD = 1 << 5,
7393     CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = 1 << 6,
7394     CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 7,
7395     CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 8,
7396     CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 9,
7397     CEF_PERMISSION_TYPE_IDENTITY_PROVIDER = 1 << 10,
7398     CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 11,
7399     CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 12,
7400     CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 13,
7401     CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 14,
7402     CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 15,
7403     CEF_PERMISSION_TYPE_KEYBOARD_LOCK = 1 << 16,
7404     CEF_PERMISSION_TYPE_POINTER_LOCK = 1 << 17,
7405     CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 18,
7406     CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 19,
7407     CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 20,
7408     CEF_PERMISSION_TYPE_VR_SESSION = 1 << 21,
7409     CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 22,
7410     CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 << 23
7411 }
7412 
7413 alias CEF_PERMISSION_TYPE_NONE = cef_permission_request_types_t.CEF_PERMISSION_TYPE_NONE;
7414 alias CEF_PERMISSION_TYPE_ACCESSIBILITY_EVENTS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_ACCESSIBILITY_EVENTS;
7415 alias CEF_PERMISSION_TYPE_AR_SESSION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_AR_SESSION;
7416 alias CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM;
7417 alias CEF_PERMISSION_TYPE_CAMERA_STREAM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CAMERA_STREAM;
7418 alias CEF_PERMISSION_TYPE_CAPTURED_SURFACE_CONTROL = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CAPTURED_SURFACE_CONTROL;
7419 alias CEF_PERMISSION_TYPE_CLIPBOARD = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CLIPBOARD;
7420 alias CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS;
7421 alias CEF_PERMISSION_TYPE_DISK_QUOTA = cef_permission_request_types_t.CEF_PERMISSION_TYPE_DISK_QUOTA;
7422 alias CEF_PERMISSION_TYPE_LOCAL_FONTS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_LOCAL_FONTS;
7423 alias CEF_PERMISSION_TYPE_GEOLOCATION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_GEOLOCATION;
7424 alias CEF_PERMISSION_TYPE_IDENTITY_PROVIDER = cef_permission_request_types_t.CEF_PERMISSION_TYPE_IDENTITY_PROVIDER;
7425 alias CEF_PERMISSION_TYPE_IDLE_DETECTION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_IDLE_DETECTION;
7426 alias CEF_PERMISSION_TYPE_MIC_STREAM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MIC_STREAM;
7427 alias CEF_PERMISSION_TYPE_MIDI_SYSEX = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MIDI_SYSEX;
7428 alias CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS;
7429 alias CEF_PERMISSION_TYPE_NOTIFICATIONS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_NOTIFICATIONS;
7430 alias CEF_PERMISSION_TYPE_KEYBOARD_LOCK = cef_permission_request_types_t.CEF_PERMISSION_TYPE_KEYBOARD_LOCK;
7431 alias CEF_PERMISSION_TYPE_POINTER_LOCK = cef_permission_request_types_t.CEF_PERMISSION_TYPE_POINTER_LOCK;
7432 alias CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = cef_permission_request_types_t.CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER;
7433 alias CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = cef_permission_request_types_t.CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER;
7434 alias CEF_PERMISSION_TYPE_STORAGE_ACCESS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_STORAGE_ACCESS;
7435 alias CEF_PERMISSION_TYPE_VR_SESSION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_VR_SESSION;
7436 alias CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = cef_permission_request_types_t.CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT;
7437 alias CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS;
7438 
7439 ///
7440 /// Permission request results.
7441 ///
7442 enum cef_permission_request_result_t
7443 {
7444     ///
7445     /// Accept the permission request as an explicit user action.
7446     ///
7447     CEF_PERMISSION_RESULT_ACCEPT = 0,
7448 
7449     ///
7450     /// Deny the permission request as an explicit user action.
7451     ///
7452     CEF_PERMISSION_RESULT_DENY = 1,
7453 
7454     ///
7455     /// Dismiss the permission request as an explicit user action.
7456     ///
7457     CEF_PERMISSION_RESULT_DISMISS = 2,
7458 
7459     ///
7460     /// Ignore the permission request. If the prompt remains unhandled (e.g.
7461     /// OnShowPermissionPrompt returns false and there is no default permissions
7462     /// UI) then any related promises may remain unresolved.
7463     ///
7464     CEF_PERMISSION_RESULT_IGNORE = 3
7465 }
7466 
7467 alias CEF_PERMISSION_RESULT_ACCEPT = cef_permission_request_result_t.CEF_PERMISSION_RESULT_ACCEPT;
7468 alias CEF_PERMISSION_RESULT_DENY = cef_permission_request_result_t.CEF_PERMISSION_RESULT_DENY;
7469 alias CEF_PERMISSION_RESULT_DISMISS = cef_permission_request_result_t.CEF_PERMISSION_RESULT_DISMISS;
7470 alias CEF_PERMISSION_RESULT_IGNORE = cef_permission_request_result_t.CEF_PERMISSION_RESULT_IGNORE;
7471 
7472 ///
7473 /// Certificate types supported by CefTestServer::CreateAndStart. The matching
7474 /// certificate file must exist in the "net/data/ssl/certificates" directory.
7475 /// See CefSetDataDirectoryForTests() for related configuration.
7476 ///
7477 enum cef_test_cert_type_t
7478 {
7479     /// Valid certificate using the IP (127.0.0.1). Loads the "ok_cert.pem" file.
7480     CEF_TEST_CERT_OK_IP = 0,
7481 
7482     /// Valid certificate using the domain ("localhost"). Loads the
7483     /// "localhost_cert.pem" file.
7484     CEF_TEST_CERT_OK_DOMAIN = 1,
7485 
7486     /// Expired certificate. Loads the "expired_cert.pem" file.
7487     CEF_TEST_CERT_EXPIRED = 2
7488 }
7489 
7490 alias CEF_TEST_CERT_OK_IP = cef_test_cert_type_t.CEF_TEST_CERT_OK_IP;
7491 alias CEF_TEST_CERT_OK_DOMAIN = cef_test_cert_type_t.CEF_TEST_CERT_OK_DOMAIN;
7492 alias CEF_TEST_CERT_EXPIRED = cef_test_cert_type_t.CEF_TEST_CERT_EXPIRED;
7493 
7494 ///
7495 /// Preferences type passed to
7496 /// CefBrowserProcessHandler::OnRegisterCustomPreferences.
7497 ///
7498 enum cef_preferences_type_t
7499 {
7500     /// Global preferences registered a single time at application startup.
7501     CEF_PREFERENCES_TYPE_GLOBAL = 0,
7502 
7503     /// Request context preferences registered each time a new CefRequestContext
7504     /// is created.
7505     CEF_PREFERENCES_TYPE_REQUEST_CONTEXT = 1
7506 }
7507 
7508 alias CEF_PREFERENCES_TYPE_GLOBAL = cef_preferences_type_t.CEF_PREFERENCES_TYPE_GLOBAL;
7509 alias CEF_PREFERENCES_TYPE_REQUEST_CONTEXT = cef_preferences_type_t.CEF_PREFERENCES_TYPE_REQUEST_CONTEXT;
7510 
7511 ///
7512 /// Download interrupt reasons. Should be kept in sync with
7513 /// Chromium's download::DownloadInterruptReason type.
7514 ///
7515 enum cef_download_interrupt_reason_t
7516 {
7517     CEF_DOWNLOAD_INTERRUPT_REASON_NONE = 0,
7518 
7519     /// Generic file operation failure.
7520     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED = 1,
7521 
7522     /// The file cannot be accessed due to security restrictions.
7523     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED = 2,
7524 
7525     /// There is not enough room on the drive.
7526     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE = 3,
7527 
7528     /// The directory or file name is too long.
7529     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG = 5,
7530 
7531     /// The file is too large for the file system to handle.
7532     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE = 6,
7533 
7534     /// The file contains a virus.
7535     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED = 7,
7536 
7537     /// The file was in use. Too many files are opened at once. We have run out of
7538     /// memory.
7539     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR = 10,
7540 
7541     /// The file was blocked due to local policy.
7542     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED = 11,
7543 
7544     /// An attempt to check the safety of the download failed due to unexpected
7545     /// reasons. See http://crbug.com/153212.
7546     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED = 12,
7547 
7548     /// An attempt was made to seek past the end of a file in opening
7549     /// a file (as part of resuming a previously interrupted download).
7550     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT = 13,
7551 
7552     /// The partial file didn't match the expected hash.
7553     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH = 14,
7554 
7555     /// The source and the target of the download were the same.
7556     CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE = 15,
7557 
7558     // Network errors.
7559 
7560     /// Generic network failure.
7561     CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED = 20,
7562 
7563     /// The network operation timed out.
7564     CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT = 21,
7565 
7566     /// The network connection has been lost.
7567     CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED = 22,
7568 
7569     /// The server has gone down.
7570     CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN = 23,
7571 
7572     /// The network request was invalid. This may be due to the original URL or a
7573     /// redirected URL:
7574     /// - Having an unsupported scheme.
7575     /// - Being an invalid URL.
7576     /// - Being disallowed by policy.
7577     CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST = 24,
7578 
7579     // Server responses.
7580 
7581     /// The server indicates that the operation has failed (generic).
7582     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED = 30,
7583 
7584     /// The server does not support range requests.
7585     /// Internal use only:  must restart from the beginning.
7586     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE = 31,
7587 
7588     /// The server does not have the requested data.
7589     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT = 33,
7590 
7591     /// Server didn't authorize access to resource.
7592     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED = 34,
7593 
7594     /// Server certificate problem.
7595     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM = 35,
7596 
7597     /// Server access forbidden.
7598     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN = 36,
7599 
7600     /// Unexpected server response. This might indicate that the responding server
7601     /// may not be the intended server.
7602     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE = 37,
7603 
7604     /// The server sent fewer bytes than the content-length header. It may
7605     /// indicate that the connection was closed prematurely, or the Content-Length
7606     /// header was invalid. The download is only interrupted if strong validators
7607     /// are present. Otherwise, it is treated as finished.
7608     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH = 38,
7609 
7610     /// An unexpected cross-origin redirect happened.
7611     CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT = 39,
7612 
7613     // User input.
7614 
7615     /// The user canceled the download.
7616     CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED = 40,
7617 
7618     /// The user shut down the browser.
7619     /// Internal use only:  resume pending downloads if possible.
7620     CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN = 41,
7621 
7622     // Crash.
7623 
7624     /// The browser crashed.
7625     /// Internal use only:  resume pending downloads if possible.
7626     CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = 50
7627 }
7628 
7629 alias CEF_DOWNLOAD_INTERRUPT_REASON_NONE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NONE;
7630 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
7631 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED;
7632 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE;
7633 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG;
7634 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE;
7635 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED;
7636 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR;
7637 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED;
7638 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED;
7639 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT;
7640 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH;
7641 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE;
7642 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED;
7643 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT;
7644 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED;
7645 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN;
7646 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST;
7647 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED;
7648 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE;
7649 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT;
7650 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED;
7651 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM;
7652 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN;
7653 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE;
7654 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH;
7655 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT;
7656 alias CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED;
7657 alias CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN;
7658 alias CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_CRASH;
7659 
7660 ///
7661 /// Specifies the gesture commands.
7662 ///
7663 enum cef_gesture_command_t
7664 {
7665     CEF_GESTURE_COMMAND_BACK = 0,
7666     CEF_GESTURE_COMMAND_FORWARD = 1
7667 }
7668 
7669 alias CEF_GESTURE_COMMAND_BACK = cef_gesture_command_t.CEF_GESTURE_COMMAND_BACK;
7670 alias CEF_GESTURE_COMMAND_FORWARD = cef_gesture_command_t.CEF_GESTURE_COMMAND_FORWARD;
7671 
7672 ///
7673 /// Specifies the zoom commands supported by CefBrowserHost::Zoom.
7674 ///
7675 enum cef_zoom_command_t
7676 {
7677     CEF_ZOOM_COMMAND_OUT = 0,
7678     CEF_ZOOM_COMMAND_RESET = 1,
7679     CEF_ZOOM_COMMAND_IN = 2
7680 }
7681 
7682 alias CEF_ZOOM_COMMAND_OUT = cef_zoom_command_t.CEF_ZOOM_COMMAND_OUT;
7683 alias CEF_ZOOM_COMMAND_RESET = cef_zoom_command_t.CEF_ZOOM_COMMAND_RESET;
7684 alias CEF_ZOOM_COMMAND_IN = cef_zoom_command_t.CEF_ZOOM_COMMAND_IN;
7685 
7686 ///
7687 /// Specifies the color variants supported by
7688 /// CefRequestContext::SetChromeThemeColor.
7689 ///
7690 enum cef_color_variant_t
7691 {
7692     CEF_COLOR_VARIANT_SYSTEM = 0,
7693     CEF_COLOR_VARIANT_LIGHT = 1,
7694     CEF_COLOR_VARIANT_DARK = 2,
7695     CEF_COLOR_VARIANT_TONAL_SPOT = 3,
7696     CEF_COLOR_VARIANT_NEUTRAL = 4,
7697     CEF_COLOR_VARIANT_VIBRANT = 5,
7698     CEF_COLOR_VARIANT_EXPRESSIVE = 6
7699 }
7700 
7701 alias CEF_COLOR_VARIANT_SYSTEM = cef_color_variant_t.CEF_COLOR_VARIANT_SYSTEM;
7702 alias CEF_COLOR_VARIANT_LIGHT = cef_color_variant_t.CEF_COLOR_VARIANT_LIGHT;
7703 alias CEF_COLOR_VARIANT_DARK = cef_color_variant_t.CEF_COLOR_VARIANT_DARK;
7704 alias CEF_COLOR_VARIANT_TONAL_SPOT = cef_color_variant_t.CEF_COLOR_VARIANT_TONAL_SPOT;
7705 alias CEF_COLOR_VARIANT_NEUTRAL = cef_color_variant_t.CEF_COLOR_VARIANT_NEUTRAL;
7706 alias CEF_COLOR_VARIANT_VIBRANT = cef_color_variant_t.CEF_COLOR_VARIANT_VIBRANT;
7707 alias CEF_COLOR_VARIANT_EXPRESSIVE = cef_color_variant_t.CEF_COLOR_VARIANT_EXPRESSIVE;
7708 
7709 // CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
7710 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
7711 //
7712 // Redistribution and use in source and binary forms, with or without
7713 // modification, are permitted provided that the following conditions are
7714 // met:
7715 //
7716 //    * Redistributions of source code must retain the above copyright
7717 // notice, this list of conditions and the following disclaimer.
7718 //    * Redistributions in binary form must reproduce the above
7719 // copyright notice, this list of conditions and the following disclaimer
7720 // in the documentation and/or other materials provided with the
7721 // distribution.
7722 //    * Neither the name of Google Inc. nor the name Chromium Embedded
7723 // Framework nor the names of its contributors may be used to endorse
7724 // or promote products derived from this software without specific prior
7725 // written permission.
7726 //
7727 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7728 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7729 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7730 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7731 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7732 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7733 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7734 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
7735 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7736 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7737 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7738 //
7739 // ---------------------------------------------------------------------------
7740 //
7741 // This file was generated by the CEF translator tool and should not edited
7742 // by hand. See the translator.README.txt file in the tools directory for
7743 // more information.
7744 //
7745 // $hash=6ea5d772fb4961ae4a658b4b730aa608fa93309f$
7746 //
7747 
7748 extern (C):
7749 
7750 ///
7751 /// Implement this structure to receive accessibility notification when
7752 /// accessibility events have been registered. The functions of this structure
7753 /// will be called on the UI thread.
7754 ///
7755 struct cef_accessibility_handler_t
7756 {
7757     ///
7758     /// Base structure.
7759     ///
7760 
7761     ///
7762     /// Called after renderer process sends accessibility tree changes to the
7763     /// browser process.
7764     ///
7765 
7766     ///
7767     /// Called after renderer process sends accessibility location changes to the
7768     /// browser process.
7769     ///
7770 
7771     // CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_
7772 
7773     cef_base_ref_counted_t base;
7774     extern(System) void function (
7775         cef_accessibility_handler_t* self,
7776         cef_value_t* value) nothrow on_accessibility_tree_change;
7777     extern(System) void function (
7778         cef_accessibility_handler_t* self,
7779         cef_value_t* value) nothrow on_accessibility_location_change;
7780 }
7781 
7782 
7783 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
7784 //
7785 // Redistribution and use in source and binary forms, with or without
7786 // modification, are permitted provided that the following conditions are
7787 // met:
7788 //
7789 //    * Redistributions of source code must retain the above copyright
7790 // notice, this list of conditions and the following disclaimer.
7791 //    * Redistributions in binary form must reproduce the above
7792 // copyright notice, this list of conditions and the following disclaimer
7793 // in the documentation and/or other materials provided with the
7794 // distribution.
7795 //    * Neither the name of Google Inc. nor the name Chromium Embedded
7796 // Framework nor the names of its contributors may be used to endorse
7797 // or promote products derived from this software without specific prior
7798 // written permission.
7799 //
7800 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7801 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7802 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7803 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7804 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7805 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7806 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7807 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
7808 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7809 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7810 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7811 //
7812 // ---------------------------------------------------------------------------
7813 //
7814 // This file was generated by the CEF translator tool and should not edited
7815 // by hand. See the translator.README.txt file in the tools directory for
7816 // more information.
7817 //
7818 // $hash=dfa0d4d2da319b2fd5e92324fd14301b500ceb5c$
7819 //
7820 
7821 extern (C):
7822 
7823 ///
7824 /// Implement this structure to provide handler implementations. Methods will be
7825 /// called by the process and/or thread indicated.
7826 ///
7827 struct cef_app_t
7828 {
7829     ///
7830     /// Base structure.
7831     ///
7832 
7833     ///
7834     /// Provides an opportunity to view and/or modify command-line arguments
7835     /// before processing by CEF and Chromium. The |process_type| value will be
7836     /// NULL for the browser process. Do not keep a reference to the
7837     /// cef_command_line_t object passed to this function. The
7838     /// cef_settings_t.command_line_args_disabled value can be used to start with
7839     /// an NULL command-line object. Any values specified in CefSettings that
7840 
7841     cef_base_ref_counted_t base;
7842     /// equate to command-line arguments will be set before this function is
7843     /// called. Be cautious when using this function to modify command-line
7844     /// arguments for non-browser processes as this may result in undefined
7845     /// behavior including crashes.
7846     ///
7847     extern(System) void function (
7848         cef_app_t* self,
7849         const(cef_string_t)* process_type,
7850         cef_command_line_t* command_line) nothrow on_before_command_line_processing;
7851 
7852     ///
7853     /// Provides an opportunity to register custom schemes. Do not keep a
7854     /// reference to the |registrar| object. This function is called on the main
7855     /// thread for each process and the registered schemes should be the same
7856     /// across all processes.
7857     ///
7858     extern(System) void function (
7859         cef_app_t* self,
7860         cef_scheme_registrar_t* registrar) nothrow on_register_custom_schemes;
7861 
7862     ///
7863     /// Return the handler for resource bundle events. If
7864     /// cef_settings_t.pack_loading_disabled is true (1) a handler must be
7865     /// returned. If no handler is returned resources will be loaded from pack
7866     /// files. This function is called by the browser and render processes on
7867     /// multiple threads.
7868     ///
7869     extern(System) cef_resource_bundle_handler_t* function (
7870         cef_app_t* self) nothrow get_resource_bundle_handler;
7871 
7872     ///
7873     /// Return the handler for functionality specific to the browser process. This
7874     /// function is called on multiple threads in the browser process.
7875     ///
7876     extern(System) cef_browser_process_handler_t* function (
7877         cef_app_t* self) nothrow get_browser_process_handler;
7878 
7879     ///
7880     /// Return the handler for functionality specific to the render process. This
7881     /// function is called on the render process main thread.
7882     ///
7883     extern(System) cef_render_process_handler_t* function (
7884         cef_app_t* self) nothrow get_render_process_handler;
7885 }
7886 
7887 
7888 
7889 ///
7890 /// This function should be called from the application entry point function to
7891 /// execute a secondary process. It can be used to run secondary processes from
7892 /// the browser client executable (default behavior) or from a separate
7893 /// executable specified by the cef_settings_t.browser_subprocess_path value. If
7894 /// called for the browser process (identified by no "type" command-line value)
7895 /// it will return immediately with a value of -1. If called for a recognized
7896 /// secondary process it will block until the process should exit and then
7897 /// return the process exit code. The |application| parameter may be NULL. The
7898 /// |windows_sandbox_info| parameter is only used on Windows and may be NULL
7899 /// (see cef_sandbox_win.h for details).
7900 ///
7901 int cef_execute_process (
7902     const(cef_main_args_t)* args,
7903     cef_app_t* application,
7904     void* windows_sandbox_info);
7905 
7906 ///
7907 /// This function should be called on the main application thread to initialize
7908 /// the CEF browser process. The |application| parameter may be NULL. Returns
7909 /// true (1) if initialization succeeds. Returns false (0) if initialization
7910 /// fails or if early exit is desired (for example, due to process singleton
7911 /// relaunch behavior). If this function returns false (0) then the application
7912 /// should exit immediately without calling any other CEF functions except,
7913 /// optionally, CefGetErrorCode. The |windows_sandbox_info| parameter is only
7914 /// used on Windows and may be NULL (see cef_sandbox_win.h for details).
7915 ///
7916 int cef_initialize (
7917     const(cef_main_args_t)* args,
7918     const(cef_settings_t)* settings,
7919     cef_app_t* application,
7920     void* windows_sandbox_info);
7921 
7922 ///
7923 /// This function can optionally be called on the main application thread after
7924 /// CefInitialize to retrieve the initialization exit code. When CefInitialize
7925 /// returns true (1) the exit code will be 0 (CEF_RESULT_CODE_NORMAL_EXIT).
7926 /// Otherwise, see cef_resultcode_t for possible exit code values including
7927 /// browser process initialization errors and normal early exit conditions (such
7928 /// as CEF_RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED for process singleton
7929 /// relaunch behavior).
7930 ///
7931 int cef_get_exit_code ();
7932 
7933 ///
7934 /// This function should be called on the main application thread to shut down
7935 /// the CEF browser process before the application exits. Do not call any other
7936 /// CEF functions after calling this function.
7937 ///
7938 void cef_shutdown ();
7939 
7940 ///
7941 /// Perform a single iteration of CEF message loop processing. This function is
7942 /// provided for cases where the CEF message loop must be integrated into an
7943 /// existing application message loop. Use of this function is not recommended
7944 /// for most users; use either the cef_run_message_loop() function or
7945 /// cef_settings_t.multi_threaded_message_loop if possible. When using this
7946 /// function care must be taken to balance performance against excessive CPU
7947 /// usage. It is recommended to enable the cef_settings_t.external_message_pump
7948 /// option when using this function so that
7949 /// cef_browser_process_handler_t::on_schedule_message_pump_work() callbacks can
7950 /// facilitate the scheduling process. This function should only be called on
7951 /// the main application thread and only if cef_initialize() is called with a
7952 /// cef_settings_t.multi_threaded_message_loop value of false (0). This function
7953 /// will not block.
7954 ///
7955 void cef_do_message_loop_work ();
7956 
7957 ///
7958 /// Run the CEF message loop. Use this function instead of an application-
7959 /// provided message loop to get the best balance between performance and CPU
7960 /// usage. This function should only be called on the main application thread
7961 /// and only if cef_initialize() is called with a
7962 /// cef_settings_t.multi_threaded_message_loop value of false (0). This function
7963 /// will block until a quit message is received by the system.
7964 ///
7965 void cef_run_message_loop ();
7966 
7967 ///
7968 /// Quit the CEF message loop that was started by calling
7969 /// cef_run_message_loop(). This function should only be called on the main
7970 /// application thread and only if cef_run_message_loop() was used.
7971 ///
7972 void cef_quit_message_loop ();
7973 
7974 // CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_
7975 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
7976 //
7977 // Redistribution and use in source and binary forms, with or without
7978 // modification, are permitted provided that the following conditions are
7979 // met:
7980 //
7981 //    * Redistributions of source code must retain the above copyright
7982 // notice, this list of conditions and the following disclaimer.
7983 //    * Redistributions in binary form must reproduce the above
7984 // copyright notice, this list of conditions and the following disclaimer
7985 // in the documentation and/or other materials provided with the
7986 // distribution.
7987 //    * Neither the name of Google Inc. nor the name Chromium Embedded
7988 // Framework nor the names of its contributors may be used to endorse
7989 // or promote products derived from this software without specific prior
7990 // written permission.
7991 //
7992 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7993 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7994 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7995 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7996 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7997 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7998 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7999 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8000 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8001 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8002 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8003 //
8004 // ---------------------------------------------------------------------------
8005 //
8006 // This file was generated by the CEF translator tool and should not edited
8007 // by hand. See the translator.README.txt file in the tools directory for
8008 // more information.
8009 //
8010 // $hash=d98482eba93dcd8b6a6f69b2732162733c73203d$
8011 //
8012 
8013 extern (C):
8014 
8015 ///
8016 /// Implement this structure to handle audio events.
8017 ///
8018 struct cef_audio_handler_t
8019 {
8020     ///
8021     /// Base structure.
8022     ///
8023 
8024     ///
8025     /// Called on the UI thread to allow configuration of audio stream parameters.
8026     /// Return true (1) to proceed with audio stream capture, or false (0) to
8027     /// cancel it. All members of |params| can optionally be configured here, but
8028     /// they are also pre-filled with some sensible defaults.
8029     ///
8030 
8031     ///
8032     /// Called on a browser audio capture thread when the browser starts streaming
8033     /// audio. OnAudioStreamStopped will always be called after
8034     /// OnAudioStreamStarted; both functions may be called multiple times for the
8035 
8036     cef_base_ref_counted_t base;
8037     extern(System) int function (
8038         cef_audio_handler_t* self,
8039         cef_browser_t* browser,
8040         cef_audio_parameters_t* params) nothrow get_audio_parameters;
8041     /// same browser. |params| contains the audio parameters like sample rate and
8042     /// channel layout. |channels| is the number of channels.
8043     ///
8044     extern(System) void function (
8045         cef_audio_handler_t* self,
8046         cef_browser_t* browser,
8047         const(cef_audio_parameters_t)* params,
8048         int channels) nothrow on_audio_stream_started;
8049 
8050     ///
8051     /// Called on the audio stream thread when a PCM packet is received for the
8052     /// stream. |data| is an array representing the raw PCM data as a floating
8053     /// point type, i.e. 4-byte value(s). |frames| is the number of frames in the
8054     /// PCM packet. |pts| is the presentation timestamp (in milliseconds since the
8055     /// Unix Epoch) and represents the time at which the decompressed packet
8056     /// should be presented to the user. Based on |frames| and the
8057     /// |channel_layout| value passed to OnAudioStreamStarted you can calculate
8058     /// the size of the |data| array in bytes.
8059     ///
8060     extern(System) void function (
8061         cef_audio_handler_t* self,
8062         cef_browser_t* browser,
8063         const(float*)* data,
8064         int frames,
8065         long pts) nothrow on_audio_stream_packet;
8066 
8067     ///
8068     /// Called on the UI thread when the stream has stopped. OnAudioSteamStopped
8069     /// will always be called after OnAudioStreamStarted; both functions may be
8070     /// called multiple times for the same stream.
8071     ///
8072     extern(System) void function (
8073         cef_audio_handler_t* self,
8074         cef_browser_t* browser) nothrow on_audio_stream_stopped;
8075 
8076     ///
8077     /// Called on the UI or audio stream thread when an error occurred. During the
8078     /// stream creation phase this callback will be called on the UI thread while
8079     /// in the capturing phase it will be called on the audio stream thread. The
8080     /// stream will be stopped immediately.
8081     ///
8082     extern(System) void function (
8083         cef_audio_handler_t* self,
8084         cef_browser_t* browser,
8085         const(cef_string_t)* message) nothrow on_audio_stream_error;
8086 }
8087 
8088 
8089 
8090 // CEF_INCLUDE_CAPI_CEF_AUDIO_HANDLER_CAPI_H_
8091 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
8092 //
8093 // Redistribution and use in source and binary forms, with or without
8094 // modification, are permitted provided that the following conditions are
8095 // met:
8096 //
8097 //    * Redistributions of source code must retain the above copyright
8098 // notice, this list of conditions and the following disclaimer.
8099 //    * Redistributions in binary form must reproduce the above
8100 // copyright notice, this list of conditions and the following disclaimer
8101 // in the documentation and/or other materials provided with the
8102 // distribution.
8103 //    * Neither the name of Google Inc. nor the name Chromium Embedded
8104 // Framework nor the names of its contributors may be used to endorse
8105 // or promote products derived from this software without specific prior
8106 // written permission.
8107 //
8108 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
8109 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
8110 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8111 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8112 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8113 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8114 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
8115 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8116 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8117 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8118 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8119 //
8120 // ---------------------------------------------------------------------------
8121 //
8122 // This file was generated by the CEF translator tool and should not edited
8123 // by hand. See the translator.README.txt file in the tools directory for
8124 // more information.
8125 //
8126 // $hash=b63947918eca8c31790cae16b2e8a0be7e9464dd$
8127 //
8128 
8129 extern (C):
8130 
8131 ///
8132 /// Callback structure used for asynchronous continuation of authentication
8133 /// requests.
8134 ///
8135 struct cef_auth_callback_t
8136 {
8137     ///
8138     /// Base structure.
8139     ///
8140 
8141     ///
8142     /// Continue the authentication request.
8143     ///
8144 
8145     ///
8146     /// Cancel the authentication request.
8147     ///
8148 
8149     // CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_
8150 
8151     cef_base_ref_counted_t base;
8152     extern(System) void function (
8153         cef_auth_callback_t* self,
8154         const(cef_string_t)* username,
8155         const(cef_string_t)* password) nothrow cont;
8156     extern(System) void function (cef_auth_callback_t* self) nothrow cancel;
8157 }
8158 
8159 
8160 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
8161 //
8162 // Redistribution and use in source and binary forms, with or without
8163 // modification, are permitted provided that the following conditions are
8164 // met:
8165 //
8166 //    * Redistributions of source code must retain the above copyright
8167 // notice, this list of conditions and the following disclaimer.
8168 //    * Redistributions in binary form must reproduce the above
8169 // copyright notice, this list of conditions and the following disclaimer
8170 // in the documentation and/or other materials provided with the
8171 // distribution.
8172 //    * Neither the name of Google Inc. nor the name Chromium Embedded
8173 // Framework nor the names of its contributors may be used to endorse
8174 // or promote products derived from this software without specific prior
8175 // written permission.
8176 //
8177 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
8178 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
8179 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8180 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8181 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8182 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8183 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
8184 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8185 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8186 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8187 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8188 
8189 import core.stdc.config;
8190 
8191 extern (C):
8192 
8193 ///
8194 // All ref-counted framework structures must include this structure first.
8195 ///
8196 struct cef_base_ref_counted_t
8197 {
8198     ///
8199     // Size of the data structure.
8200     ///
8201 
8202     ///
8203     // Called to increment the reference count for the object. Should be called
8204     // for every new copy of a pointer to a given object.
8205     ///
8206 
8207     ///
8208     // Called to decrement the reference count for the object. If the reference
8209     alias size_t = c_ulong;
8210     size_t size;
8211     extern(System) void function (cef_base_ref_counted_t* self) nothrow add_ref;
8212     // count falls to 0 the object should self-delete. Returns true (1) if the
8213     // resulting reference count is 0.
8214     ///
8215     extern(System) int function (cef_base_ref_counted_t* self) nothrow release;
8216 
8217     ///
8218     // Returns true (1) if the current reference count is 1.
8219     ///
8220     extern(System) int function (cef_base_ref_counted_t* self) nothrow has_one_ref;
8221 
8222     ///
8223     // Returns true (1) if the current reference count is at least 1.
8224     ///
8225     extern(System) int function (cef_base_ref_counted_t* self) nothrow has_at_least_one_ref;
8226 }
8227 
8228 
8229 
8230 ///
8231 // All scoped framework structures must include this structure first.
8232 ///
8233 struct cef_base_scoped_t
8234 {
8235     ///
8236     // Size of the data structure.
8237     ///
8238     size_t size;
8239 
8240     ///
8241     // Called to delete this object. May be NULL if the object is not owned.
8242     ///
8243     extern(System) void function (cef_base_scoped_t* self) nothrow del;
8244 }
8245 
8246 
8247 
8248 // Check that the structure |s|, which is defined with a size_t member at the
8249 // top, is large enough to contain the specified member |f|.
8250 
8251 
8252 
8253 
8254 // CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_
8255 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
8256 //
8257 // Redistribution and use in source and binary forms, with or without
8258 // modification, are permitted provided that the following conditions are
8259 // met:
8260 //
8261 //    * Redistributions of source code must retain the above copyright
8262 // notice, this list of conditions and the following disclaimer.
8263 //    * Redistributions in binary form must reproduce the above
8264 // copyright notice, this list of conditions and the following disclaimer
8265 // in the documentation and/or other materials provided with the
8266 // distribution.
8267 //    * Neither the name of Google Inc. nor the name Chromium Embedded
8268 // Framework nor the names of its contributors may be used to endorse
8269 // or promote products derived from this software without specific prior
8270 // written permission.
8271 //
8272 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
8273 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
8274 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8275 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8276 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8277 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8278 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
8279 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8280 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8281 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8282 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8283 //
8284 // ---------------------------------------------------------------------------
8285 //
8286 // This file was generated by the CEF translator tool and should not edited
8287 // by hand. See the translator.README.txt file in the tools directory for
8288 // more information.
8289 //
8290 // $hash=6ee74f31d37a1b5ab3c9c5ccbe2dce9841329b38$
8291 //
8292 
8293 import core.stdc.config;
8294 
8295 extern (C):
8296 
8297 
8298 
8299 ///
8300 /// Structure used to represent a browser. When used in the browser process the
8301 /// functions of this structure may be called on any thread unless otherwise
8302 /// indicated in the comments. When used in the render process the functions of
8303 /// this structure may only be called on the main thread.
8304 ///
8305 struct cef_browser_t
8306 {
8307     ///
8308     /// Base structure.
8309     ///
8310 
8311     ///
8312     /// True if this object is currently valid. This will return false (0) after
8313     /// cef_life_span_handler_t::OnBeforeClose is called.
8314 
8315     cef_base_ref_counted_t base;
8316     ///
8317     extern(System) int function (cef_browser_t* self) nothrow is_valid;
8318 
8319     ///
8320     /// Returns the browser host object. This function can only be called in the
8321     /// browser process.
8322     ///
8323     extern(System) cef_browser_host_t* function (cef_browser_t* self) nothrow get_host;
8324 
8325     ///
8326     /// Returns true (1) if the browser can navigate backwards.
8327     ///
8328     extern(System) int function (cef_browser_t* self) nothrow can_go_back;
8329 
8330     ///
8331     /// Navigate backwards.
8332     ///
8333     extern(System) void function (cef_browser_t* self) nothrow go_back;
8334 
8335     ///
8336     /// Returns true (1) if the browser can navigate forwards.
8337     ///
8338     extern(System) int function (cef_browser_t* self) nothrow can_go_forward;
8339 
8340     ///
8341     /// Navigate forwards.
8342     ///
8343     extern(System) void function (cef_browser_t* self) nothrow go_forward;
8344 
8345     ///
8346     /// Returns true (1) if the browser is currently loading.
8347     ///
8348     extern(System) int function (cef_browser_t* self) nothrow is_loading;
8349 
8350     ///
8351     /// Reload the current page.
8352     ///
8353     extern(System) void function (cef_browser_t* self) nothrow reload;
8354 
8355     ///
8356     /// Reload the current page ignoring any cached data.
8357     ///
8358     extern(System) void function (cef_browser_t* self) nothrow reload_ignore_cache;
8359 
8360     ///
8361     /// Stop loading the page.
8362     ///
8363     extern(System) void function (cef_browser_t* self) nothrow stop_load;
8364 
8365     ///
8366     /// Returns the globally unique identifier for this browser. This value is
8367     /// also used as the tabId for extension APIs.
8368     ///
8369     extern(System) int function (cef_browser_t* self) nothrow get_identifier;
8370 
8371     ///
8372     /// Returns true (1) if this object is pointing to the same handle as |that|
8373     /// object.
8374     ///
8375     extern(System) int function (cef_browser_t* self, cef_browser_t* that) nothrow is_same;
8376 
8377     ///
8378     /// Returns true (1) if the browser is a popup.
8379     ///
8380     extern(System) int function (cef_browser_t* self) nothrow is_popup;
8381 
8382     ///
8383     /// Returns true (1) if a document has been loaded in the browser.
8384     ///
8385     extern(System) int function (cef_browser_t* self) nothrow has_document;
8386 
8387     ///
8388     /// Returns the main (top-level) frame for the browser. In the browser process
8389     /// this will return a valid object until after
8390     /// cef_life_span_handler_t::OnBeforeClose is called. In the renderer process
8391     /// this will return NULL if the main frame is hosted in a different renderer
8392     /// process (e.g. for cross-origin sub-frames). The main frame object will
8393     /// change during cross-origin navigation or re-navigation after renderer
8394     /// process termination (due to crashes, etc).
8395     ///
8396     extern(System) cef_frame_t* function (cef_browser_t* self) nothrow get_main_frame;
8397 
8398     ///
8399     /// Returns the focused frame for the browser.
8400     ///
8401     extern(System) cef_frame_t* function (cef_browser_t* self) nothrow get_focused_frame;
8402 
8403     ///
8404     /// Returns the frame with the specified identifier, or NULL if not found.
8405     ///
8406     extern(System) cef_frame_t* function (
8407         cef_browser_t* self,
8408         const(cef_string_t)* identifier) nothrow get_frame_by_identifier;
8409 
8410     ///
8411     /// Returns the frame with the specified name, or NULL if not found.
8412     ///
8413     extern(System) cef_frame_t* function (
8414         cef_browser_t* self,
8415         const(cef_string_t)* name) nothrow get_frame_by_name;
8416 
8417     ///
8418     /// Returns the number of frames that currently exist.
8419     ///
8420     extern(System) size_t function (cef_browser_t* self) nothrow get_frame_count;
8421 
8422     ///
8423     /// Returns the identifiers of all existing frames.
8424     ///
8425     extern(System) void function (
8426         cef_browser_t* self,
8427         cef_string_list_t identifiers) nothrow get_frame_identifiers;
8428 
8429     ///
8430     /// Returns the names of all existing frames.
8431     ///
8432     extern(System) void function (
8433         cef_browser_t* self,
8434         cef_string_list_t names) nothrow get_frame_names;
8435 }
8436 
8437 
8438 
8439 ///
8440 /// Callback structure for cef_browser_host_t::RunFileDialog. The functions of
8441 /// this structure will be called on the browser process UI thread.
8442 ///
8443 struct cef_run_file_dialog_callback_t
8444 {
8445     ///
8446     /// Base structure.
8447     ///
8448     cef_base_ref_counted_t base;
8449 
8450     ///
8451     /// Called asynchronously after the file dialog is dismissed. |file_paths|
8452     /// will be a single value or a list of values depending on the dialog mode.
8453     /// If the selection was cancelled |file_paths| will be NULL.
8454     ///
8455     extern(System) void function (
8456         cef_run_file_dialog_callback_t* self,
8457         cef_string_list_t file_paths) nothrow on_file_dialog_dismissed;
8458 }
8459 
8460 
8461 
8462 ///
8463 /// Callback structure for cef_browser_host_t::GetNavigationEntries. The
8464 /// functions of this structure will be called on the browser process UI thread.
8465 ///
8466 struct cef_navigation_entry_visitor_t
8467 {
8468     ///
8469     /// Base structure.
8470     ///
8471     cef_base_ref_counted_t base;
8472 
8473     ///
8474     /// Method that will be executed. Do not keep a reference to |entry| outside
8475     /// of this callback. Return true (1) to continue visiting entries or false
8476     /// (0) to stop. |current| is true (1) if this entry is the currently loaded
8477     /// navigation entry. |index| is the 0-based index of this entry and |total|
8478     /// is the total number of entries.
8479     ///
8480     extern(System) int function (
8481         cef_navigation_entry_visitor_t* self,
8482         cef_navigation_entry_t* entry,
8483         int current,
8484         int index,
8485         int total) nothrow visit;
8486 }
8487 
8488 
8489 
8490 ///
8491 /// Callback structure for cef_browser_host_t::PrintToPDF. The functions of this
8492 /// structure will be called on the browser process UI thread.
8493 ///
8494 struct cef_pdf_print_callback_t
8495 {
8496     ///
8497     /// Base structure.
8498     ///
8499     cef_base_ref_counted_t base;
8500 
8501     ///
8502     /// Method that will be executed when the PDF printing has completed. |path|
8503     /// is the output path. |ok| will be true (1) if the printing completed
8504     /// successfully or false (0) otherwise.
8505     ///
8506     extern(System) void function (
8507         cef_pdf_print_callback_t* self,
8508         const(cef_string_t)* path,
8509         int ok) nothrow on_pdf_print_finished;
8510 }
8511 
8512 
8513 
8514 ///
8515 /// Callback structure for cef_browser_host_t::DownloadImage. The functions of
8516 /// this structure will be called on the browser process UI thread.
8517 ///
8518 struct cef_download_image_callback_t
8519 {
8520     ///
8521     /// Base structure.
8522     ///
8523     cef_base_ref_counted_t base;
8524 
8525     ///
8526     /// Method that will be executed when the image download has completed.
8527     /// |image_url| is the URL that was downloaded and |http_status_code| is the
8528     /// resulting HTTP status code. |image| is the resulting image, possibly at
8529     /// multiple scale factors, or NULL if the download failed.
8530     ///
8531     extern(System) void function (
8532         cef_download_image_callback_t* self,
8533         const(cef_string_t)* image_url,
8534         int http_status_code,
8535         cef_image_t* image) nothrow on_download_image_finished;
8536 }
8537 
8538 
8539 
8540 ///
8541 /// Structure used to represent the browser process aspects of a browser. The
8542 /// functions of this structure can only be called in the browser process. They
8543 /// may be called on any thread in that process unless otherwise indicated in
8544 /// the comments.
8545 ///
8546 struct cef_browser_host_t
8547 {
8548     ///
8549     /// Base structure.
8550     ///
8551     cef_base_ref_counted_t base;
8552 
8553     ///
8554     /// Returns the hosted browser object.
8555     ///
8556     extern(System) cef_browser_t* function (cef_browser_host_t* self) nothrow get_browser;
8557 
8558     ///
8559     /// Request that the browser close. The JavaScript 'onbeforeunload' event will
8560     /// be fired. If |force_close| is false (0) the event handler, if any, will be
8561     /// allowed to prompt the user and the user can optionally cancel the close.
8562     /// If |force_close| is true (1) the prompt will not be displayed and the
8563     /// close will proceed. Results in a call to
8564     /// cef_life_span_handler_t::do_close() if the event handler allows the close
8565     /// or if |force_close| is true (1). See cef_life_span_handler_t::do_close()
8566     /// documentation for additional usage information.
8567     ///
8568     extern(System) void function (cef_browser_host_t* self, int force_close) nothrow close_browser;
8569 
8570     ///
8571     /// Helper for closing a browser. Call this function from the top-level window
8572     /// close handler (if any). Internally this calls CloseBrowser(false (0)) if
8573     /// the close has not yet been initiated. This function returns false (0)
8574     /// while the close is pending and true (1) after the close has completed. See
8575     /// close_browser() and cef_life_span_handler_t::do_close() documentation for
8576     /// additional usage information. This function must be called on the browser
8577     /// process UI thread.
8578     ///
8579     extern(System) int function (cef_browser_host_t* self) nothrow try_close_browser;
8580 
8581     ///
8582     /// Set whether the browser is focused.
8583     ///
8584     extern(System) void function (cef_browser_host_t* self, int focus) nothrow set_focus;
8585 
8586     ///
8587     /// Retrieve the window handle (if any) for this browser. If this browser is
8588     /// wrapped in a cef_browser_view_t this function should be called on the
8589     /// browser process UI thread and it will return the handle for the top-level
8590     /// native window.
8591     ///
8592     extern(System) c_ulong function (cef_browser_host_t* self) nothrow get_window_handle;
8593 
8594     ///
8595     /// Retrieve the window handle (if any) of the browser that opened this
8596     /// browser. Will return NULL for non-popup browsers or if this browser is
8597     /// wrapped in a cef_browser_view_t. This function can be used in combination
8598     /// with custom handling of modal windows.
8599     ///
8600     extern(System) c_ulong function (cef_browser_host_t* self) nothrow get_opener_window_handle;
8601 
8602     ///
8603     /// Returns true (1) if this browser is wrapped in a cef_browser_view_t.
8604     ///
8605     extern(System) int function (cef_browser_host_t* self) nothrow has_view;
8606 
8607     ///
8608     /// Returns the client for this browser.
8609     ///
8610     extern(System) cef_client_t* function (cef_browser_host_t* self) nothrow get_client;
8611 
8612     ///
8613     /// Returns the request context for this browser.
8614     ///
8615     extern(System) cef_request_context_t* function (
8616         cef_browser_host_t* self) nothrow get_request_context;
8617 
8618     ///
8619     /// Returns true (1) if this browser can execute the specified zoom command.
8620     /// This function can only be called on the UI thread.
8621     ///
8622     extern(System) int function (
8623         cef_browser_host_t* self,
8624         cef_zoom_command_t command) nothrow can_zoom;
8625 
8626     ///
8627     /// Execute a zoom command in this browser. If called on the UI thread the
8628     /// change will be applied immediately. Otherwise, the change will be applied
8629     /// asynchronously on the UI thread.
8630     ///
8631     extern(System) void function (cef_browser_host_t* self, cef_zoom_command_t command) nothrow zoom;
8632 
8633     ///
8634     /// Get the default zoom level. This value will be 0.0 by default but can be
8635     /// configured with the Chrome runtime. This function can only be called on
8636     /// the UI thread.
8637     ///
8638     extern(System) double function (cef_browser_host_t* self) nothrow get_default_zoom_level;
8639 
8640     ///
8641     /// Get the current zoom level. This function can only be called on the UI
8642     /// thread.
8643     ///
8644     extern(System) double function (cef_browser_host_t* self) nothrow get_zoom_level;
8645 
8646     ///
8647     /// Change the zoom level to the specified value. Specify 0.0 to reset the
8648     /// zoom level to the default. If called on the UI thread the change will be
8649     /// applied immediately. Otherwise, the change will be applied asynchronously
8650     /// on the UI thread.
8651     ///
8652     extern(System) void function (cef_browser_host_t* self, double zoomLevel) nothrow set_zoom_level;
8653 
8654     ///
8655     /// Call to run a file chooser dialog. Only a single file chooser dialog may
8656     /// be pending at any given time. |mode| represents the type of dialog to
8657     /// display. |title| to the title to be used for the dialog and may be NULL to
8658     /// show the default title ("Open" or "Save" depending on the mode).
8659     /// |default_file_path| is the path with optional directory and/or file name
8660     /// component that will be initially selected in the dialog. |accept_filters|
8661     /// are used to restrict the selectable file types and may any combination of
8662     /// (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b)
8663     /// individual file extensions (e.g. ".txt" or ".png"), or (c) combined
8664     /// description and file extension delimited using "|" and ";" (e.g. "Image
8665     /// Types|.png;.gif;.jpg"). |callback| will be executed after the dialog is
8666     /// dismissed or immediately if another dialog is already pending. The dialog
8667     /// will be initiated asynchronously on the UI thread.
8668     ///
8669     extern(System) void function (
8670         cef_browser_host_t* self,
8671         cef_file_dialog_mode_t mode,
8672         const(cef_string_t)* title,
8673         const(cef_string_t)* default_file_path,
8674         cef_string_list_t accept_filters,
8675         cef_run_file_dialog_callback_t* callback) nothrow run_file_dialog;
8676 
8677     ///
8678     /// Download the file at |url| using cef_download_handler_t.
8679     ///
8680     extern(System) void function (
8681         cef_browser_host_t* self,
8682         const(cef_string_t)* url) nothrow start_download;
8683 
8684     ///
8685     /// Download |image_url| and execute |callback| on completion with the images
8686     /// received from the renderer. If |is_favicon| is true (1) then cookies are
8687     /// not sent and not accepted during download. Images with density independent
8688     /// pixel (DIP) sizes larger than |max_image_size| are filtered out from the
8689     /// image results. Versions of the image at different scale factors may be
8690     /// downloaded up to the maximum scale factor supported by the system. If
8691     /// there are no image results <= |max_image_size| then the smallest image is
8692     /// resized to |max_image_size| and is the only result. A |max_image_size| of
8693     /// 0 means unlimited. If |bypass_cache| is true (1) then |image_url| is
8694     /// requested from the server even if it is present in the browser cache.
8695     ///
8696     extern(System) void function (
8697         cef_browser_host_t* self,
8698         const(cef_string_t)* image_url,
8699         int is_favicon,
8700         uint max_image_size,
8701         int bypass_cache,
8702         cef_download_image_callback_t* callback) nothrow download_image;
8703 
8704     ///
8705     /// Print the current browser contents.
8706     ///
8707     extern(System) void function (cef_browser_host_t* self) nothrow print;
8708 
8709     ///
8710     /// Print the current browser contents to the PDF file specified by |path| and
8711     /// execute |callback| on completion. The caller is responsible for deleting
8712     /// |path| when done. For PDF printing to work on Linux you must implement the
8713     /// cef_print_handler_t::GetPdfPaperSize function.
8714     ///
8715     extern(System) void function (
8716         cef_browser_host_t* self,
8717         const(cef_string_t)* path,
8718         const(cef_pdf_print_settings_t)* settings,
8719         cef_pdf_print_callback_t* callback) nothrow print_to_pdf;
8720 
8721     ///
8722     /// Search for |searchText|. |forward| indicates whether to search forward or
8723     /// backward within the page. |matchCase| indicates whether the search should
8724     /// be case-sensitive. |findNext| indicates whether this is the first request
8725     /// or a follow-up. The search will be restarted if |searchText| or
8726     /// |matchCase| change. The search will be stopped if |searchText| is NULL.
8727     /// The cef_find_handler_t instance, if any, returned via
8728     /// cef_client_t::GetFindHandler will be called to report find results.
8729     ///
8730     extern(System) void function (
8731         cef_browser_host_t* self,
8732         const(cef_string_t)* searchText,
8733         int forward,
8734         int matchCase,
8735         int findNext) nothrow find;
8736 
8737     ///
8738     /// Cancel all searches that are currently going on.
8739     ///
8740     extern(System) void function (cef_browser_host_t* self, int clearSelection) nothrow stop_finding;
8741 
8742     ///
8743     /// Open developer tools (DevTools) in its own browser. The DevTools browser
8744     /// will remain associated with this browser. If the DevTools browser is
8745     /// already open then it will be focused, in which case the |windowInfo|,
8746     /// |client| and |settings| parameters will be ignored. If
8747     /// |inspect_element_at| is non-NULL then the element at the specified (x,y)
8748     /// location will be inspected. The |windowInfo| parameter will be ignored if
8749     /// this browser is wrapped in a cef_browser_view_t.
8750     ///
8751     extern(System) void function (
8752         cef_browser_host_t* self,
8753         const(cef_window_info_t)* windowInfo,
8754         cef_client_t* client,
8755         const(cef_browser_settings_t)* settings,
8756         const(cef_point_t)* inspect_element_at) nothrow show_dev_tools;
8757 
8758     ///
8759     /// Explicitly close the associated DevTools browser, if any.
8760     ///
8761     extern(System) void function (cef_browser_host_t* self) nothrow close_dev_tools;
8762 
8763     ///
8764     /// Returns true (1) if this browser currently has an associated DevTools
8765     /// browser. Must be called on the browser process UI thread.
8766     ///
8767     extern(System) int function (cef_browser_host_t* self) nothrow has_dev_tools;
8768 
8769     ///
8770     /// Send a function call message over the DevTools protocol. |message| must be
8771     /// a UTF8-encoded JSON dictionary that contains "id" (int), "function"
8772     /// (string) and "params" (dictionary, optional) values. See the DevTools
8773     /// protocol documentation at https://chromedevtools.github.io/devtools-
8774     /// protocol/ for details of supported functions and the expected "params"
8775     /// dictionary contents. |message| will be copied if necessary. This function
8776     /// will return true (1) if called on the UI thread and the message was
8777     /// successfully submitted for validation, otherwise false (0). Validation
8778     /// will be applied asynchronously and any messages that fail due to
8779     /// formatting errors or missing parameters may be discarded without
8780     /// notification. Prefer ExecuteDevToolsMethod if a more structured approach
8781     /// to message formatting is desired.
8782     ///
8783     /// Every valid function call will result in an asynchronous function result
8784     /// or error message that references the sent message "id". Event messages are
8785     /// received while notifications are enabled (for example, between function
8786     /// calls for "Page.enable" and "Page.disable"). All received messages will be
8787     /// delivered to the observer(s) registered with AddDevToolsMessageObserver.
8788     /// See cef_dev_tools_message_observer_t::OnDevToolsMessage documentation for
8789     /// details of received message contents.
8790     ///
8791     /// Usage of the SendDevToolsMessage, ExecuteDevToolsMethod and
8792     /// AddDevToolsMessageObserver functions does not require an active DevTools
8793     /// front-end or remote-debugging session. Other active DevTools sessions will
8794     /// continue to function independently. However, any modification of global
8795     /// browser state by one session may not be reflected in the UI of other
8796     /// sessions.
8797     ///
8798     /// Communication with the DevTools front-end (when displayed) can be logged
8799     /// for development purposes by passing the `--devtools-protocol-log-
8800     /// file=<path>` command-line flag.
8801     ///
8802     extern(System) int function (
8803         cef_browser_host_t* self,
8804         const(void)* message,
8805         size_t message_size) nothrow send_dev_tools_message;
8806 
8807     ///
8808     /// Execute a function call over the DevTools protocol. This is a more
8809     /// structured version of SendDevToolsMessage. |message_id| is an incremental
8810     /// number that uniquely identifies the message (pass 0 to have the next
8811     /// number assigned automatically based on previous values). |function| is the
8812     /// function name. |params| are the function parameters, which may be NULL.
8813     /// See the DevTools protocol documentation (linked above) for details of
8814     /// supported functions and the expected |params| dictionary contents. This
8815     /// function will return the assigned message ID if called on the UI thread
8816     /// and the message was successfully submitted for validation, otherwise 0.
8817     /// See the SendDevToolsMessage documentation for additional usage
8818     /// information.
8819     ///
8820     extern(System) int function (
8821         cef_browser_host_t* self,
8822         int message_id,
8823         const(cef_string_t)* method,
8824         cef_dictionary_value_t* params) nothrow execute_dev_tools_method;
8825 
8826     ///
8827     /// Add an observer for DevTools protocol messages (function results and
8828     /// events). The observer will remain registered until the returned
8829     /// Registration object is destroyed. See the SendDevToolsMessage
8830     /// documentation for additional usage information.
8831     ///
8832     extern(System) cef_registration_t* function (
8833         cef_browser_host_t* self,
8834         cef_dev_tools_message_observer_t* observer) nothrow add_dev_tools_message_observer;
8835 
8836     ///
8837     /// Retrieve a snapshot of current navigation entries as values sent to the
8838     /// specified visitor. If |current_only| is true (1) only the current
8839     /// navigation entry will be sent, otherwise all navigation entries will be
8840     /// sent.
8841     ///
8842     extern(System) void function (
8843         cef_browser_host_t* self,
8844         cef_navigation_entry_visitor_t* visitor,
8845         int current_only) nothrow get_navigation_entries;
8846 
8847     ///
8848     /// If a misspelled word is currently selected in an editable node calling
8849     /// this function will replace it with the specified |word|.
8850     ///
8851     extern(System) void function (
8852         cef_browser_host_t* self,
8853         const(cef_string_t)* word) nothrow replace_misspelling;
8854 
8855     ///
8856     /// Add the specified |word| to the spelling dictionary.
8857     ///
8858     extern(System) void function (
8859         cef_browser_host_t* self,
8860         const(cef_string_t)* word) nothrow add_word_to_dictionary;
8861 
8862     ///
8863     /// Returns true (1) if window rendering is disabled.
8864     ///
8865     extern(System) int function (cef_browser_host_t* self) nothrow is_window_rendering_disabled;
8866 
8867     ///
8868     /// Notify the browser that the widget has been resized. The browser will
8869     /// first call cef_render_handler_t::GetViewRect to get the new size and then
8870     /// call cef_render_handler_t::OnPaint asynchronously with the updated
8871     /// regions. This function is only used when window rendering is disabled.
8872     ///
8873     extern(System) void function (cef_browser_host_t* self) nothrow was_resized;
8874 
8875     ///
8876     /// Notify the browser that it has been hidden or shown. Layouting and
8877     /// cef_render_handler_t::OnPaint notification will stop when the browser is
8878     /// hidden. This function is only used when window rendering is disabled.
8879     ///
8880     extern(System) void function (cef_browser_host_t* self, int hidden) nothrow was_hidden;
8881 
8882     ///
8883     /// Send a notification to the browser that the screen info has changed. The
8884     /// browser will then call cef_render_handler_t::GetScreenInfo to update the
8885     /// screen information with the new values. This simulates moving the webview
8886     /// window from one display to another, or changing the properties of the
8887     /// current display. This function is only used when window rendering is
8888     /// disabled.
8889     ///
8890     extern(System) void function (cef_browser_host_t* self) nothrow notify_screen_info_changed;
8891 
8892     ///
8893     /// Invalidate the view. The browser will call cef_render_handler_t::OnPaint
8894     /// asynchronously. This function is only used when window rendering is
8895     /// disabled.
8896     ///
8897     extern(System) void function (
8898         cef_browser_host_t* self,
8899         cef_paint_element_type_t type) nothrow invalidate;
8900 
8901     ///
8902     /// Issue a BeginFrame request to Chromium.  Only valid when
8903     /// cef_window_tInfo::external_begin_frame_enabled is set to true (1).
8904     ///
8905     extern(System) void function (cef_browser_host_t* self) nothrow send_external_begin_frame;
8906 
8907     ///
8908     /// Send a key event to the browser.
8909     ///
8910     extern(System) void function (
8911         cef_browser_host_t* self,
8912         const(cef_key_event_t)* event) nothrow send_key_event;
8913 
8914     ///
8915     /// Send a mouse click event to the browser. The |x| and |y| coordinates are
8916     /// relative to the upper-left corner of the view.
8917     ///
8918     extern(System) void function (
8919         cef_browser_host_t* self,
8920         const(cef_mouse_event_t)* event,
8921         cef_mouse_button_type_t type,
8922         int mouseUp,
8923         int clickCount) nothrow send_mouse_click_event;
8924 
8925     ///
8926     /// Send a mouse move event to the browser. The |x| and |y| coordinates are
8927     /// relative to the upper-left corner of the view.
8928     ///
8929     extern(System) void function (
8930         cef_browser_host_t* self,
8931         const(cef_mouse_event_t)* event,
8932         int mouseLeave) nothrow send_mouse_move_event;
8933 
8934     ///
8935     /// Send a mouse wheel event to the browser. The |x| and |y| coordinates are
8936     /// relative to the upper-left corner of the view. The |deltaX| and |deltaY|
8937     /// values represent the movement delta in the X and Y directions
8938     /// respectively. In order to scroll inside select popups with window
8939     /// rendering disabled cef_render_handler_t::GetScreenPoint should be
8940     /// implemented properly.
8941     ///
8942     extern(System) void function (
8943         cef_browser_host_t* self,
8944         const(cef_mouse_event_t)* event,
8945         int deltaX,
8946         int deltaY) nothrow send_mouse_wheel_event;
8947 
8948     ///
8949     /// Send a touch event to the browser for a windowless browser.
8950     ///
8951     extern(System) void function (
8952         cef_browser_host_t* self,
8953         const(cef_touch_event_t)* event) nothrow send_touch_event;
8954 
8955     ///
8956     /// Send a capture lost event to the browser.
8957     ///
8958     extern(System) void function (cef_browser_host_t* self) nothrow send_capture_lost_event;
8959 
8960     ///
8961     /// Notify the browser that the window hosting it is about to be moved or
8962     /// resized. This function is only used on Windows and Linux.
8963     ///
8964     extern(System) void function (cef_browser_host_t* self) nothrow notify_move_or_resize_started;
8965 
8966     ///
8967     /// Returns the maximum rate in frames per second (fps) that
8968     /// cef_render_handler_t::OnPaint will be called for a windowless browser. The
8969     /// actual fps may be lower if the browser cannot generate frames at the
8970     /// requested rate. The minimum value is 1 and the maximum value is 60
8971     /// (default 30). This function can only be called on the UI thread.
8972     ///
8973     extern(System) int function (cef_browser_host_t* self) nothrow get_windowless_frame_rate;
8974 
8975     ///
8976     /// Set the maximum rate in frames per second (fps) that
8977     /// cef_render_handler_t:: OnPaint will be called for a windowless browser.
8978     /// The actual fps may be lower if the browser cannot generate frames at the
8979     /// requested rate. The minimum value is 1 and the maximum value is 60
8980     /// (default 30). Can also be set at browser creation via
8981     /// cef_browser_tSettings.windowless_frame_rate.
8982     ///
8983     extern(System) void function (
8984         cef_browser_host_t* self,
8985         int frame_rate) nothrow set_windowless_frame_rate;
8986 
8987     ///
8988     /// Begins a new composition or updates the existing composition. Blink has a
8989     /// special node (a composition node) that allows the input function to change
8990     /// text without affecting other DOM nodes. |text| is the optional text that
8991     /// will be inserted into the composition node. |underlines| is an optional
8992     /// set of ranges that will be underlined in the resulting text.
8993     /// |replacement_range| is an optional range of the existing text that will be
8994     /// replaced. |selection_range| is an optional range of the resulting text
8995     /// that will be selected after insertion or replacement. The
8996     /// |replacement_range| value is only used on OS X.
8997     ///
8998     /// This function may be called multiple times as the composition changes.
8999     /// When the client is done making changes the composition should either be
9000     /// canceled or completed. To cancel the composition call
9001     /// ImeCancelComposition. To complete the composition call either
9002     /// ImeCommitText or ImeFinishComposingText. Completion is usually signaled
9003     /// when:
9004     ///
9005     /// 1. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR
9006     ///    flag (on Windows), or;
9007     /// 2. The client receives a "commit" signal of GtkIMContext (on Linux), or;
9008     /// 3. insertText of NSTextInput is called (on Mac).
9009     ///
9010     /// This function is only used when window rendering is disabled.
9011     ///
9012     extern(System) void function (
9013         cef_browser_host_t* self,
9014         const(cef_string_t)* text,
9015         size_t underlinesCount,
9016         const(cef_composition_underline_t)* underlines,
9017         const(cef_range_t)* replacement_range,
9018         const(cef_range_t)* selection_range) nothrow ime_set_composition;
9019 
9020     ///
9021     /// Completes the existing composition by optionally inserting the specified
9022     /// |text| into the composition node. |replacement_range| is an optional range
9023     /// of the existing text that will be replaced. |relative_cursor_pos| is where
9024     /// the cursor will be positioned relative to the current cursor position. See
9025     /// comments on ImeSetComposition for usage. The |replacement_range| and
9026     /// |relative_cursor_pos| values are only used on OS X. This function is only
9027     /// used when window rendering is disabled.
9028     ///
9029     extern(System) void function (
9030         cef_browser_host_t* self,
9031         const(cef_string_t)* text,
9032         const(cef_range_t)* replacement_range,
9033         int relative_cursor_pos) nothrow ime_commit_text;
9034 
9035     ///
9036     /// Completes the existing composition by applying the current composition
9037     /// node contents. If |keep_selection| is false (0) the current selection, if
9038     /// any, will be discarded. See comments on ImeSetComposition for usage. This
9039     /// function is only used when window rendering is disabled.
9040     ///
9041     extern(System) void function (
9042         cef_browser_host_t* self,
9043         int keep_selection) nothrow ime_finish_composing_text;
9044 
9045     ///
9046     /// Cancels the existing composition and discards the composition node
9047     /// contents without applying them. See comments on ImeSetComposition for
9048     /// usage. This function is only used when window rendering is disabled.
9049     ///
9050     extern(System) void function (cef_browser_host_t* self) nothrow ime_cancel_composition;
9051 
9052     ///
9053     /// Call this function when the user drags the mouse into the web view (before
9054     /// calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). |drag_data|
9055     /// should not contain file contents as this type of data is not allowed to be
9056     /// dragged into the web view. File contents can be removed using
9057     /// cef_drag_data_t::ResetFileContents (for example, if |drag_data| comes from
9058     /// cef_render_handler_t::StartDragging). This function is only used when
9059     /// window rendering is disabled.
9060     ///
9061     extern(System) void function (
9062         cef_browser_host_t* self,
9063         cef_drag_data_t* drag_data,
9064         const(cef_mouse_event_t)* event,
9065         cef_drag_operations_mask_t allowed_ops) nothrow drag_target_drag_enter;
9066 
9067     ///
9068     /// Call this function each time the mouse is moved across the web view during
9069     /// a drag operation (after calling DragTargetDragEnter and before calling
9070     /// DragTargetDragLeave/DragTargetDrop). This function is only used when
9071     /// window rendering is disabled.
9072     ///
9073     extern(System) void function (
9074         cef_browser_host_t* self,
9075         const(cef_mouse_event_t)* event,
9076         cef_drag_operations_mask_t allowed_ops) nothrow drag_target_drag_over;
9077 
9078     ///
9079     /// Call this function when the user drags the mouse out of the web view
9080     /// (after calling DragTargetDragEnter). This function is only used when
9081     /// window rendering is disabled.
9082     ///
9083     extern(System) void function (cef_browser_host_t* self) nothrow drag_target_drag_leave;
9084 
9085     ///
9086     /// Call this function when the user completes the drag operation by dropping
9087     /// the object onto the web view (after calling DragTargetDragEnter). The
9088     /// object being dropped is |drag_data|, given as an argument to the previous
9089     /// DragTargetDragEnter call. This function is only used when window rendering
9090     /// is disabled.
9091     ///
9092     extern(System) void function (
9093         cef_browser_host_t* self,
9094         const(cef_mouse_event_t)* event) nothrow drag_target_drop;
9095 
9096     ///
9097     /// Call this function when the drag operation started by a
9098     /// cef_render_handler_t::StartDragging call has ended either in a drop or by
9099     /// being cancelled. |x| and |y| are mouse coordinates relative to the upper-
9100     /// left corner of the view. If the web view is both the drag source and the
9101     /// drag target then all DragTarget* functions should be called before
9102     /// DragSource* mthods. This function is only used when window rendering is
9103     /// disabled.
9104     ///
9105     extern(System) void function (
9106         cef_browser_host_t* self,
9107         int x,
9108         int y,
9109         cef_drag_operations_mask_t op) nothrow drag_source_ended_at;
9110 
9111     ///
9112     /// Call this function when the drag operation started by a
9113     /// cef_render_handler_t::StartDragging call has completed. This function may
9114     /// be called immediately without first calling DragSourceEndedAt to cancel a
9115     /// drag operation. If the web view is both the drag source and the drag
9116     /// target then all DragTarget* functions should be called before DragSource*
9117     /// mthods. This function is only used when window rendering is disabled.
9118     ///
9119     extern(System) void function (cef_browser_host_t* self) nothrow drag_source_system_drag_ended;
9120 
9121     ///
9122     /// Returns the current visible navigation entry for this browser. This
9123     /// function can only be called on the UI thread.
9124     ///
9125     extern(System) cef_navigation_entry_t* function (
9126         cef_browser_host_t* self) nothrow get_visible_navigation_entry;
9127 
9128     ///
9129     /// Set accessibility state for all frames. |accessibility_state| may be
9130     /// default, enabled or disabled. If |accessibility_state| is STATE_DEFAULT
9131     /// then accessibility will be disabled by default and the state may be
9132     /// further controlled with the "force-renderer-accessibility" and "disable-
9133     /// renderer-accessibility" command-line switches. If |accessibility_state| is
9134     /// STATE_ENABLED then accessibility will be enabled. If |accessibility_state|
9135     /// is STATE_DISABLED then accessibility will be completely disabled.
9136     ///
9137     /// For windowed browsers accessibility will be enabled in Complete mode
9138     /// (which corresponds to kAccessibilityModeComplete in Chromium). In this
9139     /// mode all platform accessibility objects will be created and managed by
9140     /// Chromium's internal implementation. The client needs only to detect the
9141     /// screen reader and call this function appropriately. For example, on macOS
9142     /// the client can handle the @"AXEnhancedUserStructure" accessibility
9143     /// attribute to detect VoiceOver state changes and on Windows the client can
9144     /// handle WM_GETOBJECT with OBJID_CLIENT to detect accessibility readers.
9145     ///
9146     /// For windowless browsers accessibility will be enabled in TreeOnly mode
9147     /// (which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In
9148     /// this mode renderer accessibility is enabled, the full tree is computed,
9149     /// and events are passed to CefAccessibiltyHandler, but platform
9150     /// accessibility objects are not created. The client may implement platform
9151     /// accessibility objects using CefAccessibiltyHandler callbacks if desired.
9152     ///
9153     extern(System) void function (
9154         cef_browser_host_t* self,
9155         cef_state_t accessibility_state) nothrow set_accessibility_state;
9156 
9157     ///
9158     /// Enable notifications of auto resize via
9159     /// cef_display_handler_t::OnAutoResize. Notifications are disabled by
9160     /// default. |min_size| and |max_size| define the range of allowed sizes.
9161     ///
9162     extern(System) void function (
9163         cef_browser_host_t* self,
9164         int enabled,
9165         const(cef_size_t)* min_size,
9166         const(cef_size_t)* max_size) nothrow set_auto_resize_enabled;
9167 
9168     ///
9169     /// Returns the extension hosted in this browser or NULL if no extension is
9170     /// hosted. See cef_request_context_t::LoadExtension for details.
9171     ///
9172     /// WARNING: This function is deprecated and will be removed in ~M127.
9173     ///
9174     extern(System) cef_extension_t* function (cef_browser_host_t* self) nothrow get_extension;
9175 
9176     ///
9177     /// Returns true (1) if this browser is hosting an extension background
9178     /// script. Background hosts do not have a window and are not displayable. See
9179     /// cef_request_context_t::LoadExtension for details.
9180     ///
9181     /// WARNING: This function is deprecated and will be removed in ~M127.
9182     ///
9183     extern(System) int function (cef_browser_host_t* self) nothrow is_background_host;
9184 
9185     ///
9186     /// Set whether the browser's audio is muted.
9187     ///
9188     extern(System) void function (cef_browser_host_t* self, int mute) nothrow set_audio_muted;
9189 
9190     ///
9191     /// Returns true (1) if the browser's audio is muted.  This function can only
9192     /// be called on the UI thread.
9193     ///
9194     extern(System) int function (cef_browser_host_t* self) nothrow is_audio_muted;
9195 
9196     ///
9197     /// Returns true (1) if the renderer is currently in browser fullscreen. This
9198     /// differs from window fullscreen in that browser fullscreen is entered using
9199     /// the JavaScript Fullscreen API and modifies CSS attributes such as the
9200     /// ::backdrop pseudo-element and :fullscreen pseudo-structure. This function
9201     /// can only be called on the UI thread.
9202     ///
9203     extern(System) int function (cef_browser_host_t* self) nothrow is_fullscreen;
9204 
9205     ///
9206     /// Requests the renderer to exit browser fullscreen. In most cases exiting
9207     /// window fullscreen should also exit browser fullscreen. With the Alloy
9208     /// runtime this function should be called in response to a user action such
9209     /// as clicking the green traffic light button on MacOS
9210     /// (cef_window_delegate_t::OnWindowFullscreenTransition callback) or pressing
9211     /// the "ESC" key (cef_keyboard_handler_t::OnPreKeyEvent callback). With the
9212     /// Chrome runtime these standard exit actions are handled internally but
9213     /// new/additional user actions can use this function. Set |will_cause_resize|
9214     /// to true (1) if exiting browser fullscreen will cause a view resize.
9215     ///
9216     extern(System) void function (
9217         cef_browser_host_t* self,
9218         int will_cause_resize) nothrow exit_fullscreen;
9219 
9220     ///
9221     /// Returns true (1) if a Chrome command is supported and enabled. Values for
9222     /// |command_id| can be found in the cef_command_ids.h file. This function can
9223     /// only be called on the UI thread. Only used with the Chrome runtime.
9224     ///
9225     extern(System) int function (
9226         cef_browser_host_t* self,
9227         int command_id) nothrow can_execute_chrome_command;
9228 
9229     ///
9230     /// Execute a Chrome command. Values for |command_id| can be found in the
9231     /// cef_command_ids.h file. |disposition| provides information about the
9232     /// intended command target. Only used with the Chrome runtime.
9233     ///
9234     extern(System) void function (
9235         cef_browser_host_t* self,
9236         int command_id,
9237         cef_window_open_disposition_t disposition) nothrow execute_chrome_command;
9238 
9239     ///
9240     /// Returns true (1) if the render process associated with this browser is
9241     /// currently unresponsive as indicated by a lack of input event processing
9242     /// for at least 15 seconds. To receive associated state change notifications
9243     /// and optionally handle an unresponsive render process implement
9244     /// cef_request_handler_t::OnRenderProcessUnresponsive. This function can only
9245     /// be called on the UI thread.
9246     ///
9247     extern(System) int function (cef_browser_host_t* self) nothrow is_render_process_unresponsive;
9248 
9249     ///
9250     /// Returns the runtime style for this browser (ALLOY or CHROME). See
9251     /// cef_runtime_style_t documentation for details.
9252     ///
9253     extern(System) cef_runtime_style_t function (cef_browser_host_t* self) nothrow get_runtime_style;
9254 }
9255 
9256 struct cef_accelerated_paint_info_t;
9257 
9258 ///
9259 /// Describes how to interpret the components of a pixel.
9260 ///
9261 enum cef_color_type_t
9262 {
9263     ///
9264     /// RGBA with 8 bits per pixel (32bits total).
9265     ///
9266     CEF_COLOR_TYPE_RGBA_8888 = 0,
9267 
9268     ///
9269     /// BGRA with 8 bits per pixel (32bits total).
9270     ///
9271     CEF_COLOR_TYPE_BGRA_8888 = 1
9272 }
9273 
9274 enum cef_runtime_style_t
9275 {
9276     ///
9277     /// Use the default runtime style. The default style will match the
9278     /// CefSettings.chrome_runtime value in most cases. See above documentation
9279     /// for exceptions.
9280     ///
9281     CEF_RUNTIME_STYLE_DEFAULT = 0,
9282 
9283     ///
9284     /// Use the Chrome runtime style. Only supported with the Chrome runtime.
9285     ///
9286     CEF_RUNTIME_STYLE_CHROME = 1,
9287 
9288     ///
9289     /// Use the Alloy runtime style. Supported with both the Alloy and Chrome
9290     /// runtime.
9291     ///
9292     CEF_RUNTIME_STYLE_ALLOY = 2
9293 }
9294 
9295 
9296 ///
9297 /// Create a new browser using the window parameters specified by |windowInfo|.
9298 /// All values will be copied internally and the actual window (if any) will be
9299 /// created on the UI thread. If |request_context| is NULL the global request
9300 /// context will be used. This function can be called on any browser process
9301 /// thread and will not block. The optional |extra_info| parameter provides an
9302 /// opportunity to specify extra information specific to the created browser
9303 /// that will be passed to cef_render_process_handler_t::on_browser_created() in
9304 /// the render process.
9305 ///
9306 int cef_browser_host_create_browser (
9307     const(cef_window_info_t)* windowInfo,
9308     cef_client_t* client,
9309     const(cef_string_t)* url,
9310     const(cef_browser_settings_t)* settings,
9311     cef_dictionary_value_t* extra_info,
9312     cef_request_context_t* request_context);
9313 
9314 ///
9315 /// Create a new browser using the window parameters specified by |windowInfo|.
9316 /// If |request_context| is NULL the global request context will be used. This
9317 /// function can only be called on the browser process UI thread. The optional
9318 /// |extra_info| parameter provides an opportunity to specify extra information
9319 /// specific to the created browser that will be passed to
9320 /// cef_render_process_handler_t::on_browser_created() in the render process.
9321 ///
9322 cef_browser_t* cef_browser_host_create_browser_sync (
9323     const(cef_window_info_t)* windowInfo,
9324     cef_client_t* client,
9325     const(cef_string_t)* url,
9326     const(cef_browser_settings_t)* settings,
9327     cef_dictionary_value_t* extra_info,
9328     cef_request_context_t* request_context);
9329 
9330 // CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
9331 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
9332 //
9333 // Redistribution and use in source and binary forms, with or without
9334 // modification, are permitted provided that the following conditions are
9335 // met:
9336 //
9337 //    * Redistributions of source code must retain the above copyright
9338 // notice, this list of conditions and the following disclaimer.
9339 //    * Redistributions in binary form must reproduce the above
9340 // copyright notice, this list of conditions and the following disclaimer
9341 // in the documentation and/or other materials provided with the
9342 // distribution.
9343 //    * Neither the name of Google Inc. nor the name Chromium Embedded
9344 // Framework nor the names of its contributors may be used to endorse
9345 // or promote products derived from this software without specific prior
9346 // written permission.
9347 //
9348 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9349 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9350 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9351 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9352 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9353 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9354 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9355 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9356 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9357 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9358 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9359 //
9360 // ---------------------------------------------------------------------------
9361 //
9362 // This file was generated by the CEF translator tool and should not edited
9363 // by hand. See the translator.README.txt file in the tools directory for
9364 // more information.
9365 //
9366 // $hash=d958d5bed7f909f6313facef3440fb8ba07a5c01$
9367 //
9368 
9369 extern (C):
9370 
9371 ///
9372 /// Structure used to implement browser process callbacks. The functions of this
9373 /// structure will be called on the browser process main thread unless otherwise
9374 /// indicated.
9375 ///
9376 struct cef_browser_process_handler_t
9377 {
9378     ///
9379     /// Base structure.
9380     ///
9381 
9382     ///
9383     /// Provides an opportunity to register custom preferences prior to global and
9384     /// request context initialization.
9385     ///
9386     /// If |type| is CEF_PREFERENCES_TYPE_GLOBAL the registered preferences can be
9387     /// accessed via cef_preference_manager_t::GetGlobalPreferences after
9388     /// OnContextInitialized is called. Global preferences are registered a single
9389 
9390     cef_base_ref_counted_t base;
9391     /// time at application startup. See related cef_settings_t.cache_path and
9392     /// cef_settings_t.persist_user_preferences configuration.
9393     ///
9394     /// If |type| is CEF_PREFERENCES_TYPE_REQUEST_CONTEXT the preferences can be
9395     /// accessed via the cef_request_context_t after
9396     /// cef_request_context_handler_t::OnRequestContextInitialized is called.
9397     /// Request context preferences are registered each time a new
9398     /// cef_request_context_t is created. It is intended but not required that all
9399     /// request contexts have the same registered preferences. See related
9400     /// cef_request_context_settings_t.cache_path and
9401     /// cef_request_context_settings_t.persist_user_preferences configuration.
9402     ///
9403     /// Do not keep a reference to the |registrar| object. This function is called
9404     /// on the browser process UI thread.
9405     ///
9406     extern(System) void function (
9407         cef_browser_process_handler_t* self,
9408         cef_preferences_type_t type,
9409         cef_preference_registrar_t* registrar) nothrow on_register_custom_preferences;
9410 
9411     ///
9412     /// Called on the browser process UI thread immediately after the CEF context
9413     /// has been initialized.
9414     ///
9415     extern(System) void function (
9416         cef_browser_process_handler_t* self) nothrow on_context_initialized;
9417 
9418     ///
9419     /// Called before a child process is launched. Will be called on the browser
9420     /// process UI thread when launching a render process and on the browser
9421     /// process IO thread when launching a GPU process. Provides an opportunity to
9422     /// modify the child process command line. Do not keep a reference to
9423     /// |command_line| outside of this function.
9424     ///
9425     extern(System) void function (
9426         cef_browser_process_handler_t* self,
9427         cef_command_line_t* command_line) nothrow on_before_child_process_launch;
9428 
9429     ///
9430     /// Implement this function to provide app-specific behavior when an already
9431     /// running app is relaunched with the same CefSettings.root_cache_path value.
9432     /// For example, activate an existing app window or create a new app window.
9433     /// |command_line| will be read-only. Do not keep a reference to
9434     /// |command_line| outside of this function. Return true (1) if the relaunch
9435     /// is handled or false (0) for default relaunch behavior. Default behavior
9436     /// will create a new default styled Chrome window.
9437     ///
9438     /// To avoid cache corruption only a single app instance is allowed to run for
9439     /// a given CefSettings.root_cache_path value. On relaunch the app checks a
9440     /// process singleton lock and then forwards the new launch arguments to the
9441     /// already running app process before exiting early. Client apps should
9442     /// therefore check the cef_initialize() return value for early exit before
9443     /// proceeding.
9444     ///
9445     /// This function will be called on the browser process UI thread.
9446     ///
9447     extern(System) int function (
9448         cef_browser_process_handler_t* self,
9449         cef_command_line_t* command_line,
9450         const(cef_string_t)* current_directory) nothrow on_already_running_app_relaunch;
9451 
9452     ///
9453     /// Called from any thread when work has been scheduled for the browser
9454     /// process main (UI) thread. This callback is used in combination with
9455     /// cef_settings_t.external_message_pump and cef_do_message_loop_work() in
9456     /// cases where the CEF message loop must be integrated into an existing
9457     /// application message loop (see additional comments and warnings on
9458     /// CefDoMessageLoopWork). This callback should schedule a
9459     /// cef_do_message_loop_work() call to happen on the main (UI) thread.
9460     /// |delay_ms| is the requested delay in milliseconds. If |delay_ms| is <= 0
9461     /// then the call should happen reasonably soon. If |delay_ms| is > 0 then the
9462     /// call should be scheduled to happen after the specified delay and any
9463     /// currently pending scheduled call should be cancelled.
9464     ///
9465     extern(System) void function (
9466         cef_browser_process_handler_t* self,
9467         long delay_ms) nothrow on_schedule_message_pump_work;
9468 
9469     ///
9470     /// Return the default client for use with a newly created browser window
9471     /// (cef_browser_t object). If null is returned the cef_browser_t will be
9472     /// unmanaged (no callbacks will be executed for that cef_browser_t) and
9473     /// application shutdown will be blocked until the browser window is closed
9474     /// manually. This function is currently only used with the Chrome runtime
9475     /// when creating new browser windows via Chrome UI.
9476     ///
9477     extern(System) cef_client_t* function (
9478         cef_browser_process_handler_t* self) nothrow get_default_client;
9479 
9480     ///
9481     /// Return the default handler for use with a new user or incognito profile
9482     /// (cef_request_context_t object). If null is returned the
9483     /// cef_request_context_t will be unmanaged (no callbacks will be executed for
9484     /// that cef_request_context_t). This function is currently only used with the
9485     /// Chrome runtime when creating new browser windows via Chrome UI.
9486     ///
9487     extern(System) cef_request_context_handler_t* function (
9488         cef_browser_process_handler_t* self) nothrow get_default_request_context_handler;
9489 }
9490 
9491 
9492 
9493 // CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_
9494 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
9495 //
9496 // Redistribution and use in source and binary forms, with or without
9497 // modification, are permitted provided that the following conditions are
9498 // met:
9499 //
9500 //    * Redistributions of source code must retain the above copyright
9501 // notice, this list of conditions and the following disclaimer.
9502 //    * Redistributions in binary form must reproduce the above
9503 // copyright notice, this list of conditions and the following disclaimer
9504 // in the documentation and/or other materials provided with the
9505 // distribution.
9506 //    * Neither the name of Google Inc. nor the name Chromium Embedded
9507 // Framework nor the names of its contributors may be used to endorse
9508 // or promote products derived from this software without specific prior
9509 // written permission.
9510 //
9511 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9512 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9513 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9514 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9515 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9516 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9517 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9518 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9519 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9520 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9521 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9522 //
9523 // ---------------------------------------------------------------------------
9524 //
9525 // This file was generated by the CEF translator tool and should not edited
9526 // by hand. See the translator.README.txt file in the tools directory for
9527 // more information.
9528 //
9529 // $hash=46bc048bec64590735298a95633167d66e445844$
9530 //
9531 
9532 extern (C):
9533 
9534 ///
9535 /// Generic callback structure used for asynchronous continuation.
9536 ///
9537 struct cef_callback_t
9538 {
9539     ///
9540     /// Base structure.
9541     ///
9542 
9543     ///
9544     /// Continue processing.
9545     ///
9546 
9547     ///
9548     /// Cancel processing.
9549     ///
9550 
9551     ///
9552     /// Generic callback structure used for asynchronous completion.
9553     ///
9554 
9555     ///
9556     /// Base structure.
9557     ///
9558 
9559     ///
9560     /// Method that will be called once the task is complete.
9561     ///
9562 
9563     // CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_
9564 
9565     cef_base_ref_counted_t base;
9566     extern(System) void function (cef_callback_t* self) nothrow cont;
9567     extern(System) void function (cef_callback_t* self) nothrow cancel;
9568 }
9569 
9570 
9571 
9572 struct cef_completion_callback_t
9573 {
9574     cef_base_ref_counted_t base;
9575     extern(System) void function (cef_completion_callback_t* self) nothrow on_complete;
9576 }
9577 
9578 
9579 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
9580 //
9581 // Redistribution and use in source and binary forms, with or without
9582 // modification, are permitted provided that the following conditions are
9583 // met:
9584 //
9585 //    * Redistributions of source code must retain the above copyright
9586 // notice, this list of conditions and the following disclaimer.
9587 //    * Redistributions in binary form must reproduce the above
9588 // copyright notice, this list of conditions and the following disclaimer
9589 // in the documentation and/or other materials provided with the
9590 // distribution.
9591 //    * Neither the name of Google Inc. nor the name Chromium Embedded
9592 // Framework nor the names of its contributors may be used to endorse
9593 // or promote products derived from this software without specific prior
9594 // written permission.
9595 //
9596 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9597 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9598 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9599 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9600 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9601 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9602 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9603 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9604 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9605 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9606 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9607 //
9608 // ---------------------------------------------------------------------------
9609 //
9610 // This file was generated by the CEF translator tool and should not edited
9611 // by hand. See the translator.README.txt file in the tools directory for
9612 // more information.
9613 //
9614 // $hash=09bd4140605645c9dfbd81e7e22d029d0bb50129$
9615 //
9616 
9617 extern (C):
9618 
9619 ///
9620 /// Implement this structure to provide handler implementations.
9621 ///
9622 struct cef_client_t
9623 {
9624     ///
9625     /// Base structure.
9626     ///
9627 
9628     cef_base_ref_counted_t base; ///
9629     /// Return the handler for audio rendering events.
9630     ///
9631     extern(System) cef_audio_handler_t* function (cef_client_t* self) nothrow get_audio_handler;
9632 
9633     ///
9634     /// Return the handler for commands. If no handler is provided the default
9635     /// implementation will be used.
9636     ///
9637     extern(System) cef_command_handler_t* function (cef_client_t* self) nothrow get_command_handler;
9638 
9639     ///
9640     /// Return the handler for context menus. If no handler is provided the
9641     /// default implementation will be used.
9642     ///
9643     extern(System) cef_context_menu_handler_t* function (
9644         cef_client_t* self) nothrow get_context_menu_handler;
9645 
9646     ///
9647     /// Return the handler for dialogs. If no handler is provided the default
9648     /// implementation will be used.
9649     ///
9650     extern(System) cef_dialog_handler_t* function (cef_client_t* self) nothrow get_dialog_handler;
9651 
9652     ///
9653     /// Return the handler for browser display state events.
9654     ///
9655     extern(System) cef_display_handler_t* function (cef_client_t* self) nothrow get_display_handler;
9656 
9657     ///
9658     /// Return the handler for download events. If no handler is returned
9659     /// downloads will not be allowed.
9660     ///
9661     extern(System) cef_download_handler_t* function (
9662         cef_client_t* self) nothrow get_download_handler;
9663 
9664     ///
9665     /// Return the handler for drag events.
9666     ///
9667     extern(System) cef_drag_handler_t* function (cef_client_t* self) nothrow get_drag_handler;
9668 
9669     ///
9670     /// Return the handler for find result events.
9671     ///
9672     extern(System) cef_find_handler_t* function (cef_client_t* self) nothrow get_find_handler;
9673 
9674     ///
9675     /// Return the handler for focus events.
9676     ///
9677     extern(System) cef_focus_handler_t* function (cef_client_t* self) nothrow get_focus_handler;
9678 
9679     ///
9680     /// Return the handler for events related to cef_frame_t lifespan. This
9681     /// function will be called once during cef_browser_t creation and the result
9682     /// will be cached for performance reasons.
9683     ///
9684     extern(System) cef_frame_handler_t* function (cef_client_t* self) nothrow get_frame_handler;
9685 
9686     ///
9687     /// Return the handler for permission requests.
9688     ///
9689     extern(System) cef_permission_handler_t* function (
9690         cef_client_t* self) nothrow get_permission_handler;
9691 
9692     ///
9693     /// Return the handler for JavaScript dialogs. If no handler is provided the
9694     /// default implementation will be used.
9695     ///
9696     extern(System) cef_jsdialog_handler_t* function (
9697         cef_client_t* self) nothrow get_jsdialog_handler;
9698 
9699     ///
9700     /// Return the handler for keyboard events.
9701     ///
9702     extern(System) cef_keyboard_handler_t* function (
9703         cef_client_t* self) nothrow get_keyboard_handler;
9704 
9705     ///
9706     /// Return the handler for browser life span events.
9707     ///
9708     extern(System) cef_life_span_handler_t* function (
9709         cef_client_t* self) nothrow get_life_span_handler;
9710 
9711     ///
9712     /// Return the handler for browser load status events.
9713     ///
9714     extern(System) cef_load_handler_t* function (cef_client_t* self) nothrow get_load_handler;
9715 
9716     ///
9717     /// Return the handler for printing on Linux. If a print handler is not
9718     /// provided then printing will not be supported on the Linux platform.
9719     ///
9720     extern(System) cef_print_handler_t* function (cef_client_t* self) nothrow get_print_handler;
9721 
9722     ///
9723     /// Return the handler for off-screen rendering events.
9724     ///
9725     extern(System) cef_render_handler_t* function (cef_client_t* self) nothrow get_render_handler;
9726 
9727     ///
9728     /// Return the handler for browser request events.
9729     ///
9730     extern(System) cef_request_handler_t* function (cef_client_t* self) nothrow get_request_handler;
9731 
9732     ///
9733     /// Called when a new message is received from a different process. Return
9734     /// true (1) if the message was handled or false (0) otherwise.  It is safe to
9735     /// keep a reference to |message| outside of this callback.
9736     ///
9737     extern(System) int function (
9738         cef_client_t* self,
9739         cef_browser_t* browser,
9740         cef_frame_t* frame,
9741         cef_process_id_t source_process,
9742         cef_process_message_t* message) nothrow on_process_message_received;
9743 }
9744 
9745 
9746 
9747 // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
9748 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
9749 //
9750 // Redistribution and use in source and binary forms, with or without
9751 // modification, are permitted provided that the following conditions are
9752 // met:
9753 //
9754 //    * Redistributions of source code must retain the above copyright
9755 // notice, this list of conditions and the following disclaimer.
9756 //    * Redistributions in binary form must reproduce the above
9757 // copyright notice, this list of conditions and the following disclaimer
9758 // in the documentation and/or other materials provided with the
9759 // distribution.
9760 //    * Neither the name of Google Inc. nor the name Chromium Embedded
9761 // Framework nor the names of its contributors may be used to endorse
9762 // or promote products derived from this software without specific prior
9763 // written permission.
9764 //
9765 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9766 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9767 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9768 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9769 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9770 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9771 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9772 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9773 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9774 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9775 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9776 //
9777 // ---------------------------------------------------------------------------
9778 //
9779 // This file was generated by the CEF translator tool and should not edited
9780 // by hand. See the translator.README.txt file in the tools directory for
9781 // more information.
9782 //
9783 // $hash=dd183a473b1e8c5ee8bdcf99949fc5274c4cc892$
9784 //
9785 
9786 extern (C):
9787 
9788 ///
9789 /// Implement this structure to handle events related to commands. The functions
9790 /// of this structure will be called on the UI thread.
9791 ///
9792 struct cef_command_handler_t
9793 {
9794     ///
9795     /// Base structure.
9796     ///
9797 
9798     ///
9799     /// Called to execute a Chrome command triggered via menu selection or
9800     /// keyboard shortcut. Values for |command_id| can be found in the
9801     /// cef_command_ids.h file. |disposition| provides information about the
9802     /// intended command target. Return true (1) if the command was handled or
9803     /// false (0) for the default implementation. For context menu commands this
9804     /// will be called after cef_context_menu_handler_t::OnContextMenuCommand.
9805     /// Only used with the Chrome runtime.
9806     ///
9807 
9808     cef_base_ref_counted_t base;
9809     extern(System) int function (
9810         cef_command_handler_t* self,
9811         cef_browser_t* browser,
9812         int command_id,
9813         cef_window_open_disposition_t disposition) nothrow on_chrome_command;
9814     ///
9815     /// Called to check if a Chrome app menu item should be visible. Values for
9816     /// |command_id| can be found in the cef_command_ids.h file. Only called for
9817     /// menu items that would be visible by default. Only used with the Chrome
9818     /// runtime.
9819     ///
9820     extern(System) int function (
9821         cef_command_handler_t* self,
9822         cef_browser_t* browser,
9823         int command_id) nothrow is_chrome_app_menu_item_visible;
9824 
9825     ///
9826     /// Called to check if a Chrome app menu item should be enabled. Values for
9827     /// |command_id| can be found in the cef_command_ids.h file. Only called for
9828     /// menu items that would be enabled by default. Only used with the Chrome
9829     /// runtime.
9830     ///
9831     extern(System) int function (
9832         cef_command_handler_t* self,
9833         cef_browser_t* browser,
9834         int command_id) nothrow is_chrome_app_menu_item_enabled;
9835 
9836     ///
9837     /// Called during browser creation to check if a Chrome page action icon
9838     /// should be visible. Only called for icons that would be visible by default.
9839     /// Only used with the Chrome runtime.
9840     ///
9841     extern(System) int function (
9842         cef_command_handler_t* self,
9843         cef_chrome_page_action_icon_type_t icon_type) nothrow is_chrome_page_action_icon_visible;
9844 
9845     ///
9846     /// Called during browser creation to check if a Chrome toolbar button should
9847     /// be visible. Only called for buttons that would be visible by default. Only
9848     /// used with the Chrome runtime.
9849     ///
9850     extern(System) int function (
9851         cef_command_handler_t* self,
9852         cef_chrome_toolbar_button_type_t button_type) nothrow is_chrome_toolbar_button_visible;
9853 }
9854 
9855 
9856 
9857 // CEF_INCLUDE_CAPI_CEF_COMMAND_HANDLER_CAPI_H_
9858 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
9859 //
9860 // Redistribution and use in source and binary forms, with or without
9861 // modification, are permitted provided that the following conditions are
9862 // met:
9863 //
9864 //    * Redistributions of source code must retain the above copyright
9865 // notice, this list of conditions and the following disclaimer.
9866 //    * Redistributions in binary form must reproduce the above
9867 // copyright notice, this list of conditions and the following disclaimer
9868 // in the documentation and/or other materials provided with the
9869 // distribution.
9870 //    * Neither the name of Google Inc. nor the name Chromium Embedded
9871 // Framework nor the names of its contributors may be used to endorse
9872 // or promote products derived from this software without specific prior
9873 // written permission.
9874 //
9875 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9876 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9877 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9878 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9879 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9880 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9881 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9882 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9883 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9884 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9885 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9886 //
9887 // ---------------------------------------------------------------------------
9888 //
9889 // This file was generated by the CEF translator tool and should not edited
9890 // by hand. See the translator.README.txt file in the tools directory for
9891 // more information.
9892 //
9893 // $hash=fce786b3f054d6581438e2906b77e573c797372a$
9894 //
9895 
9896 extern (C):
9897 
9898 ///
9899 /// Structure used to create and/or parse command line arguments. Arguments with
9900 /// "--", "-" and, on Windows, "/" prefixes are considered switches. Switches
9901 /// will always precede any arguments without switch prefixes. Switches can
9902 /// optionally have a value specified using the "=" delimiter (e.g.
9903 /// "-switch=value"). An argument of "--" will terminate switch parsing with all
9904 /// subsequent tokens, regardless of prefix, being interpreted as non-switch
9905 /// arguments. Switch names should be lowercase ASCII and will be converted to
9906 /// such if necessary. Switch values will retain the original case and UTF8
9907 /// encoding. This structure can be used before cef_initialize() is called.
9908 ///
9909 struct cef_command_line_t
9910 {
9911     ///
9912     /// Base structure.
9913     ///
9914 
9915     ///
9916     /// Returns true (1) if this object is valid. Do not call any other functions
9917     /// if this function returns false (0).
9918 
9919     cef_base_ref_counted_t base;
9920     ///
9921     extern(System) int function (cef_command_line_t* self) nothrow is_valid;
9922 
9923     ///
9924     /// Returns true (1) if the values of this object are read-only. Some APIs may
9925     /// expose read-only objects.
9926     ///
9927     extern(System) int function (cef_command_line_t* self) nothrow is_read_only;
9928 
9929     ///
9930     /// Returns a writable copy of this object.
9931     ///
9932     extern(System) cef_command_line_t* function (cef_command_line_t* self) nothrow copy;
9933 
9934     ///
9935     /// Initialize the command line with the specified |argc| and |argv| values.
9936     /// The first argument must be the name of the program. This function is only
9937     /// supported on non-Windows platforms.
9938     ///
9939     extern(System) void function (
9940         cef_command_line_t* self,
9941         int argc,
9942         const(char*)* argv) nothrow init_from_argv;
9943 
9944     ///
9945     /// Initialize the command line with the string returned by calling
9946     /// GetCommandLineW(). This function is only supported on Windows.
9947     ///
9948     extern(System) void function (
9949         cef_command_line_t* self,
9950         const(cef_string_t)* command_line) nothrow init_from_string;
9951 
9952     ///
9953     /// Reset the command-line switches and arguments but leave the program
9954     /// component unchanged.
9955     ///
9956     extern(System) void function (cef_command_line_t* self) nothrow reset;
9957 
9958     ///
9959     /// Retrieve the original command line string as a vector of strings. The argv
9960     /// array: `{ program, [(--|-|/)switch[=value]]*, [--], [argument]* }`
9961     ///
9962     extern(System) void function (cef_command_line_t* self, cef_string_list_t argv) nothrow get_argv;
9963 
9964     ///
9965     /// Constructs and returns the represented command line string. Use this
9966     /// function cautiously because quoting behavior is unclear.
9967     ///
9968     // The resulting string must be freed by calling cef_string_userfree_free().
9969     extern(System) cef_string_userfree_t function (
9970         cef_command_line_t* self) nothrow get_command_line_string;
9971 
9972     ///
9973     /// Get the program part of the command line string (the first item).
9974     ///
9975     // The resulting string must be freed by calling cef_string_userfree_free().
9976     extern(System) cef_string_userfree_t function (cef_command_line_t* self) nothrow get_program;
9977 
9978     ///
9979     /// Set the program part of the command line string (the first item).
9980     ///
9981     extern(System) void function (
9982         cef_command_line_t* self,
9983         const(cef_string_t)* program) nothrow set_program;
9984 
9985     ///
9986     /// Returns true (1) if the command line has switches.
9987     ///
9988     extern(System) int function (cef_command_line_t* self) nothrow has_switches;
9989 
9990     ///
9991     /// Returns true (1) if the command line contains the given switch.
9992     ///
9993     extern(System) int function (
9994         cef_command_line_t* self,
9995         const(cef_string_t)* name) nothrow has_switch;
9996 
9997     ///
9998     /// Returns the value associated with the given switch. If the switch has no
9999     /// value or isn't present this function returns the NULL string.
10000     ///
10001     // The resulting string must be freed by calling cef_string_userfree_free().
10002     extern(System) cef_string_userfree_t function (
10003         cef_command_line_t* self,
10004         const(cef_string_t)* name) nothrow get_switch_value;
10005 
10006     ///
10007     /// Returns the map of switch names and values. If a switch has no value an
10008     /// NULL string is returned.
10009     ///
10010     extern(System) void function (
10011         cef_command_line_t* self,
10012         cef_string_map_t switches) nothrow get_switches;
10013 
10014     ///
10015     /// Add a switch to the end of the command line.
10016     ///
10017     extern(System) void function (
10018         cef_command_line_t* self,
10019         const(cef_string_t)* name) nothrow append_switch;
10020 
10021     ///
10022     /// Add a switch with the specified value to the end of the command line. If
10023     /// the switch has no value pass an NULL value string.
10024     ///
10025     extern(System) void function (
10026         cef_command_line_t* self,
10027         const(cef_string_t)* name,
10028         const(cef_string_t)* value) nothrow append_switch_with_value;
10029 
10030     ///
10031     /// True if there are remaining command line arguments.
10032     ///
10033     extern(System) int function (cef_command_line_t* self) nothrow has_arguments;
10034 
10035     ///
10036     /// Get the remaining command line arguments.
10037     ///
10038     extern(System) void function (
10039         cef_command_line_t* self,
10040         cef_string_list_t arguments) nothrow get_arguments;
10041 
10042     ///
10043     /// Add an argument to the end of the command line.
10044     ///
10045     extern(System) void function (
10046         cef_command_line_t* self,
10047         const(cef_string_t)* argument) nothrow append_argument;
10048 
10049     ///
10050     /// Insert a command before the current command. Common for debuggers, like
10051     /// "valgrind" or "gdb --args".
10052     ///
10053     extern(System) void function (
10054         cef_command_line_t* self,
10055         const(cef_string_t)* wrapper) nothrow prepend_wrapper;
10056 }
10057 
10058 
10059 
10060 ///
10061 /// Create a new cef_command_line_t instance.
10062 ///
10063 cef_command_line_t* cef_command_line_create ();
10064 
10065 ///
10066 /// Returns the singleton global cef_command_line_t object. The returned object
10067 /// will be read-only.
10068 ///
10069 cef_command_line_t* cef_command_line_get_global ();
10070 
10071 // CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
10072 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
10073 //
10074 // Redistribution and use in source and binary forms, with or without
10075 // modification, are permitted provided that the following conditions are
10076 // met:
10077 //
10078 //    * Redistributions of source code must retain the above copyright
10079 // notice, this list of conditions and the following disclaimer.
10080 //    * Redistributions in binary form must reproduce the above
10081 // copyright notice, this list of conditions and the following disclaimer
10082 // in the documentation and/or other materials provided with the
10083 // distribution.
10084 //    * Neither the name of Google Inc. nor the name Chromium Embedded
10085 // Framework nor the names of its contributors may be used to endorse
10086 // or promote products derived from this software without specific prior
10087 // written permission.
10088 //
10089 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10090 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10091 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10092 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10093 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10094 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10095 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10096 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10097 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10098 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10099 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10100 //
10101 // ---------------------------------------------------------------------------
10102 //
10103 // This file was generated by the CEF translator tool and should not edited
10104 // by hand. See the translator.README.txt file in the tools directory for
10105 // more information.
10106 //
10107 // $hash=3ae7dbb24ec7a95a2f4d4e390c9b6622221c2f42$
10108 //
10109 
10110 extern (C):
10111 
10112 ///
10113 /// Callback structure used for continuation of custom context menu display.
10114 ///
10115 struct cef_run_context_menu_callback_t
10116 {
10117     ///
10118     /// Base structure.
10119     ///
10120 
10121     ///
10122     /// Complete context menu display by selecting the specified |command_id| and
10123     /// |event_flags|.
10124     ///
10125 
10126     ///
10127     /// Cancel context menu display.
10128     ///
10129 
10130     ///
10131     /// Callback structure used for continuation of custom quick menu display.
10132 
10133     cef_base_ref_counted_t base;
10134     extern(System) void function (
10135         cef_run_context_menu_callback_t* self,
10136         int command_id,
10137         cef_event_flags_t event_flags) nothrow cont;
10138     extern(System) void function (cef_run_context_menu_callback_t* self) nothrow cancel;
10139 }
10140 
10141 
10142 ///
10143 struct cef_run_quick_menu_callback_t
10144 {
10145     ///
10146     /// Base structure.
10147     ///
10148     cef_base_ref_counted_t base;
10149 
10150     ///
10151     /// Complete quick menu display by selecting the specified |command_id| and
10152     /// |event_flags|.
10153     ///
10154     extern(System) void function (
10155         cef_run_quick_menu_callback_t* self,
10156         int command_id,
10157         cef_event_flags_t event_flags) nothrow cont;
10158 
10159     ///
10160     /// Cancel quick menu display.
10161     ///
10162     extern(System) void function (cef_run_quick_menu_callback_t* self) nothrow cancel;
10163 }
10164 
10165 
10166 
10167 ///
10168 /// Implement this structure to handle context menu events. The functions of
10169 /// this structure will be called on the UI thread.
10170 ///
10171 struct cef_context_menu_handler_t
10172 {
10173     ///
10174     /// Base structure.
10175     ///
10176     cef_base_ref_counted_t base;
10177 
10178     ///
10179     /// Called before a context menu is displayed. |params| provides information
10180     /// about the context menu state. |model| initially contains the default
10181     /// context menu. The |model| can be cleared to show no context menu or
10182     /// modified to show a custom menu. Do not keep references to |params| or
10183     /// |model| outside of this callback.
10184     ///
10185     extern(System) void function (
10186         cef_context_menu_handler_t* self,
10187         cef_browser_t* browser,
10188         cef_frame_t* frame,
10189         cef_context_menu_params_t* params,
10190         cef_menu_model_t* model) nothrow on_before_context_menu;
10191 
10192     ///
10193     /// Called to allow custom display of the context menu. |params| provides
10194     /// information about the context menu state. |model| contains the context
10195     /// menu model resulting from OnBeforeContextMenu. For custom display return
10196     /// true (1) and execute |callback| either synchronously or asynchronously
10197     /// with the selected command ID. For default display return false (0). Do not
10198     /// keep references to |params| or |model| outside of this callback.
10199     ///
10200     extern(System) int function (
10201         cef_context_menu_handler_t* self,
10202         cef_browser_t* browser,
10203         cef_frame_t* frame,
10204         cef_context_menu_params_t* params,
10205         cef_menu_model_t* model,
10206         cef_run_context_menu_callback_t* callback) nothrow run_context_menu;
10207 
10208     ///
10209     /// Called to execute a command selected from the context menu. Return true
10210     /// (1) if the command was handled or false (0) for the default
10211     /// implementation. See cef_menu_id_t for the command ids that have default
10212     /// implementations. All user-defined command ids should be between
10213     /// MENU_ID_USER_FIRST and MENU_ID_USER_LAST. |params| will have the same
10214     /// values as what was passed to on_before_context_menu(). Do not keep a
10215     /// reference to |params| outside of this callback.
10216     ///
10217     extern(System) int function (
10218         cef_context_menu_handler_t* self,
10219         cef_browser_t* browser,
10220         cef_frame_t* frame,
10221         cef_context_menu_params_t* params,
10222         int command_id,
10223         cef_event_flags_t event_flags) nothrow on_context_menu_command;
10224 
10225     ///
10226     /// Called when the context menu is dismissed irregardless of whether the menu
10227     /// was canceled or a command was selected.
10228     ///
10229     extern(System) void function (
10230         cef_context_menu_handler_t* self,
10231         cef_browser_t* browser,
10232         cef_frame_t* frame) nothrow on_context_menu_dismissed;
10233 
10234     ///
10235     /// Called to allow custom display of the quick menu for a windowless browser.
10236     /// |location| is the top left corner of the selected region. |size| is the
10237     /// size of the selected region. |edit_state_flags| is a combination of flags
10238     /// that represent the state of the quick menu. Return true (1) if the menu
10239     /// will be handled and execute |callback| either synchronously or
10240     /// asynchronously with the selected command ID. Return false (0) to cancel
10241     /// the menu.
10242     ///
10243     extern(System) int function (
10244         cef_context_menu_handler_t* self,
10245         cef_browser_t* browser,
10246         cef_frame_t* frame,
10247         const(cef_point_t)* location,
10248         const(cef_size_t)* size,
10249         cef_quick_menu_edit_state_flags_t edit_state_flags,
10250         cef_run_quick_menu_callback_t* callback) nothrow run_quick_menu;
10251 
10252     ///
10253     /// Called to execute a command selected from the quick menu for a windowless
10254     /// browser. Return true (1) if the command was handled or false (0) for the
10255     /// default implementation. See cef_menu_id_t for command IDs that have
10256     /// default implementations.
10257     ///
10258     extern(System) int function (
10259         cef_context_menu_handler_t* self,
10260         cef_browser_t* browser,
10261         cef_frame_t* frame,
10262         int command_id,
10263         cef_event_flags_t event_flags) nothrow on_quick_menu_command;
10264 
10265     ///
10266     /// Called when the quick menu for a windowless browser is dismissed
10267     /// irregardless of whether the menu was canceled or a command was selected.
10268     ///
10269     extern(System) void function (
10270         cef_context_menu_handler_t* self,
10271         cef_browser_t* browser,
10272         cef_frame_t* frame) nothrow on_quick_menu_dismissed;
10273 }
10274 
10275 
10276 
10277 ///
10278 /// Provides information about the context menu state. The functions of this
10279 /// structure can only be accessed on browser process the UI thread.
10280 ///
10281 struct cef_context_menu_params_t
10282 {
10283     ///
10284     /// Base structure.
10285     ///
10286     cef_base_ref_counted_t base;
10287 
10288     ///
10289     /// Returns the X coordinate of the mouse where the context menu was invoked.
10290     /// Coords are relative to the associated RenderView's origin.
10291     ///
10292     extern(System) int function (cef_context_menu_params_t* self) nothrow get_xcoord;
10293 
10294     ///
10295     /// Returns the Y coordinate of the mouse where the context menu was invoked.
10296     /// Coords are relative to the associated RenderView's origin.
10297     ///
10298     extern(System) int function (cef_context_menu_params_t* self) nothrow get_ycoord;
10299 
10300     ///
10301     /// Returns flags representing the type of node that the context menu was
10302     /// invoked on.
10303     ///
10304     extern(System) cef_context_menu_type_flags_t function (
10305         cef_context_menu_params_t* self) nothrow get_type_flags;
10306 
10307     ///
10308     /// Returns the URL of the link, if any, that encloses the node that the
10309     /// context menu was invoked on.
10310     ///
10311     // The resulting string must be freed by calling cef_string_userfree_free().
10312     extern(System) cef_string_userfree_t function (
10313         cef_context_menu_params_t* self) nothrow get_link_url;
10314 
10315     ///
10316     /// Returns the link URL, if any, to be used ONLY for "copy link address". We
10317     /// don't validate this field in the frontend process.
10318     ///
10319     // The resulting string must be freed by calling cef_string_userfree_free().
10320     extern(System) cef_string_userfree_t function (
10321         cef_context_menu_params_t* self) nothrow get_unfiltered_link_url;
10322 
10323     ///
10324     /// Returns the source URL, if any, for the element that the context menu was
10325     /// invoked on. Example of elements with source URLs are img, audio, and
10326     /// video.
10327     ///
10328     // The resulting string must be freed by calling cef_string_userfree_free().
10329     extern(System) cef_string_userfree_t function (
10330         cef_context_menu_params_t* self) nothrow get_source_url;
10331 
10332     ///
10333     /// Returns true (1) if the context menu was invoked on an image which has
10334     /// non-NULL contents.
10335     ///
10336     extern(System) int function (cef_context_menu_params_t* self) nothrow has_image_contents;
10337 
10338     ///
10339     /// Returns the title text or the alt text if the context menu was invoked on
10340     /// an image.
10341     ///
10342     // The resulting string must be freed by calling cef_string_userfree_free().
10343     extern(System) cef_string_userfree_t function (
10344         cef_context_menu_params_t* self) nothrow get_title_text;
10345 
10346     ///
10347     /// Returns the URL of the top level page that the context menu was invoked
10348     /// on.
10349     ///
10350     // The resulting string must be freed by calling cef_string_userfree_free().
10351     extern(System) cef_string_userfree_t function (
10352         cef_context_menu_params_t* self) nothrow get_page_url;
10353 
10354     ///
10355     /// Returns the URL of the subframe that the context menu was invoked on.
10356     ///
10357     // The resulting string must be freed by calling cef_string_userfree_free().
10358     extern(System) cef_string_userfree_t function (
10359         cef_context_menu_params_t* self) nothrow get_frame_url;
10360 
10361     ///
10362     /// Returns the character encoding of the subframe that the context menu was
10363     /// invoked on.
10364     ///
10365     // The resulting string must be freed by calling cef_string_userfree_free().
10366     extern(System) cef_string_userfree_t function (
10367         cef_context_menu_params_t* self) nothrow get_frame_charset;
10368 
10369     ///
10370     /// Returns the type of context node that the context menu was invoked on.
10371     ///
10372     extern(System) cef_context_menu_media_type_t function (
10373         cef_context_menu_params_t* self) nothrow get_media_type;
10374 
10375     ///
10376     /// Returns flags representing the actions supported by the media element, if
10377     /// any, that the context menu was invoked on.
10378     ///
10379     extern(System) cef_context_menu_media_state_flags_t function (
10380         cef_context_menu_params_t* self) nothrow get_media_state_flags;
10381 
10382     ///
10383     /// Returns the text of the selection, if any, that the context menu was
10384     /// invoked on.
10385     ///
10386     // The resulting string must be freed by calling cef_string_userfree_free().
10387     extern(System) cef_string_userfree_t function (
10388         cef_context_menu_params_t* self) nothrow get_selection_text;
10389 
10390     ///
10391     /// Returns the text of the misspelled word, if any, that the context menu was
10392     /// invoked on.
10393     ///
10394     // The resulting string must be freed by calling cef_string_userfree_free().
10395     extern(System) cef_string_userfree_t function (
10396         cef_context_menu_params_t* self) nothrow get_misspelled_word;
10397 
10398     ///
10399     /// Returns true (1) if suggestions exist, false (0) otherwise. Fills in
10400     /// |suggestions| from the spell check service for the misspelled word if
10401     /// there is one.
10402     ///
10403     extern(System) int function (
10404         cef_context_menu_params_t* self,
10405         cef_string_list_t suggestions) nothrow get_dictionary_suggestions;
10406 
10407     ///
10408     /// Returns true (1) if the context menu was invoked on an editable node.
10409     ///
10410     extern(System) int function (cef_context_menu_params_t* self) nothrow is_editable;
10411 
10412     ///
10413     /// Returns true (1) if the context menu was invoked on an editable node where
10414     /// spell-check is enabled.
10415     ///
10416     extern(System) int function (cef_context_menu_params_t* self) nothrow is_spell_check_enabled;
10417 
10418     ///
10419     /// Returns flags representing the actions supported by the editable node, if
10420     /// any, that the context menu was invoked on.
10421     ///
10422     extern(System) cef_context_menu_edit_state_flags_t function (
10423         cef_context_menu_params_t* self) nothrow get_edit_state_flags;
10424 
10425     ///
10426     /// Returns true (1) if the context menu contains items specified by the
10427     /// renderer process.
10428     ///
10429     extern(System) int function (cef_context_menu_params_t* self) nothrow is_custom_menu;
10430 }
10431 
10432 
10433 
10434 // CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_
10435 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
10436 //
10437 // Redistribution and use in source and binary forms, with or without
10438 // modification, are permitted provided that the following conditions are
10439 // met:
10440 //
10441 //    * Redistributions of source code must retain the above copyright
10442 // notice, this list of conditions and the following disclaimer.
10443 //    * Redistributions in binary form must reproduce the above
10444 // copyright notice, this list of conditions and the following disclaimer
10445 // in the documentation and/or other materials provided with the
10446 // distribution.
10447 //    * Neither the name of Google Inc. nor the name Chromium Embedded
10448 // Framework nor the names of its contributors may be used to endorse
10449 // or promote products derived from this software without specific prior
10450 // written permission.
10451 //
10452 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10453 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10454 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10455 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10456 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10457 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10458 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10459 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10460 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10461 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10462 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10463 //
10464 // ---------------------------------------------------------------------------
10465 //
10466 // This file was generated by the CEF translator tool and should not edited
10467 // by hand. See the translator.README.txt file in the tools directory for
10468 // more information.
10469 //
10470 // $hash=76ba2e59636aa71c8c6286093198a1e64d012c62$
10471 //
10472 
10473 extern (C):
10474 
10475 ///
10476 /// Structure used for managing cookies. The functions of this structure may be
10477 /// called on any thread unless otherwise indicated.
10478 ///
10479 struct cef_cookie_manager_t
10480 {
10481     ///
10482     /// Base structure.
10483     ///
10484 
10485     ///
10486     /// Visit all cookies on the UI thread. The returned cookies are ordered by
10487     /// longest path, then by earliest creation date. Returns false (0) if cookies
10488     /// cannot be accessed.
10489     ///
10490 
10491     ///
10492     /// Visit a subset of cookies on the UI thread. The results are filtered by
10493     /// the given url scheme, host, domain and path. If |includeHttpOnly| is true
10494     /// (1) HTTP-only cookies will also be included in the results. The returned
10495 
10496     cef_base_ref_counted_t base;
10497     extern(System) int function (
10498         cef_cookie_manager_t* self,
10499         cef_cookie_visitor_t* visitor) nothrow visit_all_cookies;
10500     /// cookies are ordered by longest path, then by earliest creation date.
10501     /// Returns false (0) if cookies cannot be accessed.
10502     ///
10503     extern(System) int function (
10504         cef_cookie_manager_t* self,
10505         const(cef_string_t)* url,
10506         int includeHttpOnly,
10507         cef_cookie_visitor_t* visitor) nothrow visit_url_cookies;
10508 
10509     ///
10510     /// Sets a cookie given a valid URL and explicit user-provided cookie
10511     /// attributes. This function expects each attribute to be well-formed. It
10512     /// will check for disallowed characters (e.g. the ';' character is disallowed
10513     /// within the cookie value attribute) and fail without setting the cookie if
10514     /// such characters are found. If |callback| is non-NULL it will be executed
10515     /// asnychronously on the UI thread after the cookie has been set. Returns
10516     /// false (0) if an invalid URL is specified or if cookies cannot be accessed.
10517     ///
10518     extern(System) int function (
10519         cef_cookie_manager_t* self,
10520         const(cef_string_t)* url,
10521         const(cef_cookie_t)* cookie,
10522         cef_set_cookie_callback_t* callback) nothrow set_cookie;
10523 
10524     ///
10525     /// Delete all cookies that match the specified parameters. If both |url| and
10526     /// |cookie_name| values are specified all host and domain cookies matching
10527     /// both will be deleted. If only |url| is specified all host cookies (but not
10528     /// domain cookies) irrespective of path will be deleted. If |url| is NULL all
10529     /// cookies for all hosts and domains will be deleted. If |callback| is non-
10530     /// NULL it will be executed asnychronously on the UI thread after the cookies
10531     /// have been deleted. Returns false (0) if a non-NULL invalid URL is
10532     /// specified or if cookies cannot be accessed. Cookies can alternately be
10533     /// deleted using the Visit*Cookies() functions.
10534     ///
10535     extern(System) int function (
10536         cef_cookie_manager_t* self,
10537         const(cef_string_t)* url,
10538         const(cef_string_t)* cookie_name,
10539         cef_delete_cookies_callback_t* callback) nothrow delete_cookies;
10540 
10541     ///
10542     /// Flush the backing store (if any) to disk. If |callback| is non-NULL it
10543     /// will be executed asnychronously on the UI thread after the flush is
10544     /// complete. Returns false (0) if cookies cannot be accessed.
10545     ///
10546     extern(System) int function (
10547         cef_cookie_manager_t* self,
10548         cef_completion_callback_t* callback) nothrow flush_store;
10549 }
10550 
10551 
10552 
10553 ///
10554 /// Returns the global cookie manager. By default data will be stored at
10555 /// cef_settings_t.cache_path if specified or in memory otherwise. If |callback|
10556 /// is non-NULL it will be executed asnychronously on the UI thread after the
10557 /// manager's storage has been initialized. Using this function is equivalent to
10558 /// calling cef_request_context_t::cef_request_context_get_global_context()-
10559 /// >GetDefaultCookieManager().
10560 ///
10561 cef_cookie_manager_t* cef_cookie_manager_get_global_manager (
10562     cef_completion_callback_t* callback);
10563 
10564 ///
10565 /// Structure to implement for visiting cookie values. The functions of this
10566 /// structure will always be called on the UI thread.
10567 ///
10568 struct cef_cookie_visitor_t
10569 {
10570     ///
10571     /// Base structure.
10572     ///
10573     cef_base_ref_counted_t base;
10574 
10575     ///
10576     /// Method that will be called once for each cookie. |count| is the 0-based
10577     /// index for the current cookie. |total| is the total number of cookies. Set
10578     /// |deleteCookie| to true (1) to delete the cookie currently being visited.
10579     /// Return false (0) to stop visiting cookies. This function may never be
10580     /// called if no cookies are found.
10581     ///
10582     extern(System) int function (
10583         cef_cookie_visitor_t* self,
10584         const(cef_cookie_t)* cookie,
10585         int count,
10586         int total,
10587         int* deleteCookie) nothrow visit;
10588 }
10589 
10590 
10591 
10592 ///
10593 /// Structure to implement to be notified of asynchronous completion via
10594 /// cef_cookie_manager_t::set_cookie().
10595 ///
10596 struct cef_set_cookie_callback_t
10597 {
10598     ///
10599     /// Base structure.
10600     ///
10601     cef_base_ref_counted_t base;
10602 
10603     ///
10604     /// Method that will be called upon completion. |success| will be true (1) if
10605     /// the cookie was set successfully.
10606     ///
10607     extern(System) void function (cef_set_cookie_callback_t* self, int success) nothrow on_complete;
10608 }
10609 
10610 
10611 
10612 ///
10613 /// Structure to implement to be notified of asynchronous completion via
10614 /// cef_cookie_manager_t::delete_cookies().
10615 ///
10616 struct cef_delete_cookies_callback_t
10617 {
10618     ///
10619     /// Base structure.
10620     ///
10621     cef_base_ref_counted_t base;
10622 
10623     ///
10624     /// Method that will be called upon completion. |num_deleted| will be the
10625     /// number of cookies that were deleted.
10626     ///
10627     extern(System) void function (
10628         cef_delete_cookies_callback_t* self,
10629         int num_deleted) nothrow on_complete;
10630 }
10631 
10632 
10633 
10634 // CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_
10635 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
10636 //
10637 // Redistribution and use in source and binary forms, with or without
10638 // modification, are permitted provided that the following conditions are
10639 // met:
10640 //
10641 //    * Redistributions of source code must retain the above copyright
10642 // notice, this list of conditions and the following disclaimer.
10643 //    * Redistributions in binary form must reproduce the above
10644 // copyright notice, this list of conditions and the following disclaimer
10645 // in the documentation and/or other materials provided with the
10646 // distribution.
10647 //    * Neither the name of Google Inc. nor the name Chromium Embedded
10648 // Framework nor the names of its contributors may be used to endorse
10649 // or promote products derived from this software without specific prior
10650 // written permission.
10651 //
10652 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10653 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10654 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10655 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10656 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10657 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10658 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10659 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10660 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10661 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10662 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10663 //
10664 // ---------------------------------------------------------------------------
10665 //
10666 // This file was generated by the CEF translator tool and should not edited
10667 // by hand. See the translator.README.txt file in the tools directory for
10668 // more information.
10669 //
10670 // $hash=46a6432f66cce88d8597c3d070681b09a712dc54$
10671 //
10672 
10673 extern (C):
10674 
10675 ///
10676 /// Crash reporting is configured using an INI-style config file named
10677 /// "crash_reporter.cfg". On Windows and Linux this file must be placed next to
10678 /// the main application executable. On macOS this file must be placed in the
10679 /// top-level app bundle Resources directory (e.g.
10680 /// "<appname>.app/Contents/Resources"). File contents are as follows:
10681 ///
10682 /// <pre>
10683 ///  # Comments start with a hash character and must be on their own line.
10684 ///
10685 ///  [Config]
10686 ///  ProductName=<Value of the "prod" crash key; defaults to "cef">
10687 ///  ProductVersion=<Value of the "ver" crash key; defaults to the CEF version>
10688 ///  AppName=<Windows only; App-specific folder name component for storing crash
10689 ///           information; default to "CEF">
10690 ///  ExternalHandler=<Windows only; Name of the external handler exe to use
10691 ///                   instead of re-launching the main exe; default to empty>
10692 ///  BrowserCrashForwardingEnabled=<macOS only; True if browser process crashes
10693 ///                                 should be forwarded to the system crash
10694 ///                                 reporter; default to false>
10695 ///  ServerURL=<crash server URL; default to empty>
10696 ///  RateLimitEnabled=<True if uploads should be rate limited; default to true>
10697 ///  MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled;
10698 ///                    default to 5>
10699 ///  MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value
10700 ///                       will cause older reports to be deleted; default to 20>
10701 ///  MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted;
10702 ///                        default to 5>
10703 ///
10704 ///  [CrashKeys]
10705 ///  my_key1=<small|medium|large>
10706 ///  my_key2=<small|medium|large>
10707 /// </pre>
10708 ///
10709 /// <b>Config section:</b>
10710 ///
10711 /// If "ProductName" and/or "ProductVersion" are set then the specified values
10712 /// will be included in the crash dump metadata. On macOS if these values are
10713 /// set to NULL then they will be retrieved from the Info.plist file using the
10714 /// "CFBundleName" and "CFBundleShortVersionString" keys respectively.
10715 ///
10716 /// If "AppName" is set on Windows then crash report information (metrics,
10717 /// database and dumps) will be stored locally on disk under the
10718 /// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other
10719 /// platforms the cef_settings_t.root_cache_path value will be used.
10720 ///
10721 /// If "ExternalHandler" is set on Windows then the specified exe will be
10722 /// launched as the crashpad-handler instead of re-launching the main process
10723 /// exe. The value can be an absolute path or a path relative to the main exe
10724 /// directory. On Linux the cef_settings_t.browser_subprocess_path value will be
10725 /// used. On macOS the existing subprocess app bundle will be used.
10726 ///
10727 /// If "BrowserCrashForwardingEnabled" is set to true (1) on macOS then browser
10728 /// process crashes will be forwarded to the system crash reporter. This results
10729 /// in the crash UI dialog being displayed to the user and crash reports being
10730 /// logged under "~/Library/Logs/DiagnosticReports". Forwarding of crash reports
10731 /// from non-browser processes and Debug builds is always disabled.
10732 ///
10733 /// If "ServerURL" is set then crashes will be uploaded as a multi-part POST
10734 /// request to the specified URL. Otherwise, reports will only be stored locally
10735 /// on disk.
10736 ///
10737 /// If "RateLimitEnabled" is set to true (1) then crash report uploads will be
10738 /// rate limited as follows:
10739 ///  1. If "MaxUploadsPerDay" is set to a positive value then at most the
10740 ///     specified number of crashes will be uploaded in each 24 hour period.
10741 ///  2. If crash upload fails due to a network or server error then an
10742 ///     incremental backoff delay up to a maximum of 24 hours will be applied
10743 ///     for retries.
10744 ///  3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the
10745 ///     "MaxUploadsPerDay" value will be reduced to 1 until the client is
10746 ///     restarted. This helps to avoid an upload flood when the network or
10747 ///     server error is resolved.
10748 /// Rate limiting is not supported on Linux.
10749 ///
10750 /// If "MaxDatabaseSizeInMb" is set to a positive value then crash report
10751 /// storage on disk will be limited to that size in megabytes. For example, on
10752 /// Windows each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20
10753 /// equates to about 34 crash reports stored on disk. Not supported on Linux.
10754 ///
10755 /// If "MaxDatabaseAgeInDays" is set to a positive value then crash reports
10756 /// older than the specified age in days will be deleted. Not supported on
10757 /// Linux.
10758 ///
10759 /// <b>CrashKeys section:</b>
10760 ///
10761 /// A maximum of 26 crash keys of each size can be specified for use by the
10762 /// application. Crash key values will be truncated based on the specified size
10763 /// (small = 64 bytes, medium = 256 bytes, large = 1024 bytes). The value of
10764 /// crash keys can be set from any thread or process using the
10765 /// CefSetCrashKeyValue function. These key/value pairs will be sent to the
10766 /// crash server along with the crash dump file.
10767 ///
10768 int cef_crash_reporting_enabled ();
10769 
10770 ///
10771 /// Sets or clears a specific key-value pair from the crash metadata.
10772 ///
10773 void cef_set_crash_key_value (
10774     const(cef_string_t)* key,
10775     const(cef_string_t)* value);
10776 
10777 // CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
10778 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
10779 //
10780 // Redistribution and use in source and binary forms, with or without
10781 // modification, are permitted provided that the following conditions are
10782 // met:
10783 //
10784 //    * Redistributions of source code must retain the above copyright
10785 // notice, this list of conditions and the following disclaimer.
10786 //    * Redistributions in binary form must reproduce the above
10787 // copyright notice, this list of conditions and the following disclaimer
10788 // in the documentation and/or other materials provided with the
10789 // distribution.
10790 //    * Neither the name of Google Inc. nor the name Chromium Embedded
10791 // Framework nor the names of its contributors may be used to endorse
10792 // or promote products derived from this software without specific prior
10793 // written permission.
10794 //
10795 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10796 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10797 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10798 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10799 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10800 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10801 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10802 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10803 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10804 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10805 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10806 //
10807 // ---------------------------------------------------------------------------
10808 //
10809 // This file was generated by the CEF translator tool and should not edited
10810 // by hand. See the translator.README.txt file in the tools directory for
10811 // more information.
10812 //
10813 // $hash=dd94c50619e92bf5bed4fe61479813ee559f779d$
10814 //
10815 
10816 extern (C):
10817 
10818 
10819 
10820 ///
10821 /// Callback structure for cef_browser_host_t::AddDevToolsMessageObserver. The
10822 /// functions of this structure will be called on the browser process UI thread.
10823 ///
10824 struct cef_dev_tools_message_observer_t
10825 {
10826     ///
10827     /// Base structure.
10828     ///
10829 
10830     ///
10831     /// Method that will be called on receipt of a DevTools protocol message.
10832     /// |browser| is the originating browser instance. |message| is a UTF8-encoded
10833     /// JSON dictionary representing either a function result or an event.
10834     /// |message| is only valid for the scope of this callback and should be
10835     /// copied if necessary. Return true (1) if the message was handled or false
10836     /// (0) if the message should be further processed and passed to the
10837     /// OnDevToolsMethodResult or OnDevToolsEvent functions as appropriate.
10838     ///
10839     /// Method result dictionaries include an "id" (int) value that identifies the
10840 
10841     cef_base_ref_counted_t base;
10842     /// orginating function call sent from
10843     /// cef_browser_host_t::SendDevToolsMessage, and optionally either a "result"
10844     /// (dictionary) or "error" (dictionary) value. The "error" dictionary will
10845     /// contain "code" (int) and "message" (string) values. Event dictionaries
10846     /// include a "function" (string) value and optionally a "params" (dictionary)
10847     /// value. See the DevTools protocol documentation at
10848     /// https://chromedevtools.github.io/devtools-protocol/ for details of
10849     /// supported function calls and the expected "result" or "params" dictionary
10850     /// contents. JSON dictionaries can be parsed using the CefParseJSON function
10851     /// if desired, however be aware of performance considerations when parsing
10852     /// large messages (some of which may exceed 1MB in size).
10853     ///
10854     extern(System) int function (
10855         cef_dev_tools_message_observer_t* self,
10856         cef_browser_t* browser,
10857         const(void)* message,
10858         size_t message_size) nothrow on_dev_tools_message;
10859 
10860     ///
10861     /// Method that will be called after attempted execution of a DevTools
10862     /// protocol function. |browser| is the originating browser instance.
10863     /// |message_id| is the "id" value that identifies the originating function
10864     /// call message. If the function succeeded |success| will be true (1) and
10865     /// |result| will be the UTF8-encoded JSON "result" dictionary value (which
10866     /// may be NULL). If the function failed |success| will be false (0) and
10867     /// |result| will be the UTF8-encoded JSON "error" dictionary value. |result|
10868     /// is only valid for the scope of this callback and should be copied if
10869     /// necessary. See the OnDevToolsMessage documentation for additional details
10870     /// on |result| contents.
10871     ///
10872     extern(System) void function (
10873         cef_dev_tools_message_observer_t* self,
10874         cef_browser_t* browser,
10875         int message_id,
10876         int success,
10877         const(void)* result,
10878         size_t result_size) nothrow on_dev_tools_method_result;
10879 
10880     ///
10881     /// Method that will be called on receipt of a DevTools protocol event.
10882     /// |browser| is the originating browser instance. |function| is the
10883     /// "function" value. |params| is the UTF8-encoded JSON "params" dictionary
10884     /// value (which may be NULL). |params| is only valid for the scope of this
10885     /// callback and should be copied if necessary. See the OnDevToolsMessage
10886     /// documentation for additional details on |params| contents.
10887     ///
10888     extern(System) void function (
10889         cef_dev_tools_message_observer_t* self,
10890         cef_browser_t* browser,
10891         const(cef_string_t)* method,
10892         const(void)* params,
10893         size_t params_size) nothrow on_dev_tools_event;
10894 
10895     ///
10896     /// Method that will be called when the DevTools agent has attached. |browser|
10897     /// is the originating browser instance. This will generally occur in response
10898     /// to the first message sent while the agent is detached.
10899     ///
10900     extern(System) void function (
10901         cef_dev_tools_message_observer_t* self,
10902         cef_browser_t* browser) nothrow on_dev_tools_agent_attached;
10903 
10904     ///
10905     /// Method that will be called when the DevTools agent has detached. |browser|
10906     /// is the originating browser instance. Any function results that were
10907     /// pending before the agent became detached will not be delivered, and any
10908     /// active event subscriptions will be canceled.
10909     ///
10910     extern(System) void function (
10911         cef_dev_tools_message_observer_t* self,
10912         cef_browser_t* browser) nothrow on_dev_tools_agent_detached;
10913 }
10914 
10915 
10916 
10917 // CEF_INCLUDE_CAPI_CEF_DEVTOOLS_MESSAGE_OBSERVER_CAPI_H_
10918 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
10919 //
10920 // Redistribution and use in source and binary forms, with or without
10921 // modification, are permitted provided that the following conditions are
10922 // met:
10923 //
10924 //    * Redistributions of source code must retain the above copyright
10925 // notice, this list of conditions and the following disclaimer.
10926 //    * Redistributions in binary form must reproduce the above
10927 // copyright notice, this list of conditions and the following disclaimer
10928 // in the documentation and/or other materials provided with the
10929 // distribution.
10930 //    * Neither the name of Google Inc. nor the name Chromium Embedded
10931 // Framework nor the names of its contributors may be used to endorse
10932 // or promote products derived from this software without specific prior
10933 // written permission.
10934 //
10935 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10936 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10937 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10938 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10939 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10940 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10941 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10942 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10943 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10944 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10945 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10946 //
10947 // ---------------------------------------------------------------------------
10948 //
10949 // This file was generated by the CEF translator tool and should not edited
10950 // by hand. See the translator.README.txt file in the tools directory for
10951 // more information.
10952 //
10953 // $hash=bf7208a86ee17f63fd7163cef8c3a13373a1f1c8$
10954 //
10955 
10956 extern (C):
10957 
10958 ///
10959 /// Callback structure for asynchronous continuation of file dialog requests.
10960 ///
10961 struct cef_file_dialog_callback_t
10962 {
10963     ///
10964     /// Base structure.
10965     ///
10966 
10967     ///
10968     /// Continue the file selection. |file_paths| should be a single value or a
10969     /// list of values depending on the dialog mode. An NULL |file_paths| value is
10970     /// treated the same as calling cancel().
10971     ///
10972 
10973     ///
10974     /// Cancel the file selection.
10975     ///
10976 
10977     ///
10978     /// Implement this structure to handle dialog events. The functions of this
10979     /// structure will be called on the browser process UI thread.
10980     ///
10981 
10982     cef_base_ref_counted_t base;
10983     extern(System) void function (
10984         cef_file_dialog_callback_t* self,
10985         cef_string_list_t file_paths) nothrow cont;
10986     extern(System) void function (cef_file_dialog_callback_t* self) nothrow cancel;
10987 }
10988 
10989 
10990 
10991 struct cef_dialog_handler_t
10992 {
10993     ///
10994     /// Base structure.
10995     ///
10996     cef_base_ref_counted_t base;
10997 
10998     ///
10999     /// Called to run a file chooser dialog. |mode| represents the type of dialog
11000     /// to display. |title| to the title to be used for the dialog and may be NULL
11001     /// to show the default title ("Open" or "Save" depending on the mode).
11002     /// |default_file_path| is the path with optional directory and/or file name
11003     /// component that should be initially selected in the dialog.
11004     /// |accept_filters| are used to restrict the selectable file types and may be
11005     /// any combination of valid lower-cased MIME types (e.g. "text/*" or
11006     /// "image/*") and individual file extensions (e.g. ".txt" or ".png").
11007     /// |accept_extensions| provides the semicolon-delimited expansion of MIME
11008     /// types to file extensions (if known, or NULL string otherwise).
11009     /// |accept_descriptions| provides the descriptions for MIME types (if known,
11010     /// or NULL string otherwise). For example, the "image/*" mime type might have
11011     /// extensions ".png;.jpg;.bmp;..." and description "Image Files".
11012     /// |accept_filters|, |accept_extensions| and |accept_descriptions| will all
11013     /// be the same size. To display a custom dialog return true (1) and execute
11014     /// |callback| either inline or at a later time. To display the default dialog
11015     /// return false (0). If this function returns false (0) it may be called an
11016     /// additional time for the same dialog (both before and after MIME type
11017     /// expansion).
11018     ///
11019     extern(System) int function (
11020         cef_dialog_handler_t* self,
11021         cef_browser_t* browser,
11022         cef_file_dialog_mode_t mode,
11023         const(cef_string_t)* title,
11024         const(cef_string_t)* default_file_path,
11025         cef_string_list_t accept_filters,
11026         cef_string_list_t accept_extensions,
11027         cef_string_list_t accept_descriptions,
11028         cef_file_dialog_callback_t* callback) nothrow on_file_dialog;
11029 }
11030 
11031 
11032 
11033 // CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_
11034 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
11035 //
11036 // Redistribution and use in source and binary forms, with or without
11037 // modification, are permitted provided that the following conditions are
11038 // met:
11039 //
11040 //    * Redistributions of source code must retain the above copyright
11041 // notice, this list of conditions and the following disclaimer.
11042 //    * Redistributions in binary form must reproduce the above
11043 // copyright notice, this list of conditions and the following disclaimer
11044 // in the documentation and/or other materials provided with the
11045 // distribution.
11046 //    * Neither the name of Google Inc. nor the name Chromium Embedded
11047 // Framework nor the names of its contributors may be used to endorse
11048 // or promote products derived from this software without specific prior
11049 // written permission.
11050 //
11051 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11052 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11053 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11054 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11055 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11056 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11057 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11058 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11059 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11060 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11061 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11062 //
11063 // ---------------------------------------------------------------------------
11064 //
11065 // This file was generated by the CEF translator tool and should not edited
11066 // by hand. See the translator.README.txt file in the tools directory for
11067 // more information.
11068 //
11069 // $hash=5a99c5e88ea0e123087234b2795fa625fed183f2$
11070 //
11071 
11072 import core.stdc.config;
11073 
11074 extern (C):
11075 
11076 ///
11077 /// Implement this structure to handle events related to browser display state.
11078 /// The functions of this structure will be called on the UI thread.
11079 ///
11080 struct cef_display_handler_t
11081 {
11082     ///
11083     /// Base structure.
11084     ///
11085 
11086     ///
11087     /// Called when a frame's address has changed.
11088     ///
11089 
11090     ///
11091     /// Called when the page title changes.
11092     ///
11093 
11094     cef_base_ref_counted_t base;
11095     extern(System) void function (
11096         cef_display_handler_t* self,
11097         cef_browser_t* browser,
11098         cef_frame_t* frame,
11099         const(cef_string_t)* url) nothrow on_address_change;
11100     extern(System) void function (
11101         cef_display_handler_t* self,
11102         cef_browser_t* browser,
11103         const(cef_string_t)* title) nothrow on_title_change;
11104     ///
11105     /// Called when the page icon changes.
11106     ///
11107     extern(System) void function (
11108         cef_display_handler_t* self,
11109         cef_browser_t* browser,
11110         cef_string_list_t icon_urls) nothrow on_favicon_urlchange;
11111 
11112     ///
11113     /// Called when web content in the page has toggled fullscreen mode. If
11114     /// |fullscreen| is true (1) the content will automatically be sized to fill
11115     /// the browser content area. If |fullscreen| is false (0) the content will
11116     /// automatically return to its original size and position. With the Alloy
11117     /// runtime the client is responsible for triggering the fullscreen transition
11118     /// (for example, by calling cef_window_t::SetFullscreen when using Views).
11119     /// With the Chrome runtime the fullscreen transition will be triggered
11120     /// automatically. The cef_window_delegate_t::OnWindowFullscreenTransition
11121     /// function will be called during the fullscreen transition for notification
11122     /// purposes.
11123     ///
11124     extern(System) void function (
11125         cef_display_handler_t* self,
11126         cef_browser_t* browser,
11127         int fullscreen) nothrow on_fullscreen_mode_change;
11128 
11129     ///
11130     /// Called when the browser is about to display a tooltip. |text| contains the
11131     /// text that will be displayed in the tooltip. To handle the display of the
11132     /// tooltip yourself return true (1). Otherwise, you can optionally modify
11133     /// |text| and then return false (0) to allow the browser to display the
11134     /// tooltip. When window rendering is disabled the application is responsible
11135     /// for drawing tooltips and the return value is ignored.
11136     ///
11137     extern(System) int function (
11138         cef_display_handler_t* self,
11139         cef_browser_t* browser,
11140         cef_string_t* text) nothrow on_tooltip;
11141 
11142     ///
11143     /// Called when the browser receives a status message. |value| contains the
11144     /// text that will be displayed in the status message.
11145     ///
11146     extern(System) void function (
11147         cef_display_handler_t* self,
11148         cef_browser_t* browser,
11149         const(cef_string_t)* value) nothrow on_status_message;
11150 
11151     ///
11152     /// Called to display a console message. Return true (1) to stop the message
11153     /// from being output to the console.
11154     ///
11155     extern(System) int function (
11156         cef_display_handler_t* self,
11157         cef_browser_t* browser,
11158         cef_log_severity_t level,
11159         const(cef_string_t)* message,
11160         const(cef_string_t)* source,
11161         int line) nothrow on_console_message;
11162 
11163     ///
11164     /// Called when auto-resize is enabled via
11165     /// cef_browser_host_t::SetAutoResizeEnabled and the contents have auto-
11166     /// resized. |new_size| will be the desired size in view coordinates. Return
11167     /// true (1) if the resize was handled or false (0) for default handling.
11168     ///
11169     extern(System) int function (
11170         cef_display_handler_t* self,
11171         cef_browser_t* browser,
11172         const(cef_size_t)* new_size) nothrow on_auto_resize;
11173 
11174     ///
11175     /// Called when the overall page loading progress has changed. |progress|
11176     /// ranges from 0.0 to 1.0.
11177     ///
11178     extern(System) void function (
11179         cef_display_handler_t* self,
11180         cef_browser_t* browser,
11181         double progress) nothrow on_loading_progress_change;
11182 
11183     ///
11184     /// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
11185     /// |custom_cursor_info| will be populated with the custom cursor information.
11186     /// Return true (1) if the cursor change was handled or false (0) for default
11187     /// handling.
11188     ///
11189     extern(System) int function (
11190         cef_display_handler_t* self,
11191         cef_browser_t* browser,
11192         c_ulong cursor,
11193         cef_cursor_type_t type,
11194         const(cef_cursor_info_t)* custom_cursor_info) nothrow on_cursor_change;
11195 
11196     ///
11197     /// Called when the browser's access to an audio and/or video source has
11198     /// changed.
11199     ///
11200     extern(System) void function (
11201         cef_display_handler_t* self,
11202         cef_browser_t* browser,
11203         int has_video_access,
11204         int has_audio_access) nothrow on_media_access_change;
11205 }
11206 
11207 
11208 
11209 // CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_
11210 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
11211 //
11212 // Redistribution and use in source and binary forms, with or without
11213 // modification, are permitted provided that the following conditions are
11214 // met:
11215 //
11216 //    * Redistributions of source code must retain the above copyright
11217 // notice, this list of conditions and the following disclaimer.
11218 //    * Redistributions in binary form must reproduce the above
11219 // copyright notice, this list of conditions and the following disclaimer
11220 // in the documentation and/or other materials provided with the
11221 // distribution.
11222 //    * Neither the name of Google Inc. nor the name Chromium Embedded
11223 // Framework nor the names of its contributors may be used to endorse
11224 // or promote products derived from this software without specific prior
11225 // written permission.
11226 //
11227 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11228 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11229 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11230 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11231 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11232 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11233 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11234 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11235 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11236 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11237 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11238 //
11239 // ---------------------------------------------------------------------------
11240 //
11241 // This file was generated by the CEF translator tool and should not edited
11242 // by hand. See the translator.README.txt file in the tools directory for
11243 // more information.
11244 //
11245 // $hash=a4d2f79163205ed4367916546240a6aedc2165f9$
11246 //
11247 
11248 extern (C):
11249 
11250 ///
11251 /// Structure to implement for visiting the DOM. The functions of this structure
11252 /// will be called on the render process main thread.
11253 ///
11254 struct cef_domvisitor_t
11255 {
11256     ///
11257     /// Base structure.
11258     ///
11259 
11260     ///
11261     /// Method executed for visiting the DOM. The document object passed to this
11262     /// function represents a snapshot of the DOM at the time this function is
11263     /// executed. DOM objects are only valid for the scope of this function. Do
11264     /// not keep references to or attempt to access any DOM objects outside the
11265     /// scope of this function.
11266     ///
11267 
11268     ///
11269     /// Structure used to represent a DOM document. The functions of this structure
11270     /// should only be called on the render process main thread thread.
11271 
11272     cef_base_ref_counted_t base;
11273     extern(System) void function (
11274         cef_domvisitor_t* self,
11275         cef_domdocument_t* document) nothrow visit;
11276 }
11277 
11278 
11279 ///
11280 struct cef_domdocument_t
11281 {
11282     ///
11283     /// Base structure.
11284     ///
11285     cef_base_ref_counted_t base;
11286 
11287     ///
11288     /// Returns the document type.
11289     ///
11290     extern(System) cef_dom_document_type_t function (cef_domdocument_t* self) nothrow get_type;
11291 
11292     ///
11293     /// Returns the root document node.
11294     ///
11295     extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_document;
11296 
11297     ///
11298     /// Returns the BODY node of an HTML document.
11299     ///
11300     extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_body;
11301 
11302     ///
11303     /// Returns the HEAD node of an HTML document.
11304     ///
11305     extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_head;
11306 
11307     ///
11308     /// Returns the title of an HTML document.
11309     ///
11310     // The resulting string must be freed by calling cef_string_userfree_free().
11311     extern(System) cef_string_userfree_t function (cef_domdocument_t* self) nothrow get_title;
11312 
11313     ///
11314     /// Returns the document element with the specified ID value.
11315     ///
11316     extern(System) cef_domnode_t* function (
11317         cef_domdocument_t* self,
11318         const(cef_string_t)* id) nothrow get_element_by_id;
11319 
11320     ///
11321     /// Returns the node that currently has keyboard focus.
11322     ///
11323     extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_focused_node;
11324 
11325     ///
11326     /// Returns true (1) if a portion of the document is selected.
11327     ///
11328     extern(System) int function (cef_domdocument_t* self) nothrow has_selection;
11329 
11330     ///
11331     /// Returns the selection offset within the start node.
11332     ///
11333     extern(System) int function (cef_domdocument_t* self) nothrow get_selection_start_offset;
11334 
11335     ///
11336     /// Returns the selection offset within the end node.
11337     ///
11338     extern(System) int function (cef_domdocument_t* self) nothrow get_selection_end_offset;
11339 
11340     ///
11341     /// Returns the contents of this selection as markup.
11342     ///
11343     // The resulting string must be freed by calling cef_string_userfree_free().
11344     extern(System) cef_string_userfree_t function (
11345         cef_domdocument_t* self) nothrow get_selection_as_markup;
11346 
11347     ///
11348     /// Returns the contents of this selection as text.
11349     ///
11350     // The resulting string must be freed by calling cef_string_userfree_free().
11351     extern(System) cef_string_userfree_t function (
11352         cef_domdocument_t* self) nothrow get_selection_as_text;
11353 
11354     ///
11355     /// Returns the base URL for the document.
11356     ///
11357     // The resulting string must be freed by calling cef_string_userfree_free().
11358     extern(System) cef_string_userfree_t function (cef_domdocument_t* self) nothrow get_base_url;
11359 
11360     ///
11361     /// Returns a complete URL based on the document base URL and the specified
11362     /// partial URL.
11363     ///
11364     // The resulting string must be freed by calling cef_string_userfree_free().
11365     extern(System) cef_string_userfree_t function (
11366         cef_domdocument_t* self,
11367         const(cef_string_t)* partialURL) nothrow get_complete_url;
11368 }
11369 
11370 
11371 
11372 ///
11373 /// Structure used to represent a DOM node. The functions of this structure
11374 /// should only be called on the render process main thread.
11375 ///
11376 struct cef_domnode_t
11377 {
11378     ///
11379     /// Base structure.
11380     ///
11381     cef_base_ref_counted_t base;
11382 
11383     ///
11384     /// Returns the type for this node.
11385     ///
11386     extern(System) cef_dom_node_type_t function (cef_domnode_t* self) nothrow get_type;
11387 
11388     ///
11389     /// Returns true (1) if this is a text node.
11390     ///
11391     extern(System) int function (cef_domnode_t* self) nothrow is_text;
11392 
11393     ///
11394     /// Returns true (1) if this is an element node.
11395     ///
11396     extern(System) int function (cef_domnode_t* self) nothrow is_element;
11397 
11398     ///
11399     /// Returns true (1) if this is an editable node.
11400     ///
11401     extern(System) int function (cef_domnode_t* self) nothrow is_editable;
11402 
11403     ///
11404     /// Returns true (1) if this is a form control element node.
11405     ///
11406     extern(System) int function (cef_domnode_t* self) nothrow is_form_control_element;
11407 
11408     ///
11409     /// Returns the type of this form control element node.
11410     ///
11411     extern(System) cef_dom_form_control_type_t function (
11412         cef_domnode_t* self) nothrow get_form_control_element_type;
11413 
11414     ///
11415     /// Returns true (1) if this object is pointing to the same handle as |that|
11416     /// object.
11417     ///
11418     extern(System) int function (cef_domnode_t* self, cef_domnode_t* that) nothrow is_same;
11419 
11420     ///
11421     /// Returns the name of this node.
11422     ///
11423     // The resulting string must be freed by calling cef_string_userfree_free().
11424     extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_name;
11425 
11426     ///
11427     /// Returns the value of this node.
11428     ///
11429     // The resulting string must be freed by calling cef_string_userfree_free().
11430     extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_value;
11431 
11432     ///
11433     /// Set the value of this node. Returns true (1) on success.
11434     ///
11435     extern(System) int function (cef_domnode_t* self, const(cef_string_t)* value) nothrow set_value;
11436 
11437     ///
11438     /// Returns the contents of this node as markup.
11439     ///
11440     // The resulting string must be freed by calling cef_string_userfree_free().
11441     extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_as_markup;
11442 
11443     ///
11444     /// Returns the document associated with this node.
11445     ///
11446     extern(System) cef_domdocument_t* function (cef_domnode_t* self) nothrow get_document;
11447 
11448     ///
11449     /// Returns the parent node.
11450     ///
11451     extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_parent;
11452 
11453     ///
11454     /// Returns the previous sibling node.
11455     ///
11456     extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_previous_sibling;
11457 
11458     ///
11459     /// Returns the next sibling node.
11460     ///
11461     extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_next_sibling;
11462 
11463     ///
11464     /// Returns true (1) if this node has child nodes.
11465     ///
11466     extern(System) int function (cef_domnode_t* self) nothrow has_children;
11467 
11468     ///
11469     /// Return the first child node.
11470     ///
11471     extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_first_child;
11472 
11473     ///
11474     /// Returns the last child node.
11475     ///
11476     extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_last_child;
11477 
11478     ///
11479     /// Returns the tag name of this element.
11480     ///
11481     // The resulting string must be freed by calling cef_string_userfree_free().
11482     extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_element_tag_name;
11483 
11484     ///
11485     /// Returns true (1) if this element has attributes.
11486     ///
11487     extern(System) int function (cef_domnode_t* self) nothrow has_element_attributes;
11488 
11489     ///
11490     /// Returns true (1) if this element has an attribute named |attrName|.
11491     ///
11492     extern(System) int function (
11493         cef_domnode_t* self,
11494         const(cef_string_t)* attrName) nothrow has_element_attribute;
11495 
11496     ///
11497     /// Returns the element attribute named |attrName|.
11498     ///
11499     // The resulting string must be freed by calling cef_string_userfree_free().
11500     extern(System) cef_string_userfree_t function (
11501         cef_domnode_t* self,
11502         const(cef_string_t)* attrName) nothrow get_element_attribute;
11503 
11504     ///
11505     /// Returns a map of all element attributes.
11506     ///
11507     extern(System) void function (
11508         cef_domnode_t* self,
11509         cef_string_map_t attrMap) nothrow get_element_attributes;
11510 
11511     ///
11512     /// Set the value for the element attribute named |attrName|. Returns true (1)
11513     /// on success.
11514     ///
11515     extern(System) int function (
11516         cef_domnode_t* self,
11517         const(cef_string_t)* attrName,
11518         const(cef_string_t)* value) nothrow set_element_attribute;
11519 
11520     ///
11521     /// Returns the inner text of the element.
11522     ///
11523     // The resulting string must be freed by calling cef_string_userfree_free().
11524     extern(System) cef_string_userfree_t function (
11525         cef_domnode_t* self) nothrow get_element_inner_text;
11526 
11527     ///
11528     /// Returns the bounds of the element in device pixels. Use
11529     /// "window.devicePixelRatio" to convert to/from CSS pixels.
11530     ///
11531     extern(System) cef_rect_t function (cef_domnode_t* self) nothrow get_element_bounds;
11532 }
11533 
11534 
11535 
11536 // CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_
11537 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
11538 //
11539 // Redistribution and use in source and binary forms, with or without
11540 // modification, are permitted provided that the following conditions are
11541 // met:
11542 //
11543 //    * Redistributions of source code must retain the above copyright
11544 // notice, this list of conditions and the following disclaimer.
11545 //    * Redistributions in binary form must reproduce the above
11546 // copyright notice, this list of conditions and the following disclaimer
11547 // in the documentation and/or other materials provided with the
11548 // distribution.
11549 //    * Neither the name of Google Inc. nor the name Chromium Embedded
11550 // Framework nor the names of its contributors may be used to endorse
11551 // or promote products derived from this software without specific prior
11552 // written permission.
11553 //
11554 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11555 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11556 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11557 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11558 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11559 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11560 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11561 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11562 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11563 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11564 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11565 //
11566 // ---------------------------------------------------------------------------
11567 //
11568 // This file was generated by the CEF translator tool and should not edited
11569 // by hand. See the translator.README.txt file in the tools directory for
11570 // more information.
11571 //
11572 // $hash=7ecfb07a95315ff81937e9f68d419122fc88f1b7$
11573 //
11574 
11575 extern (C):
11576 
11577 ///
11578 /// Callback structure used to asynchronously continue a download.
11579 ///
11580 struct cef_before_download_callback_t
11581 {
11582     ///
11583     /// Base structure.
11584     ///
11585 
11586     ///
11587     /// Call to continue the download. Set |download_path| to the full file path
11588     /// for the download including the file name or leave blank to use the
11589     /// suggested name and the default temp directory. Set |show_dialog| to true
11590     /// (1) if you do wish to show the default "Save As" dialog.
11591     ///
11592 
11593     ///
11594     /// Callback structure used to asynchronously cancel a download.
11595     ///
11596 
11597     cef_base_ref_counted_t base;
11598     extern(System) void function (
11599         cef_before_download_callback_t* self,
11600         const(cef_string_t)* download_path,
11601         int show_dialog) nothrow cont;
11602 }
11603 
11604 
11605 
11606 struct cef_download_item_callback_t
11607 {
11608     ///
11609     /// Base structure.
11610     ///
11611     cef_base_ref_counted_t base;
11612 
11613     ///
11614     /// Call to cancel the download.
11615     ///
11616     extern(System) void function (cef_download_item_callback_t* self) nothrow cancel;
11617 
11618     ///
11619     /// Call to pause the download.
11620     ///
11621     extern(System) void function (cef_download_item_callback_t* self) nothrow pause;
11622 
11623     ///
11624     /// Call to resume the download.
11625     ///
11626     extern(System) void function (cef_download_item_callback_t* self) nothrow resume;
11627 }
11628 
11629 
11630 
11631 ///
11632 /// Structure used to handle file downloads. The functions of this structure
11633 /// will called on the browser process UI thread.
11634 ///
11635 struct cef_download_handler_t
11636 {
11637     ///
11638     /// Base structure.
11639     ///
11640     cef_base_ref_counted_t base;
11641 
11642     ///
11643     /// Called before a download begins in response to a user-initiated action
11644     /// (e.g. alt + link click or link click that returns a `Content-Disposition:
11645     /// attachment` response from the server). |url| is the target download URL
11646     /// and |request_function| is the target function (GET, POST, etc) nothrow. Return
11647     /// true (1) to proceed with the download or false (0) to cancel the download.
11648     ///
11649     extern(System) int function (
11650         cef_download_handler_t* self,
11651         cef_browser_t* browser,
11652         const(cef_string_t)* url,
11653         const(cef_string_t)* request_method) nothrow can_download;
11654 
11655     ///
11656     /// Called before a download begins. |suggested_name| is the suggested name
11657     /// for the download file. Return true (1) and execute |callback| either
11658     /// asynchronously or in this function to continue or cancel the download.
11659     /// Return false (0) to proceed with default handling (cancel with Alloy
11660     /// style, download shelf with Chrome style). Do not keep a reference to
11661     /// |download_item| outside of this function.
11662     ///
11663     extern(System) int function (
11664         cef_download_handler_t* self,
11665         cef_browser_t* browser,
11666         cef_download_item_t* download_item,
11667         const(cef_string_t)* suggested_name,
11668         cef_before_download_callback_t* callback) nothrow on_before_download;
11669 
11670     ///
11671     /// Called when a download's status or progress information has been updated.
11672     /// This may be called multiple times before and after on_before_download().
11673     /// Execute |callback| either asynchronously or in this function to cancel the
11674     /// download if desired. Do not keep a reference to |download_item| outside of
11675     /// this function.
11676     ///
11677     extern(System) void function (
11678         cef_download_handler_t* self,
11679         cef_browser_t* browser,
11680         cef_download_item_t* download_item,
11681         cef_download_item_callback_t* callback) nothrow on_download_updated;
11682 }
11683 
11684 
11685 
11686 // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_
11687 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
11688 //
11689 // Redistribution and use in source and binary forms, with or without
11690 // modification, are permitted provided that the following conditions are
11691 // met:
11692 //
11693 //    * Redistributions of source code must retain the above copyright
11694 // notice, this list of conditions and the following disclaimer.
11695 //    * Redistributions in binary form must reproduce the above
11696 // copyright notice, this list of conditions and the following disclaimer
11697 // in the documentation and/or other materials provided with the
11698 // distribution.
11699 //    * Neither the name of Google Inc. nor the name Chromium Embedded
11700 // Framework nor the names of its contributors may be used to endorse
11701 // or promote products derived from this software without specific prior
11702 // written permission.
11703 //
11704 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11705 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11706 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11707 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11708 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11709 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11710 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11711 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11712 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11713 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11714 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11715 //
11716 // ---------------------------------------------------------------------------
11717 //
11718 // This file was generated by the CEF translator tool and should not edited
11719 // by hand. See the translator.README.txt file in the tools directory for
11720 // more information.
11721 //
11722 // $hash=9af8ade3addfd112db41792c4e80682a8143e8c4$
11723 //
11724 
11725 extern (C):
11726 
11727 ///
11728 /// Structure used to represent a download item.
11729 ///
11730 struct cef_download_item_t
11731 {
11732     ///
11733     /// Base structure.
11734     ///
11735 
11736     ///
11737     /// Returns true (1) if this object is valid. Do not call any other functions
11738     /// if this function returns false (0).
11739     ///
11740 
11741     ///
11742     /// Returns true (1) if the download is in progress.
11743     ///
11744 
11745     ///
11746     /// Returns true (1) if the download is complete.
11747     ///
11748 
11749     ///
11750     /// Returns true (1) if the download has been canceled.
11751     ///
11752 
11753     ///
11754     /// Returns true (1) if the download has been interrupted.
11755     ///
11756 
11757     cef_base_ref_counted_t base;
11758     extern(System) int function (cef_download_item_t* self) nothrow is_valid;
11759     extern(System) int function (cef_download_item_t* self) nothrow is_in_progress;
11760     extern(System) int function (cef_download_item_t* self) nothrow is_complete;
11761     extern(System) int function (cef_download_item_t* self) nothrow is_canceled;
11762     extern(System) int function (cef_download_item_t* self) nothrow is_interrupted;
11763 
11764     ///
11765     /// Returns the most recent interrupt reason.
11766     ///
11767     extern(System) cef_download_interrupt_reason_t function (
11768         cef_download_item_t* self) nothrow get_interrupt_reason;
11769 
11770     ///
11771     /// Returns a simple speed estimate in bytes/s.
11772     ///
11773     extern(System) long function (cef_download_item_t* self) nothrow get_current_speed;
11774 
11775     ///
11776     /// Returns the rough percent complete or -1 if the receive total size is
11777     /// unknown.
11778     ///
11779     extern(System) int function (cef_download_item_t* self) nothrow get_percent_complete;
11780 
11781     ///
11782     /// Returns the total number of bytes.
11783     ///
11784     extern(System) long function (cef_download_item_t* self) nothrow get_total_bytes;
11785 
11786     ///
11787     /// Returns the number of received bytes.
11788     ///
11789     extern(System) long function (cef_download_item_t* self) nothrow get_received_bytes;
11790 
11791     ///
11792     /// Returns the time that the download started.
11793     ///
11794     extern(System) cef_basetime_t function (cef_download_item_t* self) nothrow get_start_time;
11795 
11796     ///
11797     /// Returns the time that the download ended.
11798     ///
11799     extern(System) cef_basetime_t function (cef_download_item_t* self) nothrow get_end_time;
11800 
11801     ///
11802     /// Returns the full path to the downloaded or downloading file.
11803     ///
11804     // The resulting string must be freed by calling cef_string_userfree_free().
11805     extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_full_path;
11806 
11807     ///
11808     /// Returns the unique identifier for this download.
11809     ///
11810     extern(System) uint function (cef_download_item_t* self) nothrow get_id;
11811 
11812     ///
11813     /// Returns the URL.
11814     ///
11815     // The resulting string must be freed by calling cef_string_userfree_free().
11816     extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_url;
11817 
11818     ///
11819     /// Returns the original URL before any redirections.
11820     ///
11821     // The resulting string must be freed by calling cef_string_userfree_free().
11822     extern(System) cef_string_userfree_t function (
11823         cef_download_item_t* self) nothrow get_original_url;
11824 
11825     ///
11826     /// Returns the suggested file name.
11827     ///
11828     // The resulting string must be freed by calling cef_string_userfree_free().
11829     extern(System) cef_string_userfree_t function (
11830         cef_download_item_t* self) nothrow get_suggested_file_name;
11831 
11832     ///
11833     /// Returns the content disposition.
11834     ///
11835     // The resulting string must be freed by calling cef_string_userfree_free().
11836     extern(System) cef_string_userfree_t function (
11837         cef_download_item_t* self) nothrow get_content_disposition;
11838 
11839     ///
11840     /// Returns the mime type.
11841     ///
11842     // The resulting string must be freed by calling cef_string_userfree_free().
11843     extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_mime_type;
11844 }
11845 
11846 
11847 
11848 // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_
11849 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
11850 //
11851 // Redistribution and use in source and binary forms, with or without
11852 // modification, are permitted provided that the following conditions are
11853 // met:
11854 //
11855 //    * Redistributions of source code must retain the above copyright
11856 // notice, this list of conditions and the following disclaimer.
11857 //    * Redistributions in binary form must reproduce the above
11858 // copyright notice, this list of conditions and the following disclaimer
11859 // in the documentation and/or other materials provided with the
11860 // distribution.
11861 //    * Neither the name of Google Inc. nor the name Chromium Embedded
11862 // Framework nor the names of its contributors may be used to endorse
11863 // or promote products derived from this software without specific prior
11864 // written permission.
11865 //
11866 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11867 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11868 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11869 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11870 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11871 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11872 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11873 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11874 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11875 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11876 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11877 //
11878 // ---------------------------------------------------------------------------
11879 //
11880 // This file was generated by the CEF translator tool and should not edited
11881 // by hand. See the translator.README.txt file in the tools directory for
11882 // more information.
11883 //
11884 // $hash=a096775255ddc4d7616095e48e7370bd87bf4bb5$
11885 //
11886 
11887 extern (C):
11888 
11889 ///
11890 /// Structure used to represent drag data. The functions of this structure may
11891 /// be called on any thread.
11892 ///
11893 struct cef_drag_data_t
11894 {
11895     ///
11896     /// Base structure.
11897     ///
11898 
11899     ///
11900     /// Returns a copy of the current object.
11901     ///
11902 
11903     ///
11904     /// Returns true (1) if this object is read-only.
11905     ///
11906 
11907     ///
11908     /// Returns true (1) if the drag data is a link.
11909     ///
11910 
11911     ///
11912     /// Returns true (1) if the drag data is a text or html fragment.
11913     ///
11914 
11915     ///
11916     /// Returns true (1) if the drag data is a file.
11917     ///
11918 
11919     cef_base_ref_counted_t base;
11920     extern(System) cef_drag_data_t* function (cef_drag_data_t* self) nothrow clone;
11921     extern(System) int function (cef_drag_data_t* self) nothrow is_read_only;
11922     extern(System) int function (cef_drag_data_t* self) nothrow is_link;
11923     extern(System) int function (cef_drag_data_t* self) nothrow is_fragment;
11924     extern(System) int function (cef_drag_data_t* self) nothrow is_file;
11925 
11926     ///
11927     /// Return the link URL that is being dragged.
11928     ///
11929     // The resulting string must be freed by calling cef_string_userfree_free().
11930     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_url;
11931 
11932     ///
11933     /// Return the title associated with the link being dragged.
11934     ///
11935     // The resulting string must be freed by calling cef_string_userfree_free().
11936     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_title;
11937 
11938     ///
11939     /// Return the metadata, if any, associated with the link being dragged.
11940     ///
11941     // The resulting string must be freed by calling cef_string_userfree_free().
11942     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_metadata;
11943 
11944     ///
11945     /// Return the plain text fragment that is being dragged.
11946     ///
11947     // The resulting string must be freed by calling cef_string_userfree_free().
11948     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_fragment_text;
11949 
11950     ///
11951     /// Return the text/html fragment that is being dragged.
11952     ///
11953     // The resulting string must be freed by calling cef_string_userfree_free().
11954     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_fragment_html;
11955 
11956     ///
11957     /// Return the base URL that the fragment came from. This value is used for
11958     /// resolving relative URLs and may be NULL.
11959     ///
11960     // The resulting string must be freed by calling cef_string_userfree_free().
11961     extern(System) cef_string_userfree_t function (
11962         cef_drag_data_t* self) nothrow get_fragment_base_url;
11963 
11964     ///
11965     /// Return the name of the file being dragged out of the browser window.
11966     ///
11967     // The resulting string must be freed by calling cef_string_userfree_free().
11968     extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_file_name;
11969 
11970     ///
11971     /// Write the contents of the file being dragged out of the web view into
11972     /// |writer|. Returns the number of bytes sent to |writer|. If |writer| is
11973     /// NULL this function will return the size of the file contents in bytes.
11974     /// Call get_file_name() to get a suggested name for the file.
11975     ///
11976     extern(System) size_t function (
11977         cef_drag_data_t* self,
11978         cef_stream_writer_t* writer) nothrow get_file_contents;
11979 
11980     ///
11981     /// Retrieve the list of file names that are being dragged into the browser
11982     /// window.
11983     ///
11984     extern(System) int function (
11985         cef_drag_data_t* self,
11986         cef_string_list_t names) nothrow get_file_names;
11987 
11988     ///
11989     /// Retrieve the list of file paths that are being dragged into the browser
11990     /// window.
11991     ///
11992     extern(System) int function (
11993         cef_drag_data_t* self,
11994         cef_string_list_t paths) nothrow get_file_paths;
11995 
11996     ///
11997     /// Set the link URL that is being dragged.
11998     ///
11999     extern(System) void function (
12000         cef_drag_data_t* self,
12001         const(cef_string_t)* url) nothrow set_link_url;
12002 
12003     ///
12004     /// Set the title associated with the link being dragged.
12005     ///
12006     extern(System) void function (
12007         cef_drag_data_t* self,
12008         const(cef_string_t)* title) nothrow set_link_title;
12009 
12010     ///
12011     /// Set the metadata associated with the link being dragged.
12012     ///
12013     extern(System) void function (
12014         cef_drag_data_t* self,
12015         const(cef_string_t)* data) nothrow set_link_metadata;
12016 
12017     ///
12018     /// Set the plain text fragment that is being dragged.
12019     ///
12020     extern(System) void function (
12021         cef_drag_data_t* self,
12022         const(cef_string_t)* text) nothrow set_fragment_text;
12023 
12024     ///
12025     /// Set the text/html fragment that is being dragged.
12026     ///
12027     extern(System) void function (
12028         cef_drag_data_t* self,
12029         const(cef_string_t)* html) nothrow set_fragment_html;
12030 
12031     ///
12032     /// Set the base URL that the fragment came from.
12033     ///
12034     extern(System) void function (
12035         cef_drag_data_t* self,
12036         const(cef_string_t)* base_url) nothrow set_fragment_base_url;
12037 
12038     ///
12039     /// Reset the file contents. You should do this before calling
12040     /// cef_browser_host_t::DragTargetDragEnter as the web view does not allow us
12041     /// to drag in this kind of data.
12042     ///
12043     extern(System) void function (cef_drag_data_t* self) nothrow reset_file_contents;
12044 
12045     ///
12046     /// Add a file that is being dragged into the webview.
12047     ///
12048     extern(System) void function (
12049         cef_drag_data_t* self,
12050         const(cef_string_t)* path,
12051         const(cef_string_t)* display_name) nothrow add_file;
12052 
12053     ///
12054     /// Clear list of filenames.
12055     ///
12056     extern(System) void function (cef_drag_data_t* self) nothrow clear_filenames;
12057 
12058     ///
12059     /// Get the image representation of drag data. May return NULL if no image
12060     /// representation is available.
12061     ///
12062     extern(System) cef_image_t* function (cef_drag_data_t* self) nothrow get_image;
12063 
12064     ///
12065     /// Get the image hotspot (drag start location relative to image dimensions).
12066     ///
12067     extern(System) cef_point_t function (cef_drag_data_t* self) nothrow get_image_hotspot;
12068 
12069     ///
12070     /// Returns true (1) if an image representation of drag data is available.
12071     ///
12072     extern(System) int function (cef_drag_data_t* self) nothrow has_image;
12073 }
12074 
12075 
12076 
12077 ///
12078 /// Create a new cef_drag_data_t object.
12079 ///
12080 cef_drag_data_t* cef_drag_data_create ();
12081 
12082 // CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
12083 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
12084 //
12085 // Redistribution and use in source and binary forms, with or without
12086 // modification, are permitted provided that the following conditions are
12087 // met:
12088 //
12089 //    * Redistributions of source code must retain the above copyright
12090 // notice, this list of conditions and the following disclaimer.
12091 //    * Redistributions in binary form must reproduce the above
12092 // copyright notice, this list of conditions and the following disclaimer
12093 // in the documentation and/or other materials provided with the
12094 // distribution.
12095 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12096 // Framework nor the names of its contributors may be used to endorse
12097 // or promote products derived from this software without specific prior
12098 // written permission.
12099 //
12100 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12101 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12102 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12103 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12104 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12105 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12106 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12107 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12108 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12109 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12110 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12111 //
12112 // ---------------------------------------------------------------------------
12113 //
12114 // This file was generated by the CEF translator tool and should not edited
12115 // by hand. See the translator.README.txt file in the tools directory for
12116 // more information.
12117 //
12118 // $hash=0723a2a59d46e465ac94f198351dc871f0b35b96$
12119 //
12120 
12121 extern (C):
12122 
12123 ///
12124 /// Implement this structure to handle events related to dragging. The functions
12125 /// of this structure will be called on the UI thread.
12126 ///
12127 struct cef_drag_handler_t
12128 {
12129     ///
12130     /// Base structure.
12131     ///
12132 
12133     ///
12134     /// Called when an external drag event enters the browser window. |dragData|
12135     /// contains the drag event data and |mask| represents the type of drag
12136     /// operation. Return false (0) for default drag handling behavior or true (1)
12137     /// to cancel the drag event.
12138     ///
12139 
12140     cef_base_ref_counted_t base;
12141     extern(System) int function (
12142         cef_drag_handler_t* self,
12143         cef_browser_t* browser,
12144         cef_drag_data_t* dragData,
12145         cef_drag_operations_mask_t mask) nothrow on_drag_enter;
12146     ///
12147     /// Called whenever draggable regions for the browser window change. These can
12148     /// be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If
12149     /// draggable regions are never defined in a document this function will also
12150     /// never be called. If the last draggable region is removed from a document
12151     /// this function will be called with an NULL vector.
12152     ///
12153     extern(System) void function (
12154         cef_drag_handler_t* self,
12155         cef_browser_t* browser,
12156         cef_frame_t* frame,
12157         size_t regionsCount,
12158         const(cef_draggable_region_t)* regions) nothrow on_draggable_regions_changed;
12159 }
12160 
12161 
12162 
12163 // CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
12164 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
12165 //
12166 // Redistribution and use in source and binary forms, with or without
12167 // modification, are permitted provided that the following conditions are
12168 // met:
12169 //
12170 //    * Redistributions of source code must retain the above copyright
12171 // notice, this list of conditions and the following disclaimer.
12172 //    * Redistributions in binary form must reproduce the above
12173 // copyright notice, this list of conditions and the following disclaimer
12174 // in the documentation and/or other materials provided with the
12175 // distribution.
12176 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12177 // Framework nor the names of its contributors may be used to endorse
12178 // or promote products derived from this software without specific prior
12179 // written permission.
12180 //
12181 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12182 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12183 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12184 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12185 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12186 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12187 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12188 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12189 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12190 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12191 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12192 //
12193 // ---------------------------------------------------------------------------
12194 //
12195 // This file was generated by the CEF translator tool and should not edited
12196 // by hand. See the translator.README.txt file in the tools directory for
12197 // more information.
12198 //
12199 // $hash=634054ad25154c30fb4ec630fe7fb79b0cf1f9b3$
12200 //
12201 
12202 extern (C):
12203 
12204 
12205 
12206 
12207 ///
12208 /// Object representing an extension. Methods may be called on any thread unless
12209 /// otherwise indicated.
12210 ///
12211 /// WARNING: This API is deprecated and will be removed in ~M127.
12212 ///
12213 struct cef_extension_t
12214 {
12215     ///
12216     /// Base structure.
12217     ///
12218 
12219     ///
12220     /// Returns the unique extension identifier. This is calculated based on the
12221     /// extension public key, if available, or on the extension path. See
12222     /// https://developer.chrome.com/extensions/manifest/key for details.
12223     ///
12224     // The resulting string must be freed by calling cef_string_userfree_free().
12225 
12226     ///
12227     /// Returns the absolute path to the extension directory on disk. This value
12228     /// will be prefixed with PK_DIR_RESOURCES if a relative path was passed to
12229 
12230     cef_base_ref_counted_t base;
12231     extern(System) cef_string_userfree_t function (cef_extension_t* self) nothrow get_identifier; /// cef_request_context_t::LoadExtension.
12232     ///
12233     // The resulting string must be freed by calling cef_string_userfree_free().
12234     extern(System) cef_string_userfree_t function (cef_extension_t* self) nothrow get_path;
12235 
12236     ///
12237     /// Returns the extension manifest contents as a cef_dictionary_value_t
12238     /// object. See https://developer.chrome.com/extensions/manifest for details.
12239     ///
12240     extern(System) cef_dictionary_value_t* function (cef_extension_t* self) nothrow get_manifest;
12241 
12242     ///
12243     /// Returns true (1) if this object is the same extension as |that| object.
12244     /// Extensions are considered the same if identifier, path and loader context
12245     /// match.
12246     ///
12247     extern(System) int function (cef_extension_t* self, cef_extension_t* that) nothrow is_same;
12248 
12249     ///
12250     /// Returns the handler for this extension. Will return NULL for internal
12251     /// extensions or if no handler was passed to
12252     /// cef_request_context_t::LoadExtension.
12253     ///
12254     extern(System) cef_extension_handler_t* function (cef_extension_t* self) nothrow get_handler;
12255 
12256     ///
12257     /// Returns the request context that loaded this extension. Will return NULL
12258     /// for internal extensions or if the extension has been unloaded. See the
12259     /// cef_request_context_t::LoadExtension documentation for more information
12260     /// about loader contexts. Must be called on the browser process UI thread.
12261     ///
12262     extern(System) cef_request_context_t* function (
12263         cef_extension_t* self) nothrow get_loader_context;
12264 
12265     ///
12266     /// Returns true (1) if this extension is currently loaded. Must be called on
12267     /// the browser process UI thread.
12268     ///
12269     extern(System) int function (cef_extension_t* self) nothrow is_loaded;
12270 
12271     ///
12272     /// Unload this extension if it is not an internal extension and is currently
12273     /// loaded. Will result in a call to
12274     /// cef_extension_handler_t::OnExtensionUnloaded on success.
12275     ///
12276     extern(System) void function (cef_extension_t* self) nothrow unload;
12277 }
12278 
12279 
12280 
12281 // CEF_INCLUDE_CAPI_CEF_EXTENSION_CAPI_H_
12282 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
12283 //
12284 // Redistribution and use in source and binary forms, with or without
12285 // modification, are permitted provided that the following conditions are
12286 // met:
12287 //
12288 //    * Redistributions of source code must retain the above copyright
12289 // notice, this list of conditions and the following disclaimer.
12290 //    * Redistributions in binary form must reproduce the above
12291 // copyright notice, this list of conditions and the following disclaimer
12292 // in the documentation and/or other materials provided with the
12293 // distribution.
12294 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12295 // Framework nor the names of its contributors may be used to endorse
12296 // or promote products derived from this software without specific prior
12297 // written permission.
12298 //
12299 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12300 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12301 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12302 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12303 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12304 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12305 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12306 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12307 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12308 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12309 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12310 //
12311 // ---------------------------------------------------------------------------
12312 //
12313 // This file was generated by the CEF translator tool and should not edited
12314 // by hand. See the translator.README.txt file in the tools directory for
12315 // more information.
12316 //
12317 // $hash=ebac34c9b85de780ce7524211c5dd61a80d4576c$
12318 //
12319 
12320 extern (C):
12321 
12322 
12323 
12324 ///
12325 /// Callback structure used for asynchronous continuation of
12326 /// cef_extension_handler_t::GetExtensionResource.
12327 ///
12328 struct cef_get_extension_resource_callback_t
12329 {
12330     ///
12331     /// Base structure.
12332     ///
12333 
12334     ///
12335     /// Continue the request. Read the resource contents from |stream|.
12336     ///
12337 
12338     ///
12339     /// Cancel the request.
12340     ///
12341 
12342     ///
12343     /// Implement this structure to handle events related to browser extensions. The
12344     /// functions of this structure will be called on the UI thread. See
12345 
12346     cef_base_ref_counted_t base;
12347     extern(System) void function (
12348         cef_get_extension_resource_callback_t* self,
12349         cef_stream_reader_t* stream) nothrow cont;
12350     extern(System) void function (cef_get_extension_resource_callback_t* self) nothrow cancel;
12351 }
12352 
12353 
12354 /// cef_request_context_t::LoadExtension for information about extension
12355 /// loading.
12356 ///
12357 /// WARNING: This API is deprecated and will be removed in ~M127.
12358 ///
12359 struct cef_extension_handler_t
12360 {
12361     ///
12362     /// Base structure.
12363     ///
12364     cef_base_ref_counted_t base;
12365 
12366     ///
12367     /// Called if the cef_request_context_t::LoadExtension request fails. |result|
12368     /// will be the error code.
12369     ///
12370     extern(System) void function (
12371         cef_extension_handler_t* self,
12372         cef_errorcode_t result) nothrow on_extension_load_failed;
12373 
12374     ///
12375     /// Called if the cef_request_context_t::LoadExtension request succeeds.
12376     /// |extension| is the loaded extension.
12377     ///
12378     extern(System) void function (
12379         cef_extension_handler_t* self,
12380         cef_extension_t* extension) nothrow on_extension_loaded;
12381 
12382     ///
12383     /// Called after the cef_extension_t::Unload request has completed.
12384     ///
12385     extern(System) void function (
12386         cef_extension_handler_t* self,
12387         cef_extension_t* extension) nothrow on_extension_unloaded;
12388 
12389     ///
12390     /// Called when an extension needs a browser to host a background script
12391     /// specified via the "background" manifest key. The browser will have no
12392     /// visible window and cannot be displayed. |extension| is the extension that
12393     /// is loading the background script. |url| is an internally generated
12394     /// reference to an HTML page that will be used to load the background script
12395     /// via a "<script>" src attribute. To allow creation of the browser
12396     /// optionally modify |client| and |settings| and return false (0). To cancel
12397     /// creation of the browser (and consequently cancel load of the background
12398     /// script) return true (1). Successful creation will be indicated by a call
12399     /// to cef_life_span_handler_t::OnAfterCreated, and
12400     /// cef_browser_host_t::IsBackgroundHost will return true (1) for the
12401     /// resulting browser. See https://developer.chrome.com/extensions/event_pages
12402     /// for more information about extension background script usage.
12403     ///
12404     extern(System) int function (
12405         cef_extension_handler_t* self,
12406         cef_extension_t* extension,
12407         const(cef_string_t)* url,
12408         cef_client_t** client,
12409         cef_browser_settings_t* settings) nothrow on_before_background_browser;
12410 
12411     ///
12412     /// Called when an extension API (e.g. chrome.tabs.create) requests creation
12413     /// of a new browser. |extension| and |browser| are the source of the API
12414     /// call. |active_browser| may optionally be specified via the windowId
12415     /// property or returned via the get_active_browser() callback and provides
12416     /// the default |client| and |settings| values for the new browser. |index| is
12417     /// the position value optionally specified via the index property. |url| is
12418     /// the URL that will be loaded in the browser. |active| is true (1) if the
12419     /// new browser should be active when opened.  To allow creation of the
12420     /// browser optionally modify |windowInfo|, |client| and |settings| and return
12421     /// false (0). To cancel creation of the browser return true (1). Successful
12422     /// creation will be indicated by a call to
12423     /// cef_life_span_handler_t::OnAfterCreated. Any modifications to |windowInfo|
12424     /// will be ignored if |active_browser| is wrapped in a cef_browser_view_t.
12425     ///
12426     extern(System) int function (
12427         cef_extension_handler_t* self,
12428         cef_extension_t* extension,
12429         cef_browser_t* browser,
12430         cef_browser_t* active_browser,
12431         int index,
12432         const(cef_string_t)* url,
12433         int active,
12434         cef_window_info_t* windowInfo,
12435         cef_client_t** client,
12436         cef_browser_settings_t* settings) nothrow on_before_browser;
12437 
12438     ///
12439     /// Called when no tabId is specified to an extension API call that accepts a
12440     /// tabId parameter (e.g. chrome.tabs.*). |extension| and |browser| are the
12441     /// source of the API call. Return the browser that will be acted on by the
12442     /// API call or return NULL to act on |browser|. The returned browser must
12443     /// share the same cef_request_context_t as |browser|. Incognito browsers
12444     /// should not be considered unless the source extension has incognito access
12445     /// enabled, in which case |include_incognito| will be true (1).
12446     ///
12447     extern(System) cef_browser_t* function (
12448         cef_extension_handler_t* self,
12449         cef_extension_t* extension,
12450         cef_browser_t* browser,
12451         int include_incognito) nothrow get_active_browser;
12452 
12453     ///
12454     /// Called when the tabId associated with |target_browser| is specified to an
12455     /// extension API call that accepts a tabId parameter (e.g. chrome.tabs.*).
12456     /// |extension| and |browser| are the source of the API call. Return true (1)
12457     /// to allow access of false (0) to deny access. Access to incognito browsers
12458     /// should not be allowed unless the source extension has incognito access
12459     /// enabled, in which case |include_incognito| will be true (1).
12460     ///
12461     extern(System) int function (
12462         cef_extension_handler_t* self,
12463         cef_extension_t* extension,
12464         cef_browser_t* browser,
12465         int include_incognito,
12466         cef_browser_t* target_browser) nothrow can_access_browser;
12467 
12468     ///
12469     /// Called to retrieve an extension resource that would normally be loaded
12470     /// from disk (e.g. if a file parameter is specified to
12471     /// chrome.tabs.executeScript). |extension| and |browser| are the source of
12472     /// the resource request. |file| is the requested relative file path. To
12473     /// handle the resource request return true (1) and execute |callback| either
12474     /// synchronously or asynchronously. For the default behavior which reads the
12475     /// resource from the extension directory on disk return false (0).
12476     /// Localization substitutions will not be applied to resources handled via
12477     /// this function.
12478     ///
12479     extern(System) int function (
12480         cef_extension_handler_t* self,
12481         cef_extension_t* extension,
12482         cef_browser_t* browser,
12483         const(cef_string_t)* file,
12484         cef_get_extension_resource_callback_t* callback) nothrow get_extension_resource;
12485 }
12486 
12487 
12488 
12489 // CEF_INCLUDE_CAPI_CEF_EXTENSION_HANDLER_CAPI_H_
12490 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
12491 //
12492 // Redistribution and use in source and binary forms, with or without
12493 // modification, are permitted provided that the following conditions are
12494 // met:
12495 //
12496 //    * Redistributions of source code must retain the above copyright
12497 // notice, this list of conditions and the following disclaimer.
12498 //    * Redistributions in binary form must reproduce the above
12499 // copyright notice, this list of conditions and the following disclaimer
12500 // in the documentation and/or other materials provided with the
12501 // distribution.
12502 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12503 // Framework nor the names of its contributors may be used to endorse
12504 // or promote products derived from this software without specific prior
12505 // written permission.
12506 //
12507 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12508 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12509 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12510 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12511 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12512 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12513 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12514 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12515 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12516 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12517 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12518 //
12519 // ---------------------------------------------------------------------------
12520 //
12521 // This file was generated by the CEF translator tool and should not edited
12522 // by hand. See the translator.README.txt file in the tools directory for
12523 // more information.
12524 //
12525 // $hash=e10581d1f6aeb104646ae106aaa5fb36016643dd$
12526 //
12527 
12528 extern (C):
12529 
12530 ///
12531 /// Creates a directory and all parent directories if they don't already exist.
12532 /// Returns true (1) on successful creation or if the directory already exists.
12533 /// The directory is only readable by the current user. Calling this function on
12534 /// the browser process UI or IO threads is not allowed.
12535 ///
12536 int cef_create_directory (const(cef_string_t)* full_path);
12537 
12538 ///
12539 /// Get the temporary directory provided by the system.
12540 ///
12541 /// WARNING: In general, you should use the temp directory variants below
12542 /// instead of this function. Those variants will ensure that the proper
12543 /// permissions are set so that other users on the system can't edit them while
12544 /// they're open (which could lead to security issues).
12545 ///
12546 int cef_get_temp_directory (cef_string_t* temp_dir);
12547 
12548 ///
12549 /// Creates a new directory. On Windows if |prefix| is provided the new
12550 /// directory name is in the format of "prefixyyyy". Returns true (1) on success
12551 /// and sets |new_temp_path| to the full path of the directory that was created.
12552 /// The directory is only readable by the current user. Calling this function on
12553 /// the browser process UI or IO threads is not allowed.
12554 ///
12555 int cef_create_new_temp_directory (
12556     const(cef_string_t)* prefix,
12557     cef_string_t* new_temp_path);
12558 
12559 ///
12560 /// Creates a directory within another directory. Extra characters will be
12561 /// appended to |prefix| to ensure that the new directory does not have the same
12562 /// name as an existing directory. Returns true (1) on success and sets
12563 /// |new_dir| to the full path of the directory that was created. The directory
12564 /// is only readable by the current user. Calling this function on the browser
12565 /// process UI or IO threads is not allowed.
12566 ///
12567 int cef_create_temp_directory_in_directory (
12568     const(cef_string_t)* base_dir,
12569     const(cef_string_t)* prefix,
12570     cef_string_t* new_dir);
12571 
12572 ///
12573 /// Returns true (1) if the given path exists and is a directory. Calling this
12574 /// function on the browser process UI or IO threads is not allowed.
12575 ///
12576 int cef_directory_exists (const(cef_string_t)* path);
12577 
12578 ///
12579 /// Deletes the given path whether it's a file or a directory. If |path| is a
12580 /// directory all contents will be deleted.  If |recursive| is true (1) any sub-
12581 /// directories and their contents will also be deleted (equivalent to executing
12582 /// "rm -rf", so use with caution). On POSIX environments if |path| is a
12583 /// symbolic link then only the symlink will be deleted. Returns true (1) on
12584 /// successful deletion or if |path| does not exist. Calling this function on
12585 /// the browser process UI or IO threads is not allowed.
12586 ///
12587 int cef_delete_file (const(cef_string_t)* path, int recursive);
12588 
12589 ///
12590 /// Writes the contents of |src_dir| into a zip archive at |dest_file|. If
12591 /// |include_hidden_files| is true (1) files starting with "." will be included.
12592 /// Returns true (1) on success.  Calling this function on the browser process
12593 /// UI or IO threads is not allowed.
12594 ///
12595 int cef_zip_directory (
12596     const(cef_string_t)* src_dir,
12597     const(cef_string_t)* dest_file,
12598     int include_hidden_files);
12599 
12600 ///
12601 /// Loads the existing "Certificate Revocation Lists" file that is managed by
12602 /// Google Chrome. This file can generally be found in Chrome's User Data
12603 /// directory (e.g. "C:\Users\[User]\AppData\Local\Google\Chrome\User Data\" on
12604 /// Windows) and is updated periodically by Chrome's component updater service.
12605 /// Must be called in the browser process after the context has been
12606 /// initialized. See https://dev.chromium.org/Home/chromium-security/crlsets for
12607 /// background.
12608 ///
12609 void cef_load_crlsets_file (const(cef_string_t)* path);
12610 
12611 // CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
12612 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
12613 //
12614 // Redistribution and use in source and binary forms, with or without
12615 // modification, are permitted provided that the following conditions are
12616 // met:
12617 //
12618 //    * Redistributions of source code must retain the above copyright
12619 // notice, this list of conditions and the following disclaimer.
12620 //    * Redistributions in binary form must reproduce the above
12621 // copyright notice, this list of conditions and the following disclaimer
12622 // in the documentation and/or other materials provided with the
12623 // distribution.
12624 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12625 // Framework nor the names of its contributors may be used to endorse
12626 // or promote products derived from this software without specific prior
12627 // written permission.
12628 //
12629 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12630 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12631 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12632 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12633 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12634 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12635 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12636 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12637 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12638 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12639 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12640 //
12641 // ---------------------------------------------------------------------------
12642 //
12643 // This file was generated by the CEF translator tool and should not edited
12644 // by hand. See the translator.README.txt file in the tools directory for
12645 // more information.
12646 //
12647 // $hash=da0a9242b309fbd70d19949fb1c5b4ec4475ef94$
12648 //
12649 
12650 extern (C):
12651 
12652 ///
12653 /// Implement this structure to handle events related to find results. The
12654 /// functions of this structure will be called on the UI thread.
12655 ///
12656 struct cef_find_handler_t
12657 {
12658     ///
12659     /// Base structure.
12660     ///
12661 
12662     ///
12663     /// Called to report find results returned by cef_browser_host_t::find().
12664     /// |identifer| is a unique incremental identifier for the currently active
12665     /// search, |count| is the number of matches currently identified,
12666     /// |selectionRect| is the location of where the match was found (in window
12667     /// coordinates), |activeMatchOrdinal| is the current position in the search
12668     /// results, and |finalUpdate| is true (1) if this is the last find
12669     /// notification.
12670     ///
12671 
12672     cef_base_ref_counted_t base;
12673     extern(System) void function (
12674         cef_find_handler_t* self,
12675         cef_browser_t* browser,
12676         int identifier,
12677         int count,
12678         const(cef_rect_t)* selectionRect,
12679         int activeMatchOrdinal,
12680         int finalUpdate) nothrow on_find_result;
12681 }
12682 
12683 
12684 
12685 // CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
12686 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
12687 //
12688 // Redistribution and use in source and binary forms, with or without
12689 // modification, are permitted provided that the following conditions are
12690 // met:
12691 //
12692 //    * Redistributions of source code must retain the above copyright
12693 // notice, this list of conditions and the following disclaimer.
12694 //    * Redistributions in binary form must reproduce the above
12695 // copyright notice, this list of conditions and the following disclaimer
12696 // in the documentation and/or other materials provided with the
12697 // distribution.
12698 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12699 // Framework nor the names of its contributors may be used to endorse
12700 // or promote products derived from this software without specific prior
12701 // written permission.
12702 //
12703 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12704 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12705 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12706 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12707 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12708 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12709 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12710 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12711 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12712 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12713 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12714 //
12715 // ---------------------------------------------------------------------------
12716 //
12717 // This file was generated by the CEF translator tool and should not edited
12718 // by hand. See the translator.README.txt file in the tools directory for
12719 // more information.
12720 //
12721 // $hash=6eefc2c650908461fb7536dd3314c77a3f89dceb$
12722 //
12723 
12724 extern (C):
12725 
12726 ///
12727 /// Implement this structure to handle events related to focus. The functions of
12728 /// this structure will be called on the UI thread.
12729 ///
12730 struct cef_focus_handler_t
12731 {
12732     ///
12733     /// Base structure.
12734     ///
12735 
12736     ///
12737     /// Called when the browser component is about to loose focus. For instance,
12738     /// if focus was on the last HTML element and the user pressed the TAB key.
12739     /// |next| will be true (1) if the browser is giving focus to the next
12740     /// component and false (0) if the browser is giving focus to the previous
12741     /// component.
12742     ///
12743 
12744     ///
12745     /// Called when the browser component is requesting focus. |source| indicates
12746 
12747     cef_base_ref_counted_t base;
12748     extern(System) void function (
12749         cef_focus_handler_t* self,
12750         cef_browser_t* browser,
12751         int next) nothrow on_take_focus;
12752     /// where the focus request is originating from. Return false (0) to allow the
12753     /// focus to be set or true (1) to cancel setting the focus.
12754     ///
12755     extern(System) int function (
12756         cef_focus_handler_t* self,
12757         cef_browser_t* browser,
12758         cef_focus_source_t source) nothrow on_set_focus;
12759 
12760     ///
12761     /// Called when the browser component has received focus.
12762     ///
12763     extern(System) void function (
12764         cef_focus_handler_t* self,
12765         cef_browser_t* browser) nothrow on_got_focus;
12766 }
12767 
12768 
12769 
12770 // CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
12771 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
12772 //
12773 // Redistribution and use in source and binary forms, with or without
12774 // modification, are permitted provided that the following conditions are
12775 // met:
12776 //
12777 //    * Redistributions of source code must retain the above copyright
12778 // notice, this list of conditions and the following disclaimer.
12779 //    * Redistributions in binary form must reproduce the above
12780 // copyright notice, this list of conditions and the following disclaimer
12781 // in the documentation and/or other materials provided with the
12782 // distribution.
12783 //    * Neither the name of Google Inc. nor the name Chromium Embedded
12784 // Framework nor the names of its contributors may be used to endorse
12785 // or promote products derived from this software without specific prior
12786 // written permission.
12787 //
12788 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
12789 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
12790 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
12791 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
12792 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12793 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12794 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12795 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12796 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12797 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
12798 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12799 //
12800 // ---------------------------------------------------------------------------
12801 //
12802 // This file was generated by the CEF translator tool and should not edited
12803 // by hand. See the translator.README.txt file in the tools directory for
12804 // more information.
12805 //
12806 // $hash=8f347a95168778ec0e686cdef93be3bc517e2f68$
12807 //
12808 
12809 extern (C):
12810 
12811 
12812 
12813 
12814 
12815 
12816 ///
12817 /// Structure used to represent a frame in the browser window. When used in the
12818 /// browser process the functions of this structure may be called on any thread
12819 /// unless otherwise indicated in the comments. When used in the render process
12820 /// the functions of this structure may only be called on the main thread.
12821 ///
12822 struct cef_frame_t
12823 {
12824     ///
12825     /// Base structure.
12826     ///
12827 
12828     ///
12829     /// True if this object is currently attached to a valid frame.
12830     ///
12831 
12832     ///
12833     /// Execute undo in this frame.
12834 
12835     cef_base_ref_counted_t base;
12836     extern(System) int function (cef_frame_t* self) nothrow is_valid;
12837     ///
12838     extern(System) void function (cef_frame_t* self) nothrow undo;
12839 
12840     ///
12841     /// Execute redo in this frame.
12842     ///
12843     extern(System) void function (cef_frame_t* self) nothrow redo;
12844 
12845     ///
12846     /// Execute cut in this frame.
12847     ///
12848     extern(System) void function (cef_frame_t* self) nothrow cut;
12849 
12850     ///
12851     /// Execute copy in this frame.
12852     ///
12853     extern(System) void function (cef_frame_t* self) nothrow copy;
12854 
12855     ///
12856     /// Execute paste in this frame.
12857     ///
12858     extern(System) void function (cef_frame_t* self) nothrow paste;
12859 
12860     ///
12861     /// Execute delete in this frame.
12862     ///
12863     extern(System) void function (cef_frame_t* self) nothrow del;
12864 
12865     ///
12866     /// Execute select all in this frame.
12867     ///
12868     extern(System) void function (cef_frame_t* self) nothrow select_all;
12869 
12870     ///
12871     /// Save this frame's HTML source to a temporary file and open it in the
12872     /// default text viewing application. This function can only be called from
12873     /// the browser process.
12874     ///
12875     extern(System) void function (cef_frame_t* self) nothrow view_source;
12876 
12877     ///
12878     /// Retrieve this frame's HTML source as a string sent to the specified
12879     /// visitor.
12880     ///
12881     extern(System) void function (
12882         cef_frame_t* self,
12883         cef_string_visitor_t* visitor) nothrow get_source;
12884 
12885     ///
12886     /// Retrieve this frame's display text as a string sent to the specified
12887     /// visitor.
12888     ///
12889     extern(System) void function (
12890         cef_frame_t* self,
12891         cef_string_visitor_t* visitor) nothrow get_text;
12892 
12893     ///
12894     /// Load the request represented by the |request| object.
12895     ///
12896     /// WARNING: This function will fail with "bad IPC message" reason
12897     /// INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request
12898     /// origin using some other mechanism (LoadURL, link click, etc).
12899     ///
12900     extern(System) void function (cef_frame_t* self, cef_request_t* request) nothrow load_request;
12901 
12902     ///
12903     /// Load the specified |url|.
12904     ///
12905     extern(System) void function (cef_frame_t* self, const(cef_string_t)* url) nothrow load_url;
12906 
12907     ///
12908     /// Execute a string of JavaScript code in this frame. The |script_url|
12909     /// parameter is the URL where the script in question can be found, if any.
12910     /// The renderer may request this URL to show the developer the source of the
12911     /// error.  The |start_line| parameter is the base line number to use for
12912     /// error reporting.
12913     ///
12914     extern(System) void function (
12915         cef_frame_t* self,
12916         const(cef_string_t)* code,
12917         const(cef_string_t)* script_url,
12918         int start_line) nothrow execute_java_script;
12919 
12920     ///
12921     /// Returns true (1) if this is the main (top-level) frame.
12922     ///
12923     extern(System) int function (cef_frame_t* self) nothrow is_main;
12924 
12925     ///
12926     /// Returns true (1) if this is the focused frame.
12927     ///
12928     extern(System) int function (cef_frame_t* self) nothrow is_focused;
12929 
12930     ///
12931     /// Returns the name for this frame. If the frame has an assigned name (for
12932     /// example, set via the iframe "name" attribute) then that value will be
12933     /// returned. Otherwise a unique name will be constructed based on the frame
12934     /// parent hierarchy. The main (top-level) frame will always have an NULL name
12935     /// value.
12936     ///
12937     // The resulting string must be freed by calling cef_string_userfree_free().
12938     extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_name;
12939 
12940     ///
12941     /// Returns the globally unique identifier for this frame or NULL if the
12942     /// underlying frame does not yet exist.
12943     ///
12944     // The resulting string must be freed by calling cef_string_userfree_free().
12945     extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_identifier;
12946 
12947     ///
12948     /// Returns the parent of this frame or NULL if this is the main (top-level)
12949     /// frame.
12950     ///
12951     extern(System) cef_frame_t* function (cef_frame_t* self) nothrow get_parent;
12952 
12953     ///
12954     /// Returns the URL currently loaded in this frame.
12955     ///
12956     // The resulting string must be freed by calling cef_string_userfree_free().
12957     extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_url;
12958 
12959     ///
12960     /// Returns the browser that this frame belongs to.
12961     ///
12962     extern(System) cef_browser_t* function (cef_frame_t* self) nothrow get_browser;
12963 
12964     ///
12965     /// Get the V8 context associated with the frame. This function can only be
12966     /// called from the render process.
12967     ///
12968     extern(System) cef_v8context_t* function (cef_frame_t* self) nothrow get_v8context;
12969 
12970     ///
12971     /// Visit the DOM document. This function can only be called from the render
12972     /// process.
12973     ///
12974     extern(System) void function (cef_frame_t* self, cef_domvisitor_t* visitor) nothrow visit_dom;
12975 
12976     ///
12977     /// Create a new URL request that will be treated as originating from this
12978     /// frame and the associated browser. Use cef_urlrequest_t::Create instead if
12979     /// you do not want the request to have this association, in which case it may
12980     /// be handled differently (see documentation on that function). A request
12981     /// created with this function may only originate from the browser process,
12982     /// and will behave as follows:
12983     ///   - It may be intercepted by the client via CefResourceRequestHandler or
12984     ///     CefSchemeHandlerFactory.
12985     ///   - POST data may only contain a single element of type PDE_TYPE_FILE or
12986     ///     PDE_TYPE_BYTES.
12987     ///
12988     /// The |request| object will be marked as read-only after calling this
12989     /// function.
12990     ///
12991     extern(System) cef_urlrequest_t* function (
12992         cef_frame_t* self,
12993         cef_request_t* request,
12994         cef_urlrequest_client_t* client) nothrow create_urlrequest;
12995 
12996     ///
12997     /// Send a message to the specified |target_process|. Ownership of the message
12998     /// contents will be transferred and the |message| reference will be
12999     /// invalidated. Message delivery is not guaranteed in all cases (for example,
13000     /// if the browser is closing, navigating, or if the target process crashes).
13001     /// Send an ACK message back from the target process if confirmation is
13002     /// required.
13003     ///
13004     extern(System) void function (
13005         cef_frame_t* self,
13006         cef_process_id_t target_process,
13007         cef_process_message_t* message) nothrow send_process_message;
13008 }
13009 
13010 
13011 
13012 // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
13013 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
13014 //
13015 // Redistribution and use in source and binary forms, with or without
13016 // modification, are permitted provided that the following conditions are
13017 // met:
13018 //
13019 //    * Redistributions of source code must retain the above copyright
13020 // notice, this list of conditions and the following disclaimer.
13021 //    * Redistributions in binary form must reproduce the above
13022 // copyright notice, this list of conditions and the following disclaimer
13023 // in the documentation and/or other materials provided with the
13024 // distribution.
13025 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13026 // Framework nor the names of its contributors may be used to endorse
13027 // or promote products derived from this software without specific prior
13028 // written permission.
13029 //
13030 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13031 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13032 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13033 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13034 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13035 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13036 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13037 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13038 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13039 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13040 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13041 //
13042 // ---------------------------------------------------------------------------
13043 //
13044 // This file was generated by the CEF translator tool and should not edited
13045 // by hand. See the translator.README.txt file in the tools directory for
13046 // more information.
13047 //
13048 // $hash=fc6fbee765ce2b649f5293c8c4b076d36014e4aa$
13049 //
13050 
13051 extern (C):
13052 
13053 ///
13054 /// Implement this structure to handle events related to cef_frame_t life span.
13055 /// The order of callbacks is:
13056 ///
13057 /// (1) During initial cef_browser_host_t creation and navigation of the main
13058 /// frame:
13059 /// - cef_frame_handler_t::OnFrameCreated => The initial main frame object has
13060 ///   been created. Any commands will be queued until the frame is attached.
13061 /// - cef_frame_handler_t::OnMainFrameChanged => The initial main frame object
13062 ///   has been assigned to the browser.
13063 /// - cef_life_span_handler_t::OnAfterCreated => The browser is now valid and
13064 ///   can be used.
13065 /// - cef_frame_handler_t::OnFrameAttached => The initial main frame object is
13066 ///   now connected to its peer in the renderer process. Commands can be routed.
13067 ///
13068 /// (2) During further cef_browser_host_t navigation/loading of the main frame
13069 ///     and/or sub-frames:
13070 /// - cef_frame_handler_t::OnFrameCreated => A new main frame or sub-frame
13071 ///   object has been created. Any commands will be queued until the frame is
13072 ///   attached.
13073 /// - cef_frame_handler_t::OnFrameAttached => A new main frame or sub-frame
13074 ///   object is now connected to its peer in the renderer process. Commands can
13075 ///   be routed.
13076 /// - cef_frame_handler_t::OnFrameDetached => An existing main frame or sub-
13077 ///   frame object has lost its connection to the renderer process. If multiple
13078 ///   objects are detached at the same time then notifications will be sent for
13079 ///   any sub-frame objects before the main frame object. Commands can no longer
13080 ///   be routed and will be discarded.
13081 /// - cef_frame_handler_t::OnMainFrameChanged => A new main frame object has
13082 ///   been assigned to the browser. This will only occur with cross-origin
13083 ///   navigation or re-navigation after renderer process termination (due to
13084 ///   crashes, etc).
13085 ///
13086 /// (3) During final cef_browser_host_t destruction of the main frame:
13087 /// - cef_frame_handler_t::OnFrameDetached => Any sub-frame objects have lost
13088 ///   their connection to the renderer process. Commands can no longer be routed
13089 ///   and will be discarded.
13090 /// - cef_life_span_handler_t::OnBeforeClose => The browser has been destroyed.
13091 /// - cef_frame_handler_t::OnFrameDetached => The main frame object have lost
13092 ///   its connection to the renderer process. Notifications will be sent for any
13093 ///   sub-frame objects before the main frame object. Commands can no longer be
13094 ///   routed and will be discarded.
13095 /// - cef_frame_handler_t::OnMainFrameChanged => The final main frame object has
13096 ///   been removed from the browser.
13097 ///
13098 /// Cross-origin navigation and/or loading receives special handling.
13099 ///
13100 /// When the main frame navigates to a different origin the OnMainFrameChanged
13101 /// callback (2) will be executed with the old and new main frame objects.
13102 ///
13103 /// When a new sub-frame is loaded in, or an existing sub-frame is navigated to,
13104 /// a different origin from the parent frame, a temporary sub-frame object will
13105 /// first be created in the parent's renderer process. That temporary sub-frame
13106 /// will then be discarded after the real cross-origin sub-frame is created in
13107 /// the new/target renderer process. The client will receive cross-origin
13108 /// navigation callbacks (2) for the transition from the temporary sub-frame to
13109 /// the real sub-frame. The temporary sub-frame will not receive or execute
13110 /// commands during this transitional period (any sent commands will be
13111 /// discarded).
13112 ///
13113 /// When a new popup browser is created in a different origin from the parent
13114 /// browser, a temporary main frame object for the popup will first be created
13115 /// in the parent's renderer process. That temporary main frame will then be
13116 /// discarded after the real cross-origin main frame is created in the
13117 /// new/target renderer process. The client will receive creation and initial
13118 /// navigation callbacks (1) for the temporary main frame, followed by cross-
13119 /// origin navigation callbacks (2) for the transition from the temporary main
13120 /// frame to the real main frame. The temporary main frame may receive and
13121 /// execute commands during this transitional period (any sent commands may be
13122 /// executed, but the behavior is potentially undesirable since they execute in
13123 /// the parent browser's renderer process and not the new/target renderer
13124 /// process).
13125 ///
13126 /// Callbacks will not be executed for placeholders that may be created during
13127 /// pre-commit navigation for sub-frames that do not yet exist in the renderer
13128 /// process. Placeholders will have cef_frame_t::get_identifier() == -4.
13129 ///
13130 /// The functions of this structure will be called on the UI thread unless
13131 /// otherwise indicated.
13132 ///
13133 struct cef_frame_handler_t
13134 {
13135     ///
13136     /// Base structure.
13137     ///
13138 
13139     cef_base_ref_counted_t base;
13140 
13141     ///
13142     /// Called when a new frame is created. This will be the first notification
13143     /// that references |frame|. Any commands that require transport to the
13144     /// associated renderer process (LoadRequest, SendProcessMessage, GetSource,
13145     /// etc.) will be queued until OnFrameAttached is called for |frame|.
13146     ///
13147     extern(System) void function (
13148         cef_frame_handler_t* self,
13149         cef_browser_t* browser,
13150         cef_frame_t* frame) nothrow on_frame_created;
13151 
13152     ///
13153     /// Called when a frame can begin routing commands to/from the associated
13154     /// renderer process. |reattached| will be true (1) if the frame was re-
13155     /// attached after exiting the BackForwardCache. Any commands that were queued
13156     /// have now been dispatched.
13157     ///
13158     extern(System) void function (
13159         cef_frame_handler_t* self,
13160         cef_browser_t* browser,
13161         cef_frame_t* frame,
13162         int reattached) nothrow on_frame_attached;
13163 
13164     ///
13165     /// Called when a frame loses its connection to the renderer process and will
13166     /// be destroyed. Any pending or future commands will be discarded and
13167     /// cef_frame_t::is_valid() will now return false (0) for |frame|. If called
13168     /// after cef_life_span_handler_t::on_before_close() during browser
13169     /// destruction then cef_browser_t::is_valid() will return false (0) for
13170     /// |browser|.
13171     ///
13172     extern(System) void function (
13173         cef_frame_handler_t* self,
13174         cef_browser_t* browser,
13175         cef_frame_t* frame) nothrow on_frame_detached;
13176 
13177     ///
13178     /// Called when the main frame changes due to (a) initial browser creation,
13179     /// (b) final browser destruction, (c) cross-origin navigation or (d) re-
13180     /// navigation after renderer process termination (due to crashes, etc).
13181     /// |old_frame| will be NULL and |new_frame| will be non-NULL when a main
13182     /// frame is assigned to |browser| for the first time. |old_frame| will be
13183     /// non-NULL and |new_frame| will be NULL and  when a main frame is removed
13184     /// from |browser| for the last time. Both |old_frame| and |new_frame| will be
13185     /// non-NULL for cross-origin navigations or re-navigation after renderer
13186     /// process termination. This function will be called after on_frame_created()
13187     /// for |new_frame| and/or after on_frame_detached() for |old_frame|. If
13188     /// called after cef_life_span_handler_t::on_before_close() during browser
13189     /// destruction then cef_browser_t::is_valid() will return false (0) for
13190     /// |browser|.
13191     ///
13192     extern(System) void function (
13193         cef_frame_handler_t* self,
13194         cef_browser_t* browser,
13195         cef_frame_t* old_frame,
13196         cef_frame_t* new_frame) nothrow on_main_frame_changed;
13197 }
13198 
13199 
13200 
13201 // CEF_INCLUDE_CAPI_CEF_FRAME_HANDLER_CAPI_H_
13202 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
13203 //
13204 // Redistribution and use in source and binary forms, with or without
13205 // modification, are permitted provided that the following conditions are
13206 // met:
13207 //
13208 //    * Redistributions of source code must retain the above copyright
13209 // notice, this list of conditions and the following disclaimer.
13210 //    * Redistributions in binary form must reproduce the above
13211 // copyright notice, this list of conditions and the following disclaimer
13212 // in the documentation and/or other materials provided with the
13213 // distribution.
13214 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13215 // Framework nor the names of its contributors may be used to endorse
13216 // or promote products derived from this software without specific prior
13217 // written permission.
13218 //
13219 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13220 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13221 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13222 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13223 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13224 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13225 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13226 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13227 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13228 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13229 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13230 //
13231 // ---------------------------------------------------------------------------
13232 //
13233 // This file was generated by the CEF translator tool and should not edited
13234 // by hand. See the translator.README.txt file in the tools directory for
13235 // more information.
13236 //
13237 // $hash=990e80ab5ae04298e6b70cbc0a67115825563251$
13238 //
13239 
13240 extern (C):
13241 
13242 ///
13243 /// Returns true (1) if the application text direction is right-to-left.
13244 ///
13245 int cef_is_rtl ();
13246 
13247 // CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_
13248 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
13249 //
13250 // Redistribution and use in source and binary forms, with or without
13251 // modification, are permitted provided that the following conditions are
13252 // met:
13253 //
13254 //    * Redistributions of source code must retain the above copyright
13255 // notice, this list of conditions and the following disclaimer.
13256 //    * Redistributions in binary form must reproduce the above
13257 // copyright notice, this list of conditions and the following disclaimer
13258 // in the documentation and/or other materials provided with the
13259 // distribution.
13260 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13261 // Framework nor the names of its contributors may be used to endorse
13262 // or promote products derived from this software without specific prior
13263 // written permission.
13264 //
13265 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13266 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13267 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13268 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13269 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13270 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13271 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13272 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13273 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13274 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13275 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13276 //
13277 // ---------------------------------------------------------------------------
13278 //
13279 // This file was generated by the CEF translator tool and should not edited
13280 // by hand. See the translator.README.txt file in the tools directory for
13281 // more information.
13282 //
13283 // $hash=7512ccf755017d5b1866b753890b498e8163006d$
13284 //
13285 
13286 extern (C):
13287 
13288 ///
13289 /// Container for a single image represented at different scale factors. All
13290 /// image representations should be the same size in density independent pixel
13291 /// (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels
13292 /// then the image at scale factor 2.0 should be 200x200 pixels -- both images
13293 /// will display with a DIP size of 100x100 units. The functions of this
13294 /// structure can be called on any browser process thread.
13295 ///
13296 struct cef_image_t
13297 {
13298     ///
13299     /// Base structure.
13300     ///
13301 
13302     ///
13303     /// Returns true (1) if this Image is NULL.
13304     ///
13305 
13306     ///
13307     /// Returns true (1) if this Image and |that| Image share the same underlying
13308     /// storage. Will also return true (1) if both images are NULL.
13309     ///
13310 
13311     cef_base_ref_counted_t base;
13312     extern(System) int function (cef_image_t* self) nothrow is_empty;
13313     extern(System) int function (cef_image_t* self, cef_image_t* that) nothrow is_same;
13314     ///
13315     /// Add a bitmap image representation for |scale_factor|. Only 32-bit
13316     /// RGBA/BGRA formats are supported. |pixel_width| and |pixel_height| are the
13317     /// bitmap representation size in pixel coordinates. |pixel_data| is the array
13318     /// of pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in
13319     /// size. |color_type| and |alpha_type| values specify the pixel format.
13320     ///
13321     extern(System) int function (
13322         cef_image_t* self,
13323         float scale_factor,
13324         int pixel_width,
13325         int pixel_height,
13326         cef_color_type_t color_type,
13327         cef_alpha_type_t alpha_type,
13328         const(void)* pixel_data,
13329         size_t pixel_data_size) nothrow add_bitmap;
13330 
13331     ///
13332     /// Add a PNG image representation for |scale_factor|. |png_data| is the image
13333     /// data of size |png_data_size|. Any alpha transparency in the PNG data will
13334     /// be maintained.
13335     ///
13336     extern(System) int function (
13337         cef_image_t* self,
13338         float scale_factor,
13339         const(void)* png_data,
13340         size_t png_data_size) nothrow add_png;
13341 
13342     ///
13343     /// Create a JPEG image representation for |scale_factor|. |jpeg_data| is the
13344     /// image data of size |jpeg_data_size|. The JPEG format does not support
13345     /// transparency so the alpha byte will be set to 0xFF for all pixels.
13346     ///
13347     extern(System) int function (
13348         cef_image_t* self,
13349         float scale_factor,
13350         const(void)* jpeg_data,
13351         size_t jpeg_data_size) nothrow add_jpeg;
13352 
13353     ///
13354     /// Returns the image width in density independent pixel (DIP) units.
13355     ///
13356     extern(System) size_t function (cef_image_t* self) nothrow get_width;
13357 
13358     ///
13359     /// Returns the image height in density independent pixel (DIP) units.
13360     ///
13361     extern(System) size_t function (cef_image_t* self) nothrow get_height;
13362 
13363     ///
13364     /// Returns true (1) if this image contains a representation for
13365     /// |scale_factor|.
13366     ///
13367     extern(System) int function (cef_image_t* self, float scale_factor) nothrow has_representation;
13368 
13369     ///
13370     /// Removes the representation for |scale_factor|. Returns true (1) on
13371     /// success.
13372     ///
13373     extern(System) int function (
13374         cef_image_t* self,
13375         float scale_factor) nothrow remove_representation;
13376 
13377     ///
13378     /// Returns information for the representation that most closely matches
13379     /// |scale_factor|. |actual_scale_factor| is the actual scale factor for the
13380     /// representation. |pixel_width| and |pixel_height| are the representation
13381     /// size in pixel coordinates. Returns true (1) on success.
13382     ///
13383     extern(System) int function (
13384         cef_image_t* self,
13385         float scale_factor,
13386         float* actual_scale_factor,
13387         int* pixel_width,
13388         int* pixel_height) nothrow get_representation_info;
13389 
13390     ///
13391     /// Returns the bitmap representation that most closely matches
13392     /// |scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |color_type|
13393     /// and |alpha_type| values specify the desired output pixel format.
13394     /// |pixel_width| and |pixel_height| are the output representation size in
13395     /// pixel coordinates. Returns a cef_binary_value_t containing the pixel data
13396     /// on success or NULL on failure.
13397     ///
13398     extern(System) cef_binary_value_t* function (
13399         cef_image_t* self,
13400         float scale_factor,
13401         cef_color_type_t color_type,
13402         cef_alpha_type_t alpha_type,
13403         int* pixel_width,
13404         int* pixel_height) nothrow get_as_bitmap;
13405 
13406     ///
13407     /// Returns the PNG representation that most closely matches |scale_factor|.
13408     /// If |with_transparency| is true (1) any alpha transparency in the image
13409     /// will be represented in the resulting PNG data. |pixel_width| and
13410     /// |pixel_height| are the output representation size in pixel coordinates.
13411     /// Returns a cef_binary_value_t containing the PNG image data on success or
13412     /// NULL on failure.
13413     ///
13414     extern(System) cef_binary_value_t* function (
13415         cef_image_t* self,
13416         float scale_factor,
13417         int with_transparency,
13418         int* pixel_width,
13419         int* pixel_height) nothrow get_as_png;
13420 
13421     ///
13422     /// Returns the JPEG representation that most closely matches |scale_factor|.
13423     /// |quality| determines the compression level with 0 == lowest and 100 ==
13424     /// highest. The JPEG format does not support alpha transparency and the alpha
13425     /// channel, if any, will be discarded. |pixel_width| and |pixel_height| are
13426     /// the output representation size in pixel coordinates. Returns a
13427     /// cef_binary_value_t containing the JPEG image data on success or NULL on
13428     /// failure.
13429     ///
13430     extern(System) cef_binary_value_t* function (
13431         cef_image_t* self,
13432         float scale_factor,
13433         int quality,
13434         int* pixel_width,
13435         int* pixel_height) nothrow get_as_jpeg;
13436 }
13437 
13438 
13439 
13440 ///
13441 /// Create a new cef_image_t. It will initially be NULL. Use the Add*()
13442 /// functions to add representations at different scale factors.
13443 ///
13444 cef_image_t* cef_image_create ();
13445 
13446 // CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_
13447 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
13448 //
13449 // Redistribution and use in source and binary forms, with or without
13450 // modification, are permitted provided that the following conditions are
13451 // met:
13452 //
13453 //    * Redistributions of source code must retain the above copyright
13454 // notice, this list of conditions and the following disclaimer.
13455 //    * Redistributions in binary form must reproduce the above
13456 // copyright notice, this list of conditions and the following disclaimer
13457 // in the documentation and/or other materials provided with the
13458 // distribution.
13459 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13460 // Framework nor the names of its contributors may be used to endorse
13461 // or promote products derived from this software without specific prior
13462 // written permission.
13463 //
13464 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13465 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13466 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13467 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13468 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13469 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13470 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13471 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13472 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13473 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13474 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13475 //
13476 // ---------------------------------------------------------------------------
13477 //
13478 // This file was generated by the CEF translator tool and should not edited
13479 // by hand. See the translator.README.txt file in the tools directory for
13480 // more information.
13481 //
13482 // $hash=c6810367ba3a17824247dcb17f87040cd021c295$
13483 //
13484 
13485 extern (C):
13486 
13487 ///
13488 /// Callback structure used for asynchronous continuation of JavaScript dialog
13489 /// requests.
13490 ///
13491 struct cef_jsdialog_callback_t
13492 {
13493     ///
13494     /// Base structure.
13495     ///
13496 
13497     ///
13498     /// Continue the JS dialog request. Set |success| to true (1) if the OK button
13499     /// was pressed. The |user_input| value should be specified for prompt
13500     /// dialogs.
13501     ///
13502 
13503     ///
13504     /// Implement this structure to handle events related to JavaScript dialogs. The
13505     /// functions of this structure will be called on the UI thread.
13506     ///
13507 
13508     ///
13509     /// Base structure.
13510     ///
13511 
13512     ///
13513     /// Called to run a JavaScript dialog. If |origin_url| is non-NULL it can be
13514 
13515     cef_base_ref_counted_t base;
13516     extern(System) void function (
13517         cef_jsdialog_callback_t* self,
13518         int success,
13519         const(cef_string_t)* user_input) nothrow cont;
13520 }
13521 
13522 
13523 
13524 struct cef_jsdialog_handler_t
13525 {
13526     cef_base_ref_counted_t base;
13527     /// passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure
13528     /// and user-friendly display string. The |default_prompt_text| value will be
13529     /// specified for prompt dialogs only. Set |suppress_message| to true (1) and
13530     /// return false (0) to suppress the message (suppressing messages is
13531     /// preferable to immediately executing the callback as this is used to detect
13532     /// presumably malicious behavior like spamming alert messages in
13533     /// onbeforeunload). Set |suppress_message| to false (0) and return false (0)
13534     /// to use the default implementation (the default implementation will show
13535     /// one modal dialog at a time and suppress any additional dialog requests
13536     /// until the displayed dialog is dismissed). Return true (1) if the
13537     /// application will use a custom dialog or if the callback has been executed
13538     /// immediately. Custom dialogs may be either modal or modeless. If a custom
13539     /// dialog is used the application must execute |callback| once the custom
13540     /// dialog is dismissed.
13541     ///
13542     extern(System) int function (
13543         cef_jsdialog_handler_t* self,
13544         cef_browser_t* browser,
13545         const(cef_string_t)* origin_url,
13546         cef_jsdialog_type_t dialog_type,
13547         const(cef_string_t)* message_text,
13548         const(cef_string_t)* default_prompt_text,
13549         cef_jsdialog_callback_t* callback,
13550         int* suppress_message) nothrow on_jsdialog;
13551 
13552     ///
13553     /// Called to run a dialog asking the user if they want to leave a page.
13554     /// Return false (0) to use the default dialog implementation. Return true (1)
13555     /// if the application will use a custom dialog or if the callback has been
13556     /// executed immediately. Custom dialogs may be either modal or modeless. If a
13557     /// custom dialog is used the application must execute |callback| once the
13558     /// custom dialog is dismissed.
13559     ///
13560     extern(System) int function (
13561         cef_jsdialog_handler_t* self,
13562         cef_browser_t* browser,
13563         const(cef_string_t)* message_text,
13564         int is_reload,
13565         cef_jsdialog_callback_t* callback) nothrow on_before_unload_dialog;
13566 
13567     ///
13568     /// Called to cancel any pending dialogs and reset any saved dialog state.
13569     /// Will be called due to events like page navigation irregardless of whether
13570     /// any dialogs are currently pending.
13571     ///
13572     extern(System) void function (
13573         cef_jsdialog_handler_t* self,
13574         cef_browser_t* browser) nothrow on_reset_dialog_state;
13575 
13576     ///
13577     /// Called when the dialog is closed.
13578     ///
13579     extern(System) void function (
13580         cef_jsdialog_handler_t* self,
13581         cef_browser_t* browser) nothrow on_dialog_closed;
13582 }
13583 
13584 
13585 
13586 // CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_
13587 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
13588 //
13589 // Redistribution and use in source and binary forms, with or without
13590 // modification, are permitted provided that the following conditions are
13591 // met:
13592 //
13593 //    * Redistributions of source code must retain the above copyright
13594 // notice, this list of conditions and the following disclaimer.
13595 //    * Redistributions in binary form must reproduce the above
13596 // copyright notice, this list of conditions and the following disclaimer
13597 // in the documentation and/or other materials provided with the
13598 // distribution.
13599 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13600 // Framework nor the names of its contributors may be used to endorse
13601 // or promote products derived from this software without specific prior
13602 // written permission.
13603 //
13604 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13605 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13606 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13607 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13608 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13609 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13610 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13611 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13612 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13613 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13614 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13615 //
13616 // ---------------------------------------------------------------------------
13617 //
13618 // This file was generated by the CEF translator tool and should not edited
13619 // by hand. See the translator.README.txt file in the tools directory for
13620 // more information.
13621 //
13622 // $hash=0bfe161c51cc6378b2e8e2e2b2c017b750b46864$
13623 //
13624 
13625 extern (C):
13626 
13627 ///
13628 /// Implement this structure to handle events related to keyboard input. The
13629 /// functions of this structure will be called on the UI thread.
13630 ///
13631 struct cef_keyboard_handler_t
13632 {
13633     ///
13634     /// Base structure.
13635     ///
13636 
13637     ///
13638     /// Called before a keyboard event is sent to the renderer. |event| contains
13639     /// information about the keyboard event. |os_event| is the operating system
13640     /// event message, if any. Return true (1) if the event was handled or false
13641     /// (0) otherwise. If the event will be handled in on_key_event() as a
13642     /// keyboard shortcut set |is_keyboard_shortcut| to true (1) and return false
13643     /// (0).
13644     ///
13645 
13646     cef_base_ref_counted_t base;
13647     extern(System) int function (
13648         cef_keyboard_handler_t* self,
13649         cef_browser_t* browser,
13650         const(cef_key_event_t)* event,
13651         XEvent* os_event,
13652         int* is_keyboard_shortcut) nothrow on_pre_key_event;
13653     ///
13654     /// Called after the renderer and JavaScript in the page has had a chance to
13655     /// handle the event. |event| contains information about the keyboard event.
13656     /// |os_event| is the operating system event message, if any. Return true (1)
13657     /// if the keyboard event was handled or false (0) otherwise.
13658     ///
13659     extern(System) int function (
13660         cef_keyboard_handler_t* self,
13661         cef_browser_t* browser,
13662         const(cef_key_event_t)* event,
13663         XEvent* os_event) nothrow on_key_event;
13664 }
13665 
13666 
13667 
13668 // CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_
13669 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
13670 //
13671 // Redistribution and use in source and binary forms, with or without
13672 // modification, are permitted provided that the following conditions are
13673 // met:
13674 //
13675 //    * Redistributions of source code must retain the above copyright
13676 // notice, this list of conditions and the following disclaimer.
13677 //    * Redistributions in binary form must reproduce the above
13678 // copyright notice, this list of conditions and the following disclaimer
13679 // in the documentation and/or other materials provided with the
13680 // distribution.
13681 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13682 // Framework nor the names of its contributors may be used to endorse
13683 // or promote products derived from this software without specific prior
13684 // written permission.
13685 //
13686 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13687 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13688 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13689 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13690 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13691 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13692 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13693 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13694 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13695 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13696 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13697 //
13698 // ---------------------------------------------------------------------------
13699 //
13700 // This file was generated by the CEF translator tool and should not edited
13701 // by hand. See the translator.README.txt file in the tools directory for
13702 // more information.
13703 //
13704 // $hash=54edf9e9c2a12acdc4cab55079a4a5cb8e2a1e43$
13705 //
13706 
13707 extern (C):
13708 
13709 
13710 
13711 ///
13712 /// Implement this structure to handle events related to browser life span. The
13713 /// functions of this structure will be called on the UI thread unless otherwise
13714 /// indicated.
13715 ///
13716 struct cef_life_span_handler_t
13717 {
13718     ///
13719     /// Base structure.
13720     ///
13721 
13722     ///
13723     /// Called on the UI thread before a new popup browser is created. The
13724     /// |browser| and |frame| values represent the source of the popup request.
13725     /// The |target_url| and |target_frame_name| values indicate where the popup
13726     /// browser should navigate and may be NULL if not specified with the request.
13727     /// The |target_disposition| value indicates where the user intended to open
13728     /// the popup (e.g. current tab, new tab, etc). The |user_gesture| value will
13729     /// be true (1) if the popup was opened via explicit user gesture (e.g.
13730 
13731     cef_base_ref_counted_t base;
13732     /// clicking a link) or false (0) if the popup opened automatically (e.g. via
13733     /// the DomContentLoaded event). The |popupFeatures| structure contains
13734     /// additional information about the requested popup window. To allow creation
13735     /// of the popup browser optionally modify |windowInfo|, |client|, |settings|
13736     /// and |no_javascript_access| and return false (0). To cancel creation of the
13737     /// popup browser return true (1). The |client| and |settings| values will
13738     /// default to the source browser's values. If the |no_javascript_access|
13739     /// value is set to false (0) the new browser will not be scriptable and may
13740     /// not be hosted in the same renderer process as the source browser. Any
13741     /// modifications to |windowInfo| will be ignored if the parent browser is
13742     /// wrapped in a cef_browser_view_t. Popup browser creation will be canceled
13743     /// if the parent browser is destroyed before the popup browser creation
13744     /// completes (indicated by a call to OnAfterCreated for the popup browser).
13745     /// The |extra_info| parameter provides an opportunity to specify extra
13746     /// information specific to the created popup browser that will be passed to
13747     /// cef_render_process_handler_t::on_browser_created() in the render process.
13748     ///
13749     extern(System) int function (
13750         cef_life_span_handler_t* self,
13751         cef_browser_t* browser,
13752         cef_frame_t* frame,
13753         const(cef_string_t)* target_url,
13754         const(cef_string_t)* target_frame_name,
13755         cef_window_open_disposition_t target_disposition,
13756         int user_gesture,
13757         const(cef_popup_features_t)* popupFeatures,
13758         cef_window_info_t* windowInfo,
13759         cef_client_t** client,
13760         cef_browser_settings_t* settings,
13761         cef_dictionary_value_t** extra_info,
13762         int* no_javascript_access) nothrow on_before_popup;
13763 
13764     ///
13765     /// Called on the UI thread before a new DevTools popup browser is created.
13766     /// The |browser| value represents the source of the popup request. Optionally
13767     /// modify |windowInfo|, |client|, |settings| and |extra_info| values. The
13768     /// |client|, |settings| and |extra_info| values will default to the source
13769     /// browser's values. Any modifications to |windowInfo| will be ignored if the
13770     /// parent browser is Views-hosted (wrapped in a cef_browser_view_t).
13771     ///
13772     /// The |extra_info| parameter provides an opportunity to specify extra
13773     /// information specific to the created popup browser that will be passed to
13774     /// cef_render_process_handler_t::on_browser_created() in the render process.
13775     /// The existing |extra_info| object, if any, will be read-only but may be
13776     /// replaced with a new object.
13777     ///
13778     /// Views-hosted source browsers will create Views-hosted DevTools popups
13779     /// unless |use_default_window| is set to to true (1). DevTools popups can be
13780     /// blocked by returning true (1) from cef_command_handler_t::OnChromeCommand
13781     /// for IDC_DEV_TOOLS. Only used with the Chrome runtime.
13782     ///
13783     extern(System) void function (
13784         cef_life_span_handler_t* self,
13785         cef_browser_t* browser,
13786         cef_window_info_t* windowInfo,
13787         cef_client_t** client,
13788         cef_browser_settings_t* settings,
13789         cef_dictionary_value_t** extra_info,
13790         int* use_default_window) nothrow on_before_dev_tools_popup;
13791 
13792     ///
13793     /// Called after a new browser is created. It is now safe to begin performing
13794     /// actions with |browser|. cef_frame_handler_t callbacks related to initial
13795     /// main frame creation will arrive before this callback. See
13796     /// cef_frame_handler_t documentation for additional usage information.
13797     ///
13798     extern(System) void function (
13799         cef_life_span_handler_t* self,
13800         cef_browser_t* browser) nothrow on_after_created;
13801 
13802     ///
13803     /// Called when a browser has received a request to close. This may result
13804     /// directly from a call to cef_browser_host_t::*close_browser() or indirectly
13805     /// if the browser is parented to a top-level window created by CEF and the
13806     /// user attempts to close that window (by clicking the 'X', for example). The
13807     /// do_close() function will be called after the JavaScript 'onunload' event
13808     /// has been fired.
13809     ///
13810     /// An application should handle top-level owner window close notifications by
13811     /// calling cef_browser_host_t::try_close_browser() or
13812     /// cef_browser_host_t::CloseBrowser(false (0)) instead of allowing the window
13813     /// to close immediately (see the examples below). This gives CEF an
13814     /// opportunity to process the 'onbeforeunload' event and optionally cancel
13815     /// the close before do_close() is called.
13816     ///
13817     /// When windowed rendering is enabled CEF will internally create a window or
13818     /// view to host the browser. In that case returning false (0) from do_close()
13819     /// will send the standard close notification to the browser's top-level owner
13820     /// window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on
13821     /// Linux or cef_window_delegate_t::can_close() callback from Views). If the
13822     /// browser's host window/view has already been destroyed (via view hierarchy
13823     /// tear-down, for example) then do_close() will not be called for that
13824     /// browser since is no longer possible to cancel the close.
13825     ///
13826     /// When windowed rendering is disabled returning false (0) from do_close()
13827     /// will cause the browser object to be destroyed immediately.
13828     ///
13829     /// If the browser's top-level owner window requires a non-standard close
13830     /// notification then send that notification from do_close() and return true
13831     /// (1).
13832     ///
13833     /// The cef_life_span_handler_t::on_before_close() function will be called
13834     /// after do_close() (if do_close() is called) and immediately before the
13835     /// browser object is destroyed. The application should only exit after
13836     /// on_before_close() has been called for all existing browsers.
13837     ///
13838     /// The below examples describe what should happen during window close when
13839     /// the browser is parented to an application-provided top-level window.
13840     ///
13841     /// Example 1: Using cef_browser_host_t::try_close_browser(). This is
13842     /// recommended for clients using standard close handling and windows created
13843     /// on the browser process UI thread. 1.  User clicks the window close button
13844     /// which sends a close notification
13845     ///     to the application's top-level window.
13846     /// 2.  Application's top-level window receives the close notification and
13847     ///     calls TryCloseBrowser() (which internally calls CloseBrowser(false)).
13848     ///     TryCloseBrowser() returns false so the client cancels the window
13849     ///     close.
13850     /// 3.  JavaScript 'onbeforeunload' handler executes and shows the close
13851     ///     confirmation dialog (which can be overridden via
13852     ///     CefJSDialogHandler::OnBeforeUnloadDialog()).
13853     /// 4.  User approves the close. 5.  JavaScript 'onunload' handler executes.
13854     /// 6.  CEF sends a close notification to the application's top-level window
13855     ///     (because DoClose() returned false by default).
13856     /// 7.  Application's top-level window receives the close notification and
13857     ///     calls TryCloseBrowser(). TryCloseBrowser() returns true so the client
13858     ///     allows the window close.
13859     /// 8.  Application's top-level window is destroyed. 9.  Application's
13860     /// on_before_close() handler is called and the browser object
13861     ///     is destroyed.
13862     /// 10. Application exits by calling cef_quit_message_loop() if no other
13863     /// browsers
13864     ///     exist.
13865     ///
13866     /// Example 2: Using cef_browser_host_t::CloseBrowser(false (0)) and
13867     /// implementing the do_close() callback. This is recommended for clients
13868     /// using non-standard close handling or windows that were not created on the
13869     /// browser process UI thread. 1.  User clicks the window close button which
13870     /// sends a close notification
13871     ///     to the application's top-level window.
13872     /// 2.  Application's top-level window receives the close notification and:
13873     ///     A. Calls CefBrowserHost::CloseBrowser(false).
13874     ///     B. Cancels the window close.
13875     /// 3.  JavaScript 'onbeforeunload' handler executes and shows the close
13876     ///     confirmation dialog (which can be overridden via
13877     ///     CefJSDialogHandler::OnBeforeUnloadDialog()).
13878     /// 4.  User approves the close. 5.  JavaScript 'onunload' handler executes.
13879     /// 6.  Application's do_close() handler is called. Application will:
13880     ///     A. Set a flag to indicate that the next close attempt will be allowed.
13881     ///     B. Return false.
13882     /// 7.  CEF sends an close notification to the application's top-level window.
13883     /// 8.  Application's top-level window receives the close notification and
13884     ///     allows the window to close based on the flag from #6B.
13885     /// 9.  Application's top-level window is destroyed. 10. Application's
13886     /// on_before_close() handler is called and the browser object
13887     ///     is destroyed.
13888     /// 11. Application exits by calling cef_quit_message_loop() if no other
13889     /// browsers
13890     ///     exist.
13891     ///
13892     extern(System) int function (
13893         cef_life_span_handler_t* self,
13894         cef_browser_t* browser) nothrow do_close;
13895 
13896     ///
13897     /// Called just before a browser is destroyed. Release all references to the
13898     /// browser object and do not attempt to execute any functions on the browser
13899     /// object (other than IsValid, GetIdentifier or IsSame) after this callback
13900     /// returns. cef_frame_handler_t callbacks related to final main frame
13901     /// destruction will arrive after this callback and cef_browser_t::IsValid
13902     /// will return false (0) at that time. Any in-progress network requests
13903     /// associated with |browser| will be aborted when the browser is destroyed,
13904     /// and cef_resource_request_handler_t callbacks related to those requests may
13905     /// still arrive on the IO thread after this callback. See cef_frame_handler_t
13906     /// and do_close() documentation for additional usage information.
13907     ///
13908     extern(System) void function (
13909         cef_life_span_handler_t* self,
13910         cef_browser_t* browser) nothrow on_before_close;
13911 }
13912 
13913 
13914 
13915 // CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_
13916 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
13917 //
13918 // Redistribution and use in source and binary forms, with or without
13919 // modification, are permitted provided that the following conditions are
13920 // met:
13921 //
13922 //    * Redistributions of source code must retain the above copyright
13923 // notice, this list of conditions and the following disclaimer.
13924 //    * Redistributions in binary form must reproduce the above
13925 // copyright notice, this list of conditions and the following disclaimer
13926 // in the documentation and/or other materials provided with the
13927 // distribution.
13928 //    * Neither the name of Google Inc. nor the name Chromium Embedded
13929 // Framework nor the names of its contributors may be used to endorse
13930 // or promote products derived from this software without specific prior
13931 // written permission.
13932 //
13933 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13934 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13935 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13936 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13937 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13938 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
13939 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13940 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13941 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13942 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13943 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13944 //
13945 // ---------------------------------------------------------------------------
13946 //
13947 // This file was generated by the CEF translator tool and should not edited
13948 // by hand. See the translator.README.txt file in the tools directory for
13949 // more information.
13950 //
13951 // $hash=eb842e65cd2e7c4a8a6baa2813b57ac0d3977261$
13952 //
13953 
13954 extern (C):
13955 
13956 ///
13957 /// Implement this structure to handle events related to browser load status.
13958 /// The functions of this structure will be called on the browser process UI
13959 /// thread or render process main thread (TID_RENDERER).
13960 ///
13961 struct cef_load_handler_t
13962 {
13963     ///
13964     /// Base structure.
13965     ///
13966 
13967     ///
13968     /// Called when the loading state has changed. This callback will be executed
13969     /// twice -- once when loading is initiated either programmatically or by user
13970     /// action, and once when loading is terminated due to completion,
13971     /// cancellation of failure. It will be called before any calls to OnLoadStart
13972     /// and after all calls to OnLoadError and/or OnLoadEnd.
13973     ///
13974 
13975     cef_base_ref_counted_t base;
13976     extern(System) void function (
13977         cef_load_handler_t* self,
13978         cef_browser_t* browser,
13979         int isLoading,
13980         int canGoBack,
13981         int canGoForward) nothrow on_loading_state_change;
13982     ///
13983     /// Called after a navigation has been committed and before the browser begins
13984     /// loading contents in the frame. The |frame| value will never be NULL --
13985     /// call the is_main() function to check if this frame is the main frame.
13986     /// |transition_type| provides information about the source of the navigation
13987     /// and an accurate value is only available in the browser process. Multiple
13988     /// frames may be loading at the same time. Sub-frames may start or continue
13989     /// loading after the main frame load has ended. This function will not be
13990     /// called for same page navigations (fragments, history state, etc.) or for
13991     /// navigations that fail or are canceled before commit. For notification of
13992     /// overall browser load status use OnLoadingStateChange instead.
13993     ///
13994     extern(System) void function (
13995         cef_load_handler_t* self,
13996         cef_browser_t* browser,
13997         cef_frame_t* frame,
13998         cef_transition_type_t transition_type) nothrow on_load_start;
13999 
14000     ///
14001     /// Called when the browser is done loading a frame. The |frame| value will
14002     /// never be NULL -- call the is_main() function to check if this frame is the
14003     /// main frame. Multiple frames may be loading at the same time. Sub-frames
14004     /// may start or continue loading after the main frame load has ended. This
14005     /// function will not be called for same page navigations (fragments, history
14006     /// state, etc.) or for navigations that fail or are canceled before commit.
14007     /// For notification of overall browser load status use OnLoadingStateChange
14008     /// instead.
14009     ///
14010     extern(System) void function (
14011         cef_load_handler_t* self,
14012         cef_browser_t* browser,
14013         cef_frame_t* frame,
14014         int httpStatusCode) nothrow on_load_end;
14015 
14016     ///
14017     /// Called when a navigation fails or is canceled. This function may be called
14018     /// by itself if before commit or in combination with OnLoadStart/OnLoadEnd if
14019     /// after commit. |errorCode| is the error code number, |errorText| is the
14020     /// error text and |failedUrl| is the URL that failed to load. See
14021     /// net\base\net_error_list.h for complete descriptions of the error codes.
14022     ///
14023     extern(System) void function (
14024         cef_load_handler_t* self,
14025         cef_browser_t* browser,
14026         cef_frame_t* frame,
14027         cef_errorcode_t errorCode,
14028         const(cef_string_t)* errorText,
14029         const(cef_string_t)* failedUrl) nothrow on_load_error;
14030 }
14031 
14032 
14033 
14034 // CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_
14035 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
14036 //
14037 // Redistribution and use in source and binary forms, with or without
14038 // modification, are permitted provided that the following conditions are
14039 // met:
14040 //
14041 //    * Redistributions of source code must retain the above copyright
14042 // notice, this list of conditions and the following disclaimer.
14043 //    * Redistributions in binary form must reproduce the above
14044 // copyright notice, this list of conditions and the following disclaimer
14045 // in the documentation and/or other materials provided with the
14046 // distribution.
14047 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14048 // Framework nor the names of its contributors may be used to endorse
14049 // or promote products derived from this software without specific prior
14050 // written permission.
14051 //
14052 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14053 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14054 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
14055 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
14056 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14057 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14058 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
14059 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
14060 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14061 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14062 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14063 //
14064 // ---------------------------------------------------------------------------
14065 //
14066 // This file was generated by the CEF translator tool and should not edited
14067 // by hand. See the translator.README.txt file in the tools directory for
14068 // more information.
14069 //
14070 // $hash=8eec1100e8470cbe3ebc54d5962416d2fa4d57fb$
14071 //
14072 
14073 extern (C):
14074 
14075 ///
14076 /// Supports discovery of and communication with media devices on the local
14077 /// network via the Cast and DIAL protocols. The functions of this structure may
14078 /// be called on any browser process thread unless otherwise indicated.
14079 ///
14080 struct cef_media_router_t
14081 {
14082     ///
14083     /// Base structure.
14084     ///
14085 
14086     ///
14087     /// Add an observer for MediaRouter events. The observer will remain
14088     /// registered until the returned Registration object is destroyed.
14089     ///
14090 
14091     cef_base_ref_counted_t base;
14092     extern(System) cef_registration_t* function (
14093         cef_media_router_t* self,
14094         cef_media_observer_t* observer) nothrow add_observer; ///
14095     /// Returns a MediaSource object for the specified media source URN. Supported
14096     /// URN schemes include "cast:" and "dial:", and will be already known by the
14097     /// client application (e.g. "cast:<appId>?clientId=<clientId>").
14098     ///
14099     extern(System) cef_media_source_t* function (
14100         cef_media_router_t* self,
14101         const(cef_string_t)* urn) nothrow get_source;
14102 
14103     ///
14104     /// Trigger an asynchronous call to cef_media_observer_t::OnSinks on all
14105     /// registered observers.
14106     ///
14107     extern(System) void function (cef_media_router_t* self) nothrow notify_current_sinks;
14108 
14109     ///
14110     /// Create a new route between |source| and |sink|. Source and sink must be
14111     /// valid, compatible (as reported by cef_media_sink_t::IsCompatibleWith), and
14112     /// a route between them must not already exist. |callback| will be executed
14113     /// on success or failure. If route creation succeeds it will also trigger an
14114     /// asynchronous call to cef_media_observer_t::OnRoutes on all registered
14115     /// observers.
14116     ///
14117     extern(System) void function (
14118         cef_media_router_t* self,
14119         cef_media_source_t* source,
14120         cef_media_sink_t* sink,
14121         cef_media_route_create_callback_t* callback) nothrow create_route;
14122 
14123     ///
14124     /// Trigger an asynchronous call to cef_media_observer_t::OnRoutes on all
14125     /// registered observers.
14126     ///
14127     extern(System) void function (cef_media_router_t* self) nothrow notify_current_routes;
14128 }
14129 
14130 
14131 
14132 ///
14133 /// Returns the MediaRouter object associated with the global request context.
14134 /// If |callback| is non-NULL it will be executed asnychronously on the UI
14135 /// thread after the manager's storage has been initialized. Equivalent to
14136 /// calling cef_request_context_t::cef_request_context_get_global_context()-
14137 /// >get_media_router().
14138 ///
14139 cef_media_router_t* cef_media_router_get_global (
14140     cef_completion_callback_t* callback);
14141 
14142 ///
14143 /// Implemented by the client to observe MediaRouter events and registered via
14144 /// cef_media_router_t::AddObserver. The functions of this structure will be
14145 /// called on the browser process UI thread.
14146 ///
14147 struct cef_media_observer_t
14148 {
14149     ///
14150     /// Base structure.
14151     ///
14152     cef_base_ref_counted_t base;
14153 
14154     ///
14155     /// The list of available media sinks has changed or
14156     /// cef_media_router_t::NotifyCurrentSinks was called.
14157     ///
14158     extern(System) void function (
14159         cef_media_observer_t* self,
14160         size_t sinksCount,
14161         cef_media_sink_t** sinks) nothrow on_sinks;
14162 
14163     ///
14164     /// The list of available media routes has changed or
14165     /// cef_media_router_t::NotifyCurrentRoutes was called.
14166     ///
14167     extern(System) void function (
14168         cef_media_observer_t* self,
14169         size_t routesCount,
14170         cef_media_route_t** routes) nothrow on_routes;
14171 
14172     ///
14173     /// The connection state of |route| has changed.
14174     ///
14175     extern(System) void function (
14176         cef_media_observer_t* self,
14177         cef_media_route_t* route,
14178         cef_media_route_connection_state_t state) nothrow on_route_state_changed;
14179 
14180     ///
14181     /// A message was received over |route|. |message| is only valid for the scope
14182     /// of this callback and should be copied if necessary.
14183     ///
14184     extern(System) void function (
14185         cef_media_observer_t* self,
14186         cef_media_route_t* route,
14187         const(void)* message,
14188         size_t message_size) nothrow on_route_message_received;
14189 }
14190 
14191 
14192 
14193 ///
14194 /// Represents the route between a media source and sink. Instances of this
14195 /// object are created via cef_media_router_t::CreateRoute and retrieved via
14196 /// cef_media_observer_t::OnRoutes. Contains the status and metadata of a
14197 /// routing operation. The functions of this structure may be called on any
14198 /// browser process thread unless otherwise indicated.
14199 ///
14200 struct cef_media_route_t
14201 {
14202     ///
14203     /// Base structure.
14204     ///
14205     cef_base_ref_counted_t base;
14206 
14207     ///
14208     /// Returns the ID for this route.
14209     ///
14210     // The resulting string must be freed by calling cef_string_userfree_free().
14211     extern(System) cef_string_userfree_t function (cef_media_route_t* self) nothrow get_id;
14212 
14213     ///
14214     /// Returns the source associated with this route.
14215     ///
14216     extern(System) cef_media_source_t* function (cef_media_route_t* self) nothrow get_source;
14217 
14218     ///
14219     /// Returns the sink associated with this route.
14220     ///
14221     extern(System) cef_media_sink_t* function (cef_media_route_t* self) nothrow get_sink;
14222 
14223     ///
14224     /// Send a message over this route. |message| will be copied if necessary.
14225     ///
14226     extern(System) void function (
14227         cef_media_route_t* self,
14228         const(void)* message,
14229         size_t message_size) nothrow send_route_message;
14230 
14231     ///
14232     /// Terminate this route. Will result in an asynchronous call to
14233     /// cef_media_observer_t::OnRoutes on all registered observers.
14234     ///
14235     extern(System) void function (cef_media_route_t* self) nothrow terminate;
14236 }
14237 
14238 
14239 
14240 ///
14241 /// Callback structure for cef_media_router_t::CreateRoute. The functions of
14242 /// this structure will be called on the browser process UI thread.
14243 ///
14244 struct cef_media_route_create_callback_t
14245 {
14246     ///
14247     /// Base structure.
14248     ///
14249     cef_base_ref_counted_t base;
14250 
14251     ///
14252     /// Method that will be executed when the route creation has finished.
14253     /// |result| will be CEF_MRCR_OK if the route creation succeeded. |error| will
14254     /// be a description of the error if the route creation failed. |route| is the
14255     /// resulting route, or NULL if the route creation failed.
14256     ///
14257     extern(System) void function (
14258         cef_media_route_create_callback_t* self,
14259         cef_media_route_create_result_t result,
14260         const(cef_string_t)* error,
14261         cef_media_route_t* route) nothrow on_media_route_create_finished;
14262 }
14263 
14264 
14265 
14266 ///
14267 /// Represents a sink to which media can be routed. Instances of this object are
14268 /// retrieved via cef_media_observer_t::OnSinks. The functions of this structure
14269 /// may be called on any browser process thread unless otherwise indicated.
14270 ///
14271 struct cef_media_sink_t
14272 {
14273     ///
14274     /// Base structure.
14275     ///
14276     cef_base_ref_counted_t base;
14277 
14278     ///
14279     /// Returns the ID for this sink.
14280     ///
14281     // The resulting string must be freed by calling cef_string_userfree_free().
14282     extern(System) cef_string_userfree_t function (cef_media_sink_t* self) nothrow get_id;
14283 
14284     ///
14285     /// Returns the name of this sink.
14286     ///
14287     // The resulting string must be freed by calling cef_string_userfree_free().
14288     extern(System) cef_string_userfree_t function (cef_media_sink_t* self) nothrow get_name;
14289 
14290     ///
14291     /// Returns the icon type for this sink.
14292     ///
14293     extern(System) cef_media_sink_icon_type_t function (
14294         cef_media_sink_t* self) nothrow get_icon_type;
14295 
14296     ///
14297     /// Asynchronously retrieves device info.
14298     ///
14299     extern(System) void function (
14300         cef_media_sink_t* self,
14301         cef_media_sink_device_info_callback_t* callback) nothrow get_device_info;
14302 
14303     ///
14304     /// Returns true (1) if this sink accepts content via Cast.
14305     ///
14306     extern(System) int function (cef_media_sink_t* self) nothrow is_cast_sink;
14307 
14308     ///
14309     /// Returns true (1) if this sink accepts content via DIAL.
14310     ///
14311     extern(System) int function (cef_media_sink_t* self) nothrow is_dial_sink;
14312 
14313     ///
14314     /// Returns true (1) if this sink is compatible with |source|.
14315     ///
14316     extern(System) int function (
14317         cef_media_sink_t* self,
14318         cef_media_source_t* source) nothrow is_compatible_with;
14319 }
14320 
14321 
14322 
14323 ///
14324 /// Callback structure for cef_media_sink_t::GetDeviceInfo. The functions of
14325 /// this structure will be called on the browser process UI thread.
14326 ///
14327 struct cef_media_sink_device_info_callback_t
14328 {
14329     ///
14330     /// Base structure.
14331     ///
14332     cef_base_ref_counted_t base;
14333 
14334     ///
14335     /// Method that will be executed asyncronously once device information has
14336     /// been retrieved.
14337     ///
14338     extern(System) void function (
14339         cef_media_sink_device_info_callback_t* self,
14340         const(cef_media_sink_device_info_t)* device_info) nothrow on_media_sink_device_info;
14341 }
14342 
14343 
14344 
14345 ///
14346 /// Represents a source from which media can be routed. Instances of this object
14347 /// are retrieved via cef_media_router_t::GetSource. The functions of this
14348 /// structure may be called on any browser process thread unless otherwise
14349 /// indicated.
14350 ///
14351 struct cef_media_source_t
14352 {
14353     ///
14354     /// Base structure.
14355     ///
14356     cef_base_ref_counted_t base;
14357 
14358     ///
14359     /// Returns the ID (media source URN or URL) for this source.
14360     ///
14361     // The resulting string must be freed by calling cef_string_userfree_free().
14362     extern(System) cef_string_userfree_t function (cef_media_source_t* self) nothrow get_id;
14363 
14364     ///
14365     /// Returns true (1) if this source outputs its content via Cast.
14366     ///
14367     extern(System) int function (cef_media_source_t* self) nothrow is_cast_source;
14368 
14369     ///
14370     /// Returns true (1) if this source outputs its content via DIAL.
14371     ///
14372     extern(System) int function (cef_media_source_t* self) nothrow is_dial_source;
14373 }
14374 
14375 
14376 
14377 // CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_
14378 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
14379 //
14380 // Redistribution and use in source and binary forms, with or without
14381 // modification, are permitted provided that the following conditions are
14382 // met:
14383 //
14384 //    * Redistributions of source code must retain the above copyright
14385 // notice, this list of conditions and the following disclaimer.
14386 //    * Redistributions in binary form must reproduce the above
14387 // copyright notice, this list of conditions and the following disclaimer
14388 // in the documentation and/or other materials provided with the
14389 // distribution.
14390 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14391 // Framework nor the names of its contributors may be used to endorse
14392 // or promote products derived from this software without specific prior
14393 // written permission.
14394 //
14395 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14396 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14397 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
14398 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
14399 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14400 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14401 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
14402 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
14403 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14404 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14405 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14406 //
14407 // ---------------------------------------------------------------------------
14408 //
14409 // This file was generated by the CEF translator tool and should not edited
14410 // by hand. See the translator.README.txt file in the tools directory for
14411 // more information.
14412 //
14413 // $hash=5dae0b1a1271e79a5fd9b2c6e71e7a719a450161$
14414 //
14415 
14416 extern (C):
14417 
14418 ///
14419 /// Supports creation and modification of menus. See cef_menu_id_t for the
14420 /// command ids that have default implementations. All user-defined command ids
14421 /// should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of
14422 /// this structure can only be accessed on the browser process the UI thread.
14423 ///
14424 struct cef_menu_model_t
14425 {
14426     ///
14427     /// Base structure.
14428     ///
14429 
14430     ///
14431     /// Returns true (1) if this menu is a submenu.
14432     ///
14433 
14434     ///
14435     /// Clears the menu. Returns true (1) on success.
14436     ///
14437 
14438     ///
14439     /// Returns the number of items in this menu.
14440     ///
14441 
14442     ///
14443     /// Add a separator to the menu. Returns true (1) on success.
14444 
14445     cef_base_ref_counted_t base;
14446     extern(System) int function (cef_menu_model_t* self) nothrow is_sub_menu;
14447     extern(System) int function (cef_menu_model_t* self) nothrow clear;
14448     extern(System) size_t function (cef_menu_model_t* self) nothrow get_count;
14449     ///
14450     extern(System) int function (cef_menu_model_t* self) nothrow add_separator;
14451 
14452     ///
14453     /// Add an item to the menu. Returns true (1) on success.
14454     ///
14455     extern(System) int function (
14456         cef_menu_model_t* self,
14457         int command_id,
14458         const(cef_string_t)* label) nothrow add_item;
14459 
14460     ///
14461     /// Add a check item to the menu. Returns true (1) on success.
14462     ///
14463     extern(System) int function (
14464         cef_menu_model_t* self,
14465         int command_id,
14466         const(cef_string_t)* label) nothrow add_check_item;
14467 
14468     ///
14469     /// Add a radio item to the menu. Only a single item with the specified
14470     /// |group_id| can be checked at a time. Returns true (1) on success.
14471     ///
14472     extern(System) int function (
14473         cef_menu_model_t* self,
14474         int command_id,
14475         const(cef_string_t)* label,
14476         int group_id) nothrow add_radio_item;
14477 
14478     ///
14479     /// Add a sub-menu to the menu. The new sub-menu is returned.
14480     ///
14481     extern(System) cef_menu_model_t* function (
14482         cef_menu_model_t* self,
14483         int command_id,
14484         const(cef_string_t)* label) nothrow add_sub_menu;
14485 
14486     ///
14487     /// Insert a separator in the menu at the specified |index|. Returns true (1)
14488     /// on success.
14489     ///
14490     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow insert_separator_at;
14491 
14492     ///
14493     /// Insert an item in the menu at the specified |index|. Returns true (1) on
14494     /// success.
14495     ///
14496     extern(System) int function (
14497         cef_menu_model_t* self,
14498         size_t index,
14499         int command_id,
14500         const(cef_string_t)* label) nothrow insert_item_at;
14501 
14502     ///
14503     /// Insert a check item in the menu at the specified |index|. Returns true (1)
14504     /// on success.
14505     ///
14506     extern(System) int function (
14507         cef_menu_model_t* self,
14508         size_t index,
14509         int command_id,
14510         const(cef_string_t)* label) nothrow insert_check_item_at;
14511 
14512     ///
14513     /// Insert a radio item in the menu at the specified |index|. Only a single
14514     /// item with the specified |group_id| can be checked at a time. Returns true
14515     /// (1) on success.
14516     ///
14517     extern(System) int function (
14518         cef_menu_model_t* self,
14519         size_t index,
14520         int command_id,
14521         const(cef_string_t)* label,
14522         int group_id) nothrow insert_radio_item_at;
14523 
14524     ///
14525     /// Insert a sub-menu in the menu at the specified |index|. The new sub-menu
14526     /// is returned.
14527     ///
14528     extern(System) cef_menu_model_t* function (
14529         cef_menu_model_t* self,
14530         size_t index,
14531         int command_id,
14532         const(cef_string_t)* label) nothrow insert_sub_menu_at;
14533 
14534     ///
14535     /// Removes the item with the specified |command_id|. Returns true (1) on
14536     /// success.
14537     ///
14538     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow remove;
14539 
14540     ///
14541     /// Removes the item at the specified |index|. Returns true (1) on success.
14542     ///
14543     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow remove_at;
14544 
14545     ///
14546     /// Returns the index associated with the specified |command_id| or -1 if not
14547     /// found due to the command id not existing in the menu.
14548     ///
14549     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow get_index_of;
14550 
14551     ///
14552     /// Returns the command id at the specified |index| or -1 if not found due to
14553     /// invalid range or the index being a separator.
14554     ///
14555     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow get_command_id_at;
14556 
14557     ///
14558     /// Sets the command id at the specified |index|. Returns true (1) on success.
14559     ///
14560     extern(System) int function (
14561         cef_menu_model_t* self,
14562         size_t index,
14563         int command_id) nothrow set_command_id_at;
14564 
14565     ///
14566     /// Returns the label for the specified |command_id| or NULL if not found.
14567     ///
14568     // The resulting string must be freed by calling cef_string_userfree_free().
14569     extern(System) cef_string_userfree_t function (
14570         cef_menu_model_t* self,
14571         int command_id) nothrow get_label;
14572 
14573     ///
14574     /// Returns the label at the specified |index| or NULL if not found due to
14575     /// invalid range or the index being a separator.
14576     ///
14577     // The resulting string must be freed by calling cef_string_userfree_free().
14578     extern(System) cef_string_userfree_t function (
14579         cef_menu_model_t* self,
14580         size_t index) nothrow get_label_at;
14581 
14582     ///
14583     /// Sets the label for the specified |command_id|. Returns true (1) on
14584     /// success.
14585     ///
14586     extern(System) int function (
14587         cef_menu_model_t* self,
14588         int command_id,
14589         const(cef_string_t)* label) nothrow set_label;
14590 
14591     ///
14592     /// Set the label at the specified |index|. Returns true (1) on success.
14593     ///
14594     extern(System) int function (
14595         cef_menu_model_t* self,
14596         size_t index,
14597         const(cef_string_t)* label) nothrow set_label_at;
14598 
14599     ///
14600     /// Returns the item type for the specified |command_id|.
14601     ///
14602     extern(System) cef_menu_item_type_t function (
14603         cef_menu_model_t* self,
14604         int command_id) nothrow get_type;
14605 
14606     ///
14607     /// Returns the item type at the specified |index|.
14608     ///
14609     extern(System) cef_menu_item_type_t function (
14610         cef_menu_model_t* self,
14611         size_t index) nothrow get_type_at;
14612 
14613     ///
14614     /// Returns the group id for the specified |command_id| or -1 if invalid.
14615     ///
14616     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow get_group_id;
14617 
14618     ///
14619     /// Returns the group id at the specified |index| or -1 if invalid.
14620     ///
14621     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow get_group_id_at;
14622 
14623     ///
14624     /// Sets the group id for the specified |command_id|. Returns true (1) on
14625     /// success.
14626     ///
14627     extern(System) int function (
14628         cef_menu_model_t* self,
14629         int command_id,
14630         int group_id) nothrow set_group_id;
14631 
14632     ///
14633     /// Sets the group id at the specified |index|. Returns true (1) on success.
14634     ///
14635     extern(System) int function (
14636         cef_menu_model_t* self,
14637         size_t index,
14638         int group_id) nothrow set_group_id_at;
14639 
14640     ///
14641     /// Returns the submenu for the specified |command_id| or NULL if invalid.
14642     ///
14643     extern(System) cef_menu_model_t* function (
14644         cef_menu_model_t* self,
14645         int command_id) nothrow get_sub_menu;
14646 
14647     ///
14648     /// Returns the submenu at the specified |index| or NULL if invalid.
14649     ///
14650     extern(System) cef_menu_model_t* function (
14651         cef_menu_model_t* self,
14652         size_t index) nothrow get_sub_menu_at;
14653 
14654     ///
14655     /// Returns true (1) if the specified |command_id| is visible.
14656     ///
14657     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_visible;
14658 
14659     ///
14660     /// Returns true (1) if the specified |index| is visible.
14661     ///
14662     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_visible_at;
14663 
14664     ///
14665     /// Change the visibility of the specified |command_id|. Returns true (1) on
14666     /// success.
14667     ///
14668     extern(System) int function (
14669         cef_menu_model_t* self,
14670         int command_id,
14671         int visible) nothrow set_visible;
14672 
14673     ///
14674     /// Change the visibility at the specified |index|. Returns true (1) on
14675     /// success.
14676     ///
14677     extern(System) int function (
14678         cef_menu_model_t* self,
14679         size_t index,
14680         int visible) nothrow set_visible_at;
14681 
14682     ///
14683     /// Returns true (1) if the specified |command_id| is enabled.
14684     ///
14685     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_enabled;
14686 
14687     ///
14688     /// Returns true (1) if the specified |index| is enabled.
14689     ///
14690     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_enabled_at;
14691 
14692     ///
14693     /// Change the enabled status of the specified |command_id|. Returns true (1)
14694     /// on success.
14695     ///
14696     extern(System) int function (
14697         cef_menu_model_t* self,
14698         int command_id,
14699         int enabled) nothrow set_enabled;
14700 
14701     ///
14702     /// Change the enabled status at the specified |index|. Returns true (1) on
14703     /// success.
14704     ///
14705     extern(System) int function (
14706         cef_menu_model_t* self,
14707         size_t index,
14708         int enabled) nothrow set_enabled_at;
14709 
14710     ///
14711     /// Returns true (1) if the specified |command_id| is checked. Only applies to
14712     /// check and radio items.
14713     ///
14714     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_checked;
14715 
14716     ///
14717     /// Returns true (1) if the specified |index| is checked. Only applies to
14718     /// check and radio items.
14719     ///
14720     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_checked_at;
14721 
14722     ///
14723     /// Check the specified |command_id|. Only applies to check and radio items.
14724     /// Returns true (1) on success.
14725     ///
14726     extern(System) int function (
14727         cef_menu_model_t* self,
14728         int command_id,
14729         int checked) nothrow set_checked;
14730 
14731     ///
14732     /// Check the specified |index|. Only applies to check and radio items.
14733     /// Returns true (1) on success.
14734     ///
14735     extern(System) int function (
14736         cef_menu_model_t* self,
14737         size_t index,
14738         int checked) nothrow set_checked_at;
14739 
14740     ///
14741     /// Returns true (1) if the specified |command_id| has a keyboard accelerator
14742     /// assigned.
14743     ///
14744     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow has_accelerator;
14745 
14746     ///
14747     /// Returns true (1) if the specified |index| has a keyboard accelerator
14748     /// assigned.
14749     ///
14750     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow has_accelerator_at;
14751 
14752     ///
14753     /// Set the keyboard accelerator for the specified |command_id|. |key_code|
14754     /// can be any virtual key or character value. Returns true (1) on success.
14755     ///
14756     extern(System) int function (
14757         cef_menu_model_t* self,
14758         int command_id,
14759         int key_code,
14760         int shift_pressed,
14761         int ctrl_pressed,
14762         int alt_pressed) nothrow set_accelerator;
14763 
14764     ///
14765     /// Set the keyboard accelerator at the specified |index|. |key_code| can be
14766     /// any virtual key or character value. Returns true (1) on success.
14767     ///
14768     extern(System) int function (
14769         cef_menu_model_t* self,
14770         size_t index,
14771         int key_code,
14772         int shift_pressed,
14773         int ctrl_pressed,
14774         int alt_pressed) nothrow set_accelerator_at;
14775 
14776     ///
14777     /// Remove the keyboard accelerator for the specified |command_id|. Returns
14778     /// true (1) on success.
14779     ///
14780     extern(System) int function (cef_menu_model_t* self, int command_id) nothrow remove_accelerator;
14781 
14782     ///
14783     /// Remove the keyboard accelerator at the specified |index|. Returns true (1)
14784     /// on success.
14785     ///
14786     extern(System) int function (cef_menu_model_t* self, size_t index) nothrow remove_accelerator_at;
14787 
14788     ///
14789     /// Retrieves the keyboard accelerator for the specified |command_id|. Returns
14790     /// true (1) on success.
14791     ///
14792     extern(System) int function (
14793         cef_menu_model_t* self,
14794         int command_id,
14795         int* key_code,
14796         int* shift_pressed,
14797         int* ctrl_pressed,
14798         int* alt_pressed) nothrow get_accelerator;
14799 
14800     ///
14801     /// Retrieves the keyboard accelerator for the specified |index|. Returns true
14802     /// (1) on success.
14803     ///
14804     extern(System) int function (
14805         cef_menu_model_t* self,
14806         size_t index,
14807         int* key_code,
14808         int* shift_pressed,
14809         int* ctrl_pressed,
14810         int* alt_pressed) nothrow get_accelerator_at;
14811 
14812     ///
14813     /// Set the explicit color for |command_id| and |color_type| to |color|.
14814     /// Specify a |color| value of 0 to remove the explicit color. If no explicit
14815     /// color or default color is set for |color_type| then the system color will
14816     /// be used. Returns true (1) on success.
14817     ///
14818     extern(System) int function (
14819         cef_menu_model_t* self,
14820         int command_id,
14821         cef_menu_color_type_t color_type,
14822         cef_color_t color) nothrow set_color;
14823 
14824     ///
14825     /// Set the explicit color for |command_id| and |index| to |color|. Specify a
14826     /// |color| value of 0 to remove the explicit color. Specify an |index| value
14827     /// of -1 to set the default color for items that do not have an explicit
14828     /// color set. If no explicit color or default color is set for |color_type|
14829     /// then the system color will be used. Returns true (1) on success.
14830     ///
14831     extern(System) int function (
14832         cef_menu_model_t* self,
14833         int index,
14834         cef_menu_color_type_t color_type,
14835         cef_color_t color) nothrow set_color_at;
14836 
14837     ///
14838     /// Returns in |color| the color that was explicitly set for |command_id| and
14839     /// |color_type|. If a color was not set then 0 will be returned in |color|.
14840     /// Returns true (1) on success.
14841     ///
14842     extern(System) int function (
14843         cef_menu_model_t* self,
14844         int command_id,
14845         cef_menu_color_type_t color_type,
14846         cef_color_t* color) nothrow get_color;
14847 
14848     ///
14849     /// Returns in |color| the color that was explicitly set for |command_id| and
14850     /// |color_type|. Specify an |index| value of -1 to return the default color
14851     /// in |color|. If a color was not set then 0 will be returned in |color|.
14852     /// Returns true (1) on success.
14853     ///
14854     extern(System) int function (
14855         cef_menu_model_t* self,
14856         int index,
14857         cef_menu_color_type_t color_type,
14858         cef_color_t* color) nothrow get_color_at;
14859 
14860     ///
14861     /// Sets the font list for the specified |command_id|. If |font_list| is NULL
14862     /// the system font will be used. Returns true (1) on success. The format is
14863     /// "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where:
14864     /// - FONT_FAMILY_LIST is a comma-separated list of font family names,
14865     /// - STYLES is an optional space-separated list of style names (case-
14866     ///   sensitive "Bold" and "Italic" are supported), and
14867     /// - SIZE is an integer font size in pixels with the suffix "px".
14868     ///
14869     /// Here are examples of valid font description strings:
14870     /// - "Arial, Helvetica, Bold Italic 14px"
14871     /// - "Arial, 14px"
14872     ///
14873     extern(System) int function (
14874         cef_menu_model_t* self,
14875         int command_id,
14876         const(cef_string_t)* font_list) nothrow set_font_list;
14877 
14878     ///
14879     /// Sets the font list for the specified |index|. Specify an |index| value of
14880     /// - 1 to set the default font. If |font_list| is NULL the system font will
14881     /// - FONT_FAMILY_LIST is a comma-separated list of font family names,
14882     /// - STYLES is an optional space-separated list of style names (case-
14883     ///   sensitive "Bold" and "Italic" are supported), and
14884     /// - SIZE is an integer font size in pixels with the suffix "px".
14885     ///
14886     /// Here are examples of valid font description strings:
14887     /// - "Arial, Helvetica, Bold Italic 14px"
14888     /// - "Arial, 14px"
14889     ///
14890     extern(System) int function (
14891         cef_menu_model_t* self,
14892         int index,
14893         const(cef_string_t)* font_list) nothrow set_font_list_at;
14894 }
14895 
14896 
14897 
14898 ///
14899 /// Create a new MenuModel with the specified |delegate|.
14900 ///
14901 cef_menu_model_t* cef_menu_model_create (cef_menu_model_delegate_t* delegate_);
14902 
14903 // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_
14904 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
14905 //
14906 // Redistribution and use in source and binary forms, with or without
14907 // modification, are permitted provided that the following conditions are
14908 // met:
14909 //
14910 //    * Redistributions of source code must retain the above copyright
14911 // notice, this list of conditions and the following disclaimer.
14912 //    * Redistributions in binary form must reproduce the above
14913 // copyright notice, this list of conditions and the following disclaimer
14914 // in the documentation and/or other materials provided with the
14915 // distribution.
14916 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14917 // Framework nor the names of its contributors may be used to endorse
14918 // or promote products derived from this software without specific prior
14919 // written permission.
14920 //
14921 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14922 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14923 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
14924 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
14925 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14926 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14927 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
14928 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
14929 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14930 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14931 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14932 //
14933 // ---------------------------------------------------------------------------
14934 //
14935 // This file was generated by the CEF translator tool and should not edited
14936 // by hand. See the translator.README.txt file in the tools directory for
14937 // more information.
14938 //
14939 // $hash=01bdeaf96ea01591689b52b0955504644d6614b8$
14940 //
14941 
14942 extern (C):
14943 
14944 
14945 
14946 ///
14947 /// Implement this structure to handle menu model events. The functions of this
14948 /// structure will be called on the browser process UI thread unless otherwise
14949 /// indicated.
14950 ///
14951 struct cef_menu_model_delegate_t
14952 {
14953     ///
14954     /// Base structure.
14955     ///
14956 
14957     ///
14958     /// Perform the action associated with the specified |command_id| and optional
14959     /// |event_flags|.
14960     ///
14961 
14962     ///
14963     /// Called when the user moves the mouse outside the menu and over the owning
14964     /// window.
14965     ///
14966 
14967     cef_base_ref_counted_t base;
14968     extern(System) void function (
14969         cef_menu_model_delegate_t* self,
14970         cef_menu_model_t* menu_model,
14971         int command_id,
14972         cef_event_flags_t event_flags) nothrow execute_command;
14973     extern(System) void function (
14974         cef_menu_model_delegate_t* self,
14975         cef_menu_model_t* menu_model,
14976         const(cef_point_t)* screen_point) nothrow mouse_outside_menu;
14977 
14978     ///
14979     /// Called on unhandled open submenu keyboard commands. |is_rtl| will be true
14980     /// (1) if the menu is displaying a right-to-left language.
14981     ///
14982     extern(System) void function (
14983         cef_menu_model_delegate_t* self,
14984         cef_menu_model_t* menu_model,
14985         int is_rtl) nothrow unhandled_open_submenu;
14986 
14987     ///
14988     /// Called on unhandled close submenu keyboard commands. |is_rtl| will be true
14989     /// (1) if the menu is displaying a right-to-left language.
14990     ///
14991     extern(System) void function (
14992         cef_menu_model_delegate_t* self,
14993         cef_menu_model_t* menu_model,
14994         int is_rtl) nothrow unhandled_close_submenu;
14995 
14996     ///
14997     /// The menu is about to show.
14998     ///
14999     extern(System) void function (
15000         cef_menu_model_delegate_t* self,
15001         cef_menu_model_t* menu_model) nothrow menu_will_show;
15002 
15003     ///
15004     /// The menu has closed.
15005     ///
15006     extern(System) void function (
15007         cef_menu_model_delegate_t* self,
15008         cef_menu_model_t* menu_model) nothrow menu_closed;
15009 
15010     ///
15011     /// Optionally modify a menu item label. Return true (1) if |label| was
15012     /// modified.
15013     ///
15014     extern(System) int function (
15015         cef_menu_model_delegate_t* self,
15016         cef_menu_model_t* menu_model,
15017         cef_string_t* label) nothrow format_label;
15018 }
15019 
15020 
15021 
15022 // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_
15023 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
15024 //
15025 // Redistribution and use in source and binary forms, with or without
15026 // modification, are permitted provided that the following conditions are
15027 // met:
15028 //
15029 //    * Redistributions of source code must retain the above copyright
15030 // notice, this list of conditions and the following disclaimer.
15031 //    * Redistributions in binary form must reproduce the above
15032 // copyright notice, this list of conditions and the following disclaimer
15033 // in the documentation and/or other materials provided with the
15034 // distribution.
15035 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15036 // Framework nor the names of its contributors may be used to endorse
15037 // or promote products derived from this software without specific prior
15038 // written permission.
15039 //
15040 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15041 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15042 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15043 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15044 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15045 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15046 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15047 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15048 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15049 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15050 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15051 //
15052 // ---------------------------------------------------------------------------
15053 //
15054 // This file was generated by the CEF translator tool and should not edited
15055 // by hand. See the translator.README.txt file in the tools directory for
15056 // more information.
15057 //
15058 // $hash=dbdac05f2ebd8e8a357eacfe5095676a5bd5b1ac$
15059 //
15060 
15061 extern (C):
15062 
15063 ///
15064 /// Structure used to represent an entry in navigation history.
15065 ///
15066 struct cef_navigation_entry_t
15067 {
15068     ///
15069     /// Base structure.
15070     ///
15071 
15072     ///
15073     /// Returns true (1) if this object is valid. Do not call any other functions
15074     /// if this function returns false (0).
15075     ///
15076 
15077     ///
15078     /// Returns the actual URL of the page. For some pages this may be data: URL
15079     /// or similar. Use get_display_url() to return a display-friendly version.
15080     ///
15081     // The resulting string must be freed by calling cef_string_userfree_free().
15082 
15083     ///
15084     /// Returns a display-friendly version of the URL.
15085     ///
15086     // The resulting string must be freed by calling cef_string_userfree_free().
15087 
15088     cef_base_ref_counted_t base;
15089     extern(System) int function (cef_navigation_entry_t* self) nothrow is_valid;
15090     extern(System) cef_string_userfree_t function (cef_navigation_entry_t* self) nothrow get_url;
15091     extern(System) cef_string_userfree_t function (
15092         cef_navigation_entry_t* self) nothrow get_display_url;
15093 
15094     ///
15095     /// Returns the original URL that was entered by the user before any
15096     /// redirects.
15097     ///
15098     // The resulting string must be freed by calling cef_string_userfree_free().
15099     extern(System) cef_string_userfree_t function (
15100         cef_navigation_entry_t* self) nothrow get_original_url;
15101 
15102     ///
15103     /// Returns the title set by the page. This value may be NULL.
15104     ///
15105     // The resulting string must be freed by calling cef_string_userfree_free().
15106     extern(System) cef_string_userfree_t function (cef_navigation_entry_t* self) nothrow get_title;
15107 
15108     ///
15109     /// Returns the transition type which indicates what the user did to move to
15110     /// this page from the previous page.
15111     ///
15112     extern(System) cef_transition_type_t function (
15113         cef_navigation_entry_t* self) nothrow get_transition_type;
15114 
15115     ///
15116     /// Returns true (1) if this navigation includes post data.
15117     ///
15118     extern(System) int function (cef_navigation_entry_t* self) nothrow has_post_data;
15119 
15120     ///
15121     /// Returns the time for the last known successful navigation completion. A
15122     /// navigation may be completed more than once if the page is reloaded. May be
15123     /// 0 if the navigation has not yet completed.
15124     ///
15125     extern(System) cef_basetime_t function (
15126         cef_navigation_entry_t* self) nothrow get_completion_time;
15127 
15128     ///
15129     /// Returns the HTTP status code for the last known successful navigation
15130     /// response. May be 0 if the response has not yet been received or if the
15131     /// navigation has not yet completed.
15132     ///
15133     extern(System) int function (cef_navigation_entry_t* self) nothrow get_http_status_code;
15134 
15135     ///
15136     /// Returns the SSL information for this navigation entry.
15137     ///
15138     extern(System) cef_sslstatus_t* function (cef_navigation_entry_t* self) nothrow get_sslstatus;
15139 }
15140 
15141 
15142 
15143 // CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_
15144 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
15145 //
15146 // Redistribution and use in source and binary forms, with or without
15147 // modification, are permitted provided that the following conditions are
15148 // met:
15149 //
15150 //    * Redistributions of source code must retain the above copyright
15151 // notice, this list of conditions and the following disclaimer.
15152 //    * Redistributions in binary form must reproduce the above
15153 // copyright notice, this list of conditions and the following disclaimer
15154 // in the documentation and/or other materials provided with the
15155 // distribution.
15156 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15157 // Framework nor the names of its contributors may be used to endorse
15158 // or promote products derived from this software without specific prior
15159 // written permission.
15160 //
15161 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15162 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15163 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15164 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15165 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15166 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15167 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15168 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15169 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15170 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15171 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15172 //
15173 // ---------------------------------------------------------------------------
15174 //
15175 // This file was generated by the CEF translator tool and should not edited
15176 // by hand. See the translator.README.txt file in the tools directory for
15177 // more information.
15178 //
15179 // $hash=f146fd9172033e77e90994841df9fa55ff71aa4b$
15180 //
15181 
15182 extern (C):
15183 
15184 ///
15185 /// Add an entry to the cross-origin access whitelist.
15186 ///
15187 /// The same-origin policy restricts how scripts hosted from different origins
15188 /// (scheme + domain + port) can communicate. By default, scripts can only
15189 /// access resources with the same origin. Scripts hosted on the HTTP and HTTPS
15190 /// schemes (but no other schemes) can use the "Access-Control-Allow-Origin"
15191 /// header to allow cross-origin requests. For example,
15192 /// https://source.example.com can make XMLHttpRequest requests on
15193 /// http://target.example.com if the http://target.example.com request returns
15194 /// an "Access-Control-Allow-Origin: https://source.example.com" response
15195 /// header.
15196 ///
15197 /// Scripts in separate frames or iframes and hosted from the same protocol and
15198 /// domain suffix can execute cross-origin JavaScript if both pages set the
15199 /// document.domain value to the same domain suffix. For example,
15200 /// scheme://foo.example.com and scheme://bar.example.com can communicate using
15201 /// JavaScript if both domains set document.domain="example.com".
15202 ///
15203 /// This function is used to allow access to origins that would otherwise
15204 /// violate the same-origin policy. Scripts hosted underneath the fully
15205 /// qualified |source_origin| URL (like http://www.example.com) will be allowed
15206 /// access to all resources hosted on the specified |target_protocol| and
15207 /// |target_domain|. If |target_domain| is non-NULL and
15208 /// |allow_target_subdomains| is false (0) only exact domain matches will be
15209 /// allowed. If |target_domain| contains a top- level domain component (like
15210 /// "example.com") and |allow_target_subdomains| is true (1) sub-domain matches
15211 /// will be allowed. If |target_domain| is NULL and |allow_target_subdomains| if
15212 /// true (1) all domains and IP addresses will be allowed.
15213 ///
15214 /// This function cannot be used to bypass the restrictions on local or display
15215 /// isolated schemes. See the comments on CefRegisterCustomScheme for more
15216 /// information.
15217 ///
15218 /// This function may be called on any thread. Returns false (0) if
15219 /// |source_origin| is invalid or the whitelist cannot be accessed.
15220 ///
15221 int cef_add_cross_origin_whitelist_entry (
15222     const(cef_string_t)* source_origin,
15223     const(cef_string_t)* target_protocol,
15224     const(cef_string_t)* target_domain,
15225     int allow_target_subdomains);
15226 
15227 ///
15228 /// Remove an entry from the cross-origin access whitelist. Returns false (0) if
15229 /// |source_origin| is invalid or the whitelist cannot be accessed.
15230 ///
15231 int cef_remove_cross_origin_whitelist_entry (
15232     const(cef_string_t)* source_origin,
15233     const(cef_string_t)* target_protocol,
15234     const(cef_string_t)* target_domain,
15235     int allow_target_subdomains);
15236 
15237 ///
15238 /// Remove all entries from the cross-origin access whitelist. Returns false (0)
15239 /// if the whitelist cannot be accessed.
15240 ///
15241 int cef_clear_cross_origin_whitelist ();
15242 
15243 // CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_
15244 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
15245 //
15246 // Redistribution and use in source and binary forms, with or without
15247 // modification, are permitted provided that the following conditions are
15248 // met:
15249 //
15250 //    * Redistributions of source code must retain the above copyright
15251 // notice, this list of conditions and the following disclaimer.
15252 //    * Redistributions in binary form must reproduce the above
15253 // copyright notice, this list of conditions and the following disclaimer
15254 // in the documentation and/or other materials provided with the
15255 // distribution.
15256 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15257 // Framework nor the names of its contributors may be used to endorse
15258 // or promote products derived from this software without specific prior
15259 // written permission.
15260 //
15261 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15262 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15263 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15264 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15265 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15266 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15267 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15268 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15269 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15270 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15271 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15272 //
15273 // ---------------------------------------------------------------------------
15274 //
15275 // This file was generated by the CEF translator tool and should not edited
15276 // by hand. See the translator.README.txt file in the tools directory for
15277 // more information.
15278 //
15279 // $hash=8accded29b97df1549e86e58d8976fe0f800359a$
15280 //
15281 
15282 extern (C):
15283 
15284 ///
15285 /// Combines specified |base_url| and |relative_url| into |resolved_url|.
15286 /// Returns false (0) if one of the URLs is NULL or invalid.
15287 ///
15288 int cef_resolve_url (
15289     const(cef_string_t)* base_url,
15290     const(cef_string_t)* relative_url,
15291     cef_string_t* resolved_url);
15292 
15293 ///
15294 /// Parse the specified |url| into its component parts. Returns false (0) if the
15295 /// URL is NULL or invalid.
15296 ///
15297 int cef_parse_url (const(cef_string_t)* url, cef_urlparts_t* parts);
15298 
15299 ///
15300 /// Creates a URL from the specified |parts|, which must contain a non-NULL spec
15301 /// or a non-NULL host and path (at a minimum), but not both. Returns false (0)
15302 /// if |parts| isn't initialized as described.
15303 ///
15304 int cef_create_url (const(cef_urlparts_t)* parts, cef_string_t* url);
15305 
15306 ///
15307 /// This is a convenience function for formatting a URL in a concise and human-
15308 /// friendly way to help users make security-related decisions (or in other
15309 /// circumstances when people need to distinguish sites, origins, or otherwise-
15310 /// simplified URLs from each other). Internationalized domain names (IDN) may
15311 /// be presented in Unicode if the conversion is considered safe. The returned
15312 /// value will (a) omit the path for standard schemes, excepting file and
15313 /// filesystem, and (b) omit the port if it is the default for the scheme. Do
15314 /// not use this for URLs which will be parsed or sent to other applications.
15315 ///
15316 // The resulting string must be freed by calling cef_string_userfree_free().
15317 cef_string_userfree_t cef_format_url_for_security_display (
15318     const(cef_string_t)* origin_url);
15319 
15320 ///
15321 /// Returns the mime type for the specified file extension or an NULL string if
15322 /// unknown.
15323 ///
15324 // The resulting string must be freed by calling cef_string_userfree_free().
15325 cef_string_userfree_t cef_get_mime_type (const(cef_string_t)* extension);
15326 
15327 ///
15328 /// Get the extensions associated with the given mime type. This should be
15329 /// passed in lower case. There could be multiple extensions for a given mime
15330 /// type, like "html,htm" for "text/html", or "txt,text,html,..." for "text/*".
15331 /// Any existing elements in the provided vector will not be erased.
15332 ///
15333 void cef_get_extensions_for_mime_type (
15334     const(cef_string_t)* mime_type,
15335     cef_string_list_t extensions);
15336 
15337 ///
15338 /// Encodes |data| as a base64 string.
15339 ///
15340 // The resulting string must be freed by calling cef_string_userfree_free().
15341 cef_string_userfree_t cef_base64encode (const(void)* data, size_t data_size);
15342 
15343 ///
15344 /// Decodes the base64 encoded string |data|. The returned value will be NULL if
15345 /// the decoding fails.
15346 ///
15347 
15348 cef_binary_value_t* cef_base64decode (const(cef_string_t)* data);
15349 
15350 ///
15351 /// Escapes characters in |text| which are unsuitable for use as a query
15352 /// parameter value. Everything except alphanumerics and -_.!~*'() will be
15353 /// converted to "%XX". If |use_plus| is true (1) spaces will change to "+". The
15354 /// result is basically the same as encodeURIComponent in Javacript.
15355 ///
15356 // The resulting string must be freed by calling cef_string_userfree_free().
15357 cef_string_userfree_t cef_uriencode (const(cef_string_t)* text, int use_plus);
15358 
15359 ///
15360 /// Unescapes |text| and returns the result. Unescaping consists of looking for
15361 /// the exact pattern "%XX" where each X is a hex digit and converting to the
15362 /// character with the numerical value of those digits (e.g. "i%20=%203%3b"
15363 /// unescapes to "i = 3;"). If |convert_to_utf8| is true (1) this function will
15364 /// attempt to interpret the initial decoded result as UTF-8. If the result is
15365 /// convertable into UTF-8 it will be returned as converted. Otherwise the
15366 /// initial decoded result will be returned.  The |unescape_rule| parameter
15367 /// supports further customization the decoding process.
15368 ///
15369 // The resulting string must be freed by calling cef_string_userfree_free().
15370 cef_string_userfree_t cef_uridecode (
15371     const(cef_string_t)* text,
15372     int convert_to_utf8,
15373     cef_uri_unescape_rule_t unescape_rule);
15374 
15375 ///
15376 /// Parses the specified |json_string| and returns a dictionary or list
15377 /// representation. If JSON parsing fails this function returns NULL.
15378 ///
15379 
15380 cef_value_t* cef_parse_json (
15381     const(cef_string_t)* json_string,
15382     cef_json_parser_options_t options);
15383 
15384 ///
15385 /// Parses the specified UTF8-encoded |json| buffer of size |json_size| and
15386 /// returns a dictionary or list representation. If JSON parsing fails this
15387 /// function returns NULL.
15388 ///
15389 cef_value_t* cef_parse_json_buffer (
15390     const(void)* json,
15391     size_t json_size,
15392     cef_json_parser_options_t options);
15393 
15394 ///
15395 /// Parses the specified |json_string| and returns a dictionary or list
15396 /// representation. If JSON parsing fails this function returns NULL and
15397 /// populates |error_msg_out| with a formatted error message.
15398 ///
15399 cef_value_t* cef_parse_jsonand_return_error (
15400     const(cef_string_t)* json_string,
15401     cef_json_parser_options_t options,
15402     cef_string_t* error_msg_out);
15403 
15404 ///
15405 /// Generates a JSON string from the specified root |node| which should be a
15406 /// dictionary or list value. Returns an NULL string on failure. This function
15407 /// requires exclusive access to |node| including any underlying data.
15408 ///
15409 // The resulting string must be freed by calling cef_string_userfree_free().
15410 cef_string_userfree_t cef_write_json (
15411     cef_value_t* node,
15412     cef_json_writer_options_t options);
15413 
15414 // CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_
15415 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
15416 //
15417 // Redistribution and use in source and binary forms, with or without
15418 // modification, are permitted provided that the following conditions are
15419 // met:
15420 //
15421 //    * Redistributions of source code must retain the above copyright
15422 // notice, this list of conditions and the following disclaimer.
15423 //    * Redistributions in binary form must reproduce the above
15424 // copyright notice, this list of conditions and the following disclaimer
15425 // in the documentation and/or other materials provided with the
15426 // distribution.
15427 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15428 // Framework nor the names of its contributors may be used to endorse
15429 // or promote products derived from this software without specific prior
15430 // written permission.
15431 //
15432 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15433 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15434 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15435 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15436 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15437 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15438 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15439 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15440 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15441 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15442 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15443 //
15444 // ---------------------------------------------------------------------------
15445 //
15446 // This file was generated by the CEF translator tool and should not edited
15447 // by hand. See the translator.README.txt file in the tools directory for
15448 // more information.
15449 //
15450 // $hash=ee0c50b4e1f51fb2286da24bb9244ae74f3b0c6f$
15451 //
15452 
15453 extern (C):
15454 
15455 ///
15456 /// Retrieve the path associated with the specified |key|. Returns true (1) on
15457 /// success. Can be called on any thread in the browser process.
15458 ///
15459 int cef_get_path (cef_path_key_t key, cef_string_t* path);
15460 
15461 // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_
15462 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
15463 //
15464 // Redistribution and use in source and binary forms, with or without
15465 // modification, are permitted provided that the following conditions are
15466 // met:
15467 //
15468 //    * Redistributions of source code must retain the above copyright
15469 // notice, this list of conditions and the following disclaimer.
15470 //    * Redistributions in binary form must reproduce the above
15471 // copyright notice, this list of conditions and the following disclaimer
15472 // in the documentation and/or other materials provided with the
15473 // distribution.
15474 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15475 // Framework nor the names of its contributors may be used to endorse
15476 // or promote products derived from this software without specific prior
15477 // written permission.
15478 //
15479 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15480 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15481 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15482 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15483 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15484 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15485 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15486 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15487 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15488 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15489 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15490 //
15491 // ---------------------------------------------------------------------------
15492 //
15493 // This file was generated by the CEF translator tool and should not edited
15494 // by hand. See the translator.README.txt file in the tools directory for
15495 // more information.
15496 //
15497 // $hash=c9b3913701581cd6a1077fa3a39d197f338a2507$
15498 //
15499 
15500 extern (C):
15501 
15502 ///
15503 /// Callback structure used for asynchronous continuation of media access
15504 /// permission requests.
15505 ///
15506 struct cef_media_access_callback_t
15507 {
15508     ///
15509     /// Base structure.
15510     ///
15511 
15512     ///
15513     /// Call to allow or deny media access. If this callback was initiated in
15514     /// response to a getUserMedia (indicated by
15515     /// CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE and/or
15516     /// CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE being set) then
15517     /// |allowed_permissions| must match |required_permissions| passed to
15518     /// OnRequestMediaAccessPermission.
15519     ///
15520 
15521     ///
15522     /// Cancel the media access request.
15523     ///
15524 
15525     cef_base_ref_counted_t base;
15526     extern(System) void function (
15527         cef_media_access_callback_t* self,
15528         uint allowed_permissions) nothrow cont;
15529     extern(System) void function (cef_media_access_callback_t* self) nothrow cancel;
15530 }
15531 
15532  ///
15533 /// Callback structure used for asynchronous continuation of permission prompts.
15534 ///
15535 struct cef_permission_prompt_callback_t
15536 {
15537     ///
15538     /// Base structure.
15539     ///
15540     cef_base_ref_counted_t base;
15541 
15542     ///
15543     /// Complete the permissions request with the specified |result|.
15544     ///
15545     extern(System) void function (
15546         cef_permission_prompt_callback_t* self,
15547         cef_permission_request_result_t result) nothrow cont;
15548 }
15549 
15550 
15551 
15552 ///
15553 /// Implement this structure to handle events related to permission requests.
15554 /// The functions of this structure will be called on the browser process UI
15555 /// thread.
15556 ///
15557 struct cef_permission_handler_t
15558 {
15559     ///
15560     /// Base structure.
15561     ///
15562     cef_base_ref_counted_t base;
15563 
15564     ///
15565     /// Called when a page requests permission to access media.
15566     /// |requesting_origin| is the URL origin requesting permission.
15567     /// |requested_permissions| is a combination of values from
15568     /// cef_media_access_permission_types_t that represent the requested
15569     /// permissions. Return true (1) and call cef_media_access_callback_t
15570     /// functions either in this function or at a later time to continue or cancel
15571     /// the request. Return false (0) to proceed with default handling. With the
15572     /// Chrome runtime, default handling will display the permission request UI.
15573     /// With the Alloy runtime, default handling will deny the request. This
15574     /// function will not be called if the "--enable-media-stream" command-line
15575     /// switch is used to grant all permissions.
15576     ///
15577     extern(System) int function (
15578         cef_permission_handler_t* self,
15579         cef_browser_t* browser,
15580         cef_frame_t* frame,
15581         const(cef_string_t)* requesting_origin,
15582         uint requested_permissions,
15583         cef_media_access_callback_t* callback) nothrow on_request_media_access_permission;
15584 
15585     ///
15586     /// Called when a page should show a permission prompt. |prompt_id| uniquely
15587     /// identifies the prompt. |requesting_origin| is the URL origin requesting
15588     /// permission. |requested_permissions| is a combination of values from
15589     /// cef_permission_request_types_t that represent the requested permissions.
15590     /// Return true (1) and call cef_permission_prompt_callback_t::Continue either
15591     /// in this function or at a later time to continue or cancel the request.
15592     /// Return false (0) to proceed with default handling. With the Chrome
15593     /// runtime, default handling will display the permission prompt UI. With the
15594     /// Alloy runtime, default handling is CEF_PERMISSION_RESULT_IGNORE.
15595     ///
15596     extern(System) int function (
15597         cef_permission_handler_t* self,
15598         cef_browser_t* browser,
15599         ulong prompt_id,
15600         const(cef_string_t)* requesting_origin,
15601         uint requested_permissions,
15602         cef_permission_prompt_callback_t* callback) nothrow on_show_permission_prompt;
15603 
15604     ///
15605     /// Called when a permission prompt handled via OnShowPermissionPrompt is
15606     /// dismissed. |prompt_id| will match the value that was passed to
15607     /// OnShowPermissionPrompt. |result| will be the value passed to
15608     /// cef_permission_prompt_callback_t::Continue or CEF_PERMISSION_RESULT_IGNORE
15609     /// if the dialog was dismissed for other reasons such as navigation, browser
15610     /// closure, etc. This function will not be called if OnShowPermissionPrompt
15611     /// returned false (0) for |prompt_id|.
15612     ///
15613     extern(System) void function (
15614         cef_permission_handler_t* self,
15615         cef_browser_t* browser,
15616         ulong prompt_id,
15617         cef_permission_request_result_t result) nothrow on_dismiss_permission_prompt;
15618 }
15619 
15620 
15621 
15622 // CEF_INCLUDE_CAPI_CEF_PERMISSION_HANDLER_CAPI_H_
15623 // Copyright (c) 2024 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=1c0e469a283538945834404bcd5934b9bb9a0756$
15659 //
15660 
15661 extern (C):
15662 
15663 ///
15664 /// Structure that manages custom preference registrations.
15665 ///
15666 struct cef_preference_registrar_t
15667 {
15668     ///
15669     /// Base structure.
15670     ///
15671 
15672     ///
15673     /// Register a preference with the specified |name| and |default_value|. To
15674     /// avoid conflicts with built-in preferences the |name| value should contain
15675     /// an application-specific prefix followed by a period (e.g. "myapp.value").
15676     /// The contents of |default_value| will be copied. The data type for the
15677     /// preference will be inferred from |default_value|'s type and cannot be
15678     /// changed after registration. Returns true (1) on success. Returns false (0)
15679     /// if |name| is already registered or if |default_value| has an invalid type.
15680     /// This function must be called from within the scope of the
15681     /// cef_browser_process_handler_t::OnRegisterCustomPreferences callback.
15682     ///
15683 
15684     ///
15685     /// Manage access to preferences. Many built-in preferences are registered by
15686     /// Chromium. Custom preferences can be registered in
15687 
15688     cef_base_scoped_t base;
15689     extern(System) int function (
15690         cef_preference_registrar_t* self,
15691         const(cef_string_t)* name,
15692         cef_value_t* default_value) nothrow add_preference;
15693 }
15694 
15695 
15696 /// cef_browser_process_handler_t::OnRegisterCustomPreferences.
15697 ///
15698 struct cef_preference_manager_t
15699 {
15700     ///
15701     /// Base structure.
15702     ///
15703 
15704     cef_base_ref_counted_t base;
15705 
15706     ///
15707     /// Returns true (1) if a preference with the specified |name| exists. This
15708     /// function must be called on the browser process UI thread.
15709     ///
15710     extern(System) int function (
15711         cef_preference_manager_t* self,
15712         const(cef_string_t)* name) nothrow has_preference;
15713 
15714     ///
15715     /// Returns the value for the preference with the specified |name|. Returns
15716     /// NULL if the preference does not exist. The returned object contains a copy
15717     /// of the underlying preference value and modifications to the returned
15718     /// object will not modify the underlying preference value. This function must
15719     /// be called on the browser process UI thread.
15720     ///
15721     extern(System) cef_value_t* function (
15722         cef_preference_manager_t* self,
15723         const(cef_string_t)* name) nothrow get_preference;
15724 
15725     ///
15726     /// Returns all preferences as a dictionary. If |include_defaults| is true (1)
15727     /// then preferences currently at their default value will be included. The
15728     /// returned object contains a copy of the underlying preference values and
15729     /// modifications to the returned object will not modify the underlying
15730     /// preference values. This function must be called on the browser process UI
15731     /// thread.
15732     ///
15733     extern(System) cef_dictionary_value_t* function (
15734         cef_preference_manager_t* self,
15735         int include_defaults) nothrow get_all_preferences;
15736 
15737     ///
15738     /// Returns true (1) if the preference with the specified |name| can be
15739     /// modified using SetPreference. As one example preferences set via the
15740     /// command-line usually cannot be modified. This function must be called on
15741     /// the browser process UI thread.
15742     ///
15743     extern(System) int function (
15744         cef_preference_manager_t* self,
15745         const(cef_string_t)* name) nothrow can_set_preference;
15746 
15747     ///
15748     /// Set the |value| associated with preference |name|. Returns true (1) if the
15749     /// value is set successfully and false (0) otherwise. If |value| is NULL the
15750     /// preference will be restored to its default value. If setting the
15751     /// preference fails then |error| will be populated with a detailed
15752     /// description of the problem. This function must be called on the browser
15753     /// process UI thread.
15754     ///
15755     extern(System) int function (
15756         cef_preference_manager_t* self,
15757         const(cef_string_t)* name,
15758         cef_value_t* value,
15759         cef_string_t* error) nothrow set_preference;
15760 }
15761 
15762 
15763 
15764 ///
15765 /// Returns the global preference manager object.
15766 ///
15767 cef_preference_manager_t* cef_preference_manager_get_global ();
15768 
15769 // CEF_INCLUDE_CAPI_CEF_PREFERENCE_CAPI_H_
15770 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
15771 //
15772 // Redistribution and use in source and binary forms, with or without
15773 // modification, are permitted provided that the following conditions are
15774 // met:
15775 //
15776 //    * Redistributions of source code must retain the above copyright
15777 // notice, this list of conditions and the following disclaimer.
15778 //    * Redistributions in binary form must reproduce the above
15779 // copyright notice, this list of conditions and the following disclaimer
15780 // in the documentation and/or other materials provided with the
15781 // distribution.
15782 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15783 // Framework nor the names of its contributors may be used to endorse
15784 // or promote products derived from this software without specific prior
15785 // written permission.
15786 //
15787 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15788 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15789 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15790 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15791 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15792 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15793 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15794 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15795 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15796 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15797 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15798 //
15799 // ---------------------------------------------------------------------------
15800 //
15801 // This file was generated by the CEF translator tool and should not edited
15802 // by hand. See the translator.README.txt file in the tools directory for
15803 // more information.
15804 //
15805 // $hash=96d5b6c0dc8f2575e686fb79684c63787cdfe876$
15806 //
15807 
15808 extern (C):
15809 
15810 ///
15811 /// Callback structure for asynchronous continuation of print dialog requests.
15812 ///
15813 struct cef_print_dialog_callback_t
15814 {
15815     ///
15816     /// Base structure.
15817     ///
15818 
15819     ///
15820     /// Continue printing with the specified |settings|.
15821     ///
15822 
15823     ///
15824     /// Cancel the printing.
15825     ///
15826 
15827     ///
15828     /// Callback structure for asynchronous continuation of print job requests.
15829     ///
15830 
15831     ///
15832     /// Base structure.
15833     ///
15834 
15835     ///
15836     /// Indicate completion of the print job.
15837     ///
15838 
15839     cef_base_ref_counted_t base;
15840     extern(System) void function (
15841         cef_print_dialog_callback_t* self,
15842         cef_print_settings_t* settings) nothrow cont;
15843     extern(System) void function (cef_print_dialog_callback_t* self) nothrow cancel;
15844 }
15845 
15846 
15847 
15848 struct cef_print_job_callback_t
15849 {
15850     cef_base_ref_counted_t base;
15851     extern(System) void function (cef_print_job_callback_t* self) nothrow cont;
15852 }
15853 
15854 
15855 
15856 ///
15857 /// Implement this structure to handle printing on Linux. Each browser will have
15858 /// only one print job in progress at a time. The functions of this structure
15859 /// will be called on the browser process UI thread.
15860 ///
15861 struct cef_print_handler_t
15862 {
15863     ///
15864     /// Base structure.
15865     ///
15866     cef_base_ref_counted_t base;
15867 
15868     ///
15869     /// Called when printing has started for the specified |browser|. This
15870     /// function will be called before the other OnPrint*() functions and
15871     /// irrespective of how printing was initiated (e.g.
15872     /// cef_browser_host_t::print(), JavaScript window.print() or PDF extension
15873     /// print button).
15874     ///
15875     extern(System) void function (
15876         cef_print_handler_t* self,
15877         cef_browser_t* browser) nothrow on_print_start;
15878 
15879     ///
15880     /// Synchronize |settings| with client state. If |get_defaults| is true (1)
15881     /// then populate |settings| with the default print settings. Do not keep a
15882     /// reference to |settings| outside of this callback.
15883     ///
15884     extern(System) void function (
15885         cef_print_handler_t* self,
15886         cef_browser_t* browser,
15887         cef_print_settings_t* settings,
15888         int get_defaults) nothrow on_print_settings;
15889 
15890     ///
15891     /// Show the print dialog. Execute |callback| once the dialog is dismissed.
15892     /// Return true (1) if the dialog will be displayed or false (0) to cancel the
15893     /// printing immediately.
15894     ///
15895     extern(System) int function (
15896         cef_print_handler_t* self,
15897         cef_browser_t* browser,
15898         int has_selection,
15899         cef_print_dialog_callback_t* callback) nothrow on_print_dialog;
15900 
15901     ///
15902     /// Send the print job to the printer. Execute |callback| once the job is
15903     /// completed. Return true (1) if the job will proceed or false (0) to cancel
15904     /// the job immediately.
15905     ///
15906     extern(System) int function (
15907         cef_print_handler_t* self,
15908         cef_browser_t* browser,
15909         const(cef_string_t)* document_name,
15910         const(cef_string_t)* pdf_file_path,
15911         cef_print_job_callback_t* callback) nothrow on_print_job;
15912 
15913     ///
15914     /// Reset client state related to printing.
15915     ///
15916     extern(System) void function (
15917         cef_print_handler_t* self,
15918         cef_browser_t* browser) nothrow on_print_reset;
15919 
15920     ///
15921     /// Return the PDF paper size in device units. Used in combination with
15922     /// cef_browser_host_t::print_to_pdf().
15923     ///
15924     extern(System) cef_size_t function (
15925         cef_print_handler_t* self,
15926         cef_browser_t* browser,
15927         int device_units_per_inch) nothrow get_pdf_paper_size;
15928 }
15929 
15930 
15931 
15932 // CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
15933 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
15934 //
15935 // Redistribution and use in source and binary forms, with or without
15936 // modification, are permitted provided that the following conditions are
15937 // met:
15938 //
15939 //    * Redistributions of source code must retain the above copyright
15940 // notice, this list of conditions and the following disclaimer.
15941 //    * Redistributions in binary form must reproduce the above
15942 // copyright notice, this list of conditions and the following disclaimer
15943 // in the documentation and/or other materials provided with the
15944 // distribution.
15945 //    * Neither the name of Google Inc. nor the name Chromium Embedded
15946 // Framework nor the names of its contributors may be used to endorse
15947 // or promote products derived from this software without specific prior
15948 // written permission.
15949 //
15950 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15951 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15952 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15953 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
15954 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15955 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15956 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
15957 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
15958 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15959 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15960 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15961 //
15962 // ---------------------------------------------------------------------------
15963 //
15964 // This file was generated by the CEF translator tool and should not edited
15965 // by hand. See the translator.README.txt file in the tools directory for
15966 // more information.
15967 //
15968 // $hash=63977fcbe4567db202914f69539f49b254352053$
15969 //
15970 
15971 extern (C):
15972 
15973 ///
15974 /// Structure representing print settings.
15975 ///
15976 struct cef_print_settings_t
15977 {
15978     ///
15979     /// Base structure.
15980     ///
15981 
15982     ///
15983     /// Returns true (1) if this object is valid. Do not call any other functions
15984     /// if this function returns false (0).
15985     ///
15986 
15987     ///
15988     /// Returns true (1) if the values of this object are read-only. Some APIs may
15989     /// expose read-only objects.
15990     ///
15991 
15992     ///
15993     /// Set the page orientation.
15994     ///
15995 
15996     ///
15997     /// Returns true (1) if the orientation is landscape.
15998     ///
15999 
16000     ///
16001     /// Set the printer printable area in device units. Some platforms already
16002 
16003     cef_base_ref_counted_t base;
16004     extern(System) int function (cef_print_settings_t* self) nothrow is_valid;
16005     extern(System) int function (cef_print_settings_t* self) nothrow is_read_only;
16006     extern(System) void function (cef_print_settings_t* self, int landscape) nothrow set_orientation;
16007     extern(System) int function (cef_print_settings_t* self) nothrow is_landscape;
16008     /// provide flipped area. Set |landscape_needs_flip| to false (0) on those
16009     /// platforms to avoid double flipping.
16010     ///
16011     extern(System) void function (
16012         cef_print_settings_t* self,
16013         const(cef_size_t)* physical_size_device_units,
16014         const(cef_rect_t)* printable_area_device_units,
16015         int landscape_needs_flip) nothrow set_printer_printable_area;
16016 
16017     ///
16018     /// Set the device name.
16019     ///
16020     extern(System) void function (
16021         cef_print_settings_t* self,
16022         const(cef_string_t)* name) nothrow set_device_name;
16023 
16024     ///
16025     /// Get the device name.
16026     ///
16027     // The resulting string must be freed by calling cef_string_userfree_free().
16028     extern(System) cef_string_userfree_t function (
16029         cef_print_settings_t* self) nothrow get_device_name;
16030 
16031     ///
16032     /// Set the DPI (dots per inch).
16033     ///
16034     extern(System) void function (cef_print_settings_t* self, int dpi) nothrow set_dpi;
16035 
16036     ///
16037     /// Get the DPI (dots per inch).
16038     ///
16039     extern(System) int function (cef_print_settings_t* self) nothrow get_dpi;
16040 
16041     ///
16042     /// Set the page ranges.
16043     ///
16044     extern(System) void function (
16045         cef_print_settings_t* self,
16046         size_t rangesCount,
16047         const(cef_range_t)* ranges) nothrow set_page_ranges;
16048 
16049     ///
16050     /// Returns the number of page ranges that currently exist.
16051     ///
16052     extern(System) size_t function (cef_print_settings_t* self) nothrow get_page_ranges_count;
16053 
16054     ///
16055     /// Retrieve the page ranges.
16056     ///
16057     extern(System) void function (
16058         cef_print_settings_t* self,
16059         size_t* rangesCount,
16060         cef_range_t* ranges) nothrow get_page_ranges;
16061 
16062     ///
16063     /// Set whether only the selection will be printed.
16064     ///
16065     extern(System) void function (
16066         cef_print_settings_t* self,
16067         int selection_only) nothrow set_selection_only;
16068 
16069     ///
16070     /// Returns true (1) if only the selection will be printed.
16071     ///
16072     extern(System) int function (cef_print_settings_t* self) nothrow is_selection_only;
16073 
16074     ///
16075     /// Set whether pages will be collated.
16076     ///
16077     extern(System) void function (cef_print_settings_t* self, int collate) nothrow set_collate;
16078 
16079     ///
16080     /// Returns true (1) if pages will be collated.
16081     ///
16082     extern(System) int function (cef_print_settings_t* self) nothrow will_collate;
16083 
16084     ///
16085     /// Set the color model.
16086     ///
16087     extern(System) void function (
16088         cef_print_settings_t* self,
16089         cef_color_model_t model) nothrow set_color_model;
16090 
16091     ///
16092     /// Get the color model.
16093     ///
16094     extern(System) cef_color_model_t function (cef_print_settings_t* self) nothrow get_color_model;
16095 
16096     ///
16097     /// Set the number of copies.
16098     ///
16099     extern(System) void function (cef_print_settings_t* self, int copies) nothrow set_copies;
16100 
16101     ///
16102     /// Get the number of copies.
16103     ///
16104     extern(System) int function (cef_print_settings_t* self) nothrow get_copies;
16105 
16106     ///
16107     /// Set the duplex mode.
16108     ///
16109     extern(System) void function (
16110         cef_print_settings_t* self,
16111         cef_duplex_mode_t mode) nothrow set_duplex_mode;
16112 
16113     ///
16114     /// Get the duplex mode.
16115     ///
16116     extern(System) cef_duplex_mode_t function (cef_print_settings_t* self) nothrow get_duplex_mode;
16117 }
16118 
16119 
16120 
16121 ///
16122 /// Create a new cef_print_settings_t object.
16123 ///
16124 cef_print_settings_t* cef_print_settings_create ();
16125 
16126 // CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_
16127 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
16128 //
16129 // Redistribution and use in source and binary forms, with or without
16130 // modification, are permitted provided that the following conditions are
16131 // met:
16132 //
16133 //    * Redistributions of source code must retain the above copyright
16134 // notice, this list of conditions and the following disclaimer.
16135 //    * Redistributions in binary form must reproduce the above
16136 // copyright notice, this list of conditions and the following disclaimer
16137 // in the documentation and/or other materials provided with the
16138 // distribution.
16139 //    * Neither the name of Google Inc. nor the name Chromium Embedded
16140 // Framework nor the names of its contributors may be used to endorse
16141 // or promote products derived from this software without specific prior
16142 // written permission.
16143 //
16144 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16145 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16146 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16147 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16148 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16149 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16150 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
16151 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
16152 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
16153 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16154 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16155 //
16156 // ---------------------------------------------------------------------------
16157 //
16158 // This file was generated by the CEF translator tool and should not edited
16159 // by hand. See the translator.README.txt file in the tools directory for
16160 // more information.
16161 //
16162 // $hash=89c569df7e5e4a6035d4527218ce4dc1d68e20f0$
16163 //
16164 
16165 extern (C):
16166 
16167 ///
16168 /// Structure representing a message. Can be used on any process and thread.
16169 ///
16170 struct cef_process_message_t
16171 {
16172     ///
16173     /// Base structure.
16174     ///
16175 
16176     ///
16177     /// Returns true (1) if this object is valid. Do not call any other functions
16178     /// if this function returns false (0).
16179     ///
16180 
16181     ///
16182     /// Returns true (1) if the values of this object are read-only. Some APIs may
16183     /// expose read-only objects.
16184     ///
16185 
16186     ///
16187     /// Returns a writable copy of this object. Returns nullptr when message
16188     /// contains a shared memory region.
16189     ///
16190 
16191     cef_base_ref_counted_t base;
16192     extern(System) int function (cef_process_message_t* self) nothrow is_valid;
16193     extern(System) int function (cef_process_message_t* self) nothrow is_read_only;
16194     extern(System) cef_process_message_t* function (cef_process_message_t* self) nothrow copy;
16195 
16196     ///
16197     /// Returns the message name.
16198     ///
16199     // The resulting string must be freed by calling cef_string_userfree_free().
16200     extern(System) cef_string_userfree_t function (cef_process_message_t* self) nothrow get_name;
16201 
16202     ///
16203     /// Returns the list of arguments. Returns nullptr when message contains a
16204     /// shared memory region.
16205     ///
16206     extern(System) cef_list_value_t* function (
16207         cef_process_message_t* self) nothrow get_argument_list;
16208 
16209     ///
16210     /// Returns the shared memory region. Returns nullptr when message contains an
16211     /// argument list.
16212     ///
16213     extern(System) cef_shared_memory_region_t* function (
16214         cef_process_message_t* self) nothrow get_shared_memory_region;
16215 }
16216 
16217 
16218 
16219 ///
16220 /// Create a new cef_process_message_t object with the specified name.
16221 ///
16222 cef_process_message_t* cef_process_message_create (const(cef_string_t)* name);
16223 
16224 // CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_
16225 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
16226 //
16227 // Redistribution and use in source and binary forms, with or without
16228 // modification, are permitted provided that the following conditions are
16229 // met:
16230 //
16231 //    * Redistributions of source code must retain the above copyright
16232 // notice, this list of conditions and the following disclaimer.
16233 //    * Redistributions in binary form must reproduce the above
16234 // copyright notice, this list of conditions and the following disclaimer
16235 // in the documentation and/or other materials provided with the
16236 // distribution.
16237 //    * Neither the name of Google Inc. nor the name Chromium Embedded
16238 // Framework nor the names of its contributors may be used to endorse
16239 // or promote products derived from this software without specific prior
16240 // written permission.
16241 //
16242 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16243 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16244 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16245 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16246 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16247 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16248 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
16249 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
16250 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
16251 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16252 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16253 //
16254 // ---------------------------------------------------------------------------
16255 //
16256 // This file was generated by the CEF translator tool and should not edited
16257 // by hand. See the translator.README.txt file in the tools directory for
16258 // more information.
16259 //
16260 // $hash=a61a639c7e53ecd9481eae363bac557055f0442e$
16261 //
16262 
16263 extern (C):
16264 
16265 ///
16266 /// Launches the process specified via |command_line|. Returns true (1) upon
16267 /// success. Must be called on the browser process TID_PROCESS_LAUNCHER thread.
16268 ///
16269 /// Unix-specific notes:
16270 /// - All file descriptors open in the parent process will be closed in the
16271 ///   child process except for stdin, stdout, and stderr.
16272 /// - If the first argument on the command line does not contain a slash, PATH
16273 ///   will be searched. (See man execvp.)
16274 ///
16275 int cef_launch_process (cef_command_line_t* command_line);
16276 
16277 // CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_
16278 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
16279 //
16280 // Redistribution and use in source and binary forms, with or without
16281 // modification, are permitted provided that the following conditions are
16282 // met:
16283 //
16284 //    * Redistributions of source code must retain the above copyright
16285 // notice, this list of conditions and the following disclaimer.
16286 //    * Redistributions in binary form must reproduce the above
16287 // copyright notice, this list of conditions and the following disclaimer
16288 // in the documentation and/or other materials provided with the
16289 // distribution.
16290 //    * Neither the name of Google Inc. nor the name Chromium Embedded
16291 // Framework nor the names of its contributors may be used to endorse
16292 // or promote products derived from this software without specific prior
16293 // written permission.
16294 //
16295 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16296 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16297 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16298 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16299 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16300 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16301 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
16302 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
16303 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
16304 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16305 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16306 //
16307 // ---------------------------------------------------------------------------
16308 //
16309 // This file was generated by the CEF translator tool and should not edited
16310 // by hand. See the translator.README.txt file in the tools directory for
16311 // more information.
16312 //
16313 // $hash=c53a67bbf1497a51766bf03040714b5edb2117d5$
16314 //
16315 
16316 extern (C):
16317 
16318 ///
16319 /// Generic callback structure used for managing the lifespan of a registration.
16320 ///
16321 struct cef_registration_t
16322 {
16323     ///
16324     /// Base structure.
16325     ///
16326 
16327     // CEF_INCLUDE_CAPI_CEF_REGISTRATION_CAPI_H_
16328 
16329     cef_base_ref_counted_t base;
16330 }
16331 
16332 
16333 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
16334 //
16335 // Redistribution and use in source and binary forms, with or without
16336 // modification, are permitted provided that the following conditions are
16337 // met:
16338 //
16339 //    * Redistributions of source code must retain the above copyright
16340 // notice, this list of conditions and the following disclaimer.
16341 //    * Redistributions in binary form must reproduce the above
16342 // copyright notice, this list of conditions and the following disclaimer
16343 // in the documentation and/or other materials provided with the
16344 // distribution.
16345 //    * Neither the name of Google Inc. nor the name Chromium Embedded
16346 // Framework nor the names of its contributors may be used to endorse
16347 // or promote products derived from this software without specific prior
16348 // written permission.
16349 //
16350 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16351 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16352 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16353 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16354 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16355 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16356 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
16357 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
16358 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
16359 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16360 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16361 //
16362 // ---------------------------------------------------------------------------
16363 //
16364 // This file was generated by the CEF translator tool and should not edited
16365 // by hand. See the translator.README.txt file in the tools directory for
16366 // more information.
16367 //
16368 // $hash=5151b6ea3c06e46a75f2cd7679044a2891063d29$
16369 //
16370 
16371 extern (C):
16372 
16373 ///
16374 /// Implement this structure to handle events when window rendering is disabled.
16375 /// The functions of this structure will be called on the UI thread.
16376 ///
16377 struct cef_render_handler_t
16378 {
16379     ///
16380     /// Base structure.
16381     ///
16382 
16383     ///
16384     /// Return the handler for accessibility notifications. If no handler is
16385     /// provided the default implementation will be used.
16386     ///
16387 
16388     ///
16389     /// Called to retrieve the root window rectangle in screen DIP coordinates.
16390     /// Return true (1) if the rectangle was provided. If this function returns
16391     /// false (0) the rectangle from GetViewRect will be used.
16392 
16393     cef_base_ref_counted_t base;
16394     extern(System) cef_accessibility_handler_t* function (
16395         cef_render_handler_t* self) nothrow get_accessibility_handler;
16396     ///
16397     extern(System) int function (
16398         cef_render_handler_t* self,
16399         cef_browser_t* browser,
16400         cef_rect_t* rect) nothrow get_root_screen_rect;
16401 
16402     ///
16403     /// Called to retrieve the view rectangle in screen DIP coordinates. This
16404     /// function must always provide a non-NULL rectangle.
16405     ///
16406     extern(System) void function (
16407         cef_render_handler_t* self,
16408         cef_browser_t* browser,
16409         cef_rect_t* rect) nothrow get_view_rect;
16410 
16411     ///
16412     /// Called to retrieve the translation from view DIP coordinates to screen
16413     /// coordinates. Windows/Linux should provide screen device (pixel)
16414     /// coordinates and MacOS should provide screen DIP coordinates. Return true
16415     /// (1) if the requested coordinates were provided.
16416     ///
16417     extern(System) int function (
16418         cef_render_handler_t* self,
16419         cef_browser_t* browser,
16420         int viewX,
16421         int viewY,
16422         int* screenX,
16423         int* screenY) nothrow get_screen_point;
16424 
16425     ///
16426     /// Called to allow the client to fill in the CefScreenInfo object with
16427     /// appropriate values. Return true (1) if the |screen_info| structure has
16428     /// been modified.
16429     ///
16430     /// If the screen info rectangle is left NULL the rectangle from GetViewRect
16431     /// will be used. If the rectangle is still NULL or invalid popups may not be
16432     /// drawn correctly.
16433     ///
16434     extern(System) int function (
16435         cef_render_handler_t* self,
16436         cef_browser_t* browser,
16437         cef_screen_info_t* screen_info) nothrow get_screen_info;
16438 
16439     ///
16440     /// Called when the browser wants to show or hide the popup widget. The popup
16441     /// should be shown if |show| is true (1) and hidden if |show| is false (0).
16442     ///
16443     extern(System) void function (
16444         cef_render_handler_t* self,
16445         cef_browser_t* browser,
16446         int show) nothrow on_popup_show;
16447 
16448     ///
16449     /// Called when the browser wants to move or resize the popup widget. |rect|
16450     /// contains the new location and size in view coordinates.
16451     ///
16452     extern(System) void function (
16453         cef_render_handler_t* self,
16454         cef_browser_t* browser,
16455         const(cef_rect_t)* rect) nothrow on_popup_size;
16456 
16457     ///
16458     /// Called when an element should be painted. Pixel values passed to this
16459     /// function are scaled relative to view coordinates based on the value of
16460     /// CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type|
16461     /// indicates whether the element is the view or the popup widget. |buffer|
16462     /// contains the pixel data for the whole image. |dirtyRects| contains the set
16463     /// of rectangles in pixel coordinates that need to be repainted. |buffer|
16464     /// will be |width|*|height|*4 bytes in size and represents a BGRA image with
16465     /// an upper-left origin. This function is only called when
16466     /// cef_window_tInfo::shared_texture_enabled is set to false (0).
16467     ///
16468     extern(System) void function (
16469         cef_render_handler_t* self,
16470         cef_browser_t* browser,
16471         cef_paint_element_type_t type,
16472         size_t dirtyRectsCount,
16473         const(cef_rect_t)* dirtyRects,
16474         const(void)* buffer,
16475         int width,
16476         int height) nothrow on_paint;
16477 
16478     ///
16479     /// Called when an element has been rendered to the shared texture handle.
16480     /// |type| indicates whether the element is the view or the popup widget.
16481     /// |dirtyRects| contains the set of rectangles in pixel coordinates that need
16482     /// to be repainted. |info| contains the shared handle; on Windows it is a
16483     /// HANDLE to a texture that can be opened with D3D11 OpenSharedResource, on
16484     /// macOS it is an IOSurface pointer that can be opened with Metal or OpenGL,
16485     /// and on Linux it contains several planes, each with an fd to the underlying
16486     /// system native buffer.
16487     ///
16488     /// The underlying implementation uses a pool to deliver frames. As a result,
16489     /// the handle may differ every frame depending on how many frames are in-
16490     /// progress. The handle's resource cannot be cached and cannot be accessed
16491     /// outside of this callback. It should be reopened each time this callback is
16492     /// executed and the contents should be copied to a texture owned by the
16493     /// client application. The contents of |info| will be released back to the
16494     /// pool after this callback returns.
16495     ///
16496     extern(System) void function (
16497         cef_render_handler_t* self,
16498         cef_browser_t* browser,
16499         cef_paint_element_type_t type,
16500         size_t dirtyRectsCount,
16501         const(cef_rect_t)* dirtyRects,
16502         const(cef_accelerated_paint_info_t)* info) nothrow on_accelerated_paint;
16503 
16504     ///
16505     /// Called to retrieve the size of the touch handle for the specified
16506     /// |orientation|.
16507     ///
16508     extern(System) void function (
16509         cef_render_handler_t* self,
16510         cef_browser_t* browser,
16511         cef_horizontal_alignment_t orientation,
16512         cef_size_t* size) nothrow get_touch_handle_size;
16513 
16514     ///
16515     /// Called when touch handle state is updated. The client is responsible for
16516     /// rendering the touch handles.
16517     ///
16518     extern(System) void function (
16519         cef_render_handler_t* self,
16520         cef_browser_t* browser,
16521         const(cef_touch_handle_state_t)* state) nothrow on_touch_handle_state_changed;
16522 
16523     ///
16524     /// Called when the user starts dragging content in the web view. Contextual
16525     /// information about the dragged content is supplied by |drag_data|. (|x|,
16526     /// |y|) is the drag start location in screen coordinates. OS APIs that run a
16527     /// system message loop may be used within the StartDragging call.
16528     ///
16529     /// Return false (0) to abort the drag operation. Don't call any of
16530     /// cef_browser_host_t::DragSource*Ended* functions after returning false (0).
16531     ///
16532     /// Return true (1) to handle the drag operation. Call
16533     /// cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either
16534     /// synchronously or asynchronously to inform the web view that the drag
16535     /// operation has ended.
16536     ///
16537     extern(System) int function (
16538         cef_render_handler_t* self,
16539         cef_browser_t* browser,
16540         cef_drag_data_t* drag_data,
16541         cef_drag_operations_mask_t allowed_ops,
16542         int x,
16543         int y) nothrow start_dragging;
16544 
16545     ///
16546     /// Called when the web view wants to update the mouse cursor during a drag &
16547     /// drop operation. |operation| describes the allowed operation (none, move,
16548     /// copy, link).
16549     ///
16550     extern(System) void function (
16551         cef_render_handler_t* self,
16552         cef_browser_t* browser,
16553         cef_drag_operations_mask_t operation) nothrow update_drag_cursor;
16554 
16555     ///
16556     /// Called when the scroll offset has changed.
16557     ///
16558     extern(System) void function (
16559         cef_render_handler_t* self,
16560         cef_browser_t* browser,
16561         double x,
16562         double y) nothrow on_scroll_offset_changed;
16563 
16564     ///
16565     /// Called when the IME composition range has changed. |selected_range| is the
16566     /// range of characters that have been selected. |character_bounds| is the
16567     /// bounds of each character in view coordinates.
16568     ///
16569     extern(System) void function (
16570         cef_render_handler_t* self,
16571         cef_browser_t* browser,
16572         const(cef_range_t)* selected_range,
16573         size_t character_boundsCount,
16574         const(cef_rect_t)* character_bounds) nothrow on_ime_composition_range_changed;
16575 
16576     ///
16577     /// Called when text selection has changed for the specified |browser|.
16578     /// |selected_text| is the currently selected text and |selected_range| is the
16579     /// character range.
16580     ///
16581     extern(System) void function (
16582         cef_render_handler_t* self,
16583         cef_browser_t* browser,
16584         const(cef_string_t)* selected_text,
16585         const(cef_range_t)* selected_range) nothrow on_text_selection_changed;
16586 
16587     ///
16588     /// Called when an on-screen keyboard should be shown or hidden for the
16589     /// specified |browser|. |input_mode| specifies what kind of keyboard should
16590     /// be opened. If |input_mode| is CEF_TEXT_INPUT_MODE_NONE, any existing
16591     /// keyboard for this browser should be hidden.
16592     ///
16593     extern(System) void function (
16594         cef_render_handler_t* self,
16595         cef_browser_t* browser,
16596         cef_text_input_mode_t input_mode) nothrow on_virtual_keyboard_requested;
16597 }
16598 
16599 
16600 
16601 // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
16602 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
16603 //
16604 // Redistribution and use in source and binary forms, with or without
16605 // modification, are permitted provided that the following conditions are
16606 // met:
16607 //
16608 //    * Redistributions of source code must retain the above copyright
16609 // notice, this list of conditions and the following disclaimer.
16610 //    * Redistributions in binary form must reproduce the above
16611 // copyright notice, this list of conditions and the following disclaimer
16612 // in the documentation and/or other materials provided with the
16613 // distribution.
16614 //    * Neither the name of Google Inc. nor the name Chromium Embedded
16615 // Framework nor the names of its contributors may be used to endorse
16616 // or promote products derived from this software without specific prior
16617 // written permission.
16618 //
16619 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16620 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16621 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16622 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16623 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16624 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16625 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
16626 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
16627 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
16628 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16629 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16630 //
16631 // ---------------------------------------------------------------------------
16632 //
16633 // This file was generated by the CEF translator tool and should not edited
16634 // by hand. See the translator.README.txt file in the tools directory for
16635 // more information.
16636 //
16637 // $hash=6e2fccb5a8e49918d723f6c5223062cf98b0f9de$
16638 //
16639 
16640 extern (C):
16641 
16642 ///
16643 /// Structure used to implement render process callbacks. The functions of this
16644 /// structure will be called on the render process main thread (TID_RENDERER)
16645 /// unless otherwise indicated.
16646 ///
16647 struct cef_render_process_handler_t
16648 {
16649     ///
16650     /// Base structure.
16651     ///
16652 
16653     ///
16654     /// Called after WebKit has been initialized.
16655     ///
16656 
16657     ///
16658     /// Called after a browser has been created. When browsing cross-origin a new
16659     /// browser will be created before the old browser with the same identifier is
16660 
16661     cef_base_ref_counted_t base;
16662     extern(System) void function (cef_render_process_handler_t* self) nothrow on_web_kit_initialized;
16663     /// destroyed. |extra_info| is an optional read-only value originating from
16664     /// cef_browser_host_t::cef_browser_host_create_browser(),
16665     /// cef_browser_host_t::cef_browser_host_create_browser_sync(),
16666     /// cef_life_span_handler_t::on_before_popup() or
16667     /// cef_browser_view_t::cef_browser_view_create().
16668     ///
16669     extern(System) void function (
16670         cef_render_process_handler_t* self,
16671         cef_browser_t* browser,
16672         cef_dictionary_value_t* extra_info) nothrow on_browser_created;
16673 
16674     ///
16675     /// Called before a browser is destroyed.
16676     ///
16677     extern(System) void function (
16678         cef_render_process_handler_t* self,
16679         cef_browser_t* browser) nothrow on_browser_destroyed;
16680 
16681     ///
16682     /// Return the handler for browser load status events.
16683     ///
16684     extern(System) cef_load_handler_t* function (
16685         cef_render_process_handler_t* self) nothrow get_load_handler;
16686 
16687     ///
16688     /// Called immediately after the V8 context for a frame has been created. To
16689     /// retrieve the JavaScript 'window' object use the
16690     /// cef_v8context_t::get_global() function. V8 handles can only be accessed
16691     /// from the thread on which they are created. A task runner for posting tasks
16692     /// on the associated thread can be retrieved via the
16693     /// cef_v8context_t::get_task_runner() function.
16694     ///
16695     extern(System) void function (
16696         cef_render_process_handler_t* self,
16697         cef_browser_t* browser,
16698         cef_frame_t* frame,
16699         cef_v8context_t* context) nothrow on_context_created;
16700 
16701     ///
16702     /// Called immediately before the V8 context for a frame is released. No
16703     /// references to the context should be kept after this function is called.
16704     ///
16705     extern(System) void function (
16706         cef_render_process_handler_t* self,
16707         cef_browser_t* browser,
16708         cef_frame_t* frame,
16709         cef_v8context_t* context) nothrow on_context_released;
16710 
16711     ///
16712     /// Called for global uncaught exceptions in a frame. Execution of this
16713     /// callback is disabled by default. To enable set
16714     /// cef_settings_t.uncaught_exception_stack_size > 0.
16715     ///
16716     extern(System) void function (
16717         cef_render_process_handler_t* self,
16718         cef_browser_t* browser,
16719         cef_frame_t* frame,
16720         cef_v8context_t* context,
16721         cef_v8exception_t* exception,
16722         cef_v8stack_trace_t* stackTrace) nothrow on_uncaught_exception;
16723 
16724     ///
16725     /// Called when a new node in the the browser gets focus. The |node| value may
16726     /// be NULL if no specific node has gained focus. The node object passed to
16727     /// this function represents a snapshot of the DOM at the time this function
16728     /// is executed. DOM objects are only valid for the scope of this function. Do
16729     /// not keep references to or attempt to access any DOM objects outside the
16730     /// scope of this function.
16731     ///
16732     extern(System) void function (
16733         cef_render_process_handler_t* self,
16734         cef_browser_t* browser,
16735         cef_frame_t* frame,
16736         cef_domnode_t* node) nothrow on_focused_node_changed;
16737 
16738     ///
16739     /// Called when a new message is received from a different process. Return
16740     /// true (1) if the message was handled or false (0) otherwise. It is safe to
16741     /// keep a reference to |message| outside of this callback.
16742     ///
16743     extern(System) int function (
16744         cef_render_process_handler_t* self,
16745         cef_browser_t* browser,
16746         cef_frame_t* frame,
16747         cef_process_id_t source_process,
16748         cef_process_message_t* message) nothrow on_process_message_received;
16749 }
16750 
16751 
16752 
16753 // CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_
16754 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
16755 //
16756 // Redistribution and use in source and binary forms, with or without
16757 // modification, are permitted provided that the following conditions are
16758 // met:
16759 //
16760 //    * Redistributions of source code must retain the above copyright
16761 // notice, this list of conditions and the following disclaimer.
16762 //    * Redistributions in binary form must reproduce the above
16763 // copyright notice, this list of conditions and the following disclaimer
16764 // in the documentation and/or other materials provided with the
16765 // distribution.
16766 //    * Neither the name of Google Inc. nor the name Chromium Embedded
16767 // Framework nor the names of its contributors may be used to endorse
16768 // or promote products derived from this software without specific prior
16769 // written permission.
16770 //
16771 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16772 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16773 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16774 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16775 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16776 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16777 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
16778 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
16779 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
16780 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16781 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16782 //
16783 // ---------------------------------------------------------------------------
16784 //
16785 // This file was generated by the CEF translator tool and should not edited
16786 // by hand. See the translator.README.txt file in the tools directory for
16787 // more information.
16788 //
16789 // $hash=14ce483864835eca476d08d39ed4236fbd1a874c$
16790 //
16791 
16792 extern (C):
16793 
16794 ///
16795 /// Structure used to represent a web request. The functions of this structure
16796 /// may be called on any thread.
16797 ///
16798 struct cef_request_t
16799 {
16800     ///
16801     /// Base structure.
16802     ///
16803 
16804     ///
16805     /// Returns true (1) if this object is read-only.
16806     ///
16807 
16808     ///
16809     /// Get the fully qualified URL.
16810     ///
16811     // The resulting string must be freed by calling cef_string_userfree_free().
16812 
16813     ///
16814     /// Set the fully qualified URL.
16815     ///
16816 
16817     ///
16818     /// Get the request function type. The value will default to POST if post data
16819     /// is provided and GET otherwise.
16820     ///
16821     // The resulting string must be freed by calling cef_string_userfree_free().
16822 
16823     cef_base_ref_counted_t base;
16824     extern(System) int function (cef_request_t* self) nothrow is_read_only;
16825     extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_url;
16826     extern(System) void function (cef_request_t* self, const(cef_string_t)* url) nothrow set_url;
16827     extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_method;
16828 
16829     ///
16830     /// Set the request function type.
16831     ///
16832     extern(System) void function (
16833         cef_request_t* self,
16834         const(cef_string_t)* method) nothrow set_method;
16835 
16836     ///
16837     /// Set the referrer URL and policy. If non-NULL the referrer URL must be
16838     /// fully qualified with an HTTP or HTTPS scheme component. Any username,
16839     /// password or ref component will be removed.
16840     ///
16841     extern(System) void function (
16842         cef_request_t* self,
16843         const(cef_string_t)* referrer_url,
16844         cef_referrer_policy_t policy) nothrow set_referrer;
16845 
16846     ///
16847     /// Get the referrer URL.
16848     ///
16849     // The resulting string must be freed by calling cef_string_userfree_free().
16850     extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_referrer_url;
16851 
16852     ///
16853     /// Get the referrer policy.
16854     ///
16855     extern(System) cef_referrer_policy_t function (cef_request_t* self) nothrow get_referrer_policy;
16856 
16857     ///
16858     /// Get the post data.
16859     ///
16860     extern(System) cef_post_data_t* function (cef_request_t* self) nothrow get_post_data;
16861 
16862     ///
16863     /// Set the post data.
16864     ///
16865     extern(System) void function (
16866         cef_request_t* self,
16867         cef_post_data_t* postData) nothrow set_post_data;
16868 
16869     ///
16870     /// Get the header values. Will not include the Referer value if any.
16871     ///
16872     extern(System) void function (
16873         cef_request_t* self,
16874         cef_string_multimap_t headerMap) nothrow get_header_map;
16875 
16876     ///
16877     /// Set the header values. If a Referer value exists in the header map it will
16878     /// be removed and ignored.
16879     ///
16880     extern(System) void function (
16881         cef_request_t* self,
16882         cef_string_multimap_t headerMap) nothrow set_header_map;
16883 
16884     ///
16885     /// Returns the first header value for |name| or an NULL string if not found.
16886     /// Will not return the Referer value if any. Use GetHeaderMap instead if
16887     /// |name| might have multiple values.
16888     ///
16889     // The resulting string must be freed by calling cef_string_userfree_free().
16890     extern(System) cef_string_userfree_t function (
16891         cef_request_t* self,
16892         const(cef_string_t)* name) nothrow get_header_by_name;
16893 
16894     ///
16895     /// Set the header |name| to |value|. If |overwrite| is true (1) any existing
16896     /// values will be replaced with the new value. If |overwrite| is false (0)
16897     /// any existing values will not be overwritten. The Referer value cannot be
16898     /// set using this function.
16899     ///
16900     extern(System) void function (
16901         cef_request_t* self,
16902         const(cef_string_t)* name,
16903         const(cef_string_t)* value,
16904         int overwrite) nothrow set_header_by_name;
16905 
16906     ///
16907     /// Set all values at one time.
16908     ///
16909     extern(System) void function (
16910         cef_request_t* self,
16911         const(cef_string_t)* url,
16912         const(cef_string_t)* method,
16913         cef_post_data_t* postData,
16914         cef_string_multimap_t headerMap) nothrow set;
16915 
16916     ///
16917     /// Get the flags used in combination with cef_urlrequest_t. See
16918     /// cef_urlrequest_flags_t for supported values.
16919     ///
16920     extern(System) int function (cef_request_t* self) nothrow get_flags;
16921 
16922     ///
16923     /// Set the flags used in combination with cef_urlrequest_t.  See
16924     /// cef_urlrequest_flags_t for supported values.
16925     ///
16926     extern(System) void function (cef_request_t* self, int flags) nothrow set_flags;
16927 
16928     ///
16929     /// Get the URL to the first party for cookies used in combination with
16930     /// cef_urlrequest_t.
16931     ///
16932     // The resulting string must be freed by calling cef_string_userfree_free().
16933     extern(System) cef_string_userfree_t function (
16934         cef_request_t* self) nothrow get_first_party_for_cookies;
16935 
16936     ///
16937     /// Set the URL to the first party for cookies used in combination with
16938     /// cef_urlrequest_t.
16939     ///
16940     extern(System) void function (
16941         cef_request_t* self,
16942         const(cef_string_t)* url) nothrow set_first_party_for_cookies;
16943 
16944     ///
16945     /// Get the resource type for this request. Only available in the browser
16946     /// process.
16947     ///
16948     extern(System) cef_resource_type_t function (cef_request_t* self) nothrow get_resource_type;
16949 
16950     ///
16951     /// Get the transition type for this request. Only available in the browser
16952     /// process and only applies to requests that represent a main frame or sub-
16953     /// frame navigation.
16954     ///
16955     extern(System) cef_transition_type_t function (cef_request_t* self) nothrow get_transition_type;
16956 
16957     ///
16958     /// Returns the globally unique identifier for this request or 0 if not
16959     /// specified. Can be used by cef_resource_request_handler_t implementations
16960     /// in the browser process to track a single request across multiple
16961     /// callbacks.
16962     ///
16963     extern(System) ulong function (cef_request_t* self) nothrow get_identifier;
16964 }
16965 
16966 
16967 
16968 ///
16969 /// Create a new cef_request_t object.
16970 ///
16971 cef_request_t* cef_request_create ();
16972 
16973 ///
16974 /// Structure used to represent post data for a web request. The functions of
16975 /// this structure may be called on any thread.
16976 ///
16977 struct cef_post_data_t
16978 {
16979     ///
16980     /// Base structure.
16981     ///
16982     cef_base_ref_counted_t base;
16983 
16984     ///
16985     /// Returns true (1) if this object is read-only.
16986     ///
16987     extern(System) int function (cef_post_data_t* self) nothrow is_read_only;
16988 
16989     ///
16990     /// Returns true (1) if the underlying POST data includes elements that are
16991     /// not represented by this cef_post_data_t object (for example, multi-part
16992     /// file upload data). Modifying cef_post_data_t objects with excluded
16993     /// elements may result in the request failing.
16994     ///
16995     extern(System) int function (cef_post_data_t* self) nothrow has_excluded_elements;
16996 
16997     ///
16998     /// Returns the number of existing post data elements.
16999     ///
17000     extern(System) size_t function (cef_post_data_t* self) nothrow get_element_count;
17001 
17002     ///
17003     /// Retrieve the post data elements.
17004     ///
17005     extern(System) void function (
17006         cef_post_data_t* self,
17007         size_t* elementsCount,
17008         cef_post_data_element_t** elements) nothrow get_elements;
17009 
17010     ///
17011     /// Remove the specified post data element.  Returns true (1) if the removal
17012     /// succeeds.
17013     ///
17014     extern(System) int function (
17015         cef_post_data_t* self,
17016         cef_post_data_element_t* element) nothrow remove_element;
17017 
17018     ///
17019     /// Add the specified post data element.  Returns true (1) if the add
17020     /// succeeds.
17021     ///
17022     extern(System) int function (
17023         cef_post_data_t* self,
17024         cef_post_data_element_t* element) nothrow add_element;
17025 
17026     ///
17027     /// Remove all existing post data elements.
17028     ///
17029     extern(System) void function (cef_post_data_t* self) nothrow remove_elements;
17030 }
17031 
17032 
17033 
17034 ///
17035 /// Create a new cef_post_data_t object.
17036 ///
17037 cef_post_data_t* cef_post_data_create ();
17038 
17039 ///
17040 /// Structure used to represent a single element in the request post data. The
17041 /// functions of this structure may be called on any thread.
17042 ///
17043 struct cef_post_data_element_t
17044 {
17045     ///
17046     /// Base structure.
17047     ///
17048     cef_base_ref_counted_t base;
17049 
17050     ///
17051     /// Returns true (1) if this object is read-only.
17052     ///
17053     extern(System) int function (cef_post_data_element_t* self) nothrow is_read_only;
17054 
17055     ///
17056     /// Remove all contents from the post data element.
17057     ///
17058     extern(System) void function (cef_post_data_element_t* self) nothrow set_to_empty;
17059 
17060     ///
17061     /// The post data element will represent a file.
17062     ///
17063     extern(System) void function (
17064         cef_post_data_element_t* self,
17065         const(cef_string_t)* fileName) nothrow set_to_file;
17066 
17067     ///
17068     /// The post data element will represent bytes.  The bytes passed in will be
17069     /// copied.
17070     ///
17071     extern(System) void function (
17072         cef_post_data_element_t* self,
17073         size_t size,
17074         const(void)* bytes) nothrow set_to_bytes;
17075 
17076     ///
17077     /// Return the type of this post data element.
17078     ///
17079     extern(System) cef_postdataelement_type_t function (
17080         cef_post_data_element_t* self) nothrow get_type;
17081 
17082     ///
17083     /// Return the file name.
17084     ///
17085     // The resulting string must be freed by calling cef_string_userfree_free().
17086     extern(System) cef_string_userfree_t function (cef_post_data_element_t* self) nothrow get_file;
17087 
17088     ///
17089     /// Return the number of bytes.
17090     ///
17091     extern(System) size_t function (cef_post_data_element_t* self) nothrow get_bytes_count;
17092 
17093     ///
17094     /// Read up to |size| bytes into |bytes| and return the number of bytes
17095     /// actually read.
17096     ///
17097     extern(System) size_t function (
17098         cef_post_data_element_t* self,
17099         size_t size,
17100         void* bytes) nothrow get_bytes;
17101 }
17102 
17103 
17104 
17105 ///
17106 /// Create a new cef_post_data_element_t object.
17107 ///
17108 cef_post_data_element_t* cef_post_data_element_create ();
17109 
17110 // CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_
17111 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
17112 //
17113 // Redistribution and use in source and binary forms, with or without
17114 // modification, are permitted provided that the following conditions are
17115 // met:
17116 //
17117 //    * Redistributions of source code must retain the above copyright
17118 // notice, this list of conditions and the following disclaimer.
17119 //    * Redistributions in binary form must reproduce the above
17120 // copyright notice, this list of conditions and the following disclaimer
17121 // in the documentation and/or other materials provided with the
17122 // distribution.
17123 //    * Neither the name of Google Inc. nor the name Chromium Embedded
17124 // Framework nor the names of its contributors may be used to endorse
17125 // or promote products derived from this software without specific prior
17126 // written permission.
17127 //
17128 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17129 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17130 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17131 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17132 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17133 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17134 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17135 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17136 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17137 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17138 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17139 //
17140 // ---------------------------------------------------------------------------
17141 //
17142 // This file was generated by the CEF translator tool and should not edited
17143 // by hand. See the translator.README.txt file in the tools directory for
17144 // more information.
17145 //
17146 // $hash=2c496139ca9a59303b1493ee93d2c3ae96a956c0$
17147 //
17148 
17149 extern (C):
17150 
17151 
17152 
17153 
17154 ///
17155 /// Callback structure for cef_request_context_t::ResolveHost.
17156 ///
17157 struct cef_resolve_callback_t
17158 {
17159     ///
17160     /// Base structure.
17161     ///
17162 
17163     ///
17164     /// Called on the UI thread after the ResolveHost request has completed.
17165     /// |result| will be the result code. |resolved_ips| will be the list of
17166     /// resolved IP addresses or NULL if the resolution failed.
17167     ///
17168 
17169     cef_base_ref_counted_t base;
17170     extern(System) void function (
17171         cef_resolve_callback_t* self,
17172         cef_errorcode_t result,
17173         cef_string_list_t resolved_ips) nothrow on_resolve_completed;
17174 }
17175 
17176  ///
17177 /// A request context provides request handling for a set of related browser or
17178 /// URL request objects. A request context can be specified when creating a new
17179 /// browser via the cef_browser_host_t static factory functions or when creating
17180 /// a new URL request via the cef_urlrequest_t static factory functions. Browser
17181 /// objects with different request contexts will never be hosted in the same
17182 /// render process. Browser objects with the same request context may or may not
17183 /// be hosted in the same render process depending on the process model. Browser
17184 /// objects created indirectly via the JavaScript window.open function or
17185 /// targeted links will share the same render process and the same request
17186 /// context as the source browser. When running in single-process mode there is
17187 /// only a single render process (the main process) and so all browsers created
17188 /// in single-process mode will share the same request context. This will be the
17189 /// first request context passed into a cef_browser_host_t static factory
17190 /// function and all other request context objects will be ignored.
17191 ///
17192 struct cef_request_context_t
17193 {
17194     ///
17195     /// Base structure.
17196     ///
17197 
17198     ///
17199     /// Returns true (1) if this object is pointing to the same context as |that|
17200     /// object.
17201     ///
17202 
17203     ///
17204     /// Returns true (1) if this object is sharing the same storage as |that|
17205     /// object.
17206     ///
17207 
17208     ///
17209     /// Returns true (1) if this object is the global context. The global context
17210     /// is used by default when creating a browser or URL request with a NULL
17211     /// context argument.
17212     ///
17213 
17214     ///
17215     /// Returns the handler for this context if any.
17216     ///
17217 
17218     ///
17219     /// Returns the cache path for this object. If NULL an "incognito mode" in-
17220     /// memory cache is being used.
17221     ///
17222     // The resulting string must be freed by calling cef_string_userfree_free().
17223 
17224     ///
17225     /// Returns the cookie manager for this object. If |callback| is non-NULL it
17226     /// will be executed asnychronously on the UI thread after the manager's
17227     /// storage has been initialized.
17228     ///
17229 
17230     ///
17231     /// Register a scheme handler factory for the specified |scheme_name| and
17232     /// optional |domain_name|. An NULL |domain_name| value for a standard scheme
17233 
17234     cef_preference_manager_t base;
17235     extern(System) int function (
17236         cef_request_context_t* self,
17237         cef_request_context_t* other) nothrow is_same;
17238     extern(System) int function (
17239         cef_request_context_t* self,
17240         cef_request_context_t* other) nothrow is_sharing_with;
17241     extern(System) int function (cef_request_context_t* self) nothrow is_global;
17242     extern(System) cef_request_context_handler_t* function (
17243         cef_request_context_t* self) nothrow get_handler;
17244     extern(System) cef_string_userfree_t function (
17245         cef_request_context_t* self) nothrow get_cache_path;
17246     extern(System) cef_cookie_manager_t* function (
17247         cef_request_context_t* self,
17248         cef_completion_callback_t* callback) nothrow get_cookie_manager;
17249     /// will cause the factory to match all domain names. The |domain_name| value
17250     /// will be ignored for non-standard schemes. If |scheme_name| is a built-in
17251     /// scheme and no handler is returned by |factory| then the built-in scheme
17252     /// handler factory will be called. If |scheme_name| is a custom scheme then
17253     /// you must also implement the cef_app_t::on_register_custom_schemes()
17254     /// function in all processes. This function may be called multiple times to
17255     /// change or remove the factory that matches the specified |scheme_name| and
17256     /// optional |domain_name|. Returns false (0) if an error occurs. This
17257     /// function may be called on any thread in the browser process.
17258     ///
17259     extern(System) int function (
17260         cef_request_context_t* self,
17261         const(cef_string_t)* scheme_name,
17262         const(cef_string_t)* domain_name,
17263         cef_scheme_handler_factory_t* factory) nothrow register_scheme_handler_factory;
17264 
17265     ///
17266     /// Clear all registered scheme handler factories. Returns false (0) on error.
17267     /// This function may be called on any thread in the browser process.
17268     ///
17269     extern(System) int function (cef_request_context_t* self) nothrow clear_scheme_handler_factories;
17270 
17271     ///
17272     /// Clears all certificate exceptions that were added as part of handling
17273     /// cef_request_handler_t::on_certificate_error(). If you call this it is
17274     /// recommended that you also call close_all_connections() or you risk not
17275     /// being prompted again for server certificates if you reconnect quickly. If
17276     /// |callback| is non-NULL it will be executed on the UI thread after
17277     /// completion.
17278     ///
17279     extern(System) void function (
17280         cef_request_context_t* self,
17281         cef_completion_callback_t* callback) nothrow clear_certificate_exceptions;
17282 
17283     ///
17284     /// Clears all HTTP authentication credentials that were added as part of
17285     /// handling GetAuthCredentials. If |callback| is non-NULL it will be executed
17286     /// on the UI thread after completion.
17287     ///
17288     extern(System) void function (
17289         cef_request_context_t* self,
17290         cef_completion_callback_t* callback) nothrow clear_http_auth_credentials;
17291 
17292     ///
17293     /// Clears all active and idle connections that Chromium currently has. This
17294     /// is only recommended if you have released all other CEF objects but don't
17295     /// yet want to call cef_shutdown(). If |callback| is non-NULL it will be
17296     /// executed on the UI thread after completion.
17297     ///
17298     extern(System) void function (
17299         cef_request_context_t* self,
17300         cef_completion_callback_t* callback) nothrow close_all_connections;
17301 
17302     ///
17303     /// Attempts to resolve |origin| to a list of associated IP addresses.
17304     /// |callback| will be executed on the UI thread after completion.
17305     ///
17306     extern(System) void function (
17307         cef_request_context_t* self,
17308         const(cef_string_t)* origin,
17309         cef_resolve_callback_t* callback) nothrow resolve_host;
17310 
17311     ///
17312     /// Load an extension.
17313     ///
17314     /// If extension resources will be read from disk using the default load
17315     /// implementation then |root_directory| should be the absolute path to the
17316     /// extension resources directory and |manifest| should be NULL. If extension
17317     /// resources will be provided by the client (e.g. via cef_request_handler_t
17318     /// and/or cef_extension_handler_t) then |root_directory| should be a path
17319     /// component unique to the extension (if not absolute this will be internally
17320     /// prefixed with the PK_DIR_RESOURCES path) and |manifest| should contain the
17321     /// contents that would otherwise be read from the "manifest.json" file on
17322     /// disk.
17323     ///
17324     /// The loaded extension will be accessible in all contexts sharing the same
17325     /// storage (HasExtension returns true (1)). However, only the context on
17326     /// which this function was called is considered the loader (DidLoadExtension
17327     /// returns true (1)) and only the loader will receive
17328     /// cef_request_context_handler_t callbacks for the extension.
17329     ///
17330     /// cef_extension_handler_t::OnExtensionLoaded will be called on load success
17331     /// or cef_extension_handler_t::OnExtensionLoadFailed will be called on load
17332     /// failure.
17333     ///
17334     /// If the extension specifies a background script via the "background"
17335     /// manifest key then cef_extension_handler_t::OnBeforeBackgroundBrowser will
17336     /// be called to create the background browser. See that function for
17337     /// additional information about background scripts.
17338     ///
17339     /// For visible extension views the client application should evaluate the
17340     /// manifest to determine the correct extension URL to load and then pass that
17341     /// URL to the cef_browser_host_t::CreateBrowser* function after the extension
17342     /// has loaded. For example, the client can look for the "browser_action"
17343     /// manifest key as documented at
17344     /// https://developer.chrome.com/extensions/browserAction. Extension URLs take
17345     /// the form "chrome-extension://<extension_id>/<path>".
17346     ///
17347     /// Browsers that host extensions differ from normal browsers as follows:
17348     ///  - Can access chrome.* JavaScript APIs if allowed by the manifest. Visit
17349     ///    chrome://extensions-support for the list of extension APIs currently
17350     ///    supported by CEF.
17351     ///  - Main frame navigation to non-extension content is blocked.
17352     ///  - Pinch-zooming is disabled.
17353     ///  - CefBrowserHost::GetExtension returns the hosted extension.
17354     ///  - CefBrowserHost::IsBackgroundHost returns true for background hosts.
17355     ///
17356     /// See https://developer.chrome.com/extensions for extension implementation
17357     /// and usage documentation.
17358     ///
17359     /// WARNING: This function is deprecated and will be removed in ~M127.
17360     ///
17361     extern(System) void function (
17362         cef_request_context_t* self,
17363         const(cef_string_t)* root_directory,
17364         cef_dictionary_value_t* manifest,
17365         cef_extension_handler_t* handler) nothrow load_extension;
17366 
17367     ///
17368     /// Returns true (1) if this context was used to load the extension identified
17369     /// by |extension_id|. Other contexts sharing the same storage will also have
17370     /// access to the extension (see HasExtension). This function must be called
17371     /// on the browser process UI thread.
17372     ///
17373     /// WARNING: This function is deprecated and will be removed in ~M127.
17374     ///
17375     extern(System) int function (
17376         cef_request_context_t* self,
17377         const(cef_string_t)* extension_id) nothrow did_load_extension;
17378 
17379     ///
17380     /// Returns true (1) if this context has access to the extension identified by
17381     /// |extension_id|. This may not be the context that was used to load the
17382     /// extension (see DidLoadExtension). This function must be called on the
17383     /// browser process UI thread.
17384     ///
17385     /// WARNING: This function is deprecated and will be removed in ~M127.
17386     ///
17387     extern(System) int function (
17388         cef_request_context_t* self,
17389         const(cef_string_t)* extension_id) nothrow has_extension;
17390 
17391     ///
17392     /// Retrieve the list of all extensions that this context has access to (see
17393     /// HasExtension). |extension_ids| will be populated with the list of
17394     /// extension ID values. Returns true (1) on success. This function must be
17395     /// called on the browser process UI thread.
17396     ///
17397     /// WARNING: This function is deprecated and will be removed in ~M127.
17398     ///
17399     extern(System) int function (
17400         cef_request_context_t* self,
17401         cef_string_list_t extension_ids) nothrow get_extensions;
17402 
17403     ///
17404     /// Returns the extension matching |extension_id| or NULL if no matching
17405     /// extension is accessible in this context (see HasExtension). This function
17406     /// must be called on the browser process UI thread.
17407     ///
17408     /// WARNING: This function is deprecated and will be removed in ~M127.
17409     ///
17410     extern(System) cef_extension_t* function (
17411         cef_request_context_t* self,
17412         const(cef_string_t)* extension_id) nothrow get_extension;
17413 
17414     ///
17415     /// Returns the MediaRouter object associated with this context.  If
17416     /// |callback| is non-NULL it will be executed asnychronously on the UI thread
17417     /// after the manager's context has been initialized.
17418     ///
17419     extern(System) cef_media_router_t* function (
17420         cef_request_context_t* self,
17421         cef_completion_callback_t* callback) nothrow get_media_router;
17422 
17423     ///
17424     /// Returns the current value for |content_type| that applies for the
17425     /// specified URLs. If both URLs are NULL the default value will be returned.
17426     /// Returns nullptr if no value is configured. Must be called on the browser
17427     /// process UI thread.
17428     ///
17429     extern(System) cef_value_t* function (
17430         cef_request_context_t* self,
17431         const(cef_string_t)* requesting_url,
17432         const(cef_string_t)* top_level_url,
17433         cef_content_setting_types_t content_type) nothrow get_website_setting;
17434 
17435     ///
17436     /// Sets the current value for |content_type| for the specified URLs in the
17437     /// default scope. If both URLs are NULL, and the context is not incognito,
17438     /// the default value will be set. Pass nullptr for |value| to remove the
17439     /// default value for this content type.
17440     ///
17441     /// WARNING: Incorrect usage of this function may cause instability or
17442     /// security issues in Chromium. Make sure that you first understand the
17443     /// potential impact of any changes to |content_type| by reviewing the related
17444     /// source code in Chromium. For example, if you plan to modify
17445     /// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
17446     /// ContentSettingsType::POPUPS in Chromium:
17447     /// https://source.chromium.org/search?q=ContentSettingsType::POPUPS
17448     ///
17449     extern(System) void function (
17450         cef_request_context_t* self,
17451         const(cef_string_t)* requesting_url,
17452         const(cef_string_t)* top_level_url,
17453         cef_content_setting_types_t content_type,
17454         cef_value_t* value) nothrow set_website_setting;
17455 
17456     ///
17457     /// Returns the current value for |content_type| that applies for the
17458     /// specified URLs. If both URLs are NULL the default value will be returned.
17459     /// Returns CEF_CONTENT_SETTING_VALUE_DEFAULT if no value is configured. Must
17460     /// be called on the browser process UI thread.
17461     ///
17462     extern(System) cef_content_setting_values_t function (
17463         cef_request_context_t* self,
17464         const(cef_string_t)* requesting_url,
17465         const(cef_string_t)* top_level_url,
17466         cef_content_setting_types_t content_type) nothrow get_content_setting;
17467 
17468     ///
17469     /// Sets the current value for |content_type| for the specified URLs in the
17470     /// default scope. If both URLs are NULL, and the context is not incognito,
17471     /// the default value will be set. Pass CEF_CONTENT_SETTING_VALUE_DEFAULT for
17472     /// |value| to use the default value for this content type.
17473     ///
17474     /// WARNING: Incorrect usage of this function may cause instability or
17475     /// security issues in Chromium. Make sure that you first understand the
17476     /// potential impact of any changes to |content_type| by reviewing the related
17477     /// source code in Chromium. For example, if you plan to modify
17478     /// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
17479     /// ContentSettingsType::POPUPS in Chromium:
17480     /// https://source.chromium.org/search?q=ContentSettingsType::POPUPS
17481     ///
17482     extern(System) void function (
17483         cef_request_context_t* self,
17484         const(cef_string_t)* requesting_url,
17485         const(cef_string_t)* top_level_url,
17486         cef_content_setting_types_t content_type,
17487         cef_content_setting_values_t value) nothrow set_content_setting;
17488 
17489     ///
17490     /// Sets the Chrome color scheme for all browsers that share this request
17491     /// context. |variant| values of SYSTEM, LIGHT and DARK change the underlying
17492     /// color mode (e.g. light vs dark). Other |variant| values determine how
17493     /// |user_color| will be applied in the current color mode. If |user_color| is
17494     /// transparent (0) the default color will be used.
17495     ///
17496     extern(System) void function (
17497         cef_request_context_t* self,
17498         cef_color_variant_t variant,
17499         cef_color_t user_color) nothrow set_chrome_color_scheme;
17500 
17501     ///
17502     /// Returns the current Chrome color scheme mode (SYSTEM, LIGHT or DARK). Must
17503     /// be called on the browser process UI thread.
17504     ///
17505     extern(System) cef_color_variant_t function (
17506         cef_request_context_t* self) nothrow get_chrome_color_scheme_mode;
17507 
17508     ///
17509     /// Returns the current Chrome color scheme color, or transparent (0) for the
17510     /// default color. Must be called on the browser process UI thread.
17511     ///
17512     extern(System) cef_color_t function (
17513         cef_request_context_t* self) nothrow get_chrome_color_scheme_color;
17514 
17515     ///
17516     /// Returns the current Chrome color scheme variant. Must be called on the
17517     /// browser process UI thread.
17518     ///
17519     extern(System) cef_color_variant_t function (
17520         cef_request_context_t* self) nothrow get_chrome_color_scheme_variant;
17521 }
17522 
17523 
17524 
17525 ///
17526 /// Returns the global context object.
17527 ///
17528 cef_request_context_t* cef_request_context_get_global_context ();
17529 
17530 ///
17531 /// Creates a new context object with the specified |settings| and optional
17532 /// |handler|.
17533 ///
17534 cef_request_context_t* cef_request_context_create_context (
17535     const(cef_request_context_settings_t)* settings,
17536     cef_request_context_handler_t* handler);
17537 
17538 ///
17539 /// Creates a new context object that shares storage with |other| and uses an
17540 /// optional |handler|.
17541 ///
17542 cef_request_context_t* cef_create_context_shared (
17543     cef_request_context_t* other,
17544     cef_request_context_handler_t* handler);
17545 
17546 // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
17547 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
17548 //
17549 // Redistribution and use in source and binary forms, with or without
17550 // modification, are permitted provided that the following conditions are
17551 // met:
17552 //
17553 //    * Redistributions of source code must retain the above copyright
17554 // notice, this list of conditions and the following disclaimer.
17555 //    * Redistributions in binary form must reproduce the above
17556 // copyright notice, this list of conditions and the following disclaimer
17557 // in the documentation and/or other materials provided with the
17558 // distribution.
17559 //    * Neither the name of Google Inc. nor the name Chromium Embedded
17560 // Framework nor the names of its contributors may be used to endorse
17561 // or promote products derived from this software without specific prior
17562 // written permission.
17563 //
17564 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17565 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17566 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17567 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17568 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17569 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17570 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17571 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17572 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17573 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17574 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17575 //
17576 // ---------------------------------------------------------------------------
17577 //
17578 // This file was generated by the CEF translator tool and should not edited
17579 // by hand. See the translator.README.txt file in the tools directory for
17580 // more information.
17581 //
17582 // $hash=d90d816565429ad304f43490b0619af5ffa70274$
17583 //
17584 
17585 extern (C):
17586 
17587 ///
17588 /// Implement this structure to provide handler implementations. The handler
17589 /// instance will not be released until all objects related to the context have
17590 /// been destroyed.
17591 ///
17592 struct cef_request_context_handler_t
17593 {
17594     ///
17595     /// Base structure.
17596     ///
17597 
17598     ///
17599     /// Called on the browser process UI thread immediately after the request
17600     /// context has been initialized.
17601     ///
17602 
17603     ///
17604     /// Called on the browser process IO thread before a resource request is
17605 
17606     cef_base_ref_counted_t base;
17607     extern(System) void function (
17608         cef_request_context_handler_t* self,
17609         cef_request_context_t* request_context) nothrow on_request_context_initialized;
17610     /// initiated. The |browser| and |frame| values represent the source of the
17611     /// request, and may be NULL for requests originating from service workers or
17612     /// cef_urlrequest_t. |request| represents the request contents and cannot be
17613     /// modified in this callback. |is_navigation| will be true (1) if the
17614     /// resource request is a navigation. |is_download| will be true (1) if the
17615     /// resource request is a download. |request_initiator| is the origin (scheme
17616     /// + domain) of the page that initiated the request. Set
17617     /// |disable_default_handling| to true (1) to disable default handling of the
17618     /// request, in which case it will need to be handled via
17619     /// cef_resource_request_handler_t::GetResourceHandler or it will be canceled.
17620     /// To allow the resource load to proceed with default handling return NULL.
17621     /// To specify a handler for the resource return a
17622     /// cef_resource_request_handler_t object. This function will not be called if
17623     /// the client associated with |browser| returns a non-NULL value from
17624     /// cef_request_handler_t::GetResourceRequestHandler for the same request
17625     /// (identified by cef_request_t::GetIdentifier).
17626     ///
17627     extern(System) cef_resource_request_handler_t* function (
17628         cef_request_context_handler_t* self,
17629         cef_browser_t* browser,
17630         cef_frame_t* frame,
17631         cef_request_t* request,
17632         int is_navigation,
17633         int is_download,
17634         const(cef_string_t)* request_initiator,
17635         int* disable_default_handling) nothrow get_resource_request_handler;
17636 }
17637 
17638 
17639 
17640 // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_
17641 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
17642 //
17643 // Redistribution and use in source and binary forms, with or without
17644 // modification, are permitted provided that the following conditions are
17645 // met:
17646 //
17647 //    * Redistributions of source code must retain the above copyright
17648 // notice, this list of conditions and the following disclaimer.
17649 //    * Redistributions in binary form must reproduce the above
17650 // copyright notice, this list of conditions and the following disclaimer
17651 // in the documentation and/or other materials provided with the
17652 // distribution.
17653 //    * Neither the name of Google Inc. nor the name Chromium Embedded
17654 // Framework nor the names of its contributors may be used to endorse
17655 // or promote products derived from this software without specific prior
17656 // written permission.
17657 //
17658 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17659 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17660 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17661 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17662 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17663 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17664 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17665 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17666 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17667 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17668 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17669 //
17670 // ---------------------------------------------------------------------------
17671 //
17672 // This file was generated by the CEF translator tool and should not edited
17673 // by hand. See the translator.README.txt file in the tools directory for
17674 // more information.
17675 //
17676 // $hash=2e8b5c5107f61e3d4c333dc02c76a9f30cd0cf83$
17677 //
17678 
17679 extern (C):
17680 
17681 ///
17682 /// Callback structure used to select a client certificate for authentication.
17683 ///
17684 struct cef_select_client_certificate_callback_t
17685 {
17686     ///
17687     /// Base structure.
17688     ///
17689 
17690     ///
17691     /// Chooses the specified certificate for client certificate authentication.
17692     /// NULL value means that no client certificate should be used.
17693     ///
17694 
17695     cef_base_ref_counted_t base;
17696     extern(System) void function (
17697         cef_select_client_certificate_callback_t* self,
17698         cef_x509certificate_t* cert) nothrow select;
17699 }
17700 
17701 
17702 ///
17703 /// Implement this structure to handle events related to browser requests. The
17704 /// functions of this structure will be called on the thread indicated.
17705 ///
17706 struct cef_request_handler_t
17707 {
17708     ///
17709     /// Base structure.
17710     ///
17711     cef_base_ref_counted_t base;
17712 
17713     ///
17714     /// Called on the UI thread before browser navigation. Return true (1) to
17715     /// cancel the navigation or false (0) to allow the navigation to proceed. The
17716     /// |request| object cannot be modified in this callback.
17717     /// cef_load_handler_t::OnLoadingStateChange will be called twice in all
17718     /// cases. If the navigation is allowed cef_load_handler_t::OnLoadStart and
17719     /// cef_load_handler_t::OnLoadEnd will be called. If the navigation is
17720     /// canceled cef_load_handler_t::OnLoadError will be called with an
17721     /// |errorCode| value of ERR_ABORTED. The |user_gesture| value will be true
17722     /// (1) if the browser navigated via explicit user gesture (e.g. clicking a
17723     /// link) or false (0) if it navigated automatically (e.g. via the
17724     /// DomContentLoaded event).
17725     ///
17726     extern(System) int function (
17727         cef_request_handler_t* self,
17728         cef_browser_t* browser,
17729         cef_frame_t* frame,
17730         cef_request_t* request,
17731         int user_gesture,
17732         int is_redirect) nothrow on_before_browse;
17733 
17734     ///
17735     /// Called on the UI thread before OnBeforeBrowse in certain limited cases
17736     /// where navigating a new or different browser might be desirable. This
17737     /// includes user-initiated navigation that might open in a special way (e.g.
17738     /// links clicked via middle-click or ctrl + left-click) and certain types of
17739     /// cross-origin navigation initiated from the renderer process (e.g.
17740     /// navigating the top-level frame to/from a file URL). The |browser| and
17741     /// |frame| values represent the source of the navigation. The
17742     /// |target_disposition| value indicates where the user intended to navigate
17743     /// the browser based on standard Chromium behaviors (e.g. current tab, new
17744     /// tab, etc). The |user_gesture| value will be true (1) if the browser
17745     /// navigated via explicit user gesture (e.g. clicking a link) or false (0) if
17746     /// it navigated automatically (e.g. via the DomContentLoaded event). Return
17747     /// true (1) to cancel the navigation or false (0) to allow the navigation to
17748     /// proceed in the source browser's top-level frame.
17749     ///
17750     extern(System) int function (
17751         cef_request_handler_t* self,
17752         cef_browser_t* browser,
17753         cef_frame_t* frame,
17754         const(cef_string_t)* target_url,
17755         cef_window_open_disposition_t target_disposition,
17756         int user_gesture) nothrow on_open_urlfrom_tab;
17757 
17758     ///
17759     /// Called on the browser process IO thread before a resource request is
17760     /// initiated. The |browser| and |frame| values represent the source of the
17761     /// request. |request| represents the request contents and cannot be modified
17762     /// in this callback. |is_navigation| will be true (1) if the resource request
17763     /// is a navigation. |is_download| will be true (1) if the resource request is
17764     /// a download. |request_initiator| is the origin (scheme + domain) of the
17765     /// page that initiated the request. Set |disable_default_handling| to true
17766     /// (1) to disable default handling of the request, in which case it will need
17767     /// to be handled via cef_resource_request_handler_t::GetResourceHandler or it
17768     /// will be canceled. To allow the resource load to proceed with default
17769     /// handling return NULL. To specify a handler for the resource return a
17770     /// cef_resource_request_handler_t object. If this callback returns NULL the
17771     /// same function will be called on the associated
17772     /// cef_request_context_handler_t, if any.
17773     ///
17774     extern(System) cef_resource_request_handler_t* function (
17775         cef_request_handler_t* self,
17776         cef_browser_t* browser,
17777         cef_frame_t* frame,
17778         cef_request_t* request,
17779         int is_navigation,
17780         int is_download,
17781         const(cef_string_t)* request_initiator,
17782         int* disable_default_handling) nothrow get_resource_request_handler;
17783 
17784     ///
17785     /// Called on the IO thread when the browser needs credentials from the user.
17786     /// |origin_url| is the origin making this authentication request. |isProxy|
17787     /// indicates whether the host is a proxy server. |host| contains the hostname
17788     /// and |port| contains the port number. |realm| is the realm of the challenge
17789     /// and may be NULL. |scheme| is the authentication scheme used, such as
17790     /// "basic" or "digest", and will be NULL if the source of the request is an
17791     /// FTP server. Return true (1) to continue the request and call
17792     /// cef_auth_callback_t::cont() either in this function or at a later time
17793     /// when the authentication information is available. Return false (0) to
17794     /// cancel the request immediately.
17795     ///
17796     extern(System) int function (
17797         cef_request_handler_t* self,
17798         cef_browser_t* browser,
17799         const(cef_string_t)* origin_url,
17800         int isProxy,
17801         const(cef_string_t)* host,
17802         int port,
17803         const(cef_string_t)* realm,
17804         const(cef_string_t)* scheme,
17805         cef_auth_callback_t* callback) nothrow get_auth_credentials;
17806 
17807     ///
17808     /// Called on the UI thread to handle requests for URLs with an invalid SSL
17809     /// certificate. Return true (1) and call cef_callback_t functions either in
17810     /// this function or at a later time to continue or cancel the request. Return
17811     /// false (0) to cancel the request immediately. If
17812     /// cef_settings_t.ignore_certificate_errors is set all invalid certificates
17813     /// will be accepted without calling this function.
17814     ///
17815     extern(System) int function (
17816         cef_request_handler_t* self,
17817         cef_browser_t* browser,
17818         cef_errorcode_t cert_error,
17819         const(cef_string_t)* request_url,
17820         cef_sslinfo_t* ssl_info,
17821         cef_callback_t* callback) nothrow on_certificate_error;
17822 
17823     ///
17824     /// Called on the UI thread when a client certificate is being requested for
17825     /// authentication. Return false (0) to use the default behavior and
17826     /// automatically select the first certificate available. Return true (1) and
17827     /// call cef_select_client_certificate_callback_t::Select either in this
17828     /// function or at a later time to select a certificate. Do not call Select or
17829     /// call it with NULL to continue without using any certificate. |isProxy|
17830     /// indicates whether the host is an HTTPS proxy or the origin server. |host|
17831     /// and |port| contains the hostname and port of the SSL server.
17832     /// |certificates| is the list of certificates to choose from; this list has
17833     /// already been pruned by Chromium so that it only contains certificates from
17834     /// issuers that the server trusts.
17835     ///
17836     extern(System) int function (
17837         cef_request_handler_t* self,
17838         cef_browser_t* browser,
17839         int isProxy,
17840         const(cef_string_t)* host,
17841         int port,
17842         size_t certificatesCount,
17843         cef_x509certificate_t** certificates,
17844         cef_select_client_certificate_callback_t* callback) nothrow on_select_client_certificate;
17845 
17846     ///
17847     /// Called on the browser process UI thread when the render view associated
17848     /// with |browser| is ready to receive/handle IPC messages in the render
17849     /// process.
17850     ///
17851     extern(System) void function (
17852         cef_request_handler_t* self,
17853         cef_browser_t* browser) nothrow on_render_view_ready;
17854 
17855     ///
17856     /// Called on the browser process UI thread when the render process is
17857     /// unresponsive as indicated by a lack of input event processing for at least
17858     /// 15 seconds. Return false (0) for the default behavior which is an
17859     /// indefinite wait with the Alloy runtime or display of the "Page
17860     /// unresponsive" dialog with the Chrome runtime. Return true (1) and don't
17861     /// execute the callback for an indefinite wait without display of the Chrome
17862     /// runtime dialog. Return true (1) and call
17863     /// cef_unresponsive_process_callback_t::Wait either in this function or at a
17864     /// later time to reset the wait timer, potentially triggering another call to
17865     /// this function if the process remains unresponsive. Return true (1) and
17866     /// call cef_unresponsive_process_callback_t:: Terminate either in this
17867     /// function or at a later time to terminate the unresponsive process,
17868     /// resulting in a call to OnRenderProcessTerminated.
17869     /// OnRenderProcessResponsive will be called if the process becomes responsive
17870     /// after this function is called. This functionality depends on the hang
17871     /// monitor which can be disabled by passing the `--disable-hang-monitor`
17872     /// command-line flag.
17873     ///
17874     extern(System) int function (
17875         cef_request_handler_t* self,
17876         cef_browser_t* browser,
17877         cef_unresponsive_process_callback_t* callback) nothrow on_render_process_unresponsive;
17878 
17879     ///
17880     /// Called on the browser process UI thread when the render process becomes
17881     /// responsive after previously being unresponsive. See documentation on
17882     /// OnRenderProcessUnresponsive.
17883     ///
17884     extern(System) void function (
17885         cef_request_handler_t* self,
17886         cef_browser_t* browser) nothrow on_render_process_responsive;
17887 
17888     ///
17889     /// Called on the browser process UI thread when the render process terminates
17890     /// unexpectedly. |status| indicates how the process terminated. |error_code|
17891     /// and |error_string| represent the error that would be displayed in Chrome's
17892     /// "Aw, Snap!" view. Possible |error_code| values include cef_resultcode_t
17893     /// non-normal exit values and platform-specific crash values (for example, a
17894     /// Posix signal or Windows hardware exception).
17895     ///
17896     extern(System) void function (
17897         cef_request_handler_t* self,
17898         cef_browser_t* browser,
17899         cef_termination_status_t status,
17900         int error_code,
17901         const(cef_string_t)* error_string) nothrow on_render_process_terminated;
17902 
17903     ///
17904     /// Called on the browser process UI thread when the window.document object of
17905     /// the main frame has been created.
17906     ///
17907     extern(System) void function (
17908         cef_request_handler_t* self,
17909         cef_browser_t* browser) nothrow on_document_available_in_main_frame;
17910 }
17911 
17912 
17913 
17914 // CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
17915 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
17916 //
17917 // Redistribution and use in source and binary forms, with or without
17918 // modification, are permitted provided that the following conditions are
17919 // met:
17920 //
17921 //    * Redistributions of source code must retain the above copyright
17922 // notice, this list of conditions and the following disclaimer.
17923 //    * Redistributions in binary form must reproduce the above
17924 // copyright notice, this list of conditions and the following disclaimer
17925 // in the documentation and/or other materials provided with the
17926 // distribution.
17927 //    * Neither the name of Google Inc. nor the name Chromium Embedded
17928 // Framework nor the names of its contributors may be used to endorse
17929 // or promote products derived from this software without specific prior
17930 // written permission.
17931 //
17932 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17933 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17934 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17935 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17936 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17937 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17938 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17939 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17940 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17941 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17942 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17943 //
17944 // ---------------------------------------------------------------------------
17945 //
17946 // This file was generated by the CEF translator tool and should not edited
17947 // by hand. See the translator.README.txt file in the tools directory for
17948 // more information.
17949 //
17950 // $hash=d97d3ca6c8d610627538c58f3b4ba3869f3d9ac7$
17951 //
17952 
17953 extern (C):
17954 
17955 ///
17956 /// Structure used for retrieving resources from the resource bundle (*.pak)
17957 /// files loaded by CEF during startup or via the cef_resource_bundle_handler_t
17958 /// returned from cef_app_t::GetResourceBundleHandler. See CefSettings for
17959 /// additional options related to resource bundle loading. The functions of this
17960 /// structure may be called on any thread unless otherwise indicated.
17961 ///
17962 struct cef_resource_bundle_t
17963 {
17964     ///
17965     /// Base structure.
17966     ///
17967 
17968     ///
17969     /// Returns the localized string for the specified |string_id| or an NULL
17970     /// string if the value is not found. Include cef_pack_strings.h for a listing
17971     /// of valid string ID values.
17972     ///
17973     // The resulting string must be freed by calling cef_string_userfree_free().
17974 
17975     cef_base_ref_counted_t base;
17976     extern(System) cef_string_userfree_t function (
17977         cef_resource_bundle_t* self,
17978         int string_id) nothrow get_localized_string;
17979     ///
17980     /// Returns a cef_binary_value_t containing the decompressed contents of the
17981     /// specified scale independent |resource_id| or NULL if not found. Include
17982     /// cef_pack_resources.h for a listing of valid resource ID values.
17983     ///
17984     extern(System) cef_binary_value_t* function (
17985         cef_resource_bundle_t* self,
17986         int resource_id) nothrow get_data_resource;
17987 
17988     ///
17989     /// Returns a cef_binary_value_t containing the decompressed contents of the
17990     /// specified |resource_id| nearest the scale factor |scale_factor| or NULL if
17991     /// not found. Use a |scale_factor| value of SCALE_FACTOR_NONE for scale
17992     /// independent resources or call GetDataResource instead.Include
17993     /// cef_pack_resources.h for a listing of valid resource ID values.
17994     ///
17995     extern(System) cef_binary_value_t* function (
17996         cef_resource_bundle_t* self,
17997         int resource_id,
17998         cef_scale_factor_t scale_factor) nothrow get_data_resource_for_scale;
17999 }
18000 
18001 
18002 
18003 ///
18004 /// Returns the global resource bundle instance.
18005 ///
18006 cef_resource_bundle_t* cef_resource_bundle_get_global ();
18007 
18008 // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_
18009 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
18010 //
18011 // Redistribution and use in source and binary forms, with or without
18012 // modification, are permitted provided that the following conditions are
18013 // met:
18014 //
18015 //    * Redistributions of source code must retain the above copyright
18016 // notice, this list of conditions and the following disclaimer.
18017 //    * Redistributions in binary form must reproduce the above
18018 // copyright notice, this list of conditions and the following disclaimer
18019 // in the documentation and/or other materials provided with the
18020 // distribution.
18021 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18022 // Framework nor the names of its contributors may be used to endorse
18023 // or promote products derived from this software without specific prior
18024 // written permission.
18025 //
18026 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18027 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18028 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18029 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18030 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18031 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18032 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18033 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18034 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18035 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18036 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18037 //
18038 // ---------------------------------------------------------------------------
18039 //
18040 // This file was generated by the CEF translator tool and should not edited
18041 // by hand. See the translator.README.txt file in the tools directory for
18042 // more information.
18043 //
18044 // $hash=b25f3131d67980e493da4d7e484676d000334995$
18045 //
18046 
18047 extern (C):
18048 
18049 ///
18050 /// Structure used to implement a custom resource bundle structure. See
18051 /// CefSettings for additional options related to resource bundle loading. The
18052 /// functions of this structure may be called on multiple threads.
18053 ///
18054 struct cef_resource_bundle_handler_t
18055 {
18056     ///
18057     /// Base structure.
18058     ///
18059 
18060     ///
18061     /// Called to retrieve a localized translation for the specified |string_id|.
18062     /// To provide the translation set |string| to the translation string and
18063     /// return true (1). To use the default translation return false (0). Include
18064     /// cef_pack_strings.h for a listing of valid string ID values.
18065     ///
18066 
18067     ///
18068     /// Called to retrieve data for the specified scale independent |resource_id|.
18069 
18070     cef_base_ref_counted_t base;
18071     extern(System) int function (
18072         cef_resource_bundle_handler_t* self,
18073         int string_id,
18074         cef_string_t* string) nothrow get_localized_string;
18075     /// To provide the resource data set |data| and |data_size| to the data
18076     /// pointer and size respectively and return true (1). To use the default
18077     /// resource data return false (0). The resource data will not be copied and
18078     /// must remain resident in memory. Include cef_pack_resources.h for a listing
18079     /// of valid resource ID values.
18080     ///
18081     extern(System) int function (
18082         cef_resource_bundle_handler_t* self,
18083         int resource_id,
18084         void** data,
18085         size_t* data_size) nothrow get_data_resource;
18086 
18087     ///
18088     /// Called to retrieve data for the specified |resource_id| nearest the scale
18089     /// factor |scale_factor|. To provide the resource data set |data| and
18090     /// |data_size| to the data pointer and size respectively and return true (1).
18091     /// To use the default resource data return false (0). The resource data will
18092     /// not be copied and must remain resident in memory. Include
18093     /// cef_pack_resources.h for a listing of valid resource ID values.
18094     ///
18095     extern(System) int function (
18096         cef_resource_bundle_handler_t* self,
18097         int resource_id,
18098         cef_scale_factor_t scale_factor,
18099         void** data,
18100         size_t* data_size) nothrow get_data_resource_for_scale;
18101 }
18102 
18103 
18104 
18105 // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_
18106 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
18107 //
18108 // Redistribution and use in source and binary forms, with or without
18109 // modification, are permitted provided that the following conditions are
18110 // met:
18111 //
18112 //    * Redistributions of source code must retain the above copyright
18113 // notice, this list of conditions and the following disclaimer.
18114 //    * Redistributions in binary form must reproduce the above
18115 // copyright notice, this list of conditions and the following disclaimer
18116 // in the documentation and/or other materials provided with the
18117 // distribution.
18118 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18119 // Framework nor the names of its contributors may be used to endorse
18120 // or promote products derived from this software without specific prior
18121 // written permission.
18122 //
18123 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18124 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18125 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18126 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18127 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18128 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18129 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18130 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18131 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18132 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18133 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18134 //
18135 // ---------------------------------------------------------------------------
18136 //
18137 // This file was generated by the CEF translator tool and should not edited
18138 // by hand. See the translator.README.txt file in the tools directory for
18139 // more information.
18140 //
18141 // $hash=ad8218a8ac9e313884110e72bb2af32ec916907f$
18142 //
18143 
18144 extern (C):
18145 
18146 ///
18147 /// Callback for asynchronous continuation of cef_resource_handler_t::skip().
18148 ///
18149 struct cef_resource_skip_callback_t
18150 {
18151     ///
18152     /// Base structure.
18153     ///
18154 
18155     ///
18156     /// Callback for asynchronous continuation of skip(). If |bytes_skipped| > 0
18157     /// then either skip() will be called again until the requested number of
18158     /// bytes have been skipped or the request will proceed. If |bytes_skipped| <=
18159     /// 0 the request will fail with ERR_REQUEST_RANGE_NOT_SATISFIABLE.
18160     ///
18161 
18162     ///
18163     /// Callback for asynchronous continuation of cef_resource_handler_t::read().
18164 
18165     cef_base_ref_counted_t base;
18166     extern(System) void function (
18167         cef_resource_skip_callback_t* self,
18168         long bytes_skipped) nothrow cont;
18169 }
18170 
18171 
18172 ///
18173 struct cef_resource_read_callback_t
18174 {
18175     ///
18176     /// Base structure.
18177     ///
18178     cef_base_ref_counted_t base;
18179 
18180     ///
18181     /// Callback for asynchronous continuation of read(). If |bytes_read| == 0 the
18182     /// response will be considered complete. If |bytes_read| > 0 then read() will
18183     /// be called again until the request is complete (based on either the result
18184     /// or the expected content length). If |bytes_read| < 0 then the request will
18185     /// fail and the |bytes_read| value will be treated as the error code.
18186     ///
18187     extern(System) void function (cef_resource_read_callback_t* self, int bytes_read) nothrow cont;
18188 }
18189 
18190 
18191 
18192 ///
18193 /// Structure used to implement a custom request handler structure. The
18194 /// functions of this structure will be called on the IO thread unless otherwise
18195 /// indicated.
18196 ///
18197 struct cef_resource_handler_t
18198 {
18199     ///
18200     /// Base structure.
18201     ///
18202     cef_base_ref_counted_t base;
18203 
18204     ///
18205     /// Open the response stream. To handle the request immediately set
18206     /// |handle_request| to true (1) and return true (1). To decide at a later
18207     /// time set |handle_request| to false (0), return true (1), and execute
18208     /// |callback| to continue or cancel the request. To cancel the request
18209     /// immediately set |handle_request| to true (1) and return false (0). This
18210     /// function will be called in sequence but not from a dedicated thread. For
18211     /// backwards compatibility set |handle_request| to false (0) and return false
18212     /// (0) and the ProcessRequest function will be called.
18213     ///
18214     extern(System) int function (
18215         cef_resource_handler_t* self,
18216         cef_request_t* request,
18217         int* handle_request,
18218         cef_callback_t* callback) nothrow open;
18219 
18220     ///
18221     /// Begin processing the request. To handle the request return true (1) and
18222     /// call cef_callback_t::cont() once the response header information is
18223     /// available (cef_callback_t::cont() can also be called from inside this
18224     /// function if header information is available immediately). To cancel the
18225     /// request return false (0).
18226     ///
18227     /// WARNING: This function is deprecated. Use Open instead.
18228     ///
18229     extern(System) int function (
18230         cef_resource_handler_t* self,
18231         cef_request_t* request,
18232         cef_callback_t* callback) nothrow process_request;
18233 
18234     ///
18235     /// Retrieve response header information. If the response length is not known
18236     /// set |response_length| to -1 and read_response() will be called until it
18237     /// returns false (0). If the response length is known set |response_length|
18238     /// to a positive value and read_response() will be called until it returns
18239     /// false (0) or the specified number of bytes have been read. Use the
18240     /// |response| object to set the mime type, http status code and other
18241     /// optional header values. To redirect the request to a new URL set
18242     /// |redirectUrl| to the new URL. |redirectUrl| can be either a relative or
18243     /// fully qualified URL. It is also possible to set |response| to a redirect
18244     /// http status code and pass the new URL via a Location header. Likewise with
18245     /// |redirectUrl| it is valid to set a relative or fully qualified URL as the
18246     /// Location header value. If an error occured while setting up the request
18247     /// you can call set_error() on |response| to indicate the error condition.
18248     ///
18249     extern(System) void function (
18250         cef_resource_handler_t* self,
18251         cef_response_t* response,
18252         long* response_length,
18253         cef_string_t* redirectUrl) nothrow get_response_headers;
18254 
18255     ///
18256     /// Skip response data when requested by a Range header. Skip over and discard
18257     /// |bytes_to_skip| bytes of response data. If data is available immediately
18258     /// set |bytes_skipped| to the number of bytes skipped and return true (1). To
18259     /// read the data at a later time set |bytes_skipped| to 0, return true (1)
18260     /// and execute |callback| when the data is available. To indicate failure set
18261     /// |bytes_skipped| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This
18262     /// function will be called in sequence but not from a dedicated thread.
18263     ///
18264     extern(System) int function (
18265         cef_resource_handler_t* self,
18266         long bytes_to_skip,
18267         long* bytes_skipped,
18268         cef_resource_skip_callback_t* callback) nothrow skip;
18269 
18270     ///
18271     /// Read response data. If data is available immediately copy up to
18272     /// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
18273     /// bytes copied, and return true (1). To read the data at a later time keep a
18274     /// pointer to |data_out|, set |bytes_read| to 0, return true (1) and execute
18275     /// |callback| when the data is available (|data_out| will remain valid until
18276     /// the callback is executed). To indicate response completion set
18277     /// |bytes_read| to 0 and return false (0). To indicate failure set
18278     /// |bytes_read| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This
18279     /// function will be called in sequence but not from a dedicated thread. For
18280     /// backwards compatibility set |bytes_read| to -1 and return false (0) and
18281     /// the ReadResponse function will be called.
18282     ///
18283     extern(System) int function (
18284         cef_resource_handler_t* self,
18285         void* data_out,
18286         int bytes_to_read,
18287         int* bytes_read,
18288         cef_resource_read_callback_t* callback) nothrow read;
18289 
18290     ///
18291     /// Read response data. If data is available immediately copy up to
18292     /// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
18293     /// bytes copied, and return true (1). To read the data at a later time set
18294     /// |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when
18295     /// the data is available. To indicate response completion return false (0).
18296     ///
18297     /// WARNING: This function is deprecated. Use Skip and Read instead.
18298     ///
18299     extern(System) int function (
18300         cef_resource_handler_t* self,
18301         void* data_out,
18302         int bytes_to_read,
18303         int* bytes_read,
18304         cef_callback_t* callback) nothrow read_response;
18305 
18306     ///
18307     /// Request processing has been canceled.
18308     ///
18309     extern(System) void function (cef_resource_handler_t* self) nothrow cancel;
18310 }
18311 
18312 
18313 
18314 // CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_
18315 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
18316 //
18317 // Redistribution and use in source and binary forms, with or without
18318 // modification, are permitted provided that the following conditions are
18319 // met:
18320 //
18321 //    * Redistributions of source code must retain the above copyright
18322 // notice, this list of conditions and the following disclaimer.
18323 //    * Redistributions in binary form must reproduce the above
18324 // copyright notice, this list of conditions and the following disclaimer
18325 // in the documentation and/or other materials provided with the
18326 // distribution.
18327 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18328 // Framework nor the names of its contributors may be used to endorse
18329 // or promote products derived from this software without specific prior
18330 // written permission.
18331 //
18332 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18333 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18334 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18335 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18336 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18337 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18338 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18339 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18340 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18341 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18342 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18343 //
18344 // ---------------------------------------------------------------------------
18345 //
18346 // This file was generated by the CEF translator tool and should not edited
18347 // by hand. See the translator.README.txt file in the tools directory for
18348 // more information.
18349 //
18350 // $hash=c4416644786e3c1999cdcd7e6bf78af94ff7f0da$
18351 //
18352 
18353 extern (C):
18354 
18355 ///
18356 /// Implement this structure to handle events related to browser requests. The
18357 /// functions of this structure will be called on the IO thread unless otherwise
18358 /// indicated.
18359 ///
18360 struct cef_resource_request_handler_t
18361 {
18362     ///
18363     /// Base structure.
18364     ///
18365 
18366     ///
18367     /// Called on the IO thread before a resource request is loaded. The |browser|
18368     /// and |frame| values represent the source of the request, and may be NULL
18369     /// for requests originating from service workers or cef_urlrequest_t. To
18370 
18371     cef_base_ref_counted_t base;
18372     /// optionally filter cookies for the request return a
18373     /// cef_cookie_access_filter_t object. The |request| object cannot not be
18374     /// modified in this callback.
18375     ///
18376     extern(System) cef_cookie_access_filter_t* function (
18377         cef_resource_request_handler_t* self,
18378         cef_browser_t* browser,
18379         cef_frame_t* frame,
18380         cef_request_t* request) nothrow get_cookie_access_filter;
18381 
18382     ///
18383     /// Called on the IO thread before a resource request is loaded. The |browser|
18384     /// and |frame| values represent the source of the request, and may be NULL
18385     /// for requests originating from service workers or cef_urlrequest_t. To
18386     /// redirect or change the resource load optionally modify |request|.
18387     /// Modification of the request URL will be treated as a redirect. Return
18388     /// RV_CONTINUE to continue the request immediately. Return RV_CONTINUE_ASYNC
18389     /// and call cef_callback_t functions at a later time to continue or cancel
18390     /// the request asynchronously. Return RV_CANCEL to cancel the request
18391     /// immediately.
18392     ///
18393     extern(System) cef_return_value_t function (
18394         cef_resource_request_handler_t* self,
18395         cef_browser_t* browser,
18396         cef_frame_t* frame,
18397         cef_request_t* request,
18398         cef_callback_t* callback) nothrow on_before_resource_load;
18399 
18400     ///
18401     /// Called on the IO thread before a resource is loaded. The |browser| and
18402     /// |frame| values represent the source of the request, and may be NULL for
18403     /// requests originating from service workers or cef_urlrequest_t. To allow
18404     /// the resource to load using the default network loader return NULL. To
18405     /// specify a handler for the resource return a cef_resource_handler_t object.
18406     /// The |request| object cannot not be modified in this callback.
18407     ///
18408     extern(System) cef_resource_handler_t* function (
18409         cef_resource_request_handler_t* self,
18410         cef_browser_t* browser,
18411         cef_frame_t* frame,
18412         cef_request_t* request) nothrow get_resource_handler;
18413 
18414     ///
18415     /// Called on the IO thread when a resource load is redirected. The |browser|
18416     /// and |frame| values represent the source of the request, and may be NULL
18417     /// for requests originating from service workers or cef_urlrequest_t. The
18418     /// |request| parameter will contain the old URL and other request-related
18419     /// information. The |response| parameter will contain the response that
18420     /// resulted in the redirect. The |new_url| parameter will contain the new URL
18421     /// and can be changed if desired. The |request| and |response| objects cannot
18422     /// be modified in this callback.
18423     ///
18424     extern(System) void function (
18425         cef_resource_request_handler_t* self,
18426         cef_browser_t* browser,
18427         cef_frame_t* frame,
18428         cef_request_t* request,
18429         cef_response_t* response,
18430         cef_string_t* new_url) nothrow on_resource_redirect;
18431 
18432     ///
18433     /// Called on the IO thread when a resource response is received. The
18434     /// |browser| and |frame| values represent the source of the request, and may
18435     /// be NULL for requests originating from service workers or cef_urlrequest_t.
18436     /// To allow the resource load to proceed without modification return false
18437     /// (0). To redirect or retry the resource load optionally modify |request|
18438     /// and return true (1). Modification of the request URL will be treated as a
18439     /// redirect. Requests handled using the default network loader cannot be
18440     /// redirected in this callback. The |response| object cannot be modified in
18441     /// this callback.
18442     ///
18443     /// WARNING: Redirecting using this function is deprecated. Use
18444     /// OnBeforeResourceLoad or GetResourceHandler to perform redirects.
18445     ///
18446     extern(System) int function (
18447         cef_resource_request_handler_t* self,
18448         cef_browser_t* browser,
18449         cef_frame_t* frame,
18450         cef_request_t* request,
18451         cef_response_t* response) nothrow on_resource_response;
18452 
18453     ///
18454     /// Called on the IO thread to optionally filter resource response content.
18455     /// The |browser| and |frame| values represent the source of the request, and
18456     /// may be NULL for requests originating from service workers or
18457     /// cef_urlrequest_t. |request| and |response| represent the request and
18458     /// response respectively and cannot be modified in this callback.
18459     ///
18460     extern(System) cef_response_filter_t* function (
18461         cef_resource_request_handler_t* self,
18462         cef_browser_t* browser,
18463         cef_frame_t* frame,
18464         cef_request_t* request,
18465         cef_response_t* response) nothrow get_resource_response_filter;
18466 
18467     ///
18468     /// Called on the IO thread when a resource load has completed. The |browser|
18469     /// and |frame| values represent the source of the request, and may be NULL
18470     /// for requests originating from service workers or cef_urlrequest_t.
18471     /// |request| and |response| represent the request and response respectively
18472     /// and cannot be modified in this callback. |status| indicates the load
18473     /// completion status. |received_content_length| is the number of response
18474     /// bytes actually read. This function will be called for all requests,
18475     /// including requests that are aborted due to CEF shutdown or destruction of
18476     /// the associated browser. In cases where the associated browser is destroyed
18477     /// this callback may arrive after the cef_life_span_handler_t::OnBeforeClose
18478     /// callback for that browser. The cef_frame_t::IsValid function can be used
18479     /// to test for this situation, and care should be taken not to call |browser|
18480     /// or |frame| functions that modify state (like LoadURL, SendProcessMessage,
18481     /// etc.) if the frame is invalid.
18482     ///
18483     extern(System) void function (
18484         cef_resource_request_handler_t* self,
18485         cef_browser_t* browser,
18486         cef_frame_t* frame,
18487         cef_request_t* request,
18488         cef_response_t* response,
18489         cef_urlrequest_status_t status,
18490         long received_content_length) nothrow on_resource_load_complete;
18491 
18492     ///
18493     /// Called on the IO thread to handle requests for URLs with an unknown
18494     /// protocol component. The |browser| and |frame| values represent the source
18495     /// of the request, and may be NULL for requests originating from service
18496     /// workers or cef_urlrequest_t. |request| cannot be modified in this
18497     /// callback. Set |allow_os_execution| to true (1) to attempt execution via
18498     /// the registered OS protocol handler, if any. SECURITY WARNING: YOU SHOULD
18499     /// USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL
18500     /// ANALYSIS BEFORE ALLOWING OS EXECUTION.
18501     ///
18502     extern(System) void function (
18503         cef_resource_request_handler_t* self,
18504         cef_browser_t* browser,
18505         cef_frame_t* frame,
18506         cef_request_t* request,
18507         int* allow_os_execution) nothrow on_protocol_execution;
18508 }
18509 
18510 
18511 
18512 ///
18513 /// Implement this structure to filter cookies that may be sent or received from
18514 /// resource requests. The functions of this structure will be called on the IO
18515 /// thread unless otherwise indicated.
18516 ///
18517 struct cef_cookie_access_filter_t
18518 {
18519     ///
18520     /// Base structure.
18521     ///
18522     cef_base_ref_counted_t base;
18523 
18524     ///
18525     /// Called on the IO thread before a resource request is sent. The |browser|
18526     /// and |frame| values represent the source of the request, and may be NULL
18527     /// for requests originating from service workers or cef_urlrequest_t.
18528     /// |request| cannot be modified in this callback. Return true (1) if the
18529     /// specified cookie can be sent with the request or false (0) otherwise.
18530     ///
18531     extern(System) int function (
18532         cef_cookie_access_filter_t* self,
18533         cef_browser_t* browser,
18534         cef_frame_t* frame,
18535         cef_request_t* request,
18536         const(cef_cookie_t)* cookie) nothrow can_send_cookie;
18537 
18538     ///
18539     /// Called on the IO thread after a resource response is received. The
18540     /// |browser| and |frame| values represent the source of the request, and may
18541     /// be NULL for requests originating from service workers or cef_urlrequest_t.
18542     /// |request| cannot be modified in this callback. Return true (1) if the
18543     /// specified cookie returned with the response can be saved or false (0)
18544     /// otherwise.
18545     ///
18546     extern(System) int function (
18547         cef_cookie_access_filter_t* self,
18548         cef_browser_t* browser,
18549         cef_frame_t* frame,
18550         cef_request_t* request,
18551         cef_response_t* response,
18552         const(cef_cookie_t)* cookie) nothrow can_save_cookie;
18553 }
18554 
18555 
18556 
18557 // CEF_INCLUDE_CAPI_CEF_RESOURCE_REQUEST_HANDLER_CAPI_H_
18558 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
18559 //
18560 // Redistribution and use in source and binary forms, with or without
18561 // modification, are permitted provided that the following conditions are
18562 // met:
18563 //
18564 //    * Redistributions of source code must retain the above copyright
18565 // notice, this list of conditions and the following disclaimer.
18566 //    * Redistributions in binary form must reproduce the above
18567 // copyright notice, this list of conditions and the following disclaimer
18568 // in the documentation and/or other materials provided with the
18569 // distribution.
18570 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18571 // Framework nor the names of its contributors may be used to endorse
18572 // or promote products derived from this software without specific prior
18573 // written permission.
18574 //
18575 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18576 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18577 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18578 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18579 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18580 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18581 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18582 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18583 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18584 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18585 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18586 //
18587 // ---------------------------------------------------------------------------
18588 //
18589 // This file was generated by the CEF translator tool and should not edited
18590 // by hand. See the translator.README.txt file in the tools directory for
18591 // more information.
18592 //
18593 // $hash=de559e5cd4b539ce129beab8f7627576c4249cd5$
18594 //
18595 
18596 extern (C):
18597 
18598 ///
18599 /// Structure used to represent a web response. The functions of this structure
18600 /// may be called on any thread.
18601 ///
18602 struct cef_response_t
18603 {
18604     ///
18605     /// Base structure.
18606     ///
18607 
18608     ///
18609     /// Returns true (1) if this object is read-only.
18610     ///
18611 
18612     ///
18613     /// Get the response error code. Returns ERR_NONE if there was no error.
18614     ///
18615 
18616     ///
18617     /// Set the response error code. This can be used by custom scheme handlers to
18618     /// return errors during initial request processing.
18619     ///
18620 
18621     ///
18622     /// Get the response status code.
18623     ///
18624 
18625     ///
18626     /// Set the response status code.
18627 
18628     cef_base_ref_counted_t base;
18629     extern(System) int function (cef_response_t* self) nothrow is_read_only;
18630     extern(System) cef_errorcode_t function (cef_response_t* self) nothrow get_error;
18631     extern(System) void function (cef_response_t* self, cef_errorcode_t error) nothrow set_error;
18632     extern(System) int function (cef_response_t* self) nothrow get_status;
18633     ///
18634     extern(System) void function (cef_response_t* self, int status) nothrow set_status;
18635 
18636     ///
18637     /// Get the response status text.
18638     ///
18639     // The resulting string must be freed by calling cef_string_userfree_free().
18640     extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_status_text;
18641 
18642     ///
18643     /// Set the response status text.
18644     ///
18645     extern(System) void function (
18646         cef_response_t* self,
18647         const(cef_string_t)* statusText) nothrow set_status_text;
18648 
18649     ///
18650     /// Get the response mime type.
18651     ///
18652     // The resulting string must be freed by calling cef_string_userfree_free().
18653     extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_mime_type;
18654 
18655     ///
18656     /// Set the response mime type.
18657     ///
18658     extern(System) void function (
18659         cef_response_t* self,
18660         const(cef_string_t)* mimeType) nothrow set_mime_type;
18661 
18662     ///
18663     /// Get the response charset.
18664     ///
18665     // The resulting string must be freed by calling cef_string_userfree_free().
18666     extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_charset;
18667 
18668     ///
18669     /// Set the response charset.
18670     ///
18671     extern(System) void function (
18672         cef_response_t* self,
18673         const(cef_string_t)* charset) nothrow set_charset;
18674 
18675     ///
18676     /// Get the value for the specified response header field.
18677     ///
18678     // The resulting string must be freed by calling cef_string_userfree_free().
18679     extern(System) cef_string_userfree_t function (
18680         cef_response_t* self,
18681         const(cef_string_t)* name) nothrow get_header_by_name;
18682 
18683     ///
18684     /// Set the header |name| to |value|. If |overwrite| is true (1) any existing
18685     /// values will be replaced with the new value. If |overwrite| is false (0)
18686     /// any existing values will not be overwritten.
18687     ///
18688     extern(System) void function (
18689         cef_response_t* self,
18690         const(cef_string_t)* name,
18691         const(cef_string_t)* value,
18692         int overwrite) nothrow set_header_by_name;
18693 
18694     ///
18695     /// Get all response header fields.
18696     ///
18697     extern(System) void function (
18698         cef_response_t* self,
18699         cef_string_multimap_t headerMap) nothrow get_header_map;
18700 
18701     ///
18702     /// Set all response header fields.
18703     ///
18704     extern(System) void function (
18705         cef_response_t* self,
18706         cef_string_multimap_t headerMap) nothrow set_header_map;
18707 
18708     ///
18709     /// Get the resolved URL after redirects or changed as a result of HSTS.
18710     ///
18711     // The resulting string must be freed by calling cef_string_userfree_free().
18712     extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_url;
18713 
18714     ///
18715     /// Set the resolved URL after redirects or changed as a result of HSTS.
18716     ///
18717     extern(System) void function (cef_response_t* self, const(cef_string_t)* url) nothrow set_url;
18718 }
18719 
18720 
18721 
18722 ///
18723 /// Create a new cef_response_t object.
18724 ///
18725 cef_response_t* cef_response_create ();
18726 
18727 // CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_
18728 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
18729 //
18730 // Redistribution and use in source and binary forms, with or without
18731 // modification, are permitted provided that the following conditions are
18732 // met:
18733 //
18734 //    * Redistributions of source code must retain the above copyright
18735 // notice, this list of conditions and the following disclaimer.
18736 //    * Redistributions in binary form must reproduce the above
18737 // copyright notice, this list of conditions and the following disclaimer
18738 // in the documentation and/or other materials provided with the
18739 // distribution.
18740 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18741 // Framework nor the names of its contributors may be used to endorse
18742 // or promote products derived from this software without specific prior
18743 // written permission.
18744 //
18745 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18746 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18747 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18748 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18749 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18750 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18751 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18752 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18753 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18754 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18755 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18756 //
18757 // ---------------------------------------------------------------------------
18758 //
18759 // This file was generated by the CEF translator tool and should not edited
18760 // by hand. See the translator.README.txt file in the tools directory for
18761 // more information.
18762 //
18763 // $hash=1c83177e8030f7637d8ce0aa68831e417fbf37d3$
18764 //
18765 
18766 extern (C):
18767 
18768 ///
18769 /// Implement this structure to filter resource response content. The functions
18770 /// of this structure will be called on the browser process IO thread.
18771 ///
18772 struct cef_response_filter_t
18773 {
18774     ///
18775     /// Base structure.
18776     ///
18777 
18778     ///
18779     /// Initialize the response filter. Will only be called a single time. The
18780     /// filter will not be installed if this function returns false (0).
18781     ///
18782 
18783     ///
18784     /// Called to filter a chunk of data. Expected usage is as follows:
18785     ///
18786     ///  1. Read input data from |data_in| and set |data_in_read| to the number of
18787     ///     bytes that were read up to a maximum of |data_in_size|. |data_in| will
18788     ///     be NULL if |data_in_size| is zero.
18789     ///  2. Write filtered output data to |data_out| and set |data_out_written| to
18790     ///     the number of bytes that were written up to a maximum of
18791 
18792     cef_base_ref_counted_t base;
18793     extern(System) int function (cef_response_filter_t* self) nothrow init_filter;
18794     ///     |data_out_size|. If no output data was written then all data must be
18795     ///     read from |data_in| (user must set |data_in_read| = |data_in_size|).
18796     ///  3. Return RESPONSE_FILTER_DONE if all output data was written or
18797     ///     RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending.
18798     ///
18799     /// This function will be called repeatedly until the input buffer has been
18800     /// fully read (user sets |data_in_read| = |data_in_size|) and there is no
18801     /// more input data to filter (the resource response is complete). This
18802     /// function may then be called an additional time with an NULL input buffer
18803     /// if the user filled the output buffer (set |data_out_written| =
18804     /// |data_out_size|) and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate
18805     /// that output data is still pending.
18806     ///
18807     /// Calls to this function will stop when one of the following conditions is
18808     /// met:
18809     ///
18810     ///  1. There is no more input data to filter (the resource response is
18811     ///     complete) and the user sets |data_out_written| = 0 or returns
18812     ///     RESPONSE_FILTER_DONE to indicate that all data has been written, or;
18813     ///  2. The user returns RESPONSE_FILTER_ERROR to indicate an error.
18814     ///
18815     /// Do not keep a reference to the buffers passed to this function.
18816     ///
18817     extern(System) cef_response_filter_status_t function (
18818         cef_response_filter_t* self,
18819         void* data_in,
18820         size_t data_in_size,
18821         size_t* data_in_read,
18822         void* data_out,
18823         size_t data_out_size,
18824         size_t* data_out_written) nothrow filter;
18825 }
18826 
18827 
18828 
18829 // CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_
18830 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
18831 //
18832 // Redistribution and use in source and binary forms, with or without
18833 // modification, are permitted provided that the following conditions are
18834 // met:
18835 //
18836 //    * Redistributions of source code must retain the above copyright
18837 // notice, this list of conditions and the following disclaimer.
18838 //    * Redistributions in binary form must reproduce the above
18839 // copyright notice, this list of conditions and the following disclaimer
18840 // in the documentation and/or other materials provided with the
18841 // distribution.
18842 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18843 // Framework nor the names of its contributors may be used to endorse
18844 // or promote products derived from this software without specific prior
18845 // written permission.
18846 //
18847 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18848 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18849 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18850 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18851 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18852 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18853 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18854 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18855 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18856 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18857 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18858 //
18859 // ---------------------------------------------------------------------------
18860 //
18861 // This file was generated by the CEF translator tool and should not edited
18862 // by hand. See the translator.README.txt file in the tools directory for
18863 // more information.
18864 //
18865 // $hash=dd3f6003f9a8f59c2eb4320c382651a441086aee$
18866 //
18867 
18868 extern (C):
18869 
18870 ///
18871 /// Structure that manages custom scheme registrations.
18872 ///
18873 struct cef_scheme_registrar_t
18874 {
18875     ///
18876     /// Base structure.
18877     ///
18878 
18879     ///
18880     /// Register a custom scheme. This function should not be called for the
18881     /// built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.
18882     ///
18883     /// See cef_scheme_options_t for possible values for |options|.
18884     ///
18885     /// This function may be called on any thread. It should only be called once
18886     /// per unique |scheme_name| value. If |scheme_name| is already registered or
18887     /// if an error occurs this function will return false (0).
18888     ///
18889 
18890     ///
18891     /// Structure that creates cef_resource_handler_t instances for handling scheme
18892     /// requests. The functions of this structure will always be called on the IO
18893 
18894     cef_base_scoped_t base;
18895     extern(System) int function (
18896         cef_scheme_registrar_t* self,
18897         const(cef_string_t)* scheme_name,
18898         int options) nothrow add_custom_scheme;
18899 }
18900 
18901 
18902 /// thread.
18903 ///
18904 struct cef_scheme_handler_factory_t
18905 {
18906     ///
18907     /// Base structure.
18908     ///
18909 
18910     cef_base_ref_counted_t base;
18911 
18912     ///
18913     /// Return a new resource handler instance to handle the request or an NULL
18914     /// reference to allow default handling of the request. |browser| and |frame|
18915     /// will be the browser window and frame respectively that originated the
18916     /// request or NULL if the request did not originate from a browser window
18917     /// (for example, if the request came from cef_urlrequest_t). The |request|
18918     /// object passed to this function cannot be modified.
18919     ///
18920     extern(System) cef_resource_handler_t* function (
18921         cef_scheme_handler_factory_t* self,
18922         cef_browser_t* browser,
18923         cef_frame_t* frame,
18924         const(cef_string_t)* scheme_name,
18925         cef_request_t* request) nothrow create;
18926 }
18927 
18928 
18929 
18930 ///
18931 /// Register a scheme handler factory with the global request context. An NULL
18932 /// |domain_name| value for a standard scheme will cause the factory to match
18933 /// all domain names. The |domain_name| value will be ignored for non-standard
18934 /// schemes. If |scheme_name| is a built-in scheme and no handler is returned by
18935 /// |factory| then the built-in scheme handler factory will be called. If
18936 /// |scheme_name| is a custom scheme then you must also implement the
18937 /// cef_app_t::on_register_custom_schemes() function in all processes. This
18938 /// function may be called multiple times to change or remove the factory that
18939 /// matches the specified |scheme_name| and optional |domain_name|. Returns
18940 /// false (0) if an error occurs. This function may be called on any thread in
18941 /// the browser process. Using this function is equivalent to calling cef_reques
18942 /// t_context_t::cef_request_context_get_global_context()-
18943 /// >register_scheme_handler_factory().
18944 ///
18945 int cef_register_scheme_handler_factory (
18946     const(cef_string_t)* scheme_name,
18947     const(cef_string_t)* domain_name,
18948     cef_scheme_handler_factory_t* factory);
18949 
18950 ///
18951 /// Clear all scheme handler factories registered with the global request
18952 /// context. Returns false (0) on error. This function may be called on any
18953 /// thread in the browser process. Using this function is equivalent to calling
18954 /// cef_request_context_t::cef_request_context_get_global_context()-
18955 /// >clear_scheme_handler_factories().
18956 ///
18957 int cef_clear_scheme_handler_factories ();
18958 
18959 // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_
18960 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
18961 //
18962 // Redistribution and use in source and binary forms, with or without
18963 // modification, are permitted provided that the following conditions are
18964 // met:
18965 //
18966 //    * Redistributions of source code must retain the above copyright
18967 // notice, this list of conditions and the following disclaimer.
18968 //    * Redistributions in binary form must reproduce the above
18969 // copyright notice, this list of conditions and the following disclaimer
18970 // in the documentation and/or other materials provided with the
18971 // distribution.
18972 //    * Neither the name of Google Inc. nor the name Chromium Embedded
18973 // Framework nor the names of its contributors may be used to endorse
18974 // or promote products derived from this software without specific prior
18975 // written permission.
18976 //
18977 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18978 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18979 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18980 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18981 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18982 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18983 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
18984 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18985 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18986 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18987 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18988 //
18989 // ---------------------------------------------------------------------------
18990 //
18991 // This file was generated by the CEF translator tool and should not edited
18992 // by hand. See the translator.README.txt file in the tools directory for
18993 // more information.
18994 //
18995 // $hash=b85c5d4060c951571f122e519e7dc7e9a4c4e629$
18996 //
18997 
18998 extern (C):
18999 
19000 ///
19001 /// Structure representing a server that supports HTTP and WebSocket requests.
19002 /// Server capacity is limited and is intended to handle only a small number of
19003 /// simultaneous connections (e.g. for communicating between applications on
19004 /// localhost). The functions of this structure are safe to call from any thread
19005 /// in the brower process unless otherwise indicated.
19006 ///
19007 struct cef_server_t
19008 {
19009     ///
19010     /// Base structure.
19011     ///
19012 
19013     ///
19014     /// Returns the task runner for the dedicated server thread.
19015     ///
19016 
19017     ///
19018     /// Stop the server and shut down the dedicated server thread. See
19019     /// cef_server_handler_t::OnServerCreated documentation for a description of
19020 
19021     cef_base_ref_counted_t base;
19022     extern(System) cef_task_runner_t* function (cef_server_t* self) nothrow get_task_runner;
19023     /// server lifespan.
19024     ///
19025     extern(System) void function (cef_server_t* self) nothrow shutdown;
19026 
19027     ///
19028     /// Returns true (1) if the server is currently running and accepting incoming
19029     /// connections. See cef_server_handler_t::OnServerCreated documentation for a
19030     /// description of server lifespan. This function must be called on the
19031     /// dedicated server thread.
19032     ///
19033     extern(System) int function (cef_server_t* self) nothrow is_running;
19034 
19035     ///
19036     /// Returns the server address including the port number.
19037     ///
19038     // The resulting string must be freed by calling cef_string_userfree_free().
19039     extern(System) cef_string_userfree_t function (cef_server_t* self) nothrow get_address;
19040 
19041     ///
19042     /// Returns true (1) if the server currently has a connection. This function
19043     /// must be called on the dedicated server thread.
19044     ///
19045     extern(System) int function (cef_server_t* self) nothrow has_connection;
19046 
19047     ///
19048     /// Returns true (1) if |connection_id| represents a valid connection. This
19049     /// function must be called on the dedicated server thread.
19050     ///
19051     extern(System) int function (cef_server_t* self, int connection_id) nothrow is_valid_connection;
19052 
19053     ///
19054     /// Send an HTTP 200 "OK" response to the connection identified by
19055     /// |connection_id|. |content_type| is the response content type (e.g.
19056     /// "text/html"), |data| is the response content, and |data_size| is the size
19057     /// of |data| in bytes. The contents of |data| will be copied. The connection
19058     /// will be closed automatically after the response is sent.
19059     ///
19060     extern(System) void function (
19061         cef_server_t* self,
19062         int connection_id,
19063         const(cef_string_t)* content_type,
19064         const(void)* data,
19065         size_t data_size) nothrow send_http200response;
19066 
19067     ///
19068     /// Send an HTTP 404 "Not Found" response to the connection identified by
19069     /// |connection_id|. The connection will be closed automatically after the
19070     /// response is sent.
19071     ///
19072     extern(System) void function (
19073         cef_server_t* self,
19074         int connection_id) nothrow send_http404response;
19075 
19076     ///
19077     /// Send an HTTP 500 "Internal Server Error" response to the connection
19078     /// identified by |connection_id|. |error_message| is the associated error
19079     /// message. The connection will be closed automatically after the response is
19080     /// sent.
19081     ///
19082     extern(System) void function (
19083         cef_server_t* self,
19084         int connection_id,
19085         const(cef_string_t)* error_message) nothrow send_http500response;
19086 
19087     ///
19088     /// Send a custom HTTP response to the connection identified by
19089     /// |connection_id|. |response_code| is the HTTP response code sent in the
19090     /// status line (e.g. 200), |content_type| is the response content type sent
19091     /// as the "Content-Type" header (e.g. "text/html"), |content_length| is the
19092     /// expected content length, and |extra_headers| is the map of extra response
19093     /// headers. If |content_length| is >= 0 then the "Content-Length" header will
19094     /// be sent. If |content_length| is 0 then no content is expected and the
19095     /// connection will be closed automatically after the response is sent. If
19096     /// |content_length| is < 0 then no "Content-Length" header will be sent and
19097     /// the client will continue reading until the connection is closed. Use the
19098     /// SendRawData function to send the content, if applicable, and call
19099     /// CloseConnection after all content has been sent.
19100     ///
19101     extern(System) void function (
19102         cef_server_t* self,
19103         int connection_id,
19104         int response_code,
19105         const(cef_string_t)* content_type,
19106         long content_length,
19107         cef_string_multimap_t extra_headers) nothrow send_http_response;
19108 
19109     ///
19110     /// Send raw data directly to the connection identified by |connection_id|.
19111     /// |data| is the raw data and |data_size| is the size of |data| in bytes. The
19112     /// contents of |data| will be copied. No validation of |data| is performed
19113     /// internally so the client should be careful to send the amount indicated by
19114     /// the "Content-Length" header, if specified. See SendHttpResponse
19115     /// documentation for intended usage.
19116     ///
19117     extern(System) void function (
19118         cef_server_t* self,
19119         int connection_id,
19120         const(void)* data,
19121         size_t data_size) nothrow send_raw_data;
19122 
19123     ///
19124     /// Close the connection identified by |connection_id|. See SendHttpResponse
19125     /// documentation for intended usage.
19126     ///
19127     extern(System) void function (cef_server_t* self, int connection_id) nothrow close_connection;
19128 
19129     ///
19130     /// Send a WebSocket message to the connection identified by |connection_id|.
19131     /// |data| is the response content and |data_size| is the size of |data| in
19132     /// bytes. The contents of |data| will be copied. See
19133     /// cef_server_handler_t::OnWebSocketRequest documentation for intended usage.
19134     ///
19135     extern(System) void function (
19136         cef_server_t* self,
19137         int connection_id,
19138         const(void)* data,
19139         size_t data_size) nothrow send_web_socket_message;
19140 }
19141 
19142 
19143 
19144 ///
19145 /// Create a new server that binds to |address| and |port|. |address| must be a
19146 /// valid IPv4 or IPv6 address (e.g. 127.0.0.1 or ::1) and |port| must be a port
19147 /// number outside of the reserved range (e.g. between 1025 and 65535 on most
19148 /// platforms). |backlog| is the maximum number of pending connections. A new
19149 /// thread will be created for each CreateServer call (the "dedicated server
19150 /// thread"). It is therefore recommended to use a different
19151 /// cef_server_handler_t instance for each CreateServer call to avoid thread
19152 /// safety issues in the cef_server_handler_t implementation. The
19153 /// cef_server_handler_t::OnServerCreated function will be called on the
19154 /// dedicated server thread to report success or failure. See
19155 /// cef_server_handler_t::OnServerCreated documentation for a description of
19156 /// server lifespan.
19157 ///
19158 void cef_server_create (
19159     const(cef_string_t)* address,
19160     ushort port,
19161     int backlog,
19162     cef_server_handler_t* handler);
19163 
19164 ///
19165 /// Implement this structure to handle HTTP server requests. A new thread will
19166 /// be created for each cef_server_t::CreateServer call (the "dedicated server
19167 /// thread"), and the functions of this structure will be called on that thread.
19168 /// It is therefore recommended to use a different cef_server_handler_t instance
19169 /// for each cef_server_t::CreateServer call to avoid thread safety issues in
19170 /// the cef_server_handler_t implementation.
19171 ///
19172 struct cef_server_handler_t
19173 {
19174     ///
19175     /// Base structure.
19176     ///
19177     cef_base_ref_counted_t base;
19178 
19179     ///
19180     /// Called when |server| is created. If the server was started successfully
19181     /// then cef_server_t::IsRunning will return true (1). The server will
19182     /// continue running until cef_server_t::Shutdown is called, after which time
19183     /// OnServerDestroyed will be called. If the server failed to start then
19184     /// OnServerDestroyed will be called immediately after this function returns.
19185     ///
19186     extern(System) void function (
19187         cef_server_handler_t* self,
19188         cef_server_t* server) nothrow on_server_created;
19189 
19190     ///
19191     /// Called when |server| is destroyed. The server thread will be stopped after
19192     /// this function returns. The client should release any references to
19193     /// |server| when this function is called. See OnServerCreated documentation
19194     /// for a description of server lifespan.
19195     ///
19196     extern(System) void function (
19197         cef_server_handler_t* self,
19198         cef_server_t* server) nothrow on_server_destroyed;
19199 
19200     ///
19201     /// Called when a client connects to |server|. |connection_id| uniquely
19202     /// identifies the connection. Each call to this function will have a matching
19203     /// call to OnClientDisconnected.
19204     ///
19205     extern(System) void function (
19206         cef_server_handler_t* self,
19207         cef_server_t* server,
19208         int connection_id) nothrow on_client_connected;
19209 
19210     ///
19211     /// Called when a client disconnects from |server|. |connection_id| uniquely
19212     /// identifies the connection. The client should release any data associated
19213     /// with |connection_id| when this function is called and |connection_id|
19214     /// should no longer be passed to cef_server_t functions. Disconnects can
19215     /// originate from either the client or the server. For example, the server
19216     /// will disconnect automatically after a cef_server_t::SendHttpXXXResponse
19217     /// function is called.
19218     ///
19219     extern(System) void function (
19220         cef_server_handler_t* self,
19221         cef_server_t* server,
19222         int connection_id) nothrow on_client_disconnected;
19223 
19224     ///
19225     /// Called when |server| receives an HTTP request. |connection_id| uniquely
19226     /// identifies the connection, |client_address| is the requesting IPv4 or IPv6
19227     /// client address including port number, and |request| contains the request
19228     /// contents (URL, function, headers and optional POST data). Call
19229     /// cef_server_t functions either synchronously or asynchronusly to send a
19230     /// response.
19231     ///
19232     extern(System) void function (
19233         cef_server_handler_t* self,
19234         cef_server_t* server,
19235         int connection_id,
19236         const(cef_string_t)* client_address,
19237         cef_request_t* request) nothrow on_http_request;
19238 
19239     ///
19240     /// Called when |server| receives a WebSocket request. |connection_id|
19241     /// uniquely identifies the connection, |client_address| is the requesting
19242     /// IPv4 or IPv6 client address including port number, and |request| contains
19243     /// the request contents (URL, function, headers and optional POST data).
19244     /// Execute |callback| either synchronously or asynchronously to accept or
19245     /// decline the WebSocket connection. If the request is accepted then
19246     /// OnWebSocketConnected will be called after the WebSocket has connected and
19247     /// incoming messages will be delivered to the OnWebSocketMessage callback. If
19248     /// the request is declined then the client will be disconnected and
19249     /// OnClientDisconnected will be called. Call the
19250     /// cef_server_t::SendWebSocketMessage function after receiving the
19251     /// OnWebSocketConnected callback to respond with WebSocket messages.
19252     ///
19253     extern(System) void function (
19254         cef_server_handler_t* self,
19255         cef_server_t* server,
19256         int connection_id,
19257         const(cef_string_t)* client_address,
19258         cef_request_t* request,
19259         cef_callback_t* callback) nothrow on_web_socket_request;
19260 
19261     ///
19262     /// Called after the client has accepted the WebSocket connection for |server|
19263     /// and |connection_id| via the OnWebSocketRequest callback. See
19264     /// OnWebSocketRequest documentation for intended usage.
19265     ///
19266     extern(System) void function (
19267         cef_server_handler_t* self,
19268         cef_server_t* server,
19269         int connection_id) nothrow on_web_socket_connected;
19270 
19271     ///
19272     /// Called when |server| receives an WebSocket message. |connection_id|
19273     /// uniquely identifies the connection, |data| is the message content and
19274     /// |data_size| is the size of |data| in bytes. Do not keep a reference to
19275     /// |data| outside of this function. See OnWebSocketRequest documentation for
19276     /// intended usage.
19277     ///
19278     extern(System) void function (
19279         cef_server_handler_t* self,
19280         cef_server_t* server,
19281         int connection_id,
19282         const(void)* data,
19283         size_t data_size) nothrow on_web_socket_message;
19284 }
19285 
19286 
19287 
19288 // CEF_INCLUDE_CAPI_CEF_SERVER_CAPI_H_
19289 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
19290 //
19291 // Redistribution and use in source and binary forms, with or without
19292 // modification, are permitted provided that the following conditions are
19293 // met:
19294 //
19295 //    * Redistributions of source code must retain the above copyright
19296 // notice, this list of conditions and the following disclaimer.
19297 //    * Redistributions in binary form must reproduce the above
19298 // copyright notice, this list of conditions and the following disclaimer
19299 // in the documentation and/or other materials provided with the
19300 // distribution.
19301 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19302 // Framework nor the names of its contributors may be used to endorse
19303 // or promote products derived from this software without specific prior
19304 // written permission.
19305 //
19306 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19307 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19308 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19309 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19310 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19311 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19312 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19313 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19314 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19315 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19316 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19317 //
19318 // ---------------------------------------------------------------------------
19319 //
19320 // This file was generated by the CEF translator tool and should not edited
19321 // by hand. See the translator.README.txt file in the tools directory for
19322 // more information.
19323 //
19324 // $hash=3d208a996f65f37012460edb1890773218580913$
19325 //
19326 
19327 extern (C):
19328 
19329 ///
19330 /// Structure that wraps platform-dependent share memory region mapping.
19331 ///
19332 struct cef_shared_memory_region_t
19333 {
19334     ///
19335     /// Base structure.
19336     ///
19337 
19338     ///
19339     /// Returns true (1) if the mapping is valid.
19340     ///
19341 
19342     ///
19343     /// Returns the size of the mapping in bytes. Returns 0 for invalid instances.
19344     ///
19345 
19346     ///
19347     /// Returns the pointer to the memory. Returns nullptr for invalid instances.
19348     /// The returned pointer is only valid for the life span of this object.
19349     ///
19350 
19351     // CEF_INCLUDE_CAPI_CEF_SHARED_MEMORY_REGION_CAPI_H_
19352 
19353     cef_base_ref_counted_t base;
19354     extern(System) int function (cef_shared_memory_region_t* self) nothrow is_valid;
19355     extern(System) size_t function (cef_shared_memory_region_t* self) nothrow size;
19356     extern(System) void* function (cef_shared_memory_region_t* self) nothrow memory;
19357 }
19358 
19359 
19360 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
19361 //
19362 // Redistribution and use in source and binary forms, with or without
19363 // modification, are permitted provided that the following conditions are
19364 // met:
19365 //
19366 //    * Redistributions of source code must retain the above copyright
19367 // notice, this list of conditions and the following disclaimer.
19368 //    * Redistributions in binary form must reproduce the above
19369 // copyright notice, this list of conditions and the following disclaimer
19370 // in the documentation and/or other materials provided with the
19371 // distribution.
19372 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19373 // Framework nor the names of its contributors may be used to endorse
19374 // or promote products derived from this software without specific prior
19375 // written permission.
19376 //
19377 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19378 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19379 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19380 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19381 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19382 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19383 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19384 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19385 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19386 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19387 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19388 //
19389 // ---------------------------------------------------------------------------
19390 //
19391 // This file was generated by the CEF translator tool and should not edited
19392 // by hand. See the translator.README.txt file in the tools directory for
19393 // more information.
19394 //
19395 // $hash=1ae66f6ec465fda2d62530f5871efd58c89e7568$
19396 //
19397 
19398 extern (C):
19399 
19400 ///
19401 /// Structure that builds a cef_process_message_t containing a shared memory
19402 /// region. This structure is not thread-safe but may be used exclusively on a
19403 /// different thread from the one which constructed it.
19404 ///
19405 struct cef_shared_process_message_builder_t
19406 {
19407     ///
19408     /// Base structure.
19409     ///
19410 
19411     ///
19412     /// Returns true (1) if the builder is valid.
19413     ///
19414 
19415     ///
19416     /// Returns the size of the shared memory region in bytes. Returns 0 for
19417     /// invalid instances.
19418     ///
19419 
19420     ///
19421     /// Returns the pointer to the writable memory. Returns nullptr for invalid
19422     /// instances. The returned pointer is only valid for the life span of this
19423 
19424     cef_base_ref_counted_t base;
19425     extern(System) int function (cef_shared_process_message_builder_t* self) nothrow is_valid;
19426     extern(System) size_t function (cef_shared_process_message_builder_t* self) nothrow size;
19427     /// object.
19428     ///
19429     extern(System) void* function (cef_shared_process_message_builder_t* self) nothrow memory;
19430 
19431     ///
19432     /// Creates a new cef_process_message_t from the data provided to the builder.
19433     /// Returns nullptr for invalid instances. Invalidates the builder instance.
19434     ///
19435     extern(System) cef_process_message_t* function (
19436         cef_shared_process_message_builder_t* self) nothrow build;
19437 }
19438 
19439 
19440 
19441 ///
19442 /// Creates a new cef_shared_process_message_builder_t with the specified |name|
19443 /// and shared memory region of specified |byte_size|.
19444 ///
19445 cef_shared_process_message_builder_t* cef_shared_process_message_builder_create (
19446     const(cef_string_t)* name,
19447     size_t byte_size);
19448 
19449 // CEF_INCLUDE_CAPI_CEF_SHARED_PROCESS_MESSAGE_BUILDER_CAPI_H_
19450 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
19451 //
19452 // Redistribution and use in source and binary forms, with or without
19453 // modification, are permitted provided that the following conditions are
19454 // met:
19455 //
19456 //    * Redistributions of source code must retain the above copyright
19457 // notice, this list of conditions and the following disclaimer.
19458 //    * Redistributions in binary form must reproduce the above
19459 // copyright notice, this list of conditions and the following disclaimer
19460 // in the documentation and/or other materials provided with the
19461 // distribution.
19462 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19463 // Framework nor the names of its contributors may be used to endorse
19464 // or promote products derived from this software without specific prior
19465 // written permission.
19466 //
19467 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19468 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19469 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19470 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19471 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19472 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19473 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19474 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19475 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19476 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19477 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19478 //
19479 // ---------------------------------------------------------------------------
19480 //
19481 // This file was generated by the CEF translator tool and should not edited
19482 // by hand. See the translator.README.txt file in the tools directory for
19483 // more information.
19484 //
19485 // $hash=d781f3791df17c6d6adc4414e8534a6b13a54ff2$
19486 //
19487 
19488 extern (C):
19489 
19490 ///
19491 /// Structure representing SSL information.
19492 ///
19493 struct cef_sslinfo_t
19494 {
19495     ///
19496     /// Base structure.
19497     ///
19498 
19499     ///
19500     /// Returns a bitmask containing any and all problems verifying the server
19501     /// certificate.
19502     ///
19503 
19504     ///
19505     /// Returns the X.509 certificate.
19506     ///
19507 
19508     ///
19509     /// Returns true (1) if the certificate status represents an error.
19510     ///
19511 
19512     // CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
19513 
19514     cef_base_ref_counted_t base;
19515     extern(System) cef_cert_status_t function (cef_sslinfo_t* self) nothrow get_cert_status;
19516     extern(System) cef_x509certificate_t* function (
19517         cef_sslinfo_t* self) nothrow get_x509certificate;
19518 }
19519 
19520 
19521 int cef_is_cert_status_error (cef_cert_status_t status);
19522 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
19523 //
19524 // Redistribution and use in source and binary forms, with or without
19525 // modification, are permitted provided that the following conditions are
19526 // met:
19527 //
19528 //    * Redistributions of source code must retain the above copyright
19529 // notice, this list of conditions and the following disclaimer.
19530 //    * Redistributions in binary form must reproduce the above
19531 // copyright notice, this list of conditions and the following disclaimer
19532 // in the documentation and/or other materials provided with the
19533 // distribution.
19534 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19535 // Framework nor the names of its contributors may be used to endorse
19536 // or promote products derived from this software without specific prior
19537 // written permission.
19538 //
19539 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19540 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19541 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19542 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19543 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19544 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19545 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19546 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19547 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19548 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19549 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19550 //
19551 // ---------------------------------------------------------------------------
19552 //
19553 // This file was generated by the CEF translator tool and should not edited
19554 // by hand. See the translator.README.txt file in the tools directory for
19555 // more information.
19556 //
19557 // $hash=1d224cc81c5a42ce8d7de172ff7341f1e0785f46$
19558 //
19559 
19560 extern (C):
19561 
19562 ///
19563 /// Structure representing the SSL information for a navigation entry.
19564 ///
19565 struct cef_sslstatus_t
19566 {
19567     ///
19568     /// Base structure.
19569     ///
19570 
19571     ///
19572     /// Returns true (1) if the status is related to a secure SSL/TLS connection.
19573     ///
19574 
19575     ///
19576     /// Returns a bitmask containing any and all problems verifying the server
19577     /// certificate.
19578     ///
19579 
19580     ///
19581     /// Returns the SSL version used for the SSL connection.
19582     ///
19583 
19584     ///
19585     /// Returns a bitmask containing the page security content status.
19586     ///
19587 
19588     cef_base_ref_counted_t base;
19589     extern(System) int function (cef_sslstatus_t* self) nothrow is_secure_connection;
19590     extern(System) cef_cert_status_t function (cef_sslstatus_t* self) nothrow get_cert_status;
19591     extern(System) cef_ssl_version_t function (cef_sslstatus_t* self) nothrow get_sslversion;
19592     extern(System) cef_ssl_content_status_t function (
19593         cef_sslstatus_t* self) nothrow get_content_status;
19594 
19595     ///
19596     /// Returns the X.509 certificate.
19597     ///
19598     extern(System) cef_x509certificate_t* function (
19599         cef_sslstatus_t* self) nothrow get_x509certificate;
19600 }
19601 
19602 
19603 
19604 // CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_
19605 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
19606 //
19607 // Redistribution and use in source and binary forms, with or without
19608 // modification, are permitted provided that the following conditions are
19609 // met:
19610 //
19611 //    * Redistributions of source code must retain the above copyright
19612 // notice, this list of conditions and the following disclaimer.
19613 //    * Redistributions in binary form must reproduce the above
19614 // copyright notice, this list of conditions and the following disclaimer
19615 // in the documentation and/or other materials provided with the
19616 // distribution.
19617 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19618 // Framework nor the names of its contributors may be used to endorse
19619 // or promote products derived from this software without specific prior
19620 // written permission.
19621 //
19622 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19623 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19624 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19625 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19626 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19627 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19628 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19629 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19630 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19631 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19632 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19633 //
19634 // ---------------------------------------------------------------------------
19635 //
19636 // This file was generated by the CEF translator tool and should not edited
19637 // by hand. See the translator.README.txt file in the tools directory for
19638 // more information.
19639 //
19640 // $hash=f55fa17800b9a63d128fb78201372754f9250875$
19641 //
19642 
19643 extern (C):
19644 
19645 ///
19646 /// Structure the client can implement to provide a custom stream reader. The
19647 /// functions of this structure may be called on any thread.
19648 ///
19649 struct cef_read_handler_t
19650 {
19651     ///
19652     /// Base structure.
19653     ///
19654 
19655     ///
19656     /// Read raw binary data.
19657     ///
19658 
19659     ///
19660     /// Seek to the specified offset position. |whence| may be any one of
19661     /// SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on
19662     /// failure.
19663     ///
19664 
19665     ///
19666     /// Return the current offset position.
19667     ///
19668 
19669     ///
19670 
19671     cef_base_ref_counted_t base;
19672     extern(System) size_t function (
19673         cef_read_handler_t* self,
19674         void* ptr,
19675         size_t size,
19676         size_t n) nothrow read;
19677     extern(System) int function (cef_read_handler_t* self, long offset, int whence) nothrow seek;
19678     extern(System) long function (cef_read_handler_t* self) nothrow tell;
19679     /// Return non-zero if at end of file.
19680     ///
19681     extern(System) int function (cef_read_handler_t* self) nothrow eof;
19682 
19683     ///
19684     /// Return true (1) if this handler performs work like accessing the file
19685     /// system which may block. Used as a hint for determining the thread to
19686     /// access the handler from.
19687     ///
19688     extern(System) int function (cef_read_handler_t* self) nothrow may_block;
19689 }
19690 
19691 
19692 
19693 ///
19694 /// Structure used to read data from a stream. The functions of this structure
19695 /// may be called on any thread.
19696 ///
19697 struct cef_stream_reader_t
19698 {
19699     ///
19700     /// Base structure.
19701     ///
19702     cef_base_ref_counted_t base;
19703 
19704     ///
19705     /// Read raw binary data.
19706     ///
19707     extern(System) size_t function (
19708         cef_stream_reader_t* self,
19709         void* ptr,
19710         size_t size,
19711         size_t n) nothrow read;
19712 
19713     ///
19714     /// Seek to the specified offset position. |whence| may be any one of
19715     /// SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on
19716     /// failure.
19717     ///
19718     extern(System) int function (cef_stream_reader_t* self, long offset, int whence) nothrow seek;
19719 
19720     ///
19721     /// Return the current offset position.
19722     ///
19723     extern(System) long function (cef_stream_reader_t* self) nothrow tell;
19724 
19725     ///
19726     /// Return non-zero if at end of file.
19727     ///
19728     extern(System) int function (cef_stream_reader_t* self) nothrow eof;
19729 
19730     ///
19731     /// Returns true (1) if this reader performs work like accessing the file
19732     /// system which may block. Used as a hint for determining the thread to
19733     /// access the reader from.
19734     ///
19735     extern(System) int function (cef_stream_reader_t* self) nothrow may_block;
19736 }
19737 
19738 
19739 
19740 ///
19741 /// Create a new cef_stream_reader_t object from a file.
19742 ///
19743 cef_stream_reader_t* cef_stream_reader_create_for_file (
19744     const(cef_string_t)* fileName);
19745 
19746 ///
19747 /// Create a new cef_stream_reader_t object from data.
19748 ///
19749 cef_stream_reader_t* cef_stream_reader_create_for_data (
19750     void* data,
19751     size_t size);
19752 
19753 ///
19754 /// Create a new cef_stream_reader_t object from a custom handler.
19755 ///
19756 cef_stream_reader_t* cef_stream_reader_create_for_handler (
19757     cef_read_handler_t* handler);
19758 
19759 ///
19760 /// Structure the client can implement to provide a custom stream writer. The
19761 /// functions of this structure may be called on any thread.
19762 ///
19763 struct cef_write_handler_t
19764 {
19765     ///
19766     /// Base structure.
19767     ///
19768     cef_base_ref_counted_t base;
19769 
19770     ///
19771     /// Write raw binary data.
19772     ///
19773     extern(System) size_t function (
19774         cef_write_handler_t* self,
19775         const(void)* ptr,
19776         size_t size,
19777         size_t n) nothrow write;
19778 
19779     ///
19780     /// Seek to the specified offset position. |whence| may be any one of
19781     /// SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on
19782     /// failure.
19783     ///
19784     extern(System) int function (cef_write_handler_t* self, long offset, int whence) nothrow seek;
19785 
19786     ///
19787     /// Return the current offset position.
19788     ///
19789     extern(System) long function (cef_write_handler_t* self) nothrow tell;
19790 
19791     ///
19792     /// Flush the stream.
19793     ///
19794     extern(System) int function (cef_write_handler_t* self) nothrow flush;
19795 
19796     ///
19797     /// Return true (1) if this handler performs work like accessing the file
19798     /// system which may block. Used as a hint for determining the thread to
19799     /// access the handler from.
19800     ///
19801     extern(System) int function (cef_write_handler_t* self) nothrow may_block;
19802 }
19803 
19804 
19805 
19806 ///
19807 /// Structure used to write data to a stream. The functions of this structure
19808 /// may be called on any thread.
19809 ///
19810 struct cef_stream_writer_t
19811 {
19812     ///
19813     /// Base structure.
19814     ///
19815     cef_base_ref_counted_t base;
19816 
19817     ///
19818     /// Write raw binary data.
19819     ///
19820     extern(System) size_t function (
19821         cef_stream_writer_t* self,
19822         const(void)* ptr,
19823         size_t size,
19824         size_t n) nothrow write;
19825 
19826     ///
19827     /// Seek to the specified offset position. |whence| may be any one of
19828     /// SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on
19829     /// failure.
19830     ///
19831     extern(System) int function (cef_stream_writer_t* self, long offset, int whence) nothrow seek;
19832 
19833     ///
19834     /// Return the current offset position.
19835     ///
19836     extern(System) long function (cef_stream_writer_t* self) nothrow tell;
19837 
19838     ///
19839     /// Flush the stream.
19840     ///
19841     extern(System) int function (cef_stream_writer_t* self) nothrow flush;
19842 
19843     ///
19844     /// Returns true (1) if this writer performs work like accessing the file
19845     /// system which may block. Used as a hint for determining the thread to
19846     /// access the writer from.
19847     ///
19848     extern(System) int function (cef_stream_writer_t* self) nothrow may_block;
19849 }
19850 
19851 
19852 
19853 ///
19854 /// Create a new cef_stream_writer_t object for a file.
19855 ///
19856 cef_stream_writer_t* cef_stream_writer_create_for_file (
19857     const(cef_string_t)* fileName);
19858 
19859 ///
19860 /// Create a new cef_stream_writer_t object for a custom handler.
19861 ///
19862 cef_stream_writer_t* cef_stream_writer_create_for_handler (
19863     cef_write_handler_t* handler);
19864 
19865 // CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
19866 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
19867 //
19868 // Redistribution and use in source and binary forms, with or without
19869 // modification, are permitted provided that the following conditions are
19870 // met:
19871 //
19872 //    * Redistributions of source code must retain the above copyright
19873 // notice, this list of conditions and the following disclaimer.
19874 //    * Redistributions in binary form must reproduce the above
19875 // copyright notice, this list of conditions and the following disclaimer
19876 // in the documentation and/or other materials provided with the
19877 // distribution.
19878 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19879 // Framework nor the names of its contributors may be used to endorse
19880 // or promote products derived from this software without specific prior
19881 // written permission.
19882 //
19883 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19884 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19885 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19886 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19887 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19888 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19889 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19890 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19891 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19892 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19893 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19894 //
19895 // ---------------------------------------------------------------------------
19896 //
19897 // This file was generated by the CEF translator tool and should not edited
19898 // by hand. See the translator.README.txt file in the tools directory for
19899 // more information.
19900 //
19901 // $hash=c43ca147d723753000bc819d64d09b83a23bfac2$
19902 //
19903 
19904 extern (C):
19905 
19906 ///
19907 /// Implement this structure to receive string values asynchronously.
19908 ///
19909 struct cef_string_visitor_t
19910 {
19911     ///
19912     /// Base structure.
19913     ///
19914 
19915     ///
19916     /// Method that will be executed.
19917     ///
19918 
19919     // CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_
19920 
19921     cef_base_ref_counted_t base;
19922     extern(System) void function (
19923         cef_string_visitor_t* self,
19924         const(cef_string_t)* string) nothrow visit;
19925 }
19926 
19927 
19928 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
19929 //
19930 // Redistribution and use in source and binary forms, with or without
19931 // modification, are permitted provided that the following conditions are
19932 // met:
19933 //
19934 //    * Redistributions of source code must retain the above copyright
19935 // notice, this list of conditions and the following disclaimer.
19936 //    * Redistributions in binary form must reproduce the above
19937 // copyright notice, this list of conditions and the following disclaimer
19938 // in the documentation and/or other materials provided with the
19939 // distribution.
19940 //    * Neither the name of Google Inc. nor the name Chromium Embedded
19941 // Framework nor the names of its contributors may be used to endorse
19942 // or promote products derived from this software without specific prior
19943 // written permission.
19944 //
19945 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19946 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19947 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19948 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19949 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19950 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19951 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19952 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19953 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19954 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19955 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19956 //
19957 // ---------------------------------------------------------------------------
19958 //
19959 // This file was generated by the CEF translator tool and should not edited
19960 // by hand. See the translator.README.txt file in the tools directory for
19961 // more information.
19962 //
19963 // $hash=d6055c4567fec4f3e9c72b0536812f40a97c0c3c$
19964 //
19965 
19966 extern (C):
19967 
19968 ///
19969 /// Implement this structure for asynchronous task execution. If the task is
19970 /// posted successfully and if the associated message loop is still running then
19971 /// the execute() function will be called on the target thread. If the task
19972 /// fails to post then the task object may be destroyed on the source thread
19973 /// instead of the target thread. For this reason be cautious when performing
19974 /// work in the task object destructor.
19975 ///
19976 struct cef_task_t
19977 {
19978     ///
19979     /// Base structure.
19980     ///
19981 
19982     ///
19983     /// Method that will be executed on the target thread.
19984     ///
19985 
19986     ///
19987     /// Structure that asynchronously executes tasks on the associated thread. It is
19988     /// safe to call the functions of this structure on any thread.
19989     ///
19990     /// CEF maintains multiple internal threads that are used for handling different
19991     /// types of tasks in different processes. The cef_thread_id_t definitions in
19992 
19993     cef_base_ref_counted_t base;
19994     extern(System) void function (cef_task_t* self) nothrow execute;
19995 }
19996 
19997 
19998 /// cef_types.h list the common CEF threads. Task runners are also available for
19999 /// other CEF threads as appropriate (for example, V8 WebWorker threads).
20000 ///
20001 struct cef_task_runner_t
20002 {
20003     ///
20004     /// Base structure.
20005     ///
20006     cef_base_ref_counted_t base;
20007 
20008     ///
20009     /// Returns true (1) if this object is pointing to the same task runner as
20010     /// |that| object.
20011     ///
20012     extern(System) int function (cef_task_runner_t* self, cef_task_runner_t* that) nothrow is_same;
20013 
20014     ///
20015     /// Returns true (1) if this task runner belongs to the current thread.
20016     ///
20017     extern(System) int function (cef_task_runner_t* self) nothrow belongs_to_current_thread;
20018 
20019     ///
20020     /// Returns true (1) if this task runner is for the specified CEF thread.
20021     ///
20022     extern(System) int function (
20023         cef_task_runner_t* self,
20024         cef_thread_id_t threadId) nothrow belongs_to_thread;
20025 
20026     ///
20027     /// Post a task for execution on the thread associated with this task runner.
20028     /// Execution will occur asynchronously.
20029     ///
20030     extern(System) int function (cef_task_runner_t* self, cef_task_t* task) nothrow post_task;
20031 
20032     ///
20033     /// Post a task for delayed execution on the thread associated with this task
20034     /// runner. Execution will occur asynchronously. Delayed tasks are not
20035     /// supported on V8 WebWorker threads and will be executed without the
20036     /// specified delay.
20037     ///
20038     extern(System) int function (
20039         cef_task_runner_t* self,
20040         cef_task_t* task,
20041         long delay_ms) nothrow post_delayed_task;
20042 }
20043 
20044 
20045 
20046 ///
20047 /// Returns the task runner for the current thread. Only CEF threads will have
20048 /// task runners. An NULL reference will be returned if this function is called
20049 /// on an invalid thread.
20050 ///
20051 cef_task_runner_t* cef_task_runner_get_for_current_thread ();
20052 
20053 ///
20054 /// Returns the task runner for the specified CEF thread.
20055 ///
20056 cef_task_runner_t* cef_task_runner_get_for_thread (cef_thread_id_t threadId);
20057 
20058 ///
20059 /// Returns true (1) if called on the specified thread. Equivalent to using
20060 /// cef_task_runner_t::GetForThread(threadId)->belongs_to_current_thread().
20061 ///
20062 int cef_currently_on (cef_thread_id_t threadId);
20063 
20064 ///
20065 /// Post a task for execution on the specified thread. Equivalent to using
20066 /// cef_task_runner_t::GetForThread(threadId)->PostTask(task).
20067 ///
20068 int cef_post_task (cef_thread_id_t threadId, cef_task_t* task);
20069 
20070 ///
20071 /// Post a task for delayed execution on the specified thread. Equivalent to
20072 /// using cef_task_runner_t::GetForThread(threadId)->PostDelayedTask(task,
20073 /// delay_ms).
20074 ///
20075 int cef_post_delayed_task (
20076     cef_thread_id_t threadId,
20077     cef_task_t* task,
20078     long delay_ms);
20079 
20080 // CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_
20081 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
20082 //
20083 // Redistribution and use in source and binary forms, with or without
20084 // modification, are permitted provided that the following conditions are
20085 // met:
20086 //
20087 //    * Redistributions of source code must retain the above copyright
20088 // notice, this list of conditions and the following disclaimer.
20089 //    * Redistributions in binary form must reproduce the above
20090 // copyright notice, this list of conditions and the following disclaimer
20091 // in the documentation and/or other materials provided with the
20092 // distribution.
20093 //    * Neither the name of Google Inc. nor the name Chromium Embedded
20094 // Framework nor the names of its contributors may be used to endorse
20095 // or promote products derived from this software without specific prior
20096 // written permission.
20097 //
20098 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20099 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20100 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20101 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20102 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20103 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20104 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20105 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20106 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20107 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20108 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20109 //
20110 // ---------------------------------------------------------------------------
20111 //
20112 // This file was generated by the CEF translator tool and should not edited
20113 // by hand. See the translator.README.txt file in the tools directory for
20114 // more information.
20115 //
20116 // $hash=752a853dae97c9bfd9b6515d20f99af751ba2dd9$
20117 //
20118 
20119 extern (C):
20120 
20121 ///
20122 /// A simple thread abstraction that establishes a message loop on a new thread.
20123 /// The consumer uses cef_task_runner_t to execute code on the thread's message
20124 /// loop. The thread is terminated when the cef_thread_t object is destroyed or
20125 /// stop() is called. All pending tasks queued on the thread's message loop will
20126 /// run to completion before the thread is terminated. cef_thread_create() can
20127 /// be called on any valid CEF thread in either the browser or render process.
20128 /// This structure should only be used for tasks that require a dedicated
20129 /// thread. In most cases you can post tasks to an existing CEF thread instead
20130 /// of creating a new one; see cef_task.h for details.
20131 ///
20132 struct cef_thread_t
20133 {
20134     ///
20135     /// Base structure.
20136     ///
20137 
20138     ///
20139     /// Returns the cef_task_runner_t that will execute code on this thread's
20140 
20141     cef_base_ref_counted_t base;
20142     /// message loop. This function is safe to call from any thread.
20143     ///
20144     extern(System) cef_task_runner_t* function (cef_thread_t* self) nothrow get_task_runner;
20145 
20146     ///
20147     /// Returns the platform thread ID. It will return the same value after stop()
20148     /// is called. This function is safe to call from any thread.
20149     ///
20150     extern(System) cef_platform_thread_id_t function (
20151         cef_thread_t* self) nothrow get_platform_thread_id;
20152 
20153     ///
20154     /// Stop and join the thread. This function must be called from the same
20155     /// thread that called cef_thread_create(). Do not call this function if
20156     /// cef_thread_create() was called with a |stoppable| value of false (0).
20157     ///
20158     extern(System) void function (cef_thread_t* self) nothrow stop;
20159 
20160     ///
20161     /// Returns true (1) if the thread is currently running. This function must be
20162     /// called from the same thread that called cef_thread_create().
20163     ///
20164     extern(System) int function (cef_thread_t* self) nothrow is_running;
20165 }
20166 
20167 
20168 
20169 ///
20170 /// Create and start a new thread. This function does not block waiting for the
20171 /// thread to run initialization. |display_name| is the name that will be used
20172 /// to identify the thread. |priority| is the thread execution priority.
20173 /// |message_loop_type| indicates the set of asynchronous events that the thread
20174 /// can process. If |stoppable| is true (1) the thread will stopped and joined
20175 /// on destruction or when stop() is called; otherwise, the thread cannot be
20176 /// stopped and will be leaked on shutdown. On Windows the |com_init_mode| value
20177 /// specifies how COM will be initialized for the thread. If |com_init_mode| is
20178 /// set to COM_INIT_MODE_STA then |message_loop_type| must be set to ML_TYPE_UI.
20179 ///
20180 cef_thread_t* cef_thread_create (
20181     const(cef_string_t)* display_name,
20182     cef_thread_priority_t priority,
20183     cef_message_loop_type_t message_loop_type,
20184     int stoppable,
20185     cef_com_init_mode_t com_init_mode);
20186 
20187 // CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_
20188 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
20189 //
20190 // Redistribution and use in source and binary forms, with or without
20191 // modification, are permitted provided that the following conditions are
20192 // met:
20193 //
20194 //    * Redistributions of source code must retain the above copyright
20195 // notice, this list of conditions and the following disclaimer.
20196 //    * Redistributions in binary form must reproduce the above
20197 // copyright notice, this list of conditions and the following disclaimer
20198 // in the documentation and/or other materials provided with the
20199 // distribution.
20200 //    * Neither the name of Google Inc. nor the name Chromium Embedded
20201 // Framework nor the names of its contributors may be used to endorse
20202 // or promote products derived from this software without specific prior
20203 // written permission.
20204 //
20205 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20206 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20207 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20208 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20209 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20210 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20211 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20212 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20213 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20214 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20215 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20216 //
20217 // ---------------------------------------------------------------------------
20218 //
20219 // This file was generated by the CEF translator tool and should not edited
20220 // by hand. See the translator.README.txt file in the tools directory for
20221 // more information.
20222 //
20223 // $hash=740d6eb5bea1bfc7c4ea413fefd3bf6586a81f20$
20224 //
20225 
20226 extern (C):
20227 
20228 ///
20229 /// Implement this structure to receive notification when tracing has completed.
20230 /// The functions of this structure will be called on the browser process UI
20231 /// thread.
20232 ///
20233 struct cef_end_tracing_callback_t
20234 {
20235     ///
20236     /// Base structure.
20237     ///
20238 
20239     ///
20240     /// Called after all processes have sent their trace data. |tracing_file| is
20241     /// the path at which tracing data was written. The client is responsible for
20242     /// deleting |tracing_file|.
20243     ///
20244 
20245     ///
20246     /// Start tracing events on all processes. Tracing is initialized asynchronously
20247     /// and |callback| will be executed on the UI thread after initialization is
20248     /// complete.
20249     ///
20250     /// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is
20251 
20252     cef_base_ref_counted_t base;
20253     extern(System) void function (
20254         cef_end_tracing_callback_t* self,
20255         const(cef_string_t)* tracing_file) nothrow on_end_tracing_complete;
20256 }
20257 
20258  /// pending, CefBeginTracing will fail and return false (0).
20259 ///
20260 /// |categories| is a comma-delimited list of category wildcards. A category can
20261 /// have an optional '-' prefix to make it an excluded category. Having both
20262 /// included and excluded categories in the same list is not supported.
20263 ///
20264 /// Examples:
20265 /// - "test_MyTest*"
20266 /// - "test_MyTest*,test_OtherStuff"
20267 /// - "-excluded_category1,-excluded_category2"
20268 ///
20269 /// This function must be called on the browser process UI thread.
20270 ///
20271 int cef_begin_tracing (
20272     const(cef_string_t)* categories,
20273     cef_completion_callback_t* callback);
20274 
20275 ///
20276 /// Stop tracing events on all processes.
20277 ///
20278 /// This function will fail and return false (0) if a previous call to
20279 /// CefEndTracingAsync is already pending or if CefBeginTracing was not called.
20280 ///
20281 /// |tracing_file| is the path at which tracing data will be written and
20282 /// |callback| is the callback that will be executed once all processes have
20283 /// sent their trace data. If |tracing_file| is NULL a new temporary file path
20284 /// will be used. If |callback| is NULL no trace data will be written.
20285 ///
20286 /// This function must be called on the browser process UI thread.
20287 ///
20288 int cef_end_tracing (
20289     const(cef_string_t)* tracing_file,
20290     cef_end_tracing_callback_t* callback);
20291 
20292 ///
20293 /// Returns the current system trace time or, if none is defined, the current
20294 /// high-res time. Can be used by clients to synchronize with the time
20295 /// information in trace events.
20296 ///
20297 long cef_now_from_system_trace_time ();
20298 
20299 // CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_
20300 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
20301 //
20302 // Redistribution and use in source and binary forms, with or without
20303 // modification, are permitted provided that the following conditions are
20304 // met:
20305 //
20306 //    * Redistributions of source code must retain the above copyright
20307 // notice, this list of conditions and the following disclaimer.
20308 //    * Redistributions in binary form must reproduce the above
20309 // copyright notice, this list of conditions and the following disclaimer
20310 // in the documentation and/or other materials provided with the
20311 // distribution.
20312 //    * Neither the name of Google Inc. nor the name Chromium Embedded
20313 // Framework nor the names of its contributors may be used to endorse
20314 // or promote products derived from this software without specific prior
20315 // written permission.
20316 //
20317 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20318 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20319 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20320 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20321 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20322 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20323 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20324 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20325 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20326 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20327 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20328 //
20329 // ---------------------------------------------------------------------------
20330 //
20331 // This file was generated by the CEF translator tool and should not edited
20332 // by hand. See the translator.README.txt file in the tools directory for
20333 // more information.
20334 //
20335 // $hash=9ad38f2709d9e3b1bd0e99c279b0497b8aa4c82a$
20336 //
20337 
20338 extern (C):
20339 
20340 ///
20341 /// Callback structure for asynchronous handling of an unresponsive process.
20342 ///
20343 struct cef_unresponsive_process_callback_t
20344 {
20345     ///
20346     /// Base structure.
20347     ///
20348 
20349     ///
20350     /// Reset the timeout for the unresponsive process.
20351     ///
20352 
20353     ///
20354     /// Terminate the unresponsive process.
20355     ///
20356 
20357     // CEF_INCLUDE_CAPI_CEF_UNRESPONSIVE_PROCESS_CALLBACK_CAPI_H_
20358 
20359     cef_base_ref_counted_t base;
20360     extern(System) void function (cef_unresponsive_process_callback_t* self) nothrow wait;
20361     extern(System) void function (cef_unresponsive_process_callback_t* self) nothrow terminate;
20362 }
20363 
20364 
20365 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
20366 //
20367 // Redistribution and use in source and binary forms, with or without
20368 // modification, are permitted provided that the following conditions are
20369 // met:
20370 //
20371 //    * Redistributions of source code must retain the above copyright
20372 // notice, this list of conditions and the following disclaimer.
20373 //    * Redistributions in binary form must reproduce the above
20374 // copyright notice, this list of conditions and the following disclaimer
20375 // in the documentation and/or other materials provided with the
20376 // distribution.
20377 //    * Neither the name of Google Inc. nor the name Chromium Embedded
20378 // Framework nor the names of its contributors may be used to endorse
20379 // or promote products derived from this software without specific prior
20380 // written permission.
20381 //
20382 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20383 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20384 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20385 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20386 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20387 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20388 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20389 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20390 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20391 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20392 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20393 //
20394 // ---------------------------------------------------------------------------
20395 //
20396 // This file was generated by the CEF translator tool and should not edited
20397 // by hand. See the translator.README.txt file in the tools directory for
20398 // more information.
20399 //
20400 // $hash=6a8ed2646d767d3c42ea79f7586f19769c1df742$
20401 //
20402 
20403 extern (C):
20404 
20405 ///
20406 /// Structure used to make a URL request. URL requests are not associated with a
20407 /// browser instance so no cef_client_t callbacks will be executed. URL requests
20408 /// can be created on any valid CEF thread in either the browser or render
20409 /// process. Once created the functions of the URL request object must be
20410 /// accessed on the same thread that created it.
20411 ///
20412 struct cef_urlrequest_t
20413 {
20414     ///
20415     /// Base structure.
20416     ///
20417 
20418     ///
20419     /// Returns the request object used to create this URL request. The returned
20420     /// object is read-only and should not be modified.
20421     ///
20422 
20423     cef_base_ref_counted_t base;
20424     extern(System) cef_request_t* function (cef_urlrequest_t* self) nothrow get_request;
20425     ///
20426     /// Returns the client.
20427     ///
20428     extern(System) cef_urlrequest_client_t* function (cef_urlrequest_t* self) nothrow get_client;
20429 
20430     ///
20431     /// Returns the request status.
20432     ///
20433     extern(System) cef_urlrequest_status_t function (
20434         cef_urlrequest_t* self) nothrow get_request_status;
20435 
20436     ///
20437     /// Returns the request error if status is UR_CANCELED or UR_FAILED, or 0
20438     /// otherwise.
20439     ///
20440     extern(System) cef_errorcode_t function (cef_urlrequest_t* self) nothrow get_request_error;
20441 
20442     ///
20443     /// Returns the response, or NULL if no response information is available.
20444     /// Response information will only be available after the upload has
20445     /// completed. The returned object is read-only and should not be modified.
20446     ///
20447     extern(System) cef_response_t* function (cef_urlrequest_t* self) nothrow get_response;
20448 
20449     ///
20450     /// Returns true (1) if the response body was served from the cache. This
20451     /// includes responses for which revalidation was required.
20452     ///
20453     extern(System) int function (cef_urlrequest_t* self) nothrow response_was_cached;
20454 
20455     ///
20456     /// Cancel the request.
20457     ///
20458     extern(System) void function (cef_urlrequest_t* self) nothrow cancel;
20459 }
20460 
20461 
20462 
20463 ///
20464 /// Create a new URL request that is not associated with a specific browser or
20465 /// frame. Use cef_frame_t::CreateURLRequest instead if you want the request to
20466 /// have this association, in which case it may be handled differently (see
20467 /// documentation on that function). A request created with this function may
20468 /// only originate from the browser process, and will behave as follows:
20469 ///   - It may be intercepted by the client via CefResourceRequestHandler or
20470 ///     CefSchemeHandlerFactory.
20471 ///   - POST data may only contain only a single element of type PDE_TYPE_FILE
20472 ///     or PDE_TYPE_BYTES.
20473 ///   - If |request_context| is empty the global request context will be used.
20474 ///
20475 /// The |request| object will be marked as read-only after calling this
20476 /// function.
20477 ///
20478 cef_urlrequest_t* cef_urlrequest_create (
20479     cef_request_t* request,
20480     cef_urlrequest_client_t* client,
20481     cef_request_context_t* request_context);
20482 
20483 ///
20484 /// Structure that should be implemented by the cef_urlrequest_t client. The
20485 /// functions of this structure will be called on the same thread that created
20486 /// the request unless otherwise documented.
20487 ///
20488 struct cef_urlrequest_client_t
20489 {
20490     ///
20491     /// Base structure.
20492     ///
20493     cef_base_ref_counted_t base;
20494 
20495     ///
20496     /// Notifies the client that the request has completed. Use the
20497     /// cef_urlrequest_t::GetRequestStatus function to determine if the request
20498     /// was successful or not.
20499     ///
20500     extern(System) void function (
20501         cef_urlrequest_client_t* self,
20502         cef_urlrequest_t* request) nothrow on_request_complete;
20503 
20504     ///
20505     /// Notifies the client of upload progress. |current| denotes the number of
20506     /// bytes sent so far and |total| is the total size of uploading data (or -1
20507     /// if chunked upload is enabled). This function will only be called if the
20508     /// UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
20509     ///
20510     extern(System) void function (
20511         cef_urlrequest_client_t* self,
20512         cef_urlrequest_t* request,
20513         long current,
20514         long total) nothrow on_upload_progress;
20515 
20516     ///
20517     /// Notifies the client of download progress. |current| denotes the number of
20518     /// bytes received up to the call and |total| is the expected total size of
20519     /// the response (or -1 if not determined).
20520     ///
20521     extern(System) void function (
20522         cef_urlrequest_client_t* self,
20523         cef_urlrequest_t* request,
20524         long current,
20525         long total) nothrow on_download_progress;
20526 
20527     ///
20528     /// Called when some part of the response is read. |data| contains the current
20529     /// bytes received since the last call. This function will not be called if
20530     /// the UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
20531     ///
20532     extern(System) void function (
20533         cef_urlrequest_client_t* self,
20534         cef_urlrequest_t* request,
20535         const(void)* data,
20536         size_t data_length) nothrow on_download_data;
20537 
20538     ///
20539     /// Called on the IO thread when the browser needs credentials from the user.
20540     /// |isProxy| indicates whether the host is a proxy server. |host| contains
20541     /// the hostname and |port| contains the port number. Return true (1) to
20542     /// continue the request and call cef_auth_callback_t::cont() when the
20543     /// authentication information is available. If the request has an associated
20544     /// browser/frame then returning false (0) will result in a call to
20545     /// GetAuthCredentials on the cef_request_handler_t associated with that
20546     /// browser, if any. Otherwise, returning false (0) will cancel the request
20547     /// immediately. This function will only be called for requests initiated from
20548     /// the browser process.
20549     ///
20550     extern(System) int function (
20551         cef_urlrequest_client_t* self,
20552         int isProxy,
20553         const(cef_string_t)* host,
20554         int port,
20555         const(cef_string_t)* realm,
20556         const(cef_string_t)* scheme,
20557         cef_auth_callback_t* callback) nothrow get_auth_credentials;
20558 }
20559 
20560 
20561 
20562 // CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_
20563 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
20564 //
20565 // Redistribution and use in source and binary forms, with or without
20566 // modification, are permitted provided that the following conditions are
20567 // met:
20568 //
20569 //    * Redistributions of source code must retain the above copyright
20570 // notice, this list of conditions and the following disclaimer.
20571 //    * Redistributions in binary form must reproduce the above
20572 // copyright notice, this list of conditions and the following disclaimer
20573 // in the documentation and/or other materials provided with the
20574 // distribution.
20575 //    * Neither the name of Google Inc. nor the name Chromium Embedded
20576 // Framework nor the names of its contributors may be used to endorse
20577 // or promote products derived from this software without specific prior
20578 // written permission.
20579 //
20580 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20581 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20582 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20583 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20584 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20585 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20586 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20587 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20588 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20589 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
20590 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20591 //
20592 // ---------------------------------------------------------------------------
20593 //
20594 // This file was generated by the CEF translator tool and should not edited
20595 // by hand. See the translator.README.txt file in the tools directory for
20596 // more information.
20597 //
20598 // $hash=5dd4948a92af2ad69e2171f2dffb8f2c23e5c147$
20599 //
20600 
20601 extern (C):
20602 
20603 ///
20604 /// Structure representing a V8 context handle. V8 handles can only be accessed
20605 /// from the thread on which they are created. Valid threads for creating a V8
20606 /// handle include the render process main thread (TID_RENDERER) and WebWorker
20607 /// threads. A task runner for posting tasks on the associated thread can be
20608 /// retrieved via the cef_v8context_t::get_task_runner() function.
20609 ///
20610 struct cef_v8context_t
20611 {
20612     ///
20613     /// Base structure.
20614     ///
20615 
20616     ///
20617     /// Returns the task runner associated with this context. V8 handles can only
20618     /// be accessed from the thread on which they are created. This function can
20619     /// be called on any render process thread.
20620 
20621     cef_base_ref_counted_t base;
20622     ///
20623     extern(System) cef_task_runner_t* function (cef_v8context_t* self) nothrow get_task_runner;
20624 
20625     ///
20626     /// Returns true (1) if the underlying handle is valid and it can be accessed
20627     /// on the current thread. Do not call any other functions if this function
20628     /// returns false (0).
20629     ///
20630     extern(System) int function (cef_v8context_t* self) nothrow is_valid;
20631 
20632     ///
20633     /// Returns the browser for this context. This function will return an NULL
20634     /// reference for WebWorker contexts.
20635     ///
20636     extern(System) cef_browser_t* function (cef_v8context_t* self) nothrow get_browser;
20637 
20638     ///
20639     /// Returns the frame for this context. This function will return an NULL
20640     /// reference for WebWorker contexts.
20641     ///
20642     extern(System) cef_frame_t* function (cef_v8context_t* self) nothrow get_frame;
20643 
20644     ///
20645     /// Returns the global object for this context. The context must be entered
20646     /// before calling this function.
20647     ///
20648     extern(System) cef_v8value_t* function (cef_v8context_t* self) nothrow get_global;
20649 
20650     ///
20651     /// Enter this context. A context must be explicitly entered before creating a
20652     /// V8 Object, Array, Function or Date asynchronously. exit() must be called
20653     /// the same number of times as enter() before releasing this context. V8
20654     /// objects belong to the context in which they are created. Returns true (1)
20655     /// if the scope was entered successfully.
20656     ///
20657     extern(System) int function (cef_v8context_t* self) nothrow enter;
20658 
20659     ///
20660     /// Exit this context. Call this function only after calling enter(). Returns
20661     /// true (1) if the scope was exited successfully.
20662     ///
20663     extern(System) int function (cef_v8context_t* self) nothrow exit;
20664 
20665     ///
20666     /// Returns true (1) if this object is pointing to the same handle as |that|
20667     /// object.
20668     ///
20669     extern(System) int function (cef_v8context_t* self, cef_v8context_t* that) nothrow is_same;
20670 
20671     ///
20672     /// Execute a string of JavaScript code in this V8 context. The |script_url|
20673     /// parameter is the URL where the script in question can be found, if any.
20674     /// The |start_line| parameter is the base line number to use for error
20675     /// reporting. On success |retval| will be set to the return value, if any,
20676     /// and the function will return true (1). On failure |exception| will be set
20677     /// to the exception, if any, and the function will return false (0).
20678     ///
20679     extern(System) int function (
20680         cef_v8context_t* self,
20681         const(cef_string_t)* code,
20682         const(cef_string_t)* script_url,
20683         int start_line,
20684         cef_v8value_t** retval,
20685         cef_v8exception_t** exception) nothrow eval;
20686 }
20687 
20688 
20689 
20690 ///
20691 /// Returns the current (top) context object in the V8 context stack.
20692 ///
20693 cef_v8context_t* cef_v8context_get_current_context ();
20694 
20695 ///
20696 /// Returns the entered (bottom) context object in the V8 context stack.
20697 ///
20698 cef_v8context_t* cef_v8context_get_entered_context ();
20699 
20700 ///
20701 /// Returns true (1) if V8 is currently inside a context.
20702 ///
20703 int cef_v8context_in_context ();
20704 
20705 ///
20706 /// Structure that should be implemented to handle V8 function calls. The
20707 /// functions of this structure will be called on the thread associated with the
20708 /// V8 function.
20709 ///
20710 struct cef_v8handler_t
20711 {
20712     ///
20713     /// Base structure.
20714     ///
20715     cef_base_ref_counted_t base;
20716 
20717     ///
20718     /// Handle execution of the function identified by |name|. |object| is the
20719     /// receiver ('this' object) of the function. |arguments| is the list of
20720     /// arguments passed to the function. If execution succeeds set |retval| to
20721     /// the function return value. If execution fails set |exception| to the
20722     /// exception that will be thrown. Return true (1) if execution was handled.
20723     ///
20724     extern(System) int function (
20725         cef_v8handler_t* self,
20726         const(cef_string_t)* name,
20727         cef_v8value_t* object,
20728         size_t argumentsCount,
20729         cef_v8value_t** arguments,
20730         cef_v8value_t** retval,
20731         cef_string_t* exception) nothrow execute;
20732 }
20733 
20734 
20735 
20736 ///
20737 /// Structure that should be implemented to handle V8 accessor calls. Accessor
20738 /// identifiers are registered by calling cef_v8value_t::set_value(). The
20739 /// functions of this structure will be called on the thread associated with the
20740 /// V8 accessor.
20741 ///
20742 struct cef_v8accessor_t
20743 {
20744     ///
20745     /// Base structure.
20746     ///
20747     cef_base_ref_counted_t base;
20748 
20749     ///
20750     /// Handle retrieval the accessor value identified by |name|. |object| is the
20751     /// receiver ('this' object) of the accessor. If retrieval succeeds set
20752     /// |retval| to the return value. If retrieval fails set |exception| to the
20753     /// exception that will be thrown. Return true (1) if accessor retrieval was
20754     /// handled.
20755     ///
20756     extern(System) int function (
20757         cef_v8accessor_t* self,
20758         const(cef_string_t)* name,
20759         cef_v8value_t* object,
20760         cef_v8value_t** retval,
20761         cef_string_t* exception) nothrow get;
20762 
20763     ///
20764     /// Handle assignment of the accessor value identified by |name|. |object| is
20765     /// the receiver ('this' object) of the accessor. |value| is the new value
20766     /// being assigned to the accessor. If assignment fails set |exception| to the
20767     /// exception that will be thrown. Return true (1) if accessor assignment was
20768     /// handled.
20769     ///
20770     extern(System) int function (
20771         cef_v8accessor_t* self,
20772         const(cef_string_t)* name,
20773         cef_v8value_t* object,
20774         cef_v8value_t* value,
20775         cef_string_t* exception) nothrow set;
20776 }
20777 
20778 
20779 
20780 ///
20781 /// Structure that should be implemented to handle V8 interceptor calls. The
20782 /// functions of this structure will be called on the thread associated with the
20783 /// V8 interceptor. Interceptor's named property handlers (with first argument
20784 /// of type CefString) are called when object is indexed by string. Indexed
20785 /// property handlers (with first argument of type int) are called when object
20786 /// is indexed by integer.
20787 ///
20788 struct cef_v8interceptor_t
20789 {
20790     ///
20791     /// Base structure.
20792     ///
20793     cef_base_ref_counted_t base;
20794 
20795     ///
20796     /// Handle retrieval of the interceptor value identified by |name|. |object|
20797     /// is the receiver ('this' object) of the interceptor. If retrieval succeeds,
20798     /// set |retval| to the return value. If the requested value does not exist,
20799     /// don't set either |retval| or |exception|. If retrieval fails, set
20800     /// |exception| to the exception that will be thrown. If the property has an
20801     /// associated accessor, it will be called only if you don't set |retval|.
20802     /// Return true (1) if interceptor retrieval was handled, false (0) otherwise.
20803     ///
20804     extern(System) int function (
20805         cef_v8interceptor_t* self,
20806         const(cef_string_t)* name,
20807         cef_v8value_t* object,
20808         cef_v8value_t** retval,
20809         cef_string_t* exception) nothrow get_byname;
20810 
20811     ///
20812     /// Handle retrieval of the interceptor value identified by |index|. |object|
20813     /// is the receiver ('this' object) of the interceptor. If retrieval succeeds,
20814     /// set |retval| to the return value. If the requested value does not exist,
20815     /// don't set either |retval| or |exception|. If retrieval fails, set
20816     /// |exception| to the exception that will be thrown. Return true (1) if
20817     /// interceptor retrieval was handled, false (0) otherwise.
20818     ///
20819     extern(System) int function (
20820         cef_v8interceptor_t* self,
20821         int index,
20822         cef_v8value_t* object,
20823         cef_v8value_t** retval,
20824         cef_string_t* exception) nothrow get_byindex;
20825 
20826     ///
20827     /// Handle assignment of the interceptor value identified by |name|. |object|
20828     /// is the receiver ('this' object) of the interceptor. |value| is the new
20829     /// value being assigned to the interceptor. If assignment fails, set
20830     /// |exception| to the exception that will be thrown. This setter will always
20831     /// be called, even when the property has an associated accessor. Return true
20832     /// (1) if interceptor assignment was handled, false (0) otherwise.
20833     ///
20834     extern(System) int function (
20835         cef_v8interceptor_t* self,
20836         const(cef_string_t)* name,
20837         cef_v8value_t* object,
20838         cef_v8value_t* value,
20839         cef_string_t* exception) nothrow set_byname;
20840 
20841     ///
20842     /// Handle assignment of the interceptor value identified by |index|. |object|
20843     /// is the receiver ('this' object) of the interceptor. |value| is the new
20844     /// value being assigned to the interceptor. If assignment fails, set
20845     /// |exception| to the exception that will be thrown. Return true (1) if
20846     /// interceptor assignment was handled, false (0) otherwise.
20847     ///
20848     extern(System) int function (
20849         cef_v8interceptor_t* self,
20850         int index,
20851         cef_v8value_t* object,
20852         cef_v8value_t* value,
20853         cef_string_t* exception) nothrow set_byindex;
20854 }
20855 
20856 
20857 
20858 ///
20859 /// Structure representing a V8 exception. The functions of this structure may
20860 /// be called on any render process thread.
20861 ///
20862 struct cef_v8exception_t
20863 {
20864     ///
20865     /// Base structure.
20866     ///
20867     cef_base_ref_counted_t base;
20868 
20869     ///
20870     /// Returns the exception message.
20871     ///
20872     // The resulting string must be freed by calling cef_string_userfree_free().
20873     extern(System) cef_string_userfree_t function (cef_v8exception_t* self) nothrow get_message;
20874 
20875     ///
20876     /// Returns the line of source code that the exception occurred within.
20877     ///
20878     // The resulting string must be freed by calling cef_string_userfree_free().
20879     extern(System) cef_string_userfree_t function (cef_v8exception_t* self) nothrow get_source_line;
20880 
20881     ///
20882     /// Returns the resource name for the script from where the function causing
20883     /// the error originates.
20884     ///
20885     // The resulting string must be freed by calling cef_string_userfree_free().
20886     extern(System) cef_string_userfree_t function (
20887         cef_v8exception_t* self) nothrow get_script_resource_name;
20888 
20889     ///
20890     /// Returns the 1-based number of the line where the error occurred or 0 if
20891     /// the line number is unknown.
20892     ///
20893     extern(System) int function (cef_v8exception_t* self) nothrow get_line_number;
20894 
20895     ///
20896     /// Returns the index within the script of the first character where the error
20897     /// occurred.
20898     ///
20899     extern(System) int function (cef_v8exception_t* self) nothrow get_start_position;
20900 
20901     ///
20902     /// Returns the index within the script of the last character where the error
20903     /// occurred.
20904     ///
20905     extern(System) int function (cef_v8exception_t* self) nothrow get_end_position;
20906 
20907     ///
20908     /// Returns the index within the line of the first character where the error
20909     /// occurred.
20910     ///
20911     extern(System) int function (cef_v8exception_t* self) nothrow get_start_column;
20912 
20913     ///
20914     /// Returns the index within the line of the last character where the error
20915     /// occurred.
20916     ///
20917     extern(System) int function (cef_v8exception_t* self) nothrow get_end_column;
20918 }
20919 
20920 
20921 
20922 ///
20923 /// Callback structure that is passed to cef_v8value_t::CreateArrayBuffer.
20924 ///
20925 struct cef_v8array_buffer_release_callback_t
20926 {
20927     ///
20928     /// Base structure.
20929     ///
20930     cef_base_ref_counted_t base;
20931 
20932     ///
20933     /// Called to release |buffer| when the ArrayBuffer JS object is garbage
20934     /// collected. |buffer| is the value that was passed to CreateArrayBuffer
20935     /// along with this object.
20936     ///
20937     extern(System) void function (
20938         cef_v8array_buffer_release_callback_t* self,
20939         void* buffer) nothrow release_buffer;
20940 }
20941 
20942 
20943 
20944 ///
20945 /// Structure representing a V8 value handle. V8 handles can only be accessed
20946 /// from the thread on which they are created. Valid threads for creating a V8
20947 /// handle include the render process main thread (TID_RENDERER) and WebWorker
20948 /// threads. A task runner for posting tasks on the associated thread can be
20949 /// retrieved via the cef_v8context_t::get_task_runner() function.
20950 ///
20951 struct cef_v8value_t
20952 {
20953     ///
20954     /// Base structure.
20955     ///
20956     cef_base_ref_counted_t base;
20957 
20958     ///
20959     /// Returns true (1) if the underlying handle is valid and it can be accessed
20960     /// on the current thread. Do not call any other functions if this function
20961     /// returns false (0).
20962     ///
20963     extern(System) int function (cef_v8value_t* self) nothrow is_valid;
20964 
20965     ///
20966     /// True if the value type is undefined.
20967     ///
20968     extern(System) int function (cef_v8value_t* self) nothrow is_undefined;
20969 
20970     ///
20971     /// True if the value type is null.
20972     ///
20973     extern(System) int function (cef_v8value_t* self) nothrow is_null;
20974 
20975     ///
20976     /// True if the value type is bool.
20977     ///
20978     extern(System) int function (cef_v8value_t* self) nothrow is_bool;
20979 
20980     ///
20981     /// True if the value type is int.
20982     ///
20983     extern(System) int function (cef_v8value_t* self) nothrow is_int;
20984 
20985     ///
20986     /// True if the value type is unsigned int.
20987     ///
20988     extern(System) int function (cef_v8value_t* self) nothrow is_uint;
20989 
20990     ///
20991     /// True if the value type is double.
20992     ///
20993     extern(System) int function (cef_v8value_t* self) nothrow is_double;
20994 
20995     ///
20996     /// True if the value type is Date.
20997     ///
20998     extern(System) int function (cef_v8value_t* self) nothrow is_date;
20999 
21000     ///
21001     /// True if the value type is string.
21002     ///
21003     extern(System) int function (cef_v8value_t* self) nothrow is_string;
21004 
21005     ///
21006     /// True if the value type is object.
21007     ///
21008     extern(System) int function (cef_v8value_t* self) nothrow is_object;
21009 
21010     ///
21011     /// True if the value type is array.
21012     ///
21013     extern(System) int function (cef_v8value_t* self) nothrow is_array;
21014 
21015     ///
21016     /// True if the value type is an ArrayBuffer.
21017     ///
21018     extern(System) int function (cef_v8value_t* self) nothrow is_array_buffer;
21019 
21020     ///
21021     /// True if the value type is function.
21022     ///
21023     extern(System) int function (cef_v8value_t* self) nothrow is_function;
21024 
21025     ///
21026     /// True if the value type is a Promise.
21027     ///
21028     extern(System) int function (cef_v8value_t* self) nothrow is_promise;
21029 
21030     ///
21031     /// Returns true (1) if this object is pointing to the same handle as |that|
21032     /// object.
21033     ///
21034     extern(System) int function (cef_v8value_t* self, cef_v8value_t* that) nothrow is_same;
21035 
21036     ///
21037     /// Return a bool value.
21038     ///
21039     extern(System) int function (cef_v8value_t* self) nothrow get_bool_value;
21040 
21041     ///
21042     /// Return an int value.
21043     ///
21044     extern(System) int function (cef_v8value_t* self) nothrow get_int_value;
21045 
21046     ///
21047     /// Return an unsigned int value.
21048     ///
21049     extern(System) uint function (cef_v8value_t* self) nothrow get_uint_value;
21050 
21051     ///
21052     /// Return a double value.
21053     ///
21054     extern(System) double function (cef_v8value_t* self) nothrow get_double_value;
21055 
21056     ///
21057     /// Return a Date value.
21058     ///
21059     extern(System) cef_basetime_t function (cef_v8value_t* self) nothrow get_date_value;
21060 
21061     ///
21062     /// Return a string value.
21063     ///
21064     // The resulting string must be freed by calling cef_string_userfree_free().
21065     extern(System) cef_string_userfree_t function (cef_v8value_t* self) nothrow get_string_value;
21066 
21067     ///
21068     /// Returns true (1) if this is a user created object.
21069     ///
21070     extern(System) int function (cef_v8value_t* self) nothrow is_user_created;
21071 
21072     ///
21073     /// Returns true (1) if the last function call resulted in an exception. This
21074     /// attribute exists only in the scope of the current CEF value object.
21075     ///
21076     extern(System) int function (cef_v8value_t* self) nothrow has_exception;
21077 
21078     ///
21079     /// Returns the exception resulting from the last function call. This
21080     /// attribute exists only in the scope of the current CEF value object.
21081     ///
21082     extern(System) cef_v8exception_t* function (cef_v8value_t* self) nothrow get_exception;
21083 
21084     ///
21085     /// Clears the last exception and returns true (1) on success.
21086     ///
21087     extern(System) int function (cef_v8value_t* self) nothrow clear_exception;
21088 
21089     ///
21090     /// Returns true (1) if this object will re-throw future exceptions. This
21091     /// attribute exists only in the scope of the current CEF value object.
21092     ///
21093     extern(System) int function (cef_v8value_t* self) nothrow will_rethrow_exceptions;
21094 
21095     ///
21096     /// Set whether this object will re-throw future exceptions. By default
21097     /// exceptions are not re-thrown. If a exception is re-thrown the current
21098     /// context should not be accessed again until after the exception has been
21099     /// caught and not re-thrown. Returns true (1) on success. This attribute
21100     /// exists only in the scope of the current CEF value object.
21101     ///
21102     extern(System) int function (cef_v8value_t* self, int rethrow) nothrow set_rethrow_exceptions;
21103 
21104     ///
21105     /// Returns true (1) if the object has a value with the specified identifier.
21106     ///
21107     extern(System) int function (
21108         cef_v8value_t* self,
21109         const(cef_string_t)* key) nothrow has_value_bykey;
21110 
21111     ///
21112     /// Returns true (1) if the object has a value with the specified identifier.
21113     ///
21114     extern(System) int function (cef_v8value_t* self, int index) nothrow has_value_byindex;
21115 
21116     ///
21117     /// Deletes the value with the specified identifier and returns true (1) on
21118     /// success. Returns false (0) if this function is called incorrectly or an
21119     /// exception is thrown. For read-only and don't-delete values this function
21120     /// will return true (1) even though deletion failed.
21121     ///
21122     extern(System) int function (
21123         cef_v8value_t* self,
21124         const(cef_string_t)* key) nothrow delete_value_bykey;
21125 
21126     ///
21127     /// Deletes the value with the specified identifier and returns true (1) on
21128     /// success. Returns false (0) if this function is called incorrectly,
21129     /// deletion fails or an exception is thrown. For read-only and don't-delete
21130     /// values this function will return true (1) even though deletion failed.
21131     ///
21132     extern(System) int function (cef_v8value_t* self, int index) nothrow delete_value_byindex;
21133 
21134     ///
21135     /// Returns the value with the specified identifier on success. Returns NULL
21136     /// if this function is called incorrectly or an exception is thrown.
21137     ///
21138     extern(System) cef_v8value_t* function (
21139         cef_v8value_t* self,
21140         const(cef_string_t)* key) nothrow get_value_bykey;
21141 
21142     ///
21143     /// Returns the value with the specified identifier on success. Returns NULL
21144     /// if this function is called incorrectly or an exception is thrown.
21145     ///
21146     extern(System) cef_v8value_t* function (
21147         cef_v8value_t* self,
21148         int index) nothrow get_value_byindex;
21149 
21150     ///
21151     /// Associates a value with the specified identifier and returns true (1) on
21152     /// success. Returns false (0) if this function is called incorrectly or an
21153     /// exception is thrown. For read-only values this function will return true
21154     /// (1) even though assignment failed.
21155     ///
21156     extern(System) int function (
21157         cef_v8value_t* self,
21158         const(cef_string_t)* key,
21159         cef_v8value_t* value,
21160         cef_v8_propertyattribute_t attribute) nothrow set_value_bykey;
21161 
21162     ///
21163     /// Associates a value with the specified identifier and returns true (1) on
21164     /// success. Returns false (0) if this function is called incorrectly or an
21165     /// exception is thrown. For read-only values this function will return true
21166     /// (1) even though assignment failed.
21167     ///
21168     extern(System) int function (
21169         cef_v8value_t* self,
21170         int index,
21171         cef_v8value_t* value) nothrow set_value_byindex;
21172 
21173     ///
21174     /// Registers an identifier and returns true (1) on success. Access to the
21175     /// identifier will be forwarded to the cef_v8accessor_t instance passed to
21176     /// cef_v8value_t::cef_v8value_create_object(). Returns false (0) if this
21177     /// function is called incorrectly or an exception is thrown. For read-only
21178     /// values this function will return true (1) even though assignment failed.
21179     ///
21180     extern(System) int function (
21181         cef_v8value_t* self,
21182         const(cef_string_t)* key,
21183         cef_v8_propertyattribute_t attribute) nothrow set_value_byaccessor;
21184 
21185     ///
21186     /// Read the keys for the object's values into the specified vector. Integer-
21187     /// based keys will also be returned as strings.
21188     ///
21189     extern(System) int function (cef_v8value_t* self, cef_string_list_t keys) nothrow get_keys;
21190 
21191     ///
21192     /// Sets the user data for this object and returns true (1) on success.
21193     /// Returns false (0) if this function is called incorrectly. This function
21194     /// can only be called on user created objects.
21195     ///
21196     extern(System) int function (
21197         cef_v8value_t* self,
21198         cef_base_ref_counted_t* user_data) nothrow set_user_data;
21199 
21200     ///
21201     /// Returns the user data, if any, assigned to this object.
21202     ///
21203     extern(System) cef_base_ref_counted_t* function (cef_v8value_t* self) nothrow get_user_data;
21204 
21205     ///
21206     /// Returns the amount of externally allocated memory registered for the
21207     /// object.
21208     ///
21209     extern(System) int function (cef_v8value_t* self) nothrow get_externally_allocated_memory;
21210 
21211     ///
21212     /// Adjusts the amount of registered external memory for the object. Used to
21213     /// give V8 an indication of the amount of externally allocated memory that is
21214     /// kept alive by JavaScript objects. V8 uses this information to decide when
21215     /// to perform global garbage collection. Each cef_v8value_t tracks the amount
21216     /// of external memory associated with it and automatically decreases the
21217     /// global total by the appropriate amount on its destruction.
21218     /// |change_in_bytes| specifies the number of bytes to adjust by. This
21219     /// function returns the number of bytes associated with the object after the
21220     /// adjustment. This function can only be called on user created objects.
21221     ///
21222     extern(System) int function (
21223         cef_v8value_t* self,
21224         int change_in_bytes) nothrow adjust_externally_allocated_memory;
21225 
21226     ///
21227     /// Returns the number of elements in the array.
21228     ///
21229     extern(System) int function (cef_v8value_t* self) nothrow get_array_length;
21230 
21231     ///
21232     /// Returns the ReleaseCallback object associated with the ArrayBuffer or NULL
21233     /// if the ArrayBuffer was not created with CreateArrayBuffer.
21234     ///
21235     extern(System) cef_v8array_buffer_release_callback_t* function (
21236         cef_v8value_t* self) nothrow get_array_buffer_release_callback;
21237 
21238     ///
21239     /// Prevent the ArrayBuffer from using it's memory block by setting the length
21240     /// to zero. This operation cannot be undone. If the ArrayBuffer was created
21241     /// with CreateArrayBuffer then
21242     /// cef_v8array_buffer_release_callback_t::ReleaseBuffer will be called to
21243     /// release the underlying buffer.
21244     ///
21245     extern(System) int function (cef_v8value_t* self) nothrow neuter_array_buffer;
21246 
21247     ///
21248     /// Returns the length (in bytes) of the ArrayBuffer.
21249     ///
21250     extern(System) size_t function (cef_v8value_t* self) nothrow get_array_buffer_byte_length;
21251 
21252     ///
21253     /// Returns a pointer to the beginning of the memory block for this
21254     /// ArrayBuffer backing store. The returned pointer is valid as long as the
21255     /// cef_v8value_t is alive.
21256     ///
21257     extern(System) void* function (cef_v8value_t* self) nothrow get_array_buffer_data;
21258 
21259     ///
21260     /// Returns the function name.
21261     ///
21262     // The resulting string must be freed by calling cef_string_userfree_free().
21263     extern(System) cef_string_userfree_t function (cef_v8value_t* self) nothrow get_function_name;
21264 
21265     ///
21266     /// Returns the function handler or NULL if not a CEF-created function.
21267     ///
21268     extern(System) cef_v8handler_t* function (cef_v8value_t* self) nothrow get_function_handler;
21269 
21270     ///
21271     /// Execute the function using the current V8 context. This function should
21272     /// only be called from within the scope of a cef_v8handler_t or
21273     /// cef_v8accessor_t callback, or in combination with calling enter() and
21274     /// exit() on a stored cef_v8context_t reference. |object| is the receiver
21275     /// ('this' object) of the function. If |object| is NULL the current context's
21276     /// global object will be used. |arguments| is the list of arguments that will
21277     /// be passed to the function. Returns the function return value on success.
21278     /// Returns NULL if this function is called incorrectly or an exception is
21279     /// thrown.
21280     ///
21281     extern(System) cef_v8value_t* function (
21282         cef_v8value_t* self,
21283         cef_v8value_t* object,
21284         size_t argumentsCount,
21285         cef_v8value_t** arguments) nothrow execute_function;
21286 
21287     ///
21288     /// Execute the function using the specified V8 context. |object| is the
21289     /// receiver ('this' object) of the function. If |object| is NULL the
21290     /// specified context's global object will be used. |arguments| is the list of
21291     /// arguments that will be passed to the function. Returns the function return
21292     /// value on success. Returns NULL if this function is called incorrectly or
21293     /// an exception is thrown.
21294     ///
21295     extern(System) cef_v8value_t* function (
21296         cef_v8value_t* self,
21297         cef_v8context_t* context,
21298         cef_v8value_t* object,
21299         size_t argumentsCount,
21300         cef_v8value_t** arguments) nothrow execute_function_with_context;
21301 
21302     ///
21303     /// Resolve the Promise using the current V8 context. This function should
21304     /// only be called from within the scope of a cef_v8handler_t or
21305     /// cef_v8accessor_t callback, or in combination with calling enter() and
21306     /// exit() on a stored cef_v8context_t reference. |arg| is the argument passed
21307     /// to the resolved promise. Returns true (1) on success. Returns false (0) if
21308     /// this function is called incorrectly or an exception is thrown.
21309     ///
21310     extern(System) int function (cef_v8value_t* self, cef_v8value_t* arg) nothrow resolve_promise;
21311 
21312     ///
21313     /// Reject the Promise using the current V8 context. This function should only
21314     /// be called from within the scope of a cef_v8handler_t or cef_v8accessor_t
21315     /// callback, or in combination with calling enter() and exit() on a stored
21316     /// cef_v8context_t reference. Returns true (1) on success. Returns false (0)
21317     /// if this function is called incorrectly or an exception is thrown.
21318     ///
21319     extern(System) int function (
21320         cef_v8value_t* self,
21321         const(cef_string_t)* errorMsg) nothrow reject_promise;
21322 }
21323 
21324 
21325 
21326 ///
21327 /// Create a new cef_v8value_t object of type undefined.
21328 ///
21329 cef_v8value_t* cef_v8value_create_undefined ();
21330 
21331 ///
21332 /// Create a new cef_v8value_t object of type null.
21333 ///
21334 cef_v8value_t* cef_v8value_create_null ();
21335 
21336 ///
21337 /// Create a new cef_v8value_t object of type bool.
21338 ///
21339 cef_v8value_t* cef_v8value_create_bool (int value);
21340 
21341 ///
21342 /// Create a new cef_v8value_t object of type int.
21343 ///
21344 cef_v8value_t* cef_v8value_create_int (int value);
21345 
21346 ///
21347 /// Create a new cef_v8value_t object of type unsigned int.
21348 ///
21349 cef_v8value_t* cef_v8value_create_uint (uint value);
21350 
21351 ///
21352 /// Create a new cef_v8value_t object of type double.
21353 ///
21354 cef_v8value_t* cef_v8value_create_double (double value);
21355 
21356 ///
21357 /// Create a new cef_v8value_t object of type Date. This function should only be
21358 /// called from within the scope of a cef_render_process_handler_t,
21359 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
21360 /// enter() and exit() on a stored cef_v8context_t reference.
21361 ///
21362 cef_v8value_t* cef_v8value_create_date (cef_basetime_t date);
21363 
21364 ///
21365 /// Create a new cef_v8value_t object of type string.
21366 ///
21367 cef_v8value_t* cef_v8value_create_string (const(cef_string_t)* value);
21368 
21369 ///
21370 /// Create a new cef_v8value_t object of type object with optional accessor
21371 /// and/or interceptor. This function should only be called from within the
21372 /// scope of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t
21373 /// callback, or in combination with calling enter() and exit() on a stored
21374 /// cef_v8context_t reference.
21375 ///
21376 cef_v8value_t* cef_v8value_create_object (
21377     cef_v8accessor_t* accessor,
21378     cef_v8interceptor_t* interceptor);
21379 
21380 ///
21381 /// Create a new cef_v8value_t object of type array with the specified |length|.
21382 /// If |length| is negative the returned array will have length 0. This function
21383 /// should only be called from within the scope of a
21384 /// cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback,
21385 /// or in combination with calling enter() and exit() on a stored
21386 /// cef_v8context_t reference.
21387 ///
21388 cef_v8value_t* cef_v8value_create_array (int length);
21389 
21390 ///
21391 /// Create a new cef_v8value_t object of type ArrayBuffer which wraps the
21392 /// provided |buffer| of size |length| bytes. The ArrayBuffer is externalized,
21393 /// meaning that it does not own |buffer|. The caller is responsible for freeing
21394 /// |buffer| when requested via a call to
21395 /// cef_v8array_buffer_release_callback_t::ReleaseBuffer. This function should
21396 /// only be called from within the scope of a cef_render_process_handler_t,
21397 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
21398 /// enter() and exit() on a stored cef_v8context_t reference.
21399 ///
21400 cef_v8value_t* cef_v8value_create_array_buffer (
21401     void* buffer,
21402     size_t length,
21403     cef_v8array_buffer_release_callback_t* release_callback);
21404 
21405 ///
21406 /// Create a new cef_v8value_t object of type function. This function should
21407 /// only be called from within the scope of a cef_render_process_handler_t,
21408 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
21409 /// enter() and exit() on a stored cef_v8context_t reference.
21410 ///
21411 extern(System) cef_v8value_t* cef_v8value_create_function (
21412     const(cef_string_t)* name,
21413     cef_v8handler_t* handler) nothrow;
21414 
21415 ///
21416 /// Create a new cef_v8value_t object of type Promise. This function should only
21417 /// be called from within the scope of a cef_render_process_handler_t,
21418 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling
21419 /// enter() and exit() on a stored cef_v8context_t reference.
21420 ///
21421 cef_v8value_t* cef_v8value_create_promise ();
21422 
21423 ///
21424 /// Structure representing a V8 stack trace handle. V8 handles can only be
21425 /// accessed from the thread on which they are created. Valid threads for
21426 /// creating a V8 handle include the render process main thread (TID_RENDERER)
21427 /// and WebWorker threads. A task runner for posting tasks on the associated
21428 /// thread can be retrieved via the cef_v8context_t::get_task_runner() function.
21429 ///
21430 struct cef_v8stack_trace_t
21431 {
21432     ///
21433     /// Base structure.
21434     ///
21435     cef_base_ref_counted_t base;
21436 
21437     ///
21438     /// Returns true (1) if the underlying handle is valid and it can be accessed
21439     /// on the current thread. Do not call any other functions if this function
21440     /// returns false (0).
21441     ///
21442     extern(System) int function (cef_v8stack_trace_t* self) nothrow is_valid;
21443 
21444     ///
21445     /// Returns the number of stack frames.
21446     ///
21447     extern(System) int function (cef_v8stack_trace_t* self) nothrow get_frame_count;
21448 
21449     ///
21450     /// Returns the stack frame at the specified 0-based index.
21451     ///
21452     extern(System) cef_v8stack_frame_t* function (
21453         cef_v8stack_trace_t* self,
21454         int index) nothrow get_frame;
21455 }
21456 
21457 
21458 
21459 ///
21460 /// Returns the stack trace for the currently active context. |frame_limit| is
21461 /// the maximum number of frames that will be captured.
21462 ///
21463 cef_v8stack_trace_t* cef_v8stack_trace_get_current (int frame_limit);
21464 
21465 ///
21466 /// Structure representing a V8 stack frame handle. V8 handles can only be
21467 /// accessed from the thread on which they are created. Valid threads for
21468 /// creating a V8 handle include the render process main thread (TID_RENDERER)
21469 /// and WebWorker threads. A task runner for posting tasks on the associated
21470 /// thread can be retrieved via the cef_v8context_t::get_task_runner() function.
21471 ///
21472 struct cef_v8stack_frame_t
21473 {
21474     ///
21475     /// Base structure.
21476     ///
21477     cef_base_ref_counted_t base;
21478 
21479     ///
21480     /// Returns true (1) if the underlying handle is valid and it can be accessed
21481     /// on the current thread. Do not call any other functions if this function
21482     /// returns false (0).
21483     ///
21484     extern(System) int function (cef_v8stack_frame_t* self) nothrow is_valid;
21485 
21486     ///
21487     /// Returns the name of the resource script that contains the function.
21488     ///
21489     // The resulting string must be freed by calling cef_string_userfree_free().
21490     extern(System) cef_string_userfree_t function (
21491         cef_v8stack_frame_t* self) nothrow get_script_name;
21492 
21493     ///
21494     /// Returns the name of the resource script that contains the function or the
21495     /// sourceURL value if the script name is undefined and its source ends with a
21496     /// "//@ sourceURL=..." string.
21497     ///
21498     // The resulting string must be freed by calling cef_string_userfree_free().
21499     extern(System) cef_string_userfree_t function (
21500         cef_v8stack_frame_t* self) nothrow get_script_name_or_source_url;
21501 
21502     ///
21503     /// Returns the name of the function.
21504     ///
21505     // The resulting string must be freed by calling cef_string_userfree_free().
21506     extern(System) cef_string_userfree_t function (
21507         cef_v8stack_frame_t* self) nothrow get_function_name;
21508 
21509     ///
21510     /// Returns the 1-based line number for the function call or 0 if unknown.
21511     ///
21512     extern(System) int function (cef_v8stack_frame_t* self) nothrow get_line_number;
21513 
21514     ///
21515     /// Returns the 1-based column offset on the line for the function call or 0
21516     /// if unknown.
21517     ///
21518     extern(System) int function (cef_v8stack_frame_t* self) nothrow get_column;
21519 
21520     ///
21521     /// Returns true (1) if the function was compiled using eval().
21522     ///
21523     extern(System) int function (cef_v8stack_frame_t* self) nothrow is_eval;
21524 
21525     ///
21526     /// Returns true (1) if the function was called as a constructor via "new".
21527     ///
21528     extern(System) int function (cef_v8stack_frame_t* self) nothrow is_constructor;
21529 }
21530 
21531 
21532 
21533 ///
21534 /// Register a new V8 extension with the specified JavaScript extension code and
21535 /// handler. Functions implemented by the handler are prototyped using the
21536 /// keyword 'native'. The calling of a native function is restricted to the
21537 /// scope in which the prototype of the native function is defined. This
21538 /// function may only be called on the render process main thread.
21539 ///
21540 /// Example JavaScript extension code: <pre>
21541 ///   // create the 'example' global object if it doesn't already exist.
21542 ///   if (!example)
21543 ///     example = {};
21544 ///   // create the 'example.test' global object if it doesn't already exist.
21545 ///   if (!example.test)
21546 ///     example.test = {};
21547 ///   (function() {
21548 ///     // Define the function 'example.test.myfunction'.
21549 ///     example.test.myfunction = function() {
21550 ///       // Call CefV8Handler::Execute() with the function name 'MyFunction'
21551 ///       // and no arguments.
21552 ///       native function MyFunction();
21553 ///       return MyFunction();
21554 ///     };
21555 ///     // Define the getter function for parameter 'example.test.myparam'.
21556 ///     example.test.__defineGetter__('myparam', function() {
21557 ///       // Call CefV8Handler::Execute() with the function name 'GetMyParam'
21558 ///       // and no arguments.
21559 ///       native function GetMyParam();
21560 ///       return GetMyParam();
21561 ///     });
21562 ///     // Define the setter function for parameter 'example.test.myparam'.
21563 ///     example.test.__defineSetter__('myparam', function(b) {
21564 ///       // Call CefV8Handler::Execute() with the function name 'SetMyParam'
21565 ///       // and a single argument.
21566 ///       native function SetMyParam();
21567 ///       if(b) SetMyParam(b);
21568 ///     });
21569 ///
21570 ///     // Extension definitions can also contain normal JavaScript variables
21571 ///     // and functions.
21572 ///     var myint = 0;
21573 ///     example.test.increment = function() {
21574 ///       myint += 1;
21575 ///       return myint;
21576 ///     };
21577 ///   })();
21578 /// </pre>
21579 ///
21580 /// Example usage in the page: <pre>
21581 ///   // Call the function.
21582 ///   example.test.myfunction();
21583 ///   // Set the parameter.
21584 ///   example.test.myparam = value;
21585 ///   // Get the parameter.
21586 ///   value = example.test.myparam;
21587 ///   // Call another function.
21588 ///   example.test.increment();
21589 /// </pre>
21590 ///
21591 int cef_register_extension (
21592     const(cef_string_t)* extension_name,
21593     const(cef_string_t)* javascript_code,
21594     cef_v8handler_t* handler);
21595 
21596 // CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_
21597 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
21598 //
21599 // Redistribution and use in source and binary forms, with or without
21600 // modification, are permitted provided that the following conditions are
21601 // met:
21602 //
21603 //    * Redistributions of source code must retain the above copyright
21604 // notice, this list of conditions and the following disclaimer.
21605 //    * Redistributions in binary form must reproduce the above
21606 // copyright notice, this list of conditions and the following disclaimer
21607 // in the documentation and/or other materials provided with the
21608 // distribution.
21609 //    * Neither the name of Google Inc. nor the name Chromium Embedded
21610 // Framework nor the names of its contributors may be used to endorse
21611 // or promote products derived from this software without specific prior
21612 // written permission.
21613 //
21614 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21615 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21616 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21617 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21618 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21619 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21620 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21621 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21622 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21623 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21624 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21625 //
21626 // ---------------------------------------------------------------------------
21627 //
21628 // This file was generated by the CEF translator tool and should not edited
21629 // by hand. See the translator.README.txt file in the tools directory for
21630 // more information.
21631 //
21632 // $hash=f1ac6a6d5605078a38b7fa7e898619623eca6d51$
21633 //
21634 
21635 extern (C):
21636 
21637 ///
21638 /// Structure that wraps other data value types. Complex types (binary,
21639 /// dictionary and list) will be referenced but not owned by this object. Can be
21640 /// used on any process and thread.
21641 ///
21642 struct cef_value_t
21643 {
21644     ///
21645     /// Base structure.
21646     ///
21647 
21648     ///
21649     /// Returns true (1) if the underlying data is valid. This will always be true
21650     /// (1) for simple types. For complex types (binary, dictionary and list) the
21651     /// underlying data may become invalid if owned by another object (e.g. list
21652     /// or dictionary) and that other object is then modified or destroyed. This
21653     /// value object can be re-used by calling Set*() even if the underlying data
21654     /// is invalid.
21655     ///
21656 
21657     ///
21658     /// Returns true (1) if the underlying data is owned by another object.
21659 
21660     cef_base_ref_counted_t base;
21661     extern(System) int function (cef_value_t* self) nothrow is_valid;
21662     ///
21663     extern(System) int function (cef_value_t* self) nothrow is_owned;
21664 
21665     ///
21666     /// Returns true (1) if the underlying data is read-only. Some APIs may expose
21667     /// read-only objects.
21668     ///
21669     extern(System) int function (cef_value_t* self) nothrow is_read_only;
21670 
21671     ///
21672     /// Returns true (1) if this object and |that| object have the same underlying
21673     /// data. If true (1) modifications to this object will also affect |that|
21674     /// object and vice-versa.
21675     ///
21676     extern(System) int function (cef_value_t* self, cef_value_t* that) nothrow is_same;
21677 
21678     ///
21679     /// Returns true (1) if this object and |that| object have an equivalent
21680     /// underlying value but are not necessarily the same object.
21681     ///
21682     extern(System) int function (cef_value_t* self, cef_value_t* that) nothrow is_equal;
21683 
21684     ///
21685     /// Returns a copy of this object. The underlying data will also be copied.
21686     ///
21687     extern(System) cef_value_t* function (cef_value_t* self) nothrow copy;
21688 
21689     ///
21690     /// Returns the underlying value type.
21691     ///
21692     extern(System) cef_value_type_t function (cef_value_t* self) nothrow get_type;
21693 
21694     ///
21695     /// Returns the underlying value as type bool.
21696     ///
21697     extern(System) int function (cef_value_t* self) nothrow get_bool;
21698 
21699     ///
21700     /// Returns the underlying value as type int.
21701     ///
21702     extern(System) int function (cef_value_t* self) nothrow get_int;
21703 
21704     ///
21705     /// Returns the underlying value as type double.
21706     ///
21707     extern(System) double function (cef_value_t* self) nothrow get_double;
21708 
21709     ///
21710     /// Returns the underlying value as type string.
21711     ///
21712     // The resulting string must be freed by calling cef_string_userfree_free().
21713     extern(System) cef_string_userfree_t function (cef_value_t* self) nothrow get_string;
21714 
21715     ///
21716     /// Returns the underlying value as type binary. The returned reference may
21717     /// become invalid if the value is owned by another object or if ownership is
21718     /// transferred to another object in the future. To maintain a reference to
21719     /// the value after assigning ownership to a dictionary or list pass this
21720     /// object to the set_value() function instead of passing the returned
21721     /// reference to set_binary().
21722     ///
21723     extern(System) cef_binary_value_t* function (cef_value_t* self) nothrow get_binary;
21724 
21725     ///
21726     /// Returns the underlying value as type dictionary. The returned reference
21727     /// may become invalid if the value is owned by another object or if ownership
21728     /// is transferred to another object in the future. To maintain a reference to
21729     /// the value after assigning ownership to a dictionary or list pass this
21730     /// object to the set_value() function instead of passing the returned
21731     /// reference to set_dictionary().
21732     ///
21733     extern(System) cef_dictionary_value_t* function (cef_value_t* self) nothrow get_dictionary;
21734 
21735     ///
21736     /// Returns the underlying value as type list. The returned reference may
21737     /// become invalid if the value is owned by another object or if ownership is
21738     /// transferred to another object in the future. To maintain a reference to
21739     /// the value after assigning ownership to a dictionary or list pass this
21740     /// object to the set_value() function instead of passing the returned
21741     /// reference to set_list().
21742     ///
21743     extern(System) cef_list_value_t* function (cef_value_t* self) nothrow get_list;
21744 
21745     ///
21746     /// Sets the underlying value as type null. Returns true (1) if the value was
21747     /// set successfully.
21748     ///
21749     extern(System) int function (cef_value_t* self) nothrow set_null;
21750 
21751     ///
21752     /// Sets the underlying value as type bool. Returns true (1) if the value was
21753     /// set successfully.
21754     ///
21755     extern(System) int function (cef_value_t* self, int value) nothrow set_bool;
21756 
21757     ///
21758     /// Sets the underlying value as type int. Returns true (1) if the value was
21759     /// set successfully.
21760     ///
21761     extern(System) int function (cef_value_t* self, int value) nothrow set_int;
21762 
21763     ///
21764     /// Sets the underlying value as type double. Returns true (1) if the value
21765     /// was set successfully.
21766     ///
21767     extern(System) int function (cef_value_t* self, double value) nothrow set_double;
21768 
21769     ///
21770     /// Sets the underlying value as type string. Returns true (1) if the value
21771     /// was set successfully.
21772     ///
21773     extern(System) int function (cef_value_t* self, const(cef_string_t)* value) nothrow set_string;
21774 
21775     ///
21776     /// Sets the underlying value as type binary. Returns true (1) if the value
21777     /// was set successfully. This object keeps a reference to |value| and
21778     /// ownership of the underlying data remains unchanged.
21779     ///
21780     extern(System) int function (cef_value_t* self, cef_binary_value_t* value) nothrow set_binary;
21781 
21782     ///
21783     /// Sets the underlying value as type dict. Returns true (1) if the value was
21784     /// set successfully. This object keeps a reference to |value| and ownership
21785     /// of the underlying data remains unchanged.
21786     ///
21787     extern(System) int function (
21788         cef_value_t* self,
21789         cef_dictionary_value_t* value) nothrow set_dictionary;
21790 
21791     ///
21792     /// Sets the underlying value as type list. Returns true (1) if the value was
21793     /// set successfully. This object keeps a reference to |value| and ownership
21794     /// of the underlying data remains unchanged.
21795     ///
21796     extern(System) int function (cef_value_t* self, cef_list_value_t* value) nothrow set_list;
21797 }
21798 
21799 
21800 
21801 ///
21802 /// Creates a new object.
21803 ///
21804 cef_value_t* cef_value_create ();
21805 
21806 ///
21807 /// Structure representing a binary value. Can be used on any process and
21808 /// thread.
21809 ///
21810 struct cef_binary_value_t
21811 {
21812     ///
21813     /// Base structure.
21814     ///
21815     cef_base_ref_counted_t base;
21816 
21817     ///
21818     /// Returns true (1) if this object is valid. This object may become invalid
21819     /// if the underlying data is owned by another object (e.g. list or
21820     /// dictionary) and that other object is then modified or destroyed. Do not
21821     /// call any other functions if this function returns false (0).
21822     ///
21823     extern(System) int function (cef_binary_value_t* self) nothrow is_valid;
21824 
21825     ///
21826     /// Returns true (1) if this object is currently owned by another object.
21827     ///
21828     extern(System) int function (cef_binary_value_t* self) nothrow is_owned;
21829 
21830     ///
21831     /// Returns true (1) if this object and |that| object have the same underlying
21832     /// data.
21833     ///
21834     extern(System) int function (
21835         cef_binary_value_t* self,
21836         cef_binary_value_t* that) nothrow is_same;
21837 
21838     ///
21839     /// Returns true (1) if this object and |that| object have an equivalent
21840     /// underlying value but are not necessarily the same object.
21841     ///
21842     extern(System) int function (
21843         cef_binary_value_t* self,
21844         cef_binary_value_t* that) nothrow is_equal;
21845 
21846     ///
21847     /// Returns a copy of this object. The data in this object will also be
21848     /// copied.
21849     ///
21850     extern(System) cef_binary_value_t* function (cef_binary_value_t* self) nothrow copy;
21851 
21852     ///
21853     /// Returns a pointer to the beginning of the memory block. The returned
21854     /// pointer is valid as long as the cef_binary_value_t is alive.
21855     ///
21856     extern(System) const(void)* function (cef_binary_value_t* self) nothrow get_raw_data;
21857 
21858     ///
21859     /// Returns the data size.
21860     ///
21861     extern(System) size_t function (cef_binary_value_t* self) nothrow get_size;
21862 
21863     ///
21864     /// Read up to |buffer_size| number of bytes into |buffer|. Reading begins at
21865     /// the specified byte |data_offset|. Returns the number of bytes read.
21866     ///
21867     extern(System) size_t function (
21868         cef_binary_value_t* self,
21869         void* buffer,
21870         size_t buffer_size,
21871         size_t data_offset) nothrow get_data;
21872 }
21873 
21874 
21875 
21876 ///
21877 /// Creates a new object that is not owned by any other object. The specified
21878 /// |data| will be copied.
21879 ///
21880 cef_binary_value_t* cef_binary_value_create (
21881     const(void)* data,
21882     size_t data_size);
21883 
21884 ///
21885 /// Structure representing a dictionary value. Can be used on any process and
21886 /// thread.
21887 ///
21888 struct cef_dictionary_value_t
21889 {
21890     ///
21891     /// Base structure.
21892     ///
21893     cef_base_ref_counted_t base;
21894 
21895     ///
21896     /// Returns true (1) if this object is valid. This object may become invalid
21897     /// if the underlying data is owned by another object (e.g. list or
21898     /// dictionary) and that other object is then modified or destroyed. Do not
21899     /// call any other functions if this function returns false (0).
21900     ///
21901     extern(System) int function (cef_dictionary_value_t* self) nothrow is_valid;
21902 
21903     ///
21904     /// Returns true (1) if this object is currently owned by another object.
21905     ///
21906     extern(System) int function (cef_dictionary_value_t* self) nothrow is_owned;
21907 
21908     ///
21909     /// Returns true (1) if the values of this object are read-only. Some APIs may
21910     /// expose read-only objects.
21911     ///
21912     extern(System) int function (cef_dictionary_value_t* self) nothrow is_read_only;
21913 
21914     ///
21915     /// Returns true (1) if this object and |that| object have the same underlying
21916     /// data. If true (1) modifications to this object will also affect |that|
21917     /// object and vice-versa.
21918     ///
21919     extern(System) int function (
21920         cef_dictionary_value_t* self,
21921         cef_dictionary_value_t* that) nothrow is_same;
21922 
21923     ///
21924     /// Returns true (1) if this object and |that| object have an equivalent
21925     /// underlying value but are not necessarily the same object.
21926     ///
21927     extern(System) int function (
21928         cef_dictionary_value_t* self,
21929         cef_dictionary_value_t* that) nothrow is_equal;
21930 
21931     ///
21932     /// Returns a writable copy of this object. If |exclude_NULL_children| is true
21933     /// (1) any NULL dictionaries or lists will be excluded from the copy.
21934     ///
21935     extern(System) cef_dictionary_value_t* function (
21936         cef_dictionary_value_t* self,
21937         int exclude_empty_children) nothrow copy;
21938 
21939     ///
21940     /// Returns the number of values.
21941     ///
21942     extern(System) size_t function (cef_dictionary_value_t* self) nothrow get_size;
21943 
21944     ///
21945     /// Removes all values. Returns true (1) on success.
21946     ///
21947     extern(System) int function (cef_dictionary_value_t* self) nothrow clear;
21948 
21949     ///
21950     /// Returns true (1) if the current dictionary has a value for the given key.
21951     ///
21952     extern(System) int function (
21953         cef_dictionary_value_t* self,
21954         const(cef_string_t)* key) nothrow has_key;
21955 
21956     ///
21957     /// Reads all keys for this dictionary into the specified vector.
21958     ///
21959     extern(System) int function (
21960         cef_dictionary_value_t* self,
21961         cef_string_list_t keys) nothrow get_keys;
21962 
21963     ///
21964     /// Removes the value at the specified key. Returns true (1) is the value was
21965     /// removed successfully.
21966     ///
21967     extern(System) int function (
21968         cef_dictionary_value_t* self,
21969         const(cef_string_t)* key) nothrow remove;
21970 
21971     ///
21972     /// Returns the value type for the specified key.
21973     ///
21974     extern(System) cef_value_type_t function (
21975         cef_dictionary_value_t* self,
21976         const(cef_string_t)* key) nothrow get_type;
21977 
21978     ///
21979     /// Returns the value at the specified key. For simple types the returned
21980     /// value will copy existing data and modifications to the value will not
21981     /// modify this object. For complex types (binary, dictionary and list) the
21982     /// returned value will reference existing data and modifications to the value
21983     /// will modify this object.
21984     ///
21985     extern(System) cef_value_t* function (
21986         cef_dictionary_value_t* self,
21987         const(cef_string_t)* key) nothrow get_value;
21988 
21989     ///
21990     /// Returns the value at the specified key as type bool.
21991     ///
21992     extern(System) int function (
21993         cef_dictionary_value_t* self,
21994         const(cef_string_t)* key) nothrow get_bool;
21995 
21996     ///
21997     /// Returns the value at the specified key as type int.
21998     ///
21999     extern(System) int function (
22000         cef_dictionary_value_t* self,
22001         const(cef_string_t)* key) nothrow get_int;
22002 
22003     ///
22004     /// Returns the value at the specified key as type double.
22005     ///
22006     extern(System) double function (
22007         cef_dictionary_value_t* self,
22008         const(cef_string_t)* key) nothrow get_double;
22009 
22010     ///
22011     /// Returns the value at the specified key as type string.
22012     ///
22013     // The resulting string must be freed by calling cef_string_userfree_free().
22014     extern(System) cef_string_userfree_t function (
22015         cef_dictionary_value_t* self,
22016         const(cef_string_t)* key) nothrow get_string;
22017 
22018     ///
22019     /// Returns the value at the specified key as type binary. The returned value
22020     /// will reference existing data.
22021     ///
22022     extern(System) cef_binary_value_t* function (
22023         cef_dictionary_value_t* self,
22024         const(cef_string_t)* key) nothrow get_binary;
22025 
22026     ///
22027     /// Returns the value at the specified key as type dictionary. The returned
22028     /// value will reference existing data and modifications to the value will
22029     /// modify this object.
22030     ///
22031     extern(System) cef_dictionary_value_t* function (
22032         cef_dictionary_value_t* self,
22033         const(cef_string_t)* key) nothrow get_dictionary;
22034 
22035     ///
22036     /// Returns the value at the specified key as type list. The returned value
22037     /// will reference existing data and modifications to the value will modify
22038     /// this object.
22039     ///
22040     extern(System) cef_list_value_t* function (
22041         cef_dictionary_value_t* self,
22042         const(cef_string_t)* key) nothrow get_list;
22043 
22044     ///
22045     /// Sets the value at the specified key. Returns true (1) if the value was set
22046     /// successfully. If |value| represents simple data then the underlying data
22047     /// will be copied and modifications to |value| will not modify this object.
22048     /// If |value| represents complex data (binary, dictionary or list) then the
22049     /// underlying data will be referenced and modifications to |value| will
22050     /// modify this object.
22051     ///
22052     extern(System) int function (
22053         cef_dictionary_value_t* self,
22054         const(cef_string_t)* key,
22055         cef_value_t* value) nothrow set_value;
22056 
22057     ///
22058     /// Sets the value at the specified key as type null. Returns true (1) if the
22059     /// value was set successfully.
22060     ///
22061     extern(System) int function (
22062         cef_dictionary_value_t* self,
22063         const(cef_string_t)* key) nothrow set_null;
22064 
22065     ///
22066     /// Sets the value at the specified key as type bool. Returns true (1) if the
22067     /// value was set successfully.
22068     ///
22069     extern(System) int function (
22070         cef_dictionary_value_t* self,
22071         const(cef_string_t)* key,
22072         int value) nothrow set_bool;
22073 
22074     ///
22075     /// Sets the value at the specified key as type int. Returns true (1) if the
22076     /// value was set successfully.
22077     ///
22078     extern(System) int function (
22079         cef_dictionary_value_t* self,
22080         const(cef_string_t)* key,
22081         int value) nothrow set_int;
22082 
22083     ///
22084     /// Sets the value at the specified key as type double. Returns true (1) if
22085     /// the value was set successfully.
22086     ///
22087     extern(System) int function (
22088         cef_dictionary_value_t* self,
22089         const(cef_string_t)* key,
22090         double value) nothrow set_double;
22091 
22092     ///
22093     /// Sets the value at the specified key as type string. Returns true (1) if
22094     /// the value was set successfully.
22095     ///
22096     extern(System) int function (
22097         cef_dictionary_value_t* self,
22098         const(cef_string_t)* key,
22099         const(cef_string_t)* value) nothrow set_string;
22100 
22101     ///
22102     /// Sets the value at the specified key as type binary. Returns true (1) if
22103     /// the value was set successfully. If |value| is currently owned by another
22104     /// object then the value will be copied and the |value| reference will not
22105     /// change. Otherwise, ownership will be transferred to this object and the
22106     /// |value| reference will be invalidated.
22107     ///
22108     extern(System) int function (
22109         cef_dictionary_value_t* self,
22110         const(cef_string_t)* key,
22111         cef_binary_value_t* value) nothrow set_binary;
22112 
22113     ///
22114     /// Sets the value at the specified key as type dict. Returns true (1) if the
22115     /// value was set successfully. If |value| is currently owned by another
22116     /// object then the value will be copied and the |value| reference will not
22117     /// change. Otherwise, ownership will be transferred to this object and the
22118     /// |value| reference will be invalidated.
22119     ///
22120     extern(System) int function (
22121         cef_dictionary_value_t* self,
22122         const(cef_string_t)* key,
22123         cef_dictionary_value_t* value) nothrow set_dictionary;
22124 
22125     ///
22126     /// Sets the value at the specified key as type list. Returns true (1) if the
22127     /// value was set successfully. If |value| is currently owned by another
22128     /// object then the value will be copied and the |value| reference will not
22129     /// change. Otherwise, ownership will be transferred to this object and the
22130     /// |value| reference will be invalidated.
22131     ///
22132     extern(System) int function (
22133         cef_dictionary_value_t* self,
22134         const(cef_string_t)* key,
22135         cef_list_value_t* value) nothrow set_list;
22136 }
22137 
22138 
22139 
22140 ///
22141 /// Creates a new object that is not owned by any other object.
22142 ///
22143 cef_dictionary_value_t* cef_dictionary_value_create ();
22144 
22145 ///
22146 /// Structure representing a list value. Can be used on any process and thread.
22147 ///
22148 struct cef_list_value_t
22149 {
22150     ///
22151     /// Base structure.
22152     ///
22153     cef_base_ref_counted_t base;
22154 
22155     ///
22156     /// Returns true (1) if this object is valid. This object may become invalid
22157     /// if the underlying data is owned by another object (e.g. list or
22158     /// dictionary) and that other object is then modified or destroyed. Do not
22159     /// call any other functions if this function returns false (0).
22160     ///
22161     extern(System) int function (cef_list_value_t* self) nothrow is_valid;
22162 
22163     ///
22164     /// Returns true (1) if this object is currently owned by another object.
22165     ///
22166     extern(System) int function (cef_list_value_t* self) nothrow is_owned;
22167 
22168     ///
22169     /// Returns true (1) if the values of this object are read-only. Some APIs may
22170     /// expose read-only objects.
22171     ///
22172     extern(System) int function (cef_list_value_t* self) nothrow is_read_only;
22173 
22174     ///
22175     /// Returns true (1) if this object and |that| object have the same underlying
22176     /// data. If true (1) modifications to this object will also affect |that|
22177     /// object and vice-versa.
22178     ///
22179     extern(System) int function (cef_list_value_t* self, cef_list_value_t* that) nothrow is_same;
22180 
22181     ///
22182     /// Returns true (1) if this object and |that| object have an equivalent
22183     /// underlying value but are not necessarily the same object.
22184     ///
22185     extern(System) int function (cef_list_value_t* self, cef_list_value_t* that) nothrow is_equal;
22186 
22187     ///
22188     /// Returns a writable copy of this object.
22189     ///
22190     extern(System) cef_list_value_t* function (cef_list_value_t* self) nothrow copy;
22191 
22192     ///
22193     /// Sets the number of values. If the number of values is expanded all new
22194     /// value slots will default to type null. Returns true (1) on success.
22195     ///
22196     extern(System) int function (cef_list_value_t* self, size_t size) nothrow set_size;
22197 
22198     ///
22199     /// Returns the number of values.
22200     ///
22201     extern(System) size_t function (cef_list_value_t* self) nothrow get_size;
22202 
22203     ///
22204     /// Removes all values. Returns true (1) on success.
22205     ///
22206     extern(System) int function (cef_list_value_t* self) nothrow clear;
22207 
22208     ///
22209     /// Removes the value at the specified index.
22210     ///
22211     extern(System) int function (cef_list_value_t* self, size_t index) nothrow remove;
22212 
22213     ///
22214     /// Returns the value type at the specified index.
22215     ///
22216     extern(System) cef_value_type_t function (cef_list_value_t* self, size_t index) nothrow get_type;
22217 
22218     ///
22219     /// Returns the value at the specified index. For simple types the returned
22220     /// value will copy existing data and modifications to the value will not
22221     /// modify this object. For complex types (binary, dictionary and list) the
22222     /// returned value will reference existing data and modifications to the value
22223     /// will modify this object.
22224     ///
22225     extern(System) cef_value_t* function (cef_list_value_t* self, size_t index) nothrow get_value;
22226 
22227     ///
22228     /// Returns the value at the specified index as type bool.
22229     ///
22230     extern(System) int function (cef_list_value_t* self, size_t index) nothrow get_bool;
22231 
22232     ///
22233     /// Returns the value at the specified index as type int.
22234     ///
22235     extern(System) int function (cef_list_value_t* self, size_t index) nothrow get_int;
22236 
22237     ///
22238     /// Returns the value at the specified index as type double.
22239     ///
22240     extern(System) double function (cef_list_value_t* self, size_t index) nothrow get_double;
22241 
22242     ///
22243     /// Returns the value at the specified index as type string.
22244     ///
22245     // The resulting string must be freed by calling cef_string_userfree_free().
22246     extern(System) cef_string_userfree_t function (
22247         cef_list_value_t* self,
22248         size_t index) nothrow get_string;
22249 
22250     ///
22251     /// Returns the value at the specified index as type binary. The returned
22252     /// value will reference existing data.
22253     ///
22254     extern(System) cef_binary_value_t* function (
22255         cef_list_value_t* self,
22256         size_t index) nothrow get_binary;
22257 
22258     ///
22259     /// Returns the value at the specified index as type dictionary. The returned
22260     /// value will reference existing data and modifications to the value will
22261     /// modify this object.
22262     ///
22263     extern(System) cef_dictionary_value_t* function (
22264         cef_list_value_t* self,
22265         size_t index) nothrow get_dictionary;
22266 
22267     ///
22268     /// Returns the value at the specified index as type list. The returned value
22269     /// will reference existing data and modifications to the value will modify
22270     /// this object.
22271     ///
22272     extern(System) cef_list_value_t* function (
22273         cef_list_value_t* self,
22274         size_t index) nothrow get_list;
22275 
22276     ///
22277     /// Sets the value at the specified index. Returns true (1) if the value was
22278     /// set successfully. If |value| represents simple data then the underlying
22279     /// data will be copied and modifications to |value| will not modify this
22280     /// object. If |value| represents complex data (binary, dictionary or list)
22281     /// then the underlying data will be referenced and modifications to |value|
22282     /// will modify this object.
22283     ///
22284     extern(System) int function (
22285         cef_list_value_t* self,
22286         size_t index,
22287         cef_value_t* value) nothrow set_value;
22288 
22289     ///
22290     /// Sets the value at the specified index as type null. Returns true (1) if
22291     /// the value was set successfully.
22292     ///
22293     extern(System) int function (cef_list_value_t* self, size_t index) nothrow set_null;
22294 
22295     ///
22296     /// Sets the value at the specified index as type bool. Returns true (1) if
22297     /// the value was set successfully.
22298     ///
22299     extern(System) int function (cef_list_value_t* self, size_t index, int value) nothrow set_bool;
22300 
22301     ///
22302     /// Sets the value at the specified index as type int. Returns true (1) if the
22303     /// value was set successfully.
22304     ///
22305     extern(System) int function (cef_list_value_t* self, size_t index, int value) nothrow set_int;
22306 
22307     ///
22308     /// Sets the value at the specified index as type double. Returns true (1) if
22309     /// the value was set successfully.
22310     ///
22311     extern(System) int function (
22312         cef_list_value_t* self,
22313         size_t index,
22314         double value) nothrow set_double;
22315 
22316     ///
22317     /// Sets the value at the specified index as type string. Returns true (1) if
22318     /// the value was set successfully.
22319     ///
22320     extern(System) int function (
22321         cef_list_value_t* self,
22322         size_t index,
22323         const(cef_string_t)* value) nothrow set_string;
22324 
22325     ///
22326     /// Sets the value at the specified index as type binary. Returns true (1) if
22327     /// the value was set successfully. If |value| is currently owned by another
22328     /// object then the value will be copied and the |value| reference will not
22329     /// change. Otherwise, ownership will be transferred to this object and the
22330     /// |value| reference will be invalidated.
22331     ///
22332     extern(System) int function (
22333         cef_list_value_t* self,
22334         size_t index,
22335         cef_binary_value_t* value) nothrow set_binary;
22336 
22337     ///
22338     /// Sets the value at the specified index as type dict. Returns true (1) if
22339     /// the value was set successfully. If |value| is currently owned by another
22340     /// object then the value will be copied and the |value| reference will not
22341     /// change. Otherwise, ownership will be transferred to this object and the
22342     /// |value| reference will be invalidated.
22343     ///
22344     extern(System) int function (
22345         cef_list_value_t* self,
22346         size_t index,
22347         cef_dictionary_value_t* value) nothrow set_dictionary;
22348 
22349     ///
22350     /// Sets the value at the specified index as type list. Returns true (1) if
22351     /// the value was set successfully. If |value| is currently owned by another
22352     /// object then the value will be copied and the |value| reference will not
22353     /// change. Otherwise, ownership will be transferred to this object and the
22354     /// |value| reference will be invalidated.
22355     ///
22356     extern(System) int function (
22357         cef_list_value_t* self,
22358         size_t index,
22359         cef_list_value_t* value) nothrow set_list;
22360 }
22361 
22362 
22363 
22364 ///
22365 /// Creates a new object that is not owned by any other object.
22366 ///
22367 cef_list_value_t* cef_list_value_create ();
22368 
22369 // CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
22370 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
22371 //
22372 // Redistribution and use in source and binary forms, with or without
22373 // modification, are permitted provided that the following conditions are
22374 // met:
22375 //
22376 //    * Redistributions of source code must retain the above copyright
22377 // notice, this list of conditions and the following disclaimer.
22378 //    * Redistributions in binary form must reproduce the above
22379 // copyright notice, this list of conditions and the following disclaimer
22380 // in the documentation and/or other materials provided with the
22381 // distribution.
22382 //    * Neither the name of Google Inc. nor the name Chromium Embedded
22383 // Framework nor the names of its contributors may be used to endorse
22384 // or promote products derived from this software without specific prior
22385 // written permission.
22386 //
22387 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22388 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22389 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22390 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22391 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22392 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22393 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22394 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22395 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22396 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22397 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22398 //
22399 // ---------------------------------------------------------------------------
22400 //
22401 // This file was generated by the CEF translator tool and should not edited
22402 // by hand. See the translator.README.txt file in the tools directory for
22403 // more information.
22404 //
22405 // $hash=7dbd68a4517f8fc578a523d590d1ff7a8aa2a49a$
22406 //
22407 
22408 extern (C):
22409 
22410 ///
22411 /// WaitableEvent is a thread synchronization tool that allows one thread to
22412 /// wait for another thread to finish some work. This is equivalent to using a
22413 /// Lock+ConditionVariable to protect a simple boolean value. However, using
22414 /// WaitableEvent in conjunction with a Lock to wait for a more complex state
22415 /// change (e.g., for an item to be added to a queue) is not recommended. In
22416 /// that case consider using a ConditionVariable instead of a WaitableEvent. It
22417 /// is safe to create and/or signal a WaitableEvent from any thread. Blocking on
22418 /// a WaitableEvent by calling the *wait() functions is not allowed on the
22419 /// browser process UI or IO threads.
22420 ///
22421 struct cef_waitable_event_t
22422 {
22423     ///
22424     /// Base structure.
22425     ///
22426 
22427     ///
22428     /// Put the event in the un-signaled state.
22429     ///
22430 
22431     cef_base_ref_counted_t base;
22432     extern(System) void function (cef_waitable_event_t* self) nothrow reset;
22433     ///
22434     /// Put the event in the signaled state. This causes any thread blocked on
22435     /// Wait to be woken up.
22436     ///
22437     extern(System) void function (cef_waitable_event_t* self) nothrow signal;
22438 
22439     ///
22440     /// Returns true (1) if the event is in the signaled state, else false (0). If
22441     /// the event was created with |automatic_reset| set to true (1) then calling
22442     /// this function will also cause a reset.
22443     ///
22444     extern(System) int function (cef_waitable_event_t* self) nothrow is_signaled;
22445 
22446     ///
22447     /// Wait indefinitely for the event to be signaled. This function will not
22448     /// return until after the call to signal() has completed. This function
22449     /// cannot be called on the browser process UI or IO threads.
22450     ///
22451     extern(System) void function (cef_waitable_event_t* self) nothrow wait;
22452 
22453     ///
22454     /// Wait up to |max_ms| milliseconds for the event to be signaled. Returns
22455     /// true (1) if the event was signaled. A return value of false (0) does not
22456     /// necessarily mean that |max_ms| was exceeded. This function will not return
22457     /// until after the call to signal() has completed. This function cannot be
22458     /// called on the browser process UI or IO threads.
22459     ///
22460     extern(System) int function (cef_waitable_event_t* self, long max_ms) nothrow timed_wait;
22461 }
22462 
22463 
22464 
22465 ///
22466 /// Create a new waitable event. If |automatic_reset| is true (1) then the event
22467 /// state is automatically reset to un-signaled after a single waiting thread
22468 /// has been released; otherwise, the state remains signaled until reset() is
22469 /// called manually. If |initially_signaled| is true (1) then the event will
22470 /// start in the signaled state.
22471 ///
22472 cef_waitable_event_t* cef_waitable_event_create (
22473     int automatic_reset,
22474     int initially_signaled);
22475 
22476 // CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_
22477 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
22478 //
22479 // Redistribution and use in source and binary forms, with or without
22480 // modification, are permitted provided that the following conditions are
22481 // met:
22482 //
22483 //    * Redistributions of source code must retain the above copyright
22484 // notice, this list of conditions and the following disclaimer.
22485 //    * Redistributions in binary form must reproduce the above
22486 // copyright notice, this list of conditions and the following disclaimer
22487 // in the documentation and/or other materials provided with the
22488 // distribution.
22489 //    * Neither the name of Google Inc. nor the name Chromium Embedded
22490 // Framework nor the names of its contributors may be used to endorse
22491 // or promote products derived from this software without specific prior
22492 // written permission.
22493 //
22494 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22495 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22496 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22497 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22498 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22499 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22500 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22501 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22502 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22503 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22504 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22505 //
22506 // ---------------------------------------------------------------------------
22507 //
22508 // This file was generated by the CEF translator tool and should not edited
22509 // by hand. See the translator.README.txt file in the tools directory for
22510 // more information.
22511 //
22512 // $hash=e20d330e3d1cd3ac5bcd3ce7ee09bc1025490f63$
22513 //
22514 
22515 extern (C):
22516 
22517 ///
22518 /// Structure representing the issuer or subject field of an X.509 certificate.
22519 ///
22520 struct cef_x509cert_principal_t
22521 {
22522     ///
22523     /// Base structure.
22524     ///
22525 
22526     ///
22527     /// Returns a name that can be used to represent the issuer. It tries in this
22528     /// order: Common Name (CN), Organization Name (O) and Organizational Unit
22529     /// Name (OU) and returns the first non-NULL one found.
22530     ///
22531     // The resulting string must be freed by calling cef_string_userfree_free().
22532 
22533     ///
22534     /// Returns the common name.
22535     ///
22536     // The resulting string must be freed by calling cef_string_userfree_free().
22537 
22538     ///
22539     /// Returns the locality name.
22540 
22541     cef_base_ref_counted_t base;
22542     extern(System) cef_string_userfree_t function (
22543         cef_x509cert_principal_t* self) nothrow get_display_name;
22544     extern(System) cef_string_userfree_t function (
22545         cef_x509cert_principal_t* self) nothrow get_common_name; ///
22546     // The resulting string must be freed by calling cef_string_userfree_free().
22547     extern(System) cef_string_userfree_t function (
22548         cef_x509cert_principal_t* self) nothrow get_locality_name;
22549 
22550     ///
22551     /// Returns the state or province name.
22552     ///
22553     // The resulting string must be freed by calling cef_string_userfree_free().
22554     extern(System) cef_string_userfree_t function (
22555         cef_x509cert_principal_t* self) nothrow get_state_or_province_name;
22556 
22557     ///
22558     /// Returns the country name.
22559     ///
22560     // The resulting string must be freed by calling cef_string_userfree_free().
22561     extern(System) cef_string_userfree_t function (
22562         cef_x509cert_principal_t* self) nothrow get_country_name;
22563 
22564     ///
22565     /// Retrieve the list of organization names.
22566     ///
22567     extern(System) void function (
22568         cef_x509cert_principal_t* self,
22569         cef_string_list_t names) nothrow get_organization_names;
22570 
22571     ///
22572     /// Retrieve the list of organization unit names.
22573     ///
22574     extern(System) void function (
22575         cef_x509cert_principal_t* self,
22576         cef_string_list_t names) nothrow get_organization_unit_names;
22577 }
22578 
22579 
22580 
22581 ///
22582 /// Structure representing a X.509 certificate.
22583 ///
22584 struct cef_x509certificate_t
22585 {
22586     ///
22587     /// Base structure.
22588     ///
22589     cef_base_ref_counted_t base;
22590 
22591     ///
22592     /// Returns the subject of the X.509 certificate. For HTTPS server
22593     /// certificates this represents the web server.  The common name of the
22594     /// subject should match the host name of the web server.
22595     ///
22596     extern(System) cef_x509cert_principal_t* function (
22597         cef_x509certificate_t* self) nothrow get_subject;
22598 
22599     ///
22600     /// Returns the issuer of the X.509 certificate.
22601     ///
22602     extern(System) cef_x509cert_principal_t* function (
22603         cef_x509certificate_t* self) nothrow get_issuer;
22604 
22605     ///
22606     /// Returns the DER encoded serial number for the X.509 certificate. The value
22607     /// possibly includes a leading 00 byte.
22608     ///
22609     extern(System) cef_binary_value_t* function (
22610         cef_x509certificate_t* self) nothrow get_serial_number;
22611 
22612     ///
22613     /// Returns the date before which the X.509 certificate is invalid.
22614     /// CefBaseTime.GetTimeT() will return 0 if no date was specified.
22615     ///
22616     extern(System) cef_basetime_t function (cef_x509certificate_t* self) nothrow get_valid_start;
22617 
22618     ///
22619     /// Returns the date after which the X.509 certificate is invalid.
22620     /// CefBaseTime.GetTimeT() will return 0 if no date was specified.
22621     ///
22622     extern(System) cef_basetime_t function (cef_x509certificate_t* self) nothrow get_valid_expiry;
22623 
22624     ///
22625     /// Returns the DER encoded data for the X.509 certificate.
22626     ///
22627     extern(System) cef_binary_value_t* function (
22628         cef_x509certificate_t* self) nothrow get_derencoded;
22629 
22630     ///
22631     /// Returns the PEM encoded data for the X.509 certificate.
22632     ///
22633     extern(System) cef_binary_value_t* function (
22634         cef_x509certificate_t* self) nothrow get_pemencoded;
22635 
22636     ///
22637     /// Returns the number of certificates in the issuer chain. If 0, the
22638     /// certificate is self-signed.
22639     ///
22640     extern(System) size_t function (cef_x509certificate_t* self) nothrow get_issuer_chain_size;
22641 
22642     ///
22643     /// Returns the DER encoded data for the certificate issuer chain. If we
22644     /// failed to encode a certificate in the chain it is still present in the
22645     /// array but is an NULL string.
22646     ///
22647     extern(System) void function (
22648         cef_x509certificate_t* self,
22649         size_t* chainCount,
22650         cef_binary_value_t** chain) nothrow get_derencoded_issuer_chain;
22651 
22652     ///
22653     /// Returns the PEM encoded data for the certificate issuer chain. If we
22654     /// failed to encode a certificate in the chain it is still present in the
22655     /// array but is an NULL string.
22656     ///
22657     extern(System) void function (
22658         cef_x509certificate_t* self,
22659         size_t* chainCount,
22660         cef_binary_value_t** chain) nothrow get_pemencoded_issuer_chain;
22661 }
22662 
22663 
22664 
22665 // CEF_INCLUDE_CAPI_CEF_X509_CERTIFICATE_CAPI_H_
22666 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
22667 //
22668 // Redistribution and use in source and binary forms, with or without
22669 // modification, are permitted provided that the following conditions are
22670 // met:
22671 //
22672 //    * Redistributions of source code must retain the above copyright
22673 // notice, this list of conditions and the following disclaimer.
22674 //    * Redistributions in binary form must reproduce the above
22675 // copyright notice, this list of conditions and the following disclaimer
22676 // in the documentation and/or other materials provided with the
22677 // distribution.
22678 //    * Neither the name of Google Inc. nor the name Chromium Embedded
22679 // Framework nor the names of its contributors may be used to endorse
22680 // or promote products derived from this software without specific prior
22681 // written permission.
22682 //
22683 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22684 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22685 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22686 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22687 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22688 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22689 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22690 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22691 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22692 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22693 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22694 //
22695 // ---------------------------------------------------------------------------
22696 //
22697 // This file was generated by the CEF translator tool and should not edited
22698 // by hand. See the translator.README.txt file in the tools directory for
22699 // more information.
22700 //
22701 // $hash=53c197aa80f55c9a1c9496de4a4d3598a9d7c735$
22702 //
22703 
22704 extern (C):
22705 
22706 ///
22707 /// Structure that supports the reading of XML data via the libxml streaming
22708 /// API. The functions of this structure should only be called on the thread
22709 /// that creates the object.
22710 ///
22711 struct cef_xml_reader_t
22712 {
22713     ///
22714     /// Base structure.
22715     ///
22716 
22717     ///
22718     /// Moves the cursor to the next node in the document. This function must be
22719     /// called at least once to set the current cursor position. Returns true (1)
22720     /// if the cursor position was set successfully.
22721     ///
22722 
22723     ///
22724     /// Close the document. This should be called directly to ensure that cleanup
22725     /// occurs on the correct thread.
22726     ///
22727 
22728     ///
22729     /// Returns true (1) if an error has been reported by the XML parser.
22730     ///
22731 
22732     cef_base_ref_counted_t base;
22733     extern(System) int function (cef_xml_reader_t* self) nothrow move_to_next_node;
22734     extern(System) int function (cef_xml_reader_t* self) nothrow close;
22735     extern(System) int function (cef_xml_reader_t* self) nothrow has_error;
22736 
22737     ///
22738     /// Returns the error string.
22739     ///
22740     // The resulting string must be freed by calling cef_string_userfree_free().
22741     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_error;
22742 
22743     ///
22744     /// Returns the node type.
22745     ///
22746     extern(System) cef_xml_node_type_t function (cef_xml_reader_t* self) nothrow get_type;
22747 
22748     ///
22749     /// Returns the node depth. Depth starts at 0 for the root node.
22750     ///
22751     extern(System) int function (cef_xml_reader_t* self) nothrow get_depth;
22752 
22753     ///
22754     /// Returns the local name. See http://www.w3.org/TR/REC-xml-names/#NT-
22755     /// LocalPart for additional details.
22756     ///
22757     // The resulting string must be freed by calling cef_string_userfree_free().
22758     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_local_name;
22759 
22760     ///
22761     /// Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for
22762     /// additional details.
22763     ///
22764     // The resulting string must be freed by calling cef_string_userfree_free().
22765     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_prefix;
22766 
22767     ///
22768     /// Returns the qualified name, equal to (Prefix:)LocalName. See
22769     /// http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details.
22770     ///
22771     // The resulting string must be freed by calling cef_string_userfree_free().
22772     extern(System) cef_string_userfree_t function (
22773         cef_xml_reader_t* self) nothrow get_qualified_name;
22774 
22775     ///
22776     /// Returns the URI defining the namespace associated with the node. See
22777     /// http://www.w3.org/TR/REC-xml-names/ for additional details.
22778     ///
22779     // The resulting string must be freed by calling cef_string_userfree_free().
22780     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_namespace_uri;
22781 
22782     ///
22783     /// Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for
22784     /// additional details.
22785     ///
22786     // The resulting string must be freed by calling cef_string_userfree_free().
22787     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_base_uri;
22788 
22789     ///
22790     /// Returns the xml:lang scope within which the node resides. See
22791     /// http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details.
22792     ///
22793     // The resulting string must be freed by calling cef_string_userfree_free().
22794     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_xml_lang;
22795 
22796     ///
22797     /// Returns true (1) if the node represents an NULL element. "<a/>" is
22798     /// considered NULL but "<a></a>" is not.
22799     ///
22800     extern(System) int function (cef_xml_reader_t* self) nothrow is_empty_element;
22801 
22802     ///
22803     /// Returns true (1) if the node has a text value.
22804     ///
22805     extern(System) int function (cef_xml_reader_t* self) nothrow has_value;
22806 
22807     ///
22808     /// Returns the text value.
22809     ///
22810     // The resulting string must be freed by calling cef_string_userfree_free().
22811     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_value;
22812 
22813     ///
22814     /// Returns true (1) if the node has attributes.
22815     ///
22816     extern(System) int function (cef_xml_reader_t* self) nothrow has_attributes;
22817 
22818     ///
22819     /// Returns the number of attributes.
22820     ///
22821     extern(System) size_t function (cef_xml_reader_t* self) nothrow get_attribute_count;
22822 
22823     ///
22824     /// Returns the value of the attribute at the specified 0-based index.
22825     ///
22826     // The resulting string must be freed by calling cef_string_userfree_free().
22827     extern(System) cef_string_userfree_t function (
22828         cef_xml_reader_t* self,
22829         int index) nothrow get_attribute_byindex;
22830 
22831     ///
22832     /// Returns the value of the attribute with the specified qualified name.
22833     ///
22834     // The resulting string must be freed by calling cef_string_userfree_free().
22835     extern(System) cef_string_userfree_t function (
22836         cef_xml_reader_t* self,
22837         const(cef_string_t)* qualifiedName) nothrow get_attribute_byqname;
22838 
22839     ///
22840     /// Returns the value of the attribute with the specified local name and
22841     /// namespace URI.
22842     ///
22843     // The resulting string must be freed by calling cef_string_userfree_free().
22844     extern(System) cef_string_userfree_t function (
22845         cef_xml_reader_t* self,
22846         const(cef_string_t)* localName,
22847         const(cef_string_t)* namespaceURI) nothrow get_attribute_bylname;
22848 
22849     ///
22850     /// Returns an XML representation of the current node's children.
22851     ///
22852     // The resulting string must be freed by calling cef_string_userfree_free().
22853     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_inner_xml;
22854 
22855     ///
22856     /// Returns an XML representation of the current node including its children.
22857     ///
22858     // The resulting string must be freed by calling cef_string_userfree_free().
22859     extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_outer_xml;
22860 
22861     ///
22862     /// Returns the line number for the current node.
22863     ///
22864     extern(System) int function (cef_xml_reader_t* self) nothrow get_line_number;
22865 
22866     ///
22867     /// Moves the cursor to the attribute at the specified 0-based index. Returns
22868     /// true (1) if the cursor position was set successfully.
22869     ///
22870     extern(System) int function (
22871         cef_xml_reader_t* self,
22872         int index) nothrow move_to_attribute_byindex;
22873 
22874     ///
22875     /// Moves the cursor to the attribute with the specified qualified name.
22876     /// Returns true (1) if the cursor position was set successfully.
22877     ///
22878     extern(System) int function (
22879         cef_xml_reader_t* self,
22880         const(cef_string_t)* qualifiedName) nothrow move_to_attribute_byqname;
22881 
22882     ///
22883     /// Moves the cursor to the attribute with the specified local name and
22884     /// namespace URI. Returns true (1) if the cursor position was set
22885     /// successfully.
22886     ///
22887     extern(System) int function (
22888         cef_xml_reader_t* self,
22889         const(cef_string_t)* localName,
22890         const(cef_string_t)* namespaceURI) nothrow move_to_attribute_bylname;
22891 
22892     ///
22893     /// Moves the cursor to the first attribute in the current element. Returns
22894     /// true (1) if the cursor position was set successfully.
22895     ///
22896     extern(System) int function (cef_xml_reader_t* self) nothrow move_to_first_attribute;
22897 
22898     ///
22899     /// Moves the cursor to the next attribute in the current element. Returns
22900     /// true (1) if the cursor position was set successfully.
22901     ///
22902     extern(System) int function (cef_xml_reader_t* self) nothrow move_to_next_attribute;
22903 
22904     ///
22905     /// Moves the cursor back to the carrying element. Returns true (1) if the
22906     /// cursor position was set successfully.
22907     ///
22908     extern(System) int function (cef_xml_reader_t* self) nothrow move_to_carrying_element;
22909 }
22910 
22911 
22912 
22913 ///
22914 /// Create a new cef_xml_reader_t object. The returned object's functions can
22915 /// only be called from the thread that created the object.
22916 ///
22917 cef_xml_reader_t* cef_xml_reader_create (
22918     cef_stream_reader_t* stream,
22919     cef_xml_encoding_type_t encodingType,
22920     const(cef_string_t)* URI);
22921 
22922 // CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_
22923 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved.
22924 //
22925 // Redistribution and use in source and binary forms, with or without
22926 // modification, are permitted provided that the following conditions are
22927 // met:
22928 //
22929 //    * Redistributions of source code must retain the above copyright
22930 // notice, this list of conditions and the following disclaimer.
22931 //    * Redistributions in binary form must reproduce the above
22932 // copyright notice, this list of conditions and the following disclaimer
22933 // in the documentation and/or other materials provided with the
22934 // distribution.
22935 //    * Neither the name of Google Inc. nor the name Chromium Embedded
22936 // Framework nor the names of its contributors may be used to endorse
22937 // or promote products derived from this software without specific prior
22938 // written permission.
22939 //
22940 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22941 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22942 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22943 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22944 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22945 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22946 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22947 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22948 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22949 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22950 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22951 //
22952 // ---------------------------------------------------------------------------
22953 //
22954 // This file was generated by the CEF translator tool and should not edited
22955 // by hand. See the translator.README.txt file in the tools directory for
22956 // more information.
22957 //
22958 // $hash=134a172de5a6674836b723af06baf792553bf9be$
22959 //
22960 
22961 extern (C):
22962 
22963 ///
22964 /// Structure that supports the reading of zip archives via the zlib unzip API.
22965 /// The functions of this structure should only be called on the thread that
22966 /// creates the object.
22967 ///
22968 struct cef_zip_reader_t
22969 {
22970     ///
22971     /// Base structure.
22972     ///
22973 
22974     ///
22975     /// Moves the cursor to the first file in the archive. Returns true (1) if the
22976     /// cursor position was set successfully.
22977     ///
22978 
22979     ///
22980     /// Moves the cursor to the next file in the archive. Returns true (1) if the
22981     /// cursor position was set successfully.
22982     ///
22983 
22984     ///
22985     /// Moves the cursor to the specified file in the archive. If |caseSensitive|
22986     /// is true (1) then the search will be case sensitive. Returns true (1) if
22987 
22988     cef_base_ref_counted_t base;
22989     extern(System) int function (cef_zip_reader_t* self) nothrow move_to_first_file;
22990     extern(System) int function (cef_zip_reader_t* self) nothrow move_to_next_file;
22991     /// the cursor position was set successfully.
22992     ///
22993     extern(System) int function (
22994         cef_zip_reader_t* self,
22995         const(cef_string_t)* fileName,
22996         int caseSensitive) nothrow move_to_file;
22997 
22998     ///
22999     /// Closes the archive. This should be called directly to ensure that cleanup
23000     /// occurs on the correct thread.
23001     ///
23002     extern(System) int function (cef_zip_reader_t* self) nothrow close;
23003 
23004     ///
23005     /// Returns the name of the file.
23006     ///
23007     // The resulting string must be freed by calling cef_string_userfree_free().
23008     extern(System) cef_string_userfree_t function (cef_zip_reader_t* self) nothrow get_file_name;
23009 
23010     ///
23011     /// Returns the uncompressed size of the file.
23012     ///
23013     extern(System) long function (cef_zip_reader_t* self) nothrow get_file_size;
23014 
23015     ///
23016     /// Returns the last modified timestamp for the file.
23017     ///
23018     extern(System) cef_basetime_t function (cef_zip_reader_t* self) nothrow get_file_last_modified;
23019 
23020     ///
23021     /// Opens the file for reading of uncompressed data. A read password may
23022     /// optionally be specified.
23023     ///
23024     extern(System) int function (
23025         cef_zip_reader_t* self,
23026         const(cef_string_t)* password) nothrow open_file;
23027 
23028     ///
23029     /// Closes the file.
23030     ///
23031     extern(System) int function (cef_zip_reader_t* self) nothrow close_file;
23032 
23033     ///
23034     /// Read uncompressed file contents into the specified buffer. Returns < 0 if
23035     /// an error occurred, 0 if at the end of file, or the number of bytes read.
23036     ///
23037     extern(System) int function (
23038         cef_zip_reader_t* self,
23039         void* buffer,
23040         size_t bufferSize) nothrow read_file;
23041 
23042     ///
23043     /// Returns the current offset in the uncompressed file contents.
23044     ///
23045     extern(System) long function (cef_zip_reader_t* self) nothrow tell;
23046 
23047     ///
23048     /// Returns true (1) if at end of the file contents.
23049     ///
23050     extern(System) int function (cef_zip_reader_t* self) nothrow eof;
23051 }
23052 
23053 
23054 
23055 ///
23056 /// Create a new cef_zip_reader_t object. The returned object's functions can
23057 /// only be called from the thread that created the object.
23058 ///
23059 cef_zip_reader_t* cef_zip_reader_create (cef_stream_reader_t* stream);
23060 
23061 // CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_
23062 }
23063 
23064 }
23065 
23066 
23067 version(Windows) {
23068 
23069 /+
23070 	***** Webview2 Bindings *****
23071 
23072 	TO UPDATE THIS:
23073 
23074 	Get the new package from https://www.nuget.org/packages/Microsoft.Web.WebView2
23075 	Note that is a .zip file so you can extract the WebView2.idl file by just treating it as such
23076 
23077 	Use my idl2d fork (from ~/program/idl2d or dub) on it `./idl2d WebView2.idl` to make webview2.d.
23078 
23079 	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).
23080 
23081 	And paste it in the version(inline_webview2_bindings) block.
23082 +/
23083 
23084 alias EventRegistrationToken = long;
23085 version=inline_webview2_bindings;
23086 
23087 version(inline_webview2_bindings) {
23088 public import core.sys.windows.windows;
23089 public import core.sys.windows.unknwn;
23090 public import core.sys.windows.oaidl;
23091 public import core.sys.windows.objidl;
23092 
23093 
23094 // Copyright (C) Microsoft Corporation. All rights reserved.
23095 // Use of this source code is governed by a BSD-style license that can be
23096 // found in the LICENSE file.
23097 
23098 @("uuid(26d34152-879f-4065-bea2-3daa2cfadfb8), version(1.0)")
23099 enum LibraryInfo;
23100 version(all)
23101 { /+ library WebView2 +/
23102 
23103 // Interface forward declarations
23104 
23105 /+ interface ICoreWebView2AcceleratorKeyPressedEventArgs; +/
23106 /+ interface ICoreWebView2AcceleratorKeyPressedEventArgs2; +/
23107 /+ interface ICoreWebView2AcceleratorKeyPressedEventHandler; +/
23108 /+ interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler; +/
23109 /+ interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler; +/
23110 /+ interface ICoreWebView2CapturePreviewCompletedHandler; +/
23111 /+ interface ICoreWebView2; +/
23112 /+ interface ICoreWebView2_2; +/
23113 /+ interface ICoreWebView2_3; +/
23114 /+ interface ICoreWebView2_4; +/
23115 /+ interface ICoreWebView2_5; +/
23116 /+ interface ICoreWebView2_6; +/
23117 /+ interface ICoreWebView2_7; +/
23118 /+ interface ICoreWebView2_8; +/
23119 /+ interface ICoreWebView2_9; +/
23120 /+ interface ICoreWebView2_10; +/
23121 /+ interface ICoreWebView2_11; +/
23122 /+ interface ICoreWebView2_12; +/
23123 /+ interface ICoreWebView2_13; +/
23124 /+ interface ICoreWebView2_14; +/
23125 /+ interface ICoreWebView2_15; +/
23126 /+ interface ICoreWebView2_16; +/
23127 /+ interface ICoreWebView2_17; +/
23128 /+ interface ICoreWebView2_18; +/
23129 /+ interface ICoreWebView2_19; +/
23130 /+ interface ICoreWebView2_20; +/
23131 /+ interface ICoreWebView2BasicAuthenticationRequestedEventArgs; +/
23132 /+ interface ICoreWebView2BasicAuthenticationRequestedEventHandler; +/
23133 /+ interface ICoreWebView2BasicAuthenticationResponse; +/
23134 /+ interface ICoreWebView2BrowserProcessExitedEventArgs; +/
23135 /+ interface ICoreWebView2BrowserProcessExitedEventHandler; +/
23136 /+ interface ICoreWebView2BytesReceivedChangedEventHandler; +/
23137 /+ interface ICoreWebView2CompositionController; +/
23138 /+ interface ICoreWebView2CompositionController2; +/
23139 /+ interface ICoreWebView2CompositionController3; +/
23140 /+ interface ICoreWebView2Controller; +/
23141 /+ interface ICoreWebView2Controller2; +/
23142 /+ interface ICoreWebView2Controller3; +/
23143 /+ interface ICoreWebView2Controller4; +/
23144 /+ interface ICoreWebView2ControllerOptions; +/
23145 /+ interface ICoreWebView2ControllerOptions2; +/
23146 /+ interface ICoreWebView2ContentLoadingEventArgs; +/
23147 /+ interface ICoreWebView2ContentLoadingEventHandler; +/
23148 /+ interface ICoreWebView2ContextMenuRequestedEventArgs; +/
23149 /+ interface ICoreWebView2ContextMenuRequestedEventHandler; +/
23150 /+ interface ICoreWebView2Cookie; +/
23151 /+ interface ICoreWebView2CookieList; +/
23152 /+ interface ICoreWebView2CookieManager; +/
23153 /+ interface ICoreWebView2Certificate; +/
23154 /+ interface ICoreWebView2ClientCertificate; +/
23155 /+ interface ICoreWebView2StringCollection; +/
23156 /+ interface ICoreWebView2ClearBrowsingDataCompletedHandler; +/
23157 /+ interface ICoreWebView2ClientCertificateCollection; +/
23158 /+ interface ICoreWebView2ClientCertificateRequestedEventArgs; +/
23159 /+ interface ICoreWebView2ClientCertificateRequestedEventHandler; +/
23160 /+ interface ICoreWebView2ContextMenuItem; +/
23161 /+ interface ICoreWebView2ContextMenuItemCollection; +/
23162 /+ interface ICoreWebView2ContextMenuRequestedEventArgs; +/
23163 /+ interface ICoreWebView2ContextMenuRequestedEventHandler; +/
23164 /+ interface ICoreWebView2ContextMenuTarget; +/
23165 /+ interface ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler; +/
23166 /+ interface ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler; +/
23167 /+ interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler; +/
23168 /+ interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler; +/
23169 /+ interface ICoreWebView2ContainsFullScreenElementChangedEventHandler; +/
23170 /+ interface ICoreWebView2CursorChangedEventHandler; +/
23171 /+ interface ICoreWebView2CustomItemSelectedEventHandler; +/
23172 /+ interface ICoreWebView2CustomSchemeRegistration; +/
23173 /+ interface ICoreWebView2DocumentTitleChangedEventHandler; +/
23174 /+ interface ICoreWebView2DOMContentLoadedEventArgs; +/
23175 /+ interface ICoreWebView2DOMContentLoadedEventHandler; +/
23176 /+ interface ICoreWebView2Deferral; +/
23177 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs; +/
23178 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs2; +/
23179 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler; +/
23180 /+ interface ICoreWebView2DevToolsProtocolEventReceiver; +/
23181 /+ interface ICoreWebView2DownloadOperation; +/
23182 /+ interface ICoreWebView2DownloadStartingEventArgs; +/
23183 /+ interface ICoreWebView2DownloadStartingEventHandler; +/
23184 /+ interface ICoreWebView2Environment; +/
23185 /+ interface ICoreWebView2Environment2; +/
23186 /+ interface ICoreWebView2Environment3; +/
23187 /+ interface ICoreWebView2Environment4; +/
23188 /+ interface ICoreWebView2Environment5; +/
23189 /+ interface ICoreWebView2Environment6; +/
23190 /+ interface ICoreWebView2Environment7; +/
23191 /+ interface ICoreWebView2Environment8; +/
23192 /+ interface ICoreWebView2Environment9; +/
23193 /+ interface ICoreWebView2Environment10; +/
23194 /+ interface ICoreWebView2Environment11; +/
23195 /+ interface ICoreWebView2Environment12; +/
23196 /+ interface ICoreWebView2Environment13; +/
23197 /+ interface ICoreWebView2EnvironmentOptions; +/
23198 /+ interface ICoreWebView2EnvironmentOptions2; +/
23199 /+ interface ICoreWebView2EnvironmentOptions3; +/
23200 /+ interface ICoreWebView2EnvironmentOptions4; +/
23201 /+ interface ICoreWebView2EnvironmentOptions5; +/
23202 /+ interface ICoreWebView2EnvironmentOptions6; +/
23203 /+ interface ICoreWebView2EstimatedEndTimeChangedEventHandler; +/
23204 /+ interface ICoreWebView2ExecuteScriptCompletedHandler; +/
23205 /+ interface ICoreWebView2GetProcessExtendedInfosCompletedHandler; +/
23206 /+ interface ICoreWebView2ProcessExtendedInfo; +/
23207 /+ interface ICoreWebView2ProcessExtendedInfoCollection; +/
23208 /+ interface ICoreWebView2Frame; +/
23209 /+ interface ICoreWebView2Frame2; +/
23210 /+ interface ICoreWebView2Frame3; +/
23211 /+ interface ICoreWebView2Frame4; +/
23212 /+ interface ICoreWebView2Frame5; +/
23213 /+ interface ICoreWebView2FrameContentLoadingEventHandler; +/
23214 /+ interface ICoreWebView2FrameCreatedEventArgs; +/
23215 /+ interface ICoreWebView2FrameCreatedEventHandler; +/
23216 /+ interface ICoreWebView2FrameDestroyedEventHandler; +/
23217 /+ interface ICoreWebView2FrameDOMContentLoadedEventHandler; +/
23218 /+ interface ICoreWebView2FrameNameChangedEventHandler; +/
23219 /+ interface ICoreWebView2FrameNavigationCompletedEventHandler; +/
23220 /+ interface ICoreWebView2FrameNavigationStartingEventHandler; +/
23221 /+ interface ICoreWebView2FramePermissionRequestedEventHandler; +/
23222 /+ interface ICoreWebView2FrameWebMessageReceivedEventHandler; +/
23223 /+ interface ICoreWebView2FrameInfo; +/
23224 /+ interface ICoreWebView2FrameInfo2; +/
23225 /+ interface ICoreWebView2FrameInfoCollection; +/
23226 /+ interface ICoreWebView2FrameInfoCollectionIterator; +/
23227 /+ interface ICoreWebView2FocusChangedEventHandler; +/
23228 /+ interface ICoreWebView2GetCookiesCompletedHandler; +/
23229 /+ interface ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler; +/
23230 /+ interface ICoreWebView2HistoryChangedEventHandler; +/
23231 /+ interface ICoreWebView2HttpHeadersCollectionIterator; +/
23232 /+ interface ICoreWebView2HttpRequestHeaders; +/
23233 /+ interface ICoreWebView2HttpResponseHeaders; +/
23234 /+ interface ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler; +/
23235 /+ interface ICoreWebView2LaunchingExternalUriSchemeEventArgs; +/
23236 /+ interface ICoreWebView2LaunchingExternalUriSchemeEventHandler; +/
23237 /+ interface ICoreWebView2MoveFocusRequestedEventArgs; +/
23238 /+ interface ICoreWebView2MoveFocusRequestedEventHandler; +/
23239 /+ interface ICoreWebView2NavigationCompletedEventArgs; +/
23240 /+ interface ICoreWebView2NavigationCompletedEventArgs2; +/
23241 /+ interface ICoreWebView2NavigationCompletedEventHandler; +/
23242 /+ interface ICoreWebView2NavigationStartingEventArgs; +/
23243 /+ interface ICoreWebView2NavigationStartingEventArgs2; +/
23244 /+ interface ICoreWebView2NavigationStartingEventArgs3; +/
23245 /+ interface ICoreWebView2NavigationStartingEventHandler; +/
23246 /+ interface ICoreWebView2NewBrowserVersionAvailableEventHandler; +/
23247 /+ interface ICoreWebView2NewWindowRequestedEventArgs; +/
23248 /+ interface ICoreWebView2NewWindowRequestedEventArgs2; +/
23249 /+ interface ICoreWebView2NewWindowRequestedEventArgs3; +/
23250 /+ interface ICoreWebView2NewWindowRequestedEventHandler; +/
23251 /+ interface ICoreWebView2PermissionRequestedEventArgs; +/
23252 /+ interface ICoreWebView2PermissionRequestedEventArgs2; +/
23253 /+ interface ICoreWebView2PermissionRequestedEventArgs3; +/
23254 /+ interface ICoreWebView2PermissionRequestedEventHandler; +/
23255 /+ interface ICoreWebView2PermissionSettingCollectionView; +/
23256 /+ interface ICoreWebView2PermissionSetting; +/
23257 /+ interface ICoreWebView2PointerInfo; +/
23258 /+ interface ICoreWebView2PrintSettings; +/
23259 /+ interface ICoreWebView2PrintSettings2; +/
23260 /+ interface ICoreWebView2PrintToPdfCompletedHandler; +/
23261 /+ interface ICoreWebView2PrintCompletedHandler; +/
23262 /+ interface ICoreWebView2PrintToPdfStreamCompletedHandler; +/
23263 /+ interface ICoreWebView2ProcessFailedEventArgs; +/
23264 /+ interface ICoreWebView2ProcessFailedEventArgs2; +/
23265 /+ interface ICoreWebView2ProcessFailedEventHandler; +/
23266 /+ interface ICoreWebView2Profile; +/
23267 /+ interface ICoreWebView2Profile2; +/
23268 /+ interface ICoreWebView2Profile3; +/
23269 /+ interface ICoreWebView2Profile4; +/
23270 /+ interface ICoreWebView2Profile5; +/
23271 /+ interface ICoreWebView2Profile6; +/
23272 /+ interface ICoreWebView2Profile7; +/
23273 /+ interface ICoreWebView2Profile8; +/
23274 /+ interface ICoreWebView2ProfileDeletedEventHandler; +/
23275 /+ interface ICoreWebView2RasterizationScaleChangedEventHandler; +/
23276 /+ interface ICoreWebView2ServerCertificateErrorDetectedEventArgs; +/
23277 /+ interface ICoreWebView2ServerCertificateErrorDetectedEventHandler; +/
23278 /+ interface ICoreWebView2SetPermissionStateCompletedHandler; +/
23279 /+ interface ICoreWebView2ScriptDialogOpeningEventArgs; +/
23280 /+ interface ICoreWebView2ScriptDialogOpeningEventHandler; +/
23281 /+ interface ICoreWebView2Settings; +/
23282 /+ interface ICoreWebView2Settings2; +/
23283 /+ interface ICoreWebView2Settings3; +/
23284 /+ interface ICoreWebView2Settings4; +/
23285 /+ interface ICoreWebView2Settings5; +/
23286 /+ interface ICoreWebView2Settings6; +/
23287 /+ interface ICoreWebView2Settings7; +/
23288 /+ interface ICoreWebView2Settings8; +/
23289 /+ interface ICoreWebView2SharedBuffer; +/
23290 /+ interface ICoreWebView2SourceChangedEventArgs; +/
23291 /+ interface ICoreWebView2SourceChangedEventHandler; +/
23292 /+ interface ICoreWebView2StateChangedEventHandler; +/
23293 /+ interface ICoreWebView2StatusBarTextChangedEventHandler; +/
23294 /+ interface ICoreWebView2TrySuspendCompletedHandler; +/
23295 /+ interface ICoreWebView2WebMessageReceivedEventArgs; +/
23296 /+ interface ICoreWebView2WebMessageReceivedEventHandler; +/
23297 /+ interface ICoreWebView2WebResourceRequest; +/
23298 /+ interface ICoreWebView2WebResourceRequestedEventArgs; +/
23299 /+ interface ICoreWebView2WebResourceRequestedEventHandler; +/
23300 /+ interface ICoreWebView2WebResourceResponse; +/
23301 /+ interface ICoreWebView2WebResourceResponseReceivedEventHandler; +/
23302 /+ interface ICoreWebView2WebResourceResponseReceivedEventArgs; +/
23303 /+ interface ICoreWebView2WebResourceResponseView; +/
23304 /+ interface ICoreWebView2WebResourceResponseViewGetContentCompletedHandler; +/
23305 /+ interface ICoreWebView2WindowCloseRequestedEventHandler; +/
23306 /+ interface ICoreWebView2WindowFeatures; +/
23307 /+ interface ICoreWebView2ZoomFactorChangedEventHandler; +/
23308 /+ interface ICoreWebView2IsMutedChangedEventHandler; +/
23309 /+ interface ICoreWebView2IsDocumentPlayingAudioChangedEventHandler; +/
23310 /+ interface ICoreWebView2ProcessInfo; +/
23311 /+ interface ICoreWebView2ProcessInfoCollection; +/
23312 /+ interface ICoreWebView2ProcessInfosChangedEventHandler; +/
23313 /+ interface ICoreWebView2FaviconChangedEventHandler; +/
23314 /+ interface ICoreWebView2GetFaviconCompletedHandler; +/
23315 /+ interface ICoreWebView2ProfileAddBrowserExtensionCompletedHandler; +/
23316 /+ interface ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler; +/
23317 /+ interface ICoreWebView2BrowserExtensionList; +/
23318 /+ interface ICoreWebView2BrowserExtension; +/
23319 /+ interface ICoreWebView2BrowserExtensionEnableCompletedHandler; +/
23320 /+ interface ICoreWebView2BrowserExtensionRemoveCompletedHandler; +/
23321 
23322 // Enums and structs
23323 
23324 /// Specifies the image format for the `ICoreWebView2::CapturePreview` method.
23325 
23326 @("v1_enum")
23327 enum /+ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT+/
23328 {
23329 
23330   /// Indicates that the PNG image format is used.
23331 
23332   COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG,
23333 
23334   /// Indicates the JPEG image format is used.
23335 
23336   COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_JPEG,
23337 }
23338 alias int COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT;
23339 
23340 /// Kind of cookie SameSite status used in the ICoreWebView2Cookie interface.
23341 /// These fields match those as specified in https://developer.mozilla.org/docs/Web/HTTP/Cookies#.
23342 /// Learn more about SameSite cookies here: https://tools.ietf.org/html/draft-west-first-party-cookies-07
23343 @("v1_enum")
23344 enum /+ COREWEBVIEW2_COOKIE_SAME_SITE_KIND+/
23345 {
23346   /// None SameSite type. No restrictions on cross-site requests.
23347   COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE,
23348   /// Lax SameSite type. The cookie will be sent with "same-site" requests, and with "cross-site" top level navigation.
23349   COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX,
23350   /// Strict SameSite type. The cookie will only be sent along with "same-site" requests.
23351   COREWEBVIEW2_COOKIE_SAME_SITE_KIND_STRICT,
23352 }
23353 alias int COREWEBVIEW2_COOKIE_SAME_SITE_KIND;
23354 
23355 /// Kind of cross origin resource access allowed for host resources during download.
23356 /// Note that other normal access checks like same origin DOM access check and [Content
23357 /// Security Policy](https://developer.mozilla.org/docs/Web/HTTP/CSP) still apply.
23358 /// The following table illustrates the host resource cross origin access according to
23359 /// access context and `COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND`.
23360 ///
23361 /// Cross Origin Access Context | DENY | ALLOW | DENY_CORS
23362 /// --- | --- | --- | ---
23363 /// From DOM like src of img, script or iframe element| Deny | Allow | Allow
23364 /// From Script like Fetch or XMLHttpRequest| Deny | Allow | Deny
23365 @("v1_enum")
23366 enum /+ COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND+/
23367 {
23368   /// All cross origin resource access is denied, including normal sub resource access
23369   /// as src of a script or image element.
23370   COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY,
23371 
23372   /// All cross origin resource access is allowed, including accesses that are
23373   /// subject to Cross-Origin Resource Sharing(CORS) check. The behavior is similar to
23374   /// a web site sends back http header Access-Control-Allow-Origin: *.
23375   COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_ALLOW,
23376 
23377   /// Cross origin resource access is allowed for normal sub resource access like
23378   /// as src of a script or image element, while any access that subjects to CORS check
23379   /// will be denied.
23380   /// See [Cross-Origin Resource Sharing](https://developer.mozilla.org/docs/Web/HTTP/CORS)
23381   /// for more information.
23382   COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY_CORS,
23383 }
23384 alias int COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND;
23385 
23386 /// Specifies the JavaScript dialog type used in the
23387 /// `ICoreWebView2ScriptDialogOpeningEventHandler` interface.
23388 
23389 @("v1_enum")
23390 enum /+ COREWEBVIEW2_SCRIPT_DIALOG_KIND+/
23391 {
23392 
23393   /// Indicates that the dialog uses the `window.alert` JavaScript function.
23394 
23395   COREWEBVIEW2_SCRIPT_DIALOG_KIND_ALERT,
23396 
23397   /// Indicates that the dialog uses the `window.confirm` JavaScript function.
23398 
23399   COREWEBVIEW2_SCRIPT_DIALOG_KIND_CONFIRM,
23400 
23401   /// Indicates that the dialog uses the `window.prompt` JavaScript function.
23402 
23403   COREWEBVIEW2_SCRIPT_DIALOG_KIND_PROMPT,
23404 
23405   /// Indicates that the dialog uses the `beforeunload` JavaScript event.
23406 
23407   COREWEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD,
23408 }
23409 alias int COREWEBVIEW2_SCRIPT_DIALOG_KIND;
23410 
23411 /// Specifies the process failure type used in the
23412 /// `ICoreWebView2ProcessFailedEventArgs` interface. The values in this enum
23413 /// make reference to the process kinds in the Chromium architecture. For more
23414 /// information about what these processes are and what they do, see
23415 /// [Browser Architecture - Inside look at modern web browser](https://developers.google.com/web/updates/2018/09/inside-browser-part1).
23416 
23417 @("v1_enum")
23418 enum /+ COREWEBVIEW2_PROCESS_FAILED_KIND+/
23419 {
23420 
23421   /// Indicates that the browser process ended unexpectedly.  The WebView
23422   /// automatically moves to the Closed state.  The app has to recreate a new
23423   /// WebView to recover from this failure.
23424 
23425   COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED,
23426 
23427   /// Indicates that the main frame's render process ended unexpectedly. Any
23428   /// subframes in the WebView will be gone too.  A new render process is
23429   /// created automatically and navigated to an error page. You can use the
23430   /// `Reload` method to try to recover from this failure. Alternatively, you
23431   /// can `Close` and recreate the WebView.
23432 
23433   COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED,
23434 
23435   /// Indicates that the main frame's render process is unresponsive. Renderer
23436   /// process unresponsiveness can happen for the following reasons:
23437   ///
23438   /// *   There is a **long-running script** being executed. For example, the
23439   /// web content in your WebView might be performing a synchronous XHR, or have
23440   /// entered an infinite loop.
23441   /// *   The **system is busy**.
23442   ///
23443   /// The `ProcessFailed` event will continue to be raised every few seconds
23444   /// until the renderer process has become responsive again. The application
23445   /// can consider taking action if the event keeps being raised. For example,
23446   /// the application might show UI for the user to decide to keep waiting or
23447   /// reload the page, or navigate away.
23448 
23449   COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE,
23450 
23451   /// Indicates that a frame-only render process ended unexpectedly. The process
23452   /// exit does not affect the top-level document, only a subset of the
23453   /// subframes within it. The content in these frames is replaced with an error
23454   /// page in the frame. Your application can communicate with the main frame to
23455   /// recover content in the impacted frames, using
23456   /// `ICoreWebView2ProcessFailedEventArgs2::FrameInfosForFailedProcess` to get
23457   /// information about the impacted frames.
23458 
23459   COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED,
23460 
23461   /// Indicates that a utility process ended unexpectedly. The failed process
23462   /// is recreated automatically. Your application does **not** need to handle
23463   /// recovery for this event, but can use `ICoreWebView2ProcessFailedEventArgs`
23464   /// and `ICoreWebView2ProcessFailedEventArgs2` to collect information about
23465   /// the failure, including `ProcessDescription`.
23466 
23467   COREWEBVIEW2_PROCESS_FAILED_KIND_UTILITY_PROCESS_EXITED,
23468 
23469   /// Indicates that a sandbox helper process ended unexpectedly. This failure
23470   /// is not fatal. Your application does **not** need to handle recovery for
23471   /// this event, but can use `ICoreWebView2ProcessFailedEventArgs` and
23472   /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about
23473   /// the failure.
23474 
23475   COREWEBVIEW2_PROCESS_FAILED_KIND_SANDBOX_HELPER_PROCESS_EXITED,
23476 
23477   /// Indicates that the GPU process ended unexpectedly. The failed process
23478   /// is recreated automatically. Your application does **not** need to handle
23479   /// recovery for this event, but can use `ICoreWebView2ProcessFailedEventArgs`
23480   /// and `ICoreWebView2ProcessFailedEventArgs2` to collect information about
23481   /// the failure.
23482 
23483   COREWEBVIEW2_PROCESS_FAILED_KIND_GPU_PROCESS_EXITED,
23484 
23485   /// Indicates that a PPAPI plugin process ended unexpectedly. This failure
23486   /// is not fatal. Your application does **not** need to handle recovery for
23487   /// this event, but can use `ICoreWebView2ProcessFailedEventArgs` and
23488   /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about
23489   /// the failure, including `ProcessDescription`.
23490 
23491   COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_PLUGIN_PROCESS_EXITED,
23492 
23493   /// Indicates that a PPAPI plugin broker process ended unexpectedly. This failure
23494   /// is not fatal. Your application does **not** need to handle recovery for
23495   /// this event, but can use `ICoreWebView2ProcessFailedEventArgs` and
23496   /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about
23497   /// the failure.
23498 
23499   COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_BROKER_PROCESS_EXITED,
23500 
23501   /// Indicates that a process of unspecified kind ended unexpectedly. Your
23502   /// application can use `ICoreWebView2ProcessFailedEventArgs` and
23503   /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about
23504   /// the failure.
23505 
23506   COREWEBVIEW2_PROCESS_FAILED_KIND_UNKNOWN_PROCESS_EXITED,
23507 }
23508 alias int COREWEBVIEW2_PROCESS_FAILED_KIND;
23509 
23510 /// Specifies the process failure reason used in the
23511 /// `ICoreWebView2ProcessFailedEventArgs` interface. For process failures where
23512 /// a process has exited, it indicates the type of issue that produced the
23513 /// process exit.
23514 
23515 @("v1_enum")
23516 enum /+ COREWEBVIEW2_PROCESS_FAILED_REASON+/
23517 {
23518 
23519   /// An unexpected process failure occurred.
23520   COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED,
23521 
23522   /// The process became unresponsive.
23523   /// This only applies to the main frame's render process.
23524 
23525   COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE,
23526 
23527   /// The process was terminated. For example, from Task Manager.
23528 
23529   COREWEBVIEW2_PROCESS_FAILED_REASON_TERMINATED,
23530 
23531   /// The process crashed. Most crashes will generate dumps in the location
23532   /// indicated by `ICoreWebView2Environment11::get_FailureReportFolderPath`.
23533 
23534   COREWEBVIEW2_PROCESS_FAILED_REASON_CRASHED,
23535 
23536   /// The process failed to launch.
23537 
23538   COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED,
23539 
23540   /// The process terminated due to running out of memory.
23541 
23542   COREWEBVIEW2_PROCESS_FAILED_REASON_OUT_OF_MEMORY,
23543 
23544   /// The process exited because its corresponding profile was deleted.
23545   COREWEBVIEW2_PROCESS_FAILED_REASON_PROFILE_DELETED,
23546 }
23547 alias int COREWEBVIEW2_PROCESS_FAILED_REASON;
23548 
23549 /// Indicates the type of a permission request.
23550 
23551 @("v1_enum")
23552 enum /+ COREWEBVIEW2_PERMISSION_KIND+/
23553 {
23554 
23555   /// Indicates an unknown permission.
23556 
23557   COREWEBVIEW2_PERMISSION_KIND_UNKNOWN_PERMISSION,
23558 
23559   /// Indicates permission to capture audio.
23560 
23561   COREWEBVIEW2_PERMISSION_KIND_MICROPHONE,
23562 
23563   /// Indicates permission to capture video.
23564 
23565   COREWEBVIEW2_PERMISSION_KIND_CAMERA,
23566 
23567   /// Indicates permission to access geolocation.
23568 
23569   COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION,
23570 
23571   /// Indicates permission to send web notifications. Apps that would like to
23572   /// show notifications should handle `PermissionRequested` events
23573   /// and no browser permission prompt will be shown for notification requests.
23574   /// Note that push notifications are currently unavailable in WebView2.
23575 
23576   COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS,
23577 
23578   /// Indicates permission to access generic sensor.  Generic Sensor covering
23579   /// ambient-light-sensor, accelerometer, gyroscope, and magnetometer.
23580 
23581   COREWEBVIEW2_PERMISSION_KIND_OTHER_SENSORS,
23582 
23583   /// Indicates permission to read the system clipboard without a user gesture.
23584 
23585   COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ,
23586 
23587   /// Indicates permission to automatically download multiple files. Permission
23588   /// is requested when multiple downloads are triggered in quick succession.
23589 
23590   COREWEBVIEW2_PERMISSION_KIND_MULTIPLE_AUTOMATIC_DOWNLOADS,
23591 
23592   /// Indicates permission to read and write to files or folders on the device.
23593   /// Permission is requested when developers use the [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API)
23594   /// to show the file or folder picker to the end user, and then request
23595   /// "readwrite" permission for the user's selection.
23596 
23597   COREWEBVIEW2_PERMISSION_KIND_FILE_READ_WRITE,
23598 
23599   /// Indicates permission to play audio and video automatically on sites. This
23600   /// permission affects the autoplay attribute and play method of the audio and
23601   /// video HTML elements, and the start method of the Web Audio API. See the
23602   /// [Autoplay guide for media and Web Audio APIs](https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide) for details.
23603 
23604   COREWEBVIEW2_PERMISSION_KIND_AUTOPLAY,
23605 
23606   /// Indicates permission to use fonts on the device. Permission is requested
23607   /// when developers use the [Local Font Access API](https://wicg.github.io/local-font-access/)
23608   /// to query the system fonts available for styling web content.
23609 
23610   COREWEBVIEW2_PERMISSION_KIND_LOCAL_FONTS,
23611 
23612   /// Indicates permission to send and receive system exclusive messages to/from MIDI
23613   /// (Musical Instrument Digital Interface) devices. Permission is requested
23614   /// when developers use the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API)
23615   /// to request access to system exclusive MIDI messages.
23616   COREWEBVIEW2_PERMISSION_KIND_MIDI_SYSTEM_EXCLUSIVE_MESSAGES,
23617 
23618   /// Indicates permission to open and place windows on the screen. Permission is
23619   /// requested when developers use the [Multi-Screen Window Placement API](https://www.w3.org/TR/window-placement/)
23620   /// to get screen details.
23621   COREWEBVIEW2_PERMISSION_KIND_WINDOW_MANAGEMENT,
23622 }
23623 alias int COREWEBVIEW2_PERMISSION_KIND;
23624 
23625 /// Specifies the response to a permission request.
23626 
23627 @("v1_enum")
23628 enum /+ COREWEBVIEW2_PERMISSION_STATE+/
23629 {
23630 
23631   /// Specifies that the default browser behavior is used, which normally
23632   /// prompt users for decision.
23633 
23634   COREWEBVIEW2_PERMISSION_STATE_DEFAULT,
23635 
23636   /// Specifies that the permission request is granted.
23637 
23638   COREWEBVIEW2_PERMISSION_STATE_ALLOW,
23639 
23640   /// Specifies that the permission request is denied.
23641 
23642   COREWEBVIEW2_PERMISSION_STATE_DENY,
23643 }
23644 alias int COREWEBVIEW2_PERMISSION_STATE;
23645 
23646 /// Indicates the error status values for web navigations.
23647 
23648 @("v1_enum")
23649 enum /+ COREWEBVIEW2_WEB_ERROR_STATUS+/
23650 {
23651 
23652   /// Indicates that an unknown error occurred.
23653 
23654   COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN,
23655 
23656   /// Indicates that the SSL certificate common name does not match the web
23657   /// address.
23658 
23659   COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT,
23660 
23661   /// Indicates that the SSL certificate has expired.
23662 
23663   COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED,
23664 
23665   /// Indicates that the SSL client certificate contains errors.
23666 
23667   COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS,
23668 
23669   /// Indicates that the SSL certificate has been revoked.
23670 
23671   COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED,
23672 
23673   /// Indicates that the SSL certificate is not valid.  The certificate may not
23674   /// match the public key pins for the host name, the certificate is signed
23675   /// by an untrusted authority or using a weak sign algorithm, the certificate
23676   /// claimed DNS names violate name constraints, the certificate contains a
23677   /// weak key, the validity period of the certificate is too long, lack of
23678   /// revocation information or revocation mechanism, non-unique host name,
23679   /// lack of certificate transparency information, or the certificate is
23680   /// chained to a
23681   /// [legacy Symantec root](https://security.googleblog.com/2018/03/distrust-of-symantec-pki-immediate.html).
23682 
23683   COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID,
23684 
23685   /// Indicates that the host is unreachable.
23686 
23687   COREWEBVIEW2_WEB_ERROR_STATUS_SERVER_UNREACHABLE,
23688 
23689   /// Indicates that the connection has timed out.
23690 
23691   COREWEBVIEW2_WEB_ERROR_STATUS_TIMEOUT,
23692 
23693   /// Indicates that the server returned an invalid or unrecognized response.
23694 
23695   COREWEBVIEW2_WEB_ERROR_STATUS_ERROR_HTTP_INVALID_SERVER_RESPONSE,
23696 
23697   /// Indicates that the connection was stopped.
23698 
23699   COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED,
23700 
23701   /// Indicates that the connection was reset.
23702 
23703   COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_RESET,
23704 
23705   /// Indicates that the Internet connection has been lost.
23706 
23707   COREWEBVIEW2_WEB_ERROR_STATUS_DISCONNECTED,
23708 
23709   /// Indicates that a connection to the destination was not established.
23710 
23711   COREWEBVIEW2_WEB_ERROR_STATUS_CANNOT_CONNECT,
23712 
23713   /// Indicates that the provided host name was not able to be resolved.
23714 
23715   COREWEBVIEW2_WEB_ERROR_STATUS_HOST_NAME_NOT_RESOLVED,
23716 
23717   /// Indicates that the operation was canceled. This status code is also used
23718   /// in the following cases:
23719   /// - When the app cancels a navigation via NavigationStarting event.
23720   /// - For original navigation if the app navigates the WebView2 in a rapid succession
23721   /// away after the load for original navigation commenced, but before it completed.
23722 
23723   COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED,
23724 
23725   /// Indicates that the request redirect failed.
23726 
23727   COREWEBVIEW2_WEB_ERROR_STATUS_REDIRECT_FAILED,
23728 
23729   /// Indicates that an unexpected error occurred.
23730 
23731   COREWEBVIEW2_WEB_ERROR_STATUS_UNEXPECTED_ERROR,
23732 
23733   /// Indicates that user is prompted with a login, waiting on user action.
23734   /// Initial navigation to a login site will always return this even if app provides
23735   /// credential using BasicAuthenticationRequested.
23736   /// HTTP response status code in this case is 401.
23737   /// See status code reference here: https://developer.mozilla.org/docs/Web/HTTP/Status.
23738 
23739   COREWEBVIEW2_WEB_ERROR_STATUS_VALID_AUTHENTICATION_CREDENTIALS_REQUIRED,
23740 
23741   /// Indicates that user lacks proper authentication credentials for a proxy server.
23742   /// HTTP response status code in this case is 407.
23743   /// See status code reference here: https://developer.mozilla.org/docs/Web/HTTP/Status.
23744 
23745   COREWEBVIEW2_WEB_ERROR_STATUS_VALID_PROXY_AUTHENTICATION_REQUIRED,
23746 }
23747 alias int COREWEBVIEW2_WEB_ERROR_STATUS;
23748 
23749 /// Specifies the web resource request contexts.
23750 
23751 @("v1_enum")
23752 enum /+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT+/
23753 {
23754 
23755   /// Specifies all resources.
23756 
23757   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL,
23758 
23759   /// Specifies a document resource.
23760 
23761   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT,
23762 
23763   /// Specifies a CSS resource.
23764 
23765   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET,
23766 
23767   /// Specifies an image resource.
23768 
23769   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE,
23770 
23771   /// Specifies another media resource such as a video.
23772 
23773   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA,
23774 
23775   /// Specifies a font resource.
23776 
23777   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT,
23778 
23779   /// Specifies a script resource.
23780 
23781   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT,
23782 
23783   /// Specifies an XML HTTP request, Fetch and EventSource API communication.
23784 
23785   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST,
23786 
23787   /// Specifies a Fetch API communication.
23788 
23789   // Note that this isn't working. Fetch API requests are fired as a part
23790   // of COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST.
23791 
23792   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH,
23793 
23794   /// Specifies a TextTrack resource.
23795 
23796   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK,
23797 
23798   /// Specifies an EventSource API communication.
23799 
23800   // Note that this isn't working. EventSource API requests are fired as a part
23801   // of COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST.
23802 
23803   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE,
23804 
23805   /// Specifies a WebSocket API communication.
23806 
23807   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET,
23808 
23809   /// Specifies a Web App Manifest.
23810 
23811   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST,
23812 
23813   /// Specifies a Signed HTTP Exchange.
23814 
23815   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE,
23816 
23817   /// Specifies a Ping request.
23818 
23819   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING,
23820 
23821   /// Specifies a CSP Violation Report.
23822 
23823   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT,
23824 
23825   /// Specifies an other resource.
23826 
23827   COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER
23828 }
23829 alias int COREWEBVIEW2_WEB_RESOURCE_CONTEXT;
23830 
23831 /// Specifies the reason for moving focus.
23832 
23833 @("v1_enum")
23834 enum /+ COREWEBVIEW2_MOVE_FOCUS_REASON+/
23835 {
23836 
23837   /// Specifies that the code is setting focus into WebView.
23838 
23839   COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC,
23840 
23841   /// Specifies that the focus is moving due to Tab traversal forward.
23842 
23843   COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT,
23844 
23845   /// Specifies that the focus is moving due to Tab traversal backward.
23846 
23847   COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS,
23848 }
23849 alias int COREWEBVIEW2_MOVE_FOCUS_REASON;
23850 
23851 /// Specifies the key event type that triggered an `AcceleratorKeyPressed`
23852 /// event.
23853 
23854 @("v1_enum")
23855 enum /+ COREWEBVIEW2_KEY_EVENT_KIND+/
23856 {
23857 
23858   /// Specifies that the key event type corresponds to window message
23859   /// `WM_KEYDOWN`.
23860 
23861   COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN,
23862 
23863   /// Specifies that the key event type corresponds to window message
23864   /// `WM_KEYUP`.
23865 
23866   COREWEBVIEW2_KEY_EVENT_KIND_KEY_UP,
23867 
23868   /// Specifies that the key event type corresponds to window message
23869   /// `WM_SYSKEYDOWN`.
23870 
23871   COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN,
23872 
23873   /// Specifies that the key event type corresponds to window message
23874   /// `WM_SYSKEYUP`.
23875 
23876   COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_UP,
23877 }
23878 alias int COREWEBVIEW2_KEY_EVENT_KIND;
23879 
23880 /// Specifies the browser process exit type used in the
23881 /// `ICoreWebView2BrowserProcessExitedEventArgs` interface.
23882 
23883 @("v1_enum")
23884 enum /+ COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND+/
23885 {
23886 
23887   /// Indicates that the browser process ended normally.
23888 
23889   COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_NORMAL,
23890 
23891   /// Indicates that the browser process ended unexpectedly.
23892   /// A `ProcessFailed` event will also be sent to listening WebViews from the
23893   /// `ICoreWebView2Environment` associated to the failed process.
23894 
23895   COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_FAILED
23896 }
23897 alias int COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND;
23898 
23899 /// Contains the information packed into the `LPARAM` sent to a Win32 key
23900 /// event.  For more information about `WM_KEYDOWN`, navigate to
23901 /// [WM_KEYDOWN message](/windows/win32/inputdev/wm-keydown).
23902 
23903 struct COREWEBVIEW2_PHYSICAL_KEY_STATUS
23904 {
23905 
23906   /// Specifies the repeat count for the current message.
23907 
23908   UINT32 RepeatCount;
23909 
23910   /// Specifies the scan code.
23911 
23912   UINT32 ScanCode;
23913 
23914   /// Indicates that the key is an extended key.
23915 
23916   BOOL IsExtendedKey;
23917 
23918   /// Indicates that a menu key is held down (context code).
23919 
23920   BOOL IsMenuKeyDown;
23921 
23922   /// Indicates that the key was held down.
23923 
23924   BOOL WasKeyDown;
23925 
23926   /// Indicates that the key was released.
23927 
23928   BOOL IsKeyReleased;
23929 }
23930 
23931 /// A value representing RGBA color (Red, Green, Blue, Alpha) for WebView2.
23932 /// Each component takes a value from 0 to 255, with 0 being no intensity
23933 /// and 255 being the highest intensity.
23934 
23935 struct COREWEBVIEW2_COLOR
23936 {
23937 
23938   /// Specifies the intensity of the Alpha ie. opacity value. 0 is transparent,
23939   /// 255 is opaque.
23940 
23941   BYTE A;
23942 
23943   /// Specifies the intensity of the Red color.
23944 
23945   BYTE R;
23946 
23947   /// Specifies the intensity of the Green color.
23948 
23949   BYTE G;
23950 
23951   /// Specifies the intensity of the Blue color.
23952 
23953   BYTE B;
23954 }
23955 
23956 /// Mouse event type used by SendMouseInput to convey the type of mouse event
23957 /// being sent to WebView. The values of this enum align with the matching
23958 /// WM_* window messages.
23959 
23960 @("v1_enum")
23961 enum /+ COREWEBVIEW2_MOUSE_EVENT_KIND+/
23962 {
23963 
23964   /// Mouse horizontal wheel scroll event, WM_MOUSEHWHEEL.
23965 
23966   COREWEBVIEW2_MOUSE_EVENT_KIND_HORIZONTAL_WHEEL = 0x020E,
23967 
23968   /// Left button double click mouse event, WM_LBUTTONDBLCLK.
23969 
23970   COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOUBLE_CLICK = 0x0203,
23971 
23972   /// Left button down mouse event, WM_LBUTTONDOWN.
23973 
23974   COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOWN = 0x0201,
23975 
23976   /// Left button up mouse event, WM_LBUTTONUP.
23977 
23978   COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_UP = 0x0202,
23979 
23980   /// Mouse leave event, WM_MOUSELEAVE.
23981 
23982   COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE = 0x02A3,
23983 
23984   /// Middle button double click mouse event, WM_MBUTTONDBLCLK.
23985 
23986   COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOUBLE_CLICK = 0x0209,
23987 
23988   /// Middle button down mouse event, WM_MBUTTONDOWN.
23989 
23990   COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOWN = 0x0207,
23991 
23992   /// Middle button up mouse event, WM_MBUTTONUP.
23993 
23994   COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_UP = 0x0208,
23995 
23996   /// Mouse move event, WM_MOUSEMOVE.
23997 
23998   COREWEBVIEW2_MOUSE_EVENT_KIND_MOVE = 0x0200,
23999 
24000   /// Right button double click mouse event, WM_RBUTTONDBLCLK.
24001 
24002   COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOUBLE_CLICK = 0x0206,
24003 
24004   /// Right button down mouse event, WM_RBUTTONDOWN.
24005 
24006   COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOWN = 0x0204,
24007 
24008   /// Right button up mouse event, WM_RBUTTONUP.
24009 
24010   COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_UP = 0x0205,
24011 
24012   /// Mouse wheel scroll event, WM_MOUSEWHEEL.
24013 
24014   COREWEBVIEW2_MOUSE_EVENT_KIND_WHEEL = 0x020A,
24015 
24016   /// First or second X button double click mouse event, WM_XBUTTONDBLCLK.
24017 
24018   COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOUBLE_CLICK = 0x020D,
24019 
24020   /// First or second X button down mouse event, WM_XBUTTONDOWN.
24021 
24022   COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOWN = 0x020B,
24023 
24024   /// First or second X button up mouse event, WM_XBUTTONUP.
24025 
24026   COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_UP = 0x020C,
24027 
24028   /// Mouse Right Button Down event over a nonclient area, WM_NCRBUTTONDOWN.
24029 
24030   COREWEBVIEW2_MOUSE_EVENT_KIND_NON_CLIENT_RIGHT_BUTTON_DOWN = 0x00A4,
24031 
24032   /// Mouse Right Button up event over a nonclient area, WM_NCRBUTTONUP.
24033 
24034   COREWEBVIEW2_MOUSE_EVENT_KIND_NON_CLIENT_RIGHT_BUTTON_UP = 0x00A5,
24035 }
24036 alias int COREWEBVIEW2_MOUSE_EVENT_KIND;
24037 
24038 /// Mouse event virtual keys associated with a COREWEBVIEW2_MOUSE_EVENT_KIND for
24039 /// SendMouseInput. These values can be combined into a bit flag if more than
24040 /// one virtual key is pressed for the event. The values of this enum align
24041 /// with the matching MK_* mouse keys.
24042 
24043 @("v1_enum")
24044 enum /+ COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS+/
24045 {
24046 
24047   /// No additional keys pressed.
24048 
24049   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_NONE     = 0x0,
24050 
24051   /// Left mouse button is down, MK_LBUTTON.
24052 
24053   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_LEFT_BUTTON  = 0x0001,
24054 
24055   /// Right mouse button is down, MK_RBUTTON.
24056 
24057   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_RIGHT_BUTTON  = 0x0002,
24058 
24059   /// SHIFT key is down, MK_SHIFT.
24060 
24061   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_SHIFT    = 0x0004,
24062 
24063   /// CTRL key is down, MK_CONTROL.
24064 
24065   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_CONTROL  = 0x0008,
24066 
24067   /// Middle mouse button is down, MK_MBUTTON.
24068 
24069   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_MIDDLE_BUTTON  = 0x0010,
24070 
24071   /// First X button is down, MK_XBUTTON1
24072 
24073   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON1 = 0x0020,
24074 
24075   /// Second X button is down, MK_XBUTTON2
24076 
24077   COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON2 = 0x0040,
24078 }
24079 alias int COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS;
24080 // DEFINE_ENUM_FLAG_OPERATORS(COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS)
24081 
24082 /// Pointer event type used by SendPointerInput to convey the type of pointer
24083 /// event being sent to WebView. The values of this enum align with the
24084 /// matching WM_POINTER* window messages.
24085 
24086 @("v1_enum")
24087 enum /+ COREWEBVIEW2_POINTER_EVENT_KIND+/
24088 {
24089 
24090   /// Corresponds to WM_POINTERACTIVATE.
24091 
24092   COREWEBVIEW2_POINTER_EVENT_KIND_ACTIVATE = 0x024B,
24093 
24094   /// Corresponds to WM_POINTERDOWN.
24095 
24096   COREWEBVIEW2_POINTER_EVENT_KIND_DOWN = 0x0246,
24097 
24098   /// Corresponds to WM_POINTERENTER.
24099 
24100   COREWEBVIEW2_POINTER_EVENT_KIND_ENTER = 0x0249,
24101 
24102   /// Corresponds to WM_POINTERLEAVE.
24103 
24104   COREWEBVIEW2_POINTER_EVENT_KIND_LEAVE = 0x024A,
24105 
24106   /// Corresponds to WM_POINTERUP.
24107 
24108   COREWEBVIEW2_POINTER_EVENT_KIND_UP = 0x0247,
24109 
24110   /// Corresponds to WM_POINTERUPDATE.
24111 
24112   COREWEBVIEW2_POINTER_EVENT_KIND_UPDATE = 0x0245,
24113 }
24114 alias int COREWEBVIEW2_POINTER_EVENT_KIND;
24115 
24116 /// Mode for how the Bounds property is interpreted in relation to the RasterizationScale property.
24117 @("v1_enum")
24118 enum /+ COREWEBVIEW2_BOUNDS_MODE+/
24119 {
24120 
24121   /// Bounds property represents raw pixels. Physical size of Webview is not impacted by RasterizationScale.
24122 
24123   COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS,
24124 
24125   /// Bounds property represents logical pixels and the RasterizationScale property is used to get the physical size of the WebView.
24126 
24127   COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE,
24128 }
24129 alias int COREWEBVIEW2_BOUNDS_MODE;
24130 
24131 /// Specifies the client certificate kind.
24132 @("v1_enum") enum /+ COREWEBVIEW2_CLIENT_CERTIFICATE_KIND+/
24133 {
24134   /// Specifies smart card certificate.
24135   COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_SMART_CARD,
24136   /// Specifies PIN certificate.
24137   COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_PIN,
24138   /// Specifies other certificate.
24139   COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_OTHER,
24140 }
24141 alias int COREWEBVIEW2_CLIENT_CERTIFICATE_KIND;
24142 
24143 /// State of the download operation.
24144 @("v1_enum")
24145 enum /+ COREWEBVIEW2_DOWNLOAD_STATE+/
24146 {
24147   /// The download is in progress.
24148   COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS,
24149   /// The connection with the file host was broken. The `InterruptReason` property
24150   /// can be accessed from `ICoreWebView2DownloadOperation`. See
24151   /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON` for descriptions of kinds of
24152   /// interrupt reasons. Host can check whether an interrupted download can be
24153   /// resumed with the `CanResume` property on the `ICoreWebView2DownloadOperation`.
24154   /// Once resumed, a download is in the `COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS` state.
24155   COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED,
24156   /// The download completed successfully.
24157   COREWEBVIEW2_DOWNLOAD_STATE_COMPLETED,
24158 }
24159 alias int COREWEBVIEW2_DOWNLOAD_STATE;
24160 
24161 /// Reason why a download was interrupted.
24162 @("v1_enum")
24163 enum /+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON+/
24164 {
24165   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NONE,
24166 
24167   /// Generic file error.
24168   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
24169   /// Access denied due to security restrictions.
24170   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED,
24171   /// Disk full. User should free some space or choose a different location to
24172   /// store the file.
24173   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE,
24174   /// Result file path with file name is too long.
24175   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG,
24176   /// File is too large for file system.
24177   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE,
24178   /// Microsoft Defender Smartscreen detected a virus in the file.
24179   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_MALICIOUS,
24180   /// File was in use, too many files opened, or out of memory.
24181   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR,
24182   /// File blocked by local policy.
24183   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED_BY_POLICY,
24184   /// Security check failed unexpectedly. Microsoft Defender SmartScreen could
24185   /// not scan this file.
24186   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED,
24187   /// Seeking past the end of a file in opening a file, as part of resuming an
24188   /// interrupted download. The file did not exist or was not as large as
24189   /// expected. Partially downloaded file was truncated or deleted, and download
24190   /// will be restarted automatically.
24191   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT,
24192   /// Partial file did not match the expected hash and was deleted. Download
24193   /// will be restarted automatically.
24194   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH,
24195 
24196   /// Generic network error. User can retry the download manually.
24197   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
24198   /// Network operation timed out.
24199   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT,
24200   /// Network connection lost. User can retry the download manually.
24201   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED,
24202   /// Server has gone down. User can retry the download manually.
24203   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN,
24204   /// Network request invalid because original or redirected URI is invalid, has
24205   /// an unsupported scheme, or is disallowed by network policy.
24206   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST,
24207 
24208   /// Generic server error. User can retry the download manually.
24209   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED,
24210   /// Server does not support range requests.
24211   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE,
24212   /// Server does not have the requested data.
24213   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT,
24214   /// Server did not authorize access to resource.
24215   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED,
24216   /// Server certificate problem.
24217   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CERTIFICATE_PROBLEM,
24218   /// Server access forbidden.
24219   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN,
24220   /// Unexpected server response. Responding server may not be intended server.
24221   /// User can retry the download manually.
24222   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNEXPECTED_RESPONSE,
24223   /// Server sent fewer bytes than the Content-Length header. Content-length
24224   /// header may be invalid or connection may have closed. Download is treated
24225   /// as complete unless there are
24226   /// [strong validators](https://tools.ietf.org/html/rfc7232#section-2) present
24227   /// to interrupt the download.
24228   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH,
24229   /// Unexpected cross-origin redirect.
24230   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT,
24231 
24232   /// User canceled the download.
24233   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED,
24234   /// User shut down the WebView. Resuming downloads that were interrupted
24235   /// during shutdown is not yet supported.
24236   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN,
24237   /// User paused the download.
24238   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_PAUSED,
24239 
24240   /// WebView crashed.
24241   COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_DOWNLOAD_PROCESS_CRASHED,
24242 }
24243 alias int COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON;
24244 
24245 /// The orientation for printing, used by the `Orientation` property on
24246 /// `ICoreWebView2PrintSettings`.
24247 @("v1_enum")
24248 enum /+ COREWEBVIEW2_PRINT_ORIENTATION+/
24249 {
24250   /// Print the page(s) in portrait orientation.
24251   COREWEBVIEW2_PRINT_ORIENTATION_PORTRAIT,
24252 
24253   /// Print the page(s) in landscape orientation.
24254   COREWEBVIEW2_PRINT_ORIENTATION_LANDSCAPE,
24255 }
24256 alias int COREWEBVIEW2_PRINT_ORIENTATION;
24257 
24258 /// The default download dialog can be aligned to any of the WebView corners
24259 /// by setting the `DefaultDownloadDialogCornerAlignment` property. The default
24260 /// position is top-right corner.
24261 @("v1_enum")
24262 enum /+ COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT+/
24263 {
24264 
24265   /// Top-left corner of the WebView.
24266   COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_LEFT,
24267 
24268   /// Top-right corner of the WebView.
24269   COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_RIGHT,
24270 
24271   /// Bottom-left corner of the WebView.
24272   COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_LEFT,
24273 
24274   /// Bottom-right corner of the WebView.
24275   COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_RIGHT,
24276 }
24277 alias int COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT;
24278 
24279 /// Indicates the process type used in the ICoreWebView2ProcessInfo interface.
24280 @("v1_enum")
24281 enum /+ COREWEBVIEW2_PROCESS_KIND+/
24282 {
24283   /// Indicates the browser process kind.
24284   COREWEBVIEW2_PROCESS_KIND_BROWSER,
24285 
24286   /// Indicates the render process kind.
24287   COREWEBVIEW2_PROCESS_KIND_RENDERER,
24288 
24289   /// Indicates the utility process kind.
24290   COREWEBVIEW2_PROCESS_KIND_UTILITY,
24291 
24292   /// Indicates the sandbox helper process kind.
24293   COREWEBVIEW2_PROCESS_KIND_SANDBOX_HELPER,
24294 
24295   /// Indicates the GPU process kind.
24296   COREWEBVIEW2_PROCESS_KIND_GPU,
24297 
24298   /// Indicates the PPAPI plugin process kind.
24299   COREWEBVIEW2_PROCESS_KIND_PPAPI_PLUGIN,
24300 
24301   /// Indicates the PPAPI plugin broker process kind.
24302   COREWEBVIEW2_PROCESS_KIND_PPAPI_BROKER,
24303 }
24304 alias int COREWEBVIEW2_PROCESS_KIND;
24305 
24306 // PDF toolbar item. This enum must be in sync with ToolBarItem in pdf-store-data-types.ts
24307 /// Specifies the PDF toolbar item types used for the `ICoreWebView2Settings::put_HiddenPdfToolbarItems` method.
24308 @("v1_enum")
24309 enum /+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS+/
24310 {
24311 
24312   /// No item
24313   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_NONE  = 0x0,
24314 
24315   /// The save button
24316   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE  = 0x0001,
24317 
24318   /// The print button
24319   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PRINT  = 0x0002,
24320 
24321   /// The save as button
24322   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE_AS  = 0x0004,
24323 
24324     /// The zoom in button
24325   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ZOOM_IN  = 0x0008,
24326 
24327   /// The zoom out button
24328   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ZOOM_OUT  = 0x0010,
24329 
24330   /// The rotate button
24331   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ROTATE  = 0x0020,
24332 
24333   /// The fit page button
24334   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_FIT_PAGE  = 0x0040,
24335 
24336   /// The page layout button
24337   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_LAYOUT  = 0x0080,
24338 
24339   /// The bookmarks button
24340   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_BOOKMARKS  = 0x0100,
24341 
24342   /// The page select button
24343   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_SELECTOR  = 0x0200,
24344 
24345   /// The search button
24346   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SEARCH  = 0x0400,
24347 
24348   /// The full screen button
24349   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_FULL_SCREEN  = 0x0800,
24350 
24351   /// The more settings button
24352   COREWEBVIEW2_PDF_TOOLBAR_ITEMS_MORE_SETTINGS  = 0x1000,
24353 }
24354 alias int COREWEBVIEW2_PDF_TOOLBAR_ITEMS;
24355 // DEFINE_ENUM_FLAG_OPERATORS(COREWEBVIEW2_PDF_TOOLBAR_ITEMS)
24356 
24357 /// Indicates the kind of context for which the context menu was created
24358 /// for the `ICoreWebView2ContextMenuTarget::get_Kind` method.
24359 /// This enum will always represent the active element that caused the context menu request.
24360 /// If there is a selection with multiple images, audio and text, for example, the element that
24361 /// the end user right clicks on within this selection will be the option represented by this enum.
24362 @("v1_enum")
24363 enum /+ COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND+/
24364 {
24365     /// Indicates that the context menu was created for the page without any additional content.
24366     COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_PAGE,
24367 
24368     /// Indicates that the context menu was created for an image element.
24369     COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_IMAGE,
24370 
24371     /// Indicates that the context menu was created for selected text.
24372     COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_SELECTED_TEXT,
24373 
24374     /// Indicates that the context menu was created for an audio element.
24375     COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_AUDIO,
24376 
24377     /// Indicates that the context menu was created for a video element.
24378     COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_VIDEO,
24379 }
24380 alias int COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND;
24381 
24382 /// Specifies the menu item kind
24383 /// for the `ICoreWebView2ContextMenuItem::get_Kind` method
24384 @("v1_enum")
24385 enum /+ COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND+/
24386 {
24387     /// Specifies a command menu item kind.
24388     COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_COMMAND,
24389 
24390     /// Specifies a check box menu item kind. `ContextMenuItem` objects of this kind
24391     /// will need the `IsChecked` property to determine current state of the check box.
24392     COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_CHECK_BOX,
24393 
24394     /// Specifies a radio button menu item kind. `ContextMenuItem` objects of this kind
24395     /// will need the `IsChecked` property to determine current state of the radio button.
24396     COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_RADIO,
24397 
24398     /// Specifies a separator menu item kind. `ContextMenuItem` objects of this kind
24399     /// are used to signal a visual separator with no functionality.
24400     COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_SEPARATOR,
24401 
24402     /// Specifies a submenu menu item kind. `ContextMenuItem` objects of this kind will contain
24403     /// a `ContextMenuItemCollection` of its children `ContextMenuItem` objects.
24404     COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_SUBMENU,
24405 }
24406 alias int COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND;
24407 
24408 /// An enum to represent the options for WebView2 color scheme: auto, light, or dark.
24409 @("v1_enum")
24410 enum /+ COREWEBVIEW2_PREFERRED_COLOR_SCHEME+/
24411 {
24412     /// Auto color scheme.
24413     COREWEBVIEW2_PREFERRED_COLOR_SCHEME_AUTO,
24414 
24415     /// Light color scheme.
24416     COREWEBVIEW2_PREFERRED_COLOR_SCHEME_LIGHT,
24417 
24418     /// Dark color scheme.
24419     COREWEBVIEW2_PREFERRED_COLOR_SCHEME_DARK
24420 }
24421 alias int COREWEBVIEW2_PREFERRED_COLOR_SCHEME;
24422 
24423 /// Specifies the datatype for the
24424 /// `ICoreWebView2Profile2::ClearBrowsingData` method.
24425 @("v1_enum")
24426 enum /+ COREWEBVIEW2_BROWSING_DATA_KINDS+/
24427 {
24428 
24429     /// Specifies file systems data.
24430     COREWEBVIEW2_BROWSING_DATA_KINDS_FILE_SYSTEMS = 1 << 0,
24431 
24432     /// Specifies data stored by the IndexedDB DOM feature.
24433     COREWEBVIEW2_BROWSING_DATA_KINDS_INDEXED_DB = 1 << 1,
24434 
24435     /// Specifies data stored by the localStorage DOM API.
24436     COREWEBVIEW2_BROWSING_DATA_KINDS_LOCAL_STORAGE = 1 << 2,
24437 
24438     /// Specifies data stored by the Web SQL database DOM API.
24439     COREWEBVIEW2_BROWSING_DATA_KINDS_WEB_SQL = 1 << 3,
24440 
24441     /// Specifies data stored by the CacheStorage DOM API.
24442     COREWEBVIEW2_BROWSING_DATA_KINDS_CACHE_STORAGE = 1 << 4,
24443 
24444     /// Specifies DOM storage data, now and future. This browsing data kind is
24445     /// inclusive of COREWEBVIEW2_BROWSING_DATA_KINDS_FILE_SYSTEMS,
24446     /// COREWEBVIEW2_BROWSING_DATA_KINDS_INDEXED_DB,
24447     /// COREWEBVIEW2_BROWSING_DATA_KINDS_LOCAL_STORAGE,
24448     /// COREWEBVIEW2_BROWSING_DATA_KINDS_WEB_SQL,
24449     /// COREWEBVIEW2_BROWSING_DATA_KINDS_SERVICE_WORKERS,
24450     /// COREWEBVIEW2_BROWSING_DATA_KINDS_CACHE_STORAGE,
24451     /// and some other data kinds not listed yet to keep consistent with
24452     /// [DOM-accessible storage](https://www.w3.org/TR/clear-site-data/#storage).
24453     COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_DOM_STORAGE = 1 << 5,
24454 
24455     /// Specifies HTTP cookies data.
24456     COREWEBVIEW2_BROWSING_DATA_KINDS_COOKIES = 1 << 6,
24457 
24458     /// Specifies all site data, now and future. This browsing data kind
24459     /// is inclusive of COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_DOM_STORAGE and
24460     /// COREWEBVIEW2_BROWSING_DATA_KINDS_COOKIES. New site data types
24461     /// may be added to this data kind in the future.
24462     COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_SITE = 1 << 7,
24463 
24464     /// Specifies disk cache.
24465     COREWEBVIEW2_BROWSING_DATA_KINDS_DISK_CACHE = 1 << 8,
24466 
24467     /// Specifies download history data.
24468     COREWEBVIEW2_BROWSING_DATA_KINDS_DOWNLOAD_HISTORY = 1 << 9,
24469 
24470     /// Specifies general autofill form data.
24471     /// This excludes password information and includes information like:
24472     /// names, street and email addresses, phone numbers, and arbitrary input.
24473     /// This also includes payment data.
24474     COREWEBVIEW2_BROWSING_DATA_KINDS_GENERAL_AUTOFILL = 1 << 10,
24475 
24476     /// Specifies password autosave data.
24477     COREWEBVIEW2_BROWSING_DATA_KINDS_PASSWORD_AUTOSAVE = 1 << 11,
24478 
24479     /// Specifies browsing history data.
24480     COREWEBVIEW2_BROWSING_DATA_KINDS_BROWSING_HISTORY = 1 << 12,
24481 
24482     /// Specifies settings data.
24483     COREWEBVIEW2_BROWSING_DATA_KINDS_SETTINGS = 1 << 13,
24484 
24485     /// Specifies profile data that should be wiped to make it look like a new profile.
24486     /// This does not delete account-scoped data like passwords but will remove access
24487     /// to account-scoped data by signing the user out.
24488     /// Specifies all profile data, now and future. New profile data types may be added
24489     /// to this data kind in the future.
24490     /// This browsing data kind is inclusive of COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_SITE,
24491     /// COREWEBVIEW2_BROWSING_DATA_KINDS_DISK_CACHE,
24492     /// COREWEBVIEW2_BROWSING_DATA_KINDS_DOWNLOAD_HISTORY,
24493     /// COREWEBVIEW2_BROWSING_DATA_KINDS_GENERAL_AUTOFILL,
24494     /// COREWEBVIEW2_BROWSING_DATA_KINDS_PASSWORD_AUTOSAVE,
24495     /// COREWEBVIEW2_BROWSING_DATA_KINDS_BROWSING_HISTORY, and
24496     /// COREWEBVIEW2_BROWSING_DATA_KINDS_SETTINGS.
24497     COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_PROFILE =  1 << 14,
24498 
24499     /// Specifies service workers registered for an origin, and clear will result in
24500     /// termination and deregistration of them.
24501     COREWEBVIEW2_BROWSING_DATA_KINDS_SERVICE_WORKERS = 1 << 15,
24502 }
24503 alias int COREWEBVIEW2_BROWSING_DATA_KINDS;
24504 // DEFINE_ENUM_FLAG_OPERATORS(COREWEBVIEW2_BROWSING_DATA_KINDS)
24505 
24506 /// Specifies the action type when server certificate error is detected to be
24507 /// used in the `ICoreWebView2ServerCertificateErrorDetectedEventArgs`
24508 /// interface.
24509 @("v1_enum") enum /+ COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION+/
24510 {
24511   /// Indicates to ignore the warning and continue the request with the TLS
24512   /// certificate. This decision is cached for the RequestUri's host and the
24513   /// server certificate in the session.
24514   COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_ALWAYS_ALLOW,
24515 
24516   /// Indicates to reject the certificate and cancel the request.
24517   COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_CANCEL,
24518 
24519   /// Indicates to display the default TLS interstitial error page to user for
24520   /// page navigations.
24521   /// For others TLS certificate is rejected and the request is cancelled.
24522   COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_DEFAULT
24523 }
24524 alias int COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION;
24525 
24526 /// Specifies the image format to use for favicon.
24527 @("v1_enum")
24528 enum /+ COREWEBVIEW2_FAVICON_IMAGE_FORMAT+/
24529 {
24530     /// Indicates that the PNG image format is used.
24531     COREWEBVIEW2_FAVICON_IMAGE_FORMAT_PNG,
24532 
24533     /// Indicates the JPEG image format is used.
24534     COREWEBVIEW2_FAVICON_IMAGE_FORMAT_JPEG,
24535 }
24536 alias int COREWEBVIEW2_FAVICON_IMAGE_FORMAT;
24537 
24538 /// Specifies the print dialog kind.
24539 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_DIALOG_KIND+/
24540 {
24541   /// Opens the browser print preview dialog.
24542   COREWEBVIEW2_PRINT_DIALOG_KIND_BROWSER,
24543 
24544   /// Opens the system print dialog.
24545   COREWEBVIEW2_PRINT_DIALOG_KIND_SYSTEM,
24546 }
24547 alias int COREWEBVIEW2_PRINT_DIALOG_KIND;
24548 
24549 /// Specifies the duplex option for a print.
24550 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_DUPLEX+/
24551 {
24552   /// The default duplex for a printer.
24553   COREWEBVIEW2_PRINT_DUPLEX_DEFAULT,
24554 
24555   /// Print on only one side of the sheet.
24556   COREWEBVIEW2_PRINT_DUPLEX_ONE_SIDED,
24557 
24558   /// Print on both sides of the sheet, flipped along the long edge.
24559   COREWEBVIEW2_PRINT_DUPLEX_TWO_SIDED_LONG_EDGE,
24560 
24561   /// Print on both sides of the sheet, flipped along the short edge.
24562   COREWEBVIEW2_PRINT_DUPLEX_TWO_SIDED_SHORT_EDGE,
24563 }
24564 alias int COREWEBVIEW2_PRINT_DUPLEX;
24565 
24566 /// Specifies the color mode for a print.
24567 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_COLOR_MODE+/
24568 {
24569   /// The default color mode for a printer.
24570   COREWEBVIEW2_PRINT_COLOR_MODE_DEFAULT,
24571 
24572   /// Indicate that the printed output will be in color.
24573   COREWEBVIEW2_PRINT_COLOR_MODE_COLOR,
24574 
24575   /// Indicate that the printed output will be in shades of gray.
24576   COREWEBVIEW2_PRINT_COLOR_MODE_GRAYSCALE,
24577 }
24578 alias int COREWEBVIEW2_PRINT_COLOR_MODE;
24579 
24580 /// Specifies the collation for a print.
24581 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_COLLATION+/
24582 {
24583   /// The default collation for a printer.
24584   COREWEBVIEW2_PRINT_COLLATION_DEFAULT,
24585 
24586   /// Indicate that the collation has been selected for the printed output.
24587   COREWEBVIEW2_PRINT_COLLATION_COLLATED,
24588 
24589   /// Indicate that the collation has not been selected for the printed output.
24590   COREWEBVIEW2_PRINT_COLLATION_UNCOLLATED,
24591 }
24592 alias int COREWEBVIEW2_PRINT_COLLATION;
24593 
24594 /// Specifies the media size for a print.
24595 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_MEDIA_SIZE+/
24596 {
24597   /// The default media size for a printer.
24598   COREWEBVIEW2_PRINT_MEDIA_SIZE_DEFAULT,
24599 
24600   /// Indicate custom media size that is specific to the printer.
24601   COREWEBVIEW2_PRINT_MEDIA_SIZE_CUSTOM,
24602 }
24603 alias int COREWEBVIEW2_PRINT_MEDIA_SIZE;
24604 
24605 /// Indicates the status for printing.
24606 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_STATUS+/
24607 {
24608   /// Indicates that the print operation is succeeded.
24609   COREWEBVIEW2_PRINT_STATUS_SUCCEEDED,
24610 
24611   /// Indicates that the printer is not available.
24612   COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE,
24613 
24614   /// Indicates that the print operation is failed.
24615   COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR,
24616 }
24617 alias int COREWEBVIEW2_PRINT_STATUS;
24618 
24619 /// Tracking prevention levels.
24620 @("v1_enum") enum /+ COREWEBVIEW2_TRACKING_PREVENTION_LEVEL+/
24621 {
24622   /// Tracking prevention is turned off.
24623   COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE,
24624   /// The least restrictive level of tracking prevention. Set to this level to
24625   /// protect against malicious trackers but allows most other trackers and
24626   /// personalize content and ads.
24627   ///
24628   /// See [Current tracking prevention
24629   /// behavior](/microsoft-edge/web-platform/tracking-prevention#current-tracking-prevention-behavior)
24630   /// for fine-grained information on what is being blocked with this level and
24631   /// can change with different Edge versions.
24632   COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BASIC,
24633   /// The default level of tracking prevention. Set to this level to
24634   /// protect against social media tracking on top of malicious trackers.
24635   /// Content and ads will likely be less personalized.
24636   ///
24637   /// See [Current tracking prevention
24638   /// behavior](/microsoft-edge/web-platform/tracking-prevention#current-tracking-prevention-behavior)
24639   /// for fine-grained information on what is being blocked with this level and
24640   /// can change with different Edge versions.
24641   COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED,
24642   /// The most restrictive level of tracking prevention. Set to this level to
24643   /// protect
24644   /// against malicious trackers and most trackers across sites. Content and ads
24645   /// will likely have minimal personalization.
24646   ///
24647   /// This level blocks the most trackers but could cause some websites to not
24648   /// behave as expected.
24649   ///
24650   /// See [Current tracking prevention
24651   /// behavior](/microsoft-edge/web-platform/tracking-prevention#current-tracking-prevention-behavior)
24652   /// for fine-grained information on what is being blocked with this level and
24653   /// can change with different Edge versions.
24654   COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_STRICT,
24655 }
24656 alias int COREWEBVIEW2_TRACKING_PREVENTION_LEVEL;
24657 
24658 /// Specifies the desired access from script to `CoreWebView2SharedBuffer`.
24659 @("v1_enum")
24660 enum /+ COREWEBVIEW2_SHARED_BUFFER_ACCESS+/
24661 {
24662   /// Script from web page only has read access to the shared buffer.
24663   COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY,
24664 
24665   /// Script from web page has read and write access to the shared buffer.
24666   COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_WRITE
24667 }
24668 alias int COREWEBVIEW2_SHARED_BUFFER_ACCESS;
24669 
24670 /// Specifies memory usage target level of WebView.
24671 @("v1_enum")
24672 enum /+ COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL+/
24673 {
24674   /// Specifies normal memory usage target level.
24675   COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_NORMAL,
24676 
24677   /// Specifies low memory usage target level.
24678   /// Used for inactivate WebView for reduced memory consumption.
24679   COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_LOW,
24680 }
24681 alias int COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL;
24682 
24683 /// Specifies the navigation kind of each navigation.
24684 @("v1_enum")
24685 enum /+ COREWEBVIEW2_NAVIGATION_KIND+/
24686 {
24687   /// A navigation caused by `CoreWebView2.Reload()`, `location.reload()`, the end user
24688   /// using F5 or other UX, or other reload mechanisms to reload the current document
24689   /// without modifying the navigation history.
24690   COREWEBVIEW2_NAVIGATION_KIND_RELOAD = 0,
24691 
24692   /// A navigation back or forward to a different entry in the session navigation history,
24693   /// like via `CoreWebView2.Back()`, `location.back()`, the end user pressing Alt+Left
24694   /// or other UX, or other mechanisms to navigate back or forward in the current
24695   /// session navigation history.
24696   ///
24697   // Note: This kind doesn't distinguish back or forward, because we can't
24698   // distinguish it from origin source `blink.mojom.NavigationType`.
24699   COREWEBVIEW2_NAVIGATION_KIND_BACK_OR_FORWARD = 1,
24700 
24701   /// A navigation to another document, which can be caused by `CoreWebView2.Navigate()`,
24702   /// `window.location.href = ...`, or other WebView2 or DOM APIs that navigate to a new URI.
24703   COREWEBVIEW2_NAVIGATION_KIND_NEW_DOCUMENT = 2,
24704 }
24705 alias int COREWEBVIEW2_NAVIGATION_KIND;
24706 
24707 /// Indicates the frame type used in the `ICoreWebView2FrameInfo` interface.
24708 @("v1_enum")
24709 enum /+ COREWEBVIEW2_FRAME_KIND+/
24710 {
24711   /// Indicates that the frame is an unknown type frame. We may extend this enum
24712   /// type to identify more frame kinds in the future.
24713   COREWEBVIEW2_FRAME_KIND_UNKNOWN,
24714   /// Indicates that the frame is a primary main frame(webview).
24715   COREWEBVIEW2_FRAME_KIND_MAIN_FRAME,
24716   /// Indicates that the frame is an iframe.
24717   COREWEBVIEW2_FRAME_KIND_IFRAME,
24718   /// Indicates that the frame is an embed element.
24719   COREWEBVIEW2_FRAME_KIND_EMBED,
24720   /// Indicates that the frame is an object element.
24721   COREWEBVIEW2_FRAME_KIND_OBJECT,
24722 }
24723 alias int COREWEBVIEW2_FRAME_KIND;
24724 
24725 // End of enums and structs
24726 
24727 /// WebView2 enables you to host web content using the latest Microsoft Edge
24728 /// browser and web technology.
24729 
24730 const GUID IID_ICoreWebView2 = ICoreWebView2.iid;
24731 
24732 interface ICoreWebView2 : IUnknown
24733 {
24734     static const GUID iid = { 0x76eceacb,0x0462,0x4d94,[ 0xac,0x83,0x42,0x3a,0x67,0x93,0x77,0x5e ] };
24735 
24736   /// The `ICoreWebView2Settings` object contains various modifiable settings
24737   /// for the running WebView.
24738 
24739   @(" propget")
24740 	HRESULT get_Settings(@("out, retval") ICoreWebView2Settings * settings);
24741 
24742   /// The URI of the current top level document.  This value potentially
24743   /// changes as a part of the `SourceChanged` event that runs for some cases
24744   /// such as navigating to a different site or fragment navigations.  It
24745   /// remains the same for other types of navigations such as page refreshes
24746   /// or `history.pushState` with the same URL as the current page.
24747   ///
24748   /// The caller must free the returned string with `CoTaskMemFree`.  See
24749   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
24750   ///
24751   /// \snippet ControlComponent.cpp SourceChanged
24752   @(" propget")
24753 	HRESULT get_Source(@("out, retval") LPWSTR* uri);
24754 
24755   /// Cause a navigation of the top-level document to run to the specified URI.
24756   /// For more information, navigate to [Navigation
24757   /// events](/microsoft-edge/webview2/concepts/navigation-events).
24758   ///
24759   /// \> [!NOTE]\n\> This operation starts a navigation and the corresponding
24760   /// `NavigationStarting` event triggers sometime after `Navigate` runs.
24761   ///
24762   /// \snippet ControlComponent.cpp Navigate
24763   HRESULT Navigate(in LPCWSTR uri);
24764 
24765   /// Initiates a navigation to htmlContent as source HTML of a new document.
24766   /// The `htmlContent` parameter may not be larger than 2 MB (2 * 1024 * 1024 bytes) in total size.
24767   /// The origin of the new page is `about:blank`.
24768   ///
24769   /// ```cpp
24770   ///    SetVirtualHostNameToFolderMapping(
24771   ///        L"appassets.example", L"assets",
24772   ///        COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY);
24773   ///
24774   ///    WCHAR c_navString[] = LR"
24775   ///    <head><link rel='stylesheet' href ='http://appassets.example/wv2.css'/></head>
24776   ///    <body>
24777   ///      <img src='http://appassets.example/wv2.png' />
24778   ///      <p><a href='http://appassets.example/winrt_test.txt'>Click me</a></p>
24779   ///    </body>";
24780   ///    m_webView->NavigateToString(c_navString);
24781   /// ```
24782   /// \snippet SettingsComponent.cpp NavigateToString
24783   HRESULT NavigateToString(in LPCWSTR htmlContent);
24784 
24785   /// Add an event handler for the `NavigationStarting` event.
24786   /// `NavigationStarting` runs when the WebView main frame is requesting
24787   /// permission to navigate to a different URI.  Redirects trigger this
24788   /// operation as well, and the navigation id is the same as the original
24789   /// one.
24790   ///
24791   /// Navigations will be blocked until all `NavigationStarting` event handlers
24792   /// return.
24793   ///
24794   /// \snippet SettingsComponent.cpp NavigationStarting
24795   HRESULT add_NavigationStarting(
24796       /+[in]+/ ICoreWebView2NavigationStartingEventHandler eventHandler,
24797       @("out") EventRegistrationToken* token);
24798 
24799   /// Remove an event handler previously added with `add_NavigationStarting`.
24800   HRESULT remove_NavigationStarting(
24801       in EventRegistrationToken token);
24802 
24803   /// Add an event handler for the `ContentLoading` event.  `ContentLoading`
24804   /// triggers before any content is loaded, including scripts added with
24805   /// `AddScriptToExecuteOnDocumentCreated`.  `ContentLoading` does not trigger
24806   /// if a same page navigation occurs (such as through `fragment`
24807   /// navigations or `history.pushState` navigations).  This operation
24808   /// follows the `NavigationStarting` and `SourceChanged` events and precedes
24809   /// the `HistoryChanged` and `NavigationCompleted` events.
24810   HRESULT add_ContentLoading(
24811       /+[in]+/ ICoreWebView2ContentLoadingEventHandler eventHandler,
24812       @("out") EventRegistrationToken* token);
24813 
24814   /// Remove an event handler previously added with `add_ContentLoading`.
24815   HRESULT remove_ContentLoading(
24816       in EventRegistrationToken token);
24817 
24818   /// Add an event handler for the `SourceChanged` event.  `SourceChanged`
24819   /// triggers when the `Source` property changes.  `SourceChanged` runs when
24820   /// navigating to a different site or fragment navigations.  It does not
24821   /// trigger for other types of navigations such as page refreshes or
24822   /// `history.pushState` with the same URL as the current page.
24823   /// `SourceChanged` runs before `ContentLoading` for navigation to a new
24824   /// document.
24825   ///
24826   /// \snippet ControlComponent.cpp SourceChanged
24827   HRESULT add_SourceChanged(
24828       /+[in]+/ ICoreWebView2SourceChangedEventHandler eventHandler,
24829       @("out") EventRegistrationToken* token);
24830 
24831   /// Remove an event handler previously added with `add_SourceChanged`.
24832   HRESULT remove_SourceChanged(
24833       in EventRegistrationToken token);
24834 
24835   /// Add an event handler for the `HistoryChanged` event.  `HistoryChanged` is
24836   /// raised for changes to joint session history, which consists of top-level
24837   /// and manual frame navigations.  Use `HistoryChanged` to verify that the
24838   /// `CanGoBack` or `CanGoForward` value has changed.  `HistoryChanged` also
24839   /// runs for using `GoBack` or `GoForward`.  `HistoryChanged` runs after
24840   /// `SourceChanged` and `ContentLoading`.  `CanGoBack` is false for
24841   /// navigations initiated through ICoreWebView2Frame APIs if there has not yet
24842   /// been a user gesture.
24843   ///
24844   /// \snippet ControlComponent.cpp HistoryChanged
24845   HRESULT add_HistoryChanged(
24846       /+[in]+/ ICoreWebView2HistoryChangedEventHandler eventHandler,
24847       @("out") EventRegistrationToken* token);
24848 
24849   /// Remove an event handler previously added with `add_HistoryChanged`.
24850   HRESULT remove_HistoryChanged(
24851       in EventRegistrationToken token);
24852 
24853   /// Add an event handler for the `NavigationCompleted` event.
24854   /// `NavigationCompleted` runs when the WebView has completely loaded
24855   /// (concurrently when `body.onload` runs) or loading stopped with error.
24856   ///
24857   /// \snippet ControlComponent.cpp NavigationCompleted
24858   HRESULT add_NavigationCompleted(
24859       /+[in]+/ ICoreWebView2NavigationCompletedEventHandler eventHandler,
24860       @("out") EventRegistrationToken* token);
24861 
24862   /// Remove an event handler previously added with `add_NavigationCompleted`.
24863   HRESULT remove_NavigationCompleted(
24864       in EventRegistrationToken token);
24865 
24866   /// Add an event handler for the `FrameNavigationStarting` event.
24867   /// `FrameNavigationStarting` triggers when a child frame in the WebView
24868   /// requests permission to navigate to a different URI.  Redirects trigger
24869   /// this operation as well, and the navigation id is the same as the original
24870   /// one.
24871   ///
24872   /// Navigations will be blocked until all `FrameNavigationStarting` event
24873   /// handlers return.
24874   ///
24875   /// \snippet SettingsComponent.cpp FrameNavigationStarting
24876   HRESULT add_FrameNavigationStarting(
24877       /+[in]+/ ICoreWebView2NavigationStartingEventHandler eventHandler,
24878       @("out") EventRegistrationToken* token);
24879 
24880   /// Remove an event handler previously added with
24881   /// `add_FrameNavigationStarting`.
24882   HRESULT remove_FrameNavigationStarting(
24883       in EventRegistrationToken token);
24884 
24885   /// Add an event handler for the `FrameNavigationCompleted` event.
24886   /// `FrameNavigationCompleted` triggers when a child frame has completely
24887   /// loaded (concurrently when `body.onload` has triggered) or loading stopped with error.
24888   ///
24889   /// \snippet ControlComponent.cpp FrameNavigationCompleted
24890   HRESULT add_FrameNavigationCompleted(
24891       /+[in]+/ ICoreWebView2NavigationCompletedEventHandler eventHandler,
24892       @("out") EventRegistrationToken* token);
24893 
24894   /// Remove an event handler previously added with
24895   /// `add_FrameNavigationCompleted`.
24896   HRESULT remove_FrameNavigationCompleted(
24897       in EventRegistrationToken token);
24898 
24899   /// Add an event handler for the `ScriptDialogOpening` event.
24900   /// `ScriptDialogOpening` runs when a JavaScript dialog (`alert`, `confirm`,
24901   /// `prompt`, or `beforeunload`) displays for the webview.  This event only
24902   /// triggers if the `ICoreWebView2Settings::AreDefaultScriptDialogsEnabled`
24903   /// property is set to `FALSE`.  The `ScriptDialogOpening` event suppresses
24904   /// dialogs or replaces default dialogs with custom dialogs.
24905   ///
24906   /// If a deferral is not taken on the event args, the subsequent scripts are
24907   /// blocked until the event handler returns.  If a deferral is taken, the
24908   /// scripts are blocked until the deferral is completed.
24909   ///
24910   /// \snippet SettingsComponent.cpp ScriptDialogOpening
24911   HRESULT add_ScriptDialogOpening(
24912       /+[in]+/ ICoreWebView2ScriptDialogOpeningEventHandler eventHandler,
24913       @("out") EventRegistrationToken* token);
24914 
24915   /// Remove an event handler previously added with `add_ScriptDialogOpening`.
24916   HRESULT remove_ScriptDialogOpening(
24917       in EventRegistrationToken token);
24918 
24919   /// Add an event handler for the `PermissionRequested` event.
24920   /// `PermissionRequested` runs when content in a WebView requests permission
24921   /// to access some privileged resources.
24922   ///
24923   /// If a deferral is not taken on the event args, the subsequent scripts are
24924   /// blocked until the event handler returns.  If a deferral is taken, the
24925   /// scripts are blocked until the deferral is completed.
24926   ///
24927   /// \snippet SettingsComponent.cpp PermissionRequested0
24928   /// \snippet SettingsComponent.cpp PermissionRequested1
24929   HRESULT add_PermissionRequested(
24930       /+[in]+/ ICoreWebView2PermissionRequestedEventHandler eventHandler,
24931       @("out") EventRegistrationToken* token);
24932 
24933   /// Remove an event handler previously added with `add_PermissionRequested`.
24934   HRESULT remove_PermissionRequested(
24935       in EventRegistrationToken token);
24936 
24937   /// Add an event handler for the `ProcessFailed` event.
24938   /// `ProcessFailed` runs when any of the processes in the
24939   /// [WebView2 Process Group](/microsoft-edge/webview2/concepts/process-model?tabs=csharp#processes-in-the-webview2-runtime)
24940   /// encounters one of the following conditions:
24941   ///
24942   /// Condition | Details
24943   /// ---|---
24944   /// 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.
24945   /// 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.
24946   ///
24947   /// \> [!NOTE]\n\> When the failing process is the browser process, a
24948   /// `ICoreWebView2Environment5::BrowserProcessExited` event will run too.
24949   ///
24950   /// Your application can use `ICoreWebView2ProcessFailedEventArgs` and
24951   /// `ICoreWebView2ProcessFailedEventArgs2` to identify which condition and
24952   /// process the event is for, and to collect diagnostics and handle recovery
24953   /// if necessary. For more details about which cases need to be handled by
24954   /// your application, see `COREWEBVIEW2_PROCESS_FAILED_KIND`.
24955   ///
24956   /// \snippet ProcessComponent.cpp ProcessFailed
24957   HRESULT add_ProcessFailed(
24958       /+[in]+/ ICoreWebView2ProcessFailedEventHandler eventHandler,
24959       @("out") EventRegistrationToken* token);
24960 
24961   /// Remove an event handler previously added with `add_ProcessFailed`.
24962   HRESULT remove_ProcessFailed(
24963       in EventRegistrationToken token);
24964 
24965   /// Add the provided JavaScript to a list of scripts that should be run after
24966   /// the global object has been created, but before the HTML document has
24967   /// been parsed and before any other script included by the HTML document is
24968   /// run.  This method injects a script that runs on all top-level document
24969   /// and child frame page navigations.  This method runs asynchronously, and
24970   /// you must wait for the completion handler to finish before the injected
24971   /// script is ready to run.  When this method completes, the `Invoke` method
24972   /// of the handler is run with the `id` of the injected script.  `id` is a
24973   /// string.  To remove the injected script, use
24974   /// `RemoveScriptToExecuteOnDocumentCreated`.
24975   ///
24976   /// If the method is run in add_NewWindowRequested handler it should be called
24977   /// before the new window is set. If called after setting the NewWindow property, the initial script
24978   /// may or may not apply to the initial navigation and may only apply to the subsequent navigation.
24979   /// For more details see `ICoreWebView2NewWindowRequestedEventArgs::put_NewWindow`.
24980   ///
24981   /// \> [!NOTE]\n\> If an HTML document is running in a sandbox of some kind using
24982   /// [sandbox](https://developer.mozilla.org/docs/Web/HTML/Element/iframe#attr-sandbox)
24983   /// properties or the
24984   /// [Content-Security-Policy](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy)
24985   /// HTTP header affects the script that runs.  For example, if the
24986   /// `allow-modals` keyword is not set then requests to run the `alert`
24987   /// function are ignored.
24988   ///
24989   /// \snippet ScriptComponent.cpp AddScriptToExecuteOnDocumentCreated
24990   HRESULT AddScriptToExecuteOnDocumentCreated(
24991       in LPCWSTR javaScript,
24992       /+[in]+/ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler handler);
24993 
24994   /// Remove the corresponding JavaScript added using
24995   /// `AddScriptToExecuteOnDocumentCreated` with the specified script ID. The
24996   /// script ID should be the one returned by the `AddScriptToExecuteOnDocumentCreated`.
24997   /// Both use `AddScriptToExecuteOnDocumentCreated` and this method in `NewWindowRequested`
24998   /// event handler at the same time sometimes causes trouble.  Since invalid scripts will
24999   /// be ignored, the script IDs you got may not be valid anymore.
25000   HRESULT RemoveScriptToExecuteOnDocumentCreated(in LPCWSTR id);
25001 
25002   /// Run JavaScript code from the javascript parameter in the current
25003   /// top-level document rendered in the WebView.  The result of evaluating
25004   /// the provided JavaScript is used in this parameter.  The result value is
25005   /// a JSON encoded string.  If the result is undefined, contains a reference
25006   /// cycle, or otherwise is not able to be encoded into JSON, then the result
25007   /// is considered to be null, which is encoded in JSON as the string "null".
25008   ///
25009   /// \> [!NOTE]\n\> A function that has no explicit return value returns undefined. If the
25010   /// script that was run throws an unhandled exception, then the result is
25011   /// also "null".  This method is applied asynchronously. If the method is
25012   /// run after the `NavigationStarting` event during a navigation, the script
25013   /// runs in the new document when loading it, around the time
25014   /// `ContentLoading` is run.  This operation executes the script even if
25015   /// `ICoreWebView2Settings::IsScriptEnabled` is set to `FALSE`.
25016   ///
25017   /// \snippet ScriptComponent.cpp ExecuteScript
25018   HRESULT ExecuteScript(
25019       in LPCWSTR javaScript,
25020       /+[in]+/ ICoreWebView2ExecuteScriptCompletedHandler handler);
25021 
25022   /// Capture an image of what WebView is displaying.  Specify the format of
25023   /// the image with the `imageFormat` parameter.  The resulting image binary
25024   /// data is written to the provided `imageStream` parameter.  When
25025   /// `CapturePreview` finishes writing to the stream, the `Invoke` method on
25026   /// the provided `handler` parameter is run.  This method fails if called
25027   /// before the first ContentLoading event.  For example if this is called in
25028   /// the NavigationStarting event for the first navigation it will fail.
25029   /// For subsequent navigations, the method may not fail, but will not capture
25030   /// an image of a given webpage until the ContentLoading event has been fired
25031   /// for it.  Any call to this method prior to that will result in a capture of
25032   /// the page being navigated away from.
25033   ///
25034   /// \snippet FileComponent.cpp CapturePreview
25035   HRESULT CapturePreview(
25036       in COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT imageFormat,
25037       in IStream* imageStream,
25038       /+[in]+/ ICoreWebView2CapturePreviewCompletedHandler handler);
25039 
25040   /// Reload the current page.  This is similar to navigating to the URI of
25041   /// current top level document including all navigation events firing and
25042   /// respecting any entries in the HTTP cache.  But, the back or forward
25043   /// history are not modified.
25044   HRESULT Reload();
25045 
25046   /// Post the specified webMessage to the top level document in this WebView.
25047   /// The main page receives the message by subscribing to the `message` event of the
25048   /// `window.chrome.webview` of the page document.
25049   ///
25050   /// ```cpp
25051   /// window.chrome.webview.addEventListener('message', handler)
25052   /// window.chrome.webview.removeEventListener('message', handler)
25053   /// ```
25054   ///
25055   /// The event args is an instance of `MessageEvent`.  The
25056   /// `ICoreWebView2Settings::IsWebMessageEnabled` setting must be `TRUE` or
25057   /// the web message will not be sent. The `data` property of the event
25058   /// arg is the `webMessage` string parameter parsed as a JSON string into a
25059   /// JavaScript object.  The `source` property of the event arg is a reference
25060   ///  to the `window.chrome.webview` object.  For information about sending
25061   /// messages from the HTML document in the WebView to the host, navigate to
25062   /// [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived).
25063   /// The message is delivered asynchronously.  If a navigation occurs before
25064   /// the message is posted to the page, the message is discarded.
25065   ///
25066   /// \snippet ScenarioWebMessage.cpp WebMessageReceived
25067   HRESULT PostWebMessageAsJson(in LPCWSTR webMessageAsJson);
25068 
25069   /// Posts a message that is a simple string rather than a JSON string
25070   /// representation of a JavaScript object.  This behaves in exactly the same
25071   /// manner as `PostWebMessageAsJson`, but the `data` property of the event
25072   /// arg of the `window.chrome.webview` message is a string with the same
25073   /// value as `webMessageAsString`.  Use this instead of
25074   /// `PostWebMessageAsJson` if you want to communicate using simple strings
25075   /// rather than JSON objects.
25076   HRESULT PostWebMessageAsString(in LPCWSTR webMessageAsString);
25077 
25078   /// Add an event handler for the `WebMessageReceived` event.
25079   /// `WebMessageReceived` runs when the
25080   /// `ICoreWebView2Settings::IsWebMessageEnabled` setting is set and the
25081   /// top-level document of the WebView runs
25082   /// `window.chrome.webview.postMessage`.  The `postMessage` function is
25083   /// `void postMessage(object)` where object is any object supported by JSON
25084   /// conversion.
25085   ///
25086   /// \snippet assets\ScenarioWebMessage.html chromeWebView
25087   ///
25088   /// When the page calls `postMessage`, the object parameter is converted to a
25089   /// JSON string and is posted asynchronously to the host process. This will
25090   /// result in the handler's `Invoke` method being called with the JSON string
25091   /// as a parameter.
25092   ///
25093   /// \snippet ScenarioWebMessage.cpp WebMessageReceived
25094   ///
25095   /// If the same page calls `postMessage` multiple times, the corresponding
25096   /// `WebMessageReceived` events are guaranteed to be fired in the same order.
25097   /// However, if multiple frames call `postMessage`, there is no guaranteed
25098   /// order.  In addition, `WebMessageReceived` events caused by calls to
25099   /// `postMessage` are not guaranteed to be sequenced with events caused by DOM
25100   /// APIs.  For example, if the page runs
25101   ///
25102   /// ```javascript
25103   /// chrome.webview.postMessage("message");
25104   /// window.open();
25105   /// ```
25106   ///
25107   /// then the `NewWindowRequested` event might be fired before the
25108   /// `WebMessageReceived` event.  If you need the `WebMessageReceived` event
25109   /// to happen before anything else, then in the `WebMessageReceived` handler
25110   /// you can post a message back to the page and have the page wait until it
25111   /// receives that message before continuing.
25112   HRESULT add_WebMessageReceived(
25113       /+[in]+/ ICoreWebView2WebMessageReceivedEventHandler handler,
25114       @("out") EventRegistrationToken* token);
25115 
25116   /// Remove an event handler previously added with `add_WebMessageReceived`.
25117   HRESULT remove_WebMessageReceived(
25118       in EventRegistrationToken token);
25119 
25120   /// Runs an asynchronous `DevToolsProtocol` method.  For more information
25121   /// about available methods, navigate to
25122   /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot)
25123   /// .  The `methodName` parameter is the full name of the method in the
25124   /// `{domain}.{method}` format.  The `parametersAsJson` parameter is a JSON
25125   /// formatted string containing the parameters for the corresponding method.
25126   /// The `Invoke` method of the `handler` is run when the method
25127   /// asynchronously completes.  `Invoke` is run with the return object of the
25128   /// method as a JSON string.  This function returns E_INVALIDARG if the `methodName` is
25129   /// unknown or the `parametersAsJson` has an error.  In the case of such an error, the
25130   /// `returnObjectAsJson` parameter of the handler will include information
25131   /// about the error.
25132   /// Note even though WebView2 dispatches the CDP messages in the order called,
25133   /// CDP method calls may be processed out of order.
25134   /// If you require CDP methods to run in a particular order, you should wait
25135   /// for the previous method's completed handler to run before calling the
25136   /// next method.
25137   ///
25138   /// \snippet ScriptComponent.cpp CallDevToolsProtocolMethod
25139   HRESULT CallDevToolsProtocolMethod(
25140       in LPCWSTR methodName,
25141       in LPCWSTR parametersAsJson,
25142       /+[in]+/ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler handler);
25143 
25144   /// The process ID of the browser process that hosts the WebView.
25145   @(" propget")
25146 	HRESULT get_BrowserProcessId(@("out, retval") UINT32* value);
25147 
25148   /// `TRUE` if the WebView is able to navigate to a previous page in the
25149   /// navigation history.  If `CanGoBack` changes value, the `HistoryChanged`
25150   /// event runs.
25151   @(" propget")
25152 	HRESULT get_CanGoBack(@("out, retval") BOOL* canGoBack);
25153 
25154   /// `TRUE` if the WebView is able to navigate to a next page in the
25155   /// navigation history.  If `CanGoForward` changes value, the
25156   /// `HistoryChanged` event runs.
25157   @(" propget")
25158 	HRESULT get_CanGoForward(@("out, retval") BOOL* canGoForward);
25159 
25160   /// Navigates the WebView to the previous page in the navigation history.
25161   HRESULT GoBack();
25162 
25163   /// Navigates the WebView to the next page in the navigation history.
25164   HRESULT GoForward();
25165 
25166   /// Get a DevTools Protocol event receiver that allows you to subscribe to a
25167   /// DevTools Protocol event.  The `eventName` parameter is the full name of
25168   /// the event in the format `{domain}.{event}`.  For more information about
25169   /// DevTools Protocol events description and event args, navigate to
25170   /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot).
25171   ///
25172   /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceived
25173   HRESULT GetDevToolsProtocolEventReceiver(
25174       in LPCWSTR eventName,
25175       @("out, retval") ICoreWebView2DevToolsProtocolEventReceiver * receiver);
25176 
25177   /// Stop all navigations and pending resource fetches.  Does not stop scripts.
25178   HRESULT Stop();
25179 
25180   /// Add an event handler for the `NewWindowRequested` event.
25181   /// `NewWindowRequested` runs when content inside the WebView requests to
25182   /// open a new window, such as through `window.open`.  The app can pass a
25183   /// target WebView that is considered the opened window or mark the event as
25184   /// `Handled`, in which case WebView2 does not open a window.
25185   /// If either `Handled` or `NewWindow` properties are not set, the target
25186   /// content will be opened on a popup window.
25187   ///
25188   /// If a deferral is not taken on the event args, scripts that resulted in the
25189   /// new window that are requested are blocked until the event handler returns.
25190   /// If a deferral is taken, then scripts are blocked until the deferral is
25191   /// completed or new window is set.
25192   ///
25193   /// For more details and considerations on the target WebView to be supplied
25194   /// at the opened window, see `ICoreWebView2NewWindowRequestedEventArgs::put_NewWindow`.
25195   ///
25196   /// \snippet AppWindow.cpp NewWindowRequested
25197   HRESULT add_NewWindowRequested(
25198       /+[in]+/ ICoreWebView2NewWindowRequestedEventHandler eventHandler,
25199       @("out") EventRegistrationToken* token);
25200 
25201   /// Remove an event handler previously added with `add_NewWindowRequested`.
25202   HRESULT remove_NewWindowRequested(
25203       in EventRegistrationToken token);
25204 
25205   /// Add an event handler for the `DocumentTitleChanged` event.
25206   /// `DocumentTitleChanged` runs when the `DocumentTitle` property of the
25207   /// WebView changes and may run before or after the `NavigationCompleted`
25208   /// event.
25209   ///
25210   /// \snippet FileComponent.cpp DocumentTitleChanged
25211   HRESULT add_DocumentTitleChanged(
25212       /+[in]+/ ICoreWebView2DocumentTitleChangedEventHandler eventHandler,
25213       @("out") EventRegistrationToken* token);
25214 
25215   /// Remove an event handler previously added with `add_DocumentTitleChanged`.
25216   HRESULT remove_DocumentTitleChanged(
25217       in EventRegistrationToken token);
25218 
25219   /// The title for the current top-level document.  If the document has no
25220   /// explicit title or is otherwise empty, a default that may or may not match
25221   ///  the URI of the document is used.
25222   ///
25223   /// The caller must free the returned string with `CoTaskMemFree`.  See
25224   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
25225   @(" propget")
25226 	HRESULT get_DocumentTitle(@("out, retval") LPWSTR* title);
25227 
25228   /// Add the provided host object to script running in the WebView with the
25229   /// specified name.  Host objects are exposed as host object proxies using
25230   /// `window.chrome.webview.hostObjects.{name}`.  Host object proxies are
25231   /// promises and resolves to an object representing the host object.  The
25232   /// promise is rejected if the app has not added an object with the name.
25233   /// When JavaScript code access a property or method of the object, a promise
25234   ///  is return, which resolves to the value returned from the host for the
25235   /// property or method, or rejected in case of error, for example, no
25236   /// property or method on the object or parameters are not valid.
25237   ///
25238   /// \> [!NOTE]\n\> While simple types, `IDispatch` and array are supported, and
25239   /// `IUnknown` objects that also implement `IDispatch` are treated as `IDispatch`,
25240   /// generic `IUnknown`, `VT_DECIMAL`, or `VT_RECORD` variant is not supported.
25241   /// Remote JavaScript objects like callback functions are represented as an
25242   /// `VT_DISPATCH` `VARIANT` with the object implementing `IDispatch`.  The
25243   /// JavaScript callback method may be invoked using `DISPID_VALUE` for the
25244   /// `DISPID`.  Such callback method invocations will return immediately and will
25245   /// not wait for the JavaScript function to run and so will not provide the return
25246   /// value of the JavaScript function.
25247   /// Nested arrays are supported up to a depth of 3.  Arrays of by
25248   /// reference types are not supported. `VT_EMPTY` and `VT_NULL` are mapped
25249   /// into JavaScript as `null`.  In JavaScript, `null` and undefined are
25250   /// mapped to `VT_EMPTY`.
25251   ///
25252   /// Additionally, all host objects are exposed as
25253   /// `window.chrome.webview.hostObjects.sync.{name}`.  Here the host objects
25254   /// are exposed as synchronous host object proxies. These are not promises
25255   /// and function runtimes or property access synchronously block running
25256   /// script waiting to communicate cross process for the host code to run.
25257   /// Accordingly the result may have reliability issues and it is recommended
25258   /// that you use the promise-based asynchronous
25259   /// `window.chrome.webview.hostObjects.{name}` API.
25260   ///
25261   /// Synchronous host object proxies and asynchronous host object proxies may
25262   /// both use a proxy to the same host object.  Remote changes made by one
25263   /// proxy propagates to any other proxy of that same host object whether
25264   /// the other proxies and synchronous or asynchronous.
25265   ///
25266   /// While JavaScript is blocked on a synchronous run to native code, that
25267   /// native code is unable to run back to JavaScript.  Attempts to do so fail
25268   ///  with `HRESULT_FROM_WIN32(ERROR_POSSIBLE_DEADLOCK)`.
25269   ///
25270   /// Host object proxies are JavaScript Proxy objects that intercept all
25271   /// property get, property set, and method invocations. Properties or methods
25272   ///  that are a part of the Function or Object prototype are run locally.
25273   /// Additionally any property or method in the
25274   /// `chrome.webview.hostObjects.options.forceLocalProperties`
25275   /// array are also run locally.  This defaults to including optional methods
25276   /// that have meaning in JavaScript like `toJSON` and `Symbol.toPrimitive`.
25277   /// Add more to the array as required.
25278   ///
25279   /// The `chrome.webview.hostObjects.cleanupSome` method performs a best
25280   /// effort garbage collection on host object proxies.
25281   ///
25282   /// The `chrome.webview.hostObjects.options` object provides the ability to
25283   /// change some functionality of host objects.
25284   ///
25285   /// Options property | Details
25286   /// ---|---
25287   /// `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.
25288   /// `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.
25289   /// `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.
25290   /// `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.
25291   /// `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.
25292   /// `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.
25293   ///
25294   /// Host object proxies additionally have the following methods which run
25295   /// locally.
25296   ///
25297   /// Method name | Details
25298   /// ---|---
25299   ///`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.
25300   ///`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.
25301   ///`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()`.
25302   ///`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()`.
25303   ///`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.
25304   ///
25305   /// All other property and method invocations (other than the above Remote
25306   /// object proxy methods, `forceLocalProperties` list, and properties on
25307   /// Function and Object prototypes) are run remotely.  Asynchronous host
25308   /// object proxies return a promise representing asynchronous completion of
25309   /// remotely invoking the method, or getting the property.  The promise
25310   /// resolves after the remote operations complete and the promises resolve to
25311   ///  the resulting value of the operation.  Synchronous host object proxies
25312   /// work similarly, but block running JavaScript and wait for the remote
25313   /// operation to complete.
25314   ///
25315   /// Setting a property on an asynchronous host object proxy works slightly
25316   /// differently.  The set returns immediately and the return value is the
25317   /// value that is set.  This is a requirement of the JavaScript Proxy object.
25318   /// If you need to asynchronously wait for the property set to complete, use
25319   /// the `setHostProperty` method which returns a promise as described above.
25320   /// Synchronous object property set property synchronously blocks until the
25321   /// property is set.
25322   ///
25323   /// For example, suppose you have a COM object with the following interface.
25324   ///
25325   /// \snippet HostObjectSample.idl AddHostObjectInterface
25326   ///
25327   /// Add an instance of this interface into your JavaScript with
25328   /// `AddHostObjectToScript`.  In this case, name it `sample`.
25329   ///
25330   /// \snippet ScenarioAddHostObject.cpp AddHostObjectToScript
25331   ///
25332   /// In the HTML document, use the COM object using
25333   /// `chrome.webview.hostObjects.sample`.
25334   /// Note that `CoreWebView2.AddHostObjectToScript` only applies to the
25335   /// top-level document and not to frames. To add host objects to frames use
25336   /// `CoreWebView2Frame.AddHostObjectToScript`.
25337   ///
25338   /// \snippet assets\ScenarioAddHostObject.html HostObjectUsage
25339   ///
25340   /// Exposing host objects to script has security risk.  For more information
25341   /// about best practices, navigate to
25342   /// [Best practices for developing secure WebView2 applications](/microsoft-edge/webview2/concepts/security).
25343   HRESULT AddHostObjectToScript(in LPCWSTR name, in VARIANT* object);
25344 
25345   /// Remove the host object specified by the name so that it is no longer
25346   /// accessible from JavaScript code in the WebView.  While new access
25347   /// attempts are denied, if the object is already obtained by JavaScript code
25348   /// in the WebView, the JavaScript code continues to have access to that
25349   /// object.   Run this method for a name that is already removed or never
25350   /// added fails.
25351   HRESULT RemoveHostObjectFromScript(in LPCWSTR name);
25352 
25353   /// Opens the DevTools window for the current document in the WebView. Does
25354   /// nothing if run when the DevTools window is already open.
25355   HRESULT OpenDevToolsWindow();
25356 
25357   /// Add an event handler for the `ContainsFullScreenElementChanged` event.
25358   /// `ContainsFullScreenElementChanged` triggers when the
25359   /// `ContainsFullScreenElement` property changes.  An HTML element inside the
25360   /// WebView may enter fullscreen to the size of the WebView or leave
25361   /// fullscreen.  This event is useful when, for example, a video element
25362   /// requests to go fullscreen.  The listener of
25363   /// `ContainsFullScreenElementChanged` may resize the WebView in response.
25364   ///
25365   /// \snippet AppWindow.cpp ContainsFullScreenElementChanged
25366   HRESULT add_ContainsFullScreenElementChanged(
25367       /+[in]+/ ICoreWebView2ContainsFullScreenElementChangedEventHandler eventHandler,
25368       @("out") EventRegistrationToken* token);
25369 
25370   /// Remove an event handler previously added with
25371   /// `add_ContainsFullScreenElementChanged`.
25372   HRESULT remove_ContainsFullScreenElementChanged(
25373       in EventRegistrationToken token);
25374 
25375   /// Indicates if the WebView contains a fullscreen HTML element.
25376   @(" propget")
25377 	HRESULT get_ContainsFullScreenElement(
25378       @("out, retval") BOOL* containsFullScreenElement);
25379 
25380   /// Add an event handler for the `WebResourceRequested` event.
25381   /// `WebResourceRequested` runs when the WebView is performing a URL request
25382   /// to a matching URL and resource context filter that was added with
25383   /// `AddWebResourceRequestedFilter`.  At least one filter must be added for
25384   /// the event to run.
25385   ///
25386   /// The web resource requested may be blocked until the event handler returns
25387   /// if a deferral is not taken on the event args.  If a deferral is taken,
25388   /// then the web resource requested is blocked until the deferral is
25389   /// completed.
25390   ///
25391   /// If this event is subscribed in the add_NewWindowRequested handler it should be called
25392   /// after the new window is set. For more details see `ICoreWebView2NewWindowRequestedEventArgs::put_NewWindow`.
25393   ///
25394   /// This event is by default raised for file, http, and https URI schemes.
25395   /// This is also raised for registered custom URI schemes. For more details
25396   /// see `ICoreWebView2CustomSchemeRegistration`.
25397   ///
25398   /// \snippet SettingsComponent.cpp WebResourceRequested0
25399   /// \snippet SettingsComponent.cpp WebResourceRequested1
25400   HRESULT add_WebResourceRequested(
25401     /+[in]+/ ICoreWebView2WebResourceRequestedEventHandler eventHandler,
25402     @("out") EventRegistrationToken* token);
25403 
25404   /// Remove an event handler previously added with `add_WebResourceRequested`.
25405   HRESULT remove_WebResourceRequested(
25406       in EventRegistrationToken token);
25407 
25408   /// Adds a URI and resource context filter for the `WebResourceRequested`
25409   /// event.  A web resource request with a resource context that matches this
25410   /// filter's resource context and a URI that matches this filter's URI
25411   /// wildcard string will be raised via the `WebResourceRequested` event.
25412   ///
25413   /// The `uri` parameter value is a wildcard string matched against the URI
25414   /// of the web resource request. This is a glob style
25415   /// wildcard string in which a `*` matches zero or more characters and a `?`
25416   /// matches exactly one character.
25417   /// These wildcard characters can be escaped using a backslash just before
25418   /// the wildcard character in order to represent the literal `*` or `?`.
25419   ///
25420   /// The matching occurs over the URI as a whole string and not limiting
25421   /// wildcard matches to particular parts of the URI.
25422   /// The wildcard filter is compared to the URI after the URI has been
25423   /// normalized, any URI fragment has been removed, and non-ASCII hostnames
25424   /// have been converted to punycode.
25425   ///
25426   /// Specifying a `nullptr` for the uri is equivalent to an empty string which
25427   /// matches no URIs.
25428   ///
25429   /// For more information about resource context filters, navigate to
25430   /// [COREWEBVIEW2_WEB_RESOURCE_CONTEXT](/microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_web_resource_context).
25431   ///
25432   /// | URI Filter String | Request URI | Match | Notes |
25433   /// | ---- | ---- | ---- | ---- |
25434   /// | `*` | `https://contoso.com/a/b/c` | Yes | A single * will match all URIs |
25435   /// | `*://contoso.com/*` | `https://contoso.com/a/b/c` | Yes | Matches everything in contoso.com across all schemes |
25436   /// | `*://contoso.com/*` | `https://example.com/?https://contoso.com/` | Yes | But also matches a URI with just the same text anywhere in the URI |
25437   /// | `example` | `https://contoso.com/example` | No | The filter does not perform partial matches |
25438   /// | `*example` | `https://contoso.com/example` | Yes | The filter matches across URI parts  |
25439   /// | `*example` | `https://contoso.com/path/?example` | Yes | The filter matches across URI parts |
25440   /// | `*example` | `https://contoso.com/path/?query#example` | No | The filter is matched against the URI with no fragment |
25441   /// | `*example` | `https://example` | No | The URI is normalized before filter matching so the actual URI used for comparison is `https://example/` |
25442   /// | `*example/` | `https://example` | Yes | Just like above, but this time the filter ends with a / just like the normalized URI |
25443   /// | `https://xn--qei.example/` | `https://&#x2764;.example/` | Yes | Non-ASCII hostnames are normalized to punycode before wildcard comparison |
25444   /// | `https://&#x2764;.example/` | `https://xn--qei.example/` | No | Non-ASCII hostnames are normalized to punycode before wildcard comparison |
25445   HRESULT AddWebResourceRequestedFilter(
25446     in LPCWSTR /*const*/ uri,
25447     in COREWEBVIEW2_WEB_RESOURCE_CONTEXT /*const*/ resourceContext);
25448 
25449   /// Removes a matching WebResource filter that was previously added for the
25450   /// `WebResourceRequested` event.  If the same filter was added multiple
25451   /// times, then it must be removed as many times as it was added for the
25452   /// removal to be effective.  Returns `E_INVALIDARG` for a filter that was
25453   /// never added.
25454   HRESULT RemoveWebResourceRequestedFilter(
25455     in LPCWSTR /*const*/ uri,
25456     in COREWEBVIEW2_WEB_RESOURCE_CONTEXT /*const*/ resourceContext);
25457 
25458   /// Add an event handler for the `WindowCloseRequested` event.
25459   /// `WindowCloseRequested` triggers when content inside the WebView
25460   /// requested to close the window, such as after `window.close` is run.  The
25461   /// app should close the WebView and related app window if that makes sense
25462   /// to the app.
25463   ///
25464   /// \snippet AppWindow.cpp WindowCloseRequested
25465   HRESULT add_WindowCloseRequested(
25466       /+[in]+/ ICoreWebView2WindowCloseRequestedEventHandler eventHandler,
25467       @("out") EventRegistrationToken* token);
25468 
25469   /// Remove an event handler previously added with `add_WindowCloseRequested`.
25470   HRESULT remove_WindowCloseRequested(
25471       in EventRegistrationToken token);
25472 }
25473 
25474 /// A continuation of the ICoreWebView2 interface.
25475 const GUID IID_ICoreWebView2_2 = ICoreWebView2_2.iid;
25476 
25477 interface ICoreWebView2_2 : ICoreWebView2
25478 {
25479     static const GUID iid = { 0x9E8F0CF8,0xE670,0x4B5E,[ 0xB2,0xBC,0x73,0xE0,0x61,0xE3,0x18,0x4C ] };
25480   /// Add an event handler for the WebResourceResponseReceived event.
25481   /// WebResourceResponseReceived is raised when the WebView receives the
25482   /// response for a request for a web resource (any URI resolution performed by
25483   /// the WebView; such as HTTP/HTTPS, file and data requests from redirects,
25484   /// navigations, declarations in HTML, implicit favicon lookups, and fetch API
25485   /// usage in the document). The host app can use this event to view the actual
25486   /// request and response for a web resource. There is no guarantee about the
25487   /// order in which the WebView processes the response and the host app's
25488   /// handler runs. The app's handler will not block the WebView from processing
25489   /// the response.
25490   /// \snippet ScenarioAuthentication.cpp WebResourceResponseReceived
25491   HRESULT add_WebResourceResponseReceived(
25492     /+[in]+/ ICoreWebView2WebResourceResponseReceivedEventHandler eventHandler,
25493     @("out") EventRegistrationToken* token);
25494   /// Remove an event handler previously added with
25495   /// add_WebResourceResponseReceived.
25496   HRESULT remove_WebResourceResponseReceived(
25497     in EventRegistrationToken token);
25498 
25499   /// Navigates using a constructed WebResourceRequest object. This lets you
25500   /// provide post data or additional request headers during navigation.
25501   /// The headers in the WebResourceRequest override headers
25502   /// added by WebView2 runtime except for Cookie headers.
25503   /// Method can only be either "GET" or "POST". Provided post data will only
25504   /// be sent only if the method is "POST" and the uri scheme is HTTP(S).
25505   /// \snippet ScenarioNavigateWithWebResourceRequest.cpp NavigateWithWebResourceRequest
25506   HRESULT NavigateWithWebResourceRequest(/+[in]+/ ICoreWebView2WebResourceRequest request);
25507 
25508   /// Add an event handler for the DOMContentLoaded event.
25509   /// DOMContentLoaded is raised when the initial html document has been parsed.
25510   /// This aligns with the document's DOMContentLoaded event in html.
25511   ///
25512   /// \snippet ScenarioDOMContentLoaded.cpp DOMContentLoaded
25513   HRESULT add_DOMContentLoaded(
25514       /+[in]+/ ICoreWebView2DOMContentLoadedEventHandler eventHandler,
25515       @("out") EventRegistrationToken* token);
25516 
25517   /// Remove an event handler previously added with add_DOMContentLoaded.
25518   HRESULT remove_DOMContentLoaded(
25519       in EventRegistrationToken token);
25520 
25521   /// Gets the cookie manager object associated with this ICoreWebView2.
25522   /// See ICoreWebView2CookieManager.
25523   ///
25524   /// \snippet ScenarioCookieManagement.cpp CookieManager
25525   @(" propget")
25526 	HRESULT get_CookieManager(@("out, retval") ICoreWebView2CookieManager * cookieManager);
25527 
25528   /// Exposes the CoreWebView2Environment used to create this CoreWebView2.
25529   @(" propget")
25530 	HRESULT get_Environment(@("out, retval") ICoreWebView2Environment * environment);
25531 }
25532 
25533 /// A continuation of the ICoreWebView2_2 interface.
25534 const GUID IID_ICoreWebView2_3 = ICoreWebView2_3.iid;
25535 
25536 interface ICoreWebView2_3 : ICoreWebView2_2
25537 {
25538     static const GUID iid = { 0xA0D6DF20,0x3B92,0x416D,[ 0xAA,0x0C,0x43,0x7A,0x9C,0x72,0x78,0x57 ] };
25539   /// An app may call the `TrySuspend` API to have the WebView2 consume less memory.
25540   /// This is useful when a Win32 app becomes invisible, or when a Universal Windows
25541   /// Platform app is being suspended, during the suspended event handler before completing
25542   /// the suspended event.
25543   /// The CoreWebView2Controller's IsVisible property must be false when the API is called.
25544   /// Otherwise, the API fails with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
25545   /// Suspending is similar to putting a tab to sleep in the Edge browser. Suspending pauses
25546   /// WebView script timers and animations, minimizes CPU usage for the associated
25547   /// browser renderer process and allows the operating system to reuse the memory that was
25548   /// used by the renderer process for other processes.
25549   /// Note that Suspend is best effort and considered completed successfully once the request
25550   /// is sent to browser renderer process. If there is a running script, the script will continue
25551   /// to run and the renderer process will be suspended after that script is done.
25552   /// See [Sleeping Tabs FAQ](https://techcommunity.microsoft.com/t5/articles/sleeping-tabs-faq/m-p/1705434)
25553   /// for conditions that might prevent WebView from being suspended. In those situations,
25554   /// the completed handler will be invoked with isSuccessful as false and errorCode as S_OK.
25555   /// The WebView will be automatically resumed when it becomes visible. Therefore, the
25556   /// app normally does not have to call `Resume` explicitly.
25557   /// The app can call `Resume` and then `TrySuspend` periodically for an invisible WebView so that
25558   /// the invisible WebView can sync up with latest data and the page ready to show fresh content
25559   /// when it becomes visible.
25560   /// All WebView APIs can still be accessed when a WebView is suspended. Some APIs like Navigate
25561   /// will auto resume the WebView. To avoid unexpected auto resume, check `IsSuspended` property
25562   /// before calling APIs that might change WebView state.
25563   ///
25564   /// \snippet ViewComponent.cpp ToggleIsVisibleOnMinimize
25565   ///
25566   /// \snippet ViewComponent.cpp Suspend
25567   ///
25568   HRESULT TrySuspend(/+[in]+/ ICoreWebView2TrySuspendCompletedHandler handler);
25569 
25570   /// Resumes the WebView so that it resumes activities on the web page.
25571   /// This API can be called while the WebView2 controller is invisible.
25572   /// The app can interact with the WebView immediately after `Resume`.
25573   /// WebView will be automatically resumed when it becomes visible.
25574   ///
25575   /// \snippet ViewComponent.cpp ToggleIsVisibleOnMinimize
25576   ///
25577   /// \snippet ViewComponent.cpp Resume
25578   ///
25579   HRESULT Resume();
25580 
25581   /// Whether WebView is suspended.
25582   /// `TRUE` when WebView is suspended, from the time when TrySuspend has completed
25583   ///  successfully until WebView is resumed.
25584   @(" propget")
25585 	HRESULT get_IsSuspended(@("out, retval") BOOL* isSuspended);
25586 
25587   /// Sets a mapping between a virtual host name and a folder path to make available to web sites
25588   /// via that host name.
25589   ///
25590   /// After setting the mapping, documents loaded in the WebView can use HTTP or HTTPS URLs at
25591   /// the specified host name specified by hostName to access files in the local folder specified
25592   /// by folderPath.
25593   ///
25594   /// This mapping applies to both top-level document and iframe navigations as well as subresource
25595   /// references from a document. This also applies to web workers including dedicated/shared worker
25596   /// and service worker, for loading either worker scripts or subresources
25597   /// (importScripts(), fetch(), XHR, etc.) issued from within a worker.
25598   /// For virtual host mapping to work with service worker, please keep the virtual host name
25599   /// mappings consistent among all WebViews sharing the same browser instance. As service worker
25600   /// works independently of WebViews, we merge mappings from all WebViews when resolving virtual
25601   /// host name, inconsistent mappings between WebViews would lead unexpected behavior.
25602   ///
25603   /// Due to a current implementation limitation, media files accessed using virtual host name can be
25604   /// very slow to load.
25605   /// As the resource loaders for the current page might have already been created and running,
25606   /// changes to the mapping might not be applied to the current page and a reload of the page is
25607   /// needed to apply the new mapping.
25608   ///
25609   /// Both absolute and relative paths are supported for folderPath. Relative paths are interpreted
25610   /// as relative to the folder where the exe of the app is in.
25611   ///
25612   /// Note that the folderPath length must not exceed the Windows MAX_PATH limit.
25613   ///
25614   /// accessKind specifies the level of access to resources under the virtual host from other sites.
25615   ///
25616   /// For example, after calling
25617   /// ```cpp
25618   ///    SetVirtualHostNameToFolderMapping(
25619   ///        L"appassets.example", L"assets",
25620   ///        COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY);
25621   /// ```
25622   /// navigating to `https://appassets.example/my-local-file.html` will
25623   /// show the content from my-local-file.html in the assets subfolder located on disk under
25624   /// the same path as the app's executable file.
25625   ///
25626   /// DOM elements that want to reference local files will have their host reference virtual host in the source.
25627   /// If there are multiple folders being used, define one unique virtual host per folder.
25628   /// For example, you can embed a local image like this
25629   /// ```cpp
25630   ///    WCHAR c_navString[] = L"<img src=\"http://appassets.example/wv2.png\"/>";
25631   ///    m_webView->NavigateToString(c_navString);
25632   /// ```
25633   /// The example above shows the image wv2.png by resolving the folder mapping above.
25634   ///
25635   /// You should typically choose virtual host names that are never used by real sites.
25636   /// If you own a domain such as example.com, another option is to use a subdomain reserved for
25637   /// the app (like my-app.example.com).
25638   ///
25639   /// [RFC 6761](https://tools.ietf.org/html/rfc6761) has reserved several special-use domain
25640   /// names that are guaranteed to not be used by real sites (for example, .example, .test, and
25641   /// .invalid.)
25642   ///
25643   /// Note that using `.local` as the top-level domain name will work but can cause a delay
25644   /// during navigations. You should avoid using `.local` if you can.
25645   ///
25646   /// Apps should use distinct domain names when mapping folder from different sources that
25647   /// should be isolated from each other. For instance, the app might use app-file.example for
25648   /// files that ship as part of the app, and book1.example might be used for files containing
25649   /// books from a less trusted source that were previously downloaded and saved to the disk by
25650   /// the app.
25651   ///
25652   /// The host name used in the APIs is canonicalized using Chromium's host name parsing logic
25653   /// before being used internally. For more information see [HTML5 2.6 URLs](https://dev.w3.org/html5/spec-LC/urls.html).
25654   ///
25655   /// All host names that are canonicalized to the same string are considered identical.
25656   /// For example, `EXAMPLE.COM` and `example.com` are treated as the same host name.
25657   /// An international host name and its Punycode-encoded host name are considered the same host
25658   /// name. There is no DNS resolution for host name and the trailing '.' is not normalized as
25659   /// part of canonicalization.
25660   ///
25661   /// Therefore `example.com` and `example.com.` are treated as different host names. Similarly,
25662   /// `virtual-host-name` and `virtual-host-name.example.com` are treated as different host names
25663   /// even if the machine has a DNS suffix of `example.com`.
25664   ///
25665   /// Specify the minimal cross-origin access necessary to run the app. If there is not a need to
25666   /// access local resources from other origins, use COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY.
25667   ///
25668   /// \snippet AppWindow.cpp AddVirtualHostNameToFolderMapping
25669   ///
25670   /// \snippet AppWindow.cpp LocalUrlUsage
25671   HRESULT SetVirtualHostNameToFolderMapping(
25672       in LPCWSTR hostName,
25673       in LPCWSTR folderPath,
25674       in COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND accessKind);
25675 
25676   /// Clears a host name mapping for local folder that was added by `SetVirtualHostNameToFolderMapping`.
25677   HRESULT ClearVirtualHostNameToFolderMapping(
25678       in LPCWSTR hostName);
25679 }
25680 
25681 /// A continuation of the ICoreWebView2_3 interface to support FrameCreated and
25682 /// DownloadStarting events.
25683 const GUID IID_ICoreWebView2_4 = ICoreWebView2_4.iid;
25684 
25685 interface ICoreWebView2_4 : ICoreWebView2_3
25686 {
25687     static const GUID iid = { 0x20d02d59,0x6df2,0x42dc,[ 0xbd,0x06,0xf9,0x8a,0x69,0x4b,0x13,0x02 ] };
25688   /// Raised when a new iframe is created.
25689   /// Handle this event to get access to ICoreWebView2Frame objects.
25690   /// Use ICoreWebView2Frame.add_Destroyed to listen for when this iframe goes
25691   /// away.
25692   HRESULT add_FrameCreated(
25693       /+[in]+/ ICoreWebView2FrameCreatedEventHandler  eventHandler,
25694       @("out") EventRegistrationToken * token);
25695 
25696   /// Remove an event handler previously added with add_FrameCreated.
25697   HRESULT remove_FrameCreated(in EventRegistrationToken token);
25698 
25699   /// Add an event handler for the `DownloadStarting` event. This event is
25700   /// raised when a download has begun, blocking the default download dialog,
25701   /// but not blocking the progress of the download.
25702   ///
25703   /// The host can choose to cancel a download, change the result file path,
25704   /// and hide the default download dialog.
25705   /// If the host chooses to cancel the download, the download is not saved, no
25706   /// dialog is shown, and the state is changed to
25707   /// COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED with interrupt reason
25708   /// COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED. Otherwise, the
25709   /// download is saved to the default path after the event completes,
25710   /// and default download dialog is shown if the host did not choose to hide it.
25711   /// The host can change the visibility of the download dialog using the
25712   /// `Handled` property. If the event is not handled, downloads complete
25713   /// normally with the default dialog shown.
25714   ///
25715   /// \snippet ScenarioCustomDownloadExperience.cpp DownloadStarting
25716   HRESULT add_DownloadStarting(
25717     /+[in]+/ ICoreWebView2DownloadStartingEventHandler eventHandler,
25718     @("out") EventRegistrationToken* token);
25719 
25720   /// Remove an event handler previously added with `add_DownloadStarting`.
25721   HRESULT remove_DownloadStarting(
25722       in EventRegistrationToken token);
25723 }
25724 
25725 /// A continuation of the ICoreWebView2_4 interface to support ClientCertificateRequested
25726 /// event.
25727 const GUID IID_ICoreWebView2_5 = ICoreWebView2_5.iid;
25728 
25729 interface ICoreWebView2_5 : ICoreWebView2_4
25730 {
25731     static const GUID iid = { 0xbedb11b8,0xd63c,0x11eb,[ 0xb8,0xbc,0x02,0x42,0xac,0x13,0x00,0x03 ] };
25732   /// Add an event handler for the ClientCertificateRequested event.
25733   /// The ClientCertificateRequested event is raised when the WebView2
25734   /// is making a request to an HTTP server that needs a client certificate
25735   /// for HTTP authentication.
25736   /// Read more about HTTP client certificates at
25737   /// [RFC 8446 The Transport Layer Security (TLS) Protocol Version 1.3](https://tools.ietf.org/html/rfc8446).
25738   ///
25739   /// With this event you have several options for responding to client certificate requests:
25740   ///
25741   /// Scenario                                                   | Handled | Cancel | SelectedCertificate
25742   /// ---------------------------------------------------------- | ------- | ------ | -------------------
25743   /// Respond to server with a certificate                       | True    | False  | MutuallyTrustedCertificate value
25744   /// Respond to server without certificate                      | True    | False  | null
25745   /// Display default client certificate selection dialog prompt | False   | False  | n/a
25746   /// Cancel the request                                         | n/a     | True   | n/a
25747   ///
25748   /// If you don't handle the event, WebView2 will
25749   /// show the default client certificate selection dialog prompt to user.
25750   ///
25751   /// \snippet SettingsComponent.cpp ClientCertificateRequested1
25752   /// \snippet ScenarioClientCertificateRequested.cpp ClientCertificateRequested2
25753   HRESULT add_ClientCertificateRequested(
25754       /+[in]+/ ICoreWebView2ClientCertificateRequestedEventHandler eventHandler,
25755       @("out") EventRegistrationToken* token);
25756 
25757   /// Remove an event handler previously added with add_ClientCertificateRequested.
25758   HRESULT remove_ClientCertificateRequested(in EventRegistrationToken token);
25759 }
25760 
25761 /// This interface is an extension of `ICoreWebView2_5` that manages opening
25762 /// the browser task manager window.
25763 const GUID IID_ICoreWebView2_6 = ICoreWebView2_6.iid;
25764 
25765 interface ICoreWebView2_6 : ICoreWebView2_5
25766 {
25767     static const GUID iid = { 0x499aadac,0xd92c,0x4589,[ 0x8a,0x75,0x11,0x1b,0xfc,0x16,0x77,0x95 ] };
25768   /// Opens the Browser Task Manager view as a new window in the foreground.
25769   /// If the Browser Task Manager is already open, this will bring it into
25770   /// the foreground. WebView2 currently blocks the Shift+Esc shortcut for
25771   /// opening the task manager. An end user can open the browser task manager
25772   /// manually via the `Browser task manager` entry of the DevTools window's
25773   /// title bar's context menu.
25774   HRESULT OpenTaskManagerWindow();
25775 }
25776 
25777 /// This interface is an extension of `ICoreWebView2_6` that supports printing
25778 /// to PDF.
25779 const GUID IID_ICoreWebView2_7 = ICoreWebView2_7.iid;
25780 
25781 interface ICoreWebView2_7 : ICoreWebView2_6
25782 {
25783     static const GUID iid = { 0x79c24d83,0x09a3,0x45ae,[ 0x94,0x18,0x48,0x7f,0x32,0xa5,0x87,0x40 ] };
25784   /// Print the current page to PDF asynchronously with the provided settings.
25785   /// See `ICoreWebView2PrintSettings` for description of settings. Passing
25786   /// nullptr for `printSettings` results in default print settings used.
25787   ///
25788   /// Use `resultFilePath` to specify the path to the PDF file. The host should
25789   /// provide an absolute path, including file name. If the path
25790   /// points to an existing file, the file will be overwritten. If the path is
25791   /// not valid, the method fails with `E_INVALIDARG`.
25792   ///
25793   /// The async `PrintToPdf` operation completes when the data has been written
25794   /// to the PDF file. At this time the
25795   /// `ICoreWebView2PrintToPdfCompletedHandler` is invoked. If the
25796   /// application exits before printing is complete, the file is not saved.
25797   /// Only one `Printing` operation can be in progress at a time. If
25798   /// `PrintToPdf` is called while a `PrintToPdf` or `PrintToPdfStream` or `Print` or
25799   /// `ShowPrintUI` job is in progress, the completed handler is immediately invoked
25800   /// with `isSuccessful` set to FALSE.
25801   ///
25802   /// \snippet FileComponent.cpp PrintToPdf
25803   HRESULT PrintToPdf(
25804     in LPCWSTR resultFilePath,
25805     /+[in]+/ ICoreWebView2PrintSettings printSettings,
25806     /+[in]+/ ICoreWebView2PrintToPdfCompletedHandler handler);
25807 }
25808 
25809 /// This interface is an extension of `ICoreWebView2_7` that supports media features.
25810 const GUID IID_ICoreWebView2_8 = ICoreWebView2_8.iid;
25811 
25812 interface ICoreWebView2_8 : ICoreWebView2_7
25813 {
25814     static const GUID iid = { 0xE9632730,0x6E1E,0x43AB,[ 0xB7,0xB8,0x7B,0x2C,0x9E,0x62,0xE0,0x94 ] };
25815   /// Adds an event handler for the `IsMutedChanged` event.
25816   /// `IsMutedChanged` is raised when the IsMuted property changes value.
25817   ///
25818   /// \snippet AudioComponent.cpp IsMutedChanged
25819   HRESULT add_IsMutedChanged(
25820       /+[in]+/ ICoreWebView2IsMutedChangedEventHandler eventHandler,
25821       @("out") EventRegistrationToken* token);
25822 
25823   /// Remove an event handler previously added with `add_IsMutedChanged`.
25824   HRESULT remove_IsMutedChanged(
25825       in EventRegistrationToken token);
25826 
25827   /// Indicates whether all audio output from this CoreWebView2 is muted or not.
25828   ///
25829   /// \snippet AudioComponent.cpp ToggleIsMuted
25830   @(" propget")
25831 	HRESULT get_IsMuted(@("out, retval") BOOL* value);
25832 
25833   /// Sets the `IsMuted` property.
25834   ///
25835   /// \snippet AudioComponent.cpp ToggleIsMuted
25836   @(" propput")
25837 	HRESULT put_IsMuted(in BOOL value);
25838 
25839   /// Adds an event handler for the `IsDocumentPlayingAudioChanged` event.
25840   /// `IsDocumentPlayingAudioChanged` is raised when the IsDocumentPlayingAudio property changes value.
25841   ///
25842   /// \snippet AudioComponent.cpp IsDocumentPlayingAudioChanged
25843   HRESULT add_IsDocumentPlayingAudioChanged(
25844       /+[in]+/ ICoreWebView2IsDocumentPlayingAudioChangedEventHandler eventHandler,
25845       @("out") EventRegistrationToken* token);
25846 
25847   /// Remove an event handler previously added with `add_IsDocumentPlayingAudioChanged`.
25848   HRESULT remove_IsDocumentPlayingAudioChanged(
25849       in EventRegistrationToken token);
25850 
25851   /// Indicates whether any audio output from this CoreWebView2 is playing.
25852   /// This property will be true if audio is playing even if IsMuted is true.
25853   ///
25854   /// \snippet AudioComponent.cpp IsDocumentPlayingAudio
25855   @(" propget")
25856 	HRESULT get_IsDocumentPlayingAudio(@("out, retval") BOOL* value);
25857 }
25858 
25859 /// This interface is an extension of `ICoreWebView2_8` that default download
25860 /// dialog positioning and anchoring.
25861 const GUID IID_ICoreWebView2_9 = ICoreWebView2_9.iid;
25862 
25863 interface ICoreWebView2_9 : ICoreWebView2_8
25864 {
25865     static const GUID iid = { 0x4d7b2eab,0x9fdc,0x468d,[ 0xb9,0x98,0xa9,0x26,0x0b,0x5e,0xd6,0x51 ] };
25866   /// Raised when the `IsDefaultDownloadDialogOpen` property changes. This event
25867   /// comes after the `DownloadStarting` event. Setting the `Handled` property
25868   /// on the `DownloadStartingEventArgs` disables the default download dialog
25869   /// and ensures that this event is never raised.
25870   HRESULT add_IsDefaultDownloadDialogOpenChanged(
25871       /+[in]+/ ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler handler,
25872       @("out") EventRegistrationToken* token);
25873 
25874   /// Remove an event handler previously added with
25875   /// `add_IsDefaultDownloadDialogOpenChanged`.
25876   HRESULT remove_IsDefaultDownloadDialogOpenChanged(
25877       in EventRegistrationToken token);
25878 
25879   /// `TRUE` if the default download dialog is currently open. The value of this
25880   /// property changes only when the default download dialog is explicitly
25881   /// opened or closed. Hiding the WebView implicitly hides the dialog, but does
25882   /// not change the value of this property.
25883   @(" propget")
25884 	HRESULT get_IsDefaultDownloadDialogOpen(@("out, retval") BOOL* value);
25885 
25886   /// Open the default download dialog. If the dialog is opened before there
25887   /// are recent downloads, the dialog shows all past downloads for the
25888   /// current profile. Otherwise, the dialog shows only the recent downloads
25889   /// with a "See more" button for past downloads. Calling this method raises
25890   /// the `IsDefaultDownloadDialogOpenChanged` event if the dialog was closed.
25891   /// No effect if the dialog is already open.
25892   ///
25893   /// \snippet ViewComponent.cpp ToggleDefaultDownloadDialog
25894   HRESULT OpenDefaultDownloadDialog();
25895 
25896   /// Close the default download dialog. Calling this method raises the
25897   /// `IsDefaultDownloadDialogOpenChanged` event if the dialog was open. No
25898   /// effect if the dialog is already closed.
25899   HRESULT CloseDefaultDownloadDialog();
25900 
25901   /// Get the default download dialog corner alignment.
25902   @(" propget")
25903 	HRESULT get_DefaultDownloadDialogCornerAlignment(
25904       @("out, retval") COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT* value);
25905 
25906   /// Set the default download dialog corner alignment. The dialog can be
25907   /// aligned to any of the WebView corners (see
25908   /// COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT). When the WebView
25909   /// or dialog changes size, the dialog keeps its position relative to the
25910   /// corner. The dialog may become partially or completely outside of the
25911   /// WebView bounds if the WebView is small enough. Set the margin relative to
25912   /// the corner with the `DefaultDownloadDialogMargin` property. The corner
25913   /// alignment and margin should be set during initialization to ensure that
25914   /// they are correctly applied when the layout is first computed, otherwise
25915   /// they will not take effect until the next time the WebView position or size
25916   /// is updated.
25917   ///
25918   /// \snippet ViewComponent.cpp SetDefaultDownloadDialogPosition
25919   @(" propput")
25920 	HRESULT put_DefaultDownloadDialogCornerAlignment(
25921       in COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT value);
25922 
25923   /// Get the default download dialog margin.
25924   @(" propget")
25925 	HRESULT get_DefaultDownloadDialogMargin(@("out, retval") POINT* value);
25926 
25927   /// Set the default download dialog margin relative to the WebView corner
25928   /// specified by `DefaultDownloadDialogCornerAlignment`. The margin is a
25929   /// point that describes the vertical and horizontal distances between the
25930   /// chosen WebView corner and the default download dialog corner nearest to
25931   /// it. Positive values move the dialog towards the center of the WebView from
25932   /// the chosen WebView corner, and negative values move the dialog away from
25933   /// it. Use (0, 0) to align the dialog to the WebView corner with no margin.
25934   /// The corner alignment and margin should be set during initialization to
25935   /// ensure that they are correctly applied when the layout is first computed,
25936   /// otherwise they will not take effect until the next time the WebView
25937   /// position or size is updated.
25938   @(" propput")
25939 	HRESULT put_DefaultDownloadDialogMargin(in POINT value);
25940 }
25941 
25942 /// This interface is an extension of `ICoreWebView2_9` that supports
25943 /// BasicAuthenticationRequested event.
25944 const GUID IID_ICoreWebView2_10 = ICoreWebView2_10.iid;
25945 
25946 interface ICoreWebView2_10 : ICoreWebView2_9
25947 {
25948     static const GUID iid = { 0xb1690564,0x6f5a,0x4983,[ 0x8e,0x48,0x31,0xd1,0x14,0x3f,0xec,0xdb ] };
25949   /// Add an event handler for the BasicAuthenticationRequested event.
25950   /// BasicAuthenticationRequested event is raised when WebView encounters a
25951   /// Basic HTTP Authentication request as described in
25952   /// https://developer.mozilla.org/docs/Web/HTTP/Authentication, a Digest
25953   /// HTTP Authentication request as described in
25954   /// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization#digest,
25955   /// an NTLM authentication or a Proxy Authentication request.
25956   ///
25957   /// The host can provide a response with credentials for the authentication or
25958   /// cancel the request. If the host sets the Cancel property to false but does not
25959   /// provide either UserName or Password properties on the Response property, then
25960   /// WebView2 will show the default authentication challenge dialog prompt to
25961   /// the user.
25962   ///
25963   /// \snippet ScenarioAuthentication.cpp BasicAuthenticationRequested
25964   HRESULT add_BasicAuthenticationRequested(
25965       /+[in]+/ ICoreWebView2BasicAuthenticationRequestedEventHandler eventHandler,
25966       @("out") EventRegistrationToken* token);
25967 
25968   /// Remove an event handler previously added with add_BasicAuthenticationRequested.
25969   HRESULT remove_BasicAuthenticationRequested(
25970       in EventRegistrationToken token);
25971 }
25972 
25973 /// This interface is an extension of `ICoreWebView2_10` that supports sessionId
25974 /// for CDP method calls and ContextMenuRequested event.
25975 const GUID IID_ICoreWebView2_11 = ICoreWebView2_11.iid;
25976 
25977 interface ICoreWebView2_11 : ICoreWebView2_10
25978 {
25979     static const GUID iid = { 0x0be78e56,0xc193,0x4051,[ 0xb9,0x43,0x23,0xb4,0x60,0xc0,0x8b,0xdb ] };
25980   /// Runs an asynchronous `DevToolsProtocol` method for a specific session of
25981   /// an attached target.
25982   /// There could be multiple `DevToolsProtocol` targets in a WebView.
25983   /// Besides the top level page, iframes from different origin and web workers
25984   /// are also separate targets. Attaching to these targets allows interaction with them.
25985   /// When the DevToolsProtocol is attached to a target, the connection is identified
25986   /// by a sessionId.
25987   /// To use this API, you must set the `flatten` parameter to true when calling
25988   /// `Target.attachToTarget` or `Target.setAutoAttach` `DevToolsProtocol` method.
25989   /// Using `Target.setAutoAttach` is recommended as that would allow you to attach
25990   /// to dedicated worker targets, which are not discoverable via other APIs like
25991   /// `Target.getTargets`.
25992   /// For more information about targets and sessions, navigate to
25993   /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot/Target).
25994   /// For more information about available methods, navigate to
25995   /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot)
25996   /// The `sessionId` parameter is the sessionId for an attached target.
25997   /// nullptr or empty string is treated as the session for the default target for the top page.
25998   /// The `methodName` parameter is the full name of the method in the
25999   /// `{domain}.{method}` format.  The `parametersAsJson` parameter is a JSON
26000   /// formatted string containing the parameters for the corresponding method.
26001   /// The `Invoke` method of the `handler` is run when the method
26002   /// asynchronously completes.  `Invoke` is run with the return object of the
26003   /// method as a JSON string.  This function returns E_INVALIDARG if the `methodName` is
26004   /// unknown or the `parametersAsJson` has an error.  In the case of such an error, the
26005   /// `returnObjectAsJson` parameter of the handler will include information
26006   /// about the error.
26007   ///
26008   /// \snippet ScriptComponent.cpp DevToolsProtocolMethodMultiSession
26009   ///
26010   /// \snippet ScriptComponent.cpp CallDevToolsProtocolMethodForSession
26011   HRESULT CallDevToolsProtocolMethodForSession(
26012       in LPCWSTR sessionId,
26013       in LPCWSTR methodName,
26014       in LPCWSTR parametersAsJson,
26015       /+[in]+/ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler handler);
26016 
26017   /// Add an event handler for the `ContextMenuRequested` event.
26018   /// `ContextMenuRequested` event is raised when a context menu is requested by the user
26019   /// and the content inside WebView hasn't disabled context menus.
26020   /// The host has the option to create their own context menu with the information provided in
26021   /// the event or can add items to or remove items from WebView context menu.
26022   /// If the host doesn't handle the event, WebView will display the default context menu.
26023   ///
26024   /// \snippet SettingsComponent.cpp EnableCustomMenu
26025   HRESULT add_ContextMenuRequested(
26026       /+[in]+/ ICoreWebView2ContextMenuRequestedEventHandler eventHandler,
26027       @("out") EventRegistrationToken* token);
26028 
26029   /// Remove an event handler previously added with `add_ContextMenuRequested`.
26030   HRESULT remove_ContextMenuRequested(
26031       in EventRegistrationToken token);
26032 }
26033 
26034 /// This interface is an extension of `ICoreWebView2_11` that supports
26035 /// StatusBarTextChanged event.
26036 const GUID IID_ICoreWebView2_12 = ICoreWebView2_12.iid;
26037 
26038 interface ICoreWebView2_12 : ICoreWebView2_11
26039 {
26040     static const GUID iid = { 0x35D69927,0xBCFA,0x4566,[ 0x93,0x49,0x6B,0x3E,0x0D,0x15,0x4C,0xAC ] };
26041   /// Add an event handler for the `StatusBarTextChanged` event.
26042   /// `StatusBarTextChanged` fires when the WebView is showing a status message,
26043   /// a URL, or an empty string (an indication to hide the status bar).
26044   /// \snippet SettingsComponent.cpp StatusBarTextChanged
26045   HRESULT add_StatusBarTextChanged(
26046       /+[in]+/ ICoreWebView2StatusBarTextChangedEventHandler eventHandler,
26047       @("out") EventRegistrationToken* token);
26048 
26049   /// Remove an event handler previously added with `add_StatusBarTextChanged`.
26050   HRESULT remove_StatusBarTextChanged(in EventRegistrationToken token);
26051 
26052   /// The status message text.
26053   ///
26054   /// The caller must free the returned string with `CoTaskMemFree`.  See
26055   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
26056   @(" propget")
26057 	HRESULT get_StatusBarText(@("out, retval") LPWSTR* value);
26058 }
26059 
26060 /// This interface is an extension of `ICoreWebView2_12` that supports Profile
26061 /// API.
26062 const GUID IID_ICoreWebView2_13 = ICoreWebView2_13.iid;
26063 
26064 interface ICoreWebView2_13 : ICoreWebView2_12
26065 {
26066     static const GUID iid = { 0xF75F09A8,0x667E,0x4983,[ 0x88,0xD6,0xC8,0x77,0x3F,0x31,0x5E,0x84 ] };
26067   /// The associated `ICoreWebView2Profile` object. If this CoreWebView2 was created with a
26068   /// CoreWebView2ControllerOptions, the CoreWebView2Profile will match those specified options.
26069   /// Otherwise if this CoreWebView2 was created without a CoreWebView2ControllerOptions, then
26070   /// this will be the default CoreWebView2Profile for the corresponding CoreWebView2Environment.
26071   ///
26072   /// \snippet AppWindow.cpp CoreWebView2Profile
26073   @(" propget")
26074 	HRESULT get_Profile(@("out, retval") ICoreWebView2Profile * value);
26075 }
26076 
26077 /// This interface is an extension of `ICoreWebView2_13` that adds
26078 /// ServerCertificate support.
26079 const GUID IID_ICoreWebView2_14 = ICoreWebView2_14.iid;
26080 
26081 interface ICoreWebView2_14 : ICoreWebView2_13
26082 {
26083     static const GUID iid = { 0x6DAA4F10,0x4A90,0x4753,[ 0x88,0x98,0x77,0xC5,0xDF,0x53,0x41,0x65 ] };
26084   /// Add an event handler for the ServerCertificateErrorDetected event.
26085   /// The ServerCertificateErrorDetected event is raised when the WebView2
26086   /// cannot verify server's digital certificate while loading a web page.
26087   ///
26088   /// This event will raise for all web resources and follows the `WebResourceRequested` event.
26089   ///
26090   /// If you don't handle the event, WebView2 will show the default TLS interstitial error page to the user
26091   /// for navigations, and for non-navigations the web request is cancelled.
26092   ///
26093   /// Note that WebView2 before raising `ServerCertificateErrorDetected` raises a `NavigationCompleted` event
26094   /// with `IsSuccess` as FALSE and any of the below WebErrorStatuses that indicate a certificate failure.
26095   ///
26096   /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT
26097   /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED
26098   /// - COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS
26099   /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED
26100   /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID
26101   ///
26102   /// For more details see `ICoreWebView2NavigationCompletedEventArgs::get_IsSuccess` and handle
26103   /// ServerCertificateErrorDetected event or show the default TLS interstitial error page to the user
26104   /// according to the app needs.
26105   ///
26106   /// WebView2 caches the response when action is `COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_ALWAYS_ALLOW`
26107   /// for the RequestUri's host and the server certificate in the session and the `ServerCertificateErrorDetected`
26108   /// event won't be raised again.
26109   ///
26110   /// To raise the event again you must clear the cache using `ClearServerCertificateErrorActions`.
26111   ///
26112   /// \snippet SettingsComponent.cpp ServerCertificateErrorDetected1
26113   HRESULT add_ServerCertificateErrorDetected(
26114       /+[in]+/ ICoreWebView2ServerCertificateErrorDetectedEventHandler
26115           eventHandler,
26116       @("out") EventRegistrationToken* token);
26117   /// Remove an event handler previously added with add_ServerCertificateErrorDetected.
26118   HRESULT remove_ServerCertificateErrorDetected(in EventRegistrationToken token);
26119 
26120   /// Clears all cached decisions to proceed with TLS certificate errors from the
26121   /// ServerCertificateErrorDetected event for all WebView2's sharing the same session.
26122   HRESULT ClearServerCertificateErrorActions(
26123       /+[in]+/ ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler
26124       handler);
26125 }
26126 
26127 /// Receives `StatusBarTextChanged` events.
26128 const GUID IID_ICoreWebView2StatusBarTextChangedEventHandler = ICoreWebView2StatusBarTextChangedEventHandler.iid;
26129 
26130 interface ICoreWebView2StatusBarTextChangedEventHandler : IUnknown
26131 {
26132     static const GUID iid = { 0xA5E3B0D0,0x10DF,0x4156,[ 0xBF,0xAD,0x3B,0x43,0x86,0x7A,0xCA,0xC6 ] };
26133   /// Called to provide the implementer with the event args for the
26134   /// corresponding event. No event args exist and the `args`
26135   /// parameter is set to `null`.
26136   HRESULT Invoke(
26137       /+[in]+/ ICoreWebView2 sender,
26138       /+[in]+/ IUnknown args);
26139 }
26140 
26141 /// This interface is an extension of `ICoreWebView2_14` that supports status Favicons.
26142 const GUID IID_ICoreWebView2_15 = ICoreWebView2_15.iid;
26143 
26144 interface ICoreWebView2_15 : ICoreWebView2_14
26145 {
26146     static const GUID iid = { 0x517B2D1D,0x7DAE,0x4A66,[ 0xA4,0xF4,0x10,0x35,0x2F,0xFB,0x95,0x18 ] };
26147   /// Add an event handler for the `FaviconChanged` event.
26148   /// The `FaviconChanged` event is raised when the
26149   /// [favicon](https://developer.mozilla.org/docs/Glossary/Favicon)
26150   /// had a different URL then the previous URL.
26151   /// The FaviconChanged event will be raised for first navigating to a new
26152   /// document, whether or not a document declares a Favicon in HTML if the
26153   /// favicon is different from the previous fav icon. The event will
26154   /// be raised again if a favicon is declared in its HTML or has script
26155   /// to set its favicon. The favicon information can then be retrieved with
26156   /// `GetFavicon` and `FaviconUri`.
26157   HRESULT add_FaviconChanged(
26158       /+[in]+/ ICoreWebView2FaviconChangedEventHandler eventHandler,
26159       @("out") EventRegistrationToken* token);
26160 
26161   /// Remove the event handler for `FaviconChanged` event.
26162   HRESULT remove_FaviconChanged(
26163       in EventRegistrationToken token);
26164 
26165   /// Get the current Uri of the favicon as a string.
26166   /// If the value is null, then the return value is `E_POINTER`, otherwise it is `S_OK`.
26167   /// If a page has no favicon then the value is an empty string.
26168   @(" propget")
26169 	HRESULT get_FaviconUri(@("out, retval") LPWSTR* value);
26170 
26171   /// Async function for getting the actual image data of the favicon.
26172   /// The image is copied to the `imageStream` object in `ICoreWebView2GetFaviconCompletedHandler`.
26173   /// If there is no image then no data would be copied into the imageStream.
26174   /// The `format` is the file format to return the image stream.
26175   /// `completedHandler` is executed at the end of the operation.
26176   ///
26177   /// \snippet SettingsComponent.cpp FaviconChanged
26178   HRESULT GetFavicon(
26179         in COREWEBVIEW2_FAVICON_IMAGE_FORMAT format,
26180         /+[in]+/ ICoreWebView2GetFaviconCompletedHandler completedHandler);
26181 }
26182 
26183 /// A continuation of the `ICoreWebView2` interface to support printing.
26184 const GUID IID_ICoreWebView2_16 = ICoreWebView2_16.iid;
26185 
26186 interface ICoreWebView2_16 : ICoreWebView2_15
26187 {
26188     static const GUID iid = { 0x0EB34DC9,0x9F91,0x41E1,[ 0x86,0x39,0x95,0xCD,0x59,0x43,0x90,0x6B ] };
26189   /// Print the current web page asynchronously to the specified printer with the provided settings.
26190   /// See `ICoreWebView2PrintSettings` for description of settings. Passing
26191   /// nullptr for `printSettings` results in default print settings used.
26192   ///
26193   /// The handler will return `errorCode` as `S_OK` and `printStatus` as COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE
26194   /// if `printerName` doesn't match with the name of any installed printers on the user OS. The handler
26195   /// will return `errorCode` as `E_INVALIDARG` and `printStatus` as COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR
26196   /// if the caller provides invalid settings for a given printer.
26197   ///
26198   /// The async `Print` operation completes when it finishes printing to the printer.
26199   /// At this time the `ICoreWebView2PrintCompletedHandler` is invoked.
26200   /// Only one `Printing` operation can be in progress at a time. If `Print` is called while a `Print` or `PrintToPdf`
26201   /// or `PrintToPdfStream` or `ShowPrintUI` job is in progress, the completed handler is immediately invoked
26202   /// with `E_ABORT` and `printStatus` is COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR.
26203   /// This is only for printing operation on one webview.
26204   ///
26205   /// |       errorCode     |      printStatus                              |               Notes                                                                           |
26206   /// | --- | --- | --- |
26207   /// |        S_OK         | COREWEBVIEW2_PRINT_STATUS_SUCCEEDED           | Print operation succeeded.                                                                    |
26208   /// |        S_OK         | COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE | If specified printer is not found or printer status is not available, offline or error state. |
26209   /// |        S_OK         | COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR         | Print operation is failed.                                                                    |
26210   /// |     E_INVALIDARG    | COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR         | If the caller provides invalid settings for the specified printer.                            |
26211   /// |       E_ABORT       | COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR         | Print operation is failed as printing job already in progress.                                |
26212   ///
26213   /// \snippet AppWindow.cpp PrintToPrinter
26214   HRESULT Print(
26215     /+[in]+/ ICoreWebView2PrintSettings printSettings,
26216     /+[in]+/ ICoreWebView2PrintCompletedHandler handler);
26217 
26218   /// Opens the print dialog to print the current web page. See `COREWEBVIEW2_PRINT_DIALOG_KIND`
26219   /// for descriptions of print dialog kinds.
26220   ///
26221   /// Invoking browser or system print dialog doesn't open new print dialog if
26222   /// it is already open.
26223   ///
26224   /// \snippet AppWindow.cpp ShowPrintUI
26225   HRESULT ShowPrintUI(in COREWEBVIEW2_PRINT_DIALOG_KIND printDialogKind);
26226 
26227   /// Provides the Pdf data of current web page asynchronously for the provided settings.
26228   /// Stream will be rewound to the start of the pdf data.
26229   ///
26230   /// See `ICoreWebView2PrintSettings` for description of settings. Passing
26231   /// nullptr for `printSettings` results in default print settings used.
26232   ///
26233   /// The async `PrintToPdfStream` operation completes when it finishes
26234   /// writing to the stream. At this time the `ICoreWebView2PrintToPdfStreamCompletedHandler`
26235   /// is invoked. Only one `Printing` operation can be in progress at a time. If
26236   /// `PrintToPdfStream` is called while a `PrintToPdfStream` or `PrintToPdf` or `Print`
26237   /// or `ShowPrintUI` job is in progress, the completed handler is immediately invoked with `E_ABORT`.
26238   /// This is only for printing operation on one webview.
26239   ///
26240   /// \snippet AppWindow.cpp PrintToPdfStream
26241   HRESULT PrintToPdfStream(/+[in]+/ ICoreWebView2PrintSettings printSettings,
26242                            /+[in]+/ ICoreWebView2PrintToPdfStreamCompletedHandler handler);
26243 }
26244 
26245 /// Receives the result of the `Print` method.
26246 const GUID IID_ICoreWebView2PrintCompletedHandler = ICoreWebView2PrintCompletedHandler.iid;
26247 
26248 interface ICoreWebView2PrintCompletedHandler : IUnknown
26249 {
26250     static const GUID iid = { 0x8FD80075,0xED08,0x42DB,[ 0x85,0x70,0xF5,0xD1,0x49,0x77,0x46,0x1E ] };
26251   /// Provides the result of the corresponding asynchronous method.
26252   HRESULT Invoke(in HRESULT errorCode, in COREWEBVIEW2_PRINT_STATUS printStatus);
26253 }
26254 
26255 /// This interface is an extension of `ICoreWebView2_16` that supports shared buffer based on file mapping.
26256 const GUID IID_ICoreWebView2_17 = ICoreWebView2_17.iid;
26257 
26258 interface ICoreWebView2_17 : ICoreWebView2_16
26259 {
26260     static const GUID iid = { 0x702E75D4,0xFD44,0x434D,[ 0x9D,0x70,0x1A,0x68,0xA6,0xB1,0x19,0x2A ] };
26261   /// Share a shared buffer object with script of the main frame in the WebView.
26262   /// The script will receive a `sharedbufferreceived` event from chrome.webview.
26263   /// The event arg for that event will have the following methods and properties:
26264   ///   `getBuffer()`: return an ArrayBuffer object with the backing content from the shared buffer.
26265   ///   `additionalData`: an object as the result of parsing `additionalDataAsJson` as JSON string.
26266   ///           This property will be `undefined` if `additionalDataAsJson` is nullptr or empty string.
26267   ///   `source`: with a value set as `chrome.webview` object.
26268   /// If a string is provided as `additionalDataAsJson` but it is not a valid JSON string,
26269   /// the API will fail with `E_INVALIDARG`.
26270   /// If `access` is COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY, the script will only have read access to the buffer.
26271   /// If the script tries to modify the content in a read only buffer, it will cause an access
26272   /// violation in WebView renderer process and crash the renderer process.
26273   /// If the shared buffer is already closed, the API will fail with `RO_E_CLOSED`.
26274   ///
26275   /// The script code should call `chrome.webview.releaseBuffer` with
26276   /// the shared buffer as the parameter to release underlying resources as soon
26277   /// as it does not need access to the shared buffer any more.
26278   ///
26279   /// The application can post the same shared buffer object to multiple web pages or iframes, or
26280   /// post to the same web page or iframe multiple times. Each `PostSharedBufferToScript` will
26281   /// create a separate ArrayBuffer object with its own view of the memory and is separately
26282   /// released. The underlying shared memory will be released when all the views are released.
26283   ///
26284   /// For example, if we want to send data to script for one time read only consumption.
26285   ///
26286   /// \snippet ScenarioSharedBuffer.cpp OneTimeShareBuffer
26287   ///
26288   /// In the HTML document,
26289   ///
26290   /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_1
26291   ///
26292   /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_2
26293   ///
26294   /// Sharing a buffer to script has security risk. You should only share buffer with trusted site.
26295   /// If a buffer is shared to a untrusted site, possible sensitive information could be leaked.
26296   /// If a buffer is shared as modifiable by the script and the script modifies it in an unexpected way,
26297   /// it could result in corrupted data that might even crash the application.
26298   ///
26299   HRESULT PostSharedBufferToScript(
26300     /+[in]+/ ICoreWebView2SharedBuffer sharedBuffer,
26301     in COREWEBVIEW2_SHARED_BUFFER_ACCESS access,
26302     in LPCWSTR additionalDataAsJson);
26303 }
26304 
26305 /// Receives the result of the `PrintToPdfStream` method.
26306 /// `errorCode` returns S_OK if the PrintToPdfStream operation succeeded.
26307 /// The printable pdf data is returned in the `pdfStream` object.
26308 const GUID IID_ICoreWebView2PrintToPdfStreamCompletedHandler = ICoreWebView2PrintToPdfStreamCompletedHandler.iid;
26309 
26310 interface ICoreWebView2PrintToPdfStreamCompletedHandler : IUnknown
26311 {
26312     static const GUID iid = { 0x4C9F8229,0x8F93,0x444F,[ 0xA7,0x11,0x2C,0x0D,0xFD,0x63,0x59,0xD5 ] };
26313   /// Provides the result of the corresponding asynchronous method.
26314   HRESULT Invoke(in HRESULT errorCode, in IStream* pdfStream);
26315 }
26316 
26317 /// Settings used by the `Print` method.
26318 const GUID IID_ICoreWebView2PrintSettings2 = ICoreWebView2PrintSettings2.iid;
26319 
26320 interface ICoreWebView2PrintSettings2 : ICoreWebView2PrintSettings
26321 {
26322     static const GUID iid = { 0xCA7F0E1F,0x3484,0x41D1,[ 0x8C,0x1A,0x65,0xCD,0x44,0xA6,0x3F,0x8D ] };
26323   /// Page range to print. Defaults to empty string, which means print all pages.
26324   /// If the Page range is empty string or null, then it applies the default.
26325   ///
26326   /// The PageRanges property is a list of page ranges specifying one or more pages that
26327   /// should be printed separated by commas. Any whitespace between page ranges is ignored.
26328   /// A valid page range is either a single integer identifying the page to print, or a range
26329   /// in the form `[start page]-[last page]` where `start page` and `last page` are integers
26330   /// identifying the first and last inclusive pages respectively to print.
26331   /// Every page identifier is an integer greater than 0 unless wildcards are used (see below examples).
26332   /// The first page is 1.
26333   ///
26334   /// In a page range of the form `[start page]-[last page]` the start page number must be
26335   /// larger than 0 and less than or equal to the document's total page count.
26336   /// If the `start page` is not present, then 1 is used as the `start page`.
26337   /// The `last page` must be larger than the `start page`.
26338   /// If the `last page` is not present, then the document total page count is used as the `last page`.
26339   ///
26340   /// Repeating a page does not print it multiple times. To print multiple times, use the `Copies` property.
26341   ///
26342   /// The pages are always printed in ascending order, even if specified in non-ascending order.
26343   ///
26344   /// If page range is not valid or if a page is greater than document total page count,
26345   /// `ICoreWebView2PrintCompletedHandler` or `ICoreWebView2PrintToPdfStreamCompletedHandler`
26346   /// handler will return `E_INVALIDARG`.
26347   ///
26348   /// The following examples assume a document with 20 total pages.
26349   ///
26350   /// |       Example         |       Result      |               Notes                                              |
26351   /// | --- | --- | --- |
26352   /// | "2"                   |  Page 2           |                                                                  |
26353   /// | "1-4, 9, 3-6, 10, 11" |  Pages 1-6, 9-11  |                                                                  |
26354   /// | "1-4, -6"             |  Pages 1-6        | The "-6" is interpreted as "1-6".                                |
26355   /// | "2-"                  |  Pages 2-20       | The "2-" is interpreted as "pages 2 to the end of the document". |
26356   /// | "4-2, 11, -6"         |  Invalid          | "4-2" is an invalid range.                                       |
26357   /// | "-"                   |  Pages 1-20       | The "-" is interpreted as "page 1 to the end of the document".   |
26358   /// | "1-4dsf, 11"          |  Invalid          |                                                                  |
26359   /// | "2-2"                 |  Page 2           |                                                                  |
26360   ///
26361   /// The caller must free the returned string with `CoTaskMemFree`. See
26362   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings)
26363   @(" propget")
26364 	HRESULT get_PageRanges(@("out, retval") LPWSTR* value);
26365 
26366   /// Set the `PageRanges` property.
26367   @(" propput")
26368 	HRESULT put_PageRanges(in LPCWSTR value);
26369 
26370   /// Prints multiple pages of a document on a single piece of paper. Choose from 1, 2, 4, 6, 9 or 16.
26371   /// The default value is 1.
26372   @(" propget")
26373 	HRESULT get_PagesPerSide(@("out, retval") INT32* value);
26374 
26375   /// Set the `PagesPerSide` property. Returns `E_INVALIDARG` if an invalid value is
26376   /// provided, and the current value is not changed.
26377   ///
26378   /// Below examples shows print output for PagesPerSide and Duplex.
26379   ///
26380   /// |  PagesPerSide   |    Total pages   | Two-sided printing |              Result                                               |
26381   /// | --- | --- | --- | --- |
26382   /// |      1          |      1           |        -           | 1 page on the front side.                                         |
26383   /// |      2          |      1           |        Yes         | 1 page on the front side.                                         |
26384   /// |      2          |      4           |        -           | 2 pages on the first paper and 2 pages on the next paper.         |
26385   /// |      2          |      4           |        Yes         | 2 pages on the front side and 2 pages on back side.               |
26386   /// |      4          |      4           |        Yes         | 4 pages on the front side.                                        |
26387   /// |      4          |      8           |        Yes         | 4 pages on the front side and 4 pages on the back side.           |
26388   @(" propput")
26389 	HRESULT put_PagesPerSide(in INT32 value);
26390 
26391   /// Number of copies to print. Minimum value is `1` and the maximum copies count is `999`.
26392   /// The default value is 1.
26393   ///
26394   /// This value is ignored in PrintToPdfStream method.
26395   @(" propget")
26396 	HRESULT get_Copies(@("out, retval") INT32* value);
26397 
26398   /// Set the `Copies` property. Returns `E_INVALIDARG` if an invalid value is provided
26399   /// and the current value is not changed.
26400   @(" propput")
26401 	HRESULT put_Copies(in INT32 value);
26402 
26403   /// Printer collation. See `COREWEBVIEW2_PRINT_COLLATION` for descriptions of
26404   /// collation. The default value is `COREWEBVIEW2_PRINT_COLLATION_DEFAULT`.
26405   ///
26406   /// Printing uses default value of printer's collation if an invalid value is provided
26407   /// for the specific printer.
26408   ///
26409   /// This value is ignored in PrintToPdfStream method.
26410   @(" propget")
26411 	HRESULT get_Collation(@("out, retval") COREWEBVIEW2_PRINT_COLLATION* value);
26412 
26413   /// Set the `Collation` property.
26414   @(" propput")
26415 	HRESULT put_Collation(in COREWEBVIEW2_PRINT_COLLATION value);
26416 
26417   /// Printer color mode. See `COREWEBVIEW2_PRINT_COLOR_MODE` for descriptions
26418   /// of color modes. The default value is `COREWEBVIEW2_PRINT_COLOR_MODE_DEFAULT`.
26419   ///
26420   /// Printing uses default value of printer supported color if an invalid value is provided
26421   /// for the specific printer.
26422   @(" propget")
26423 	HRESULT get_ColorMode(@("out, retval") COREWEBVIEW2_PRINT_COLOR_MODE* value);
26424 
26425   /// Set the `ColorMode` property.
26426   @(" propput")
26427 	HRESULT put_ColorMode(in COREWEBVIEW2_PRINT_COLOR_MODE value);
26428 
26429   /// Printer duplex settings. See `COREWEBVIEW2_PRINT_DUPLEX` for descriptions of duplex.
26430   /// The default value is `COREWEBVIEW2_PRINT_DUPLEX_DEFAULT`.
26431   ///
26432   /// Printing uses default value of printer's duplex if an invalid value is provided
26433   /// for the specific printer.
26434   ///
26435   /// This value is ignored in PrintToPdfStream method.
26436   @(" propget")
26437 	HRESULT get_Duplex(@("out, retval") COREWEBVIEW2_PRINT_DUPLEX* value);
26438 
26439   /// Set the `Duplex` property.
26440   @(" propput")
26441 	HRESULT put_Duplex(in COREWEBVIEW2_PRINT_DUPLEX value);
26442 
26443   /// Printer media size. See `COREWEBVIEW2_PRINT_MEDIA_SIZE` for descriptions of media size.
26444   /// The default value is `COREWEBVIEW2_PRINT_MEDIA_SIZE_DEFAULT`.
26445   ///
26446   /// If media size is `COREWEBVIEW2_PRINT_MEDIA_SIZE_CUSTOM`, you should set the `PageWidth`
26447   /// and `PageHeight`.
26448   ///
26449   /// Printing uses default value of printer supported media size if an invalid value is provided
26450   /// for the specific printer.
26451   ///
26452   /// This value is ignored in PrintToPdfStream method.
26453   @(" propget")
26454 	HRESULT get_MediaSize(@("out, retval") COREWEBVIEW2_PRINT_MEDIA_SIZE* value);
26455 
26456   /// Set the `MediaSize` property.
26457   @(" propput")
26458 	HRESULT put_MediaSize(in COREWEBVIEW2_PRINT_MEDIA_SIZE value);
26459 
26460   /// The name of the printer to use. Defaults to empty string.
26461   /// If the printer name is empty string or null, then it prints to the default
26462   /// printer on the user OS.
26463   ///
26464   /// This value is ignored in PrintToPdfStream method.
26465   ///
26466   /// The caller must free the returned string with `CoTaskMemFree`. See
26467   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings)
26468   @(" propget")
26469 	HRESULT get_PrinterName(@("out, retval") LPWSTR* value);
26470 
26471   /// Set the `PrinterName` property. If provided printer name doesn't match
26472   /// with the name of any installed printers on the user OS,
26473   /// `ICoreWebView2PrintCompletedHandler` handler will return `errorCode` as
26474   /// `S_OK` and `printStatus` as COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE.
26475   ///
26476   /// Use [Enum Printers](/windows/win32/printdocs/enumprinters)
26477   /// to enumerate available printers.
26478   @(" propput")
26479 	HRESULT put_PrinterName(in LPCWSTR value);
26480 }
26481 
26482 /// This interface is an extension of `ICoreWebView2_17` that manages
26483 /// navigation requests to URI schemes registered with the OS.
26484 const GUID IID_ICoreWebView2_18 = ICoreWebView2_18.iid;
26485 
26486 interface ICoreWebView2_18 : ICoreWebView2_17
26487 {
26488     static const GUID iid = { 0x7A626017,0x28BE,0x49B2,[ 0xB8,0x65,0x3B,0xA2,0xB3,0x52,0x2D,0x90 ] };
26489   /// Add an event handler for the `LaunchingExternalUriScheme` event.
26490   /// The `LaunchingExternalUriScheme` event is raised when a navigation request is made to
26491   /// a URI scheme that is registered with the OS.
26492   /// The `LaunchingExternalUriScheme` event handler may suppress the default dialog
26493   /// or replace the default dialog with a custom dialog.
26494   ///
26495   /// If a deferral is not taken on the event args, the external URI scheme launch is
26496   /// blocked until the event handler returns.  If a deferral is taken, the
26497   /// external URI scheme launch is blocked until the deferral is completed.
26498   /// The host also has the option to cancel the URI scheme launch.
26499   ///
26500   /// The `NavigationStarting` and `NavigationCompleted` events will be raised,
26501   /// regardless of whether the `Cancel` property is set to `TRUE` or
26502   /// `FALSE`. The `NavigationCompleted` event will be raised with the `IsSuccess` property
26503   /// set to `FALSE` and the `WebErrorStatus` property set to `ConnectionAborted` regardless of
26504   /// whether the host sets the `Cancel` property on the
26505   /// `ICoreWebView2LaunchingExternalUriSchemeEventArgs`. The `SourceChanged`, `ContentLoading`,
26506   /// and `HistoryChanged` events will not be raised for this navigation to the external URI
26507   /// scheme regardless of the `Cancel` property.
26508   /// The `LaunchingExternalUriScheme` event will be raised after the
26509   /// `NavigationStarting` event and before the `NavigationCompleted` event.
26510   /// The default `CoreWebView2Settings` will also be updated upon navigation to an external
26511   /// URI scheme. If a setting on the `CoreWebView2Settings` interface has been changed,
26512   /// navigating to an external URI scheme will trigger the `CoreWebView2Settings` to update.
26513   ///
26514   /// The WebView2 may not display the default dialog based on user settings, browser settings,
26515   /// and whether the origin is determined as a
26516   /// [trustworthy origin](https://w3c.github.io/webappsec-secure-contexts#
26517   /// potentially-trustworthy-origin); however, the event will still be raised.
26518   ///
26519   /// If the request is initiated by a cross-origin frame without a user gesture,
26520   /// the request will be blocked and the `LaunchingExternalUriScheme` event will not
26521   /// be raised.
26522   /// \snippet SettingsComponent.cpp ToggleLaunchingExternalUriScheme
26523   HRESULT add_LaunchingExternalUriScheme(
26524       /+[in]+/ ICoreWebView2LaunchingExternalUriSchemeEventHandler eventHandler,
26525       @("out") EventRegistrationToken* token);
26526 
26527   /// Remove an event handler previously added with
26528   /// `add_LaunchingExternalUriScheme`.
26529   HRESULT remove_LaunchingExternalUriScheme(
26530       in EventRegistrationToken token);
26531 }
26532 
26533 /// This interface is an extension of `ICoreWebView2_18` that manages memory usage
26534 /// target level.
26535 const GUID IID_ICoreWebView2_19 = ICoreWebView2_19.iid;
26536 
26537 interface ICoreWebView2_19 : ICoreWebView2_18
26538 {
26539     static const GUID iid = { 0x6921F954,0x79B0,0x437F,[ 0xA9,0x97,0xC8,0x58,0x11,0x89,0x7C,0x68 ] };
26540 
26541   /// `MemoryUsageTargetLevel` indicates desired memory consumption level of
26542   /// WebView.
26543   @(" propget")
26544 	HRESULT get_MemoryUsageTargetLevel(
26545       @("out, retval") COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL* level);
26546 
26547   /// An app may set `MemoryUsageTargetLevel` to indicate desired memory
26548   /// consumption level of WebView. Scripts will not be impacted and continue
26549   /// to run. This is useful for inactive apps that still want to run scripts
26550   /// and/or keep network connections alive and therefore could not call
26551   /// `TrySuspend` and `Resume` to reduce memory consumption. These apps can
26552   /// set memory usage target level to `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_LOW`
26553   /// when the app becomes inactive, and set back to
26554   /// `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_NORMAL` when the app becomes
26555   /// active. It is not necessary to set CoreWebView2Controller's IsVisible
26556   /// property to false when setting the property.
26557   /// It is a best effort operation to change memory usage level, and the
26558   /// API will return before the operation completes.
26559   /// Setting the level to `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_LOW`
26560   /// could potentially cause memory for some WebView browser processes to be
26561   /// swapped out to disk in some circumstances.
26562   /// It is a best effort to reduce memory usage as much as possible. If a script
26563   /// runs after its related memory has been swapped out, the memory will be swapped
26564   /// back in to ensure the script can still run, but performance might be impacted.
26565   /// Therefore, the app should set the level back to
26566   /// `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_NORMAL` when the app becomes
26567   /// active again. Setting memory usage target level back to normal will not happen
26568   /// automatically.
26569   /// An app should choose to use either the combination of `TrySuspend` and `Resume`
26570   /// or the combination of setting MemoryUsageTargetLevel to low and normal. It is
26571   /// not advisable to mix them.
26572   /// Trying to set `MemoryUsageTargetLevel` while suspended will be ignored.
26573   /// The `TrySuspend` and `Resume` methods will change the `MemoryUsageTargetLevel`.
26574   /// `TrySuspend` will automatically set `MemoryUsageTargetLevel` to low while
26575   /// `Resume` on suspended WebView will automatically set `MemoryUsageTargetLevel`
26576   /// to normal. Calling `Resume` when the WebView is not suspended would not change
26577   /// `MemoryUsageTargetLevel`.
26578   ///
26579   /// \snippet ViewComponent.cpp MemoryUsageTargetLevel
26580   @(" propput")
26581 	HRESULT put_MemoryUsageTargetLevel(
26582       in COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL level);
26583 }
26584 
26585 /// This interface is an extension of `ICoreWebView2_19` that provides the `FrameId` property.
26586 const GUID IID_ICoreWebView2_20 = ICoreWebView2_20.iid;
26587 
26588 interface ICoreWebView2_20 : ICoreWebView2_19
26589 {
26590     static const GUID iid = { 0xb4bc1926,0x7305,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] };
26591   /// The unique identifier of the main frame. It's the same kind of ID as
26592   /// with the `FrameId` in `CoreWebView2Frame` and via `CoreWebView2FrameInfo`.
26593   /// Note that `FrameId` may not be valid if `CoreWebView2` has not done
26594   /// any navigation. It's safe to get this value during or after the first
26595   /// `ContentLoading` event. Otherwise, it could return the invalid frame Id 0.
26596   @(" propget")
26597 	HRESULT get_FrameId(@("out, retval") UINT32* id);
26598 }
26599 
26600 /// Event handler for the `LaunchingExternalUriScheme` event.
26601 const GUID IID_ICoreWebView2LaunchingExternalUriSchemeEventHandler = ICoreWebView2LaunchingExternalUriSchemeEventHandler.iid;
26602 
26603 interface ICoreWebView2LaunchingExternalUriSchemeEventHandler : IUnknown
26604 {
26605     static const GUID iid = { 0x74F712E0,0x8165,0x43A9,[ 0xA1,0x3F,0x0C,0xCE,0x59,0x7E,0x75,0xDF ] };
26606   /// Receives the event args for the corresponding event.
26607   HRESULT Invoke(
26608       /+[in]+/ ICoreWebView2 sender,
26609       /+[in]+/ ICoreWebView2LaunchingExternalUriSchemeEventArgs args);
26610 }
26611 
26612 /// Event args for `LaunchingExternalUriScheme` event.
26613 const GUID IID_ICoreWebView2LaunchingExternalUriSchemeEventArgs = ICoreWebView2LaunchingExternalUriSchemeEventArgs.iid;
26614 
26615 interface ICoreWebView2LaunchingExternalUriSchemeEventArgs : IUnknown
26616 {
26617     static const GUID iid = { 0x07D1A6C3,0x7175,0x4BA1,[ 0x93,0x06,0xE5,0x93,0xCA,0x07,0xE4,0x6C ] };
26618   /// The URI with the external URI scheme to be launched.
26619 
26620   @(" propget")
26621 	HRESULT get_Uri(@("out, retval") LPWSTR* value);
26622 
26623   /// The origin initiating the external URI scheme launch.
26624   /// The origin will be an empty string if the request is initiated by calling
26625   /// `CoreWebView2.Navigate` on the external URI scheme. If a script initiates
26626   /// the navigation, the `InitiatingOrigin` will be the top-level document's
26627   /// `Source`, for example, if `window.location` is set to `"calculator://", the
26628   /// `InitiatingOrigin` will be set to `calculator://`. If the request is initiated
26629   ///  from a child frame, the `InitiatingOrigin` will be the source of that child frame.
26630 
26631   @(" propget")
26632 	HRESULT get_InitiatingOrigin(@("out, retval") LPWSTR* value);
26633 
26634   /// `TRUE` when the external URI scheme request was initiated through a user gesture.
26635   ///
26636   /// \> [!NOTE]\n\> Being initiated through a user gesture does not mean that user intended
26637   /// to access the associated resource.
26638 
26639   @(" propget")
26640 	HRESULT get_IsUserInitiated(@("out, retval") BOOL* value);
26641 
26642   /// The event handler may set this property to `TRUE` to cancel the external URI scheme
26643   /// launch. If set to `TRUE`, the external URI scheme will not be launched, and the default
26644   /// dialog is not displayed. This property can be used to replace the normal
26645   /// handling of launching an external URI scheme.
26646   /// The initial value of the `Cancel` property is `FALSE`.
26647 
26648   @(" propget")
26649 	HRESULT get_Cancel(@("out, retval") BOOL* value);
26650 
26651   /// Sets the `Cancel` property.
26652 
26653   @(" propput")
26654 	HRESULT put_Cancel(in BOOL value);
26655 
26656   /// Returns an `ICoreWebView2Deferral` object.  Use this operation to
26657   /// complete the event at a later time.
26658 
26659   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * value);
26660 }
26661 
26662 /// The caller implements this interface to handle the BasicAuthenticationRequested event.
26663 const GUID IID_ICoreWebView2BasicAuthenticationRequestedEventHandler = ICoreWebView2BasicAuthenticationRequestedEventHandler.iid;
26664 
26665 interface ICoreWebView2BasicAuthenticationRequestedEventHandler : IUnknown
26666 {
26667     static const GUID iid = { 0x58b4d6c2,0x18d4,0x497e,[ 0xb3,0x9b,0x9a,0x96,0x53,0x3f,0xa2,0x78 ] };
26668   /// Called to provide the implementer with the event args for the
26669   /// corresponding event.
26670   HRESULT Invoke(
26671       /+[in]+/ ICoreWebView2 sender,
26672       /+[in]+/ ICoreWebView2BasicAuthenticationRequestedEventArgs args);
26673 }
26674 
26675 /// Implements the interface to receive `IsDefaultDownloadDialogOpenChanged`
26676 /// events.
26677 const GUID IID_ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler = ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler.iid;
26678 
26679 interface ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler : IUnknown
26680 {
26681     static const GUID iid = { 0x3117da26,0xae13,0x438d,[ 0xbd,0x46,0xed,0xbe,0xb2,0xc4,0xce,0x81 ] };
26682   /// Provides the event args for the corresponding event. No event args exist
26683   /// and the `args` parameter is set to `null`.
26684   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender,
26685                  /+[in]+/ IUnknown args);
26686 }
26687 
26688 /// Receives the result of the `PrintToPdf` method. If the print to PDF
26689 /// operation succeeds, `isSuccessful` is true. Otherwise, if the operation
26690 /// failed, `isSuccessful` is set to false. An invalid path returns
26691 /// `E_INVALIDARG`.
26692 const GUID IID_ICoreWebView2PrintToPdfCompletedHandler = ICoreWebView2PrintToPdfCompletedHandler.iid;
26693 
26694 interface ICoreWebView2PrintToPdfCompletedHandler : IUnknown
26695 {
26696     static const GUID iid = { 0xccf1ef04,0xfd8e,0x4d5f,[ 0xb2,0xde,0x09,0x83,0xe4,0x1b,0x8c,0x36 ] };
26697 
26698   /// Provides the result of the corresponding asynchronous method.
26699   HRESULT Invoke(in HRESULT errorCode, BOOL isSuccessful);
26700 }
26701 
26702 /// Settings used by the `PrintToPdf` method.
26703 const GUID IID_ICoreWebView2PrintSettings = ICoreWebView2PrintSettings.iid;
26704 
26705 interface ICoreWebView2PrintSettings : IUnknown
26706 {
26707     static const GUID iid = { 0x377f3721,0xc74e,0x48ca,[ 0x8d,0xb1,0xdf,0x68,0xe5,0x1d,0x60,0xe2 ] };
26708 
26709   /// The orientation can be portrait or landscape. The default orientation is
26710   /// portrait. See `COREWEBVIEW2_PRINT_ORIENTATION`.
26711   @(" propget")
26712 	HRESULT get_Orientation(
26713     @("out, retval") COREWEBVIEW2_PRINT_ORIENTATION* orientation);
26714 
26715   /// Sets the `Orientation` property.
26716   @(" propput")
26717 	HRESULT put_Orientation(
26718       in COREWEBVIEW2_PRINT_ORIENTATION orientation);
26719 
26720   /// The scale factor is a value between 0.1 and 2.0. The default is 1.0.
26721   @(" propget")
26722 	HRESULT get_ScaleFactor(@("out, retval") double* scaleFactor);
26723 
26724   /// Sets the `ScaleFactor` property. Returns `E_INVALIDARG` if an invalid
26725   /// value is provided, and the current value is not changed.
26726   @(" propput")
26727 	HRESULT put_ScaleFactor(in double scaleFactor);
26728 
26729   /// The page width in inches. The default width is 8.5 inches.
26730   @(" propget")
26731 	HRESULT get_PageWidth(@("out, retval") double* pageWidth);
26732 
26733   /// Sets the `PageWidth` property. Returns `E_INVALIDARG` if the page width is
26734   /// less than or equal to zero, and the current value is not changed.
26735   @(" propput")
26736 	HRESULT put_PageWidth(in double pageWidth);
26737 
26738   /// The page height in inches. The default height is 11 inches.
26739   @(" propget")
26740 	HRESULT get_PageHeight(@("out, retval") double* pageHeight);
26741 
26742   /// Sets the `PageHeight` property. Returns `E_INVALIDARG` if the page height
26743   /// is less than or equal to zero, and the current value is not changed.
26744   @(" propput")
26745 	HRESULT put_PageHeight(in double pageHeight);
26746 
26747   /// The top margin in inches. The default is 1 cm, or ~0.4 inches.
26748   @(" propget")
26749 	HRESULT get_MarginTop(@("out, retval") double* marginTop);
26750 
26751   /// Sets the `MarginTop` property. A margin cannot be less than zero.
26752   /// Returns `E_INVALIDARG` if an invalid value is provided, and the current
26753   /// value is not changed.
26754   @(" propput")
26755 	HRESULT put_MarginTop(in double marginTop);
26756 
26757   /// The bottom margin in inches. The default is 1 cm, or ~0.4 inches.
26758   @(" propget")
26759 	HRESULT get_MarginBottom(@("out, retval") double* marginBottom);
26760 
26761   /// Sets the `MarginBottom` property. A margin cannot be less than zero.
26762   /// Returns `E_INVALIDARG` if an invalid value is provided, and the current
26763   /// value is not changed.
26764   @(" propput")
26765 	HRESULT put_MarginBottom(in double marginBottom);
26766 
26767   /// The left margin in inches. The default is 1 cm, or ~0.4 inches.
26768   @(" propget")
26769 	HRESULT get_MarginLeft(@("out, retval") double* marginLeft);
26770 
26771   /// Sets the `MarginLeft` property. A margin cannot be less than zero.
26772   /// Returns `E_INVALIDARG` if an invalid value is provided, and the current
26773   /// value is not changed.
26774   @(" propput")
26775 	HRESULT put_MarginLeft(in double marginLeft);
26776 
26777   /// The right margin in inches. The default is 1 cm, or ~0.4 inches.
26778   @(" propget")
26779 	HRESULT get_MarginRight(@("out, retval") double* marginRight);
26780 
26781   /// Set the `MarginRight` property.A margin cannot be less than zero.
26782   /// Returns `E_INVALIDARG` if an invalid value is provided, and the current
26783   /// value is not changed.
26784   @(" propput")
26785 	HRESULT put_MarginRight(in double marginRight);
26786 
26787   /// `TRUE` if background colors and images should be printed. The default value
26788   /// is `FALSE`.
26789   @(" propget")
26790 	HRESULT get_ShouldPrintBackgrounds(
26791       @("out, retval") BOOL* shouldPrintBackgrounds);
26792 
26793   /// Set the `ShouldPrintBackgrounds` property.
26794   @(" propput")
26795 	HRESULT put_ShouldPrintBackgrounds(in BOOL shouldPrintBackgrounds);
26796 
26797   /// `TRUE` if only the current end user's selection of HTML in the document
26798   /// should be printed. The default value is `FALSE`.
26799   @(" propget")
26800 	HRESULT get_ShouldPrintSelectionOnly(
26801       @("out, retval") BOOL* shouldPrintSelectionOnly);
26802 
26803   /// Set the `ShouldPrintSelectionOnly` property.
26804   @(" propput")
26805 	HRESULT put_ShouldPrintSelectionOnly(
26806       in BOOL shouldPrintSelectionOnly);
26807 
26808   /// `TRUE` if header and footer should be printed. The default value is `FALSE`.
26809   /// The header consists of the date and time of printing, and the title of the
26810   /// page. The footer consists of the URI and page number. The height of the
26811   /// header and footer is 0.5 cm, or ~0.2 inches.
26812   @(" propget")
26813 	HRESULT get_ShouldPrintHeaderAndFooter(
26814       @("out, retval") BOOL* shouldPrintHeaderAndFooter);
26815 
26816   /// Set the `ShouldPrintHeaderAndFooter` property.
26817   @(" propput")
26818 	HRESULT put_ShouldPrintHeaderAndFooter(
26819       in BOOL shouldPrintHeaderAndFooter);
26820 
26821   /// The title in the header if `ShouldPrintHeaderAndFooter` is `TRUE`. The
26822   /// default value is the title of the current document.
26823   ///
26824   /// The caller must free the returned string with `CoTaskMemFree`.  See
26825   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
26826   @(" propget")
26827 	HRESULT get_HeaderTitle(@("out, retval") LPWSTR* headerTitle);
26828 
26829   /// Set the `HeaderTitle` property. If an empty string or null value is
26830   /// provided, no title is shown in the header.
26831   @(" propput")
26832 	HRESULT put_HeaderTitle(in LPCWSTR headerTitle);
26833 
26834   /// The URI in the footer if `ShouldPrintHeaderAndFooter` is `TRUE`. The
26835   /// default value is the current URI.
26836   ///
26837   /// The caller must free the returned string with `CoTaskMemFree`.  See
26838   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
26839   @(" propget")
26840 	HRESULT get_FooterUri(@("out, retval") LPWSTR* footerUri);
26841 
26842   /// Set the `FooterUri` property. If an empty string or null value is
26843   /// provided, no URI is shown in the footer.
26844   @(" propput")
26845 	HRESULT put_FooterUri(in LPCWSTR footerUri);
26846 }
26847 
26848 /// The caller implements this interface to receive the TrySuspend result.
26849 const GUID IID_ICoreWebView2TrySuspendCompletedHandler = ICoreWebView2TrySuspendCompletedHandler.iid;
26850 
26851 interface ICoreWebView2TrySuspendCompletedHandler : IUnknown
26852 {
26853     static const GUID iid = { 0x00F206A7,0x9D17,0x4605,[ 0x91,0xF6,0x4E,0x8E,0x4D,0xE1,0x92,0xE3 ] };
26854 
26855   /// Provides the result of the TrySuspend operation.
26856   /// See [Sleeping Tabs FAQ](https://techcommunity.microsoft.com/t5/articles/sleeping-tabs-faq/m-p/1705434)
26857   /// for conditions that might prevent WebView from being suspended. In those situations,
26858   /// isSuccessful will be false and errorCode is S_OK.
26859   HRESULT Invoke(in HRESULT errorCode, in BOOL isSuccessful);
26860 }
26861 
26862 /// The owner of the `CoreWebView2` object that provides support for resizing,
26863 /// showing and hiding, focusing, and other functionality related to
26864 /// windowing and composition.  The `CoreWebView2Controller` owns the
26865 /// `CoreWebView2`, and if all references to the `CoreWebView2Controller` go
26866 /// away, the WebView is closed.
26867 const GUID IID_ICoreWebView2Controller = ICoreWebView2Controller.iid;
26868 
26869 interface ICoreWebView2Controller : IUnknown
26870 {
26871     static const GUID iid = { 0x4d00c0d1,0x9434,0x4eb6,[ 0x80,0x78,0x86,0x97,0xa5,0x60,0x33,0x4f ] };
26872 
26873   /// The `IsVisible` property determines whether to show or hide the WebView2.
26874   ///   If `IsVisible` is set to `FALSE`, the WebView2 is transparent and is
26875   /// not rendered.   However, this does not affect the window containing the
26876   /// WebView2 (the `HWND` parameter that was passed to
26877   /// `CreateCoreWebView2Controller`).  If you want that window to disappear
26878   /// too, run `ShowWindow` on it directly in addition to modifying the
26879   /// `IsVisible` property.  WebView2 as a child window does not get window
26880   /// messages when the top window is minimized or restored.  For performance
26881   /// reasons, developers should set the `IsVisible` property of the WebView to
26882   /// `FALSE` when the app window is minimized and back to `TRUE` when the app
26883   /// window is restored. The app window does this by handling
26884   /// `SIZE_MINIMIZED and SIZE_RESTORED` command upon receiving `WM_SIZE`
26885   /// message.
26886   ///
26887   /// There are CPU and memory benefits when the page is hidden. For instance,
26888   /// Chromium has code that throttles activities on the page like animations
26889   /// and some tasks are run less frequently. Similarly, WebView2 will
26890   /// purge some caches to reduce memory usage.
26891   ///
26892   /// \snippet ViewComponent.cpp ToggleIsVisible
26893   @(" propget")
26894 	HRESULT get_IsVisible(@("out, retval") BOOL* isVisible);
26895 
26896   /// Sets the `IsVisible` property.
26897   ///
26898   /// \snippet ViewComponent.cpp ToggleIsVisibleOnMinimize
26899   @(" propput")
26900 	HRESULT put_IsVisible(in BOOL isVisible);
26901 
26902   /// The WebView bounds. Bounds are relative to the parent `HWND`.  The app
26903   /// has two ways to position a WebView.
26904   ///
26905   /// *   Create a child `HWND` that is the WebView parent `HWND`.  Position
26906   ///     the window where the WebView should be.  Use `(0, 0)` for the
26907   ///     top-left corner (the offset) of the `Bounds` of the WebView.
26908   /// *   Use the top-most window of the app as the WebView parent HWND.  For
26909   ///     example, to position WebView correctly in the app, set the top-left
26910   ///     corner of the Bound of the WebView.
26911   ///
26912   /// The values of `Bounds` are limited by the coordinate space of the host.
26913 
26914   @(" propget")
26915 	HRESULT get_Bounds(@("out, retval") RECT* bounds);
26916 
26917   /// Sets the `Bounds` property.
26918   ///
26919   /// \snippet ViewComponent.cpp ResizeWebView
26920 
26921   @(" propput")
26922 	HRESULT put_Bounds(in RECT bounds);
26923 
26924   /// The zoom factor for the WebView.
26925   ///
26926   /// \> [!NOTE]\n\> Changing zoom factor may cause `window.innerWidth`,
26927   /// `window.innerHeight`, both, and page layout to change.  A zoom factor
26928   /// that is applied by the host by running `ZoomFactor` becomes the new
26929   /// default zoom for the WebView.  The zoom factor applies across navigations
26930   /// and is the zoom factor WebView is returned to when the user chooses
26931   /// Ctrl+0.  When the zoom factor is changed by the user (resulting in
26932   /// the app receiving `ZoomFactorChanged`), that zoom applies only for the
26933   /// current page.  Any user applied zoom is only for the current page and is
26934   /// reset on a navigation.  Specifying a `zoomFactor` less than or equal to
26935   /// `0` is not allowed.  WebView also has an internal supported zoom factor
26936   /// range.  When a specified zoom factor is out of that range, it is
26937   /// normalized to be within the range, and a `ZoomFactorChanged` event is
26938   /// triggered for the real applied zoom factor.  When the range normalization
26939   /// happens, the `ZoomFactor` property reports the zoom factor specified
26940   /// during the previous modification of the `ZoomFactor` property until the
26941   /// `ZoomFactorChanged` event is received after WebView applies the
26942   /// normalized zoom factor.
26943 
26944   @(" propget")
26945 	HRESULT get_ZoomFactor(@("out, retval") double* zoomFactor);
26946 
26947   /// Sets the `ZoomFactor` property.
26948 
26949   @(" propput")
26950 	HRESULT put_ZoomFactor(in double zoomFactor);
26951 
26952   /// Adds an event handler for the `ZoomFactorChanged` event.
26953   /// `ZoomFactorChanged` runs when the `ZoomFactor` property of the WebView
26954   /// changes.  The event may run because the `ZoomFactor` property was
26955   /// modified, or due to the user manually modifying the zoom.  When it is
26956   /// modified using the `ZoomFactor` property, the internal zoom factor is
26957   /// updated immediately and no `ZoomFactorChanged` event is triggered.
26958   /// WebView associates the last used zoom factor for each site.  It is
26959   /// possible for the zoom factor to change when navigating to a different
26960   /// page.  When the zoom factor changes due to a navigation change, the
26961   /// `ZoomFactorChanged` event runs right after the `ContentLoading` event.
26962   ///
26963   /// \snippet ViewComponent.cpp ZoomFactorChanged
26964 
26965   HRESULT add_ZoomFactorChanged(
26966       /+[in]+/ ICoreWebView2ZoomFactorChangedEventHandler eventHandler,
26967       @("out") EventRegistrationToken* token);
26968 
26969   /// Remove an event handler previously added with `add_ZoomFactorChanged`.
26970 
26971   HRESULT remove_ZoomFactorChanged(
26972       in EventRegistrationToken token);
26973 
26974   /// Updates `Bounds` and `ZoomFactor` properties at the same time.  This
26975   /// operation is atomic from the perspective of the host.  After returning
26976   /// from this function, the `Bounds` and `ZoomFactor` properties are both
26977   /// updated if the function is successful, or neither is updated if the
26978   /// function fails.  If `Bounds` and `ZoomFactor` are both updated by the
26979   /// same scale (for example, `Bounds` and `ZoomFactor` are both doubled),
26980   /// then the page does not display a change in `window.innerWidth` or
26981   /// `window.innerHeight` and the WebView renders the content at the new size
26982   /// and zoom without intermediate renderings.  This function also updates
26983   /// just one of `ZoomFactor` or `Bounds` by passing in the new value for one
26984   /// and the current value for the other.
26985   ///
26986   /// \snippet ViewComponent.cpp SetBoundsAndZoomFactor
26987 
26988   HRESULT SetBoundsAndZoomFactor(in RECT bounds, in double zoomFactor);
26989 
26990   /// Moves focus into WebView.  WebView gets focus and focus is set to
26991   /// correspondent element in the page hosted in the WebView.  For
26992   /// Programmatic reason, focus is set to previously focused element or the
26993   /// default element if no previously focused element exists.  For `Next`
26994   /// reason, focus is set to the first element.  For `Previous` reason, focus
26995   /// is set to the last element.  WebView changes focus through user
26996   /// interaction including selecting into a WebView or Tab into it.  For
26997   /// tabbing, the app runs MoveFocus with Next or Previous to align with Tab
26998   /// and Shift+Tab respectively when it decides the WebView is the next
26999   /// element that may exist in a tab.  Or, the app runs `IsDialogMessage`
27000   /// as part of the associated message loop to allow the platform to auto
27001   /// handle tabbing.  The platform rotates through all windows with
27002   /// `WS_TABSTOP`.  When the WebView gets focus from `IsDialogMessage`, it is
27003   /// internally put the focus on the first or last element for tab and
27004   /// Shift+Tab respectively.
27005   ///
27006   /// \snippet App.cpp MoveFocus0
27007   ///
27008   /// \snippet ControlComponent.cpp MoveFocus1
27009   ///
27010   /// \snippet ControlComponent.cpp MoveFocus2
27011 
27012   HRESULT MoveFocus(in COREWEBVIEW2_MOVE_FOCUS_REASON reason);
27013 
27014   /// Adds an event handler for the `MoveFocusRequested` event.
27015   /// `MoveFocusRequested` runs when user tries to tab out of the WebView.  The
27016   /// focus of the WebView has not changed when this event is run.
27017   ///
27018   /// \snippet ControlComponent.cpp MoveFocusRequested
27019 
27020   HRESULT add_MoveFocusRequested(
27021       /+[in]+/ ICoreWebView2MoveFocusRequestedEventHandler eventHandler,
27022       @("out") EventRegistrationToken* token);
27023 
27024   /// Removes an event handler previously added with `add_MoveFocusRequested`.
27025 
27026   HRESULT remove_MoveFocusRequested(
27027       in EventRegistrationToken token);
27028 
27029   /// Adds an event handler for the `GotFocus` event.  `GotFocus` runs when
27030   /// WebView has focus.
27031 
27032   HRESULT add_GotFocus(
27033       /+[in]+/ ICoreWebView2FocusChangedEventHandler eventHandler,
27034       @("out") EventRegistrationToken* token);
27035 
27036   /// Removes an event handler previously added with `add_GotFocus`.
27037 
27038   HRESULT remove_GotFocus(
27039       in EventRegistrationToken token);
27040 
27041   /// Adds an event handler for the `LostFocus` event.  `LostFocus` runs when
27042   /// WebView loses focus.  In the case where `MoveFocusRequested` event is
27043   /// run, the focus is still on WebView when `MoveFocusRequested` event runs.
27044   /// `LostFocus` only runs afterwards when code of the app or default action
27045   /// of `MoveFocusRequested` event set focus away from WebView.
27046 
27047   HRESULT add_LostFocus(
27048       /+[in]+/ ICoreWebView2FocusChangedEventHandler eventHandler,
27049       @("out") EventRegistrationToken* token);
27050 
27051   /// Removes an event handler previously added with `add_LostFocus`.
27052 
27053   HRESULT remove_LostFocus(
27054       in EventRegistrationToken token);
27055 
27056   /// Adds an event handler for the `AcceleratorKeyPressed` event.
27057   /// `AcceleratorKeyPressed` runs when an accelerator key or key combo is
27058   /// pressed or released while the WebView is focused.  A key is considered an
27059   ///  accelerator if either of the following conditions are true.
27060   ///
27061   /// *   Ctrl or Alt is currently being held.
27062   /// *   The pressed key does not map to a character.
27063   ///
27064   /// A few specific keys are never considered accelerators, such as Shift.
27065   /// The `Escape` key is always considered an accelerator.
27066   ///
27067   /// Auto-repeated key events caused by holding the key down also triggers
27068   /// this event.  Filter out the auto-repeated key events by verifying the
27069   /// `KeyEventLParam` or `PhysicalKeyStatus` event args.
27070   ///
27071   /// In windowed mode, the event handler is run synchronously.  Until you
27072   /// run `Handled()` on the event args or the event handler returns, the
27073   /// browser process is blocked and outgoing cross-process COM requests fail
27074   /// with `RPC_E_CANTCALLOUT_ININPUTSYNCCALL`.  All `CoreWebView2` API methods
27075   /// work, however.
27076   ///
27077   /// In windowless mode, the event handler is run asynchronously.  Further
27078   /// input do not reach the browser until the event handler returns or
27079   /// `Handled()` is run, but the browser process is not blocked, and outgoing
27080   /// COM requests work normally.
27081   ///
27082   /// It is recommended to run `Handled(TRUE)` as early as are able to know
27083   /// that you want to handle the accelerator key.
27084   ///
27085   /// \snippet ControlComponent.cpp AcceleratorKeyPressed
27086 
27087   HRESULT add_AcceleratorKeyPressed(
27088     /+[in]+/ ICoreWebView2AcceleratorKeyPressedEventHandler eventHandler,
27089     @("out") EventRegistrationToken* token);
27090 
27091   /// Removes an event handler previously added with
27092   /// `add_AcceleratorKeyPressed`.
27093 
27094   HRESULT remove_AcceleratorKeyPressed(
27095     in EventRegistrationToken token);
27096 
27097   /// The parent window provided by the app that this WebView is using to
27098   /// render content.  This API initially returns the window passed into
27099   /// `CreateCoreWebView2Controller`.
27100 
27101   @(" propget")
27102 	HRESULT get_ParentWindow(@("out, retval") HWND* parentWindow);
27103 
27104   /// Sets the parent window for the WebView.  This causes the WebView to
27105   /// re-parent the main WebView window to the newly provided window.
27106 
27107   @(" propput")
27108 	HRESULT put_ParentWindow(in HWND parentWindow);
27109 
27110   /// This is a notification separate from `Bounds` that tells WebView that the
27111   ///  main WebView parent (or any ancestor) `HWND` moved.  This is needed
27112   /// for accessibility and certain dialogs in WebView to work correctly.
27113   ///
27114   /// \snippet ViewComponent.cpp NotifyParentWindowPositionChanged
27115 
27116   HRESULT NotifyParentWindowPositionChanged();
27117 
27118   /// Closes the WebView and cleans up the underlying browser instance.
27119   /// Cleaning up the browser instance releases the resources powering the
27120   /// WebView.  The browser instance is shut down if no other WebViews are
27121   /// using it.
27122   ///
27123   /// After running `Close`, most methods will fail and event handlers stop
27124   /// running.  Specifically, the WebView releases the associated references to
27125   /// any associated event handlers when `Close` is run.
27126   ///
27127   /// `Close` is implicitly run when the `CoreWebView2Controller` loses the
27128   /// final reference and is destructed.  But it is best practice to
27129   /// explicitly run `Close` to avoid any accidental cycle of references
27130   /// between the WebView and the app code.  Specifically, if you capture a
27131   /// reference to the WebView in an event handler you create a reference cycle
27132   /// between the WebView and the event handler.  Run `Close` to break the
27133   /// cycle by releasing all event handlers.  But to avoid the situation, it is
27134   /// best to both explicitly run `Close` on the WebView and to not capture a
27135   /// reference to the WebView to ensure the WebView is cleaned up correctly.
27136   /// `Close` is synchronous and won't trigger the `beforeunload` event.
27137   ///
27138   /// \snippet AppWindow.cpp Close
27139   HRESULT Close();
27140 
27141   /// Gets the `CoreWebView2` associated with this `CoreWebView2Controller`.
27142 
27143   @(" propget")
27144 	HRESULT get_CoreWebView2(@("out, retval") ICoreWebView2 * coreWebView2);
27145 }
27146 
27147 /// A continuation of the ICoreWebView2Controller interface.
27148 const GUID IID_ICoreWebView2Controller2 = ICoreWebView2Controller2.iid;
27149 
27150 interface ICoreWebView2Controller2 : ICoreWebView2Controller
27151 {
27152     static const GUID iid = { 0xc979903e,0xd4ca,0x4228,[ 0x92,0xeb,0x47,0xee,0x3f,0xa9,0x6e,0xab ] };
27153   /// The `DefaultBackgroundColor` property is the color WebView renders
27154   /// underneath all web content. This means WebView renders this color when
27155   /// there is no web content loaded such as before the initial navigation or
27156   /// between navigations. This also means web pages with undefined css
27157   /// background properties or background properties containing transparent
27158   /// pixels will render their contents over this color. Web pages with defined
27159   /// and opaque background properties that span the page will obscure the
27160   /// `DefaultBackgroundColor` and display normally. The default value for this
27161   /// property is white to resemble the native browser experience.
27162   ///
27163   /// The Color is specified by the COREWEBVIEW2_COLOR that represents an RGBA
27164   /// value. The `A` represents an Alpha value, meaning
27165   /// `DefaultBackgroundColor` can be transparent. In the case of a transparent
27166   /// `DefaultBackgroundColor` WebView will render hosting app content as the
27167   /// background. This Alpha value is not supported on Windows 7. Any `A` value
27168   /// other than 255 will result in E_INVALIDARG on Windows 7.
27169   /// It is supported on all other WebView compatible platforms.
27170   ///
27171   /// Semi-transparent colors are not currently supported by this API and
27172   /// setting `DefaultBackgroundColor` to a semi-transparent color will fail
27173   /// with E_INVALIDARG. The only supported alpha values are 0 and 255, all
27174   /// other values will result in E_INVALIDARG.
27175   /// `DefaultBackgroundColor` can only be an opaque color or transparent.
27176   ///
27177   /// This value may also be set by using the
27178   /// `WEBVIEW2_DEFAULT_BACKGROUND_COLOR` environment variable. There is a
27179   /// known issue with background color where setting the color by API can
27180   /// still leave the app with a white flicker before the
27181   /// `DefaultBackgroundColor` takes effect. Setting the color via environment
27182   /// variable solves this issue. The value must be a hex value that can
27183   /// optionally prepend a 0x. The value must account for the alpha value
27184   /// which is represented by the first 2 digits. So any hex value fewer than 8
27185   /// digits will assume a prepended 00 to the hex value and result in a
27186   /// transparent color.
27187   /// `get_DefaultBackgroundColor` will return the result of this environment
27188   /// variable if used. This environment variable can only set the
27189   /// `DefaultBackgroundColor` once. Subsequent updates to background color
27190   /// must be done through API call.
27191   ///
27192   /// \snippet ViewComponent.cpp DefaultBackgroundColor
27193   @(" propget")
27194 	HRESULT get_DefaultBackgroundColor(
27195     @("out, retval") COREWEBVIEW2_COLOR* backgroundColor);
27196 
27197   /// Sets the `DefaultBackgroundColor` property.
27198   @(" propput")
27199 	HRESULT put_DefaultBackgroundColor(
27200     in COREWEBVIEW2_COLOR backgroundColor);
27201 }
27202 
27203 /// A continuation of the ICoreWebView2Controller2 interface.
27204 const GUID IID_ICoreWebView2Controller3 = ICoreWebView2Controller3.iid;
27205 
27206 interface ICoreWebView2Controller3 : ICoreWebView2Controller2
27207 {
27208     static const GUID iid = { 0xf9614724,0x5d2b,0x41dc,[ 0xae,0xf7,0x73,0xd6,0x2b,0x51,0x54,0x3b ] };
27209   /// The rasterization scale for the WebView. The rasterization scale is the
27210   /// combination of the monitor DPI scale and text scaling set by the user.
27211   /// This value should be updated when the DPI scale of the app's top level
27212   /// window changes (i.e. monitor DPI scale changes or window changes monitor)
27213   /// or when the text scale factor of the system changes.
27214   ///
27215   /// \snippet AppWindow.cpp DPIChanged
27216   ///
27217   /// \snippet AppWindow.cpp TextScaleChanged1
27218   ///
27219   /// \snippet AppWindow.cpp TextScaleChanged2
27220   ///
27221   /// Rasterization scale applies to the WebView content, as well as
27222   /// popups, context menus, scroll bars, and so on. Normal app scaling
27223   /// scenarios should use the ZoomFactor property or SetBoundsAndZoomFactor
27224   /// API which only scale the rendered HTML content and not popups, context
27225   /// menus, scroll bars, and so on.
27226   ///
27227   /// \snippet ViewComponent.cpp RasterizationScale
27228   @(" propget")
27229 	HRESULT get_RasterizationScale(@("out, retval") double* scale);
27230   /// Set the rasterization scale property.
27231   @(" propput")
27232 	HRESULT put_RasterizationScale(in double scale);
27233 
27234   /// ShouldDetectMonitorScaleChanges property determines whether the WebView
27235   /// attempts to track monitor DPI scale changes. When true, the WebView will
27236   /// track monitor DPI scale changes, update the RasterizationScale property,
27237   /// and raises RasterizationScaleChanged event. When false, the WebView will
27238   /// not track monitor DPI scale changes, and the app must update the
27239   /// RasterizationScale property itself. RasterizationScaleChanged event will
27240   /// never raise when ShouldDetectMonitorScaleChanges is false. Apps that want
27241   /// to set their own rasterization scale should set this property to false to
27242   /// avoid the WebView2 updating the RasterizationScale property to match the
27243   /// monitor DPI scale.
27244   @(" propget")
27245 	HRESULT get_ShouldDetectMonitorScaleChanges(@("out, retval") BOOL* value);
27246   /// Set the ShouldDetectMonitorScaleChanges property.
27247   @(" propput")
27248 	HRESULT put_ShouldDetectMonitorScaleChanges(in BOOL value);
27249 
27250   /// Add an event handler for the RasterizationScaleChanged event.
27251   /// The event is raised when the WebView detects that the monitor DPI scale
27252   /// has changed, ShouldDetectMonitorScaleChanges is true, and the WebView has
27253   /// changed the RasterizationScale property.
27254   ///
27255   /// \snippet ViewComponent.cpp RasterizationScaleChanged
27256   HRESULT add_RasterizationScaleChanged(
27257     /+[in]+/ ICoreWebView2RasterizationScaleChangedEventHandler eventHandler,
27258     @("out") EventRegistrationToken* token);
27259   /// Remove an event handler previously added with
27260   /// add_RasterizationScaleChanged.
27261   HRESULT remove_RasterizationScaleChanged(
27262     in EventRegistrationToken token);
27263 
27264   /// BoundsMode affects how setting the Bounds and RasterizationScale
27265   /// properties work. Bounds mode can either be in COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS
27266   /// mode or COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE mode.
27267   ///
27268   /// When the mode is in COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS, setting the bounds
27269   /// property will set the size of the WebView in raw screen pixels. Changing
27270   /// the rasterization scale in this mode won't change the raw pixel size of
27271   /// the WebView and will only change the rasterization scale.
27272   ///
27273   /// When the mode is in COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE, setting the
27274   /// bounds property will change the logical size of the WebView which can be
27275   /// described by the following equation:
27276   /// ```text
27277   /// Logical size * rasterization scale = Raw Pixel size
27278   /// ```
27279   /// In this case, changing the rasterization scale will keep the logical size
27280   /// the same and change the raw pixel size.
27281   ///
27282   /// \snippet ViewComponent.cpp BoundsMode
27283   @(" propget")
27284 	HRESULT get_BoundsMode(
27285     @("out, retval") COREWEBVIEW2_BOUNDS_MODE* boundsMode);
27286   /// Set the BoundsMode property.
27287   @(" propput")
27288 	HRESULT put_BoundsMode(in COREWEBVIEW2_BOUNDS_MODE boundsMode);
27289 }
27290 
27291 /// This is the ICoreWebView2Controller4 interface.
27292 /// The ICoreWebView2Controller4 provides interface to enable/disable external drop.
27293 const GUID IID_ICoreWebView2Controller4 = ICoreWebView2Controller4.iid;
27294 
27295 interface ICoreWebView2Controller4 : ICoreWebView2Controller3
27296 {
27297     static const GUID iid = { 0x97d418d5,0xa426,0x4e49,[ 0xa1,0x51,0xe1,0xa1,0x0f,0x32,0x7d,0x9e ] };
27298   /// Gets the `AllowExternalDrop` property which is used to configure the
27299   /// capability that dragging objects from outside the bounds of webview2 and
27300   /// dropping into webview2 is allowed or disallowed. The default value is
27301   /// TRUE.
27302   ///
27303   /// \snippet SettingsComponent.cpp ToggleAllowExternalDrop
27304   @(" propget")
27305 	HRESULT get_AllowExternalDrop(@(" out, retval ") BOOL * value);
27306   /// Sets the `AllowExternalDrop` property which is used to configure the
27307   /// capability that dragging objects from outside the bounds of webview2 and
27308   /// dropping into webview2 is allowed or disallowed.
27309   ///
27310   /// \snippet SettingsComponent.cpp ToggleAllowExternalDrop
27311   @(" propput")
27312 	HRESULT put_AllowExternalDrop(in BOOL value);
27313 }
27314 
27315 /// This interface is an extension of the ICoreWebView2Controller interface to
27316 /// support visual hosting. An object implementing the
27317 /// ICoreWebView2CompositionController interface will also implement
27318 /// ICoreWebView2Controller. Callers are expected to use
27319 /// ICoreWebView2Controller for resizing, visibility, focus, and so on, and
27320 /// then use ICoreWebView2CompositionController to connect to a composition
27321 /// tree and provide input meant for the WebView.
27322 const GUID IID_ICoreWebView2CompositionController = ICoreWebView2CompositionController.iid;
27323 
27324 interface ICoreWebView2CompositionController : IUnknown
27325 {
27326     static const GUID iid = { 0x3df9b733,0xb9ae,0x4a15,[ 0x86,0xb4,0xeb,0x9e,0xe9,0x82,0x64,0x69 ] };
27327   /// The RootVisualTarget is a visual in the hosting app's visual tree. This
27328   /// visual is where the WebView will connect its visual tree. The app uses
27329   /// this visual to position the WebView within the app. The app still needs
27330   /// to use the Bounds property to size the WebView. The RootVisualTarget
27331   /// property can be an IDCompositionVisual or a
27332   /// Windows::UI::Composition::ContainerVisual. WebView will connect its visual
27333   /// tree to the provided visual before returning from the property setter. The
27334   /// app needs to commit on its device setting the RootVisualTarget property.
27335   /// The RootVisualTarget property supports being set to nullptr to disconnect
27336   /// the WebView from the app's visual tree.
27337   /// \snippet ViewComponent.cpp SetRootVisualTarget
27338   /// \snippet ViewComponent.cpp BuildDCompTree
27339   @(" propget")
27340 	HRESULT get_RootVisualTarget(@("out, retval") IUnknown * target);
27341   /// Set the RootVisualTarget property.
27342   @(" propput")
27343 	HRESULT put_RootVisualTarget(/+[in]+/ IUnknown target);
27344 
27345   /// If eventKind is COREWEBVIEW2_MOUSE_EVENT_KIND_HORIZONTAL_WHEEL or
27346   /// COREWEBVIEW2_MOUSE_EVENT_KIND_WHEEL, then mouseData specifies the amount of
27347   /// wheel movement. A positive value indicates that the wheel was rotated
27348   /// forward, away from the user; a negative value indicates that the wheel was
27349   /// rotated backward, toward the user. One wheel click is defined as
27350   /// WHEEL_DELTA, which is 120.
27351   /// If eventKind is COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOUBLE_CLICK
27352   /// COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOWN, or
27353   /// COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_UP, then mouseData specifies which X
27354   /// buttons were pressed or released. This value should be 1 if the first X
27355   /// button is pressed/released and 2 if the second X button is
27356   /// pressed/released.
27357   /// If eventKind is COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE, then virtualKeys,
27358   /// mouseData, and point should all be zero.
27359   /// If eventKind is any other value, then mouseData should be zero.
27360   /// Point is expected to be in the client coordinate space of the WebView.
27361   /// To track mouse events that start in the WebView and can potentially move
27362   /// outside of the WebView and host application, calling SetCapture and
27363   /// ReleaseCapture is recommended.
27364   /// To dismiss hover popups, it is also recommended to send
27365   /// COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE messages.
27366   /// \snippet ViewComponent.cpp SendMouseInput
27367   HRESULT SendMouseInput(
27368     in COREWEBVIEW2_MOUSE_EVENT_KIND eventKind,
27369     in COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS virtualKeys,
27370     in UINT32 mouseData,
27371     in POINT point);
27372 
27373   /// SendPointerInput accepts touch or pen pointer input of types defined in
27374   /// COREWEBVIEW2_POINTER_EVENT_KIND. Any pointer input from the system must be
27375   /// converted into an ICoreWebView2PointerInfo first.
27376   HRESULT SendPointerInput(
27377     in COREWEBVIEW2_POINTER_EVENT_KIND eventKind,
27378     /+[in]+/ ICoreWebView2PointerInfo pointerInfo);
27379 
27380   /// The current cursor that WebView thinks it should be. The cursor should be
27381   /// set in WM_SETCURSOR through \::SetCursor or set on the corresponding
27382   /// parent/ancestor HWND of the WebView through \::SetClassLongPtr. The HCURSOR
27383   /// can be freed so CopyCursor/DestroyCursor is recommended to keep your own
27384   /// copy if you are doing more than immediately setting the cursor.
27385   @(" propget")
27386 	HRESULT get_Cursor(@("out, retval") HCURSOR* cursor);
27387 
27388   /// The current system cursor ID reported by the underlying rendering engine
27389   /// for WebView. For example, most of the time, when the cursor is over text,
27390   /// this will return the int value for IDC_IBEAM. The systemCursorId is only
27391   /// valid if the rendering engine reports a default Windows cursor resource
27392   /// value. Navigate to
27393   /// [LoadCursorW](/windows/win32/api/winuser/nf-winuser-loadcursorw) for more
27394   /// details. Otherwise, if custom CSS cursors are being used, this will return
27395   /// 0. To actually use systemCursorId in LoadCursor or LoadImage,
27396   /// MAKEINTRESOURCE must be called on it first.
27397   ///
27398   /// \snippet ViewComponent.cpp SystemCursorId
27399   @(" propget")
27400 	HRESULT get_SystemCursorId(@("out, retval") UINT32* systemCursorId);
27401 
27402   /// Add an event handler for the CursorChanged event.
27403   /// The event is raised when WebView thinks the cursor should be changed. For
27404   /// example, when the mouse cursor is currently the default cursor but is then
27405   /// moved over text, it may try to change to the IBeam cursor.
27406   ///
27407   /// It is expected for the developer to send
27408   /// COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE messages (in addition to
27409   /// COREWEBVIEW2_MOUSE_EVENT_KIND_MOVE messages) through the SendMouseInput
27410   /// API. This is to ensure that the mouse is actually within the WebView that
27411   /// sends out CursorChanged events.
27412   ///
27413   /// \snippet ViewComponent.cpp CursorChanged
27414   HRESULT add_CursorChanged(
27415       /+[in]+/ ICoreWebView2CursorChangedEventHandler eventHandler,
27416       @("out") EventRegistrationToken* token);
27417   /// Remove an event handler previously added with add_CursorChanged.
27418   HRESULT remove_CursorChanged(
27419       in EventRegistrationToken token);
27420 }
27421 
27422 /// A continuation of the ICoreWebView2CompositionController interface.
27423 const GUID IID_ICoreWebView2CompositionController2 = ICoreWebView2CompositionController2.iid;
27424 
27425 interface ICoreWebView2CompositionController2 : ICoreWebView2CompositionController
27426 {
27427     static const GUID iid = { 0x0b6a3d24,0x49cb,0x4806,[ 0xba,0x20,0xb5,0xe0,0x73,0x4a,0x7b,0x26 ] };
27428   /// Returns the Automation Provider for the WebView. This object implements
27429   /// IRawElementProviderSimple.
27430   @(" propget")
27431 	HRESULT get_AutomationProvider(@("out, retval") IUnknown * provider);
27432 }
27433 
27434 /// This interface is the continuation of the
27435 /// ICoreWebView2CompositionController2 interface to manage drag and drop.
27436 const GUID IID_ICoreWebView2CompositionController3 = ICoreWebView2CompositionController3.iid;
27437 
27438 interface ICoreWebView2CompositionController3 : ICoreWebView2CompositionController2
27439 {
27440     static const GUID iid = { 0x9570570e,0x4d76,0x4361,[ 0x9e,0xe1,0xf0,0x4d,0x0d,0xbd,0xfb,0x1e ] };
27441   /// This function corresponds to [IDropTarget::DragEnter](/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragenter).
27442   ///
27443   /// This function has a dependency on AllowExternalDrop property of
27444   /// CoreWebView2Controller and return E_FAIL to callers to indicate this
27445   /// operation is not allowed if AllowExternalDrop property is set to false.
27446   ///
27447   /// The hosting application must register as an IDropTarget and implement
27448   /// and forward DragEnter calls to this function.
27449   ///
27450   /// point parameter must be modified to include the WebView's offset and be in
27451   /// the WebView's client coordinates (Similar to how SendMouseInput works).
27452   ///
27453   /// \snippet DropTarget.cpp DragEnter
27454   HRESULT DragEnter(
27455       in IDataObject* dataObject,
27456       in DWORD keyState,
27457       in POINT point,
27458       @("out, retval") DWORD* effect);
27459 
27460   /// This function corresponds to [IDropTarget::DragLeave](/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragleave).
27461   ///
27462   /// This function has a dependency on AllowExternalDrop property of
27463   /// CoreWebView2Controller and return E_FAIL to callers to indicate this
27464   /// operation is not allowed if AllowExternalDrop property is set to false.
27465   ///
27466   /// The hosting application must register as an IDropTarget and implement
27467   /// and forward DragLeave calls to this function.
27468   ///
27469   /// \snippet DropTarget.cpp DragLeave
27470   HRESULT DragLeave();
27471 
27472   /// This function corresponds to [IDropTarget::DragOver](/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragover).
27473   ///
27474   /// This function has a dependency on AllowExternalDrop property of
27475   /// CoreWebView2Controller and return E_FAIL to callers to indicate this
27476   /// operation is not allowed if AllowExternalDrop property is set to false.
27477   ///
27478   /// The hosting application must register as an IDropTarget and implement
27479   /// and forward DragOver calls to this function.
27480   ///
27481   /// point parameter must be modified to include the WebView's offset and be in
27482   /// the WebView's client coordinates (Similar to how SendMouseInput works).
27483   ///
27484   /// \snippet DropTarget.cpp DragOver
27485   HRESULT DragOver(
27486       in DWORD keyState,
27487       in POINT point,
27488       @("out, retval") DWORD* effect);
27489 
27490   /// This function corresponds to [IDropTarget::Drop](/windows/win32/api/oleidl/nf-oleidl-idroptarget-drop).
27491   ///
27492   /// This function has a dependency on AllowExternalDrop property of
27493   /// CoreWebView2Controller and return E_FAIL to callers to indicate this
27494   /// operation is not allowed if AllowExternalDrop property is set to false.
27495   ///
27496   /// The hosting application must register as an IDropTarget and implement
27497   /// and forward Drop calls to this function.
27498   ///
27499   /// point parameter must be modified to include the WebView's offset and be in
27500   /// the WebView's client coordinates (Similar to how SendMouseInput works).
27501   ///
27502   /// \snippet DropTarget.cpp Drop
27503   HRESULT Drop(
27504       in IDataObject* dataObject,
27505       in DWORD keyState,
27506       in POINT point,
27507       @("out, retval") DWORD* effect);
27508 }
27509 
27510 /// This interface is used to complete deferrals on event args that support
27511 /// getting deferrals using the `GetDeferral` method.
27512 
27513 const GUID IID_ICoreWebView2Deferral = ICoreWebView2Deferral.iid;
27514 
27515 interface ICoreWebView2Deferral : IUnknown
27516 {
27517     static const GUID iid = { 0xc10e7f7b,0xb585,0x46f0,[ 0xa6,0x23,0x8b,0xef,0xbf,0x3e,0x4e,0xe0 ] };
27518 
27519   /// Completes the associated deferred event.  Complete should only be run
27520   /// once for each deferral taken.
27521 
27522   HRESULT Complete();
27523 }
27524 
27525 /// Defines properties that enable, disable, or modify WebView features.
27526 /// Changes to `IsGeneralAutofillEnabled` and `IsPasswordAutosaveEnabled`
27527 /// apply immediately, while other setting changes made after `NavigationStarting`
27528 /// event do not apply until the next top-level navigation.
27529 
27530 const GUID IID_ICoreWebView2Settings = ICoreWebView2Settings.iid;
27531 
27532 interface ICoreWebView2Settings : IUnknown
27533 {
27534     static const GUID iid = { 0xe562e4f0,0xd7fa,0x43ac,[ 0x8d,0x71,0xc0,0x51,0x50,0x49,0x9f,0x00 ] };
27535 
27536   /// Controls if running JavaScript is enabled in all future navigations in
27537   /// the WebView.  This only affects scripts in the document.  Scripts
27538   /// injected with `ExecuteScript` runs even if script is disabled.
27539   /// The default value is `TRUE`.
27540   ///
27541   /// \snippet SettingsComponent.cpp IsScriptEnabled
27542   @(" propget")
27543 	HRESULT get_IsScriptEnabled(
27544       @("out, retval") BOOL* isScriptEnabled);
27545 
27546   /// Sets the `IsScriptEnabled` property.
27547   @(" propput")
27548 	HRESULT put_IsScriptEnabled(in BOOL isScriptEnabled);
27549 
27550   /// The `IsWebMessageEnabled` property is used when loading a new HTML
27551   /// document.  If set to `TRUE`, communication from the host to the top-level
27552   ///  HTML document of the WebView is allowed using `PostWebMessageAsJson`,
27553   /// `PostWebMessageAsString`, and message event of `window.chrome.webview`.
27554   /// For more information, navigate to PostWebMessageAsJson.  Communication
27555   /// from the top-level HTML document of the WebView to the host is allowed
27556   /// using the postMessage function of `window.chrome.webview` and
27557   /// `add_WebMessageReceived` method.  For more information, navigate to
27558   /// [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived).
27559   /// If set to false, then communication is disallowed.  `PostWebMessageAsJson`
27560   /// and `PostWebMessageAsString` fails with `E_ACCESSDENIED` and
27561   /// `window.chrome.webview.postMessage` fails by throwing an instance of an
27562   /// `Error` object. The default value is `TRUE`.
27563   ///
27564   /// \snippet ScenarioWebMessage.cpp IsWebMessageEnabled
27565   @(" propget")
27566 	HRESULT get_IsWebMessageEnabled(
27567       @("out, retval") BOOL* isWebMessageEnabled);
27568 
27569   /// Sets the `IsWebMessageEnabled` property.
27570   @(" propput")
27571 	HRESULT put_IsWebMessageEnabled(in BOOL isWebMessageEnabled);
27572 
27573   /// `AreDefaultScriptDialogsEnabled` is used when loading a new HTML
27574   /// document.  If set to `FALSE`, WebView2 does not render the default JavaScript
27575   /// dialog box (Specifically those displayed by the JavaScript alert,
27576   /// confirm, prompt functions and `beforeunload` event).  Instead, if an
27577   /// event handler is set using `add_ScriptDialogOpening`, WebView sends an
27578   /// event that contains all of the information for the dialog and allow the
27579   /// host app to show a custom UI.
27580   /// The default value is `TRUE`.
27581   @(" propget")
27582 	HRESULT get_AreDefaultScriptDialogsEnabled(
27583       @("out, retval") BOOL* areDefaultScriptDialogsEnabled);
27584 
27585   /// Sets the `AreDefaultScriptDialogsEnabled` property.
27586   @(" propput")
27587 	HRESULT put_AreDefaultScriptDialogsEnabled(
27588       in BOOL areDefaultScriptDialogsEnabled);
27589 
27590   /// `IsStatusBarEnabled` controls whether the status bar is displayed.  The
27591   /// status bar is usually displayed in the lower left of the WebView and
27592   /// shows things such as the URI of a link when the user hovers over it and
27593   /// other information.
27594   /// The default value is `TRUE`.
27595   /// The status bar UI can be altered by web content and should not be considered secure.
27596   @(" propget")
27597 	HRESULT get_IsStatusBarEnabled(@("out, retval") BOOL* isStatusBarEnabled);
27598 
27599   /// Sets the `IsStatusBarEnabled` property.
27600   @(" propput")
27601 	HRESULT put_IsStatusBarEnabled(in BOOL isStatusBarEnabled);
27602 
27603   /// `AreDevToolsEnabled` controls whether the user is able to use the context
27604   /// menu or keyboard shortcuts to open the DevTools window.
27605   /// The default value is `TRUE`.
27606   @(" propget")
27607 	HRESULT get_AreDevToolsEnabled(@("out, retval") BOOL* areDevToolsEnabled);
27608 
27609   /// Sets the `AreDevToolsEnabled` property.
27610   @(" propput")
27611 	HRESULT put_AreDevToolsEnabled(in BOOL areDevToolsEnabled);
27612 
27613   /// The `AreDefaultContextMenusEnabled` property is used to prevent default
27614   /// context menus from being shown to user in WebView.
27615   /// The default value is `TRUE`.
27616   ///
27617   /// \snippet SettingsComponent.cpp DisableContextMenu
27618   @(" propget")
27619 	HRESULT get_AreDefaultContextMenusEnabled(@("out, retval") BOOL* enabled);
27620 
27621   /// Sets the `AreDefaultContextMenusEnabled` property.
27622   @(" propput")
27623 	HRESULT put_AreDefaultContextMenusEnabled(in BOOL enabled);
27624 
27625   /// The `AreHostObjectsAllowed` property is used to control whether host
27626   /// objects are accessible from the page in WebView.
27627   /// The default value is `TRUE`.
27628   ///
27629   /// \snippet SettingsComponent.cpp HostObjectsAccess
27630   @(" propget")
27631 	HRESULT get_AreHostObjectsAllowed(@("out, retval") BOOL* allowed);
27632 
27633   /// Sets the `AreHostObjectsAllowed` property.
27634 
27635   @(" propput")
27636 	HRESULT put_AreHostObjectsAllowed(in BOOL allowed);
27637 
27638   /// The `IsZoomControlEnabled` property is used to prevent the user from
27639   /// impacting the zoom of the WebView.  When disabled, the user is not able
27640   /// to zoom using Ctrl++, Ctrl+-, or Ctrl+mouse wheel, but the zoom
27641   /// is set using `ZoomFactor` API.  The default value is `TRUE`.
27642   ///
27643   /// \snippet SettingsComponent.cpp DisableZoomControl
27644 
27645   @(" propget")
27646 	HRESULT get_IsZoomControlEnabled(@("out, retval") BOOL* enabled);
27647 
27648   /// Sets the `IsZoomControlEnabled` property.
27649 
27650   @(" propput")
27651 	HRESULT put_IsZoomControlEnabled(in BOOL enabled);
27652 
27653   /// The `IsBuiltInErrorPageEnabled` property is used to disable built in
27654   /// error page for navigation failure and render process failure.  When
27655   /// disabled, a blank page is displayed when the related error happens.
27656   /// The default value is `TRUE`.
27657   ///
27658   /// \snippet SettingsComponent.cpp BuiltInErrorPageEnabled
27659   @(" propget")
27660 	HRESULT get_IsBuiltInErrorPageEnabled(@("out, retval") BOOL* enabled);
27661 
27662   /// Sets the `IsBuiltInErrorPageEnabled` property.
27663   @(" propput")
27664 	HRESULT put_IsBuiltInErrorPageEnabled(in BOOL enabled);
27665 }
27666 
27667 /// A continuation of the ICoreWebView2Settings interface that manages the user agent.
27668 
27669 const GUID IID_ICoreWebView2Settings2 = ICoreWebView2Settings2.iid;
27670 
27671 interface ICoreWebView2Settings2 : ICoreWebView2Settings
27672 {
27673     static const GUID iid = { 0xee9a0f68,0xf46c,0x4e32,[ 0xac,0x23,0xef,0x8c,0xac,0x22,0x4d,0x2a ] };
27674   /// Returns the User Agent. The default value is the default User Agent of the
27675   /// Microsoft Edge browser.
27676   ///
27677   /// The caller must free the returned string with `CoTaskMemFree`.  See
27678   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27679   ///
27680   /// \snippet SettingsComponent.cpp UserAgent
27681   @(" propget")
27682 	HRESULT get_UserAgent(@("out, retval") LPWSTR* userAgent);
27683   /// Sets the `UserAgent` property. This property may be overridden if
27684   /// the User-Agent header is set in a request. If the parameter is empty
27685   /// the User Agent will not be updated and the current User Agent will remain.
27686   /// Returns `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if the owning WebView is
27687   /// closed.
27688   @(" propput")
27689 	HRESULT put_UserAgent(in LPCWSTR userAgent);
27690 }
27691 
27692 /// A continuation of the ICoreWebView2Settings interface that manages whether
27693 /// browser accelerator keys are enabled.
27694 const GUID IID_ICoreWebView2Settings3 = ICoreWebView2Settings3.iid;
27695 
27696 interface ICoreWebView2Settings3 : ICoreWebView2Settings2
27697 {
27698     static const GUID iid = { 0xfdb5ab74,0xaf33,0x4854,[ 0x84,0xf0,0x0a,0x63,0x1d,0xeb,0x5e,0xba ] };
27699   /// When this setting is set to FALSE, it disables all accelerator keys that
27700   /// access features specific to a web browser, including but not limited to:
27701   ///  - Ctrl-F and F3 for Find on Page
27702   ///  - Ctrl-P for Print
27703   ///  - Ctrl-R and F5 for Reload
27704   ///  - Ctrl-Plus and Ctrl-Minus for zooming
27705   ///  - Ctrl-Shift-C and F12 for DevTools
27706   ///  - Special keys for browser functions, such as Back, Forward, and Search
27707   ///
27708   /// It does not disable accelerator keys related to movement and text editing,
27709   /// such as:
27710   ///  - Home, End, Page Up, and Page Down
27711   ///  - Ctrl-X, Ctrl-C, Ctrl-V
27712   ///  - Ctrl-A for Select All
27713   ///  - Ctrl-Z for Undo
27714   ///
27715   /// Those accelerator keys will always be enabled unless they are handled in
27716   /// the `AcceleratorKeyPressed` event.
27717   ///
27718   /// This setting has no effect on the `AcceleratorKeyPressed` event.  The event
27719   /// will be fired for all accelerator keys, whether they are enabled or not.
27720   ///
27721   /// The default value for `AreBrowserAcceleratorKeysEnabled` is TRUE.
27722   ///
27723   /// \snippet SettingsComponent.cpp AreBrowserAcceleratorKeysEnabled
27724   @(" propget")
27725 	HRESULT get_AreBrowserAcceleratorKeysEnabled(
27726       @("out, retval") BOOL* areBrowserAcceleratorKeysEnabled);
27727 
27728   /// Sets the `AreBrowserAcceleratorKeysEnabled` property.
27729   @(" propput")
27730 	HRESULT put_AreBrowserAcceleratorKeysEnabled(
27731       in BOOL areBrowserAcceleratorKeysEnabled);
27732 }
27733 
27734 /// A continuation of the ICoreWebView2Settings interface to manage autofill.
27735 const GUID IID_ICoreWebView2Settings4 = ICoreWebView2Settings4.iid;
27736 
27737 interface ICoreWebView2Settings4 : ICoreWebView2Settings3
27738 {
27739     static const GUID iid = { 0xcb56846c,0x4168,0x4d53,[ 0xb0,0x4f,0x03,0xb6,0xd6,0x79,0x6f,0xf2 ] };
27740   /// IsPasswordAutosaveEnabled controls whether autosave for password
27741   /// information is enabled. The IsPasswordAutosaveEnabled property behaves
27742   /// independently of the IsGeneralAutofillEnabled property. When IsPasswordAutosaveEnabled is
27743   /// false, no new password data is saved and no Save/Update Password prompts are displayed.
27744   /// However, if there was password data already saved before disabling this setting,
27745   /// then that password information is auto-populated, suggestions are shown and clicking on
27746   /// one will populate the fields.
27747   /// When IsPasswordAutosaveEnabled is true, password information is auto-populated,
27748   /// suggestions are shown and clicking on one will populate the fields, new data
27749   /// is saved, and a Save/Update Password prompt is displayed.
27750   /// It will take effect immediately after setting.
27751   /// The default value is `FALSE`.
27752   /// This property has the same value as
27753   /// `CoreWebView2Profile.IsPasswordAutosaveEnabled`, and changing one will
27754   /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile`
27755   /// will share the same value for this property, so for the `CoreWebView2`s
27756   /// with the same profile, their
27757   /// `CoreWebView2Settings.IsPasswordAutosaveEnabled` and
27758   /// `CoreWebView2Profile.IsPasswordAutosaveEnabled` will always have the same
27759   /// value.
27760   ///
27761   /// \snippet SettingsComponent.cpp PasswordAutosaveEnabled
27762   @(" propget")
27763 	HRESULT get_IsPasswordAutosaveEnabled(@("out, retval") BOOL* value);
27764 
27765   /// Set the IsPasswordAutosaveEnabled property.
27766   @(" propput")
27767 	HRESULT put_IsPasswordAutosaveEnabled(in BOOL value);
27768 
27769   /// IsGeneralAutofillEnabled controls whether autofill for information
27770   /// like names, street and email addresses, phone numbers, and arbitrary input
27771   /// is enabled. This excludes password and credit card information. When
27772   /// IsGeneralAutofillEnabled is false, no suggestions appear, and no new information
27773   /// is saved. When IsGeneralAutofillEnabled is true, information is saved, suggestions
27774   /// appear and clicking on one will populate the form fields.
27775   /// It will take effect immediately after setting.
27776   /// The default value is `TRUE`.
27777   /// This property has the same value as
27778   /// `CoreWebView2Profile.IsGeneralAutofillEnabled`, and changing one will
27779   /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile`
27780   /// will share the same value for this property, so for the `CoreWebView2`s
27781   /// with the same profile, their
27782   /// `CoreWebView2Settings.IsGeneralAutofillEnabled` and
27783   /// `CoreWebView2Profile.IsGeneralAutofillEnabled` will always have the same
27784   /// value.
27785   ///
27786   /// \snippet SettingsComponent.cpp GeneralAutofillEnabled
27787   @(" propget")
27788 	HRESULT get_IsGeneralAutofillEnabled(@("out, retval") BOOL* value);
27789 
27790   /// Set the IsGeneralAutofillEnabled property.
27791   @(" propput")
27792 	HRESULT put_IsGeneralAutofillEnabled(in BOOL value);
27793 }
27794 
27795 /// A continuation of the ICoreWebView2Settings interface to manage pinch zoom.
27796 const GUID IID_ICoreWebView2Settings5 = ICoreWebView2Settings5.iid;
27797 
27798 interface ICoreWebView2Settings5 : ICoreWebView2Settings4
27799 {
27800     static const GUID iid = { 0x183e7052,0x1d03,0x43a0,[ 0xab,0x99,0x98,0xe0,0x43,0xb6,0x6b,0x39 ] };
27801   /// Pinch-zoom, referred to as "Page Scale" zoom, is performed as a post-rendering step,
27802   /// it changes the page scale factor property and scales the surface the web page is
27803   /// rendered onto when user performs a pinch zooming action. It does not change the layout
27804   /// but rather changes the viewport and clips the web content, the content outside of the
27805   /// viewport isn't visible onscreen and users can't reach this content using mouse.
27806   ///
27807   /// The `IsPinchZoomEnabled` property enables or disables the ability of
27808   /// the end user to use a pinching motion on touch input enabled devices
27809   /// to scale the web content in the WebView2. It defaults to `TRUE`.
27810   /// When set to `FALSE`, the end user cannot pinch zoom after the next navigation.
27811   /// Disabling/Enabling `IsPinchZoomEnabled` only affects the end user's ability to use
27812   /// pinch motions and does not change the page scale factor.
27813   /// This API only affects the Page Scale zoom and has no effect on the
27814   /// existing browser zoom properties (`IsZoomControlEnabled` and `ZoomFactor`)
27815   /// or other end user mechanisms for zooming.
27816   ///
27817   /// \snippet SettingsComponent.cpp TogglePinchZoomEnabled
27818   @(" propget")
27819 	HRESULT get_IsPinchZoomEnabled(@("out, retval") BOOL* enabled);
27820   /// Set the `IsPinchZoomEnabled` property
27821   @(" propput")
27822 	HRESULT put_IsPinchZoomEnabled(in BOOL enabled);
27823 }
27824 
27825 /// A continuation of the ICoreWebView2Settings interface to manage swipe navigation.
27826 const GUID IID_ICoreWebView2Settings6 = ICoreWebView2Settings6.iid;
27827 
27828 interface ICoreWebView2Settings6 : ICoreWebView2Settings5
27829 {
27830     static const GUID iid = { 0x11cb3acd,0x9bc8,0x43b8,[ 0x83,0xbf,0xf4,0x07,0x53,0x71,0x4f,0x87 ] };
27831   /// The `IsSwipeNavigationEnabled` property enables or disables the ability of the
27832   /// end user to use swiping gesture on touch input enabled devices to
27833   /// navigate in WebView2. It defaults to `TRUE`.
27834   ///
27835   /// When this property is `TRUE`, then all configured navigation gestures are enabled:
27836   /// 1. Swiping left and right to navigate forward and backward is always configured.
27837   /// 2. Swiping down to refresh is off by default and not exposed via our API currently,
27838   /// it requires the "--pull-to-refresh" option to be included in the additional browser
27839   /// arguments to be configured. (See put_AdditionalBrowserArguments.)
27840   ///
27841   /// When set to `FALSE`, the end user cannot swipe to navigate or pull to refresh.
27842   /// This API only affects the overscrolling navigation functionality and has no
27843   /// effect on the scrolling interaction used to explore the web content shown
27844   /// in WebView2.
27845   ///
27846   /// Disabling/Enabling IsSwipeNavigationEnabled takes effect after the
27847   /// next navigation.
27848   ///
27849   /// \snippet SettingsComponent.cpp ToggleSwipeNavigationEnabled
27850   @(" propget")
27851 	HRESULT get_IsSwipeNavigationEnabled(@("out, retval") BOOL* enabled);
27852   /// Set the `IsSwipeNavigationEnabled` property
27853   @(" propput")
27854 	HRESULT put_IsSwipeNavigationEnabled(in BOOL enabled);
27855 }
27856 
27857 /// A continuation of the ICoreWebView2Settings interface to hide Pdf toolbar items.
27858 const GUID IID_ICoreWebView2Settings7 = ICoreWebView2Settings7.iid;
27859 
27860 interface ICoreWebView2Settings7 : ICoreWebView2Settings6
27861 {
27862     static const GUID iid = { 0x488dc902,0x35ef,0x42d2,[ 0xbc,0x7d,0x94,0xb6,0x5c,0x4b,0xc4,0x9c ] };
27863   /// `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.
27864   /// Changes to this property apply to all CoreWebView2s in the same environment and using the same profile.
27865   /// Changes to this setting apply only after the next navigation.
27866   /// \snippet SettingsComponent.cpp ToggleHidePdfToolbarItems
27867   @(" propget")
27868 	HRESULT get_HiddenPdfToolbarItems(@("out, retval") COREWEBVIEW2_PDF_TOOLBAR_ITEMS* hidden_pdf_toolbar_items);
27869 
27870   /// Set the `HiddenPdfToolbarItems` property.
27871   @(" propput")
27872 	HRESULT put_HiddenPdfToolbarItems(in COREWEBVIEW2_PDF_TOOLBAR_ITEMS hidden_pdf_toolbar_items);
27873 }
27874 
27875 /// A continuation of the ICoreWebView2Settings interface to manage smartscreen.
27876 const GUID IID_ICoreWebView2Settings8 = ICoreWebView2Settings8.iid;
27877 
27878 interface ICoreWebView2Settings8 : ICoreWebView2Settings7
27879 {
27880     static const GUID iid = { 0x9e6b0e8f,0x86ad,0x4e81,[ 0x81,0x47,0xa9,0xb5,0xed,0xb6,0x86,0x50 ] };
27881   /// SmartScreen helps webviews identify reported phishing and malware websites
27882   /// and also helps users make informed decisions about downloads.
27883   /// `IsReputationCheckingRequired` is used to control whether SmartScreen
27884   /// enabled or not. SmartScreen is enabled or disabled for all CoreWebView2s
27885   /// using the same user data folder. If
27886   /// CoreWebView2Setting.IsReputationCheckingRequired is true for any
27887   /// CoreWebView2 using the same user data folder, then SmartScreen is enabled.
27888   /// If CoreWebView2Setting.IsReputationCheckingRequired is false for all
27889   /// CoreWebView2 using the same user data folder, then SmartScreen is
27890   /// disabled. When it is changed, the change will be applied to all WebViews
27891   /// using the same user data folder on the next navigation or download. The
27892   /// default value for `IsReputationCheckingRequired` is true. If the newly
27893   /// created CoreWebview2 does not set SmartScreen to false, when
27894   /// navigating(Such as Navigate(), LoadDataUrl(), ExecuteScript(), etc.), the
27895   /// default value will be applied to all CoreWebview2 using the same user data
27896   /// folder.
27897   /// SmartScreen of WebView2 apps can be controlled by Windows system setting
27898   /// "SmartScreen for Microsoft Edge", specially, for WebView2 in Windows
27899   /// Store apps, SmartScreen is controlled by another Windows system setting
27900   /// "SmartScreen for Microsoft Store apps". When the Windows setting is enabled, the
27901   /// SmartScreen operates under the control of the `IsReputationCheckingRequired`.
27902   /// When the Windows setting is disabled, the SmartScreen will be disabled
27903   /// regardless of the `IsReputationCheckingRequired` value set in WebView2 apps.
27904   /// In other words, under this circumstance the value of
27905   /// `IsReputationCheckingRequired` will be saved but overridden by system setting.
27906   /// Upon re-enabling the Windows setting, the CoreWebview2 will reference the
27907   /// `IsReputationCheckingRequired` to determine the SmartScreen status.
27908   /// \snippet SettingsComponent.cpp ToggleSmartScreen
27909   @(" propget")
27910 	HRESULT get_IsReputationCheckingRequired(@("out, retval") BOOL* value);
27911 
27912   /// Sets whether this webview2 instance needs SmartScreen protection for its content.
27913   /// Set the `IsReputationCheckingRequired` property.
27914   @(" propput")
27915 	HRESULT put_IsReputationCheckingRequired(in BOOL value);
27916 }
27917 
27918 /// Event args for the `ProcessFailed` event.
27919 const GUID IID_ICoreWebView2ProcessFailedEventArgs = ICoreWebView2ProcessFailedEventArgs.iid;
27920 
27921 interface ICoreWebView2ProcessFailedEventArgs : IUnknown
27922 {
27923     static const GUID iid = { 0x8155a9a4,0x1474,0x4a86,[ 0x8c,0xae,0x15,0x1b,0x0f,0xa6,0xb8,0xca ] };
27924 
27925   /// The kind of process failure that has occurred. This is a combination of
27926   /// process kind (for example, browser, renderer, gpu) and failure (exit,
27927   /// unresponsiveness). Renderer processes are further divided in _main frame_
27928   /// renderer (`RenderProcessExited`, `RenderProcessUnresponsive`) and
27929   /// _subframe_ renderer (`FrameRenderProcessExited`). To learn about the
27930   /// conditions under which each failure kind occurs, see
27931   /// `COREWEBVIEW2_PROCESS_FAILED_KIND`.
27932   @(" propget")
27933 	HRESULT get_ProcessFailedKind(
27934       @("out, retval") COREWEBVIEW2_PROCESS_FAILED_KIND* processFailedKind);
27935 }
27936 
27937 /// Receives `ProcessFailed` events.
27938 const GUID IID_ICoreWebView2ProcessFailedEventHandler = ICoreWebView2ProcessFailedEventHandler.iid;
27939 
27940 interface ICoreWebView2ProcessFailedEventHandler : IUnknown
27941 {
27942     static const GUID iid = { 0x79e0aea4,0x990b,0x42d9,[ 0xaa,0x1d,0x0f,0xcc,0x2e,0x5b,0xc7,0xf1 ] };
27943 
27944   /// Provides the event args for the corresponding event.
27945 
27946   HRESULT Invoke(
27947       /+[in]+/ ICoreWebView2 sender,
27948       /+[in]+/ ICoreWebView2ProcessFailedEventArgs args);
27949 }
27950 
27951 /// Implements the interface to receive `ZoomFactorChanged` events.  Use the
27952 /// `ICoreWebView2Controller.ZoomFactor` property to get the modified zoom
27953 /// factor.
27954 
27955 const GUID IID_ICoreWebView2ZoomFactorChangedEventHandler = ICoreWebView2ZoomFactorChangedEventHandler.iid;
27956 
27957 interface ICoreWebView2ZoomFactorChangedEventHandler : IUnknown
27958 {
27959     static const GUID iid = { 0xb52d71d6,0xc4df,0x4543,[ 0xa9,0x0c,0x64,0xa3,0xe6,0x0f,0x38,0xcb ] };
27960 
27961   /// Provides the event args for the corresponding event.  No event args exist
27962   /// and the `args` parameter is set to `null`.
27963 
27964   HRESULT Invoke(/+[in]+/ ICoreWebView2Controller sender, /+[in]+/ IUnknown args);
27965 }
27966 
27967 /// Iterator for a collection of HTTP headers.  For more information, navigate
27968 /// to ICoreWebView2HttpRequestHeaders and ICoreWebView2HttpResponseHeaders.
27969 ///
27970 /// \snippet ScenarioWebViewEventMonitor.cpp HttpRequestHeaderIterator
27971 const GUID IID_ICoreWebView2HttpHeadersCollectionIterator = ICoreWebView2HttpHeadersCollectionIterator.iid;
27972 
27973 interface ICoreWebView2HttpHeadersCollectionIterator : IUnknown
27974 {
27975     static const GUID iid = { 0x0702fc30,0xf43b,0x47bb,[ 0xab,0x52,0xa4,0x2c,0xb5,0x52,0xad,0x9f ] };
27976 
27977   /// Get the name and value of the current HTTP header of the iterator.  If
27978   /// the previous `MoveNext` operation set the `hasNext` parameter to `FALSE`,
27979   /// this method fails.
27980   ///
27981   /// The caller must free the returned strings with `CoTaskMemFree`.  See
27982   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
27983 
27984   HRESULT GetCurrentHeader(@("out") LPWSTR* name,
27985 		@("out") LPWSTR* value);
27986 
27987   /// `TRUE` when the iterator has not run out of headers.  If the collection
27988   /// over which the iterator is iterating is empty or if the iterator has gone
27989   ///  past the end of the collection then this is `FALSE`.
27990 
27991   @(" propget")
27992 	HRESULT get_HasCurrentHeader(@("out, retval") BOOL* hasCurrent);
27993 
27994   /// Move the iterator to the next HTTP header in the collection.
27995   ///
27996   /// \> [!NOTE]\n \> If no more HTTP headers exist, the `hasNext` parameter is set to
27997   /// `FALSE`.  After this occurs the `GetCurrentHeader` method fails.
27998 
27999   HRESULT MoveNext(@("out, retval") BOOL* hasNext);
28000 }
28001 
28002 /// HTTP request headers.  Used to inspect the HTTP request on
28003 /// `WebResourceRequested` event and `NavigationStarting` event.
28004 ///
28005 /// \> [!NOTE]\n\> It is possible to modify the HTTP request from a `WebResourceRequested`
28006 /// event, but not from a `NavigationStarting` event.
28007 const GUID IID_ICoreWebView2HttpRequestHeaders = ICoreWebView2HttpRequestHeaders.iid;
28008 
28009 interface ICoreWebView2HttpRequestHeaders : IUnknown
28010 {
28011     static const GUID iid = { 0xe86cac0e,0x5523,0x465c,[ 0xb5,0x36,0x8f,0xb9,0xfc,0x8c,0x8c,0x60 ] };
28012 
28013   /// Gets the header value matching the name.
28014   ///
28015   /// The caller must free the returned string with `CoTaskMemFree`.  See
28016   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28017 
28018   HRESULT GetHeader(in LPCWSTR name,
28019 		@("out, retval") LPWSTR* value);
28020 
28021   /// Gets the header value matching the name using an iterator.
28022 
28023   HRESULT GetHeaders(in LPCWSTR name,
28024 		@("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator);
28025 
28026   /// Verifies that the headers contain an entry that matches the header name.
28027 
28028   HRESULT Contains(in LPCWSTR name,
28029 		@("out, retval") BOOL* contains);
28030 
28031   /// Adds or updates header that matches the name.
28032 
28033   HRESULT SetHeader(in LPCWSTR name, in LPCWSTR value);
28034 
28035   /// Removes header that matches the name.
28036 
28037   HRESULT RemoveHeader(in LPCWSTR name);
28038 
28039   /// Gets an iterator over the collection of request headers.
28040 
28041   HRESULT GetIterator(
28042       @("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator);
28043 }
28044 
28045 /// HTTP response headers.  Used to construct a `WebResourceResponse` for the
28046 /// `WebResourceRequested` event.
28047 const GUID IID_ICoreWebView2HttpResponseHeaders = ICoreWebView2HttpResponseHeaders.iid;
28048 
28049 interface ICoreWebView2HttpResponseHeaders : IUnknown
28050 {
28051     static const GUID iid = { 0x03c5ff5a,0x9b45,0x4a88,[ 0x88,0x1c,0x89,0xa9,0xf3,0x28,0x61,0x9c ] };
28052 
28053   /// Appends header line with name and value.
28054 
28055   HRESULT AppendHeader(in LPCWSTR name, in LPCWSTR value);
28056 
28057   /// Verifies that the headers contain entries that match the header name.
28058 
28059   HRESULT Contains(in LPCWSTR name,
28060 		@("out, retval") BOOL* contains);
28061 
28062   /// Gets the first header value in the collection matching the name.
28063   ///
28064   /// The caller must free the returned string with `CoTaskMemFree`.  See
28065   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28066 
28067   HRESULT GetHeader(in LPCWSTR name,
28068 		@("out, retval") LPWSTR* value);
28069 
28070   /// Gets the header values matching the name.
28071 
28072   HRESULT GetHeaders(in LPCWSTR name,
28073 		@("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator);
28074 
28075   /// Gets an iterator over the collection of entire response headers.
28076 
28077   HRESULT GetIterator(
28078   @("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator);
28079 }
28080 
28081 /// An HTTP request used with the `WebResourceRequested` event.
28082 const GUID IID_ICoreWebView2WebResourceRequest = ICoreWebView2WebResourceRequest.iid;
28083 
28084 interface ICoreWebView2WebResourceRequest : IUnknown
28085 {
28086     static const GUID iid = { 0x97055cd4,0x512c,0x4264,[ 0x8b,0x5f,0xe3,0xf4,0x46,0xce,0xa6,0xa5 ] };
28087 
28088   /// The request URI.
28089   ///
28090   /// The caller must free the returned string with `CoTaskMemFree`.  See
28091   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28092 
28093   @(" propget")
28094 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
28095 
28096   /// Sets the `Uri` property.
28097 
28098   @(" propput")
28099 	HRESULT put_Uri(in LPCWSTR uri);
28100 
28101   /// The HTTP request method.
28102   ///
28103   /// The caller must free the returned string with `CoTaskMemFree`.  See
28104   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28105 
28106   @(" propget")
28107 	HRESULT get_Method(@("out, retval") LPWSTR* method);
28108 
28109   /// Sets the `Method` property.
28110 
28111   @(" propput")
28112 	HRESULT put_Method(in LPCWSTR method);
28113 
28114   /// The HTTP request message body as stream.  POST data should be here.  If a
28115   /// stream is set, which overrides the message body, the stream must have
28116   /// all the content data available by the time the `WebResourceRequested`
28117   /// event deferral of this response is completed.  Stream should be agile or
28118   /// be created from a background STA to prevent performance impact to the UI
28119   /// thread.  `Null` means no content data.  `IStream` semantics apply
28120   /// (return `S_OK` to `Read` runs until all data is exhausted).
28121 
28122   @(" propget")
28123 	HRESULT get_Content(@("out, retval") IStream** content);
28124 
28125   /// Sets the `Content` property.
28126 
28127   @(" propput")
28128 	HRESULT put_Content(in IStream* content);
28129 
28130   /// The mutable HTTP request headers
28131 
28132   @(" propget")
28133 	HRESULT get_Headers(@("out, retval") ICoreWebView2HttpRequestHeaders * headers);
28134 }
28135 
28136 /// An HTTP response used with the `WebResourceRequested` event.
28137 const GUID IID_ICoreWebView2WebResourceResponse = ICoreWebView2WebResourceResponse.iid;
28138 
28139 interface ICoreWebView2WebResourceResponse : IUnknown
28140 {
28141     static const GUID iid = { 0xaafcc94f,0xfa27,0x48fd,[ 0x97,0xdf,0x83,0x0e,0xf7,0x5a,0xae,0xc9 ] };
28142 
28143   /// HTTP response content as stream.  Stream must have all the content data
28144   /// available by the time the `WebResourceRequested` event deferral of this
28145   /// response is completed.  Stream should be agile or be created from a
28146   /// background thread to prevent performance impact to the UI thread.  `Null`
28147   ///  means no content data.  `IStream` semantics apply (return `S_OK` to
28148   /// `Read` runs until all data is exhausted).
28149   /// When providing the response data, you should consider relevant HTTP
28150   /// request headers just like an HTTP server would do. For example, if the
28151   /// request was for a video resource in a HTML video element, the request may
28152   /// contain the [Range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range)
28153   /// header to request only a part of the video that is streaming. In this
28154   /// case, your response stream should be only the portion of the video
28155   /// specified by the range HTTP request headers and you should set the
28156   /// appropriate
28157   /// [Content-Range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range)
28158   /// header in the response.
28159 
28160   @(" propget")
28161 	HRESULT get_Content(@("out, retval") IStream** content);
28162 
28163   /// Sets the `Content` property.
28164 
28165   @(" propput")
28166 	HRESULT put_Content(in IStream* content);
28167 
28168   /// Overridden HTTP response headers.
28169 
28170   @(" propget")
28171 	HRESULT get_Headers(@("out, retval") ICoreWebView2HttpResponseHeaders * headers);
28172 
28173   /// The HTTP response status code.
28174 
28175   @(" propget")
28176 	HRESULT get_StatusCode(@("out, retval") int* statusCode);
28177 
28178   /// Sets the `StatusCode` property.
28179 
28180   @(" propput")
28181 	HRESULT put_StatusCode(in int statusCode);
28182 
28183   /// The HTTP response reason phrase.
28184   ///
28185   /// The caller must free the returned string with `CoTaskMemFree`.  See
28186   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28187 
28188   @(" propget")
28189 	HRESULT get_ReasonPhrase(@("out, retval") LPWSTR* reasonPhrase);
28190 
28191   /// Sets the `ReasonPhrase` property.
28192 
28193   @(" propput")
28194 	HRESULT put_ReasonPhrase(in LPCWSTR reasonPhrase);
28195 }
28196 
28197 /// Event args for the `NavigationStarting` event.
28198 const GUID IID_ICoreWebView2NavigationStartingEventArgs = ICoreWebView2NavigationStartingEventArgs.iid;
28199 
28200 interface ICoreWebView2NavigationStartingEventArgs : IUnknown
28201 {
28202     static const GUID iid = { 0x5b495469,0xe119,0x438a,[ 0x9b,0x18,0x76,0x04,0xf2,0x5f,0x2e,0x49 ] };
28203 
28204   /// The uri of the requested navigation.
28205   ///
28206   /// The caller must free the returned string with `CoTaskMemFree`.  See
28207   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28208 
28209   @(" propget")
28210 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
28211 
28212   /// `TRUE` when the navigation was initiated through a user gesture as
28213   /// opposed to programmatic navigation by page script. Navigations initiated
28214   /// via WebView2 APIs are considered as user initiated.
28215 
28216   @(" propget")
28217 	HRESULT get_IsUserInitiated(@("out, retval") BOOL* isUserInitiated);
28218 
28219   /// `TRUE` when the navigation is redirected.
28220 
28221   @(" propget")
28222 	HRESULT get_IsRedirected(@("out, retval") BOOL* isRedirected);
28223 
28224   /// The HTTP request headers for the navigation.
28225   ///
28226   /// \> [!NOTE]\n\> You are not able to modify the HTTP request headers in a
28227   /// `NavigationStarting` event.
28228 
28229   @(" propget")
28230 	HRESULT get_RequestHeaders(@("out, retval") ICoreWebView2HttpRequestHeaders * requestHeaders);
28231 
28232   /// The host may set this flag to cancel the navigation.  If set, the
28233   /// navigation is not longer present and the content of the current page is
28234   /// intact.  For performance reasons, `GET` HTTP requests may happen, while
28235   /// the host is responding.  You may set cookies and use part of a request
28236   /// for the navigation.  Cancellation for navigation to `about:blank` or
28237   /// frame navigation to `srcdoc` is not supported.  Such attempts are
28238   /// ignored.  A cancelled navigation will fire a `NavigationCompleted` event
28239   /// with a `WebErrorStatus` of
28240   /// `COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED`.
28241 
28242   @(" propget")
28243 	HRESULT get_Cancel(@("out, retval") BOOL* cancel);
28244 
28245   /// Sets the `Cancel` property.
28246 
28247   @(" propput")
28248 	HRESULT put_Cancel(in BOOL cancel);
28249 
28250   /// The ID of the navigation.
28251 
28252   @(" propget")
28253 	HRESULT get_NavigationId(@("out, retval") UINT64* navigationId);
28254 }
28255 
28256 /// The AdditionalAllowedFrameAncestors API that enable developers to provide additional allowed frame ancestors.
28257 const GUID IID_ICoreWebView2NavigationStartingEventArgs2 = ICoreWebView2NavigationStartingEventArgs2.iid;
28258 
28259 interface ICoreWebView2NavigationStartingEventArgs2 : ICoreWebView2NavigationStartingEventArgs
28260 {
28261     static const GUID iid = { 0x9086BE93,0x91AA,0x472D,[ 0xA7,0xE0,0x57,0x9F,0x2B,0xA0,0x06,0xAD ] };
28262 
28263   /// Get additional allowed frame ancestors set by the host app.
28264   ///
28265   /// The caller must free the returned string with `CoTaskMemFree`.  See
28266   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28267   @(" propget")
28268 	HRESULT get_AdditionalAllowedFrameAncestors(@("out, retval") LPWSTR* value);
28269 
28270   /// The app may set this property to allow a frame to be embedded by additional ancestors besides what is allowed by
28271   /// http header [X-Frame-Options](https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Frame-Options)
28272   /// and [Content-Security-Policy frame-ancestors directive](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors).
28273   /// If set, a frame ancestor is allowed if it is allowed by the additional allowed frame
28274   /// ancestors or original http header from the site.
28275   /// Whether an ancestor is allowed by the additional allowed frame ancestors is done the same way as if the site provided
28276   /// it as the source list of the Content-Security-Policy frame-ancestors directive.
28277   /// For example, if `https://example.com` and `https://www.example.com` are the origins of the top
28278   /// page and intermediate iframes that embed a nested site-embedding iframe, and you fully trust
28279   /// those origins, you should set this property to `https://example.com https://www.example.com`.
28280   /// This property gives the app the ability to use iframe to embed sites that otherwise
28281   /// could not be embedded in an iframe in trusted app pages.
28282   /// This could potentially subject the embedded sites to [Clickjacking](https://en.wikipedia.org/wiki/Clickjacking)
28283   /// attack from the code running in the embedding web page. Therefore, you should only
28284   /// set this property with origins of fully trusted embedding page and any intermediate iframes.
28285   /// Whenever possible, you should use the list of specific origins of the top and intermediate
28286   /// frames instead of wildcard characters for this property.
28287   /// This API is to provide limited support for app scenarios that used to be supported by
28288   /// `<webview>` element in other solutions like JavaScript UWP apps and Electron.
28289   /// You should limit the usage of this property to trusted pages, and specific navigation
28290   /// target url, by checking the `Source` of the WebView2, and `Uri` of the event args.
28291   ///
28292   /// This property is ignored for top level document navigation.
28293   ///
28294   /// \snippet ScriptComponent.cpp AdditionalAllowedFrameAncestors_1
28295   ///
28296   /// \snippet ScriptComponent.cpp AdditionalAllowedFrameAncestors_2
28297   @(" propput")
28298 	HRESULT put_AdditionalAllowedFrameAncestors(in LPCWSTR value);
28299 }
28300 
28301 /// The NavigationKind API that enables developers to get more information about
28302 /// navigation type.
28303 const GUID IID_ICoreWebView2NavigationStartingEventArgs3 = ICoreWebView2NavigationStartingEventArgs3.iid;
28304 
28305 interface ICoreWebView2NavigationStartingEventArgs3 : ICoreWebView2NavigationStartingEventArgs2
28306 {
28307     static const GUID iid = { 0xDDFFE494,0x4942,0x4BD2,[ 0xAB,0x73,0x35,0xB8,0xFF,0x40,0xE1,0x9F ] };
28308 
28309   /// Get the navigation kind of this navigation.
28310   ///
28311   @(" propget")
28312 	HRESULT get_NavigationKind(@("out, retval") COREWEBVIEW2_NAVIGATION_KIND* navigation_kind);
28313 }
28314 
28315 /// Receives `NavigationStarting` events.
28316 const GUID IID_ICoreWebView2NavigationStartingEventHandler = ICoreWebView2NavigationStartingEventHandler.iid;
28317 
28318 interface ICoreWebView2NavigationStartingEventHandler : IUnknown
28319 {
28320     static const GUID iid = { 0x9adbe429,0xf36d,0x432b,[ 0x9d,0xdc,0xf8,0x88,0x1f,0xbd,0x76,0xe3 ] };
28321 
28322   /// Provides the event args for the corresponding event.
28323 
28324   HRESULT Invoke(
28325       /+[in]+/ ICoreWebView2 sender,
28326       /+[in]+/ ICoreWebView2NavigationStartingEventArgs args);
28327 }
28328 
28329 /// Event args for the `ContentLoading` event.
28330 const GUID IID_ICoreWebView2ContentLoadingEventArgs = ICoreWebView2ContentLoadingEventArgs.iid;
28331 
28332 interface ICoreWebView2ContentLoadingEventArgs : IUnknown
28333 {
28334     static const GUID iid = { 0x0c8a1275,0x9b6b,0x4901,[ 0x87,0xad,0x70,0xdf,0x25,0xba,0xfa,0x6e ] };
28335 
28336   /// `TRUE` if the loaded content is an error page.
28337 
28338   @(" propget")
28339 	HRESULT get_IsErrorPage(@("out, retval") BOOL* isErrorPage);
28340 
28341   /// The ID of the navigation.
28342 
28343   @(" propget")
28344 	HRESULT get_NavigationId(@("out, retval") UINT64* navigationId);
28345 }
28346 
28347 /// Receives `ContentLoading` events.
28348 const GUID IID_ICoreWebView2ContentLoadingEventHandler = ICoreWebView2ContentLoadingEventHandler.iid;
28349 
28350 interface ICoreWebView2ContentLoadingEventHandler : IUnknown
28351 {
28352     static const GUID iid = { 0x364471e7,0xf2be,0x4910,[ 0xbd,0xba,0xd7,0x20,0x77,0xd5,0x1c,0x4b ] };
28353 
28354   /// Provides the event args for the corresponding event.
28355 
28356   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ ICoreWebView2ContentLoadingEventArgs args);
28357 }
28358 
28359 /// Event args for the `SourceChanged` event.
28360 const GUID IID_ICoreWebView2SourceChangedEventArgs = ICoreWebView2SourceChangedEventArgs.iid;
28361 
28362 interface ICoreWebView2SourceChangedEventArgs : IUnknown
28363 {
28364     static const GUID iid = { 0x31e0e545,0x1dba,0x4266,[ 0x89,0x14,0xf6,0x38,0x48,0xa1,0xf7,0xd7 ] };
28365 
28366   /// `TRUE` if the page being navigated to is a new document.
28367 
28368   @(" propget")
28369 	HRESULT get_IsNewDocument(@("out, retval") BOOL* isNewDocument);
28370 }
28371 
28372 /// Receives `SourceChanged` events.
28373 const GUID IID_ICoreWebView2SourceChangedEventHandler = ICoreWebView2SourceChangedEventHandler.iid;
28374 
28375 interface ICoreWebView2SourceChangedEventHandler : IUnknown
28376 {
28377     static const GUID iid = { 0x3c067f9f,0x5388,0x4772,[ 0x8b,0x48,0x79,0xf7,0xef,0x1a,0xb3,0x7c ] };
28378 
28379   /// Provides the event args for the corresponding event.
28380 
28381   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ ICoreWebView2SourceChangedEventArgs args);
28382 }
28383 
28384 /// Receives `HistoryChanged` events.
28385 const GUID IID_ICoreWebView2HistoryChangedEventHandler = ICoreWebView2HistoryChangedEventHandler.iid;
28386 
28387 interface ICoreWebView2HistoryChangedEventHandler : IUnknown
28388 {
28389     static const GUID iid = { 0xc79a420c,0xefd9,0x4058,[ 0x92,0x95,0x3e,0x8b,0x4b,0xca,0xb6,0x45 ] };
28390 
28391   /// Provides the event args for the corresponding event.  No event args exist
28392   /// and the `args` parameter is set to `null`.
28393 
28394   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
28395 }
28396 
28397 /// Event args for the `ScriptDialogOpening` event.
28398 const GUID IID_ICoreWebView2ScriptDialogOpeningEventArgs = ICoreWebView2ScriptDialogOpeningEventArgs.iid;
28399 
28400 interface ICoreWebView2ScriptDialogOpeningEventArgs : IUnknown
28401 {
28402     static const GUID iid = { 0x7390bb70,0xabe0,0x4843,[ 0x95,0x29,0xf1,0x43,0xb3,0x1b,0x03,0xd6 ] };
28403 
28404   /// The URI of the page that requested the dialog box.
28405   ///
28406   /// The caller must free the returned string with `CoTaskMemFree`.  See
28407   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28408 
28409   @(" propget")
28410 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
28411 
28412   /// The kind of JavaScript dialog box.  `alert`, `confirm`, `prompt`, or
28413   /// `beforeunload`.
28414 
28415   @(" propget")
28416 	HRESULT get_Kind(@("out, retval") COREWEBVIEW2_SCRIPT_DIALOG_KIND* kind);
28417 
28418   /// The message of the dialog box.  From JavaScript this is the first
28419   /// parameter passed to `alert`, `confirm`, and `prompt` and is empty for
28420   /// `beforeunload`.
28421   ///
28422   /// The caller must free the returned string with `CoTaskMemFree`.  See
28423   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28424 
28425   @(" propget")
28426 	HRESULT get_Message(@("out, retval") LPWSTR* message);
28427 
28428   /// The host may run this to respond with **OK** to `confirm`, `prompt`, and
28429   /// `beforeunload` dialogs.  Do not run this method to indicate cancel.
28430   /// From JavaScript, this means that the `confirm` and `beforeunload` function
28431   /// returns `TRUE` if `Accept` is run.  And for the prompt function it returns
28432   /// the value of `ResultText` if `Accept` is run and otherwise returns
28433   /// `FALSE`.
28434 
28435   HRESULT Accept();
28436 
28437   /// The second parameter passed to the JavaScript prompt dialog.
28438   /// The result of the prompt JavaScript function uses this value as the
28439   /// default value.
28440   ///
28441   /// The caller must free the returned string with `CoTaskMemFree`.  See
28442   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28443 
28444   @(" propget")
28445 	HRESULT get_DefaultText(@("out, retval") LPWSTR* defaultText);
28446 
28447   /// The return value from the JavaScript prompt function if `Accept` is run.
28448   ///  This value is ignored for dialog kinds other than prompt.  If `Accept`
28449   /// is not run, this value is ignored and `FALSE` is returned from prompt.
28450   ///
28451   /// The caller must free the returned string with `CoTaskMemFree`.  See
28452   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28453 
28454   @(" propget")
28455 	HRESULT get_ResultText(@("out, retval") LPWSTR* resultText);
28456 
28457   /// Sets the `ResultText` property.
28458 
28459   @(" propput")
28460 	HRESULT put_ResultText(in LPCWSTR resultText);
28461 
28462   /// Returns an `ICoreWebView2Deferral` object.  Use this operation to
28463   /// complete the event at a later time.
28464 
28465   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
28466 }
28467 
28468 /// Receives `ScriptDialogOpening` events.
28469 const GUID IID_ICoreWebView2ScriptDialogOpeningEventHandler = ICoreWebView2ScriptDialogOpeningEventHandler.iid;
28470 
28471 interface ICoreWebView2ScriptDialogOpeningEventHandler : IUnknown
28472 {
28473     static const GUID iid = { 0xef381bf9,0xafa8,0x4e37,[ 0x91,0xc4,0x8a,0xc4,0x85,0x24,0xbd,0xfb ] };
28474 
28475   /// Provides the event args for the corresponding event.
28476 
28477   HRESULT Invoke(
28478       /+[in]+/ ICoreWebView2 sender,
28479       /+[in]+/ ICoreWebView2ScriptDialogOpeningEventArgs args);
28480 }
28481 
28482 /// Event args for the `NavigationCompleted` event.
28483 const GUID IID_ICoreWebView2NavigationCompletedEventArgs = ICoreWebView2NavigationCompletedEventArgs.iid;
28484 
28485 interface ICoreWebView2NavigationCompletedEventArgs : IUnknown
28486 {
28487     static const GUID iid = { 0x30d68b7d,0x20d9,0x4752,[ 0xa9,0xca,0xec,0x84,0x48,0xfb,0xb5,0xc1 ] };
28488 
28489   /// `TRUE` when the navigation is successful.  `FALSE` for a navigation that
28490   /// ended up in an error page (failures due to no network, DNS lookup
28491   /// failure, HTTP server responds with 4xx), but may also be `FALSE` for
28492   /// additional scenarios such as `window.stop()` run on navigated page.
28493   /// Note that WebView2 will report the navigation as 'unsuccessful' if the load
28494   /// for the navigation did not reach the expected completion for any reason. Such
28495   /// reasons include potentially catastrophic issues such network and certificate
28496   /// issues, but can also be the result of intended actions such as the app canceling a navigation or
28497   /// navigating away before the original navigation completed. Applications should not
28498   /// just rely on this flag, but also consider the reported WebErrorStatus to
28499   /// determine whether the failure is indeed catastrophic in their context.
28500   /// WebErrorStatuses that may indicate a non-catastrophic failure include:
28501   /// - COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED
28502   /// - COREWEBVIEW2_WEB_ERROR_STATUS_VALID_AUTHENTICATION_CREDENTIALS_REQUIRED
28503   /// - COREWEBVIEW2_WEB_ERROR_STATUS_VALID_PROXY_AUTHENTICATION_REQUIRED
28504 
28505   @(" propget")
28506 	HRESULT get_IsSuccess(@("out, retval") BOOL* isSuccess);
28507 
28508   /// The error code if the navigation failed.
28509 
28510   @(" propget")
28511 	HRESULT get_WebErrorStatus(@("out, retval") COREWEBVIEW2_WEB_ERROR_STATUS*
28512       webErrorStatus);
28513 
28514   /// The ID of the navigation.
28515 
28516   @(" propget")
28517 	HRESULT get_NavigationId(@("out, retval") UINT64* navigationId);
28518 }
28519 
28520 /// This is an interface for the StatusCode property of
28521 /// ICoreWebView2NavigationCompletedEventArgs
28522 const GUID IID_ICoreWebView2NavigationCompletedEventArgs2 = ICoreWebView2NavigationCompletedEventArgs2.iid;
28523 
28524 interface ICoreWebView2NavigationCompletedEventArgs2 : ICoreWebView2NavigationCompletedEventArgs
28525 {
28526     static const GUID iid = { 0xFDF8B738,0xEE1E,0x4DB2,[ 0xA3,0x29,0x8D,0x7D,0x7B,0x74,0xD7,0x92 ] };
28527   /// The HTTP status code of the navigation if it involved an HTTP request.
28528   /// For instance, this will usually be 200 if the request was successful, 404
28529   /// if a page was not found, etc.  See
28530   /// https://developer.mozilla.org/docs/Web/HTTP/Status for a list of
28531   /// common status codes.
28532   ///
28533   /// The `HttpStatusCode` property will be 0 in the following cases:
28534   /// * The navigation did not involve an HTTP request.  For instance, if it was
28535   ///   a navigation to a file:// URL, or if it was a same-document navigation.
28536   /// * The navigation failed before a response was received.  For instance, if
28537   ///   the hostname was not found, or if there was a network error.
28538   ///
28539   /// In those cases, you can get more information from the `IsSuccess` and
28540   /// `WebErrorStatus` properties.
28541   ///
28542   /// If the navigation receives a successful HTTP response, but the navigated
28543   /// page calls `window.stop()` before it finishes loading, then
28544   /// `HttpStatusCode` may contain a success code like 200, but `IsSuccess` will
28545   /// be FALSE and `WebErrorStatus` will be
28546   /// `COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED`.
28547   ///
28548   /// Since WebView2 handles HTTP continuations and redirects automatically, it
28549   /// is unlikely for `HttpStatusCode` to ever be in the 1xx or 3xx ranges.
28550   @(" propget")
28551 	HRESULT get_HttpStatusCode(@("out, retval") int* http_status_code);
28552 }
28553 
28554 /// Receives `NavigationCompleted` events.
28555 const GUID IID_ICoreWebView2NavigationCompletedEventHandler = ICoreWebView2NavigationCompletedEventHandler.iid;
28556 
28557 interface ICoreWebView2NavigationCompletedEventHandler : IUnknown
28558 {
28559     static const GUID iid = { 0xd33a35bf,0x1c49,0x4f98,[ 0x93,0xab,0x00,0x6e,0x05,0x33,0xfe,0x1c ] };
28560 
28561   /// Provides the event args for the corresponding event.
28562 
28563   HRESULT Invoke(
28564       /+[in]+/ ICoreWebView2 sender,
28565       /+[in]+/ ICoreWebView2NavigationCompletedEventArgs args);
28566 }
28567 
28568 /// Event args for the `PermissionRequested` event.
28569 const GUID IID_ICoreWebView2PermissionRequestedEventArgs = ICoreWebView2PermissionRequestedEventArgs.iid;
28570 
28571 interface ICoreWebView2PermissionRequestedEventArgs : IUnknown
28572 {
28573     static const GUID iid = { 0x973ae2ef,0xff18,0x4894,[ 0x8f,0xb2,0x3c,0x75,0x8f,0x04,0x68,0x10 ] };
28574 
28575   /// The origin of the web content that requests the permission.
28576   ///
28577   /// The caller must free the returned string with `CoTaskMemFree`.  See
28578   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28579 
28580   @(" propget")
28581 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
28582 
28583   /// The type of the permission that is requested.
28584 
28585   @(" propget")
28586 	HRESULT get_PermissionKind(@("out, retval") COREWEBVIEW2_PERMISSION_KIND* permissionKind);
28587 
28588   /// `TRUE` when the permission request was initiated through a user gesture.
28589   ///
28590   /// \> [!NOTE]\n\> Being initiated through a user gesture does not mean that user intended
28591   /// to access the associated resource.
28592 
28593   @(" propget")
28594 	HRESULT get_IsUserInitiated(@("out, retval") BOOL* isUserInitiated);
28595 
28596   /// The status of a permission request, (for example is the request is granted).
28597   /// The default value is `COREWEBVIEW2_PERMISSION_STATE_DEFAULT`.
28598 
28599   @(" propget")
28600 	HRESULT get_State(@("out, retval") COREWEBVIEW2_PERMISSION_STATE* state);
28601 
28602   /// Sets the `State` property.
28603 
28604   @(" propput")
28605 	HRESULT put_State(in COREWEBVIEW2_PERMISSION_STATE state);
28606 
28607   /// Gets an `ICoreWebView2Deferral` object.  Use the deferral object to make
28608   /// the permission decision at a later time. The deferral only applies to the
28609   /// current request, and does not prevent the `PermissionRequested` event from
28610   /// getting raised for new requests. However, for some permission kinds the
28611   /// WebView will avoid creating a new request if there is a pending request of
28612   /// the same kind.
28613 
28614   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
28615 }
28616 
28617 /// Receives `PermissionRequested` events.
28618 const GUID IID_ICoreWebView2PermissionRequestedEventHandler = ICoreWebView2PermissionRequestedEventHandler.iid;
28619 
28620 interface ICoreWebView2PermissionRequestedEventHandler : IUnknown
28621 {
28622     static const GUID iid = { 0x15e1c6a3,0xc72a,0x4df3,[ 0x91,0xd7,0xd0,0x97,0xfb,0xec,0x6b,0xfd ] };
28623 
28624   /// Provides the event args for the corresponding event.
28625 
28626   HRESULT Invoke(
28627       /+[in]+/ ICoreWebView2 sender,
28628       /+[in]+/ ICoreWebView2PermissionRequestedEventArgs args);
28629 }
28630 
28631 /// Receives the result of the `AddScriptToExecuteOnDocumentCreated` method.
28632 const GUID IID_ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler = ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler.iid;
28633 
28634 interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler : IUnknown
28635 {
28636     static const GUID iid = { 0xb99369f3,0x9b11,0x47b5,[ 0xbc,0x6f,0x8e,0x78,0x95,0xfc,0xea,0x17 ] };
28637 
28638   /// Provide the completion status and result of the corresponding
28639   /// asynchronous method.
28640 
28641   HRESULT Invoke(in HRESULT errorCode, in LPCWSTR id);
28642 }
28643 
28644 /// Receives the result of the `ExecuteScript` method.
28645 const GUID IID_ICoreWebView2ExecuteScriptCompletedHandler = ICoreWebView2ExecuteScriptCompletedHandler.iid;
28646 
28647 interface ICoreWebView2ExecuteScriptCompletedHandler : IUnknown
28648 {
28649     static const GUID iid = { 0x49511172,0xcc67,0x4bca,[ 0x99,0x23,0x13,0x71,0x12,0xf4,0xc4,0xcc ] };
28650 
28651   /// Provide the implementer with the completion status and result of the
28652   /// corresponding asynchronous method.
28653 
28654   HRESULT Invoke(in HRESULT errorCode, in LPCWSTR resultObjectAsJson);
28655 }
28656 
28657 /// Event args for the `WebResourceRequested` event.
28658 const GUID IID_ICoreWebView2WebResourceRequestedEventArgs = ICoreWebView2WebResourceRequestedEventArgs.iid;
28659 
28660 interface ICoreWebView2WebResourceRequestedEventArgs : IUnknown
28661 {
28662     static const GUID iid = { 0x453e667f,0x12c7,0x49d4,[ 0xbe,0x6d,0xdd,0xbe,0x79,0x56,0xf5,0x7a ] };
28663 
28664   /// The Web resource request.  The request object may be missing some headers
28665   /// that are added by network stack at a later time.
28666 
28667   @(" propget")
28668 	HRESULT get_Request(@("out, retval") ICoreWebView2WebResourceRequest * request);
28669 
28670   /// A placeholder for the web resource response object.  If this object is
28671   /// set, the web resource request is completed with the specified response.
28672 
28673   @(" propget")
28674 	HRESULT get_Response(@("out, retval") ICoreWebView2WebResourceResponse * response);
28675 
28676   /// Sets the `Response` property.  Create an empty web resource response
28677   /// object with `CreateWebResourceResponse` and then modify it to construct
28678   /// the response.
28679 
28680   @(" propput")
28681 	HRESULT put_Response(/+[in]+/ ICoreWebView2WebResourceResponse response);
28682 
28683   /// Obtain an `ICoreWebView2Deferral` object and put the event into a
28684   /// deferred state.  Use the `ICoreWebView2Deferral` object to complete the
28685   /// request at a later time.
28686 
28687   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
28688 
28689   /// The web resource request context.
28690 
28691   @(" propget")
28692 	HRESULT get_ResourceContext(@("out, retval") COREWEBVIEW2_WEB_RESOURCE_CONTEXT* context);
28693 }
28694 
28695 /// Runs when a URL request (through network, file, and so on) is made in
28696 /// the webview for a Web resource matching resource context filter and URL
28697 /// specified in `AddWebResourceRequestedFilter`.  The host views and modifies
28698 /// the request or provide a response in a similar pattern to HTTP, in which
28699 /// case the request immediately completed.  This may not contain any request
28700 /// headers that are added by the network stack, such as an `Authorization`
28701 /// header.
28702 const GUID IID_ICoreWebView2WebResourceRequestedEventHandler = ICoreWebView2WebResourceRequestedEventHandler.iid;
28703 
28704 interface ICoreWebView2WebResourceRequestedEventHandler : IUnknown
28705 {
28706     static const GUID iid = { 0xab00b74c,0x15f1,0x4646,[ 0x80,0xe8,0xe7,0x63,0x41,0xd2,0x5d,0x71 ] };
28707 
28708   /// Provides the event args for the corresponding event.
28709 
28710   HRESULT Invoke(
28711       /+[in]+/ ICoreWebView2 sender,
28712       /+[in]+/ ICoreWebView2WebResourceRequestedEventArgs args);
28713 }
28714 
28715 /// Receives the result of the `CapturePreview` method.  The result is written
28716 /// to the stream provided in the `CapturePreview` method.
28717 
28718 const GUID IID_ICoreWebView2CapturePreviewCompletedHandler = ICoreWebView2CapturePreviewCompletedHandler.iid;
28719 
28720 interface ICoreWebView2CapturePreviewCompletedHandler : IUnknown
28721 {
28722     static const GUID iid = { 0x697e05e9,0x3d8f,0x45fa,[ 0x96,0xf4,0x8f,0xfe,0x1e,0xde,0xda,0xf5 ] };
28723 
28724   /// Provides the completion status of the corresponding asynchronous method.
28725 
28726   HRESULT Invoke(in HRESULT errorCode);
28727 }
28728 
28729 /// Receives `GotFocus` and `LostFocus` events.
28730 
28731 const GUID IID_ICoreWebView2FocusChangedEventHandler = ICoreWebView2FocusChangedEventHandler.iid;
28732 
28733 interface ICoreWebView2FocusChangedEventHandler : IUnknown
28734 {
28735     static const GUID iid = { 0x05ea24bd,0x6452,0x4926,[ 0x90,0x14,0x4b,0x82,0xb4,0x98,0x13,0x5d ] };
28736 
28737   /// Provides the event args for the corresponding event.  No event args exist
28738   /// and the `args` parameter is set to `null`.
28739 
28740   HRESULT Invoke(
28741       /+[in]+/ ICoreWebView2Controller sender,
28742       /+[in]+/ IUnknown args);
28743 }
28744 
28745 /// Event args for the `MoveFocusRequested` event.
28746 
28747 const GUID IID_ICoreWebView2MoveFocusRequestedEventArgs = ICoreWebView2MoveFocusRequestedEventArgs.iid;
28748 
28749 interface ICoreWebView2MoveFocusRequestedEventArgs : IUnknown
28750 {
28751     static const GUID iid = { 0x2d6aa13b,0x3839,0x4a15,[ 0x92,0xfc,0xd8,0x8b,0x3c,0x0d,0x9c,0x9d ] };
28752 
28753   /// The reason for WebView to run the `MoveFocusRequested` event.
28754 
28755   @(" propget")
28756 	HRESULT get_Reason(@("out, retval") COREWEBVIEW2_MOVE_FOCUS_REASON* reason);
28757 
28758   /// Indicates whether the event has been handled by the app.  If the app has
28759   /// moved the focus to another desired location, it should set the `Handled`
28760   /// property to `TRUE`.  When the `Handled` property is `FALSE` after the
28761   /// event handler returns, default action is taken.  The default action is to
28762   /// try to find the next tab stop child window in the app and try to move
28763   /// focus to that window.  If no other window exists to move focus, focus is
28764   /// cycled within the web content of the WebView.
28765 
28766   @(" propget")
28767 	HRESULT get_Handled(@("out, retval") BOOL* value);
28768 
28769   /// Sets the `Handled` property.
28770 
28771   @(" propput")
28772 	HRESULT put_Handled(in BOOL value);
28773 }
28774 
28775 /// Receives `MoveFocusRequested` events.
28776 
28777 const GUID IID_ICoreWebView2MoveFocusRequestedEventHandler = ICoreWebView2MoveFocusRequestedEventHandler.iid;
28778 
28779 interface ICoreWebView2MoveFocusRequestedEventHandler : IUnknown
28780 {
28781     static const GUID iid = { 0x69035451,0x6dc7,0x4cb8,[ 0x9b,0xce,0xb2,0xbd,0x70,0xad,0x28,0x9f ] };
28782 
28783   /// Provides the event args for the corresponding event.
28784 
28785   HRESULT Invoke(
28786       /+[in]+/ ICoreWebView2Controller sender,
28787       /+[in]+/ ICoreWebView2MoveFocusRequestedEventArgs args);
28788 }
28789 
28790 /// Event args for the `WebMessageReceived` event.
28791 const GUID IID_ICoreWebView2WebMessageReceivedEventArgs = ICoreWebView2WebMessageReceivedEventArgs.iid;
28792 
28793 interface ICoreWebView2WebMessageReceivedEventArgs : IUnknown
28794 {
28795     static const GUID iid = { 0x0f99a40c,0xe962,0x4207,[ 0x9e,0x92,0xe3,0xd5,0x42,0xef,0xf8,0x49 ] };
28796 
28797   /// The URI of the document that sent this web message.
28798   ///
28799   /// The caller must free the returned string with `CoTaskMemFree`.  See
28800   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28801 
28802   @(" propget")
28803 	HRESULT get_Source(@("out, retval") LPWSTR* source);
28804 
28805   /// The message posted from the WebView content to the host converted to a
28806   /// JSON string.  Run this operation to communicate using JavaScript objects.
28807   ///
28808   /// For example, the following `postMessage` runs result in the following
28809   /// `WebMessageAsJson` values.
28810   ///
28811   /// ```json
28812   /// postMessage({'a': 'b'})      L"{\"a\": \"b\"}"
28813   /// postMessage(1.2)             L"1.2"
28814   /// postMessage('example')       L"\"example\""
28815   /// ```
28816   ///
28817   /// The caller must free the returned string with `CoTaskMemFree`.  See
28818   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28819 
28820   @(" propget")
28821 	HRESULT get_WebMessageAsJson(@("out, retval") LPWSTR* webMessageAsJson);
28822 
28823   /// If the message posted from the WebView content to the host is a string
28824   /// type, this method returns the value of that string.  If the message
28825   /// posted is some other kind of JavaScript type this method fails with the
28826   /// following error.
28827   ///
28828   /// ```text
28829   /// E_INVALIDARG
28830   /// ```
28831   ///
28832   /// Run this operation to communicate using simple strings.
28833   ///
28834   /// For example, the following `postMessage` runs result in the following
28835   /// `WebMessageAsString` values.
28836   ///
28837   /// ```json
28838   /// postMessage({'a': 'b'})      E_INVALIDARG
28839   /// postMessage(1.2)             E_INVALIDARG
28840   /// postMessage('example')       L"example"
28841   /// ```
28842   ///
28843   /// The caller must free the returned string with `CoTaskMemFree`.  See
28844   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28845 
28846   HRESULT TryGetWebMessageAsString(@("out, retval") LPWSTR* webMessageAsString);
28847 }
28848 
28849 /// Receives `WebMessageReceived` events.
28850 const GUID IID_ICoreWebView2WebMessageReceivedEventHandler = ICoreWebView2WebMessageReceivedEventHandler.iid;
28851 
28852 interface ICoreWebView2WebMessageReceivedEventHandler : IUnknown
28853 {
28854     static const GUID iid = { 0x57213f19,0x00e6,0x49fa,[ 0x8e,0x07,0x89,0x8e,0xa0,0x1e,0xcb,0xd2 ] };
28855 
28856   /// Provides the event args for the corresponding event.
28857 
28858   HRESULT Invoke(
28859       /+[in]+/ ICoreWebView2 sender,
28860       /+[in]+/ ICoreWebView2WebMessageReceivedEventArgs args);
28861 }
28862 
28863 /// Event args for the `DevToolsProtocolEventReceived` event.
28864 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventArgs = ICoreWebView2DevToolsProtocolEventReceivedEventArgs.iid;
28865 
28866 interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs : IUnknown
28867 {
28868     static const GUID iid = { 0x653c2959,0xbb3a,0x4377,[ 0x86,0x32,0xb5,0x8a,0xda,0x4e,0x66,0xc4 ] };
28869 
28870   /// The parameter object of the corresponding `DevToolsProtocol` event
28871   /// represented as a JSON string.
28872   ///
28873   /// The caller must free the returned string with `CoTaskMemFree`.  See
28874   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28875 
28876   @(" propget")
28877 	HRESULT get_ParameterObjectAsJson(@("out, retval") LPWSTR*
28878                                     parameterObjectAsJson);
28879 }
28880 
28881 /// This is a continuation of the `ICoreWebView2DevToolsProtocolEventReceivedEventArgs`
28882 /// interface that provides the session ID of the target where the event originates from.
28883 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 = ICoreWebView2DevToolsProtocolEventReceivedEventArgs2.iid;
28884 
28885 interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 : ICoreWebView2DevToolsProtocolEventReceivedEventArgs
28886 {
28887     static const GUID iid = { 0x2DC4959D,0x1494,0x4393,[ 0x95,0xBA,0xBE,0xA4,0xCB,0x9E,0xBD,0x1B ] };
28888 
28889   /// The sessionId of the target where the event originates from.
28890   /// Empty string is returned as sessionId if the event comes from the default
28891   /// session for the top page.
28892   ///
28893   /// The caller must free the returned string with `CoTaskMemFree`.  See
28894   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28895   ///
28896   /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceivedSessionId
28897   @(" propget")
28898 	HRESULT get_SessionId(@("out, retval") LPWSTR* sessionId);
28899 }
28900 
28901 /// Receives `DevToolsProtocolEventReceived` events from the WebView.
28902 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventHandler = ICoreWebView2DevToolsProtocolEventReceivedEventHandler.iid;
28903 
28904 interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler : IUnknown
28905 {
28906     static const GUID iid = { 0xe2fda4be,0x5456,0x406c,[ 0xa2,0x61,0x3d,0x45,0x21,0x38,0x36,0x2c ] };
28907 
28908   /// Provides the event args for the corresponding event.
28909 
28910   HRESULT Invoke(
28911       /+[in]+/ ICoreWebView2 sender,
28912       /+[in]+/ ICoreWebView2DevToolsProtocolEventReceivedEventArgs args);
28913 }
28914 
28915 /// Receives `CallDevToolsProtocolMethod` completion results.
28916 const GUID IID_ICoreWebView2CallDevToolsProtocolMethodCompletedHandler = ICoreWebView2CallDevToolsProtocolMethodCompletedHandler.iid;
28917 
28918 interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler : IUnknown
28919 {
28920     static const GUID iid = { 0x5c4889f0,0x5ef6,0x4c5a,[ 0x95,0x2c,0xd8,0xf1,0xb9,0x2d,0x05,0x74 ] };
28921 
28922   /// Provides the completion status and result of the corresponding
28923   /// asynchronous method.
28924 
28925   HRESULT Invoke(in HRESULT errorCode, in LPCWSTR returnObjectAsJson);
28926 }
28927 
28928 /// Receives the `CoreWebView2Controller` created using `CreateCoreWebView2Controller`.
28929 
28930 const GUID IID_ICoreWebView2CreateCoreWebView2ControllerCompletedHandler = ICoreWebView2CreateCoreWebView2ControllerCompletedHandler.iid;
28931 
28932 interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler : IUnknown
28933 {
28934     static const GUID iid = { 0x6c4819f3,0xc9b7,0x4260,[ 0x81,0x27,0xc9,0xf5,0xbd,0xe7,0xf6,0x8c ] };
28935 
28936   /// Provides the completion status and result of the corresponding
28937   /// asynchronous method.
28938 
28939   HRESULT Invoke(HRESULT errorCode, ICoreWebView2Controller createdController);
28940 }
28941 
28942 /// The caller implements this interface to receive the CoreWebView2Controller
28943 /// created via CreateCoreWebView2CompositionController.
28944 const GUID IID_ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler = ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler.iid;
28945 
28946 interface ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler : IUnknown
28947 {
28948     static const GUID iid = { 0x02fab84b,0x1428,0x4fb7,[ 0xad,0x45,0x1b,0x2e,0x64,0x73,0x61,0x84 ] };
28949   /// Called to provide the implementer with the completion status and result
28950   /// of the corresponding asynchronous method call.
28951   HRESULT Invoke(
28952       HRESULT errorCode,
28953       ICoreWebView2CompositionController webView);
28954 }
28955 
28956 /// Event args for the `NewWindowRequested` event.  The event is run when
28957 /// content inside webview requested to a open a new window (through
28958 /// `window.open()` and so on).
28959 const GUID IID_ICoreWebView2NewWindowRequestedEventArgs = ICoreWebView2NewWindowRequestedEventArgs.iid;
28960 
28961 interface ICoreWebView2NewWindowRequestedEventArgs : IUnknown
28962 {
28963     static const GUID iid = { 0x34acb11c,0xfc37,0x4418,[ 0x91,0x32,0xf9,0xc2,0x1d,0x1e,0xaf,0xb9 ] };
28964 
28965   /// The target uri of the new window requested.
28966   ///
28967   /// The caller must free the returned string with `CoTaskMemFree`.  See
28968   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
28969 
28970   @(" propget")
28971 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
28972 
28973   /// Sets a CoreWebView2 as a result of the NewWindowRequested event. Provides
28974   /// a WebView as the target for a `window.open()` from inside the
28975   /// requesting WebView. If this is set, the top-level window of this WebView
28976   /// is returned as the opened
28977   /// [WindowProxy](https://developer.mozilla.org/en-US/docs/glossary/windowproxy)
28978   /// to the opener script. If this is not set, then `Handled` is checked to
28979   /// determine behavior for NewWindowRequested event.
28980   /// CoreWebView2 provided in the `NewWindow` property must be on the same
28981   /// Environment as the opener WebView and should not have been navigated
28982   /// previously. Don't use methods that cause navigation or interact with the
28983   /// DOM on this CoreWebView2 until the target content has loaded. Setting event
28984   /// handlers, changing Settings properties, or other methods are fine to call.
28985   /// Changes to settings should be made before `put_NewWindow` is called to
28986   /// ensure that those settings take effect for the newly setup WebView. Once the
28987   /// NewWindow is set the underlying web contents of this CoreWebView2 will be
28988   /// replaced and navigated as appropriate for the new window. After setting
28989   /// new window it cannot be changed and error will be return otherwise.
28990   ///
28991   /// The methods which should affect the new web contents like
28992   /// AddScriptToExecuteOnDocumentCreated has to be called and completed before setting NewWindow.
28993   /// Other methods which should affect the new web contents like add_WebResourceRequested have to be called after setting NewWindow.
28994   /// It is best not to use RemoveScriptToExecuteOnDocumentCreated before setting NewWindow, otherwise it may not work for later added scripts.
28995   ///
28996   /// The new WebView must have the same profile as the opener WebView.
28997 
28998   @(" propput")
28999 	HRESULT put_NewWindow(/+[in]+/ ICoreWebView2 newWindow);
29000 
29001   /// Gets the new window.
29002 
29003   @(" propget")
29004 	HRESULT get_NewWindow(@("out, retval") ICoreWebView2 * newWindow);
29005 
29006   /// Sets whether the `NewWindowRequested` event is handled by host.  If this
29007   /// is `FALSE` and no `NewWindow` is set, the WebView opens a popup window
29008   /// and it returns as opened `WindowProxy`.  If set to `TRUE` and no
29009   /// `NewWindow` is set for `window.open`, the opened `WindowProxy` is for an
29010   /// testing window object and no window loads.
29011   /// The default value is `FALSE`.
29012 
29013   @(" propput")
29014 	HRESULT put_Handled(in BOOL handled);
29015 
29016   /// Gets whether the `NewWindowRequested` event is handled by host.
29017 
29018   @(" propget")
29019 	HRESULT get_Handled(@("out, retval") BOOL* handled);
29020 
29021   /// `TRUE` when the new window request was initiated through a user gesture.
29022   /// Examples of user initiated requests are:
29023   ///
29024   /// - Selecting an anchor tag with target
29025   /// - Programmatic window open from a script that directly run as a result of
29026   /// user interaction such as via onclick handlers.
29027   ///
29028   /// Non-user initiated requests are programmatic window opens from a script
29029   /// that are not directly triggered by user interaction, such as those that
29030   /// run while loading a new page or via timers.
29031   /// The Microsoft Edge popup blocker is disabled for WebView so the app is
29032   /// able to use this flag to block non-user initiated popups.
29033 
29034   @(" propget")
29035 	HRESULT get_IsUserInitiated(@("out, retval") BOOL* isUserInitiated);
29036 
29037   /// Obtain an `ICoreWebView2Deferral` object and put the event into a
29038   /// deferred state.  Use the `ICoreWebView2Deferral` object to complete the
29039   /// window open request at a later time.  While this event is deferred the
29040   /// opener window returns a `WindowProxy` to an un-navigated window, which
29041   /// navigates when the deferral is complete.
29042 
29043   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
29044 
29045   /// Window features specified by the `window.open`.  The features should be
29046   /// considered for positioning and sizing of new webview windows.
29047 
29048   @(" propget")
29049 	HRESULT get_WindowFeatures(@("out, retval") ICoreWebView2WindowFeatures * value);
29050 }
29051 
29052 /// This is a continuation of the `ICoreWebView2NewWindowRequestedEventArgs` interface.
29053 const GUID IID_ICoreWebView2NewWindowRequestedEventArgs2 = ICoreWebView2NewWindowRequestedEventArgs2.iid;
29054 
29055 interface ICoreWebView2NewWindowRequestedEventArgs2 : ICoreWebView2NewWindowRequestedEventArgs
29056 {
29057     static const GUID iid = { 0xbbc7baed,0x74c6,0x4c92,[ 0xb6,0x3a,0x7f,0x5a,0xea,0xe0,0x3d,0xe3 ] };
29058   /// Gets the name of the new window. This window can be created via `window.open(url, windowName)`,
29059   /// where the windowName parameter corresponds to `Name` property.
29060   /// If no windowName is passed to `window.open`, then the `Name` property
29061   /// will be set to an empty string. Additionally, if window is opened through other means,
29062   /// such as `<a target="windowName">...</a>` or `<iframe name="windowName">...</iframe>`,
29063   /// then the `Name` property will be set accordingly. In the case of target=_blank,
29064   /// the `Name` property will be an empty string.
29065   /// Opening a window via ctrl+clicking a link would result in the `Name` property
29066   /// being set to an empty string.
29067   ///
29068   /// The caller must free the returned string with `CoTaskMemFree`.  See
29069   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29070   @(" propget")
29071 	HRESULT get_Name(@("out, retval") LPWSTR* value);
29072 }
29073 
29074 /// The window features for a WebView popup window.  The fields match the
29075 /// `windowFeatures` passed to `window.open` as specified in
29076 /// [Window features](https://developer.mozilla.org/docs/Web/API/Window/open#Window_features)
29077 /// on MDN.
29078 ///
29079 /// There is no requirement for you to respect the values.  If your app does
29080 /// not have corresponding UI features (for example, no toolbar) or if all
29081 /// instance of WebView are opened in tabs and do not have distinct size or
29082 /// positions, then your app does not respect the values.  You may want to
29083 /// respect values, but perhaps only some apply to the UI of you app.
29084 /// Accordingly, you may respect all, some, or none of the properties as
29085 /// appropriate for your app.  For all numeric properties, if the value that is
29086 /// passed to `window.open` is outside the range of an unsigned 32bit int, the
29087 /// resulting value is the absolute value of the maximum for unsigned 32bit
29088 /// integer.  If you are not able to parse the value an integer, it is
29089 /// considered `0`.  If the value is a floating point value, it is rounded down
29090 /// to an integer.
29091 ///
29092 /// In runtime versions 98 or later, the values of `ShouldDisplayMenuBar`,
29093 /// `ShouldDisplayStatus`, `ShouldDisplayToolbar`, and `ShouldDisplayScrollBars`
29094 /// will not directly depend on the equivalent fields in the `windowFeatures`
29095 /// string.  Instead, they will all be false if the window is expected to be a
29096 /// popup, and true if it is not.
29097 const GUID IID_ICoreWebView2WindowFeatures = ICoreWebView2WindowFeatures.iid;
29098 
29099 interface ICoreWebView2WindowFeatures : IUnknown
29100 {
29101     static const GUID iid = { 0x5eaf559f,0xb46e,0x4397,[ 0x88,0x60,0xe4,0x22,0xf2,0x87,0xff,0x1e ] };
29102 
29103   /// Specifies left and top values.
29104 
29105   @(" propget")
29106 	HRESULT get_HasPosition(@("out, retval") BOOL* value);
29107 
29108   /// Specifies height and width values.
29109 
29110   @(" propget")
29111 	HRESULT get_HasSize(@("out, retval") BOOL* value);
29112 
29113   /// Specifies the left position of the window.   If `HasPosition` is set to
29114   /// `FALSE`, this field is ignored.
29115 
29116   @(" propget")
29117 	HRESULT get_Left(@("out, retval") UINT32* value);
29118 
29119   /// Specifies the top position of the window.   If `HasPosition` is set to
29120   /// `FALSE`, this field is ignored.
29121 
29122   @(" propget")
29123 	HRESULT get_Top(@("out, retval") UINT32* value);
29124 
29125   /// Specifies the height of the window.  Minimum value is `100`.  If
29126   /// `HasSize` is set to `FALSE`, this field is ignored.
29127 
29128   @(" propget")
29129 	HRESULT get_Height(@("out, retval") UINT32* value);
29130 
29131   /// Specifies the width of the window.  Minimum value is `100`.  If `HasSize`
29132   /// is set to `FALSE`, this field is ignored.
29133 
29134   @(" propget")
29135 	HRESULT get_Width(@("out, retval") UINT32* value);
29136 
29137   /// Indicates that the menu bar is displayed.
29138 
29139   @(" propget")
29140 	HRESULT get_ShouldDisplayMenuBar(@("out, retval") BOOL* value);
29141 
29142   /// Indicates that the status bar is displayed.
29143 
29144   @(" propget")
29145 	HRESULT get_ShouldDisplayStatus(@("out, retval") BOOL* value);
29146 
29147   /// Indicates that the browser toolbar is displayed.
29148 
29149   @(" propget")
29150 	HRESULT get_ShouldDisplayToolbar(@("out, retval") BOOL* value);
29151 
29152   /// Indicates that the scroll bars are displayed.
29153 
29154   @(" propget")
29155 	HRESULT get_ShouldDisplayScrollBars(@("out, retval") BOOL* value);
29156 }
29157 
29158 /// Receives `NewWindowRequested` events.
29159 const GUID IID_ICoreWebView2NewWindowRequestedEventHandler = ICoreWebView2NewWindowRequestedEventHandler.iid;
29160 
29161 interface ICoreWebView2NewWindowRequestedEventHandler : IUnknown
29162 {
29163     static const GUID iid = { 0xd4c185fe,0xc81c,0x4989,[ 0x97,0xaf,0x2d,0x3f,0xa7,0xab,0x56,0x51 ] };
29164 
29165   /// Provides the event args for the corresponding event.
29166 
29167   HRESULT Invoke(
29168       /+[in]+/ ICoreWebView2 sender,
29169       /+[in]+/ ICoreWebView2NewWindowRequestedEventArgs args);
29170 }
29171 
29172 /// Receives `DocumentTitleChanged` events.  Use the `DocumentTitle` property
29173 /// to get the modified title.
29174 
29175 const GUID IID_ICoreWebView2DocumentTitleChangedEventHandler = ICoreWebView2DocumentTitleChangedEventHandler.iid;
29176 
29177 interface ICoreWebView2DocumentTitleChangedEventHandler : IUnknown
29178 {
29179     static const GUID iid = { 0xf5f2b923,0x953e,0x4042,[ 0x9f,0x95,0xf3,0xa1,0x18,0xe1,0xaf,0xd4 ] };
29180 
29181   /// Provides the event args for the corresponding event.  No event args exist
29182   /// and the `args` parameter is set to `null`.
29183 
29184   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
29185 }
29186 
29187 /// Event args for the `AcceleratorKeyPressed` event.
29188 
29189 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventArgs = ICoreWebView2AcceleratorKeyPressedEventArgs.iid;
29190 
29191 interface ICoreWebView2AcceleratorKeyPressedEventArgs : IUnknown
29192 {
29193     static const GUID iid = { 0x9f760f8a,0xfb79,0x42be,[ 0x99,0x90,0x7b,0x56,0x90,0x0f,0xa9,0xc7 ] };
29194 
29195   /// The key event type that caused the event to run.
29196 
29197   @(" propget")
29198 	HRESULT get_KeyEventKind(@("out, retval") COREWEBVIEW2_KEY_EVENT_KIND* keyEventKind);
29199 
29200   /// The Win32 virtual key code of the key that was pressed or released.  It
29201   /// is one of the Win32 virtual key constants such as `VK_RETURN` or an
29202   /// (uppercase) ASCII value such as `A`.  Verify whether Ctrl or Alt
29203   /// are pressed by running `GetKeyState(VK_CONTROL)` or
29204   /// `GetKeyState(VK_MENU)`.
29205 
29206   @(" propget")
29207 	HRESULT get_VirtualKey(@("out, retval") UINT* virtualKey);
29208 
29209   /// The `LPARAM` value that accompanied the window message.  For more
29210   /// information, navigate to [WM_KEYDOWN](/windows/win32/inputdev/wm-keydown)
29211   /// and [WM_KEYUP](/windows/win32/inputdev/wm-keyup).
29212 
29213   @(" propget")
29214 	HRESULT get_KeyEventLParam(@("out, retval") INT* lParam);
29215 
29216   /// A structure representing the information passed in the `LPARAM` of the
29217   /// window message.
29218 
29219   @(" propget")
29220 	HRESULT get_PhysicalKeyStatus(
29221       @("out, retval") COREWEBVIEW2_PHYSICAL_KEY_STATUS* physicalKeyStatus);
29222 
29223   /// During `AcceleratorKeyPressedEvent` handler invocation the WebView is
29224   /// blocked waiting for the decision of if the accelerator is handled by the
29225   /// host (or not).  If the `Handled` property is set to `TRUE` then this
29226   /// prevents the WebView from performing the default action for this
29227   /// accelerator key.  Otherwise the WebView performs the default action for
29228   /// the accelerator key.
29229 
29230   @(" propget")
29231 	HRESULT get_Handled(@("out, retval") BOOL* handled);
29232 
29233   /// Sets the `Handled` property.
29234 
29235   @(" propput")
29236 	HRESULT put_Handled(in BOOL handled);
29237 }
29238 
29239 /// This is This is a continuation of the ICoreWebView2AcceleratorKeyPressedEventArgs interface.
29240 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventArgs2 = ICoreWebView2AcceleratorKeyPressedEventArgs2.iid;
29241 
29242 interface ICoreWebView2AcceleratorKeyPressedEventArgs2 : ICoreWebView2AcceleratorKeyPressedEventArgs
29243 {
29244     static const GUID iid = { 0x03b2c8c8,0x7799,0x4e34,[ 0xbd,0x66,0xed,0x26,0xaa,0x85,0xf2,0xbf ] };
29245   /// This property allows developers to enable or disable the browser from handling a specific
29246   /// browser accelerator key such as Ctrl+P or F3, etc.
29247   ///
29248   /// Browser accelerator keys are the keys/key combinations that access features specific to
29249   /// a web browser, including but not limited to:
29250   ///  - Ctrl-F and F3 for Find on Page
29251   ///  - Ctrl-P for Print
29252   ///  - Ctrl-R and F5 for Reload
29253   ///  - Ctrl-Plus and Ctrl-Minus for zooming
29254   ///  - Ctrl-Shift-C and F12 for DevTools
29255   ///  - Special keys for browser functions, such as Back, Forward, and Search
29256   ///
29257   /// This property does not disable accelerator keys related to movement and text editing,
29258   /// such as:
29259   ///  - Home, End, Page Up, and Page Down
29260   ///  - Ctrl-X, Ctrl-C, Ctrl-V
29261   ///  - Ctrl-A for Select All
29262   ///  - Ctrl-Z for Undo
29263   ///
29264   /// The `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` API is a convenient setting
29265   /// for developers to disable all the browser accelerator keys together, and sets the default
29266   /// value for the `IsBrowserAcceleratorKeyEnabled` property.
29267   /// By default, `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` is `TRUE` and
29268   /// `IsBrowserAcceleratorKeyEnabled` is `TRUE`.
29269   /// When developers change `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` setting to `FALSE`,
29270   /// this will change default value for `IsBrowserAcceleratorKeyEnabled` to `FALSE`.
29271   /// If developers want specific keys to be handled by the browser after changing the
29272   /// `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` setting to `FALSE`, they need to enable
29273   /// these keys by setting `IsBrowserAcceleratorKeyEnabled` to `TRUE`.
29274   /// This API will give the event arg higher priority over the
29275   /// `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` setting when we handle the keys.
29276   ///
29277   /// For browser accelerator keys, when an accelerator key is pressed, the propagation and
29278   /// processing order is:
29279   /// 1. A CoreWebView2Controller.AcceleratorKeyPressed event is raised
29280   /// 2. WebView2 browser feature accelerator key handling
29281   /// 3. Web Content Handling: If the key combination isn't reserved for browser actions,
29282   /// the key event propagates to the web content, where JavaScript event listeners can
29283   /// capture and respond to it.
29284   ///
29285   /// `ICoreWebView2AcceleratorKeyPressedEventArgs` has a `Handled` property, that developers
29286   /// can use to mark a key as handled. When the key is marked as handled anywhere along
29287   /// the path, the event propagation stops, and web content will not receive the key.
29288   /// With `IsBrowserAcceleratorKeyEnabled` property, if developers mark
29289   /// `IsBrowserAcceleratorKeyEnabled` as `FALSE`, the browser will skip the WebView2
29290   /// browser feature accelerator key handling process, but the event propagation
29291   /// continues, and web content will receive the key combination.
29292   ///
29293   /// \snippet ScenarioAcceleratorKeyPressed.cpp IsBrowserAcceleratorKeyEnabled
29294   /// Gets the `IsBrowserAcceleratorKeyEnabled` property.
29295   @(" propget")
29296 	HRESULT get_IsBrowserAcceleratorKeyEnabled(@("out, retval") BOOL* value);
29297 
29298   /// Sets the `IsBrowserAcceleratorKeyEnabled` property.
29299   @(" propput")
29300 	HRESULT put_IsBrowserAcceleratorKeyEnabled(in BOOL value);
29301 }
29302 
29303 /// Receives `AcceleratorKeyPressed` events.
29304 
29305 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventHandler = ICoreWebView2AcceleratorKeyPressedEventHandler.iid;
29306 
29307 interface ICoreWebView2AcceleratorKeyPressedEventHandler : IUnknown
29308 {
29309     static const GUID iid = { 0xb29c7e28,0xfa79,0x41a8,[ 0x8e,0x44,0x65,0x81,0x1c,0x76,0xdc,0xb2 ] };
29310 
29311   /// Provides the event args for the corresponding event.
29312 
29313   HRESULT Invoke(
29314       /+[in]+/ ICoreWebView2Controller sender,
29315       /+[in]+/ ICoreWebView2AcceleratorKeyPressedEventArgs args);
29316 }
29317 
29318 /// Receives `NewBrowserVersionAvailable` events.
29319 const GUID IID_ICoreWebView2NewBrowserVersionAvailableEventHandler = ICoreWebView2NewBrowserVersionAvailableEventHandler.iid;
29320 
29321 interface ICoreWebView2NewBrowserVersionAvailableEventHandler : IUnknown
29322 {
29323     static const GUID iid = { 0xf9a2976e,0xd34e,0x44fc,[ 0xad,0xee,0x81,0xb6,0xb5,0x7c,0xa9,0x14 ] };
29324 
29325   /// Provides the event args for the corresponding event.
29326 
29327   HRESULT Invoke(/+[in]+/ ICoreWebView2Environment sender,
29328                  /+[in]+/ IUnknown args);
29329 }
29330 
29331 /// Receives `BrowserProcessExited` events.
29332 const GUID IID_ICoreWebView2BrowserProcessExitedEventHandler = ICoreWebView2BrowserProcessExitedEventHandler.iid;
29333 
29334 interface ICoreWebView2BrowserProcessExitedEventHandler : IUnknown
29335 {
29336     static const GUID iid = { 0xfa504257,0xa216,0x4911,[ 0xa8,0x60,0xfe,0x88,0x25,0x71,0x28,0x61 ] };
29337   /// Provides the event args for the corresponding event.
29338   HRESULT Invoke(
29339       /+[in]+/ ICoreWebView2Environment sender,
29340       /+[in]+/ ICoreWebView2BrowserProcessExitedEventArgs args);
29341 }
29342 
29343 /// Receives `ContainsFullScreenElementChanged` events.
29344 
29345 const GUID IID_ICoreWebView2ContainsFullScreenElementChangedEventHandler = ICoreWebView2ContainsFullScreenElementChangedEventHandler.iid;
29346 
29347 interface ICoreWebView2ContainsFullScreenElementChangedEventHandler : IUnknown
29348 {
29349     static const GUID iid = { 0xe45d98b1,0xafef,0x45be,[ 0x8b,0xaf,0x6c,0x77,0x28,0x86,0x7f,0x73 ] };
29350 
29351   /// Provides the event args for the corresponding event.  No event args exist
29352   /// and the `args` parameter is set to `null`.
29353 
29354   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
29355 }
29356 
29357 /// Receives `WindowCloseRequested` events.
29358 const GUID IID_ICoreWebView2WindowCloseRequestedEventHandler = ICoreWebView2WindowCloseRequestedEventHandler.iid;
29359 
29360 interface ICoreWebView2WindowCloseRequestedEventHandler : IUnknown
29361 {
29362     static const GUID iid = { 0x5c19e9e0,0x092f,0x486b,[ 0xaf,0xfa,0xca,0x82,0x31,0x91,0x30,0x39 ] };
29363 
29364   /// Provides the event args for the corresponding event.  No event args exist
29365   /// and the `args` parameter is set to `null`.
29366 
29367   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
29368 }
29369 
29370 /// Receives `WebResourceResponseReceived` events.
29371 const GUID IID_ICoreWebView2WebResourceResponseReceivedEventHandler = ICoreWebView2WebResourceResponseReceivedEventHandler.iid;
29372 
29373 interface ICoreWebView2WebResourceResponseReceivedEventHandler : IUnknown
29374 {
29375     static const GUID iid = { 0x7DE9898A,0x24F5,0x40C3,[ 0xA2,0xDE,0xD4,0xF4,0x58,0xE6,0x98,0x28 ] };
29376   /// Provides the event args for the corresponding event.
29377   HRESULT Invoke(
29378       /+[in]+/ ICoreWebView2 sender,
29379       /+[in]+/ ICoreWebView2WebResourceResponseReceivedEventArgs args);
29380 }
29381 
29382 /// Event args for the `BrowserProcessExited` event.
29383 const GUID IID_ICoreWebView2BrowserProcessExitedEventArgs = ICoreWebView2BrowserProcessExitedEventArgs.iid;
29384 
29385 interface ICoreWebView2BrowserProcessExitedEventArgs : IUnknown
29386 {
29387     static const GUID iid = { 0x1f00663f,0xaf8c,0x4782,[ 0x9c,0xdd,0xdd,0x01,0xc5,0x2e,0x34,0xcb ] };
29388   /// The kind of browser process exit that has occurred.
29389   @(" propget")
29390 	HRESULT get_BrowserProcessExitKind(
29391       @("out, retval") COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND* browserProcessExitKind);
29392 
29393   /// The process ID of the browser process that has exited.
29394   @(" propget")
29395 	HRESULT get_BrowserProcessId(@("out, retval") UINT32* value);
29396 }
29397 
29398 /// Event args for the WebResourceResponseReceived event.
29399 const GUID IID_ICoreWebView2WebResourceResponseReceivedEventArgs = ICoreWebView2WebResourceResponseReceivedEventArgs.iid;
29400 
29401 interface ICoreWebView2WebResourceResponseReceivedEventArgs : IUnknown
29402 {
29403     static const GUID iid = { 0xD1DB483D,0x6796,0x4B8B,[ 0x80,0xFC,0x13,0x71,0x2B,0xB7,0x16,0xF4 ] };
29404   /// The request object for the web resource, as committed. This includes
29405   /// headers added by the network stack that were not be included during the
29406   /// associated WebResourceRequested event, such as Authentication headers.
29407   /// Modifications to this object have no effect on how the request is
29408   /// processed as it has already been sent.
29409   @(" propget")
29410 	HRESULT get_Request(@("out, retval") ICoreWebView2WebResourceRequest * request);
29411   /// View of the response object received for the web resource.
29412   @(" propget")
29413 	HRESULT get_Response(@("out, retval") ICoreWebView2WebResourceResponseView * response);
29414 }
29415 
29416 /// View of the HTTP representation for a web resource response. The properties
29417 /// of this object are not mutable. This response view is used with the
29418 /// WebResourceResponseReceived event.
29419 const GUID IID_ICoreWebView2WebResourceResponseView = ICoreWebView2WebResourceResponseView.iid;
29420 
29421 interface ICoreWebView2WebResourceResponseView : IUnknown
29422 {
29423     static const GUID iid = { 0x79701053,0x7759,0x4162,[ 0x8F,0x7D,0xF1,0xB3,0xF0,0x84,0x92,0x8D ] };
29424   /// The HTTP response headers as received.
29425   @(" propget")
29426 	HRESULT get_Headers(
29427       @("out, retval") ICoreWebView2HttpResponseHeaders * headers);
29428   /// The HTTP response status code.
29429   @(" propget")
29430 	HRESULT get_StatusCode(@("out, retval") int* statusCode);
29431   /// The HTTP response reason phrase.
29432   ///
29433   /// The caller must free the returned string with `CoTaskMemFree`.  See
29434   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29435   @(" propget")
29436 	HRESULT get_ReasonPhrase(@("out, retval") LPWSTR* reasonPhrase);
29437 
29438   /// Get the response content asynchronously. The handler will receive the
29439   /// response content stream.
29440   ///
29441   /// This method returns null if content size is more than 123MB or for navigations that become downloads
29442   /// or if response is downloadable content type (e.g., application/octet-stream).
29443   /// See `add_DownloadStarting` event to handle the response.
29444   ///
29445   /// If this method is being called again before a first call has completed,
29446   /// the handler will be invoked at the same time the handlers from prior calls
29447   /// are invoked.
29448   /// If this method is being called after a first call has completed, the
29449   /// handler will be invoked immediately.
29450   /// \snippet ScenarioWebViewEventMonitor.cpp GetContent
29451   HRESULT GetContent(
29452       /+[in]+/ ICoreWebView2WebResourceResponseViewGetContentCompletedHandler handler);
29453 }
29454 
29455 /// Receives the result of the
29456 /// `ICoreWebView2WebResourceResponseView::GetContent` method.
29457 const GUID IID_ICoreWebView2WebResourceResponseViewGetContentCompletedHandler = ICoreWebView2WebResourceResponseViewGetContentCompletedHandler.iid;
29458 
29459 interface ICoreWebView2WebResourceResponseViewGetContentCompletedHandler : IUnknown
29460 {
29461     static const GUID iid = { 0x875738E1,0x9FA2,0x40E3,[ 0x8B,0x74,0x2E,0x89,0x72,0xDD,0x6F,0xE7 ] };
29462   /// Provides the completion status and result of the corresponding
29463   /// asynchronous method call. A failure `errorCode` will be passed if the
29464   /// content failed to load. `E_ABORT` means the response loading was blocked
29465   /// (e.g., by CORS policy); `ERROR_CANCELLED` means the response loading was
29466   /// cancelled. `ERROR_NO_DATA` means the response has no content data,
29467   /// `content` is `null` in this case. Note content (if any) is ignored for
29468   /// redirects, 204 No Content, 205 Reset Content, and HEAD-request responses.
29469   HRESULT Invoke(in HRESULT errorCode, in IStream* content);
29470 }
29471 
29472 /// Event args for the DOMContentLoaded event.
29473 const GUID IID_ICoreWebView2DOMContentLoadedEventArgs = ICoreWebView2DOMContentLoadedEventArgs.iid;
29474 
29475 interface ICoreWebView2DOMContentLoadedEventArgs : IUnknown
29476 {
29477     static const GUID iid = { 0x16B1E21A,0xC503,0x44F2,[ 0x84,0xC9,0x70,0xAB,0xA5,0x03,0x12,0x83 ] };
29478   /// The ID of the navigation which corresponds to other navigation ID properties on other navigation events.
29479   @(" propget")
29480 	HRESULT get_NavigationId(@("out, retval") UINT64* navigationId);
29481 }
29482 
29483 /// Receives `DOMContentLoaded` events.
29484 const GUID IID_ICoreWebView2DOMContentLoadedEventHandler = ICoreWebView2DOMContentLoadedEventHandler.iid;
29485 
29486 interface ICoreWebView2DOMContentLoadedEventHandler : IUnknown
29487 {
29488     static const GUID iid = { 0x4BAC7E9C,0x199E,0x49ED,[ 0x87,0xED,0x24,0x93,0x03,0xAC,0xF0,0x19 ] };
29489   /// Provides the event args for the corresponding event.
29490   HRESULT Invoke(
29491       /+[in]+/ ICoreWebView2 sender,
29492       /+[in]+/ ICoreWebView2DOMContentLoadedEventArgs args);
29493 }
29494 
29495 /// Provides a set of properties that are used to manage an
29496 /// ICoreWebView2Cookie.
29497 ///
29498 /// \snippet ScenarioCookieManagement.cpp CookieObject
29499 const GUID IID_ICoreWebView2Cookie = ICoreWebView2Cookie.iid;
29500 
29501 interface ICoreWebView2Cookie : IUnknown
29502 {
29503     static const GUID iid = { 0xAD26D6BE,0x1486,0x43E6,[ 0xBF,0x87,0xA2,0x03,0x40,0x06,0xCA,0x21 ] };
29504   /// Cookie name.
29505   ///
29506   /// The caller must free the returned string with `CoTaskMemFree`.  See
29507   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29508   @(" propget")
29509 	HRESULT get_Name(@("out, retval") LPWSTR* name);
29510 
29511   /// Cookie value.
29512   ///
29513   /// The caller must free the returned string with `CoTaskMemFree`.  See
29514   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29515   @(" propget")
29516 	HRESULT get_Value(@("out, retval") LPWSTR* value);
29517   /// Set the cookie value property.
29518   @(" propput")
29519 	HRESULT put_Value(in LPCWSTR value);
29520 
29521   /// The domain for which the cookie is valid.
29522   /// The default is the host that this cookie has been received from.
29523   /// Note that, for instance, ".bing.com", "bing.com", and "www.bing.com" are
29524   /// considered different domains.
29525   ///
29526   /// The caller must free the returned string with `CoTaskMemFree`.  See
29527   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29528   @(" propget")
29529 	HRESULT get_Domain(@("out, retval") LPWSTR* domain);
29530 
29531   /// The path for which the cookie is valid. The default is "/", which means
29532   /// this cookie will be sent to all pages on the Domain.
29533   ///
29534   /// The caller must free the returned string with `CoTaskMemFree`.  See
29535   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29536   @(" propget")
29537 	HRESULT get_Path(@("out, retval") LPWSTR* path);
29538 
29539   /// The expiration date and time for the cookie as the number of seconds since the UNIX epoch.
29540   /// The default is -1.0, which means cookies are session cookies by default.
29541   @(" propget")
29542 	HRESULT get_Expires(@("out, retval") double* expires);
29543   /// Set the Expires property. Cookies are session cookies and will not be
29544   /// persistent if Expires is set to -1.0. NaN, infinity, and any negative
29545   /// value set other than -1.0 is disallowed.
29546   @(" propput")
29547 	HRESULT put_Expires(in double expires);
29548 
29549   /// Whether this cookie is http-only.
29550   /// True if a page script or other active content cannot access this
29551   /// cookie. The default is false.
29552   @(" propget")
29553 	HRESULT get_IsHttpOnly(@("out, retval") BOOL* isHttpOnly);
29554   /// Set the IsHttpOnly property.
29555   @(" propput")
29556 	HRESULT put_IsHttpOnly(in BOOL isHttpOnly);
29557 
29558   /// SameSite status of the cookie which represents the enforcement mode of the cookie.
29559   /// The default is COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX.
29560   @(" propget")
29561 	HRESULT get_SameSite(@("out, retval") COREWEBVIEW2_COOKIE_SAME_SITE_KIND* sameSite);
29562   /// Set the SameSite property.
29563   @(" propput")
29564 	HRESULT put_SameSite(in COREWEBVIEW2_COOKIE_SAME_SITE_KIND sameSite);
29565 
29566   /// The security level of this cookie. True if the client is only to return
29567   /// the cookie in subsequent requests if those requests use HTTPS.
29568   /// The default is false.
29569   /// Note that cookie that requests COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE but
29570   /// is not marked Secure will be rejected.
29571   @(" propget")
29572 	HRESULT get_IsSecure(@("out, retval") BOOL* isSecure);
29573   /// Set the IsSecure property.
29574   @(" propput")
29575 	HRESULT put_IsSecure(in BOOL isSecure);
29576 
29577   /// Whether this is a session cookie. The default is false.
29578   @(" propget")
29579 	HRESULT get_IsSession(@("out, retval") BOOL* isSession);
29580 }
29581 
29582 /// Creates, adds or updates, gets, or or view the cookies. The changes would
29583 /// apply to the context of the user profile. That is, other WebViews under the
29584 /// same user profile could be affected.
29585 const GUID IID_ICoreWebView2CookieManager = ICoreWebView2CookieManager.iid;
29586 
29587 interface ICoreWebView2CookieManager : IUnknown
29588 {
29589     static const GUID iid = { 0x177CD9E7,0xB6F5,0x451A,[ 0x94,0xA0,0x5D,0x7A,0x3A,0x4C,0x41,0x41 ] };
29590   /// Create a cookie object with a specified name, value, domain, and path.
29591   /// One can set other optional properties after cookie creation.
29592   /// This only creates a cookie object and it is not added to the cookie
29593   /// manager until you call AddOrUpdateCookie.
29594   /// Leading or trailing whitespace(s), empty string, and special characters
29595   /// are not allowed for name.
29596   /// See ICoreWebView2Cookie for more details.
29597   HRESULT CreateCookie(
29598     in LPCWSTR name,
29599     in LPCWSTR value,
29600     in LPCWSTR domain,
29601     in LPCWSTR path,
29602     @("out, retval") ICoreWebView2Cookie * cookie);
29603 
29604   /// Creates a cookie whose params matches those of the specified cookie.
29605   HRESULT CopyCookie(
29606     /+[in]+/ ICoreWebView2Cookie cookieParam,
29607     @("out, retval") ICoreWebView2Cookie * cookie);
29608 
29609   /// Gets a list of cookies matching the specific URI.
29610   /// If uri is empty string or null, all cookies under the same profile are
29611   /// returned.
29612   /// You can modify the cookie objects by calling
29613   /// ICoreWebView2CookieManager::AddOrUpdateCookie, and the changes
29614   /// will be applied to the webview.
29615   /// \snippet ScenarioCookieManagement.cpp GetCookies
29616   HRESULT GetCookies(
29617     in LPCWSTR uri,
29618     /+[in]+/ ICoreWebView2GetCookiesCompletedHandler handler);
29619 
29620   /// Adds or updates a cookie with the given cookie data; may overwrite
29621   /// cookies with matching name, domain, and path if they exist.
29622   /// This method will fail if the domain of the given cookie is not specified.
29623   /// \snippet ScenarioCookieManagement.cpp AddOrUpdateCookie
29624   HRESULT AddOrUpdateCookie(/+[in]+/ ICoreWebView2Cookie cookie);
29625 
29626   /// Deletes a cookie whose name and domain/path pair
29627   /// match those of the specified cookie.
29628   HRESULT DeleteCookie(/+[in]+/ ICoreWebView2Cookie cookie);
29629 
29630   /// Deletes cookies with matching name and uri.
29631   /// Cookie name is required.
29632   /// All cookies with the given name where domain
29633   /// and path match provided URI are deleted.
29634   HRESULT DeleteCookies(in LPCWSTR name, in LPCWSTR uri);
29635 
29636   /// Deletes cookies with matching name and domain/path pair.
29637   /// Cookie name is required.
29638   /// If domain is specified, deletes only cookies with the exact domain.
29639   /// If path is specified, deletes only cookies with the exact path.
29640   HRESULT DeleteCookiesWithDomainAndPath(in LPCWSTR name, in LPCWSTR domain, in LPCWSTR path);
29641 
29642   /// Deletes all cookies under the same profile.
29643   /// This could affect other WebViews under the same user profile.
29644   HRESULT DeleteAllCookies();
29645 }
29646 
29647 /// A list of cookie objects. See `ICoreWebView2Cookie`.
29648 /// \snippet ScenarioCookieManagement.cpp GetCookies
29649 const GUID IID_ICoreWebView2CookieList = ICoreWebView2CookieList.iid;
29650 
29651 interface ICoreWebView2CookieList : IUnknown
29652 {
29653     static const GUID iid = { 0xF7F6F714,0x5D2A,0x43C6,[ 0x95,0x03,0x34,0x6E,0xCE,0x02,0xD1,0x86 ] };
29654   /// The number of cookies contained in the ICoreWebView2CookieList.
29655   @(" propget")
29656 	HRESULT get_Count(@("out, retval") UINT* count);
29657 
29658   /// Gets the cookie object at the given index.
29659   HRESULT GetValueAtIndex(in UINT index,
29660 		@("out, retval") ICoreWebView2Cookie * cookie);
29661 }
29662 
29663 /// Receives the result of the `GetCookies` method.  The result is written to
29664 /// the cookie list provided in the `GetCookies` method call.
29665 const GUID IID_ICoreWebView2GetCookiesCompletedHandler = ICoreWebView2GetCookiesCompletedHandler.iid;
29666 
29667 interface ICoreWebView2GetCookiesCompletedHandler : IUnknown
29668 {
29669     static const GUID iid = { 0x5A4F5069,0x5C15,0x47C3,[ 0x86,0x46,0xF4,0xDE,0x1C,0x11,0x66,0x70 ] };
29670   /// Provides the completion status of the corresponding asynchronous method
29671   /// call.
29672   HRESULT Invoke(HRESULT result, ICoreWebView2CookieList cookieList);
29673 }
29674 
29675 /// Provides access to the client certificate metadata.
29676 const GUID IID_ICoreWebView2ClientCertificate = ICoreWebView2ClientCertificate.iid;
29677 
29678 interface ICoreWebView2ClientCertificate : IUnknown
29679 {
29680     static const GUID iid = { 0xe7188076,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
29681   /// Subject of the certificate.
29682   ///
29683   /// The caller must free the returned string with `CoTaskMemFree`. See
29684   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29685   @(" propget")
29686 	HRESULT get_Subject(@("out, retval") LPWSTR* value);
29687   /// Name of the certificate authority that issued the certificate.
29688   ///
29689   /// The caller must free the returned string with `CoTaskMemFree`. See
29690   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29691   @(" propget")
29692 	HRESULT get_Issuer(@("out, retval") LPWSTR* value);
29693   /// The valid start date and time for the certificate as the number of seconds since
29694   /// the UNIX epoch.
29695   @(" propget")
29696 	HRESULT get_ValidFrom(@("out, retval") double* value);
29697   /// The valid expiration date and time for the certificate as the number of seconds since
29698   /// the UNIX epoch.
29699   @(" propget")
29700 	HRESULT get_ValidTo(@("out, retval") double* value);
29701   /// Base64 encoding of DER encoded serial number of the certificate.
29702   /// Read more about DER at [RFC 7468 DER]
29703   /// (https://tools.ietf.org/html/rfc7468#appendix-B).
29704   ///
29705   /// The caller must free the returned string with `CoTaskMemFree`. See
29706   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29707   @(" propget")
29708 	HRESULT get_DerEncodedSerialNumber(@("out, retval") LPWSTR* value);
29709   /// Display name for a certificate.
29710   ///
29711   /// The caller must free the returned string with `CoTaskMemFree`. See
29712   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29713   @(" propget")
29714 	HRESULT get_DisplayName(@("out, retval") LPWSTR* value);
29715   /// PEM encoded data for the certificate.
29716   /// Returns Base64 encoding of DER encoded certificate.
29717   /// Read more about PEM at [RFC 1421 Privacy Enhanced Mail]
29718   /// (https://tools.ietf.org/html/rfc1421).
29719   ///
29720   /// The caller must free the returned string with `CoTaskMemFree`. See
29721   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29722   HRESULT ToPemEncoding(@("out, retval") LPWSTR* pemEncodedData);
29723   /// Collection of PEM encoded client certificate issuer chain.
29724   /// In this collection first element is the current certificate followed by
29725   /// intermediate1, intermediate2...intermediateN-1. Root certificate is the
29726   /// last element in collection.
29727   @(" propget")
29728 	HRESULT get_PemEncodedIssuerCertificateChain(@("out, retval")
29729       ICoreWebView2StringCollection * value);
29730   /// Kind of a certificate (eg., smart card, pin, other).
29731   @(" propget")
29732 	HRESULT get_Kind(@("out, retval")
29733       COREWEBVIEW2_CLIENT_CERTIFICATE_KIND* value);
29734 }
29735 
29736 /// A collection of client certificate object.
29737 const GUID IID_ICoreWebView2ClientCertificateCollection = ICoreWebView2ClientCertificateCollection.iid;
29738 
29739 interface ICoreWebView2ClientCertificateCollection : IUnknown
29740 {
29741     static const GUID iid = { 0xef5674d2,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
29742   /// The number of client certificates contained in the
29743   /// ICoreWebView2ClientCertificateCollection.
29744   @(" propget")
29745 	HRESULT get_Count(@("out, retval") UINT* value);
29746   /// Gets the certificate object at the given index.
29747   HRESULT GetValueAtIndex(in UINT index,
29748       @("out, retval") ICoreWebView2ClientCertificate * certificate);
29749 }
29750 
29751 /// A collection of strings.
29752 const GUID IID_ICoreWebView2StringCollection = ICoreWebView2StringCollection.iid;
29753 
29754 interface ICoreWebView2StringCollection : IUnknown
29755 {
29756     static const GUID iid = { 0xf41f3f8a,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
29757   /// The number of strings contained in ICoreWebView2StringCollection.
29758   @(" propget")
29759 	HRESULT get_Count(@("out, retval") UINT* value);
29760 
29761   /// Gets the value at a given index.
29762   ///
29763   /// The caller must free the returned string with `CoTaskMemFree`.  See
29764   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29765   HRESULT GetValueAtIndex(in UINT index,
29766 		@("out, retval") LPWSTR* value);
29767 }
29768 
29769 /// An event handler for the `ClientCertificateRequested` event.
29770 const GUID IID_ICoreWebView2ClientCertificateRequestedEventHandler = ICoreWebView2ClientCertificateRequestedEventHandler.iid;
29771 
29772 interface ICoreWebView2ClientCertificateRequestedEventHandler : IUnknown
29773 {
29774     static const GUID iid = { 0xd7175ba2,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
29775   /// Provides the event args for the corresponding event.
29776   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender,
29777       /+[in]+/ ICoreWebView2ClientCertificateRequestedEventArgs args);
29778 }
29779 
29780 /// Event args for the `ClientCertificateRequested` event.
29781 const GUID IID_ICoreWebView2ClientCertificateRequestedEventArgs = ICoreWebView2ClientCertificateRequestedEventArgs.iid;
29782 
29783 interface ICoreWebView2ClientCertificateRequestedEventArgs : IUnknown
29784 {
29785     static const GUID iid = { 0xbc59db28,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
29786   /// Host name of the server that requested client certificate authentication.
29787   /// Normalization rules applied to the hostname are:
29788   /// * Convert to lowercase characters for ascii characters.
29789   /// * Punycode is used for representing non ascii characters.
29790   /// * Strip square brackets for IPV6 address.
29791   ///
29792   /// The caller must free the returned string with `CoTaskMemFree`. See
29793   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
29794   @(" propget")
29795 	HRESULT get_Host(@("out, retval") LPWSTR* value);
29796 
29797   /// Port of the server that requested client certificate authentication.
29798   @(" propget")
29799 	HRESULT get_Port(@("out, retval") int* value);
29800 
29801   /// Returns true if the server that issued this request is an http proxy.
29802   /// Returns false if the server is the origin server.
29803   @(" propget")
29804 	HRESULT get_IsProxy(@("out, retval") BOOL* value);
29805 
29806   /// Returns the `ICoreWebView2StringCollection`.
29807   /// The collection contains Base64 encoding of DER encoded distinguished names of
29808   /// certificate authorities allowed by the server.
29809   @(" propget")
29810 	HRESULT get_AllowedCertificateAuthorities(@("out, retval")
29811       ICoreWebView2StringCollection * value);
29812 
29813   /// Returns the `ICoreWebView2ClientCertificateCollection` when client
29814   /// certificate authentication is requested. The collection contains mutually
29815   /// trusted CA certificates.
29816   @(" propget")
29817 	HRESULT get_MutuallyTrustedCertificates(@("out, retval")
29818       ICoreWebView2ClientCertificateCollection * value);
29819 
29820   /// Returns the selected certificate.
29821   @(" propget")
29822 	HRESULT get_SelectedCertificate(@("out, retval")
29823       ICoreWebView2ClientCertificate * value);
29824 
29825   /// Sets the certificate to respond to the server.
29826   @(" propput")
29827 	HRESULT put_SelectedCertificate(
29828       /+[in]+/ ICoreWebView2ClientCertificate value);
29829 
29830   /// You may set this flag to cancel the certificate selection. If canceled,
29831   /// the request is aborted regardless of the `Handled` property. By default the
29832   /// value is `FALSE`.
29833   @(" propget")
29834 	HRESULT get_Cancel(@("out, retval") BOOL* value);
29835 
29836   /// Sets the `Cancel` property.
29837   @(" propput")
29838 	HRESULT put_Cancel(in BOOL value);
29839 
29840   /// You may set this flag to `TRUE` to respond to the server with or
29841   /// without a certificate. If this flag is `TRUE` with a `SelectedCertificate`
29842   /// it responds to the server with the selected certificate otherwise respond to the
29843   /// server without a certificate. By default the value of `Handled` and `Cancel` are `FALSE`
29844   /// and display default client certificate selection dialog prompt to allow the user to
29845   /// choose a certificate. The `SelectedCertificate` is ignored unless `Handled` is set `TRUE`.
29846   @(" propget")
29847 	HRESULT get_Handled(@("out, retval") BOOL* value);
29848 
29849   /// Sets the `Handled` property.
29850   @(" propput")
29851 	HRESULT put_Handled(in BOOL value);
29852 
29853   /// Returns an `ICoreWebView2Deferral` object. Use this operation to
29854   /// complete the event at a later time.
29855   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
29856 }
29857 
29858 /// This mostly represents a combined win32
29859 /// POINTER_INFO/POINTER_TOUCH_INFO/POINTER_PEN_INFO object. It takes fields
29860 /// from all three and excludes some win32 specific data types like HWND and
29861 /// HANDLE. Note, sourceDevice is taken out but we expect the PointerDeviceRect
29862 /// and DisplayRect to cover the existing use cases of sourceDevice.
29863 /// Another big difference is that any of the point or rect locations are
29864 /// expected to be in WebView physical coordinates. That is, coordinates
29865 /// relative to the WebView and no DPI scaling applied.
29866 //
29867 // The PointerId, PointerFlags, ButtonChangeKind, PenFlags, PenMask, TouchFlags,
29868 // and TouchMask are all #defined flags or enums in the
29869 // POINTER_INFO/POINTER_TOUCH_INFO/POINTER_PEN_INFO structure. We define those
29870 // properties here as UINT32 or INT32 and expect the developer to know how to
29871 // populate those values based on the Windows definitions.
29872 const GUID IID_ICoreWebView2PointerInfo = ICoreWebView2PointerInfo.iid;
29873 
29874 interface ICoreWebView2PointerInfo : IUnknown
29875 {
29876     static const GUID iid = { 0xe6995887,0xd10d,0x4f5d,[ 0x93,0x59,0x4c,0xe4,0x6e,0x4f,0x96,0xb9 ] };
29877   /// Get the PointerKind of the pointer event. This corresponds to the
29878   /// pointerKind property of the POINTER_INFO struct. The values are defined by
29879   /// the POINTER_INPUT_KIND enum in the Windows SDK (winuser.h). Supports
29880   /// PT_PEN and PT_TOUCH.
29881   @(" propget")
29882 	HRESULT get_PointerKind(@("out, retval") DWORD* pointerKind);
29883   /// Set the PointerKind of the pointer event. This corresponds to the
29884   /// pointerKind property of the POINTER_INFO struct. The values are defined by
29885   /// the POINTER_INPUT_KIND enum in the Windows SDK (winuser.h). Supports
29886   /// PT_PEN and PT_TOUCH.
29887   @(" propput")
29888 	HRESULT put_PointerKind(in DWORD pointerKind);
29889 
29890   /// Get the PointerId of the pointer event. This corresponds to the pointerId
29891   /// property of the POINTER_INFO struct as defined in the Windows SDK
29892   /// (winuser.h).
29893   @(" propget")
29894 	HRESULT get_PointerId(@("out, retval") UINT32* pointerId);
29895   /// Set the PointerId of the pointer event. This corresponds to the pointerId
29896   /// property of the POINTER_INFO struct as defined in the Windows SDK
29897   /// (winuser.h).
29898   @(" propput")
29899 	HRESULT put_PointerId(in UINT32 pointerId);
29900 
29901   /// Get the FrameID of the pointer event. This corresponds to the frameId
29902   /// property of the POINTER_INFO struct as defined in the Windows SDK
29903   /// (winuser.h).
29904   @(" propget")
29905 	HRESULT get_FrameId(@("out, retval") UINT32* frameId);
29906   /// Set the FrameID of the pointer event. This corresponds to the frameId
29907   /// property of the POINTER_INFO struct as defined in the Windows SDK
29908   /// (winuser.h).
29909   @(" propput")
29910 	HRESULT put_FrameId(in UINT32 frameId);
29911 
29912   /// Get the PointerFlags of the pointer event. This corresponds to the
29913   /// pointerFlags property of the POINTER_INFO struct. The values are defined
29914   /// by the POINTER_FLAGS constants in the Windows SDK (winuser.h).
29915   @(" propget")
29916 	HRESULT get_PointerFlags(@("out, retval") UINT32* pointerFlags);
29917   /// Set the PointerFlags of the pointer event. This corresponds to the
29918   /// pointerFlags property of the POINTER_INFO struct. The values are defined
29919   /// by the POINTER_FLAGS constants in the Windows SDK (winuser.h).
29920   @(" propput")
29921 	HRESULT put_PointerFlags(in UINT32 pointerFlags);
29922 
29923   /// Get the PointerDeviceRect of the sourceDevice property of the
29924   /// POINTER_INFO struct as defined in the Windows SDK (winuser.h).
29925   @(" propget")
29926 	HRESULT get_PointerDeviceRect(@("out, retval") RECT* pointerDeviceRect);
29927   /// Set the PointerDeviceRect of the sourceDevice property of the
29928   /// POINTER_INFO struct as defined in the Windows SDK (winuser.h).
29929   @(" propput")
29930 	HRESULT put_PointerDeviceRect(in RECT pointerDeviceRect);
29931 
29932   /// Get the DisplayRect of the sourceDevice property of the POINTER_INFO
29933   /// struct as defined in the Windows SDK (winuser.h).
29934   @(" propget")
29935 	HRESULT get_DisplayRect(@("out, retval") RECT* displayRect);
29936   /// Set the DisplayRect of the sourceDevice property of the POINTER_INFO
29937   /// struct as defined in the Windows SDK (winuser.h).
29938   @(" propput")
29939 	HRESULT put_DisplayRect(in RECT displayRect);
29940 
29941   /// Get the PixelLocation of the pointer event. This corresponds to the
29942   /// ptPixelLocation property of the POINTER_INFO struct as defined in the
29943   /// Windows SDK (winuser.h).
29944   @(" propget")
29945 	HRESULT get_PixelLocation(@("out, retval") POINT* pixelLocation);
29946   /// Set the PixelLocation of the pointer event. This corresponds to the
29947   /// ptPixelLocation property of the POINTER_INFO struct as defined in the
29948   /// Windows SDK (winuser.h).
29949   @(" propput")
29950 	HRESULT put_PixelLocation(in POINT pixelLocation);
29951 
29952   /// Get the HimetricLocation of the pointer event. This corresponds to the
29953   /// ptHimetricLocation property of the POINTER_INFO struct as defined in the
29954   /// Windows SDK (winuser.h).
29955   @(" propget")
29956 	HRESULT get_HimetricLocation(@("out, retval") POINT* himetricLocation);
29957   /// Set the HimetricLocation of the pointer event. This corresponds to the
29958   /// ptHimetricLocation property of the POINTER_INFO struct as defined in the
29959   /// Windows SDK (winuser.h).
29960   @(" propput")
29961 	HRESULT put_HimetricLocation(in POINT himetricLocation);
29962 
29963   /// Get the PixelLocationRaw of the pointer event. This corresponds to the
29964   /// ptPixelLocationRaw property of the POINTER_INFO struct as defined in the
29965   /// Windows SDK (winuser.h).
29966   @(" propget")
29967 	HRESULT get_PixelLocationRaw(@("out, retval") POINT* pixelLocationRaw);
29968   /// Set the PixelLocationRaw of the pointer event. This corresponds to the
29969   /// ptPixelLocationRaw property of the POINTER_INFO struct as defined in the
29970   /// Windows SDK (winuser.h).
29971   @(" propput")
29972 	HRESULT put_PixelLocationRaw(in POINT pixelLocationRaw);
29973 
29974   /// Get the HimetricLocationRaw of the pointer event. This corresponds to the
29975   /// ptHimetricLocationRaw property of the POINTER_INFO struct as defined in
29976   /// the Windows SDK (winuser.h).
29977   @(" propget")
29978 	HRESULT get_HimetricLocationRaw(@("out, retval") POINT* himetricLocationRaw);
29979   /// Set the HimetricLocationRaw of the pointer event. This corresponds to the
29980   /// ptHimetricLocationRaw property of the POINTER_INFO struct as defined in
29981   /// the Windows SDK (winuser.h).
29982   @(" propput")
29983 	HRESULT put_HimetricLocationRaw(in POINT himetricLocationRaw);
29984 
29985   /// Get the Time of the pointer event. This corresponds to the dwTime property
29986   /// of the POINTER_INFO struct as defined in the Windows SDK (winuser.h).
29987   @(" propget")
29988 	HRESULT get_Time(@("out, retval") DWORD* time);
29989   /// Set the Time of the pointer event. This corresponds to the dwTime property
29990   /// of the POINTER_INFO struct as defined in the Windows SDK (winuser.h).
29991   @(" propput")
29992 	HRESULT put_Time(in DWORD time);
29993 
29994   /// Get the HistoryCount of the pointer event. This corresponds to the
29995   /// historyCount property of the POINTER_INFO struct as defined in the Windows
29996   /// SDK (winuser.h).
29997   @(" propget")
29998 	HRESULT get_HistoryCount(@("out, retval") UINT32* historyCount);
29999   /// Set the HistoryCount of the pointer event. This corresponds to the
30000   /// historyCount property of the POINTER_INFO struct as defined in the Windows
30001   /// SDK (winuser.h).
30002   @(" propput")
30003 	HRESULT put_HistoryCount(in UINT32 historyCount);
30004 
30005   /// Get the InputData of the pointer event. This corresponds to the InputData
30006   /// property of the POINTER_INFO struct as defined in the Windows SDK
30007   /// (winuser.h).
30008   @(" propget")
30009 	HRESULT get_InputData(@("out, retval") INT32* inputData);
30010   /// Set the InputData of the pointer event. This corresponds to the InputData
30011   /// property of the POINTER_INFO struct as defined in the Windows SDK
30012   /// (winuser.h).
30013   @(" propput")
30014 	HRESULT put_InputData(in INT32 inputData);
30015 
30016   /// Get the KeyStates of the pointer event. This corresponds to the
30017   /// dwKeyStates property of the POINTER_INFO struct as defined in the Windows
30018   /// SDK (winuser.h).
30019   @(" propget")
30020 	HRESULT get_KeyStates(@("out, retval") DWORD* keyStates);
30021   /// Set the KeyStates of the pointer event. This corresponds to the
30022   /// dwKeyStates property of the POINTER_INFO struct as defined in the Windows
30023   /// SDK (winuser.h).
30024   @(" propput")
30025 	HRESULT put_KeyStates(in DWORD keyStates);
30026 
30027   /// Get the PerformanceCount of the pointer event. This corresponds to the
30028   /// PerformanceCount property of the POINTER_INFO struct as defined in the
30029   /// Windows SDK (winuser.h).
30030   @(" propget")
30031 	HRESULT get_PerformanceCount(@("out, retval") UINT64* performanceCount);
30032   /// Set the PerformanceCount of the pointer event. This corresponds to the
30033   /// PerformanceCount property of the POINTER_INFO struct as defined in the
30034   /// Windows SDK (winuser.h).
30035   @(" propput")
30036 	HRESULT put_PerformanceCount(in UINT64 performanceCount);
30037 
30038   /// Get the ButtonChangeKind of the pointer event. This corresponds to the
30039   /// ButtonChangeKind property of the POINTER_INFO struct. The values are
30040   /// defined by the POINTER_BUTTON_CHANGE_KIND enum in the Windows SDK
30041   /// (winuser.h).
30042   @(" propget")
30043 	HRESULT get_ButtonChangeKind(@("out, retval") INT32* buttonChangeKind);
30044   /// Set the ButtonChangeKind of the pointer event. This corresponds to the
30045   /// ButtonChangeKind property of the POINTER_INFO struct. The values are
30046   /// defined by the POINTER_BUTTON_CHANGE_KIND enum in the Windows SDK
30047   /// (winuser.h).
30048   @(" propput")
30049 	HRESULT put_ButtonChangeKind(in INT32 buttonChangeKind);
30050 
30051   // Pen specific attributes
30052 
30053   /// Get the PenFlags of the pointer event. This corresponds to the penFlags
30054   /// property of the POINTER_PEN_INFO struct. The values are defined by the
30055   /// PEN_FLAGS constants in the Windows SDK (winuser.h).
30056   @(" propget")
30057 	HRESULT get_PenFlags(@("out, retval") UINT32* penFLags);
30058   /// Set the PenFlags of the pointer event. This corresponds to the penFlags
30059   /// property of the POINTER_PEN_INFO struct. The values are defined by the
30060   /// PEN_FLAGS constants in the Windows SDK (winuser.h).
30061   @(" propput")
30062 	HRESULT put_PenFlags(in UINT32 penFLags);
30063 
30064   /// Get the PenMask of the pointer event. This corresponds to the penMask
30065   /// property of the POINTER_PEN_INFO struct. The values are defined by the
30066   /// PEN_MASK constants in the Windows SDK (winuser.h).
30067   @(" propget")
30068 	HRESULT get_PenMask(@("out, retval") UINT32* penMask);
30069   /// Set the PenMask of the pointer event. This corresponds to the penMask
30070   /// property of the POINTER_PEN_INFO struct. The values are defined by the
30071   /// PEN_MASK constants in the Windows SDK (winuser.h).
30072   @(" propput")
30073 	HRESULT put_PenMask(in UINT32 penMask);
30074 
30075   /// Get the PenPressure of the pointer event. This corresponds to the pressure
30076   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
30077   /// (winuser.h).
30078   @(" propget")
30079 	HRESULT get_PenPressure(@("out, retval") UINT32* penPressure);
30080   /// Set the PenPressure of the pointer event. This corresponds to the pressure
30081   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
30082   /// (winuser.h).
30083   @(" propput")
30084 	HRESULT put_PenPressure(in UINT32 penPressure);
30085 
30086   /// Get the PenRotation of the pointer event. This corresponds to the rotation
30087   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
30088   /// (winuser.h).
30089   @(" propget")
30090 	HRESULT get_PenRotation(@("out, retval") UINT32* penRotation);
30091   /// Set the PenRotation of the pointer event. This corresponds to the rotation
30092   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
30093   /// (winuser.h).
30094   @(" propput")
30095 	HRESULT put_PenRotation(in UINT32 penRotation);
30096 
30097   /// Get the PenTiltX of the pointer event. This corresponds to the tiltX
30098   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
30099   /// (winuser.h).
30100   @(" propget")
30101 	HRESULT get_PenTiltX(@("out, retval") INT32* penTiltX);
30102   /// Set the PenTiltX of the pointer event. This corresponds to the tiltX
30103   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
30104   /// (winuser.h).
30105   @(" propput")
30106 	HRESULT put_PenTiltX(in INT32 penTiltX);
30107 
30108   /// Get the PenTiltY of the pointer event. This corresponds to the tiltY
30109   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
30110   /// (winuser.h).
30111   @(" propget")
30112 	HRESULT get_PenTiltY(@("out, retval") INT32* penTiltY);
30113   /// Set the PenTiltY of the pointer event. This corresponds to the tiltY
30114   /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK
30115   /// (winuser.h).
30116   @(" propput")
30117 	HRESULT put_PenTiltY(in INT32 penTiltY);
30118 
30119   // Touch specific attributes
30120 
30121   /// Get the TouchFlags of the pointer event. This corresponds to the
30122   /// touchFlags property of the POINTER_TOUCH_INFO struct. The values are
30123   /// defined by the TOUCH_FLAGS constants in the Windows SDK (winuser.h).
30124   @(" propget")
30125 	HRESULT get_TouchFlags(@("out, retval") UINT32* touchFlags);
30126   /// Set the TouchFlags of the pointer event. This corresponds to the
30127   /// touchFlags property of the POINTER_TOUCH_INFO struct. The values are
30128   /// defined by the TOUCH_FLAGS constants in the Windows SDK (winuser.h).
30129   @(" propput")
30130 	HRESULT put_TouchFlags(in UINT32 touchFlags);
30131 
30132   /// Get the TouchMask of the pointer event. This corresponds to the
30133   /// touchMask property of the POINTER_TOUCH_INFO struct. The values are
30134   /// defined by the TOUCH_MASK constants in the Windows SDK (winuser.h).
30135   @(" propget")
30136 	HRESULT get_TouchMask(@("out, retval") UINT32* touchMask);
30137   /// Set the TouchMask of the pointer event. This corresponds to the
30138   /// touchMask property of the POINTER_TOUCH_INFO struct. The values are
30139   /// defined by the TOUCH_MASK constants in the Windows SDK (winuser.h).
30140   @(" propput")
30141 	HRESULT put_TouchMask(in UINT32 touchMask);
30142 
30143   /// Get the TouchContact of the pointer event. This corresponds to the
30144   /// rcContact property of the POINTER_TOUCH_INFO struct as defined in the
30145   /// Windows SDK (winuser.h).
30146   @(" propget")
30147 	HRESULT get_TouchContact(@("out, retval") RECT* touchContact);
30148   /// Set the TouchContact of the pointer event. This corresponds to the
30149   /// rcContact property of the POINTER_TOUCH_INFO struct as defined in the
30150   /// Windows SDK (winuser.h).
30151   @(" propput")
30152 	HRESULT put_TouchContact(in RECT touchContact);
30153 
30154   /// Get the TouchContactRaw of the pointer event. This corresponds to the
30155   /// rcContactRaw property of the POINTER_TOUCH_INFO struct as defined in the
30156   /// Windows SDK (winuser.h).
30157   @(" propget")
30158 	HRESULT get_TouchContactRaw(@("out, retval") RECT* touchContactRaw);
30159   /// Set the TouchContactRaw of the pointer event. This corresponds to the
30160   /// rcContactRaw property of the POINTER_TOUCH_INFO struct as defined in the
30161   /// Windows SDK (winuser.h).
30162   @(" propput")
30163 	HRESULT put_TouchContactRaw(in RECT touchContactRaw);
30164 
30165   /// Get the TouchOrientation of the pointer event. This corresponds to the
30166   /// orientation property of the POINTER_TOUCH_INFO struct as defined in the
30167   /// Windows SDK (winuser.h).
30168   @(" propget")
30169 	HRESULT get_TouchOrientation(@("out, retval") UINT32* touchOrientation);
30170   /// Set the TouchOrientation of the pointer event. This corresponds to the
30171   /// orientation property of the POINTER_TOUCH_INFO struct as defined in the
30172   /// Windows SDK (winuser.h).
30173   @(" propput")
30174 	HRESULT put_TouchOrientation(in UINT32 touchOrientation);
30175 
30176   /// Get the TouchPressure of the pointer event. This corresponds to the
30177   /// pressure property of the POINTER_TOUCH_INFO struct as defined in the
30178   /// Windows SDK (winuser.h).
30179   @(" propget")
30180 	HRESULT get_TouchPressure(@("out, retval") UINT32* touchPressure);
30181   /// Set the TouchPressure of the pointer event. This corresponds to the
30182   /// pressure property of the POINTER_TOUCH_INFO struct as defined in the
30183   /// Windows SDK (winuser.h).
30184   @(" propput")
30185 	HRESULT put_TouchPressure(in UINT32 touchPressure);
30186 }
30187 
30188 /// The caller implements this interface to receive CursorChanged events. Use
30189 /// the Cursor property to get the new cursor.
30190 const GUID IID_ICoreWebView2CursorChangedEventHandler = ICoreWebView2CursorChangedEventHandler.iid;
30191 
30192 interface ICoreWebView2CursorChangedEventHandler : IUnknown
30193 {
30194     static const GUID iid = { 0x9da43ccc,0x26e1,0x4dad,[ 0xb5,0x6c,0xd8,0x96,0x1c,0x94,0xc5,0x71 ] };
30195   /// Called to provide the implementer with the event args for the
30196   /// corresponding event. There are no event args and the args
30197   /// parameter will be null.
30198   HRESULT Invoke(/+[in]+/ ICoreWebView2CompositionController sender, /+[in]+/ IUnknown args);
30199 }
30200 
30201 /// Receives `RasterizationScaleChanged` events.  Use the `RasterizationScale`
30202 /// property to get the modified scale.
30203 
30204 const GUID IID_ICoreWebView2RasterizationScaleChangedEventHandler = ICoreWebView2RasterizationScaleChangedEventHandler.iid;
30205 
30206 interface ICoreWebView2RasterizationScaleChangedEventHandler : IUnknown
30207 {
30208     static const GUID iid = { 0x9c98c8b1,0xac53,0x427e,[ 0xa3,0x45,0x30,0x49,0xb5,0x52,0x4b,0xbe ] };
30209   /// Called to provide the implementer with the event args for the
30210   /// corresponding event. There are no event args and the args
30211   /// parameter will be null.
30212   HRESULT Invoke(
30213     /+[in]+/ ICoreWebView2Controller sender,
30214     /+[in]+/ IUnknown args);
30215 }
30216 
30217 /// Represents the WebView2 Environment.  WebViews created from an environment
30218 /// run on the browser process specified with environment parameters and
30219 /// objects created from an environment should be used in the same
30220 /// environment.  Using it in different environments are not guaranteed to be
30221 ///  compatible and may fail.
30222 
30223 const GUID IID_ICoreWebView2Environment = ICoreWebView2Environment.iid;
30224 
30225 interface ICoreWebView2Environment : IUnknown
30226 {
30227     static const GUID iid = { 0xb96d755e,0x0319,0x4e92,[ 0xa2,0x96,0x23,0x43,0x6f,0x46,0xa1,0xfc ] };
30228 
30229   /// Asynchronously create a new WebView.
30230   ///
30231   /// `parentWindow` is the `HWND` in which the WebView should be displayed and
30232   /// from which receive input.  The WebView adds a child window to the
30233   /// provided window before this function returns.  Z-order and other things
30234   /// impacted by sibling window order are affected accordingly.  If you want to
30235   /// move the WebView to a different parent after it has been created, you must
30236   /// call put_ParentWindow to update tooltip positions, accessibility trees,
30237   /// and such.
30238   ///
30239   /// HWND_MESSAGE is a valid parameter for `parentWindow` for an invisible
30240   /// WebView for Windows 8 and above. In this case the window will never
30241   /// become visible. You are not able to reparent the window after you have
30242   /// created the WebView.  This is not supported in Windows 7 or below.
30243   /// Passing this parameter in Windows 7 or below will return
30244   /// ERROR_INVALID_WINDOW_HANDLE in the controller callback.
30245   ///
30246   /// It is recommended that the app set Application User Model ID for the
30247   /// process or the app window.  If none is set, during WebView creation a
30248   /// generated Application User Model ID is set to root window of
30249   /// `parentWindow`.
30250   ///
30251   /// \snippet AppWindow.cpp CreateCoreWebView2Controller
30252   ///
30253   /// It is recommended that the app handles restart manager messages, to
30254   /// gracefully restart it in the case when the app is using the WebView2
30255   /// Runtime from a certain installation and that installation is being
30256   /// uninstalled.  For example, if a user installs a version of the WebView2
30257   /// Runtime and opts to use another version of the WebView2 Runtime for
30258   /// testing the app, and then uninstalls the 1st version of the WebView2
30259   /// Runtime without closing the app, the app restarts to allow
30260   /// un-installation to succeed.
30261   ///
30262   /// \snippet AppWindow.cpp RestartManager
30263   ///
30264   /// The app should retry `CreateCoreWebView2Controller` upon failure, unless the
30265   /// error code is `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
30266   /// When the app retries `CreateCoreWebView2Controller` upon failure, it is
30267   /// recommended that the app restarts from creating a new WebView2
30268   /// Environment.  If a WebView2 Runtime update happens, the version
30269   /// associated with a WebView2 Environment may have been removed and causing
30270   /// the object to no longer work.  Creating a new WebView2 Environment works
30271   /// since it uses the latest version.
30272   ///
30273   /// WebView creation fails with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if a
30274   /// running instance using the same user data folder exists, and the Environment
30275   /// objects have different `EnvironmentOptions`.  For example, if a WebView was
30276   /// created with one language, an attempt to create a WebView with a different
30277   /// language using the same user data folder will fail.
30278   ///
30279   /// The creation will fail with `E_ABORT` if `parentWindow` is destroyed
30280   /// before the creation is finished.  If this is caused by a call to
30281   /// `DestroyWindow`, the creation completed handler will be invoked before
30282   /// `DestroyWindow` returns, so you can use this to cancel creation and clean
30283   /// up resources synchronously when quitting a thread.
30284   ///
30285   /// In rare cases the creation can fail with `E_UNEXPECTED` if runtime does not have
30286   /// permissions to the user data folder.
30287 
30288   HRESULT CreateCoreWebView2Controller(
30289     HWND parentWindow,
30290     ICoreWebView2CreateCoreWebView2ControllerCompletedHandler handler);
30291 
30292   /// Create a new web resource response object.  The `headers` parameter is
30293   /// the raw response header string delimited by newline.  It is also possible
30294   /// to create this object with null headers string and then use the
30295   /// `ICoreWebView2HttpResponseHeaders` to construct the headers line by line.
30296   /// For more information about other parameters, navigate to
30297   /// [ICoreWebView2WebResourceResponse](/microsoft-edge/webview2/reference/win32/icorewebview2webresourceresponse).
30298   ///
30299   /// \snippet SettingsComponent.cpp WebResourceRequested0
30300   /// \snippet SettingsComponent.cpp WebResourceRequested1
30301   HRESULT CreateWebResourceResponse(
30302     in IStream* content,
30303     in int statusCode,
30304     in LPCWSTR reasonPhrase,
30305     in LPCWSTR headers,
30306     @("out, retval") ICoreWebView2WebResourceResponse * response);
30307 
30308   /// The browser version info of the current `ICoreWebView2Environment`,
30309   /// including channel name if it is not the WebView2 Runtime.  It matches the
30310   /// format of the `GetAvailableCoreWebView2BrowserVersionString` API.
30311   /// Channel names are `beta`, `dev`, and `canary`.
30312   ///
30313   /// The caller must free the returned string with `CoTaskMemFree`.  See
30314   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30315   ///
30316   /// \snippet AppWindow.cpp GetBrowserVersionString
30317   @(" propget")
30318 	HRESULT get_BrowserVersionString(@("out, retval") LPWSTR* versionInfo);
30319 
30320   /// Add an event handler for the `NewBrowserVersionAvailable` event.
30321   /// `NewBrowserVersionAvailable` runs when a newer version of the WebView2
30322   /// Runtime is installed and available using WebView2.  To use the newer
30323   /// version of the browser you must create a new environment and WebView.
30324   /// The event only runs for new version from the same WebView2 Runtime from
30325   /// which the code is running. When not running with installed WebView2
30326   /// Runtime, no event is run.
30327   ///
30328   /// Because a user data folder is only able to be used by one browser
30329   /// process at a time, if you want to use the same user data folder in the
30330   /// WebView using the new version of the browser, you must close the
30331   /// environment and instance of WebView that are using the older version of
30332   /// the browser first.  Or simply prompt the user to restart the app.
30333   ///
30334   /// \snippet AppWindow.cpp NewBrowserVersionAvailable
30335   HRESULT add_NewBrowserVersionAvailable(
30336       /+[in]+/ ICoreWebView2NewBrowserVersionAvailableEventHandler eventHandler,
30337       @("out") EventRegistrationToken* token);
30338 
30339   /// Remove an event handler previously added with `add_NewBrowserVersionAvailable`.
30340   HRESULT remove_NewBrowserVersionAvailable(
30341       in EventRegistrationToken token);
30342 }
30343 
30344 /// A continuation of the ICoreWebView2Environment interface.
30345 const GUID IID_ICoreWebView2Environment2 = ICoreWebView2Environment2.iid;
30346 
30347 interface ICoreWebView2Environment2 : ICoreWebView2Environment
30348 {
30349     static const GUID iid = { 0x41F3632B,0x5EF4,0x404F,[ 0xAD,0x82,0x2D,0x60,0x6C,0x5A,0x9A,0x21 ] };
30350   /// Create a new web resource request object.
30351   /// URI parameter must be absolute URI.
30352   /// The headers string is the raw request header string delimited by CRLF
30353   /// (optional in last header).
30354   /// It's also possible to create this object with null headers string
30355   /// and then use the ICoreWebView2HttpRequestHeaders to construct the headers
30356   /// line by line.
30357   /// For information on other parameters see ICoreWebView2WebResourceRequest.
30358   ///
30359   /// \snippet ScenarioNavigateWithWebResourceRequest.cpp NavigateWithWebResourceRequest
30360   HRESULT CreateWebResourceRequest(in LPCWSTR uri,
30361                                    in LPCWSTR method,
30362                                    in IStream* postData,
30363                                    in LPCWSTR headers,
30364                                    @("out, retval") ICoreWebView2WebResourceRequest * request);
30365 }
30366 
30367 /// A continuation of the ICoreWebView2Environment2 interface.
30368 const GUID IID_ICoreWebView2Environment3 = ICoreWebView2Environment3.iid;
30369 
30370 interface ICoreWebView2Environment3 : ICoreWebView2Environment2
30371 {
30372     static const GUID iid = { 0x80a22ae3,0xbe7c,0x4ce2,[ 0xaf,0xe1,0x5a,0x50,0x05,0x6c,0xde,0xeb ] };
30373   /// Asynchronously create a new WebView for use with visual hosting.
30374   ///
30375   /// parentWindow is the HWND in which the app will connect the visual tree of
30376   /// the WebView. This will be the HWND that the app will receive pointer/
30377   /// mouse input meant for the WebView (and will need to use SendMouseInput/
30378   /// SendPointerInput to forward). If the app moves the WebView visual tree to
30379   /// underneath a different window, then it needs to call put_ParentWindow to
30380   /// update the new parent HWND of the visual tree.
30381   ///
30382   /// HWND_MESSAGE is not a valid parameter for `parentWindow` for visual hosting.
30383   /// The underlying implementation of supporting HWND_MESSAGE would break
30384   /// accessibility for visual hosting. This is supported in windowed
30385   /// WebViews - see CreateCoreWebView2Controller.
30386   ///
30387   /// Use put_RootVisualTarget on the created CoreWebView2CompositionController to
30388   /// provide a visual to host the browser's visual tree.
30389   ///
30390   /// It is recommended that the application set Application User Model ID for
30391   /// the process or the application window. If none is set, during WebView
30392   /// creation a generated Application User Model ID is set to root window of
30393   /// parentWindow.
30394   /// \snippet AppWindow.cpp CreateCoreWebView2Controller
30395   ///
30396   /// It is recommended that the application handles restart manager messages
30397   /// so that it can be restarted gracefully in the case when the app is using
30398   /// Edge for WebView from a certain installation and that installation is
30399   /// being uninstalled. For example, if a user installs Edge from Dev channel
30400   /// and opts to use Edge from that channel for testing the app, and then
30401   /// uninstalls Edge from that channel without closing the app, the app will
30402   /// be restarted to allow uninstallation of the dev channel to succeed.
30403   /// \snippet AppWindow.cpp RestartManager
30404   ///
30405   /// The app should retry `CreateCoreWebView2CompositionController` upon failure,
30406   /// unless the error code is `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
30407   /// When the app retries `CreateCoreWebView2CompositionController`
30408   /// upon failure, it is recommended that the app restarts from creating a new
30409   /// WebView2 Environment.  If a WebView2 Runtime update happens, the version
30410   /// associated with a WebView2 Environment may have been removed and causing
30411   /// the object to no longer work.  Creating a new WebView2 Environment works
30412   /// since it uses the latest version.
30413   ///
30414   /// WebView creation fails with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if a
30415   /// running instance using the same user data folder exists, and the Environment
30416   /// objects have different `EnvironmentOptions`.  For example, if a WebView was
30417   /// created with one language, an attempt to create a WebView with a different
30418   /// language using the same user data folder will fail.
30419   ///
30420   /// The creation will fail with `E_ABORT` if `parentWindow` is destroyed
30421   /// before the creation is finished.  If this is caused by a call to
30422   /// `DestroyWindow`, the creation completed handler will be invoked before
30423   /// `DestroyWindow` returns, so you can use this to cancel creation and clean
30424   /// up resources synchronously when quitting a thread.
30425   ///
30426   /// In rare cases the creation can fail with `E_UNEXPECTED` if runtime does not have
30427   /// permissions to the user data folder.
30428   ///
30429   /// CreateCoreWebView2CompositionController is supported in the following versions of Windows:
30430   ///
30431   /// - Windows 11
30432   /// - Windows 10
30433   /// - Windows Server 2019
30434   /// - Windows Server 2016
30435   ///
30436   HRESULT CreateCoreWebView2CompositionController(
30437       HWND parentWindow,
30438       ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler handler);
30439 
30440   /// Create an empty ICoreWebView2PointerInfo. The returned
30441   /// ICoreWebView2PointerInfo needs to be populated with all of the relevant
30442   /// info before calling SendPointerInput.
30443   HRESULT CreateCoreWebView2PointerInfo(
30444     @("out, retval") ICoreWebView2PointerInfo * pointerInfo);
30445 }
30446 
30447 /// A continuation of the ICoreWebView2Environment3 interface.
30448 const GUID IID_ICoreWebView2Environment4 = ICoreWebView2Environment4.iid;
30449 
30450 interface ICoreWebView2Environment4 : ICoreWebView2Environment3
30451 {
30452     static const GUID iid = { 0x20944379,0x6dcf,0x41d6,[ 0xa0,0xa0,0xab,0xc0,0xfc,0x50,0xde,0x0d ] };
30453   /// Returns the Automation Provider for the WebView that matches the provided
30454   /// window. Host apps are expected to implement
30455   /// IRawElementProviderHwndOverride. When GetOverrideProviderForHwnd is
30456   /// called, the app can pass the HWND to GetAutomationProviderForWindow to
30457   /// find the matching WebView Automation Provider.
30458   HRESULT GetAutomationProviderForWindow(in HWND hwnd,
30459                                          @("out, retval") IUnknown * provider);
30460 }
30461 
30462 /// A continuation of the `ICoreWebView2Environment4` interface that supports
30463 /// the `BrowserProcessExited` event.
30464 const GUID IID_ICoreWebView2Environment5 = ICoreWebView2Environment5.iid;
30465 
30466 interface ICoreWebView2Environment5 : ICoreWebView2Environment4
30467 {
30468     static const GUID iid = { 0x319e423d,0xe0d7,0x4b8d,[ 0x92,0x54,0xae,0x94,0x75,0xde,0x9b,0x17 ] };
30469   /// Add an event handler for the `BrowserProcessExited` event.
30470   /// The `BrowserProcessExited` event is raised when the collection of WebView2
30471   /// Runtime processes for the browser process of this environment terminate
30472   /// due to browser process failure or normal shutdown (for example, when all
30473   /// associated WebViews are closed), after all resources have been released
30474   /// (including the user data folder). To learn about what these processes are,
30475   /// go to [Process model](/microsoft-edge/webview2/concepts/process-model).
30476   ///
30477   /// A handler added with this method is called until removed with
30478   /// `remove_BrowserProcessExited`, even if a new browser process is bound to
30479   /// this environment after earlier `BrowserProcessExited` events are raised.
30480   ///
30481   /// Multiple app processes can share a browser process by creating their webviews
30482   /// from a `ICoreWebView2Environment` with the same user data folder. When the entire
30483   /// collection of WebView2Runtime processes for the browser process exit, all
30484   /// associated `ICoreWebView2Environment` objects receive the `BrowserProcessExited`
30485   /// event. Multiple processes sharing the same browser process need to coordinate
30486   /// their use of the shared user data folder to avoid race conditions and
30487   /// unnecessary waits. For example, one process should not clear the user data
30488   /// folder at the same time that another process recovers from a crash by recreating
30489   /// its WebView controls; one process should not block waiting for the event if
30490   /// other app processes are using the same browser process (the browser process will
30491   /// not exit until those other processes have closed their webviews too).
30492   ///
30493   /// Note this is an event from the `ICoreWebView2Environment3` interface, not
30494   /// the `ICoreWebView2` one. The difference between `BrowserProcessExited` and
30495   /// `ICoreWebView2`'s `ProcessFailed` is that `BrowserProcessExited` is
30496   /// raised for any **browser process** exit (expected or unexpected, after all
30497   /// associated processes have exited too), while `ProcessFailed` is raised for
30498   /// **unexpected** process exits of any kind (browser, render, GPU, and all
30499   /// other types), or for main frame **render process** unresponsiveness. To
30500   /// learn more about the WebView2 Process Model, go to
30501   /// [Process model](/microsoft-edge/webview2/concepts/process-model).
30502   ///
30503   /// In the case the browser process crashes, both `BrowserProcessExited` and
30504   /// `ProcessFailed` events are raised, but the order is not guaranteed. These
30505   /// events are intended for different scenarios. It is up to the app to
30506   /// coordinate the handlers so they do not try to perform reliability recovery
30507   /// while also trying to move to a new WebView2 Runtime version or remove the
30508   /// user data folder.
30509   ///
30510   /// \snippet AppWindow.cpp Close
30511   HRESULT add_BrowserProcessExited(
30512       /+[in]+/ ICoreWebView2BrowserProcessExitedEventHandler eventHandler,
30513       @("out") EventRegistrationToken* token);
30514 
30515   /// Remove an event handler previously added with `add_BrowserProcessExited`.
30516   HRESULT remove_BrowserProcessExited(in EventRegistrationToken token);
30517 }
30518 
30519 /// This interface is an extension of the ICoreWebView2Environment that supports
30520 /// creating print settings for printing to PDF.
30521 const GUID IID_ICoreWebView2Environment6 = ICoreWebView2Environment6.iid;
30522 
30523 interface ICoreWebView2Environment6 : ICoreWebView2Environment5
30524 {
30525     static const GUID iid = { 0xe59ee362,0xacbd,0x4857,[ 0x9a,0x8e,0xd3,0x64,0x4d,0x94,0x59,0xa9 ] };
30526     /// Creates the `ICoreWebView2PrintSettings` used by the `PrintToPdf`
30527     /// method.
30528     HRESULT CreatePrintSettings(
30529         @("out, retval") ICoreWebView2PrintSettings * printSettings);
30530 }
30531 
30532 /// This interface is an extension of the ICoreWebView2Environment. An object
30533 /// implementing the ICoreWebView2Environment7 interface will also
30534 /// implement ICoreWebView2Environment.
30535 const GUID IID_ICoreWebView2Environment7 = ICoreWebView2Environment7.iid;
30536 
30537 interface ICoreWebView2Environment7 : ICoreWebView2Environment6
30538 {
30539     static const GUID iid = { 0x43C22296,0x3BBD,0x43A4,[ 0x9C,0x00,0x5C,0x0D,0xF6,0xDD,0x29,0xA2 ] };
30540   /// Returns the user data folder that all CoreWebView2's created from this
30541   /// environment are using.
30542   /// This could be either the value passed in by the developer when creating
30543   /// the environment object or the calculated one for default handling.  It
30544   /// will always be an absolute path.
30545   ///
30546   /// The caller must free the returned string with `CoTaskMemFree`.  See
30547   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30548   ///
30549   /// \snippet AppWindow.cpp GetUserDataFolder
30550   @(" propget")
30551 	HRESULT get_UserDataFolder(@(" out, retval ") LPWSTR * value);
30552 }
30553 
30554 /// A continuation of the `ICoreWebView2Environment7` interface that supports
30555 /// the `ProcessInfosChanged` event.
30556 const GUID IID_ICoreWebView2Environment8 = ICoreWebView2Environment8.iid;
30557 
30558 interface ICoreWebView2Environment8 : ICoreWebView2Environment7
30559 {
30560     static const GUID iid = { 0xD6EB91DD,0xC3D2,0x45E5,[ 0xBD,0x29,0x6D,0xC2,0xBC,0x4D,0xE9,0xCF ] };
30561   /// Adds an event handler for the `ProcessInfosChanged` event.
30562   ///
30563   /// \snippet ProcessComponent.cpp ProcessInfosChanged
30564   /// \snippet ProcessComponent.cpp ProcessInfosChanged1
30565   HRESULT add_ProcessInfosChanged(
30566       /+[in]+/ ICoreWebView2ProcessInfosChangedEventHandler eventHandler,
30567       @("out") EventRegistrationToken* token);
30568 
30569   /// Remove an event handler previously added with `add_ProcessInfosChanged`.
30570   HRESULT remove_ProcessInfosChanged(
30571       in EventRegistrationToken token);
30572 
30573   /// Returns the `ICoreWebView2ProcessInfoCollection`
30574   /// Provide a list of all process using same user data folder except for crashpad process.
30575   HRESULT GetProcessInfos(@("out, retval")ICoreWebView2ProcessInfoCollection * value);
30576 }
30577 
30578 /// Provides a set of properties for a process in the `ICoreWebView2Environment`.
30579 const GUID IID_ICoreWebView2ProcessInfo = ICoreWebView2ProcessInfo.iid;
30580 
30581 interface ICoreWebView2ProcessInfo : IUnknown
30582 {
30583     static const GUID iid = { 0x84FA7612,0x3F3D,0x4FBF,[ 0x88,0x9D,0xFA,0xD0,0x00,0x49,0x2D,0x72 ] };
30584 
30585   /// The process id of the process.
30586   @(" propget")
30587 	HRESULT get_ProcessId(@("out, retval") INT32* value);
30588 
30589   /// The kind of the process.
30590   @(" propget")
30591 	HRESULT get_Kind(@("out, retval") COREWEBVIEW2_PROCESS_KIND* kind);
30592 }
30593 
30594 /// A continuation of the ICoreWebView2Environment interface for
30595 /// creating CoreWebView2 ContextMenuItem objects.
30596 const GUID IID_ICoreWebView2Environment9 = ICoreWebView2Environment9.iid;
30597 
30598 interface ICoreWebView2Environment9 : ICoreWebView2Environment8
30599 {
30600     static const GUID iid = { 0xf06f41bf,0x4b5a,0x49d8,[ 0xb9,0xf6,0xfa,0x16,0xcd,0x29,0xf2,0x74 ] };
30601   /// Create a custom `ContextMenuItem` object to insert into the WebView context menu.
30602   /// CoreWebView2 will rewind the icon stream before decoding.
30603   /// There is a limit of 1000 active custom context menu items at a given time.
30604   /// Attempting to create more before deleting existing ones will fail with
30605   /// ERROR_NOT_ENOUGH_QUOTA.
30606   /// It is recommended to reuse ContextMenuItems across ContextMenuRequested events
30607   /// for performance.
30608   /// The returned ContextMenuItem object's `IsEnabled` property will default to `TRUE`
30609   /// and `IsChecked` property will default to `FALSE`. A `CommandId` will be assigned
30610   /// to the ContextMenuItem object that's unique across active custom context menu items,
30611   /// but command ID values of deleted ContextMenuItems can be reassigned.
30612   HRESULT CreateContextMenuItem(
30613       in LPCWSTR label,
30614       in IStream* iconStream,
30615       in COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND kind,
30616       @("out, retval") ICoreWebView2ContextMenuItem * item);
30617 }
30618 
30619 /// This interface is used to create `ICoreWebView2ControllerOptions` object, which
30620 /// can be passed as a parameter in `CreateCoreWebView2ControllerWithOptions` and
30621 /// `CreateCoreWebView2CompositionControllerWithOptions` function for multiple profiles support.
30622 /// The profile will be created on disk or opened when calling `CreateCoreWebView2ControllerWithOptions` or
30623 /// `CreateCoreWebView2CompositionControllerWithOptions` no matter InPrivate mode is enabled or not, and
30624 /// it will be released in memory when the corresponding controller is closed but still remain on disk.
30625 /// If you create a WebView2Controller with {ProfileName="name", InPrivate=false} and then later create another
30626 /// one with {ProfileName="name", InPrivate=true}, these two controllers using the same profile would be allowed to
30627 /// run at the same time.
30628 /// As WebView2 is built on top of Edge browser, it follows Edge's behavior pattern. To create an InPrivate WebView,
30629 /// we gets an off-the-record profile (an InPrivate profile) from a regular profile, then create the WebView with the
30630 /// off-the-record profile.
30631 ///
30632 /// \snippet AppWindow.cpp CreateControllerWithOptions
30633 const GUID IID_ICoreWebView2Environment10 = ICoreWebView2Environment10.iid;
30634 
30635 interface ICoreWebView2Environment10 : ICoreWebView2Environment9
30636 {
30637     static const GUID iid = { 0xee0eb9df,0x6f12,0x46ce,[ 0xb5,0x3f,0x3f,0x47,0xb9,0xc9,0x28,0xe0 ] };
30638   /// Create a new ICoreWebView2ControllerOptions to be passed as a parameter of
30639   /// CreateCoreWebView2ControllerWithOptions and CreateCoreWebView2CompositionControllerWithOptions.
30640   /// The 'options' is settable and in it the default value for profile name is the empty string,
30641   /// and the default value for IsInPrivateModeEnabled is false.
30642   /// Also the profile name can be reused.
30643   HRESULT CreateCoreWebView2ControllerOptions(
30644       @("out, retval") ICoreWebView2ControllerOptions * options);
30645 
30646   /// Create a new WebView with options.
30647   HRESULT CreateCoreWebView2ControllerWithOptions(
30648       in HWND parentWindow,
30649       /+[in]+/ ICoreWebView2ControllerOptions options,
30650       /+[in]+/ ICoreWebView2CreateCoreWebView2ControllerCompletedHandler handler);
30651 
30652   /// Create a new WebView in visual hosting mode with options.
30653   HRESULT CreateCoreWebView2CompositionControllerWithOptions(
30654       in HWND parentWindow,
30655       /+[in]+/ ICoreWebView2ControllerOptions options,
30656       /+[in]+/ ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler handler);
30657 }
30658 
30659 /// A list containing process id and corresponding process type.
30660 const GUID IID_ICoreWebView2ProcessInfoCollection = ICoreWebView2ProcessInfoCollection.iid;
30661 
30662 interface ICoreWebView2ProcessInfoCollection : IUnknown
30663 {
30664     static const GUID iid = { 0x402B99CD,0xA0CC,0x4FA5,[ 0xB7,0xA5,0x51,0xD8,0x6A,0x1D,0x23,0x39 ] };
30665   /// The number of process contained in the ICoreWebView2ProcessInfoCollection.
30666   @(" propget")
30667 	HRESULT get_Count(@("out, retval") UINT* count);
30668 
30669   /// Gets the `ICoreWebView2ProcessInfo` located in the `ICoreWebView2ProcessInfoCollection`
30670   /// at the given index.
30671   HRESULT GetValueAtIndex(in UINT32 index,
30672                           @("out, retval") ICoreWebView2ProcessInfo * processInfo);
30673 }
30674 
30675 /// An event handler for the `ProcessInfosChanged` event.
30676 const GUID IID_ICoreWebView2ProcessInfosChangedEventHandler = ICoreWebView2ProcessInfosChangedEventHandler.iid;
30677 
30678 interface ICoreWebView2ProcessInfosChangedEventHandler : IUnknown
30679 {
30680     static const GUID iid = { 0xF4AF0C39,0x44B9,0x40E9,[ 0x8B,0x11,0x04,0x84,0xCF,0xB9,0xE0,0xA1 ] };
30681   /// Provides the event args for the corresponding event.  No event args exist
30682   /// and the `args` parameter is set to `null`.
30683   HRESULT Invoke(/+[in]+/ ICoreWebView2Environment sender, /+[in]+/ IUnknown args);
30684 }
30685 
30686 /// Options used to create WebView2 Environment.  A default implementation is
30687 /// provided in `WebView2EnvironmentOptions.h`.
30688 ///
30689 /// \snippet AppWindow.cpp CreateCoreWebView2EnvironmentWithOptions
30690 
30691 const GUID IID_ICoreWebView2EnvironmentOptions = ICoreWebView2EnvironmentOptions.iid;
30692 
30693 interface ICoreWebView2EnvironmentOptions : IUnknown
30694 {
30695     static const GUID iid = { 0x2fde08a8,0x1e9a,0x4766,[ 0x8c,0x05,0x95,0xa9,0xce,0xb9,0xd1,0xc5 ] };
30696 
30697   /// Changes the behavior of the WebView.  The arguments are passed to the
30698   /// browser process as part of the command.  For more information about
30699   /// using command-line switches with Chromium browser processes, navigate to
30700   /// [Run Chromium with Flags](https://www.chromium.org/developers/how-tos/run-chromium-with-flags).
30701   /// The value appended to a switch is appended to the browser process, for
30702   /// example, in `--edge-webview-switches=xxx` the value is `xxx`.  If you
30703   /// specify a switch that is important to WebView functionality, it is
30704   /// ignored, for example, `--user-data-dir`.  Specific features are disabled
30705   /// internally and blocked from being enabled.  If a switch is specified
30706   /// multiple times, only the last instance is used.
30707   ///
30708   /// \> [!NOTE]\n\> A merge of the different values of the same switch is not attempted,
30709   /// except for disabled and enabled features. The features specified by
30710   /// `--enable-features` and `--disable-features` are merged with simple
30711   /// logic.\n\> *   The features is the union of the specified features
30712   /// and built-in features.  If a feature is disabled, it is removed from the
30713   /// enabled features list.
30714   ///
30715   /// If you specify command-line switches and use the
30716   /// `additionalBrowserArguments` parameter, the `--edge-webview-switches`
30717   /// value takes precedence and is processed last.  If a switch fails to
30718   /// parse, the switch is ignored.  The default state for the operation is
30719   /// to run the browser process with no extra flags.
30720   ///
30721   /// The caller must free the returned string with `CoTaskMemFree`.  See
30722   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30723   @(" propget")
30724 	HRESULT get_AdditionalBrowserArguments(@("out, retval") LPWSTR* value);
30725 
30726   /// Sets the `AdditionalBrowserArguments` property.
30727   ///
30728   /// Please note that calling this API twice will replace the previous value
30729   /// rather than appending to it. If there are multiple switches, there
30730   /// should be a space in between them. The one exception is if multiple
30731   /// features are being enabled/disabled for a single switch, in which
30732   /// case the features should be comma-seperated.
30733   /// Ex. "--disable-features=feature1,feature2 --some-other-switch --do-something"
30734   @(" propput")
30735 	HRESULT put_AdditionalBrowserArguments(in LPCWSTR value);
30736 
30737   /// The default display language for WebView.  It applies to browser UI such as
30738   /// context menu and dialogs.  It also applies to the `accept-languages` HTTP
30739   ///  header that WebView sends to websites. The intended locale value is in the
30740   /// format of BCP 47 Language Tags. More information can be found from
30741   /// [IETF BCP47](https://www.ietf.org/rfc/bcp/bcp47.html).
30742   ///
30743   /// The caller must free the returned string with `CoTaskMemFree`.  See
30744   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30745   @(" propget")
30746 	HRESULT get_Language(@("out, retval") LPWSTR* value);
30747 
30748   /// Sets the `Language` property.
30749   @(" propput")
30750 	HRESULT put_Language(in LPCWSTR value);
30751 
30752   /// Specifies the version of the WebView2 Runtime binaries required to be
30753   /// compatible with your app.  This defaults to the WebView2 Runtime version
30754   /// that corresponds with the version of the SDK the app is using.  The
30755   /// format of this value is the same as the format of the
30756   /// `BrowserVersionString` property and other `BrowserVersion` values.  Only
30757   /// the version part of the `BrowserVersion` value is respected.  The channel
30758   ///  suffix, if it exists, is ignored.  The version of the WebView2 Runtime
30759   /// binaries actually used may be different from the specified
30760   /// `TargetCompatibleBrowserVersion`.  The binaries are only guaranteed to be
30761   /// compatible.  Verify the actual version on the `BrowserVersionString`
30762   /// property on the `ICoreWebView2Environment`.
30763   ///
30764   /// The caller must free the returned string with `CoTaskMemFree`.  See
30765   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
30766   @(" propget")
30767 	HRESULT get_TargetCompatibleBrowserVersion(@("out, retval") LPWSTR* value);
30768 
30769   /// Sets the `TargetCompatibleBrowserVersion` property.
30770   @(" propput")
30771 	HRESULT put_TargetCompatibleBrowserVersion(in LPCWSTR value);
30772 
30773   /// The `AllowSingleSignOnUsingOSPrimaryAccount` property is used to enable
30774   /// single sign on with Azure Active Directory (AAD) and personal Microsoft
30775   /// Account (MSA) resources inside WebView. All AAD accounts, connected to
30776   /// Windows and shared for all apps, are supported. For MSA, SSO is only enabled
30777   /// for the account associated for Windows account login, if any.
30778   /// Default is disabled. Universal Windows Platform apps must also declare
30779   /// `enterpriseCloudSSO`
30780   /// [Restricted capabilities](/windows/uwp/packaging/app-capability-declarations\#restricted-capabilities)
30781   /// for the single sign on (SSO) to work.
30782   @(" propget")
30783 	HRESULT get_AllowSingleSignOnUsingOSPrimaryAccount(@("out, retval") BOOL* allow);
30784 
30785   /// Sets the `AllowSingleSignOnUsingOSPrimaryAccount` property.
30786   @(" propput")
30787 	HRESULT put_AllowSingleSignOnUsingOSPrimaryAccount(in BOOL allow);
30788 }
30789 
30790 /// Additional options used to create WebView2 Environment.  A default implementation is
30791 /// provided in `WebView2EnvironmentOptions.h`.
30792 ///
30793 /// \snippet AppWindow.cpp CreateCoreWebView2EnvironmentWithOptions
30794 
30795 // Note: ICoreWebView2EnvironmentOptions* interfaces derive from IUnknown to make moving
30796 // the API from experimental to public smoothier. These interfaces are mostly internal to
30797 // WebView's own code. Normal apps just use the objects we provided and never interact
30798 // with the interfaces. Advanced apps might implement their own options object. In that
30799 // case, it is also easier for them to implement the interface if it is derived from IUnknown.
30800 const GUID IID_ICoreWebView2EnvironmentOptions2 = ICoreWebView2EnvironmentOptions2.iid;
30801 
30802 interface ICoreWebView2EnvironmentOptions2 : IUnknown
30803 {
30804     static const GUID iid = { 0xFF85C98A,0x1BA7,0x4A6B,[ 0x90,0xC8,0x2B,0x75,0x2C,0x89,0xE9,0xE2 ] };
30805 
30806   /// Whether other processes can create WebView2 from WebView2Environment created with the
30807   /// same user data folder and therefore sharing the same WebView browser process instance.
30808   /// Default is FALSE.
30809   @(" propget")
30810 	HRESULT get_ExclusiveUserDataFolderAccess(@("out, retval") BOOL* value);
30811 
30812   /// Sets the `ExclusiveUserDataFolderAccess` property.
30813   /// The `ExclusiveUserDataFolderAccess` property specifies that the WebView environment
30814   /// obtains exclusive access to the user data folder.
30815   /// If the user data folder is already being used by another WebView environment with a
30816   /// different value for `ExclusiveUserDataFolderAccess` property, the creation of a WebView2Controller
30817   /// using the environment object will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
30818   /// When set as TRUE, no other WebView can be created from other processes using WebView2Environment
30819   /// objects with the same UserDataFolder. This prevents other processes from creating WebViews
30820   /// which share the same browser process instance, since sharing is performed among
30821   /// WebViews that have the same UserDataFolder. When another process tries to create a
30822   /// WebView2Controller from an WebView2Environment object created with the same user data folder,
30823   /// it will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
30824   @(" propput")
30825 	HRESULT put_ExclusiveUserDataFolderAccess(in BOOL value);
30826 }
30827 
30828 /// Additional options used to create WebView2 Environment to manage crash
30829 /// reporting.
30830 const GUID IID_ICoreWebView2EnvironmentOptions3 = ICoreWebView2EnvironmentOptions3.iid;
30831 
30832 interface ICoreWebView2EnvironmentOptions3 : IUnknown
30833 {
30834     static const GUID iid = { 0x4A5C436E,0xA9E3,0x4A2E,[ 0x89,0xC3,0x91,0x0D,0x35,0x13,0xF5,0xCC ] };
30835   /// When `IsCustomCrashReportingEnabled` is set to `TRUE`, Windows won't send crash data to Microsoft endpoint.
30836   /// `IsCustomCrashReportingEnabled` is default to be `FALSE`, in this case, WebView will respect OS consent.
30837   @(" propget")
30838 	HRESULT get_IsCustomCrashReportingEnabled(@("out, retval") BOOL* value);
30839 
30840   /// Sets the `IsCustomCrashReportingEnabled` property.
30841   @(" propput")
30842 	HRESULT put_IsCustomCrashReportingEnabled(in BOOL value);
30843 }
30844 
30845 /// Additional options used to create WebView2 Environment that manages custom scheme registration.
30846 const GUID IID_ICoreWebView2EnvironmentOptions4 = ICoreWebView2EnvironmentOptions4.iid;
30847 
30848 interface ICoreWebView2EnvironmentOptions4 : IUnknown
30849 {
30850     static const GUID iid = { 0xac52d13f,0x0d38,0x475a,[ 0x9d,0xca,0x87,0x65,0x80,0xd6,0x79,0x3e ] };
30851   /// Array of custom scheme registrations. The returned
30852   /// ICoreWebView2CustomSchemeRegistration pointers must be released, and the
30853   /// array itself must be deallocated with CoTaskMemFree.
30854   HRESULT GetCustomSchemeRegistrations(
30855       @("out") UINT32* count,
30856       @("out") ICoreWebView2CustomSchemeRegistration ** schemeRegistrations);
30857   /// Set the array of custom scheme registrations to be used.
30858   /// \snippet AppWindow.cpp CoreWebView2CustomSchemeRegistration
30859   HRESULT SetCustomSchemeRegistrations(
30860       in UINT32 count,
30861       /+[in]+/ ICoreWebView2CustomSchemeRegistration * schemeRegistrations);
30862 }
30863 
30864 /// Additional options used to create WebView2 Environment to manage tracking
30865 /// prevention.
30866 const GUID IID_ICoreWebView2EnvironmentOptions5 = ICoreWebView2EnvironmentOptions5.iid;
30867 
30868 interface ICoreWebView2EnvironmentOptions5 : IUnknown
30869 {
30870     static const GUID iid = { 0x0AE35D64,0xC47F,0x4464,[ 0x81,0x4E,0x25,0x9C,0x34,0x5D,0x15,0x01 ] };
30871   /// The `EnableTrackingPrevention` property is used to enable/disable tracking prevention
30872   /// feature in WebView2. This property enable/disable tracking prevention for all the
30873   /// WebView2's created in the same environment. By default this feature is enabled to block
30874   /// potentially harmful trackers and trackers from sites that aren't visited before and set to
30875   /// `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED` or whatever value was last changed/persisted
30876   /// on the profile.
30877   ///
30878   /// You can set this property to false to disable the tracking prevention feature if the app only
30879   /// renders content in the WebView2 that is known to be safe. Disabling this feature when creating
30880   /// environment also improves runtime performance by skipping related code.
30881   ///
30882   /// You shouldn't disable this property if WebView2 is being used as a "full browser" with arbitrary
30883   /// navigation and should protect end user privacy.
30884   ///
30885   /// There is `ICoreWebView2Profile3::PreferredTrackingPreventionLevel` property to control levels of
30886   /// tracking prevention of the WebView2's associated with a same profile. However, you can also disable
30887   /// tracking prevention later using `ICoreWebView2Profile3::PreferredTrackingPreventionLevel` property and
30888   /// `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE` value but that doesn't improves runtime performance.
30889   ///
30890   /// See `ICoreWebView2Profile3::PreferredTrackingPreventionLevel` for more details.
30891   ///
30892   /// Tracking prevention protects users from online tracking by restricting the ability of trackers to
30893   /// access browser-based storage as well as the network. See [Tracking prevention](/microsoft-edge/web-platform/tracking-prevention).
30894   @(" propget")
30895 	HRESULT get_EnableTrackingPrevention(@("out, retval") BOOL* value);
30896   /// Sets the `EnableTrackingPrevention` property.
30897   @(" propput")
30898 	HRESULT put_EnableTrackingPrevention(in BOOL value);
30899 }
30900 
30901 /// Additional options used to create WebView2 Environment to manage browser extensions.
30902 const GUID IID_ICoreWebView2EnvironmentOptions6 = ICoreWebView2EnvironmentOptions6.iid;
30903 
30904 interface ICoreWebView2EnvironmentOptions6 : IUnknown
30905 {
30906     static const GUID iid = { 0x57D29CC3,0xC84F,0x42A0,[ 0xB0,0xE2,0xEF,0xFB,0xD5,0xE1,0x79,0xDE ] };
30907   /// When `AreBrowserExtensionsEnabled` is set to `TRUE`, new extensions can be added to user
30908   /// profile and used. `AreBrowserExtensionsEnabled` is default to be `FALSE`, in this case,
30909   /// new extensions can't be installed, and already installed extension won't be
30910   /// available to use in user profile.
30911   /// If connecting to an already running environment with a different value for `AreBrowserExtensionsEnabled`
30912   /// property, it will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
30913   /// See `ICoreWebView2BrowserExtension` for Extensions API details.
30914   @(" propget")
30915 	HRESULT get_AreBrowserExtensionsEnabled(@("out, retval") BOOL* value);
30916   /// Sets the `AreBrowserExtensionsEnabled` property.
30917   @(" propput")
30918 	HRESULT put_AreBrowserExtensionsEnabled(in BOOL value);
30919 }
30920 
30921 /// A continuation of the ICoreWebView2Environment interface for
30922 /// getting the crash dump folder path.
30923 const GUID IID_ICoreWebView2Environment11 = ICoreWebView2Environment11.iid;
30924 
30925 interface ICoreWebView2Environment11 : ICoreWebView2Environment10
30926 {
30927     static const GUID iid = { 0xF0913DC6,0xA0EC,0x42EF,[ 0x98,0x05,0x91,0xDF,0xF3,0xA2,0x96,0x6A ] };
30928   /// `FailureReportFolderPath` returns the path of the folder where minidump files are written.
30929   /// Whenever a WebView2 process crashes, a crash dump file will be created in the crash dump folder.
30930   /// The crash dump format is minidump files. Please see
30931   /// [Minidump Files documentation](/windows/win32/debug/minidump-files) for detailed information.
30932   /// Normally when a single child process fails, a minidump will be generated and written to disk,
30933   /// then the `ProcessFailed` event is raised. But for unexpected crashes, a minidump file might not be generated
30934   /// at all, despite whether `ProcessFailed` event is raised. If there are multiple
30935   /// process failures at once, multiple minidump files could be generated. Thus `FailureReportFolderPath`
30936   /// could contain old minidump files that are not associated with a specific `ProcessFailed` event.
30937   /// \snippet AppWindow.cpp GetFailureReportFolder
30938   @(" propget")
30939 	HRESULT get_FailureReportFolderPath(@("out, retval") LPWSTR* value);
30940 }
30941 
30942 /// A continuation of the ICoreWebView2Environment interface for creating shared buffer object.
30943 const GUID IID_ICoreWebView2Environment12 = ICoreWebView2Environment12.iid;
30944 
30945 interface ICoreWebView2Environment12 : ICoreWebView2Environment11
30946 {
30947     static const GUID iid = { 0xF503DB9B,0x739F,0x48DD,[ 0xB1,0x51,0xFD,0xFC,0xF2,0x53,0xF5,0x4E ] };
30948   /// Create a shared memory based buffer with the specified size in bytes.
30949   /// The buffer can be shared with web contents in WebView by calling
30950   /// `PostSharedBufferToScript` on `CoreWebView2` or `CoreWebView2Frame` object.
30951   /// Once shared, the same content of the buffer will be accessible from both
30952   /// the app process and script in WebView. Modification to the content will be visible
30953   /// to all parties that have access to the buffer.
30954   /// The shared buffer is presented to the script as ArrayBuffer. All JavaScript APIs
30955   /// that work for ArrayBuffer including Atomics APIs can be used on it.
30956   /// There is currently a limitation that only size less than 2GB is supported.
30957   HRESULT CreateSharedBuffer(
30958     in UINT64 size,
30959     @("out, retval") ICoreWebView2SharedBuffer * shared_buffer);
30960 }
30961 
30962 /// Receives the `WebView2Environment` created using
30963 /// `CreateCoreWebView2Environment`.
30964 const GUID IID_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler = ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler.iid;
30965 
30966 interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler : IUnknown
30967 {
30968     static const GUID iid = { 0x4e8a3389,0xc9d8,0x4bd2,[ 0xb6,0xb5,0x12,0x4f,0xee,0x6c,0xc1,0x4d ] };
30969 
30970   /// Provides the completion status and result of the corresponding
30971   /// asynchronous method.
30972 
30973   HRESULT Invoke(HRESULT errorCode, ICoreWebView2Environment createdEnvironment);
30974 }
30975 
30976 /// A Receiver is created for a particular DevTools Protocol event and allows
30977 /// you to subscribe and unsubscribe from that event.  Obtained from the
30978 /// WebView object using `GetDevToolsProtocolEventReceiver`.
30979 const GUID IID_ICoreWebView2DevToolsProtocolEventReceiver = ICoreWebView2DevToolsProtocolEventReceiver.iid;
30980 
30981 interface ICoreWebView2DevToolsProtocolEventReceiver : IUnknown
30982 {
30983     static const GUID iid = { 0xb32ca51a,0x8371,0x45e9,[ 0x93,0x17,0xaf,0x02,0x1d,0x08,0x03,0x67 ] };
30984 
30985   /// Subscribe to a `DevToolsProtocol` event.  The `Invoke` method of the
30986   /// `handler` runs whenever the corresponding `DevToolsProtocol` event runs.
30987   /// `Invoke` runs with an event args object containing the parameter object
30988   /// of the DevTools Protocol event as a JSON string.
30989   ///
30990   /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceived
30991 
30992   HRESULT add_DevToolsProtocolEventReceived(
30993       /+[in]+/ ICoreWebView2DevToolsProtocolEventReceivedEventHandler handler,
30994       @("out") EventRegistrationToken* token);
30995 
30996   /// Remove an event handler previously added with
30997   /// `add_DevToolsProtocolEventReceived`.
30998 
30999   HRESULT remove_DevToolsProtocolEventReceived(
31000       in EventRegistrationToken token);
31001 }
31002 
31003 /// A continuation of the ICoreWebView2Environment interface for getting process
31004 /// with associated information.
31005 const GUID IID_ICoreWebView2Environment13 = ICoreWebView2Environment13.iid;
31006 
31007 interface ICoreWebView2Environment13 : ICoreWebView2Environment12
31008 {
31009     static const GUID iid = { 0xaf641f58,0x72b2,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] };
31010   /// Gets a snapshot collection of `ProcessExtendedInfo`s corresponding to all
31011   /// currently running processes associated with this `CoreWebView2Environment`
31012   /// excludes crashpad process.
31013   /// This provides the same list of `ProcessInfo`s as what's provided in
31014   /// `GetProcessInfos`, but additionally provides a list of associated `FrameInfo`s
31015   /// which are actively running (showing or hiding UI elements) in the renderer
31016   /// process. See `AssociatedFrameInfos` for more information.
31017   ///
31018   /// \snippet ProcessComponent.cpp GetProcessExtendedInfos
31019   HRESULT GetProcessExtendedInfos(/+[in]+/ ICoreWebView2GetProcessExtendedInfosCompletedHandler handler);
31020 }
31021 
31022 /// Receives the result of the `GetProcessExtendedInfos` method.
31023 /// The result is written to the collection of `ProcessExtendedInfo`s provided
31024 /// in the `GetProcessExtendedInfos` method call.
31025 const GUID IID_ICoreWebView2GetProcessExtendedInfosCompletedHandler = ICoreWebView2GetProcessExtendedInfosCompletedHandler.iid;
31026 
31027 interface ICoreWebView2GetProcessExtendedInfosCompletedHandler : IUnknown
31028 {
31029     static const GUID iid = { 0xf45e55aa,0x3bc2,0x11ee,[ 0xbe,0x56,0x02,0x42,0xac,0x12,0x00,0x02 ] };
31030   /// Provides the process extended info list for the `GetProcessExtendedInfos`.
31031   HRESULT Invoke(in HRESULT errorCode, /+[in]+/ ICoreWebView2ProcessExtendedInfoCollection value);
31032 }
31033 
31034 /// Provides process with associated extended information in the `ICoreWebView2Environment`.
31035 const GUID IID_ICoreWebView2ProcessExtendedInfo = ICoreWebView2ProcessExtendedInfo.iid;
31036 
31037 interface ICoreWebView2ProcessExtendedInfo : IUnknown
31038 {
31039     static const GUID iid = { 0xaf4c4c2e,0x45db,0x11ee,[ 0xbe,0x56,0x02,0x42,0xac,0x12,0x00,0x02 ] };
31040   /// The process info of the current process.
31041   @(" propget")
31042 	HRESULT get_ProcessInfo(
31043     @("out, retval") ICoreWebView2ProcessInfo * processInfo);
31044 
31045   /// The collection of associated `FrameInfo`s which are actively running
31046   /// (showing or hiding UI elements) in this renderer process. `AssociatedFrameInfos`
31047   /// will only be populated when this `CoreWebView2ProcessExtendedInfo`
31048   /// corresponds to a renderer process. Non-renderer processes will always
31049   /// have an empty `AssociatedFrameInfos`. The `AssociatedFrameInfos` may
31050   /// also be empty for renderer processes that have no active frames.
31051   ///
31052   /// \snippet ProcessComponent.cpp AssociatedFrameInfos
31053   @(" propget")
31054 	HRESULT get_AssociatedFrameInfos(
31055     @("out, retval") ICoreWebView2FrameInfoCollection * frames);
31056 }
31057 
31058 /// A list containing processInfo and associated extended information.
31059 const GUID IID_ICoreWebView2ProcessExtendedInfoCollection = ICoreWebView2ProcessExtendedInfoCollection.iid;
31060 
31061 interface ICoreWebView2ProcessExtendedInfoCollection : IUnknown
31062 {
31063     static const GUID iid = { 0x32efa696,0x407a,0x11ee,[ 0xbe,0x56,0x02,0x42,0xac,0x12,0x00,0x02 ] };
31064   /// The number of process contained in the `ICoreWebView2ProcessExtendedInfoCollection`.
31065   @(" propget")
31066 	HRESULT get_Count(@("out, retval") UINT* count);
31067 
31068   /// Gets the `ICoreWebView2ProcessExtendedInfo` located in the
31069   /// `ICoreWebView2ProcessExtendedInfoCollection` at the given index.
31070   HRESULT GetValueAtIndex(in UINT32 index,
31071                           @("out, retval") ICoreWebView2ProcessExtendedInfo * processInfo);
31072 }
31073 
31074 /// ICoreWebView2Frame provides direct access to the iframes information.
31075 /// You can get an ICoreWebView2Frame by handling the ICoreWebView2_4::add_FrameCreated event.
31076 const GUID IID_ICoreWebView2Frame = ICoreWebView2Frame.iid;
31077 
31078 interface ICoreWebView2Frame : IUnknown
31079 {
31080     static const GUID iid = { 0xf1131a5e,0x9ba9,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] };
31081   /// The name of the iframe from the iframe html tag declaring it.
31082   /// You can access this property even if the iframe is destroyed.
31083   ///
31084   /// The caller must free the returned string with `CoTaskMemFree`.  See
31085   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31086   @(" propget")
31087 	HRESULT get_Name(@(" out, retval ") LPWSTR * name);
31088   /// Raised when the iframe changes its window.name property.
31089   HRESULT add_NameChanged(
31090       /+[in]+/ ICoreWebView2FrameNameChangedEventHandler  eventHandler,
31091       @("out") EventRegistrationToken * token);
31092   /// Remove an event handler previously added with add_NameChanged.
31093   HRESULT remove_NameChanged(in EventRegistrationToken token);
31094 
31095   /// Add the provided host object to script running in the iframe with the
31096   /// specified name for the list of the specified origins. The host object
31097   /// will be accessible for this iframe only if the iframe's origin during
31098   /// access matches one of the origins which are passed. The provided origins
31099   /// will be normalized before comparing to the origin of the document.
31100   /// So the scheme name is made lower case, the host will be punycode decoded
31101   /// as appropriate, default port values will be removed, and so on.
31102   /// This means the origin's host may be punycode encoded or not and will match
31103   /// regardless. If list contains malformed origin the call will fail.
31104   /// The method can be called multiple times in a row without calling
31105   /// RemoveHostObjectFromScript for the same object name. It will replace
31106   /// the previous object with the new object and new list of origins.
31107   /// List of origins will be treated as following:
31108   /// 1. empty list - call will succeed and object will be added for the iframe
31109   /// but it will not be exposed to any origin;
31110   /// 2. list with origins - during access to host object from iframe the
31111   /// origin will be checked that it belongs to this list;
31112   /// 3. list with "*" element - host object will be available for iframe for
31113   /// all origins. We suggest not to use this feature without understanding
31114   /// security implications of giving access to host object from from iframes
31115   /// with unknown origins.
31116   /// 4. list with "file://" element - host object will be available for iframes
31117   /// loaded via file protocol.
31118   /// Calling this method fails if it is called after the iframe is destroyed.
31119   /// \snippet ScenarioAddHostObject.cpp AddHostObjectToScriptWithOrigins
31120   /// For more information about host objects navigate to
31121   /// ICoreWebView2::AddHostObjectToScript.
31122   HRESULT AddHostObjectToScriptWithOrigins(
31123       in LPCWSTR name,
31124       in VARIANT * object,
31125       in UINT32 originsCount,
31126       @(" size_is (originsCount)") in LPCWSTR * origins);
31127   /// Remove the host object specified by the name so that it is no longer
31128   /// accessible from JavaScript code in the iframe. While new access
31129   /// attempts are denied, if the object is already obtained by JavaScript code
31130   /// in the iframe, the JavaScript code continues to have access to that
31131   /// object. Calling this method for a name that is already removed or was
31132   /// never added fails. If the iframe is destroyed this method will return fail
31133   /// also.
31134   HRESULT RemoveHostObjectFromScript(in LPCWSTR name);
31135 
31136   /// The Destroyed event is raised when the iframe corresponding
31137   /// to this CoreWebView2Frame object is removed or the document
31138   /// containing that iframe is destroyed.
31139   HRESULT add_Destroyed(
31140       /+[in]+/ ICoreWebView2FrameDestroyedEventHandler  eventHandler,
31141       @("out") EventRegistrationToken * token);
31142   /// Remove an event handler previously added with add_Destroyed.
31143   HRESULT remove_Destroyed(in EventRegistrationToken token);
31144   /// Check whether a frame is destroyed. Returns true during
31145   /// the Destroyed event.
31146   HRESULT IsDestroyed(@(" out, retval ") BOOL * destroyed);
31147 }
31148 
31149 /// A continuation of the ICoreWebView2Frame interface with navigation events,
31150 /// executing script and posting web messages.
31151 const GUID IID_ICoreWebView2Frame2 = ICoreWebView2Frame2.iid;
31152 
31153 interface ICoreWebView2Frame2 : ICoreWebView2Frame
31154 {
31155     static const GUID iid = { 0x7a6a5834,0xd185,0x4dbf,[ 0xb6,0x3f,0x4a,0x9b,0xc4,0x31,0x07,0xd4 ] };
31156   /// Add an event handler for the `NavigationStarting` event.
31157   /// A frame navigation will raise a `NavigationStarting` event and
31158   /// a `CoreWebView2.FrameNavigationStarting` event. All of the
31159   /// `FrameNavigationStarting` event handlers for the current frame will be
31160   /// run before the `NavigationStarting` event handlers. All of the event handlers
31161   /// share a common `NavigationStartingEventArgs` object. Whichever event handler is
31162   /// last to change the `NavigationStartingEventArgs.Cancel` property will
31163   /// decide if the frame navigation will be cancelled. Redirects raise this
31164   /// event as well, and the navigation id is the same as the original one.
31165   ///
31166   /// Navigations will be blocked until all `NavigationStarting` and
31167   /// `CoreWebView2.FrameNavigationStarting` event handlers return.
31168   HRESULT add_NavigationStarting(
31169       /+[in]+/ ICoreWebView2FrameNavigationStartingEventHandler eventHandler,
31170       @("out") EventRegistrationToken* token);
31171 
31172   /// Remove an event handler previously added with `add_NavigationStarting`.
31173   HRESULT remove_NavigationStarting(
31174       in EventRegistrationToken token);
31175 
31176   /// Add an event handler for the `ContentLoading` event.  `ContentLoading`
31177   /// triggers before any content is loaded, including scripts added with
31178   /// `AddScriptToExecuteOnDocumentCreated`.  `ContentLoading` does not trigger
31179   /// if a same page navigation occurs (such as through `fragment`
31180   /// navigations or `history.pushState` navigations).  This operation
31181   /// follows the `NavigationStarting` and precedes `NavigationCompleted` events.
31182   HRESULT add_ContentLoading(
31183       /+[in]+/ ICoreWebView2FrameContentLoadingEventHandler  eventHandler,
31184       @("out") EventRegistrationToken* token);
31185 
31186   /// Remove an event handler previously added with `add_ContentLoading`.
31187   HRESULT remove_ContentLoading(
31188       in EventRegistrationToken token);
31189 
31190   /// Add an event handler for the `NavigationCompleted` event.
31191   /// `NavigationCompleted` runs when the CoreWebView2Frame has completely
31192   /// loaded (concurrently when `body.onload` runs) or loading stopped with error.
31193   HRESULT add_NavigationCompleted(
31194       /+[in]+/ ICoreWebView2FrameNavigationCompletedEventHandler
31195           eventHandler,
31196       @("out") EventRegistrationToken* token);
31197 
31198   /// Remove an event handler previously added with `add_NavigationCompleted`.
31199   HRESULT remove_NavigationCompleted(
31200       in EventRegistrationToken token);
31201 
31202   /// Add an event handler for the DOMContentLoaded event.
31203   /// DOMContentLoaded is raised when the iframe html document has been parsed.
31204   /// This aligns with the document's DOMContentLoaded event in html.
31205   HRESULT add_DOMContentLoaded(
31206       /+[in]+/ ICoreWebView2FrameDOMContentLoadedEventHandler  eventHandler,
31207       @("out") EventRegistrationToken* token);
31208   /// Remove an event handler previously added with add_DOMContentLoaded.
31209   HRESULT remove_DOMContentLoaded(
31210       in EventRegistrationToken token);
31211 
31212   /// Run JavaScript code from the javascript parameter in the current frame.
31213   /// The result of evaluating the provided JavaScript is passed to the completion handler.
31214   /// The result value is a JSON encoded string. If the result is undefined,
31215   /// contains a reference cycle, or otherwise is not able to be encoded into
31216   /// JSON, then the result is considered to be null, which is encoded
31217   /// in JSON as the string "null".
31218   ///
31219   /// \> [!NOTE]\n\> A function that has no explicit return value returns undefined. If the
31220   /// script that was run throws an unhandled exception, then the result is
31221   /// also "null". This method is applied asynchronously. If the method is
31222   /// run before `ContentLoading`, the script will not be executed
31223   /// and the string "null" will be returned.
31224   /// This operation executes the script even if `ICoreWebView2Settings::IsScriptEnabled` is
31225   /// set to `FALSE`.
31226   ///
31227   /// \snippet ScenarioDOMContentLoaded.cpp ExecuteScriptFrame
31228   HRESULT ExecuteScript(
31229       in LPCWSTR javaScript,
31230       /+[in]+/ ICoreWebView2ExecuteScriptCompletedHandler handler);
31231 
31232   /// Posts the specified webMessage to the frame.
31233   /// The frame receives the message by subscribing to the `message` event of
31234   /// the `window.chrome.webview` of the frame document.
31235   ///
31236   /// ```cpp
31237   /// window.chrome.webview.addEventListener('message', handler)
31238   /// window.chrome.webview.removeEventListener('message', handler)
31239   /// ```
31240   ///
31241   /// The event args is an instances of `MessageEvent`. The
31242   /// `ICoreWebView2Settings::IsWebMessageEnabled` setting must be `TRUE` or
31243   /// the message will not be sent. The `data` property of the event
31244   /// args is the `webMessage` string parameter parsed as a JSON string into a
31245   /// JavaScript object. The `source` property of the event args is a reference
31246   /// to the `window.chrome.webview` object.  For information about sending
31247   /// messages from the HTML document in the WebView to the host, navigate to
31248   /// [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived).
31249   /// The message is delivered asynchronously. If a navigation occurs before the
31250   /// message is posted to the page, the message is discarded.
31251   HRESULT PostWebMessageAsJson(in LPCWSTR webMessageAsJson);
31252 
31253   /// Posts a message that is a simple string rather than a JSON string
31254   /// representation of a JavaScript object. This behaves in exactly the same
31255   /// manner as `PostWebMessageAsJson`, but the `data` property of the event
31256   /// args of the `window.chrome.webview` message is a string with the same
31257   /// value as `webMessageAsString`. Use this instead of
31258   /// `PostWebMessageAsJson` if you want to communicate using simple strings
31259   /// rather than JSON objects.
31260   HRESULT PostWebMessageAsString(in LPCWSTR webMessageAsString);
31261 
31262   /// Add an event handler for the `WebMessageReceived` event.
31263   /// `WebMessageReceived` runs when the
31264   /// `ICoreWebView2Settings::IsWebMessageEnabled` setting is set and the
31265   /// frame document runs `window.chrome.webview.postMessage`.
31266   /// The `postMessage` function is `void postMessage(object)`
31267   /// where object is any object supported by JSON conversion.
31268   ///
31269   /// \snippet assets\ScenarioWebMessage.html chromeWebView
31270   ///
31271   /// When the frame calls `postMessage`, the object parameter is converted to a
31272   /// JSON string and is posted asynchronously to the host process. This will
31273   /// result in the handlers `Invoke` method being called with the JSON string
31274   /// as its parameter.
31275   ///
31276   /// \snippet ScenarioWebMessage.cpp WebMessageReceivedIFrame
31277   HRESULT add_WebMessageReceived(
31278       /+[in]+/ ICoreWebView2FrameWebMessageReceivedEventHandler
31279           handler,
31280       @("out") EventRegistrationToken * token);
31281 
31282   /// Remove an event handler previously added with `add_WebMessageReceived`.
31283   HRESULT remove_WebMessageReceived(in EventRegistrationToken token);
31284 }
31285 
31286 /// Receives `FrameCreated` event.
31287 const GUID IID_ICoreWebView2FrameCreatedEventHandler = ICoreWebView2FrameCreatedEventHandler.iid;
31288 
31289 interface ICoreWebView2FrameCreatedEventHandler : IUnknown
31290 {
31291     static const GUID iid = { 0x38059770,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] };
31292   /// Provides the result for the iframe created event.
31293   HRESULT Invoke(/+[in]+/ ICoreWebView2  sender,
31294                  /+[in]+/ ICoreWebView2FrameCreatedEventArgs  args);
31295 }
31296 
31297 /// Receives `FrameNameChanged` event.
31298 const GUID IID_ICoreWebView2FrameNameChangedEventHandler = ICoreWebView2FrameNameChangedEventHandler.iid;
31299 
31300 interface ICoreWebView2FrameNameChangedEventHandler : IUnknown
31301 {
31302     static const GUID iid = { 0x435c7dc8,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] };
31303   /// Provides the result for the iframe name changed event.
31304   /// No event args exist and the `args` parameter is set to `null`.
31305   HRESULT Invoke(/+[in]+/ ICoreWebView2Frame  sender, /+[in]+/ IUnknown  args);
31306 }
31307 
31308 /// Receives `NavigationStarting` events for iframe.
31309 const GUID IID_ICoreWebView2FrameNavigationStartingEventHandler = ICoreWebView2FrameNavigationStartingEventHandler.iid;
31310 
31311 interface ICoreWebView2FrameNavigationStartingEventHandler : IUnknown
31312 {
31313     static const GUID iid = { 0xe79908bf,0x2d5d,0x4968,[ 0x83,0xdb,0x26,0x3f,0xea,0x2c,0x1d,0xa3 ] };
31314   /// Provides the event args for the corresponding event.
31315   HRESULT Invoke(
31316       /+[in]+/ ICoreWebView2Frame sender,
31317       /+[in]+/ ICoreWebView2NavigationStartingEventArgs args);
31318 }
31319 
31320 /// Receives `ContentLoading` events for iframe.
31321 const GUID IID_ICoreWebView2FrameContentLoadingEventHandler = ICoreWebView2FrameContentLoadingEventHandler.iid;
31322 
31323 interface ICoreWebView2FrameContentLoadingEventHandler : IUnknown
31324 {
31325     static const GUID iid = { 0x0d6156f2,0xd332,0x49a7,[ 0x9e,0x03,0x7d,0x8f,0x2f,0xee,0xee,0x54 ] };
31326   /// Provides the event args for the corresponding event.
31327   HRESULT Invoke(
31328       /+[in]+/ ICoreWebView2Frame sender,
31329       /+[in]+/ ICoreWebView2ContentLoadingEventArgs args);
31330 }
31331 
31332 /// Receives `NavigationCompleted` events for iframe.
31333 const GUID IID_ICoreWebView2FrameNavigationCompletedEventHandler = ICoreWebView2FrameNavigationCompletedEventHandler.iid;
31334 
31335 interface ICoreWebView2FrameNavigationCompletedEventHandler : IUnknown
31336 {
31337     static const GUID iid = { 0x609302ad,0x0e36,0x4f9a,[ 0xa2,0x10,0x6a,0x45,0x27,0x28,0x42,0xa9 ] };
31338   /// Provides the event args for the corresponding event.
31339   HRESULT Invoke(
31340       /+[in]+/ ICoreWebView2Frame sender,
31341       /+[in]+/ ICoreWebView2NavigationCompletedEventArgs args);
31342 }
31343 
31344 /// Receives `DOMContentLoaded` events for iframe.
31345 const GUID IID_ICoreWebView2FrameDOMContentLoadedEventHandler = ICoreWebView2FrameDOMContentLoadedEventHandler.iid;
31346 
31347 interface ICoreWebView2FrameDOMContentLoadedEventHandler : IUnknown
31348 {
31349     static const GUID iid = { 0x38d9520d,0x340f,0x4d1e,[ 0xa7,0x75,0x43,0xfc,0xe9,0x75,0x36,0x83 ] };
31350   /// Provides the event args for the corresponding event.
31351   HRESULT Invoke(
31352       /+[in]+/ ICoreWebView2Frame sender,
31353       /+[in]+/ ICoreWebView2DOMContentLoadedEventArgs args);
31354 }
31355 
31356 /// Receives `WebMessageReceived` events for iframe.
31357 const GUID IID_ICoreWebView2FrameWebMessageReceivedEventHandler = ICoreWebView2FrameWebMessageReceivedEventHandler.iid;
31358 
31359 interface ICoreWebView2FrameWebMessageReceivedEventHandler : IUnknown
31360 {
31361     static const GUID iid = { 0xe371e005,0x6d1d,0x4517,[ 0x93,0x4b,0xa8,0xf1,0x62,0x9c,0x62,0xa5 ] };
31362   /// Provides the event args for the corresponding event.
31363   HRESULT Invoke(
31364       /+[in]+/ ICoreWebView2Frame sender,
31365       /+[in]+/ ICoreWebView2WebMessageReceivedEventArgs args);
31366 }
31367 
31368 /// Event args for the `FrameCreated` events.
31369 const GUID IID_ICoreWebView2FrameCreatedEventArgs = ICoreWebView2FrameCreatedEventArgs.iid;
31370 
31371 interface ICoreWebView2FrameCreatedEventArgs : IUnknown
31372 {
31373     static const GUID iid = { 0x4d6e7b5e,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] };
31374   /// The frame which was created.
31375   @(" propget")
31376 	HRESULT get_Frame(@(" out, retval ") ICoreWebView2Frame *frame);
31377 }
31378 
31379 /// Receives `FrameDestroyed` event.
31380 const GUID IID_ICoreWebView2FrameDestroyedEventHandler = ICoreWebView2FrameDestroyedEventHandler.iid;
31381 
31382 interface ICoreWebView2FrameDestroyedEventHandler : IUnknown
31383 {
31384     static const GUID iid = { 0x59dd7b4c,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] };
31385   /// Provides the result for the iframe destroyed event.
31386   /// No event args exist and the `args` parameter is set to `null`.
31387   HRESULT Invoke(/+[in]+/ ICoreWebView2Frame  sender, /+[in]+/ IUnknown  args);
31388 }
31389 
31390 /// Add an event handler for the `DownloadStarting` event.
31391 const GUID IID_ICoreWebView2DownloadStartingEventHandler = ICoreWebView2DownloadStartingEventHandler.iid;
31392 
31393 interface ICoreWebView2DownloadStartingEventHandler : IUnknown
31394 {
31395     static const GUID iid = { 0xefedc989,0xc396,0x41ca,[ 0x83,0xf7,0x07,0xf8,0x45,0xa5,0x57,0x24 ] };
31396   /// Provides the event args for the corresponding event.
31397   HRESULT Invoke(
31398       /+[in]+/ ICoreWebView2 sender,
31399       /+[in]+/ ICoreWebView2DownloadStartingEventArgs args);
31400 }
31401 
31402 /// Event args for the `DownloadStarting` event.
31403 const GUID IID_ICoreWebView2DownloadStartingEventArgs = ICoreWebView2DownloadStartingEventArgs.iid;
31404 
31405 interface ICoreWebView2DownloadStartingEventArgs : IUnknown
31406 {
31407     static const GUID iid = { 0xe99bbe21,0x43e9,0x4544,[ 0xa7,0x32,0x28,0x27,0x64,0xea,0xfa,0x60 ] };
31408   /// Returns the `ICoreWebView2DownloadOperation` for the download that
31409   /// has started.
31410   @(" propget")
31411 	HRESULT get_DownloadOperation(
31412       @("out, retval") ICoreWebView2DownloadOperation * downloadOperation);
31413 
31414   /// The host may set this flag to cancel the download. If canceled, the
31415   /// download save dialog is not displayed regardless of the
31416   /// `Handled` property.
31417   @(" propget")
31418 	HRESULT get_Cancel(@("out, retval") BOOL* cancel);
31419 
31420   /// Sets the `Cancel` property.
31421   @(" propput")
31422 	HRESULT put_Cancel(in BOOL cancel);
31423 
31424   /// The path to the file. If setting the path, the host should ensure that it
31425   /// is an absolute path, including the file name, and that the path does not
31426   /// point to an existing file. If the path points to an existing file, the
31427   /// file will be overwritten. If the directory does not exist, it is created.
31428   ///
31429   /// The caller must free the returned string with `CoTaskMemFree`.  See
31430   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31431   @(" propget")
31432 	HRESULT get_ResultFilePath(@("out, retval") LPWSTR* resultFilePath);
31433 
31434   /// Sets the `ResultFilePath` property.
31435   @(" propput")
31436 	HRESULT put_ResultFilePath(in LPCWSTR resultFilePath);
31437 
31438   /// The host may set this flag to `TRUE` to hide the default download dialog
31439   /// for this download. The download will progress as normal if it is not
31440   /// canceled, there will just be no default UI shown. By default the value is
31441   /// `FALSE` and the default download dialog is shown.
31442   @(" propget")
31443 	HRESULT get_Handled(@("out, retval") BOOL* handled);
31444 
31445   /// Sets the `Handled` property.
31446   @(" propput")
31447 	HRESULT put_Handled(in BOOL handled);
31448 
31449   /// Returns an `ICoreWebView2Deferral` object.  Use this operation to
31450   /// complete the event at a later time.
31451   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
31452 }
31453 
31454 /// Implements the interface to receive `BytesReceivedChanged` event.  Use the
31455 /// `ICoreWebView2DownloadOperation.BytesReceived` property to get the received
31456 /// bytes count.
31457 const GUID IID_ICoreWebView2BytesReceivedChangedEventHandler = ICoreWebView2BytesReceivedChangedEventHandler.iid;
31458 
31459 interface ICoreWebView2BytesReceivedChangedEventHandler : IUnknown
31460 {
31461     static const GUID iid = { 0x828e8ab6,0xd94c,0x4264,[ 0x9c,0xef,0x52,0x17,0x17,0x0d,0x62,0x51 ] };
31462   /// Provides the event args for the corresponding event. No event args exist
31463   /// and the `args` parameter is set to `null`.
31464   HRESULT Invoke(
31465       /+[in]+/ ICoreWebView2DownloadOperation sender, /+[in]+/ IUnknown args);
31466 }
31467 
31468 /// Implements the interface to receive `EstimatedEndTimeChanged` event. Use the
31469 /// `ICoreWebView2DownloadOperation.EstimatedEndTime` property to get the new
31470 /// estimated end time.
31471 const GUID IID_ICoreWebView2EstimatedEndTimeChangedEventHandler = ICoreWebView2EstimatedEndTimeChangedEventHandler.iid;
31472 
31473 interface ICoreWebView2EstimatedEndTimeChangedEventHandler : IUnknown
31474 {
31475     static const GUID iid = { 0x28f0d425,0x93fe,0x4e63,[ 0x9f,0x8d,0x2a,0xee,0xc6,0xd3,0xba,0x1e ] };
31476   /// Provides the event args for the corresponding event. No event args exist
31477   /// and the `args` parameter is set to `null`.
31478   HRESULT Invoke(
31479       /+[in]+/ ICoreWebView2DownloadOperation sender, /+[in]+/ IUnknown args);
31480 }
31481 
31482 /// Implements the interface to receive `StateChanged` event. Use the
31483 /// `ICoreWebView2DownloadOperation.State` property to get the current state,
31484 /// which can be in progress, interrupted, or completed. Use the
31485 /// `ICoreWebView2DownloadOperation.InterruptReason` property to get the
31486 /// interrupt reason if the download is interrupted.
31487 const GUID IID_ICoreWebView2StateChangedEventHandler = ICoreWebView2StateChangedEventHandler.iid;
31488 
31489 interface ICoreWebView2StateChangedEventHandler : IUnknown
31490 {
31491     static const GUID iid = { 0x81336594,0x7ede,0x4ba9,[ 0xbf,0x71,0xac,0xf0,0xa9,0x5b,0x58,0xdd ] };
31492   /// Provides the event args for the corresponding event. No event args exist
31493   /// and the `args` parameter is set to `null`.
31494   HRESULT Invoke(
31495       /+[in]+/ ICoreWebView2DownloadOperation sender, /+[in]+/ IUnknown args);
31496 }
31497 
31498 /// Represents a download operation. Gives access to the download's metadata
31499 /// and supports a user canceling, pausing, or resuming the download.
31500 const GUID IID_ICoreWebView2DownloadOperation = ICoreWebView2DownloadOperation.iid;
31501 
31502 interface ICoreWebView2DownloadOperation : IUnknown
31503 {
31504     static const GUID iid = { 0x3d6b6cf2,0xafe1,0x44c7,[ 0xa9,0x95,0xc6,0x51,0x17,0x71,0x43,0x36 ] };
31505   /// Add an event handler for the `BytesReceivedChanged` event.
31506   ///
31507   /// \snippet ScenarioCustomDownloadExperience.cpp BytesReceivedChanged
31508   HRESULT add_BytesReceivedChanged(
31509     /+[in]+/ ICoreWebView2BytesReceivedChangedEventHandler eventHandler,
31510     @("out") EventRegistrationToken* token);
31511 
31512   /// Remove an event handler previously added with `add_BytesReceivedChanged`.
31513   HRESULT remove_BytesReceivedChanged(
31514       in EventRegistrationToken token);
31515 
31516   /// Add an event handler for the `EstimatedEndTimeChanged` event.
31517   HRESULT add_EstimatedEndTimeChanged(
31518     /+[in]+/ ICoreWebView2EstimatedEndTimeChangedEventHandler eventHandler,
31519     @("out") EventRegistrationToken* token);
31520 
31521   /// Remove an event handler previously added with `add_EstimatedEndTimeChanged`.
31522   HRESULT remove_EstimatedEndTimeChanged(
31523       in EventRegistrationToken token);
31524 
31525   /// Add an event handler for the `StateChanged` event.
31526   ///
31527   /// \snippet ScenarioCustomDownloadExperience.cpp StateChanged
31528   HRESULT add_StateChanged(
31529     /+[in]+/ ICoreWebView2StateChangedEventHandler eventHandler,
31530     @("out") EventRegistrationToken* token);
31531 
31532   /// Remove an event handler previously added with `add_StateChanged`.
31533   HRESULT remove_StateChanged(
31534       in EventRegistrationToken token);
31535 
31536   /// The URI of the download.
31537   ///
31538   /// The caller must free the returned string with `CoTaskMemFree`.  See
31539   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31540   @(" propget")
31541 	HRESULT get_Uri(@("out, retval") LPWSTR* uri);
31542 
31543   /// The Content-Disposition header value from the download's HTTP response.
31544   ///
31545   /// The caller must free the returned string with `CoTaskMemFree`.  See
31546   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31547   @(" propget")
31548 	HRESULT get_ContentDisposition(@("out, retval") LPWSTR* contentDisposition);
31549 
31550   /// MIME type of the downloaded content.
31551   ///
31552   /// The caller must free the returned string with `CoTaskMemFree`.  See
31553   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31554   @(" propget")
31555 	HRESULT get_MimeType(@("out, retval") LPWSTR* mimeType);
31556 
31557   /// The expected size of the download in total number of bytes based on the
31558   /// HTTP Content-Length header. Returns -1 if the size is unknown.
31559   @(" propget")
31560 	HRESULT get_TotalBytesToReceive(@("out, retval") INT64* totalBytesToReceive);
31561 
31562   /// The number of bytes that have been written to the download file.
31563   @(" propget")
31564 	HRESULT get_BytesReceived(@("out, retval") INT64* bytesReceived);
31565 
31566   /// The estimated end time in [ISO 8601 Date and Time Format](https://www.iso.org/iso-8601-date-and-time-format.html).
31567   ///
31568   /// The caller must free the returned string with `CoTaskMemFree`.  See
31569   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31570   @(" propget")
31571 	HRESULT get_EstimatedEndTime(@("out, retval") LPWSTR* estimatedEndTime);
31572 
31573   /// The absolute path to the download file, including file name. Host can change
31574   /// this from `ICoreWebView2DownloadStartingEventArgs`.
31575   ///
31576   /// The caller must free the returned string with `CoTaskMemFree`.  See
31577   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31578   @(" propget")
31579 	HRESULT get_ResultFilePath(@("out, retval") LPWSTR* resultFilePath);
31580 
31581   /// The state of the download. A download can be in progress, interrupted, or
31582   /// completed. See `COREWEBVIEW2_DOWNLOAD_STATE` for descriptions of states.
31583   @(" propget")
31584 	HRESULT get_State(@("out, retval") COREWEBVIEW2_DOWNLOAD_STATE* downloadState);
31585 
31586   /// The reason why connection with file host was broken.
31587   @(" propget")
31588 	HRESULT get_InterruptReason(
31589       @("out, retval") COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON* interruptReason);
31590 
31591   /// Cancels the download. If canceled, the default download dialog shows
31592   /// that the download was canceled. Host should set the `Cancel` property from
31593   /// `ICoreWebView2SDownloadStartingEventArgs` if the download should be
31594   /// canceled without displaying the default download dialog.
31595   HRESULT Cancel();
31596 
31597   /// Pauses the download. If paused, the default download dialog shows that the
31598   /// download is paused. No effect if download is already paused. Pausing a
31599   /// download changes the state to `COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED`
31600   /// with `InterruptReason` set to `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_PAUSED`.
31601   HRESULT Pause();
31602 
31603   /// Resumes a paused download. May also resume a download that was interrupted
31604   /// for another reason, if `CanResume` returns true. Resuming a download changes
31605   /// the state from `COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED` to
31606   /// `COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS`.
31607   HRESULT Resume();
31608 
31609   /// Returns true if an interrupted download can be resumed. Downloads with
31610   /// the following interrupt reasons may automatically resume without you
31611   /// calling any methods:
31612   /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE`,
31613   /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH`,
31614   /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT`.
31615   /// In these cases download progress may be restarted with `BytesReceived`
31616   /// reset to 0.
31617   @(" propget")
31618 	HRESULT get_CanResume(@("out, retval") BOOL* canResume);
31619 }
31620 
31621 /// A continuation of the `ICoreWebView2ProcessFailedEventArgs` interface.
31622 const GUID IID_ICoreWebView2ProcessFailedEventArgs2 = ICoreWebView2ProcessFailedEventArgs2.iid;
31623 
31624 interface ICoreWebView2ProcessFailedEventArgs2 : ICoreWebView2ProcessFailedEventArgs
31625 {
31626     static const GUID iid = { 0x4dab9422,0x46fa,0x4c3e,[ 0xa5,0xd2,0x41,0xd2,0x07,0x1d,0x36,0x80 ] };
31627 
31628   /// The reason for the process failure. Some of the reasons are only
31629   /// applicable to specific values of
31630   /// `ICoreWebView2ProcessFailedEventArgs::ProcessFailedKind`, and the
31631   /// following `ProcessFailedKind` values always return the indicated reason
31632   /// value:
31633   ///
31634   /// ProcessFailedKind | Reason
31635   /// ---|---
31636   /// COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED | COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED
31637   /// COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE | COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE
31638   ///
31639   /// For other `ProcessFailedKind` values, the reason may be any of the reason
31640   /// values. To learn about what these values mean, see
31641   /// `COREWEBVIEW2_PROCESS_FAILED_REASON`.
31642   @(" propget")
31643 	HRESULT get_Reason(
31644       @("out, retval") COREWEBVIEW2_PROCESS_FAILED_REASON* reason);
31645 
31646   /// The exit code of the failing process, for telemetry purposes. The exit
31647   /// code is always `STILL_ACTIVE` (`259`) when `ProcessFailedKind` is
31648   /// `COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE`.
31649   @(" propget")
31650 	HRESULT get_ExitCode(
31651       @("out, retval") int* exitCode);
31652 
31653   /// Description of the process assigned by the WebView2 Runtime. This is a
31654   /// technical English term appropriate for logging or development purposes,
31655   /// and not localized for the end user. It applies to utility processes (for
31656   /// example, "Audio Service", "Video Capture") and plugin processes (for
31657   /// example, "Flash"). The returned `processDescription` is empty if the
31658   /// WebView2 Runtime did not assign a description to the process.
31659   ///
31660   /// The caller must free the returned string with `CoTaskMemFree`.  See
31661   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31662   @(" propget")
31663 	HRESULT get_ProcessDescription(
31664       @("out, retval") LPWSTR* processDescription);
31665 
31666   /// The collection of `FrameInfo`s for frames in the `ICoreWebView2` that were
31667   /// being rendered by the failed process. The content in these frames is
31668   /// replaced with an error page.
31669   /// This is only available when `ProcessFailedKind` is
31670   /// `COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED`;
31671   /// `frames` is `null` for all other process failure kinds, including the case
31672   /// in which the failed process was the renderer for the main frame and
31673   /// subframes within it, for which the failure kind is
31674   /// `COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED`.
31675   @(" propget")
31676 	HRESULT get_FrameInfosForFailedProcess(
31677       @("out, retval") ICoreWebView2FrameInfoCollection * frames);
31678 }
31679 
31680 /// Collection of `FrameInfo`s (name and source). Used to list the affected
31681 /// frames' info when a frame-only render process failure occurs in the
31682 /// `ICoreWebView2`.
31683 const GUID IID_ICoreWebView2FrameInfoCollection = ICoreWebView2FrameInfoCollection.iid;
31684 
31685 interface ICoreWebView2FrameInfoCollection : IUnknown
31686 {
31687     static const GUID iid = { 0x8f834154,0xd38e,0x4d90,[ 0xaf,0xfb,0x68,0x00,0xa7,0x27,0x28,0x39 ] };
31688 
31689   /// Gets an iterator over the collection of `FrameInfo`s.
31690 
31691   HRESULT GetIterator(
31692       @("out, retval") ICoreWebView2FrameInfoCollectionIterator * iterator);
31693 }
31694 
31695 /// Iterator for a collection of `FrameInfo`s. For more info, see
31696 /// `ICoreWebView2ProcessFailedEventArgs2` and
31697 /// `ICoreWebView2FrameInfoCollection`.
31698 const GUID IID_ICoreWebView2FrameInfoCollectionIterator = ICoreWebView2FrameInfoCollectionIterator.iid;
31699 
31700 interface ICoreWebView2FrameInfoCollectionIterator : IUnknown
31701 {
31702     static const GUID iid = { 0x1bf89e2d,0x1b2b,0x4629,[ 0xb2,0x8f,0x05,0x09,0x9b,0x41,0xbb,0x03 ] };
31703 
31704   /// `TRUE` when the iterator has not run out of `FrameInfo`s.  If the
31705   /// collection over which the iterator is iterating is empty or if the
31706   /// iterator has gone past the end of the collection, then this is `FALSE`.
31707 
31708   @(" propget")
31709 	HRESULT get_HasCurrent(@("out, retval") BOOL* hasCurrent);
31710 
31711   /// Get the current `ICoreWebView2FrameInfo` of the iterator.
31712   /// Returns `HRESULT_FROM_WIN32(ERROR_INVALID_INDEX)` if HasCurrent is
31713   /// `FALSE`.
31714 
31715   HRESULT GetCurrent(@("out, retval") ICoreWebView2FrameInfo * frameInfo);
31716 
31717   /// Move the iterator to the next `FrameInfo` in the collection.
31718 
31719   HRESULT MoveNext(@("out, retval") BOOL* hasNext);
31720 }
31721 
31722 /// Provides a set of properties for a frame in the `ICoreWebView2`.
31723 const GUID IID_ICoreWebView2FrameInfo = ICoreWebView2FrameInfo.iid;
31724 
31725 interface ICoreWebView2FrameInfo : IUnknown
31726 {
31727     static const GUID iid = { 0xda86b8a1,0xbdf3,0x4f11,[ 0x99,0x55,0x52,0x8c,0xef,0xa5,0x97,0x27 ] };
31728 
31729   /// The name attribute of the frame, as in `<iframe name="frame-name" ...>`.
31730   /// The returned string is empty when the frame has no name attribute.
31731   ///
31732   /// The caller must free the returned string with `CoTaskMemFree`.  See
31733   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31734 
31735   @(" propget")
31736 	HRESULT get_Name(@("out, retval") LPWSTR* name);
31737 
31738   /// The URI of the document in the frame.
31739   ///
31740   /// The caller must free the returned string with `CoTaskMemFree`.  See
31741   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31742 
31743   @(" propget")
31744 	HRESULT get_Source(@("out, retval") LPWSTR* source);
31745 }
31746 
31747 /// A continuation of the ICoreWebView2FrameInfo interface that provides
31748 /// `ParentFrameInfo`, `FrameId` and `FrameKind` properties.
31749 const GUID IID_ICoreWebView2FrameInfo2 = ICoreWebView2FrameInfo2.iid;
31750 
31751 interface ICoreWebView2FrameInfo2 : ICoreWebView2FrameInfo
31752 {
31753     static const GUID iid = { 0x56f85cfa,0x72c4,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] };
31754   /// This parent frame's `FrameInfo`. `ParentFrameInfo` will only be
31755   /// populated when obtained via calling
31756   ///`CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos`.
31757   /// `CoreWebView2FrameInfo` objects obtained via `CoreWebView2.ProcessFailed` will
31758   /// always have a `null` `ParentFrameInfo`. This property is also `null` for the
31759   /// main frame in the WebView2 which has no parent frame.
31760   /// Note that this `ParentFrameInfo` could be out of date as it's a snapshot.
31761   @(" propget")
31762 	HRESULT get_ParentFrameInfo(@("out, retval") ICoreWebView2FrameInfo * frameInfo);
31763   /// The unique identifier of the frame associated with the current `FrameInfo`.
31764   /// It's the same kind of ID as with the `FrameId` in `CoreWebView2` and via
31765   /// `CoreWebView2Frame`. `FrameId` will only be populated (non-zero) when obtained
31766   /// calling `CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos`.
31767   /// `CoreWebView2FrameInfo` objects obtained via `CoreWebView2.ProcessFailed` will
31768   /// always have an invalid frame Id 0.
31769   /// Note that this `FrameId` could be out of date as it's a snapshot.
31770   /// If there's WebView2 created or destroyed or `FrameCreated/FrameDestroyed` events
31771   /// after the asynchronous call `CoreWebView2Environment.GetProcessExtendedInfos`
31772   /// starts, you may want to call asynchronous method again to get the updated `FrameInfo`s.
31773   @(" propget")
31774 	HRESULT get_FrameId(@("out, retval") UINT32* id);
31775   /// The frame kind of the frame. `FrameKind` will only be populated when
31776   /// obtained calling `CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos`.
31777   /// `CoreWebView2FrameInfo` objects obtained via `CoreWebView2.ProcessFailed`
31778   /// will always have the default value `COREWEBVIEW2_FRAME_KIND_UNKNOWN`.
31779   /// Note that this `FrameKind` could be out of date as it's a snapshot.
31780   @(" propget")
31781 	HRESULT get_FrameKind(@("out, retval") COREWEBVIEW2_FRAME_KIND* kind);
31782 }
31783 
31784 /// Represents a Basic HTTP authentication response that contains a user name
31785 /// and a password as according to RFC7617 (https://tools.ietf.org/html/rfc7617)
31786 const GUID IID_ICoreWebView2BasicAuthenticationResponse = ICoreWebView2BasicAuthenticationResponse.iid;
31787 
31788 interface ICoreWebView2BasicAuthenticationResponse : IUnknown
31789 {
31790     static const GUID iid = { 0x07023f7d,0x2d77,0x4d67,[ 0x90,0x40,0x6e,0x7d,0x42,0x8c,0x6a,0x40 ] };
31791   /// User name provided for authentication.
31792   ///
31793   /// The caller must free the returned string with `CoTaskMemFree`.  See
31794   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31795   @(" propget")
31796 	HRESULT get_UserName(@("out, retval") LPWSTR* userName);
31797   /// Set user name property
31798   @(" propput")
31799 	HRESULT put_UserName(in LPCWSTR userName);
31800 
31801   /// Password provided for authentication.
31802   ///
31803   /// The caller must free the returned string with `CoTaskMemFree`.  See
31804   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31805   @(" propget")
31806 	HRESULT get_Password(@("out, retval") LPWSTR* password);
31807   /// Set password property
31808   @(" propput")
31809 	HRESULT put_Password(in LPCWSTR password);
31810 }
31811 
31812 /// Event args for the BasicAuthenticationRequested event. Will contain the
31813 /// request that led to the HTTP authorization challenge, the challenge
31814 /// and allows the host to provide authentication response or cancel the request.
31815 const GUID IID_ICoreWebView2BasicAuthenticationRequestedEventArgs = ICoreWebView2BasicAuthenticationRequestedEventArgs.iid;
31816 
31817 interface ICoreWebView2BasicAuthenticationRequestedEventArgs : IUnknown
31818 {
31819     static const GUID iid = { 0xef05516f,0xd897,0x4f9e,[ 0xb6,0x72,0xd8,0xe2,0x30,0x7a,0x3f,0xb0 ] };
31820   /// The URI that led to the authentication challenge. For proxy authentication
31821   /// requests, this will be the URI of the proxy server.
31822   ///
31823   /// The caller must free the returned string with `CoTaskMemFree`.  See
31824   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31825   @(" propget")
31826 	HRESULT get_Uri(@("out, retval") LPWSTR* value);
31827 
31828   /// The authentication challenge string
31829   ///
31830   /// The caller must free the returned string with `CoTaskMemFree`.  See
31831   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
31832   @(" propget")
31833 	HRESULT get_Challenge(@("out, retval") LPWSTR* challenge);
31834 
31835   /// Response to the authentication request with credentials. This object will be populated by the app
31836   /// if the host would like to provide authentication credentials.
31837   @(" propget")
31838 	HRESULT get_Response(@("out, retval") ICoreWebView2BasicAuthenticationResponse * response);
31839 
31840   /// Cancel the authentication request. False by default.
31841   /// If set to true, Response will be ignored.
31842   @(" propget")
31843 	HRESULT get_Cancel(@("out, retval") BOOL* cancel);
31844   /// Set the Cancel property.
31845   @(" propput")
31846 	HRESULT put_Cancel(in BOOL cancel);
31847 
31848   /// Returns an `ICoreWebView2Deferral` object. Use this deferral to
31849   /// defer the decision to show the Basic Authentication dialog.
31850   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
31851 }
31852 
31853 /// Implements the interface to receive `IsDocumentPlayingAudioChanged` events.  Use the
31854 /// IsDocumentPlayingAudio property to get the audio playing state.
31855 const GUID IID_ICoreWebView2IsDocumentPlayingAudioChangedEventHandler = ICoreWebView2IsDocumentPlayingAudioChangedEventHandler.iid;
31856 
31857 interface ICoreWebView2IsDocumentPlayingAudioChangedEventHandler : IUnknown
31858 {
31859     static const GUID iid = { 0x5DEF109A,0x2F4B,0x49FA,[ 0xB7,0xF6,0x11,0xC3,0x9E,0x51,0x33,0x28 ] };
31860   /// Provides the event args for the corresponding event.  No event args exist
31861   /// and the `args` parameter is set to `null`.
31862   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
31863 }
31864 
31865 /// Implements the interface to receive `IsMutedChanged` events.  Use the
31866 /// IsMuted property to get the mute state.
31867 const GUID IID_ICoreWebView2IsMutedChangedEventHandler = ICoreWebView2IsMutedChangedEventHandler.iid;
31868 
31869 interface ICoreWebView2IsMutedChangedEventHandler : IUnknown
31870 {
31871     static const GUID iid = { 0x57D90347,0xCD0E,0x4952,[ 0xA4,0xA2,0x74,0x83,0xA2,0x75,0x6F,0x08 ] };
31872   /// Provides the event args for the corresponding event.  No event args exist
31873   /// and the `args` parameter is set to `null`.
31874   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args);
31875 }
31876 
31877 /// This is an extension of the ICoreWebView2Frame interface that supports PermissionRequested
31878 const GUID IID_ICoreWebView2Frame3 = ICoreWebView2Frame3.iid;
31879 
31880 interface ICoreWebView2Frame3 : ICoreWebView2Frame2
31881 {
31882     static const GUID iid = { 0xb50d82cc,0xcc28,0x481d,[ 0x96,0x14,0xcb,0x04,0x88,0x95,0xe6,0xa0 ] };
31883   /// Add an event handler for the `PermissionRequested` event.
31884   /// `PermissionRequested` is raised when content in an iframe any of its
31885   /// descendant iframes requests permission to privileged resources.
31886   ///
31887   /// This relates to the `PermissionRequested` event on the `CoreWebView2`.
31888   /// Both these events will be raised in the case of an iframe requesting
31889   /// permission. The `CoreWebView2Frame`'s event handlers will be invoked
31890   /// before the event handlers on the `CoreWebView2`. If the `Handled` property
31891   /// of the `PermissionRequestedEventArgs` is set to TRUE within the
31892   /// `CoreWebView2Frame` event handler, then the event will not be
31893   /// raised on the `CoreWebView2`, and it's event handlers will not be invoked.
31894   ///
31895   /// In the case of nested iframes, the 'PermissionRequested' event will
31896   /// be raised from the top level iframe.
31897   ///
31898   /// If a deferral is not taken on the event args, the subsequent scripts are
31899   /// blocked until the event handler returns.  If a deferral is taken, the
31900   /// scripts are blocked until the deferral is completed.
31901   ///
31902   /// \snippet ScenarioIFrameDevicePermission.cpp PermissionRequested0
31903   /// \snippet ScenarioIFrameDevicePermission.cpp PermissionRequested1
31904   HRESULT add_PermissionRequested(
31905       /+[in]+/ ICoreWebView2FramePermissionRequestedEventHandler handler,
31906       @("out") EventRegistrationToken* token);
31907 
31908   /// Remove an event handler previously added with `add_PermissionRequested`
31909   HRESULT remove_PermissionRequested(
31910       in EventRegistrationToken token);
31911 }
31912 
31913 /// This is an extension of the ICoreWebView2Frame interface that supports shared buffer based on file mapping.
31914 const GUID IID_ICoreWebView2Frame4 = ICoreWebView2Frame4.iid;
31915 
31916 interface ICoreWebView2Frame4 : ICoreWebView2Frame3
31917 {
31918     static const GUID iid = { 0x188782DC,0x92AA,0x4732,[ 0xAB,0x3C,0xFC,0xC5,0x9F,0x6F,0x68,0xB9 ] };
31919   /// Share a shared buffer object with script of the iframe in the WebView.
31920   /// The script will receive a `sharedbufferreceived` event from chrome.webview.
31921   /// The event arg for that event will have the following methods and properties:
31922   ///   `getBuffer()`: return an ArrayBuffer object with the backing content from the shared buffer.
31923   ///   `additionalData`: an object as the result of parsing `additionalDataAsJson` as JSON string.
31924   ///           This property will be `undefined` if `additionalDataAsJson` is nullptr or empty string.
31925   ///   `source`: with a value set as `chrome.webview` object.
31926   /// If a string is provided as `additionalDataAsJson` but it is not a valid JSON string,
31927   /// the API will fail with `E_INVALIDARG`.
31928   /// If `access` is COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY, the script will only have read access to the buffer.
31929   /// If the script tries to modify the content in a read only buffer, it will cause an access
31930   /// violation in WebView renderer process and crash the renderer process.
31931   /// If the shared buffer is already closed, the API will fail with `RO_E_CLOSED`.
31932   ///
31933   /// The script code should call `chrome.webview.releaseBuffer` with
31934   /// the shared buffer as the parameter to release underlying resources as soon
31935   /// as it does not need access to the shared buffer any more.
31936   ///
31937   /// The application can post the same shared buffer object to multiple web pages or iframes, or
31938   /// post to the same web page or iframe multiple times. Each `PostSharedBufferToScript` will
31939   /// create a separate ArrayBuffer object with its own view of the memory and is separately
31940   /// released. The underlying shared memory will be released when all the views are released.
31941   ///
31942   /// For example, if we want to send data to script for one time read only consumption.
31943   ///
31944   /// \snippet ScenarioSharedBuffer.cpp OneTimeShareBuffer
31945   ///
31946   /// In the HTML document,
31947   ///
31948   /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_1
31949   ///
31950   /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_2
31951   ///
31952   /// Sharing a buffer to script has security risk. You should only share buffer with trusted site.
31953   /// If a buffer is shared to a untrusted site, possible sensitive information could be leaked.
31954   /// If a buffer is shared as modifiable by the script and the script modifies it in an unexpected way,
31955   /// it could result in corrupted data that might even crash the application.
31956   HRESULT PostSharedBufferToScript(
31957     /+[in]+/ ICoreWebView2SharedBuffer sharedBuffer,
31958     in COREWEBVIEW2_SHARED_BUFFER_ACCESS access,
31959     in LPCWSTR additionalDataAsJson);
31960 }
31961 
31962 /// This is an extension of the ICoreWebView2Frame interface that provides the `FrameId` property.
31963 const GUID IID_ICoreWebView2Frame5 = ICoreWebView2Frame5.iid;
31964 
31965 interface ICoreWebView2Frame5 : ICoreWebView2Frame4
31966 {
31967     static const GUID iid = { 0x99d199c4,0x7305,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] };
31968   /// The unique identifier of the current frame. It's the same kind of ID as
31969   /// with the `FrameId` in `CoreWebView2` and via `CoreWebView2FrameInfo`.
31970   @(" propget")
31971 	HRESULT get_FrameId(@("out, retval") UINT32* id);
31972 }
31973 
31974 /// Receives `PermissionRequested` events for iframes.
31975 const GUID IID_ICoreWebView2FramePermissionRequestedEventHandler = ICoreWebView2FramePermissionRequestedEventHandler.iid;
31976 
31977 interface ICoreWebView2FramePermissionRequestedEventHandler : IUnknown
31978 {
31979     static const GUID iid = { 0x845d0edd,0x8bd8,0x429b,[ 0x99,0x15,0x48,0x21,0x78,0x9f,0x23,0xe9 ] };
31980   /// Provides the event args for the corresponding event.
31981   HRESULT Invoke(
31982       /+[in]+/ ICoreWebView2Frame sender,
31983       /+[in]+/ ICoreWebView2PermissionRequestedEventArgs2 args);
31984 }
31985 
31986 /// This is a continuation of the `ICoreWebView2PermissionRequestedEventArgs` interface.
31987 const GUID IID_ICoreWebView2PermissionRequestedEventArgs2 = ICoreWebView2PermissionRequestedEventArgs2.iid;
31988 
31989 interface ICoreWebView2PermissionRequestedEventArgs2 : ICoreWebView2PermissionRequestedEventArgs
31990 {
31991     static const GUID iid = { 0x74d7127f,0x9de6,0x4200,[ 0x87,0x34,0x42,0xd6,0xfb,0x4f,0xf7,0x41 ] };
31992   /// By default, both the `PermissionRequested` event handlers on the
31993   /// `CoreWebView2Frame` and the `CoreWebView2` will be invoked, with the
31994   /// `CoreWebView2Frame` event handlers invoked first. The host may
31995   /// set this flag to `TRUE` within the `CoreWebView2Frame` event handlers
31996   /// to prevent the remaining `CoreWebView2` event handlers from being invoked.
31997   ///
31998   /// If a deferral is taken on the event args, then you must synchronously
31999   /// set `Handled` to TRUE prior to taking your deferral to prevent the
32000   /// `CoreWebView2`s event handlers from being invoked.
32001   @(" propget")
32002 	HRESULT get_Handled(@("out, retval") BOOL* handled);
32003 
32004   /// Sets the `Handled` property.
32005   @(" propput")
32006 	HRESULT put_Handled(in BOOL handled);
32007 }
32008 
32009 /// Represents a context menu item of a context menu displayed by WebView.
32010 const GUID IID_ICoreWebView2ContextMenuItem = ICoreWebView2ContextMenuItem.iid;
32011 
32012 interface ICoreWebView2ContextMenuItem : IUnknown
32013 {
32014     static const GUID iid = { 0x7aed49e3,0xa93f,0x497a,[ 0x81,0x1c,0x74,0x9c,0x6b,0x6b,0x6c,0x65 ] };
32015   /// Gets the unlocalized name for the `ContextMenuItem`. Use this to
32016   /// distinguish between context menu item types. This will be the English
32017   /// label of the menu item in lower camel case. For example, the "Save as"
32018   /// menu item will be "saveAs". Extension menu items will be "extension",
32019   /// custom menu items will be "custom" and spellcheck items will be
32020   /// "spellCheck".
32021   /// Some example context menu item names are:
32022   /// - "saveAs"
32023   /// - "copyImage"
32024   /// - "openLinkInNewWindow"
32025   /// - "cut"
32026   /// - "copy"
32027   /// - "paste"
32028   ///
32029   /// The caller must free the returned string with `CoTaskMemFree`.  See
32030   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32031   @(" propget")
32032 	HRESULT get_Name(@("out, retval") LPWSTR* value);
32033 
32034   /// Gets the localized label for the `ContextMenuItem`. Will contain an
32035   /// ampersand for characters to be used as keyboard accelerator.
32036   ///
32037   /// The caller must free the returned string with `CoTaskMemFree`.  See
32038   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32039   @(" propget")
32040 	HRESULT get_Label(@("out, retval") LPWSTR* value);
32041 
32042   /// Gets the Command ID for the `ContextMenuItem`. Use this to report the
32043   /// `SelectedCommandId` in `ContextMenuRequested` event.
32044   @(" propget")
32045 	HRESULT get_CommandId(@("out, retval") INT32* value);
32046 
32047   /// Gets the localized keyboard shortcut for this ContextMenuItem. It will be
32048   /// the empty string if there is no keyboard shortcut. This is text intended
32049   /// to be displayed to the end user to show the keyboard shortcut. For example
32050   /// this property is Ctrl+Shift+I for the "Inspect" `ContextMenuItem`.
32051   ///
32052   /// The caller must free the returned string with `CoTaskMemFree`.  See
32053   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32054   @(" propget")
32055 	HRESULT get_ShortcutKeyDescription(@("out, retval") LPWSTR* value);
32056 
32057   /// Gets the Icon for the `ContextMenuItem` in PNG, Bitmap or SVG formats in the form of an IStream.
32058   /// Stream will be rewound to the start of the image data.
32059   @(" propget")
32060 	HRESULT get_Icon(@("out, retval") IStream** value);
32061 
32062   /// Gets the `ContextMenuItem` kind.
32063   @(" propget")
32064 	HRESULT get_Kind(@("out, retval") COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND* value);
32065 
32066   /// Sets the enabled property of the `ContextMenuItem`. Must only be used in the case of a
32067   /// custom context menu item. The default value for this is `TRUE`.
32068   @(" propput")
32069 	HRESULT put_IsEnabled(in BOOL value);
32070 
32071   /// Gets the enabled property of the `ContextMenuItem`.
32072   @(" propget")
32073 	HRESULT get_IsEnabled(@("out, retval") BOOL* value);
32074 
32075   /// Sets the checked property of the `ContextMenuItem`. Must only be used for custom context
32076   /// menu items that are of kind Check box or Radio.
32077   @(" propput")
32078 	HRESULT put_IsChecked(in BOOL value);
32079 
32080   /// Gets the checked property of the `ContextMenuItem`, used if the kind is Check box or Radio.
32081   @(" propget")
32082 	HRESULT get_IsChecked(@("out, retval") BOOL* value);
32083 
32084   /// Gets the list of children menu items through a `ContextMenuItemCollection`
32085   /// if the kind is Submenu. If the kind is not submenu, will return null.
32086   @(" propget")
32087 	HRESULT get_Children(@("out, retval") ICoreWebView2ContextMenuItemCollection * value);
32088 
32089   /// Add an event handler for the `CustomItemSelected` event.
32090   /// `CustomItemSelected` event is raised when the user selects this `ContextMenuItem`.
32091   /// Will only be raised for end developer created context menu items
32092   HRESULT add_CustomItemSelected(
32093       /+[in]+/ ICoreWebView2CustomItemSelectedEventHandler eventHandler,
32094       @("out") EventRegistrationToken* token);
32095 
32096   /// Remove an event handler previously added with `add_CustomItemSelected`.
32097   HRESULT remove_CustomItemSelected(
32098       in EventRegistrationToken token);
32099 }
32100 
32101 /// Represents a collection of `ContextMenuItem` objects. Used to get, remove and add
32102 /// `ContextMenuItem` objects at the specified index.
32103 const GUID IID_ICoreWebView2ContextMenuItemCollection = ICoreWebView2ContextMenuItemCollection.iid;
32104 
32105 interface ICoreWebView2ContextMenuItemCollection : IUnknown
32106 {
32107     static const GUID iid = { 0xf562a2f5,0xc415,0x45cf,[ 0xb9,0x09,0xd4,0xb7,0xc1,0xe2,0x76,0xd3 ] };
32108   /// Gets the number of `ContextMenuItem` objects contained in the `ContextMenuItemCollection`.
32109   @(" propget")
32110 	HRESULT get_Count(@("out, retval") UINT32* value);
32111 
32112   /// Gets the `ContextMenuItem` at the specified index.
32113   HRESULT GetValueAtIndex(in UINT32 index,
32114       @("out, retval") ICoreWebView2ContextMenuItem * value);
32115 
32116   /// Removes the `ContextMenuItem` at the specified index.
32117   HRESULT RemoveValueAtIndex(in UINT32 index);
32118 
32119   /// Inserts the `ContextMenuItem` at the specified index.
32120   HRESULT InsertValueAtIndex(
32121       in UINT32 index,
32122         /+[in]+/ ICoreWebView2ContextMenuItem value);
32123 }
32124 
32125 /// Receives `ContextMenuRequested` events.
32126 const GUID IID_ICoreWebView2ContextMenuRequestedEventHandler = ICoreWebView2ContextMenuRequestedEventHandler.iid;
32127 
32128 interface ICoreWebView2ContextMenuRequestedEventHandler : IUnknown
32129 {
32130     static const GUID iid = { 0x04d3fe1d,0xab87,0x42fb,[ 0xa8,0x98,0xda,0x24,0x1d,0x35,0xb6,0x3c ] };
32131   /// Called to provide the event args when a context menu is requested on a
32132   /// WebView element.
32133   HRESULT Invoke(
32134       /+[in]+/ ICoreWebView2 sender,
32135       /+[in]+/ ICoreWebView2ContextMenuRequestedEventArgs args);
32136 }
32137 
32138 /// Raised to notify the host that the end user selected a custom
32139 /// `ContextMenuItem`. `CustomItemSelected` event is raised on the specific
32140 /// `ContextMenuItem` that the end user selected.
32141 const GUID IID_ICoreWebView2CustomItemSelectedEventHandler = ICoreWebView2CustomItemSelectedEventHandler.iid;
32142 
32143 interface ICoreWebView2CustomItemSelectedEventHandler : IUnknown
32144 {
32145     static const GUID iid = { 0x49e1d0bc,0xfe9e,0x4481,[ 0xb7,0xc2,0x32,0x32,0x4a,0xa2,0x19,0x98 ] };
32146   /// Provides the event args for the corresponding event. No event args exist
32147   /// and the `args` parameter is set to `null`.
32148   HRESULT Invoke(
32149       /+[in]+/ ICoreWebView2ContextMenuItem sender, /+[in]+/ IUnknown args);
32150 }
32151 
32152 /// Represents the information regarding the context menu target.
32153 /// Includes the context selected and the appropriate data used for the actions of a context menu.
32154 const GUID IID_ICoreWebView2ContextMenuTarget = ICoreWebView2ContextMenuTarget.iid;
32155 
32156 interface ICoreWebView2ContextMenuTarget : IUnknown
32157 {
32158     static const GUID iid = { 0xb8611d99,0xeed6,0x4f3f,[ 0x90,0x2c,0xa1,0x98,0x50,0x2a,0xd4,0x72 ] };
32159   /// Gets the kind of context that the user selected.
32160   @(" propget")
32161 	HRESULT get_Kind(@("out, retval") COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND* value);
32162 
32163   /// Returns TRUE if the context menu is requested on an editable component.
32164   @(" propget")
32165 	HRESULT get_IsEditable(@("out, retval") BOOL* value);
32166 
32167   /// Returns TRUE if the context menu was requested on the main frame and
32168   /// FALSE if invoked on another frame.
32169   @(" propget")
32170 	HRESULT get_IsRequestedForMainFrame(@("out, retval") BOOL* value);
32171 
32172   /// Gets the uri of the page.
32173   ///
32174   /// The caller must free the returned string with `CoTaskMemFree`.  See
32175   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32176   @(" propget")
32177 	HRESULT get_PageUri(@("out, retval") LPWSTR* value);
32178 
32179   /// Gets the uri of the frame. Will match the PageUri if `IsRequestedForMainFrame` is TRUE.
32180   ///
32181   /// The caller must free the returned string with `CoTaskMemFree`.  See
32182   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32183   @(" propget")
32184 	HRESULT get_FrameUri(@("out, retval") LPWSTR* value);
32185 
32186   /// Returns TRUE if the context menu is requested on HTML containing an anchor tag.
32187   @(" propget")
32188 	HRESULT get_HasLinkUri(@("out, retval") BOOL* value);
32189 
32190   /// Gets the uri of the link (if `HasLinkUri` is TRUE, null otherwise).
32191   ///
32192   /// The caller must free the returned string with `CoTaskMemFree`.  See
32193   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32194   @(" propget")
32195 	HRESULT get_LinkUri(@("out, retval") LPWSTR* value);
32196 
32197   /// Returns TRUE if the context menu is requested on text element that contains an anchor tag.
32198   @(" propget")
32199 	HRESULT get_HasLinkText(@("out, retval") BOOL* value);
32200 
32201   /// Gets the text of the link (if `HasLinkText` is TRUE, null otherwise).
32202   ///
32203   /// The caller must free the returned string with `CoTaskMemFree`.  See
32204   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32205   @(" propget")
32206 	HRESULT get_LinkText(@("out, retval") LPWSTR * value);
32207 
32208   /// Returns TRUE if the context menu is requested on HTML containing a source uri.
32209   @(" propget")
32210 	HRESULT get_HasSourceUri(@("out, retval") BOOL* value);
32211 
32212   /// Gets the active source uri of element (if `HasSourceUri` is TRUE, null otherwise).
32213   ///
32214   /// The caller must free the returned string with `CoTaskMemFree`.  See
32215   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32216   @(" propget")
32217 	HRESULT get_SourceUri(@("out, retval") LPWSTR* value);
32218 
32219   /// Returns TRUE if the context menu is requested on a selection.
32220   @(" propget")
32221 	HRESULT get_HasSelection(@("out, retval") BOOL* value);
32222 
32223   /// Gets the selected text (if `HasSelection` is TRUE, null otherwise).
32224   ///
32225   /// The caller must free the returned string with `CoTaskMemFree`.  See
32226   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32227   @(" propget")
32228 	HRESULT get_SelectionText(@("out, retval") LPWSTR* value);
32229 }
32230 
32231 /// Event args for the `ContextMenuRequested` event. Will contain the selection information
32232 /// and a collection of all of the default context menu items that the WebView
32233 /// would show. Allows the app to draw its own context menu or add/remove
32234 /// from the default context menu.
32235 const GUID IID_ICoreWebView2ContextMenuRequestedEventArgs = ICoreWebView2ContextMenuRequestedEventArgs.iid;
32236 
32237 interface ICoreWebView2ContextMenuRequestedEventArgs : IUnknown
32238 {
32239     static const GUID iid = { 0xa1d309ee,0xc03f,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] };
32240   /// Gets the collection of `ContextMenuItem` objects.
32241   /// See `ICoreWebView2ContextMenuItemCollection` for more details.
32242   @(" propget")
32243 	HRESULT get_MenuItems(@("out, retval") ICoreWebView2ContextMenuItemCollection * value);
32244 
32245   /// Gets the target information associated with the requested context menu.
32246   /// See `ICoreWebView2ContextMenuTarget` for more details.
32247   @(" propget")
32248 	HRESULT get_ContextMenuTarget(@("out, retval") ICoreWebView2ContextMenuTarget * value);
32249 
32250   /// Gets the coordinates where the context menu request occurred in relation to the upper
32251   /// left corner of the WebView bounds.
32252   @(" propget")
32253 	HRESULT get_Location(@("out, retval") POINT* value);
32254 
32255   /// Sets the selected context menu item's command ID. When this is set,
32256   /// WebView will execute the selected command. This
32257   /// value should always be obtained via the selected `ContextMenuItem`'s `CommandId` property.
32258   /// The default value is -1 which means that no selection occurred. The app can
32259   /// also report the selected command ID for a custom context menu item, which
32260   /// will cause the `CustomItemSelected` event to be fired for the custom item, however
32261   /// while command IDs for each custom context menu item is unique
32262   /// during a ContextMenuRequested event, CoreWebView2 may reassign command ID
32263   /// values of deleted custom ContextMenuItems to new objects and the command
32264   /// ID assigned to the same custom item can be different between each app runtime.
32265   @(" propput")
32266 	HRESULT put_SelectedCommandId(in INT32 value);
32267 
32268   /// Gets the selected CommandId.
32269   @(" propget")
32270 	HRESULT get_SelectedCommandId(@("out, retval") INT32* value);
32271 
32272   /// Sets whether the `ContextMenuRequested` event is handled by host after
32273   /// the event handler completes or if there is a deferral then after the deferral is completed.
32274   /// If `Handled` is set to TRUE then WebView will not display a context menu and will instead
32275   /// use the `SelectedCommandId` property to indicate which, if any, context menu item command to invoke.
32276   /// If after the event handler or deferral completes `Handled` is set to FALSE then WebView
32277   /// will display a context menu based on the contents of the `MenuItems` property.
32278   /// The default value is FALSE.
32279   @(" propput")
32280 	HRESULT put_Handled(in BOOL value);
32281 
32282   /// Gets whether the `ContextMenuRequested` event is handled by host.
32283   @(" propget")
32284 	HRESULT get_Handled(@("out, retval") BOOL* value);
32285 
32286   /// Returns an `ICoreWebView2Deferral` object. Use this operation to
32287   /// complete the event when the custom context menu is closed.
32288   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
32289 }
32290 
32291 /// This interface is used to manage profile options that created by 'CreateCoreWebView2ControllerOptions'.
32292 ///
32293 /// \snippet AppWindow.cpp CreateControllerWithOptions
32294 const GUID IID_ICoreWebView2ControllerOptions = ICoreWebView2ControllerOptions.iid;
32295 
32296 interface ICoreWebView2ControllerOptions : IUnknown
32297 {
32298     static const GUID iid = { 0x12aae616,0x8ccb,0x44ec,[ 0xbc,0xb3,0xeb,0x18,0x31,0x88,0x16,0x35 ] };
32299   /// `ProfileName` property is to specify a profile name, which is only allowed to contain
32300   /// the following ASCII characters. It has a maximum length of 64 characters excluding the null-terminator.
32301   /// It is ASCII case insensitive.
32302   ///
32303   /// * alphabet characters: a-z and A-Z
32304   /// * digit characters: 0-9
32305   /// * and '#', '@', '$', '(', ')', '+', '-', '_', '~', '.', ' ' (space).
32306   ///
32307   /// Note: the text must not end with a period '.' or ' ' (space). And, although upper-case letters are
32308   /// allowed, they're treated just as lower-case counterparts because the profile name will be mapped to
32309   /// the real profile directory path on disk and Windows file system handles path names in a case-insensitive way.
32310   ///
32311   /// The caller must free the returned string with `CoTaskMemFree`.  See
32312   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32313   @(" propget")
32314 	HRESULT get_ProfileName(@("out, retval") LPWSTR* value);
32315   /// Sets the `ProfileName` property.
32316   @(" propput")
32317 	HRESULT put_ProfileName(in LPCWSTR value);
32318 
32319   /// `IsInPrivateModeEnabled` property is to enable/disable InPrivate mode.
32320   @(" propget")
32321 	HRESULT get_IsInPrivateModeEnabled(@("out, retval") BOOL* value);
32322   /// Sets the `IsInPrivateModeEnabled` property.
32323   @(" propput")
32324 	HRESULT put_IsInPrivateModeEnabled(in BOOL value);
32325 }
32326 
32327 /// Provides a set of properties to configure a Profile object.
32328 ///
32329 /// \snippet AppWindow.cpp OnCreateCoreWebView2ControllerCompleted
32330 const GUID IID_ICoreWebView2Profile = ICoreWebView2Profile.iid;
32331 
32332 interface ICoreWebView2Profile : IUnknown
32333 {
32334     static const GUID iid = { 0x79110ad3,0xcd5d,0x4373,[ 0x8b,0xc3,0xc6,0x06,0x58,0xf1,0x7a,0x5f ] };
32335   /// Name of the profile.
32336   ///
32337   /// The caller must free the returned string with `CoTaskMemFree`.  See
32338   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32339   @(" propget")
32340 	HRESULT get_ProfileName(@("out, retval") LPWSTR* value);
32341 
32342   /// InPrivate mode is enabled or not.
32343   @(" propget")
32344 	HRESULT get_IsInPrivateModeEnabled(@("out, retval") BOOL* value);
32345 
32346   /// Full path of the profile directory.
32347   ///
32348   /// The caller must free the returned string with `CoTaskMemFree`.  See
32349   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32350   @(" propget")
32351 	HRESULT get_ProfilePath(@("out, retval") LPWSTR* value);
32352 
32353   /// Gets the `DefaultDownloadFolderPath` property. The default value is the
32354   /// system default download folder path for the user.
32355   ///
32356   /// The caller must free the returned string with `CoTaskMemFree`.  See
32357   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32358   @(" propget")
32359 	HRESULT get_DefaultDownloadFolderPath(@("out, retval") LPWSTR* value);
32360 
32361   /// Sets the `DefaultDownloadFolderPath` property. The default download folder
32362   /// path is persisted in the user data folder across sessions. The value
32363   /// should be an absolute path to a folder that the user and application can
32364   /// write to. Returns `E_INVALIDARG` if the value is invalid, and the default
32365   /// download folder path is not changed. Otherwise the path is changed
32366   /// immediately. If the directory does not yet exist, it is created at the
32367   /// time of the next download. If the host application does not have
32368   /// permission to create the directory, then the user is prompted to provide a
32369   /// new path through the Save As dialog. The user can override the default
32370   /// download folder path for a given download by choosing a different path in
32371   /// the Save As dialog.
32372   @(" propput")
32373 	HRESULT put_DefaultDownloadFolderPath(in LPCWSTR value);
32374 
32375   /// The PreferredColorScheme property sets the overall color scheme of the
32376   /// WebView2s associated with this profile. This sets the color scheme for
32377   /// WebView2 UI like dialogs, prompts, and context menus by setting the
32378   /// media feature `prefers-color-scheme` for websites to respond to.
32379   ///
32380   /// The default value for this is COREWEBVIEW2_PREFERRED_COLOR_AUTO,
32381   /// which will follow whatever theme the OS is currently set to.
32382   ///
32383   /// \snippet ViewComponent.cpp SetPreferredColorScheme
32384   /// Returns the value of the `PreferredColorScheme` property.
32385   @(" propget")
32386 	HRESULT get_PreferredColorScheme(
32387     @("out, retval") COREWEBVIEW2_PREFERRED_COLOR_SCHEME* value);
32388 
32389   /// Sets the `PreferredColorScheme` property.
32390   @(" propput")
32391 	HRESULT put_PreferredColorScheme(
32392     in COREWEBVIEW2_PREFERRED_COLOR_SCHEME value);
32393 }
32394 
32395 /// Provides access to the certificate metadata.
32396 const GUID IID_ICoreWebView2Certificate = ICoreWebView2Certificate.iid;
32397 
32398 interface ICoreWebView2Certificate : IUnknown
32399 {
32400     static const GUID iid = { 0xC5FB2FCE,0x1CAC,0x4AEE,[ 0x9C,0x79,0x5E,0xD0,0x36,0x2E,0xAA,0xE0 ] };
32401   /// Subject of the certificate.
32402   ///
32403   /// The caller must free the returned string with `CoTaskMemFree`. See
32404   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32405   @(" propget")
32406 	HRESULT get_Subject(@("out, retval") LPWSTR* value);
32407   /// Name of the certificate authority that issued the certificate.
32408   ///
32409   /// The caller must free the returned string with `CoTaskMemFree`. See
32410   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32411   @(" propget")
32412 	HRESULT get_Issuer(@("out, retval") LPWSTR* value);
32413   /// The valid start date and time for the certificate as the number of seconds since
32414   /// the UNIX epoch.
32415   @(" propget")
32416 	HRESULT get_ValidFrom(@("out, retval") double* value);
32417   /// The valid expiration date and time for the certificate as the number of seconds since
32418   /// the UNIX epoch.
32419   @(" propget")
32420 	HRESULT get_ValidTo(@("out, retval") double* value);
32421   /// Base64 encoding of DER encoded serial number of the certificate.
32422   /// Read more about DER at [RFC 7468 DER]
32423   /// (https://tools.ietf.org/html/rfc7468#appendix-B).
32424   ///
32425   /// The caller must free the returned string with `CoTaskMemFree`. See
32426   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32427   @(" propget")
32428 	HRESULT get_DerEncodedSerialNumber(@("out, retval") LPWSTR* value);
32429   /// Display name for a certificate.
32430   ///
32431   /// The caller must free the returned string with `CoTaskMemFree`. See
32432   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings)
32433   @(" propget")
32434 	HRESULT get_DisplayName(@("out, retval") LPWSTR* value);
32435   /// PEM encoded data for the certificate.
32436   /// Returns Base64 encoding of DER encoded certificate.
32437   /// Read more about PEM at [RFC 1421 Privacy Enhanced Mail]
32438   /// (https://tools.ietf.org/html/rfc1421).
32439   ///
32440   /// The caller must free the returned string with `CoTaskMemFree`. See
32441   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings)
32442   HRESULT ToPemEncoding(@("out, retval") LPWSTR* pemEncodedData);
32443   /// Collection of PEM encoded certificate issuer chain.
32444   /// In this collection first element is the current certificate followed by
32445   /// intermediate1, intermediate2...intermediateN-1. Root certificate is the
32446   /// last element in collection.
32447   @(" propget")
32448 	HRESULT get_PemEncodedIssuerCertificateChain(@("out, retval")
32449       ICoreWebView2StringCollection * value);
32450 }
32451 
32452 /// An event handler for the `ServerCertificateErrorDetected` event.
32453 const GUID IID_ICoreWebView2ServerCertificateErrorDetectedEventHandler = ICoreWebView2ServerCertificateErrorDetectedEventHandler.iid;
32454 
32455 interface ICoreWebView2ServerCertificateErrorDetectedEventHandler : IUnknown
32456 {
32457     static const GUID iid = { 0x969B3A26,0xD85E,0x4795,[ 0x81,0x99,0xFE,0xF5,0x73,0x44,0xDA,0x22 ] };
32458   /// Provides the event args for the corresponding event.
32459   HRESULT Invoke(/+[in]+/ ICoreWebView2 sender,
32460       /+[in]+/ ICoreWebView2ServerCertificateErrorDetectedEventArgs
32461                      args);
32462 }
32463 
32464 /// Event args for the `ServerCertificateErrorDetected` event.
32465 const GUID IID_ICoreWebView2ServerCertificateErrorDetectedEventArgs = ICoreWebView2ServerCertificateErrorDetectedEventArgs.iid;
32466 
32467 interface ICoreWebView2ServerCertificateErrorDetectedEventArgs : IUnknown
32468 {
32469     static const GUID iid = { 0x012193ED,0x7C13,0x48FF,[ 0x96,0x9D,0xA8,0x4C,0x1F,0x43,0x2A,0x14 ] };
32470   /// The TLS error code for the invalid certificate.
32471   @(" propget")
32472 	HRESULT get_ErrorStatus(@("out, retval") COREWEBVIEW2_WEB_ERROR_STATUS* value);
32473 
32474   /// URI associated with the request for the invalid certificate.
32475   ///
32476   /// The caller must free the returned string with `CoTaskMemFree`.  See
32477   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32478   @(" propget")
32479 	HRESULT get_RequestUri(@("out, retval") LPWSTR* value);
32480 
32481   /// Returns the server certificate.
32482   @(" propget")
32483 	HRESULT get_ServerCertificate(@("out, retval") ICoreWebView2Certificate * value);
32484 
32485   /// The action of the server certificate error detection.
32486   /// The default value is `COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_DEFAULT`.
32487   @(" propget")
32488 	HRESULT get_Action(@("out, retval") COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION* value);
32489 
32490   /// Sets the `Action` property.
32491   @(" propput")
32492 	HRESULT put_Action(in COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION value);
32493 
32494   /// Returns an `ICoreWebView2Deferral` object. Use this operation to
32495   /// complete the event at a later time.
32496   HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral);
32497 }
32498 
32499 /// Receives the result of the `ClearServerCertificateErrorActions` method.
32500 const GUID IID_ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler = ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler.iid;
32501 
32502 interface ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler : IUnknown
32503 {
32504     static const GUID iid = { 0x3B40AAC6,0xACFE,0x4FFD,[ 0x82,0x11,0xF6,0x07,0xB9,0x6E,0x2D,0x5B ] };
32505   /// Provides the result of the corresponding asynchronous method.
32506   HRESULT Invoke(in HRESULT errorCode);
32507 }
32508 
32509 /// Profile2 interface.
32510 ///
32511 const GUID IID_ICoreWebView2Profile2 = ICoreWebView2Profile2.iid;
32512 
32513 interface ICoreWebView2Profile2 : ICoreWebView2Profile
32514 {
32515     static const GUID iid = { 0xfa740d4b,0x5eae,0x4344,[ 0xa8,0xad,0x74,0xbe,0x31,0x92,0x53,0x97 ] };
32516 
32517   /// Clear browsing data based on a data type. This method takes two parameters,
32518   /// the first being a mask of one or more `COREWEBVIEW2_BROWSING_DATA_KINDS`. OR
32519   /// operation(s) can be applied to multiple `COREWEBVIEW2_BROWSING_DATA_KINDS` to
32520   /// create a mask representing those data types. The browsing data kinds that are
32521   /// supported are listed below. These data kinds follow a hierarchical structure in
32522   /// which nested bullet points are included in their parent bullet point's data kind.
32523   /// Ex: All DOM storage is encompassed in all site data which is encompassed in
32524   /// all profile data.
32525   /// * All Profile
32526   ///   * All Site Data
32527   ///     * All DOM Storage: File Systems, Indexed DB, Local Storage, Web SQL, Cache
32528   ///         Storage
32529   ///     * Cookies
32530   ///   * Disk Cache
32531   ///   * Download History
32532   ///   * General Autofill
32533   ///   * Password Autosave
32534   ///   * Browsing History
32535   ///   * Settings
32536   /// The completed handler will be invoked when the browsing data has been cleared and
32537   /// will indicate if the specified data was properly cleared. In the case in which
32538   /// the operation is interrupted and the corresponding data is not fully cleared
32539   /// the handler will return `E_ABORT` and otherwise will return `S_OK`.
32540   /// Because this is an asynchronous operation, code that is dependent on the cleared
32541   /// data must be placed in the callback of this operation.
32542   /// If the WebView object is closed before the clear browsing data operation
32543   /// has completed, the handler will be released, but not invoked. In this case
32544   /// the clear browsing data operation may or may not be completed.
32545   /// ClearBrowsingData clears the `dataKinds` regardless of timestamp.
32546 
32547   HRESULT ClearBrowsingData(
32548       in COREWEBVIEW2_BROWSING_DATA_KINDS dataKinds,
32549       /+[in]+/ ICoreWebView2ClearBrowsingDataCompletedHandler handler);
32550 
32551   /// ClearBrowsingDataInTimeRange behaves like ClearBrowsingData except that it
32552   /// takes in two additional parameters for the start and end time for which it
32553   /// should clear the data between.  The `startTime` and `endTime`
32554   /// parameters correspond to the number of seconds since the UNIX epoch.
32555   /// `startTime` is inclusive while `endTime` is exclusive, therefore the data will
32556   /// be cleared between [startTime, endTime).
32557 
32558   HRESULT ClearBrowsingDataInTimeRange(
32559       in COREWEBVIEW2_BROWSING_DATA_KINDS dataKinds,
32560       in double startTime,
32561       in double endTime,
32562       /+[in]+/ ICoreWebView2ClearBrowsingDataCompletedHandler handler);
32563 
32564   /// ClearBrowsingDataAll behaves like ClearBrowsingData except that it
32565   /// clears the entirety of the data associated with the profile it is called on.
32566   /// It clears the data regardless of timestamp.
32567   ///
32568   /// \snippet AppWindow.cpp ClearBrowsingData
32569 
32570   HRESULT ClearBrowsingDataAll(
32571     /+[in]+/ ICoreWebView2ClearBrowsingDataCompletedHandler handler);
32572 }
32573 
32574 /// The caller implements this interface to receive the ClearBrowsingData result.
32575 const GUID IID_ICoreWebView2ClearBrowsingDataCompletedHandler = ICoreWebView2ClearBrowsingDataCompletedHandler.iid;
32576 
32577 interface ICoreWebView2ClearBrowsingDataCompletedHandler : IUnknown
32578 {
32579     static const GUID iid = { 0xe9710a06,0x1d1d,0x49b2,[ 0x82,0x34,0x22,0x6f,0x35,0x84,0x6a,0xe5 ] };
32580 
32581   /// Provide the completion status of the corresponding asynchronous method.
32582   HRESULT Invoke(in HRESULT errorCode);
32583 }
32584 
32585 /// This is an extension of the ICoreWebView2Profile interface to control levels of tracking prevention.
32586 const GUID IID_ICoreWebView2Profile3 = ICoreWebView2Profile3.iid;
32587 
32588 interface ICoreWebView2Profile3 : ICoreWebView2Profile2
32589 {
32590     static const GUID iid = { 0xB188E659,0x5685,0x4E05,[ 0xBD,0xBA,0xFC,0x64,0x0E,0x0F,0x19,0x92 ] };
32591   /// The `PreferredTrackingPreventionLevel` property allows you to control levels of tracking prevention for WebView2
32592   /// which are associated with a profile. This level would apply to the context of the profile. That is, all WebView2s
32593   /// sharing the same profile will be affected and also the value is persisted in the user data folder.
32594   ///
32595   /// See `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL` for descriptions of levels.
32596   ///
32597   /// If tracking prevention feature is enabled when creating the WebView2 environment, you can also disable tracking
32598   /// prevention later using this property and `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE` value but that doesn't
32599   /// improves runtime performance.
32600   ///
32601   /// There is `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` property to enable/disable tracking prevention feature
32602   /// for all the WebView2's created in the same environment. If enabled, `PreferredTrackingPreventionLevel` is set to
32603   /// `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED` by default for all the WebView2's and profiles created in the same
32604   /// environment or is set to the level whatever value was last changed/persisted to the profile. If disabled
32605   /// `PreferredTrackingPreventionLevel` is not respected by WebView2. If `PreferredTrackingPreventionLevel` is set when the
32606   /// feature is disabled, the property value get changed and persisted but it will takes effect only if
32607   /// `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` is true.
32608   ///
32609   /// See `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` for more details.
32610   /// \snippet SettingsComponent.cpp SetTrackingPreventionLevel
32611   @(" propget")
32612 	HRESULT get_PreferredTrackingPreventionLevel(
32613       @("out, retval") COREWEBVIEW2_TRACKING_PREVENTION_LEVEL* value);
32614   /// Set the `PreferredTrackingPreventionLevel` property.
32615   ///
32616   /// If `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` is false, this property will be changed and persisted
32617   /// to the profile but the WebView2 ignores the level silently.
32618   @(" propput")
32619 	HRESULT put_PreferredTrackingPreventionLevel(
32620       in COREWEBVIEW2_TRACKING_PREVENTION_LEVEL value);
32621 }
32622 
32623 /// This interface is a handler for when the `Favicon` is changed.
32624 /// The sender is the ICoreWebView2 object the top-level document of
32625 /// which has changed favicon and the eventArgs is nullptr. Use the
32626 /// FaviconUri property and GetFavicon method to obtain the favicon
32627 /// data. The second argument is always null.
32628 /// For more information see `add_FaviconChanged`.
32629 const GUID IID_ICoreWebView2FaviconChangedEventHandler = ICoreWebView2FaviconChangedEventHandler.iid;
32630 
32631 interface ICoreWebView2FaviconChangedEventHandler : IUnknown
32632 {
32633     static const GUID iid = { 0x2913DA94,0x833D,0x4DE0,[ 0x8D,0xCA,0x90,0x0F,0xC5,0x24,0xA1,0xA4 ] };
32634   /// Called to notify the favicon changed. The event args are always null.
32635   HRESULT Invoke(
32636       /+[in]+/ ICoreWebView2 sender,
32637       /+[in]+/ IUnknown args);
32638 }
32639 
32640 /// This interface is a handler for the completion of the population of
32641 /// `imageStream`.
32642 /// `errorCode` returns S_OK if the API succeeded.
32643 /// The image is returned in the `faviconStream` object. If there is no image
32644 /// then no data would be copied into the imageStream.
32645 /// For more details, see the `GetFavicon` API.
32646 const GUID IID_ICoreWebView2GetFaviconCompletedHandler = ICoreWebView2GetFaviconCompletedHandler.iid;
32647 
32648 interface ICoreWebView2GetFaviconCompletedHandler : IUnknown
32649 {
32650     static const GUID iid = { 0xA2508329,0x7DA8,0x49D7,[ 0x8C,0x05,0xFA,0x12,0x5E,0x4A,0xEE,0x8D ] };
32651   /// Called to notify the favicon has been retrieved.
32652   HRESULT Invoke(
32653       in HRESULT errorCode,
32654       in IStream* faviconStream);
32655 }
32656 
32657 /// Represents the registration of a custom scheme with the
32658 /// CoreWebView2Environment.
32659 /// This allows the WebView2 app to be able to handle WebResourceRequested
32660 /// event for requests with the specified scheme and be able to navigate the
32661 /// WebView2 to the custom scheme. Once the environment is created, the
32662 /// registrations are valid and immutable throughout the lifetime of the
32663 /// associated WebView2s' browser process and any WebView2 environments
32664 /// sharing the browser process must be created with identical custom scheme
32665 /// registrations, otherwise the environment creation will fail.
32666 /// Any further attempts to register the same scheme will fail during environment creation.
32667 /// The URIs of registered custom schemes will be treated similar to http
32668 /// URIs for their origins.
32669 /// They will have tuple origins for URIs with host and opaque origins for
32670 /// URIs without host as specified in
32671 /// [7.5 Origin - HTML Living Standard](https://html.spec.whatwg.org/multipage/origin.html)
32672 ///
32673 /// Example:
32674 /// `custom-scheme-with-host://hostname/path/to/resource` has origin of
32675 /// `custom-scheme-with-host://hostname`.
32676 /// `custom-scheme-without-host:path/to/resource` has origin of
32677 /// `custom-scheme-without-host:path/to/resource`.
32678 /// For WebResourceRequested event, the cases of request URIs and filter URIs
32679 /// with custom schemes will be normalized according to generic URI syntax
32680 /// rules. Any non-ASCII characters will be preserved.
32681 /// The registered custom schemes also participate in
32682 /// [CORS](https://developer.mozilla.org/docs/Web/HTTP/CORS) and
32683 /// adheres to [CSP](https://developer.mozilla.org/docs/Web/HTTP/CSP).
32684 /// The app needs to set the appropriate access headers in its
32685 /// WebResourceRequested event handler to allow CORS requests.
32686 /// \snippet AppWindow.cpp CoreWebView2CustomSchemeRegistration
32687 const GUID IID_ICoreWebView2CustomSchemeRegistration = ICoreWebView2CustomSchemeRegistration.iid;
32688 
32689 interface ICoreWebView2CustomSchemeRegistration : IUnknown
32690 {
32691     static const GUID iid = { 0xd60ac92c,0x37a6,0x4b26,[ 0xa3,0x9e,0x95,0xcf,0xe5,0x90,0x47,0xbb ] };
32692   /// The name of the custom scheme to register.
32693   @(" propget")
32694 	HRESULT get_SchemeName(@("out, retval") LPWSTR* schemeName);
32695 
32696   /// Whether the sites with this scheme will be treated as a
32697   /// [Secure Context](https://developer.mozilla.org/docs/Web/Security/Secure_Contexts)
32698   /// like an HTTPS site. This flag is only effective when HasAuthorityComponent
32699   /// is also set to `true`.
32700   /// `false` by default.
32701   @(" propget")
32702 	HRESULT get_TreatAsSecure(@("out, retval") BOOL* treatAsSecure);
32703   /// Set if the scheme will be treated as a Secure Context.
32704   @(" propput")
32705 	HRESULT put_TreatAsSecure(in BOOL value);
32706 
32707   /// List of origins that are allowed to issue requests with the custom
32708   /// scheme, such as XHRs and subresource requests that have an Origin header.
32709   /// The origin of any request (requests that have the
32710   /// [Origin header](https://developer.mozilla.org/docs/Web/HTTP/Headers/Origin))
32711   /// to the custom scheme URI needs to be in this list. No-origin requests
32712   /// are requests that do not have an Origin header, such as link
32713   /// navigations, embedded images and are always allowed.
32714   /// Note: POST requests always contain an Origin header, therefore
32715   /// AllowedOrigins must be set for even for same origin POST requests.
32716   /// Note that cross-origin restrictions still apply.
32717   /// From any opaque origin (Origin header is null), no cross-origin requests
32718   /// are allowed.
32719   /// If the list is empty, no cross-origin request to this scheme is
32720   /// allowed.
32721   /// Origins are specified as a string in the format of
32722   /// scheme://host:port.
32723   /// The origins are string pattern matched with `*` (matches 0 or more
32724   /// characters) and `?` (matches 0 or 1 character) wildcards just like
32725   /// the URI matching in the
32726   /// [AddWebResourceRequestedFilter API](/dotnet/api/microsoft.web.webview2.core.corewebview2.addwebresourcerequestedfilter).
32727   /// For example, "http://*.example.com:80".
32728   /// Here's a set of examples of what is allowed and not:
32729   ///
32730   /// | Request URI | Originating URL | AllowedOrigins | Allowed |
32731   /// | -- | -- | -- | -- |
32732   /// | `custom-scheme:request` | `https://www.example.com` | {"https://www.example.com"} | Yes |
32733   /// | `custom-scheme:request` | `https://www.example.com` | {"https://*.example.com"} | Yes |
32734   /// | `custom-scheme:request` | `https://www.example.com` | {"https://www.example2.com"} | No |
32735   /// | `custom-scheme-with-authority://host/path` | `custom-scheme-with-authority://host2` | {""} | No |
32736   /// | `custom-scheme-with-authority://host/path` | `custom-scheme-with-authority2://host` | {"custom-scheme-with-authority2://*"} | Yes |
32737   /// | `custom-scheme-without-authority:path` | custom-scheme-without-authority:path2 | {"custom-scheme-without-authority:*"} | No |
32738   /// | `custom-scheme-without-authority:path` | custom-scheme-without-authority:path2 | {"*"} | Yes |
32739   ///
32740   /// The returned strings and the array itself must be deallocated with
32741   /// CoTaskMemFree.
32742   HRESULT GetAllowedOrigins(
32743     @("out") UINT32* allowedOriginsCount,
32744     @("out") LPWSTR** allowedOrigins);
32745   /// Set the array of origins that are allowed to use the scheme.
32746   HRESULT SetAllowedOrigins(
32747     in UINT32 allowedOriginsCount,
32748     in LPCWSTR* allowedOrigins);
32749 
32750   /// Set this property to `true` if the URIs with this custom
32751   /// scheme will have an authority component (a host for custom schemes).
32752   /// Specifically, if you have a URI of the following form you should set the
32753   /// `HasAuthorityComponent` value as listed.
32754   ///
32755   /// | URI | Recommended HasAuthorityComponent value |
32756   /// | -- | -- |
32757   /// | `custom-scheme-with-authority://host/path` | `true` |
32758   /// | `custom-scheme-without-authority:path` | `false` |
32759   ///
32760   /// When this property is set to `true`, the URIs with this scheme will be
32761   /// interpreted as having a
32762   /// [scheme and host](https://html.spec.whatwg.org/multipage/origin.html#concept-origin-tuple)
32763   /// origin similar to an http URI. Note that the port and user
32764   /// information are never included in the computation of origins for
32765   /// custom schemes.
32766   /// If this property is set to `false`, URIs with this scheme will have an
32767   /// [opaque origin](https://html.spec.whatwg.org/multipage/origin.html#concept-origin-opaque)
32768   /// similar to a data URI.
32769   /// This property is `false` by default.
32770   ///
32771   /// Note: For custom schemes registered as having authority component,
32772   /// navigations to URIs without authority of such custom schemes will fail.
32773   /// However, if the content inside WebView2 references
32774   /// a subresource with a URI that does not have
32775   /// an authority component, but of a custom scheme that is registered as
32776   /// having authority component, the URI will be interpreted as a relative path
32777   /// as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986).
32778   /// For example, `custom-scheme-with-authority:path` will be interpreted
32779   /// as `custom-scheme-with-authority://host/path`.
32780   /// However, this behavior cannot be guaranteed to remain in future
32781   /// releases so it is recommended not to rely on this behavior.
32782   @(" propget")
32783 	HRESULT get_HasAuthorityComponent(@("out, retval") BOOL* hasAuthorityComponent);
32784 
32785   /// Get has authority component.
32786   @(" propput")
32787 	HRESULT put_HasAuthorityComponent(in BOOL  hasAuthorityComponent);
32788 }
32789 
32790 /// This is a continuation of the `ICoreWebView2PermissionRequestedEventArgs2`
32791 /// interface.
32792 const GUID IID_ICoreWebView2PermissionRequestedEventArgs3 = ICoreWebView2PermissionRequestedEventArgs3.iid;
32793 
32794 interface ICoreWebView2PermissionRequestedEventArgs3 :
32795     ICoreWebView2PermissionRequestedEventArgs2
32796 {
32797     static const GUID iid = { 0xe61670bc,0x3dce,0x4177,[ 0x86,0xd2,0xc6,0x29,0xae,0x3c,0xb6,0xac ] };
32798   /// The permission state set from the `PermissionRequested` event is saved in
32799   /// the profile by default; it persists across sessions and becomes the new
32800   /// default behavior for future `PermissionRequested` events. Browser
32801   /// heuristics can affect whether the event continues to be raised when the
32802   /// state is saved in the profile. Set the `SavesInProfile` property to
32803   /// `FALSE` to not persist the state beyond the current request, and to
32804   /// continue to receive `PermissionRequested`
32805   /// events for this origin and permission kind.
32806   @(" propget")
32807 	HRESULT get_SavesInProfile(@("out, retval") BOOL* value);
32808 
32809   /// Sets the `SavesInProfile` property.
32810   @(" propput")
32811 	HRESULT put_SavesInProfile(in BOOL value);
32812 }
32813 
32814 /// The caller implements this interface to handle the result of
32815 /// `SetPermissionState`.
32816 const GUID IID_ICoreWebView2SetPermissionStateCompletedHandler = ICoreWebView2SetPermissionStateCompletedHandler.iid;
32817 
32818 interface ICoreWebView2SetPermissionStateCompletedHandler : IUnknown
32819 {
32820     static const GUID iid = { 0xfc77fb30,0x9c9e,0x4076,[ 0xb8,0xc7,0x76,0x44,0xa7,0x03,0xca,0x1b ] };
32821   /// Provide the completion status of the corresponding asynchronous method.
32822   HRESULT Invoke(in HRESULT errorCode);
32823 }
32824 
32825 /// The caller implements this interface to handle the result of
32826 /// `GetNonDefaultPermissionSettings`.
32827 const GUID IID_ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler = ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler.iid;
32828 
32829 interface ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler : IUnknown
32830 {
32831     static const GUID iid = { 0x38274481,0xa15c,0x4563,[ 0x94,0xcf,0x99,0x0e,0xdc,0x9a,0xeb,0x95 ] };
32832   /// Provides the permission setting collection for the requested permission kind.
32833   HRESULT Invoke(in HRESULT errorCode,
32834       /+[in]+/ ICoreWebView2PermissionSettingCollectionView collectionView);
32835 }
32836 
32837 /// This is the ICoreWebView2Profile interface for the permission management APIs.
32838 const GUID IID_ICoreWebView2Profile4 = ICoreWebView2Profile4.iid;
32839 
32840 interface ICoreWebView2Profile4 : ICoreWebView2Profile3
32841 {
32842     static const GUID iid = { 0x8F4ae680,0x192e,0x4eC8,[ 0x83,0x3a,0x21,0xcf,0xad,0xae,0xf6,0x28 ] };
32843   /// Sets permission state for the given permission kind and origin
32844   /// asynchronously. The change persists across sessions until it is changed by
32845   /// another call to `SetPermissionState`, or by setting the `State` property
32846   /// in `PermissionRequestedEventArgs`. Setting the state to
32847   /// `COREWEBVIEW2_PERMISSION_STATE_DEFAULT` will erase any state saved in the
32848   /// profile and restore the default behavior.
32849   /// The origin should have a valid scheme and host (e.g. "https://www.example.com"),
32850   /// otherwise the method fails with `E_INVALIDARG`. Additional URI parts like
32851   /// path and fragment are ignored. For example, "https://wwww.example.com/app1/index.html/"
32852   /// is treated the same as "https://wwww.example.com". See the
32853   /// [MDN origin definition](https://developer.mozilla.org/en-US/docs/Glossary/Origin)
32854   /// for more details.
32855   ///
32856   /// \snippet ScenarioPermissionManagement.cpp SetPermissionState
32857   HRESULT SetPermissionState(
32858         in COREWEBVIEW2_PERMISSION_KIND permissionKind,
32859         in LPCWSTR origin,
32860         in COREWEBVIEW2_PERMISSION_STATE state,
32861         /+[in]+/ ICoreWebView2SetPermissionStateCompletedHandler completedHandler);
32862 
32863   /// Invokes the handler with a collection of all nondefault permission settings.
32864   /// Use this method to get the permission state set in the current and previous
32865   /// sessions.
32866   ///
32867   /// \snippet ScenarioPermissionManagement.cpp GetNonDefaultPermissionSettings
32868   HRESULT GetNonDefaultPermissionSettings(
32869       /+[in]+/ ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler completedHandler);
32870 }
32871 
32872 /// Read-only collection of `PermissionSetting`s (origin, kind, and state). Used to list
32873 /// the nondefault permission settings on the profile that are persisted across
32874 /// sessions.
32875 const GUID IID_ICoreWebView2PermissionSettingCollectionView = ICoreWebView2PermissionSettingCollectionView.iid;
32876 
32877 interface ICoreWebView2PermissionSettingCollectionView : IUnknown
32878 {
32879     static const GUID iid = { 0xf5596f62,0x3de5,0x47b1,[ 0x91,0xe8,0xa4,0x10,0x4b,0x59,0x6b,0x96 ] };
32880   /// Gets the `ICoreWebView2PermissionSetting` at the specified index.
32881   HRESULT GetValueAtIndex(
32882       in UINT32 index,
32883       @("out, retval") ICoreWebView2PermissionSetting * permissionSetting);
32884 
32885   /// The number of `ICoreWebView2PermissionSetting`s in the collection.
32886   @(" propget")
32887 	HRESULT get_Count(@("out, retval") UINT32* value);
32888 }
32889 
32890 /// Provides a set of properties for a permission setting.
32891 const GUID IID_ICoreWebView2PermissionSetting = ICoreWebView2PermissionSetting.iid;
32892 
32893 interface ICoreWebView2PermissionSetting : IUnknown
32894 {
32895     static const GUID iid = { 0x792b6eca,0x5576,0x421c,[ 0x91,0x19,0x74,0xeb,0xb3,0xa4,0xff,0xb3 ] };
32896   /// The kind of the permission setting. See `COREWEBVIEW2_PERMISSION_KIND` for
32897   /// more details.
32898   @(" propget")
32899 	HRESULT get_PermissionKind(
32900       @("out, retval") COREWEBVIEW2_PERMISSION_KIND* value);
32901 
32902   /// The origin of the permission setting.
32903   @(" propget")
32904 	HRESULT get_PermissionOrigin(@("out, retval") LPWSTR* value);
32905 
32906   /// The state of the permission setting.
32907   @(" propget")
32908 	HRESULT get_PermissionState(
32909       @("out, retval") COREWEBVIEW2_PERMISSION_STATE* value);
32910 }
32911 
32912 /// This is the interface in ControllerOptions for ScriptLocale.
32913 const GUID IID_ICoreWebView2ControllerOptions2 = ICoreWebView2ControllerOptions2.iid;
32914 
32915 interface ICoreWebView2ControllerOptions2 : ICoreWebView2ControllerOptions
32916 {
32917     static const GUID iid = { 0x06c991d8,0x9e7e,0x11ed,[ 0xa8,0xfc,0x02,0x42,0xac,0x12,0x00,0x02 ] };
32918   /// The default locale for the WebView2.  It sets the default locale for all
32919   /// Intl JavaScript APIs and other JavaScript APIs that depend on it, namely
32920   /// `Intl.DateTimeFormat()` which affects string formatting like
32921   /// in the time/date formats. Example: `Intl.DateTimeFormat().format(new Date())`
32922   /// The intended locale value is in the format of
32923   /// BCP 47 Language Tags. More information can be found from
32924   /// [IETF BCP47](https://www.ietf.org/rfc/bcp/bcp47.html).
32925   ///
32926   /// This property sets the locale for a CoreWebView2Environment used to create the
32927   /// WebView2ControllerOptions object, which is passed as a parameter in
32928   /// `CreateCoreWebView2ControllerWithOptions`.
32929   ///
32930   /// Changes to the ScriptLocale property apply to renderer processes created after
32931   /// the change. Any existing renderer processes will continue to use the previous
32932   /// ScriptLocale value. To ensure changes are applied to all renderer process,
32933   /// close and restart the CoreWebView2Environment and all associated WebView2 objects.
32934   ///
32935   /// The default value for ScriptLocale will depend on the WebView2 language
32936   /// and OS region. If the language portions of the WebView2 language and OS region
32937   /// match, then it will use the OS region. Otherwise, it will use the WebView2
32938   /// language.
32939   ///
32940   /// | OS Region | WebView2 Language | Default WebView2 ScriptLocale |
32941   /// |-----------|-------------------|-------------------------------|
32942   /// | en-GB     | en-US             | en-GB                         |
32943   /// | es-MX     | en-US             | en-US                         |
32944   /// | en-US     | en-GB             | en-US                         |
32945   ///
32946   /// You can set the ScriptLocale to the empty string to get the default ScriptLocale value.
32947   ///
32948   /// Use OS specific APIs to determine the OS region to use with this property
32949   /// if you want to match the OS. For example:
32950   ///
32951   /// Win32 C++:
32952   /// ```cpp
32953   ///   wchar_t osLocale[LOCALE_NAME_MAX_LENGTH] = {0};
32954   ///   GetUserDefaultLocaleName(osLocale, LOCALE_NAME_MAX_LENGTH);
32955   /// ```
32956   ///
32957   /// The caller must free the returned string with `CoTaskMemFree`.  See
32958   /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
32959   /// \snippet AppWindow.cpp ScriptLocaleSetting
32960   @(" propget")
32961 	HRESULT get_ScriptLocale(@("out, retval") LPWSTR* locale);
32962   /// Sets the `ScriptLocale` property.
32963   @(" propput")
32964 	HRESULT put_ScriptLocale(in LPCWSTR locale);
32965 }
32966 
32967 /// The shared buffer object that is created by [CreateSharedBuffer](/microsoft-edge/webview2/reference/win32/icorewebview2environment12#createsharedbuffer).
32968 /// The object is presented to script as ArrayBuffer when posted to script with
32969 /// [PostSharedBufferToScript](/microsoft-edge/webview2/reference/win32/icorewebview2_17#postsharedbuffertoscript).
32970 const GUID IID_ICoreWebView2SharedBuffer = ICoreWebView2SharedBuffer.iid;
32971 
32972 interface ICoreWebView2SharedBuffer : IUnknown
32973 {
32974     static const GUID iid = { 0xB747A495,0x0C6F,0x449E,[ 0x97,0xB8,0x2F,0x81,0xE9,0xD6,0xAB,0x43 ] };
32975   /// The size of the shared buffer in bytes.
32976   @(" propget")
32977 	HRESULT get_Size(@("out, retval") UINT64* value);
32978 
32979   /// The memory address of the shared buffer.
32980   @(" propget")
32981 	HRESULT get_Buffer(@("out, retval") BYTE** value);
32982 
32983   /// Get an IStream object that can be used to access the shared buffer.
32984   HRESULT OpenStream(@("out, retval") IStream** value);
32985 
32986   /// Returns a handle to the file mapping object that backs this shared buffer.
32987   /// The returned handle is owned by the shared buffer object. You should not
32988   /// call CloseHandle on it.
32989   /// Normal app should use `Buffer` or `OpenStream` to get memory address
32990   /// or IStream object to access the buffer.
32991   /// For advanced scenarios, you could use file mapping APIs to obtain other views
32992   /// or duplicate this handle to another application process and create a view from
32993   /// the duplicated handle in that process to access the buffer from that separate process.
32994   @(" propget")
32995 	HRESULT get_FileMappingHandle(@("out, retval") HANDLE* value);
32996 
32997   /// Release the backing shared memory. The application should call this API when no
32998   /// access to the buffer is needed any more, to ensure that the underlying resources
32999   /// are released timely even if the shared buffer object itself is not released due to
33000   /// some leaked reference.
33001   /// After the shared buffer is closed, the buffer address and file mapping handle previously
33002   /// obtained becomes invalid and cannot be used anymore. Accessing properties of the object
33003   /// will fail with `RO_E_CLOSED`. Operations like Read or Write on the IStream objects returned
33004   /// from `OpenStream` will fail with `RO_E_CLOSED`. `PostSharedBufferToScript` will also
33005   /// fail with `RO_E_CLOSED`.
33006   ///
33007   /// The script code should call `chrome.webview.releaseBuffer` with
33008   /// the shared buffer as the parameter to release underlying resources as soon
33009   /// as it does not need access the shared buffer any more.
33010   /// When script tries to access the buffer after calling `chrome.webview.releaseBuffer`,
33011   /// JavaScript `TypeError` exception will be raised complaining about accessing a
33012   /// detached ArrayBuffer, the same exception when trying to access a transferred ArrayBuffer.
33013   ///
33014   /// Closing the buffer object on native side doesn't impact access from Script and releasing
33015   /// the buffer from script doesn't impact access to the buffer from native side.
33016   /// The underlying shared memory will be released by the OS when both native and script side
33017   /// release the buffer.
33018   HRESULT Close();
33019 }
33020 
33021 /// Representation of a DOM
33022 /// [File](https://developer.mozilla.org/en-US/docs/Web/API/File) object
33023 /// passed via WebMessage. You can use this object to obtain the path of a
33024 /// File dropped on WebView2.
33025 /// \snippet ScenarioDragDrop.cpp DroppedFilePath
33026 const GUID IID_ICoreWebView2File = ICoreWebView2File.iid;
33027 
33028 interface ICoreWebView2File : IUnknown
33029 {
33030     static const GUID iid = { 0xf2c19559,0x6bc1,0x4583,[ 0xa7,0x57,0x90,0x02,0x1b,0xe9,0xaf,0xec ] };
33031   /// Get the absolute file path.
33032   @(" propget")
33033 	HRESULT get_Path(@("out, retval") LPWSTR* path);
33034 }
33035 
33036 /// Read-only collection of generic objects.
33037 const GUID IID_ICoreWebView2ObjectCollectionView = ICoreWebView2ObjectCollectionView.iid;
33038 
33039 interface ICoreWebView2ObjectCollectionView : IUnknown
33040 {
33041     static const GUID iid = { 0x0f36fd87,0x4f69,0x4415,[ 0x98,0xda,0x88,0x8f,0x89,0xfb,0x9a,0x33 ] };
33042   /// Gets the number of items in the collection.
33043   @(" propget")
33044 	HRESULT get_Count(@("out, retval") UINT32* value);
33045 
33046   /// Gets the object at the specified index. Cast the object to the native type
33047   /// to access its specific properties.
33048   HRESULT GetValueAtIndex(in UINT32 index,
33049       @("out, retval") IUnknown * value);
33050 }
33051 
33052 /// Extension of WebMessageReceivedEventArgs to provide access to additional
33053 /// WebMessage objects.
33054 const GUID IID_ICoreWebView2WebMessageReceivedEventArgs2 = ICoreWebView2WebMessageReceivedEventArgs2.iid;
33055 
33056 interface ICoreWebView2WebMessageReceivedEventArgs2 : ICoreWebView2WebMessageReceivedEventArgs
33057 {
33058     static const GUID iid = { 0x06fc7ab7,0xc90c,0x4297,[ 0x93,0x89,0x33,0xca,0x01,0xcf,0x6d,0x5e ] };
33059   /// Additional received WebMessage objects. To pass `additionalObjects` via
33060   /// WebMessage to the app, use the
33061   /// `chrome.webview.postMessageWithAdditionalObjects` content API.
33062   /// Any DOM object type that can be natively representable that has been
33063   /// passed in to `additionalObjects` parameter will be accessible here.
33064   /// Currently a WebMessage object can be the `ICoreWebView2File` type.
33065   /// Entries in the collection can be `nullptr` if `null` or `undefined` was
33066   /// passed.
33067   @(" propget")
33068 	HRESULT get_AdditionalObjects(
33069       @("out, retval") ICoreWebView2ObjectCollectionView * value);
33070 }
33071 
33072 /// This is the ICoreWebView2Profile interface for cookie manager.
33073 const GUID IID_ICoreWebView2Profile5 = ICoreWebView2Profile5.iid;
33074 
33075 interface ICoreWebView2Profile5 : ICoreWebView2Profile4
33076 {
33077     static const GUID iid = { 0x2EE5B76E,0x6E80,0x4DF2,[ 0xBC,0xD3,0xD4,0xEC,0x33,0x40,0xA0,0x1B ] };
33078   /// Get the cookie manager for the profile. All CoreWebView2s associated with this
33079   /// profile share the same cookie values. Changes to cookies in this cookie manager apply to all
33080   /// CoreWebView2s associated with this profile.
33081   /// See ICoreWebView2CookieManager.
33082   ///
33083   /// \snippet ScenarioCookieManagement.cpp CookieManagerProfile
33084   @(" propget")
33085 	HRESULT get_CookieManager(@("out, retval") ICoreWebView2CookieManager * cookieManager);
33086 }
33087 
33088 /// Interfaces in profile for managing password-autosave and general-autofill.
33089 const GUID IID_ICoreWebView2Profile6 = ICoreWebView2Profile6.iid;
33090 
33091 interface ICoreWebView2Profile6 : ICoreWebView2Profile5
33092 {
33093     static const GUID iid = { 0xBD82FA6A,0x1D65,0x4C33,[ 0xB2,0xB4,0x03,0x93,0x02,0x0C,0xC6,0x1B ] };
33094   /// IsPasswordAutosaveEnabled controls whether autosave for password
33095   /// information is enabled. The IsPasswordAutosaveEnabled property behaves
33096   /// independently of the IsGeneralAutofillEnabled property. When IsPasswordAutosaveEnabled is
33097   /// false, no new password data is saved and no Save/Update Password prompts are displayed.
33098   /// However, if there was password data already saved before disabling this setting,
33099   /// then that password information is auto-populated, suggestions are shown and clicking on
33100   /// one will populate the fields.
33101   /// When IsPasswordAutosaveEnabled is true, password information is auto-populated,
33102   /// suggestions are shown and clicking on one will populate the fields, new data
33103   /// is saved, and a Save/Update Password prompt is displayed.
33104   /// It will take effect immediately after setting.
33105   /// The default value is `FALSE`.
33106   /// This property has the same value as
33107   /// `CoreWebView2Settings.IsPasswordAutosaveEnabled`, and changing one will
33108   /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile`
33109   /// will share the same value for this property, so for the `CoreWebView2`s
33110   /// with the same profile, their
33111   /// `CoreWebView2Settings.IsPasswordAutosaveEnabled` and
33112   /// `CoreWebView2Profile.IsPasswordAutosaveEnabled` will always have the same
33113   /// value.
33114   ///
33115   /// \snippet SettingsComponent.cpp ToggleProfilePasswordAutosaveEnabled
33116   @(" propget")
33117 	HRESULT get_IsPasswordAutosaveEnabled(@("out, retval") BOOL* value);
33118 
33119   /// Set the IsPasswordAutosaveEnabled property.
33120   @(" propput")
33121 	HRESULT put_IsPasswordAutosaveEnabled(in BOOL value);
33122 
33123   /// IsGeneralAutofillEnabled controls whether autofill for information
33124   /// like names, street and email addresses, phone numbers, and arbitrary input
33125   /// is enabled. This excludes password and credit card information. When
33126   /// IsGeneralAutofillEnabled is false, no suggestions appear, and no new information
33127   /// is saved. When IsGeneralAutofillEnabled is true, information is saved, suggestions
33128   /// appear and clicking on one will populate the form fields.
33129   /// It will take effect immediately after setting.
33130   /// The default value is `TRUE`.
33131   /// This property has the same value as
33132   /// `CoreWebView2Settings.IsGeneralAutofillEnabled`, and changing one will
33133   /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile`
33134   /// will share the same value for this property, so for the `CoreWebView2`s
33135   /// with the same profile, their
33136   /// `CoreWebView2Settings.IsGeneralAutofillEnabled` and
33137   /// `CoreWebView2Profile.IsGeneralAutofillEnabled` will always have the same
33138   /// value.
33139   ///
33140   /// \snippet SettingsComponent.cpp ToggleProfileGeneralAutofillEnabled
33141   @(" propget")
33142 	HRESULT get_IsGeneralAutofillEnabled(@("out, retval") BOOL* value);
33143 
33144   /// Set the IsGeneralAutofillEnabled property.
33145   @(" propput")
33146 	HRESULT put_IsGeneralAutofillEnabled(in BOOL value);
33147 }
33148 
33149 /// This is a continuation of the `ICoreWebView2NewWindowRequestedEventArgs` interface.
33150 const GUID IID_ICoreWebView2NewWindowRequestedEventArgs3 = ICoreWebView2NewWindowRequestedEventArgs3.iid;
33151 
33152 interface ICoreWebView2NewWindowRequestedEventArgs3 : ICoreWebView2NewWindowRequestedEventArgs2
33153 {
33154     static const GUID iid = { 0x842bed3c,0x6ad6,0x4dd9,[ 0xb9,0x38,0x28,0xc9,0x66,0x67,0xad,0x66 ] };
33155   /// The frame info of the frame where the new window request originated. The
33156   /// `OriginalSourceFrameInfo` is a snapshot of frame information at the time when the
33157   /// new window was requested. See `ICoreWebView2FrameInfo` for details on frame
33158   /// properties.
33159   @(" propget")
33160 	HRESULT get_OriginalSourceFrameInfo(
33161       @("out, retval") ICoreWebView2FrameInfo * frameInfo);
33162 }
33163 
33164 /// Interfaces in profile for managing browser extensions.
33165 const GUID IID_ICoreWebView2Profile7 = ICoreWebView2Profile7.iid;
33166 
33167 interface ICoreWebView2Profile7 : ICoreWebView2Profile6
33168 {
33169     static const GUID iid = { 0x7b4c7906,0xa1aa,0x4cb4,[ 0xb7,0x23,0xdb,0x09,0xf8,0x13,0xd5,0x41 ] };
33170     /// Adds the [browser extension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions)
33171     /// using the extension path for unpacked extensions from the local device. Extension is
33172     /// running right after installation.
33173     /// The extension folder path is the topmost folder of an unpacked browser extension and
33174     /// contains the browser extension manifest file.
33175     /// If the `extensionFolderPath` is an invalid path or doesn't contain the extension manifest.json
33176     /// file, this function will return `ERROR_FILE_NOT_FOUND` to callers.
33177     /// Installed extension will default `IsEnabled` to true.
33178     /// When `AreBrowserExtensionsEnabled` is `FALSE`, `AddBrowserExtension` will fail and return
33179     /// HRESULT `ERROR_NOT_SUPPORTED`.
33180     /// During installation, the content of the extension is not copied to the user data folder.
33181     /// Once the extension is installed, changing the content of the extension will cause the
33182     /// extension to be removed from the installed profile.
33183     /// When an extension is added the extension is persisted in the corresponding profile. The
33184     /// extension will still be installed the next time you use this profile.
33185     /// When an extension is installed from a folder path, adding the same extension from the same
33186     /// folder path means reinstalling this extension. When two extensions with the same Id are
33187     /// installed, only the later installed extension will be kept.
33188     ///
33189     /// Extensions that are designed to include any UI interactions (e.g. icon, badge, pop up, etc.)
33190     /// can be loaded and used but will have missing UI entry points due to the lack of browser
33191     /// UI elements to host these entry points in WebView2.
33192     ///
33193     /// The following summarizes the possible error values that can be returned from
33194     /// `AddBrowserExtension` and a description of why these errors occur.
33195     ///
33196     /// Error value                                     | Description
33197     /// ----------------------------------------------- | --------------------------
33198     /// `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)`       | Extensions are disabled.
33199     /// `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)`      | Cannot find `manifest.json` file or it is not a valid extension manifest.
33200     /// `E_ACCESSDENIED`                                | Cannot load extension with file or directory name starting with \"_\", reserved for use by the system.
33201     /// `E_FAIL`                                        | Extension failed to install with other unknown reasons.
33202     HRESULT AddBrowserExtension(in LPCWSTR extensionFolderPath, /+[in]+/ ICoreWebView2ProfileAddBrowserExtensionCompletedHandler handler);
33203     /// Gets a snapshot of the set of extensions installed at the time `GetBrowserExtensions` is
33204     /// called. If an extension is installed or uninstalled after `GetBrowserExtensions` completes,
33205     /// the list returned by `GetBrowserExtensions` remains the same.
33206     /// When `AreBrowserExtensionsEnabled` is `FALSE`, `GetBrowserExtensions` won't return any
33207     /// extensions on current user profile.
33208     HRESULT GetBrowserExtensions(/+[in]+/ ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler handler);
33209 }
33210 
33211 /// Provides a set of properties for managing an Extension, which includes
33212 /// an ID, name, and whether it is enabled or not, and the ability to Remove
33213 /// the Extension, and enable or disable it.
33214 const GUID IID_ICoreWebView2BrowserExtension = ICoreWebView2BrowserExtension.iid;
33215 
33216 interface ICoreWebView2BrowserExtension : IUnknown
33217 {
33218     static const GUID iid = { 0x7EF7FFA0,0xFAC5,0x462C,[ 0xB1,0x89,0x3D,0x9E,0xDB,0xE5,0x75,0xDA ] };
33219     /// This is the browser extension's ID. This is the same browser extension ID returned by
33220     /// the browser extension API [`chrome.runtime.id`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/id).
33221     /// Please see that documentation for more details on how the ID is generated.
33222     /// After an extension is removed, calling `Id` will return the id of the extension that is removed.
33223     /// The caller must free the returned string with `CoTaskMemFree`.  See
33224     /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
33225     @(" propget")
33226 	HRESULT get_Id(@("out, retval") LPWSTR* value);
33227     /// This is the browser extension's name. This value is defined in this browser extension's
33228     /// manifest.json file. If manifest.json define extension's localized name, this value will
33229     /// be the localized version of the name.
33230     /// Please see [Manifest.json name](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/name)
33231     /// for more details.
33232     /// After an extension is removed, calling `Name` will return the name of the extension that is removed.
33233     /// The caller must free the returned string with `CoTaskMemFree`.  See
33234     /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
33235     @(" propget")
33236 	HRESULT get_Name(@("out, retval") LPWSTR* value);
33237     /// Removes this browser extension from its WebView2 Profile. The browser extension is removed
33238     /// immediately including from all currently running HTML documents associated with this
33239     /// WebView2 Profile. The removal is persisted and future uses of this profile will not have this
33240     /// extension installed. After an extension is removed, calling `Remove` again will cause an exception.
33241     HRESULT Remove(/+[in]+/ ICoreWebView2BrowserExtensionRemoveCompletedHandler handler);
33242     /// If `isEnabled` is true then the Extension is enabled and running in WebView instances.
33243     /// If it is false then the Extension is disabled and not running in WebView instances.
33244     /// When a Extension is first installed, `IsEnable` are default to be `TRUE`.
33245     /// `isEnabled` is persisted per profile.
33246     /// After an extension is removed, calling `isEnabled` will return the value at the time it was removed.
33247     @(" propget")
33248 	HRESULT get_IsEnabled(@("out, retval") BOOL* value);
33249     /// Sets whether this browser extension is enabled or disabled. This change applies immediately
33250     /// to the extension in all HTML documents in all WebView2s associated with this profile.
33251     /// After an extension is removed, calling `Enable` will not change the value of `IsEnabled`.
33252     HRESULT Enable(in BOOL isEnabled, /+[in]+/ ICoreWebView2BrowserExtensionEnableCompletedHandler handler);
33253 }
33254 
33255 /// The caller implements this interface to receive the result of removing
33256 /// the browser Extension from the Profile.
33257 const GUID IID_ICoreWebView2BrowserExtensionRemoveCompletedHandler = ICoreWebView2BrowserExtensionRemoveCompletedHandler.iid;
33258 
33259 interface ICoreWebView2BrowserExtensionRemoveCompletedHandler : IUnknown
33260 {
33261     static const GUID iid = { 0x8E41909A,0x9B18,0x4BB1,[ 0x8C,0xDF,0x93,0x0F,0x46,0x7A,0x50,0xBE ] };
33262     /// Provides the result of the browser extension Remove operation.
33263     HRESULT Invoke(in HRESULT errorCode);
33264 }
33265 
33266 /// The caller implements this interface to receive the result of setting the
33267 /// browser Extension as enabled or disabled. If enabled, the browser Extension is
33268 /// running in WebView instances. If disabled, the browser Extension is not running in WebView instances.
33269 const GUID IID_ICoreWebView2BrowserExtensionEnableCompletedHandler = ICoreWebView2BrowserExtensionEnableCompletedHandler.iid;
33270 
33271 interface ICoreWebView2BrowserExtensionEnableCompletedHandler : IUnknown
33272 {
33273     static const GUID iid = { 0x30C186CE,0x7FAD,0x421F,[ 0xA3,0xBC,0xA8,0xEA,0xF0,0x71,0xDD,0xB8 ] };
33274     /// Provides the result of the browser extension enable operation.
33275     HRESULT Invoke(in HRESULT errorCode);
33276 }
33277 
33278 /// Provides a set of properties for managing browser Extension Lists from user profile. This
33279 /// includes the number of browser Extensions in the list, and the ability to get an browser
33280 /// Extension from the list at a particular index.
33281 const GUID IID_ICoreWebView2BrowserExtensionList = ICoreWebView2BrowserExtensionList.iid;
33282 
33283 interface ICoreWebView2BrowserExtensionList : IUnknown
33284 {
33285     static const GUID iid = { 0x2EF3D2DC,0xBD5F,0x4F4D,[ 0x90,0xAF,0xFD,0x67,0x79,0x8F,0x0C,0x2F ] };
33286     /// The number of browser Extensions in the list.
33287     @(" propget")
33288 	HRESULT get_Count(@("out, retval") UINT* count);
33289     /// Gets the browser Extension located in the browser Extension List at the given index.
33290     HRESULT GetValueAtIndex(in UINT index,
33291 		@("out, retval") ICoreWebView2BrowserExtension * extension);
33292 }
33293 
33294 /// The caller implements this interface to receive the result of
33295 /// getting the browser Extensions.
33296 const GUID IID_ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler = ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler.iid;
33297 
33298 interface ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler : IUnknown
33299 {
33300     static const GUID iid = { 0xFCE16A1C,0xF107,0x4601,[ 0x8B,0x75,0xFC,0x49,0x40,0xAE,0x25,0xD0 ] };
33301     /// Provides the browser extension list for the requested user profile.
33302     HRESULT Invoke(in HRESULT errorCode, /+[in]+/ ICoreWebView2BrowserExtensionList extensionList);
33303 }
33304 
33305 /// The caller implements this interface to receive the result
33306 /// of loading an browser Extension.
33307 const GUID IID_ICoreWebView2ProfileAddBrowserExtensionCompletedHandler = ICoreWebView2ProfileAddBrowserExtensionCompletedHandler.iid;
33308 
33309 interface ICoreWebView2ProfileAddBrowserExtensionCompletedHandler : IUnknown
33310 {
33311     static const GUID iid = { 0xDF1AAB27,0x82B9,0x4AB6,[ 0xAA,0xE8,0x01,0x7A,0x49,0x39,0x8C,0x14 ] };
33312     /// Provides the result of the `AddBrowserExtension` operation.g
33313     HRESULT Invoke(in HRESULT errorCode, /+[in]+/ ICoreWebView2BrowserExtension extension);
33314 }
33315 
33316 /// This is the profile interface that manages profile
33317 /// deletion.
33318 const GUID IID_ICoreWebView2Profile8 = ICoreWebView2Profile8.iid;
33319 
33320 interface ICoreWebView2Profile8 : ICoreWebView2Profile7
33321 {
33322     static const GUID iid = { 0xfbf70c2f,0xeb1f,0x4383,[ 0x85,0xa0,0x16,0x3e,0x92,0x04,0x40,0x11 ] };
33323   /// After the API is called, the profile will be marked for deletion. The
33324   /// local profile's directory will be deleted at browser process exit. If it
33325   /// fails to delete, because something else is holding the files open,
33326   /// WebView2 will try to delete the profile at all future browser process
33327   /// starts until successful.
33328   /// The corresponding CoreWebView2s will be closed and the
33329   /// CoreWebView2Profile.Deleted event will be raised. See
33330   /// `CoreWebView2Profile.Deleted` for more information.
33331   /// If you try to create a new profile with the same name as an existing
33332   /// profile that has been marked as deleted but hasn't yet been deleted,
33333   /// profile creation will fail with HRESULT_FROM_WIN32(ERROR_DELETE_PENDING).
33334   ///
33335   /// \snippet SettingsComponent.cpp DeleteProfile
33336   HRESULT Delete();
33337 
33338   /// Add an event handler for the `Deleted` event. The `Deleted` event is
33339   /// raised when the profile is marked for deletion. When this event is
33340   /// raised, the CoreWebView2Profile and its corresponding CoreWebView2s have
33341   /// been closed, and cannot be used anymore.
33342   ///
33343   /// \snippet AppWindow.cpp ProfileDeleted
33344   HRESULT add_Deleted(
33345       /+[in]+/ ICoreWebView2ProfileDeletedEventHandler eventHandler,
33346       @("out") EventRegistrationToken* token);
33347 
33348   /// Removes an event handler previously added with `add_Deleted`.
33349   HRESULT remove_Deleted(
33350       in EventRegistrationToken token);
33351 }
33352 
33353 /// Receives the `CoreWebView2Profile.Deleted` event.
33354 const GUID IID_ICoreWebView2ProfileDeletedEventHandler = ICoreWebView2ProfileDeletedEventHandler.iid;
33355 
33356 interface ICoreWebView2ProfileDeletedEventHandler : IUnknown
33357 {
33358     static const GUID iid = { 0xDF35055D,0x772E,0x4DBE,[ 0xB7,0x43,0x5F,0xBF,0x74,0xA2,0xB2,0x58 ] };
33359   /// Called to provide the implementer with the event args for the
33360   /// profile deleted event. No event args exist and the `args`
33361   /// parameter is set to `null`.
33362   HRESULT Invoke(
33363       /+[in]+/ ICoreWebView2Profile sender,
33364       /+[in]+/ IUnknown args);
33365 }
33366 
33367 // End of interfaces
33368 
33369 /// DLL export to create a WebView2 environment with a custom version of
33370 /// WebView2 Runtime, user data folder, and with or without additional options.
33371 ///
33372 /// When WebView2 experimental APIs are used, make sure to provide a valid `environmentOptions`
33373 /// so that WebView2 runtime knows which version of the SDK that the app is using. Otherwise,
33374 /// WebView2 runtime assumes that the version of the SDK being used is the latest
33375 /// version known to it, which might not be the version of the SDK being used.
33376 /// This wrong SDK version assumption could result in some experimental APIs not being available.
33377 ///
33378 /// The WebView2 environment and all other WebView2 objects are single threaded
33379 ///  and have dependencies on Windows components that require COM to be
33380 /// initialized for a single-threaded apartment.  The app is expected to run
33381 /// `CoInitializeEx` before running `CreateCoreWebView2EnvironmentWithOptions`.
33382 ///
33383 /// ```text
33384 /// CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
33385 /// ```
33386 ///
33387 /// If `CoInitializeEx` did not run or previously ran with
33388 /// `COINIT_MULTITHREADED`, `CreateCoreWebView2EnvironmentWithOptions` fails
33389 /// with one of the following errors.
33390 ///
33391 /// ```text
33392 /// CO_E_NOTINITIALIZED -  if CoInitializeEx was not called
33393 /// RPC_E_CHANGED_MODE  -  if CoInitializeEx was previously called with
33394 ///                        COINIT_MULTITHREADED
33395 /// ```
33396 ///
33397 ///
33398 /// Use `browserExecutableFolder` to specify whether WebView2 controls use a
33399 /// fixed or installed version of the WebView2 Runtime that exists on a user
33400 /// machine.  To use a fixed version of the WebView2 Runtime, pass the
33401 /// folder path that contains the fixed version of the WebView2 Runtime to
33402 /// `browserExecutableFolder`. BrowserExecutableFolder supports both relative
33403 ///  (to the application's executable) and absolute files paths.
33404 /// To create WebView2 controls that use the
33405 /// installed version of the WebView2 Runtime that exists on user machines,
33406 /// pass a `null` or empty string to `browserExecutableFolder`.  In this
33407 /// scenario, the API tries to find a compatible version of the WebView2
33408 /// Runtime that is installed on the user machine (first at the machine level,
33409 ///  and then per user) using the selected channel preference.  The path of
33410 /// fixed version of the WebView2 Runtime should not contain
33411 /// `\Edge\Application\`. When such a path is used, the API fails
33412 /// with `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)`.
33413 ///
33414 /// The default channel search order is the WebView2 Runtime, Beta, Dev, and
33415 /// Canary.  When an override `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE` environment
33416 ///  variable or applicable `releaseChannelPreference` registry value is set to
33417 ///  `1`, the channel search order is reversed.
33418 ///
33419 /// You may specify the `userDataFolder` to change the default user data
33420 /// folder location for WebView2.  The path is either an absolute file path
33421 /// or a relative file path that is interpreted as relative to the compiled
33422 /// code for the current process.  For UWP apps, the default user data
33423 /// folder is the app data folder for the package.  For non-UWP apps, the
33424 /// default user data (`{Executable File Name}.WebView2`) folder is
33425 /// created in the same directory next to the compiled code for the app.
33426 /// WebView2 creation fails if the compiled code is running in a directory in
33427 /// which the process does not have permission to create a new directory.  The
33428 /// app is responsible to clean up the associated user data folder when it
33429 /// is done.
33430 ///
33431 /// \> [!NOTE]\n\> As a browser process may be shared among WebViews, WebView creation fails
33432 /// with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if the specified options
33433 /// does not match the options of the WebViews that are currently running in
33434 /// the shared browser process.
33435 ///
33436 /// `environmentCreatedHandler` is the handler result to the async operation
33437 /// that contains the `WebView2Environment` that was created.
33438 ///
33439 /// The `browserExecutableFolder`, `userDataFolder` and
33440 /// `additionalBrowserArguments` of the `environmentOptions` may be overridden
33441 /// by values either specified in environment variables or in the registry.
33442 ///
33443 /// When creating a `WebView2Environment` the following environment variables
33444 /// are verified.
33445 ///
33446 /// ```text
33447 /// WEBVIEW2_BROWSER_EXECUTABLE_FOLDER
33448 /// WEBVIEW2_USER_DATA_FOLDER
33449 /// WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS
33450 /// WEBVIEW2_RELEASE_CHANNEL_PREFERENCE
33451 /// ```
33452 ///
33453 /// If you find an override environment variable, use the
33454 /// `browserExecutableFolder` and `userDataFolder` values as replacements for
33455 /// the corresponding values in `CreateCoreWebView2EnvironmentWithOptions`
33456 /// parameters.  If `additionalBrowserArguments` is specified in environment
33457 /// variable or in the registry, it is appended to the corresponding values in
33458 /// `CreateCoreWebView2EnvironmentWithOptions` parameters.
33459 ///
33460 /// While not strictly overrides, additional environment variables may be set.
33461 ///
33462 /// ```text
33463 /// WEBVIEW2_WAIT_FOR_SCRIPT_DEBUGGER
33464 /// ```
33465 ///
33466 /// When found with a non-empty value, this indicates that the WebView is being
33467 ///  launched under a script debugger.  In this case, the WebView issues a
33468 /// `Page.waitForDebugger` CDP command that runs the script inside the WebView
33469 /// to pause on launch, until a debugger issues a corresponding
33470 /// `Runtime.runIfWaitingForDebugger` CDP command to resume the runtime.
33471 ///
33472 /// \> [!NOTE]\n\> The following environment variable does not have a registry key
33473 /// equivalent: `WEBVIEW2_WAIT_FOR_SCRIPT_DEBUGGER`.
33474 ///
33475 /// When found with a non-empty value, it indicates that the WebView is being
33476 /// launched under a script debugger that also supports host apps that use
33477 /// multiple WebViews.  The value is used as the identifier for a named pipe
33478 /// that is opened and written to when a new WebView is created by the host
33479 /// app.  The payload should match the payload of the `remote-debugging-port`
33480 /// JSON target and an external debugger may use it to attach to a specific
33481 /// WebView instance.  The format of the pipe created by the debugger should be
33482 /// `\\.\pipe\WebView2\Debugger\{app_name}\{pipe_name}`, where the following
33483 /// are true.
33484 ///
33485 /// *   `{app_name}` is the host app exe file name, for example,
33486 ///     `WebView2Example.exe`
33487 /// *   `{pipe_name}` is the value set for `WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER`
33488 ///
33489 /// To enable debugging of the targets identified by the JSON, you must set the
33490 ///  `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS` environment variable to send
33491 /// `--remote-debugging-port={port_num}`, where the following is true.
33492 ///
33493 /// *   `{port_num}` is the port on which the CDP server binds.
33494 ///
33495 /// \> [!WARNING]\n\> If you set both `WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER` and
33496 /// `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS` environment variables, the
33497 /// WebViews hosted in your app and associated contents may exposed to 3rd
33498 /// party apps such as debuggers.
33499 ///
33500 /// \> [!NOTE]\n\> The following environment variable does not have a registry key
33501 /// equivalent: `WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER`.
33502 ///
33503 /// If none of those environment variables exist, then the registry is examined
33504 /// next.  The following registry values are verified.
33505 ///
33506 /// ```text
33507 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder
33508 /// "{AppId}"=""
33509 ///
33510 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannelPreference
33511 /// "{AppId}"=""
33512 ///
33513 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\AdditionalBrowserArguments
33514 /// "{AppId}"=""
33515 ///
33516 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\UserDataFolder
33517 /// "{AppId}"=""
33518 /// ```
33519 ///
33520 /// Use a group policy under **Administrative Templates** >
33521 /// **Microsoft Edge WebView2** to configure `browserExecutableFolder` and
33522 /// `releaseChannelPreference`.
33523 ///
33524 /// In the unlikely scenario where some instances of WebView are open during a
33525 /// browser update, the deletion of the previous WebView2 Runtime may be
33526 /// blocked.  To avoid running out of disk space, a new WebView creation fails
33527 /// with `HRESULT_FROM_WIN32(ERROR_DISK_FULL)` if it detects that too many
33528 /// previous WebView2 Runtime versions exist.
33529 ///
33530 /// The default maximum number of WebView2 Runtime versions allowed is `20`.
33531 /// To override the maximum number of the previous WebView2 Runtime versions
33532 /// allowed, set the value of the following environment variable.
33533 ///
33534 /// ```text
33535 /// COREWEBVIEW2_MAX_INSTANCES
33536 /// ```
33537 ///
33538 /// If the Webview depends upon an installed WebView2 Runtime version and it is
33539 /// uninstalled, any subsequent creation fails with
33540 /// `HRESULT_FROM_WIN32(ERROR_PRODUCT_UNINSTALLED)`.
33541 ///
33542 /// First verify with Root as `HKLM` and then `HKCU`.  `AppId` is first set to
33543 /// the Application User Model ID of the process, then if no corresponding
33544 /// registry key, the `AppId` is set to the compiled code name of the process,
33545 /// or if that is not a registry key then `*`.  If an override registry key is
33546 /// found, use the `browserExecutableFolder` and `userDataFolder` registry
33547 /// values as replacements and append `additionalBrowserArguments` registry
33548 /// values for the corresponding values in
33549 /// `CreateCoreWebView2EnvironmentWithOptions` parameters.
33550 ///
33551 /// The following summarizes the possible error values that can be returned from
33552 /// `CreateCoreWebView2EnvironmentWithOptions` and a description of why these
33553 /// errors occur.
33554 ///
33555 /// Error value                                     | Description
33556 /// ----------------------------------------------- | --------------------------
33557 /// `CO_E_NOTINITIALIZED`                           | CoInitializeEx was not called.
33558 /// `RPC_E_CHANGED_MODE`                            | CoInitializeEx was previously called with COINIT_MULTITHREADED.
33559 /// `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)`       | *\\Edge\\Application* path used in browserExecutableFolder.
33560 /// `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.
33561 /// `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.
33562 /// `HRESULT_FROM_WIN32(ERROR_PRODUCT_UNINSTALLED)` | If the Webview depends upon an installed WebView2 Runtime version and it is uninstalled.
33563 /// `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)`      | Could not find Edge installation.
33564 /// `HRESULT_FROM_WIN32(ERROR_FILE_EXISTS)`         | User data folder cannot be created because a file with the same name already exists.
33565 /// `E_ACCESSDENIED`                                | Unable to create user data folder, Access Denied.
33566 /// `E_FAIL`                                        | Edge runtime unable to start.
33567 
33568 extern(Windows) HRESULT CreateCoreWebView2EnvironmentWithOptions(PCWSTR browserExecutableFolder, PCWSTR userDataFolder, ICoreWebView2EnvironmentOptions environmentOptions, ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environmentCreatedHandler);
33569 
33570 /// Creates an evergreen WebView2 Environment using the installed WebView2
33571 /// Runtime version.  This is equivalent to running
33572 /// `CreateCoreWebView2EnvironmentWithOptions` with `nullptr` for
33573 /// `browserExecutableFolder`, `userDataFolder`, `additionalBrowserArguments`.
33574 /// For more information, navigate to
33575 /// `CreateCoreWebView2EnvironmentWithOptions`.
33576 
33577 extern(Windows) HRESULT CreateCoreWebView2Environment(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environmentCreatedHandler);
33578 
33579 /// Get the browser version info including channel name if it is not the
33580 /// WebView2 Runtime.  Channel names are Beta, Dev, and Canary.
33581 /// If an override exists for the `browserExecutableFolder` or the channel
33582 /// preference, the override is used.  If an override is not specified, then
33583 /// the parameter value passed to
33584 /// `GetAvailableCoreWebView2BrowserVersionString` is used.
33585 /// Returns `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)` if it fails to find an
33586 /// installed WebView2 runtime or non-stable Microsoft Edge installation.
33587 ///
33588 /// The caller must free the returned string with `CoTaskMemFree`.  See
33589 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
33590 
33591 extern(Windows) HRESULT GetAvailableCoreWebView2BrowserVersionString(PCWSTR browserExecutableFolder, LPWSTR* versionInfo);
33592 
33593 /// This method is for anyone want to compare version correctly to determine
33594 /// which version is newer, older or same.  Use it to determine whether
33595 /// to use webview2 or certain feature based upon version.  Sets the value of
33596 /// result to `-1`, `0` or `1` if `version1` is less than, equal or greater
33597 /// than `version2` respectively.  Returns `E_INVALIDARG` if it fails to parse
33598 /// any of the version strings or any input parameter is `null`.  Directly use
33599 /// the `versionInfo` obtained from
33600 /// `GetAvailableCoreWebView2BrowserVersionString` with input, channel
33601 /// information is ignored.
33602 
33603 extern(Windows) HRESULT CompareBrowserVersions(PCWSTR version1, PCWSTR version2, int* result);
33604 
33605 }
33606 }
33607 }