1pub type __uint16_t = ::std::os::raw::c_ushort;
4pub type __uint_least16_t = __uint16_t;
5pub type __time_t = ::std::os::raw::c_long;
6pub type wchar_t = ::std::os::raw::c_int;
7pub type char16_t = __uint_least16_t;
8#[doc = "\n CEF string type definitions. Whomever allocates |str| is responsible for\n providing an appropriate |dtor| implementation that will free the string in\n the same memory space. When reusing an existing string structure make sure\n to call |dtor| for the old value before assigning new |str| and |dtor|\n values. Static strings will have a NULL |dtor| value. Using the below\n functions if you want this managed for you.\n"]
9#[repr(C)]
10#[derive(Debug, Copy, Clone)]
11pub struct _cef_string_wide_t {
12 pub str_: *mut wchar_t,
13 pub length: usize,
14 pub dtor: ::std::option::Option<unsafe extern "C" fn(str_: *mut wchar_t)>,
15}
16#[test]
17fn bindgen_test_layout__cef_string_wide_t() {
18 const UNINIT: ::std::mem::MaybeUninit<_cef_string_wide_t> = ::std::mem::MaybeUninit::uninit();
19 let ptr = UNINIT.as_ptr();
20 assert_eq!(
21 ::std::mem::size_of::<_cef_string_wide_t>(),
22 24usize,
23 concat!("Size of: ", stringify!(_cef_string_wide_t))
24 );
25 assert_eq!(
26 ::std::mem::align_of::<_cef_string_wide_t>(),
27 8usize,
28 concat!("Alignment of ", stringify!(_cef_string_wide_t))
29 );
30 assert_eq!(
31 unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize },
32 0usize,
33 concat!(
34 "Offset of field: ",
35 stringify!(_cef_string_wide_t),
36 "::",
37 stringify!(str_)
38 )
39 );
40 assert_eq!(
41 unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize },
42 8usize,
43 concat!(
44 "Offset of field: ",
45 stringify!(_cef_string_wide_t),
46 "::",
47 stringify!(length)
48 )
49 );
50 assert_eq!(
51 unsafe { ::std::ptr::addr_of!((*ptr).dtor) as usize - ptr as usize },
52 16usize,
53 concat!(
54 "Offset of field: ",
55 stringify!(_cef_string_wide_t),
56 "::",
57 stringify!(dtor)
58 )
59 );
60}
61#[doc = "\n CEF string type definitions. Whomever allocates |str| is responsible for\n providing an appropriate |dtor| implementation that will free the string in\n the same memory space. When reusing an existing string structure make sure\n to call |dtor| for the old value before assigning new |str| and |dtor|\n values. Static strings will have a NULL |dtor| value. Using the below\n functions if you want this managed for you.\n"]
62pub type cef_string_wide_t = _cef_string_wide_t;
63#[repr(C)]
64#[derive(Debug, Copy, Clone)]
65pub struct _cef_string_utf8_t {
66 pub str_: *mut ::std::os::raw::c_char,
67 pub length: usize,
68 pub dtor: ::std::option::Option<unsafe extern "C" fn(str_: *mut ::std::os::raw::c_char)>,
69}
70#[test]
71fn bindgen_test_layout__cef_string_utf8_t() {
72 const UNINIT: ::std::mem::MaybeUninit<_cef_string_utf8_t> = ::std::mem::MaybeUninit::uninit();
73 let ptr = UNINIT.as_ptr();
74 assert_eq!(
75 ::std::mem::size_of::<_cef_string_utf8_t>(),
76 24usize,
77 concat!("Size of: ", stringify!(_cef_string_utf8_t))
78 );
79 assert_eq!(
80 ::std::mem::align_of::<_cef_string_utf8_t>(),
81 8usize,
82 concat!("Alignment of ", stringify!(_cef_string_utf8_t))
83 );
84 assert_eq!(
85 unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize },
86 0usize,
87 concat!(
88 "Offset of field: ",
89 stringify!(_cef_string_utf8_t),
90 "::",
91 stringify!(str_)
92 )
93 );
94 assert_eq!(
95 unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize },
96 8usize,
97 concat!(
98 "Offset of field: ",
99 stringify!(_cef_string_utf8_t),
100 "::",
101 stringify!(length)
102 )
103 );
104 assert_eq!(
105 unsafe { ::std::ptr::addr_of!((*ptr).dtor) as usize - ptr as usize },
106 16usize,
107 concat!(
108 "Offset of field: ",
109 stringify!(_cef_string_utf8_t),
110 "::",
111 stringify!(dtor)
112 )
113 );
114}
115pub type cef_string_utf8_t = _cef_string_utf8_t;
116#[repr(C)]
117#[derive(Debug, Copy, Clone)]
118pub struct _cef_string_utf16_t {
119 pub str_: *mut char16_t,
120 pub length: usize,
121 pub dtor: ::std::option::Option<unsafe extern "C" fn(str_: *mut char16_t)>,
122}
123#[test]
124fn bindgen_test_layout__cef_string_utf16_t() {
125 const UNINIT: ::std::mem::MaybeUninit<_cef_string_utf16_t> = ::std::mem::MaybeUninit::uninit();
126 let ptr = UNINIT.as_ptr();
127 assert_eq!(
128 ::std::mem::size_of::<_cef_string_utf16_t>(),
129 24usize,
130 concat!("Size of: ", stringify!(_cef_string_utf16_t))
131 );
132 assert_eq!(
133 ::std::mem::align_of::<_cef_string_utf16_t>(),
134 8usize,
135 concat!("Alignment of ", stringify!(_cef_string_utf16_t))
136 );
137 assert_eq!(
138 unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize },
139 0usize,
140 concat!(
141 "Offset of field: ",
142 stringify!(_cef_string_utf16_t),
143 "::",
144 stringify!(str_)
145 )
146 );
147 assert_eq!(
148 unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize },
149 8usize,
150 concat!(
151 "Offset of field: ",
152 stringify!(_cef_string_utf16_t),
153 "::",
154 stringify!(length)
155 )
156 );
157 assert_eq!(
158 unsafe { ::std::ptr::addr_of!((*ptr).dtor) as usize - ptr as usize },
159 16usize,
160 concat!(
161 "Offset of field: ",
162 stringify!(_cef_string_utf16_t),
163 "::",
164 stringify!(dtor)
165 )
166 );
167}
168pub type cef_string_utf16_t = _cef_string_utf16_t;
169extern "C" {
170 #[doc = "\n These functions set string values. If |copy| is true (1) the value will be\n copied instead of referenced. It is up to the user to properly manage\n the lifespan of references.\n"]
171 pub fn cef_string_wide_set(
172 src: *const wchar_t,
173 src_len: usize,
174 output: *mut cef_string_wide_t,
175 copy: ::std::os::raw::c_int,
176 ) -> ::std::os::raw::c_int;
177}
178extern "C" {
179 pub fn cef_string_utf8_set(
180 src: *const ::std::os::raw::c_char,
181 src_len: usize,
182 output: *mut cef_string_utf8_t,
183 copy: ::std::os::raw::c_int,
184 ) -> ::std::os::raw::c_int;
185}
186extern "C" {
187 pub fn cef_string_utf16_set(
188 src: *const char16_t,
189 src_len: usize,
190 output: *mut cef_string_utf16_t,
191 copy: ::std::os::raw::c_int,
192 ) -> ::std::os::raw::c_int;
193}
194extern "C" {
195 #[doc = "\n These functions clear string values. The structure itself is not freed.\n"]
196 pub fn cef_string_wide_clear(str_: *mut cef_string_wide_t);
197}
198extern "C" {
199 pub fn cef_string_utf8_clear(str_: *mut cef_string_utf8_t);
200}
201extern "C" {
202 pub fn cef_string_utf16_clear(str_: *mut cef_string_utf16_t);
203}
204extern "C" {
205 #[doc = "\n These functions compare two string values with the same results as strcmp().\n"]
206 pub fn cef_string_wide_cmp(
207 str1: *const cef_string_wide_t,
208 str2: *const cef_string_wide_t,
209 ) -> ::std::os::raw::c_int;
210}
211extern "C" {
212 pub fn cef_string_utf8_cmp(
213 str1: *const cef_string_utf8_t,
214 str2: *const cef_string_utf8_t,
215 ) -> ::std::os::raw::c_int;
216}
217extern "C" {
218 pub fn cef_string_utf16_cmp(
219 str1: *const cef_string_utf16_t,
220 str2: *const cef_string_utf16_t,
221 ) -> ::std::os::raw::c_int;
222}
223extern "C" {
224 #[doc = "\n These functions convert between UTF-8, -16, and -32 strings. They are\n potentially slow so unnecessary conversions should be avoided. The best\n possible result will always be written to |output| with the boolean return\n value indicating whether the conversion is 100% valid.\n"]
225 pub fn cef_string_wide_to_utf8(
226 src: *const wchar_t,
227 src_len: usize,
228 output: *mut cef_string_utf8_t,
229 ) -> ::std::os::raw::c_int;
230}
231extern "C" {
232 pub fn cef_string_utf8_to_wide(
233 src: *const ::std::os::raw::c_char,
234 src_len: usize,
235 output: *mut cef_string_wide_t,
236 ) -> ::std::os::raw::c_int;
237}
238extern "C" {
239 pub fn cef_string_wide_to_utf16(
240 src: *const wchar_t,
241 src_len: usize,
242 output: *mut cef_string_utf16_t,
243 ) -> ::std::os::raw::c_int;
244}
245extern "C" {
246 pub fn cef_string_utf16_to_wide(
247 src: *const char16_t,
248 src_len: usize,
249 output: *mut cef_string_wide_t,
250 ) -> ::std::os::raw::c_int;
251}
252extern "C" {
253 pub fn cef_string_utf8_to_utf16(
254 src: *const ::std::os::raw::c_char,
255 src_len: usize,
256 output: *mut cef_string_utf16_t,
257 ) -> ::std::os::raw::c_int;
258}
259extern "C" {
260 pub fn cef_string_utf16_to_utf8(
261 src: *const char16_t,
262 src_len: usize,
263 output: *mut cef_string_utf8_t,
264 ) -> ::std::os::raw::c_int;
265}
266extern "C" {
267 #[doc = "\n These functions convert an ASCII string, typically a hardcoded constant, to\n a Wide/UTF16 string. Use instead of the UTF8 conversion routines if you know\n the string is ASCII.\n"]
268 pub fn cef_string_ascii_to_wide(
269 src: *const ::std::os::raw::c_char,
270 src_len: usize,
271 output: *mut cef_string_wide_t,
272 ) -> ::std::os::raw::c_int;
273}
274extern "C" {
275 pub fn cef_string_ascii_to_utf16(
276 src: *const ::std::os::raw::c_char,
277 src_len: usize,
278 output: *mut cef_string_utf16_t,
279 ) -> ::std::os::raw::c_int;
280}
281#[doc = "\n It is sometimes necessary for the system to allocate string structures with\n the expectation that the user will free them. The userfree types act as a\n hint that the user is responsible for freeing the structure.\n"]
282pub type cef_string_userfree_wide_t = *mut cef_string_wide_t;
283pub type cef_string_userfree_utf8_t = *mut cef_string_utf8_t;
284pub type cef_string_userfree_utf16_t = *mut cef_string_utf16_t;
285extern "C" {
286 #[doc = "\n These functions allocate a new string structure. They must be freed by\n calling the associated free function.\n"]
287 pub fn cef_string_userfree_wide_alloc() -> cef_string_userfree_wide_t;
288}
289extern "C" {
290 pub fn cef_string_userfree_utf8_alloc() -> cef_string_userfree_utf8_t;
291}
292extern "C" {
293 pub fn cef_string_userfree_utf16_alloc() -> cef_string_userfree_utf16_t;
294}
295extern "C" {
296 #[doc = "\n These functions free the string structure allocated by the associated\n alloc function. Any string contents will first be cleared.\n"]
297 pub fn cef_string_userfree_wide_free(str_: cef_string_userfree_wide_t);
298}
299extern "C" {
300 pub fn cef_string_userfree_utf8_free(str_: cef_string_userfree_utf8_t);
301}
302extern "C" {
303 pub fn cef_string_userfree_utf16_free(str_: cef_string_userfree_utf16_t);
304}
305extern "C" {
306 #[doc = "\n These functions convert utf16 string case using the current ICU locale. This\n may change the length of the string in some cases.\n"]
307 pub fn cef_string_utf16_to_lower(
308 src: *const char16_t,
309 src_len: usize,
310 output: *mut cef_string_utf16_t,
311 ) -> ::std::os::raw::c_int;
312}
313extern "C" {
314 pub fn cef_string_utf16_to_upper(
315 src: *const char16_t,
316 src_len: usize,
317 output: *mut cef_string_utf16_t,
318 ) -> ::std::os::raw::c_int;
319}
320pub type cef_char_t = char16_t;
321pub type cef_string_userfree_t = cef_string_userfree_utf16_t;
322pub type cef_string_t = cef_string_utf16_t;
323#[repr(C)]
324#[derive(Debug, Copy, Clone)]
325pub struct _cef_string_list_t {
326 _unused: [u8; 0],
327}
328#[doc = "\n CEF string maps are a set of key/value string pairs.\n"]
329pub type cef_string_list_t = *mut _cef_string_list_t;
330extern "C" {
331 #[doc = "\n Allocate a new string map.\n"]
332 pub fn cef_string_list_alloc() -> cef_string_list_t;
333}
334extern "C" {
335 #[doc = "\n Return the number of elements in the string list.\n"]
336 pub fn cef_string_list_size(list: cef_string_list_t) -> usize;
337}
338extern "C" {
339 #[doc = "\n Retrieve the value at the specified zero-based string list index. Returns\n true (1) if the value was successfully retrieved.\n"]
340 pub fn cef_string_list_value(
341 list: cef_string_list_t,
342 index: usize,
343 value: *mut cef_string_t,
344 ) -> ::std::os::raw::c_int;
345}
346extern "C" {
347 #[doc = "\n Append a new value at the end of the string list.\n"]
348 pub fn cef_string_list_append(list: cef_string_list_t, value: *const cef_string_t);
349}
350extern "C" {
351 #[doc = "\n Clear the string list.\n"]
352 pub fn cef_string_list_clear(list: cef_string_list_t);
353}
354extern "C" {
355 #[doc = "\n Free the string list.\n"]
356 pub fn cef_string_list_free(list: cef_string_list_t);
357}
358extern "C" {
359 #[doc = "\n Creates a copy of an existing string list.\n"]
360 pub fn cef_string_list_copy(list: cef_string_list_t) -> cef_string_list_t;
361}
362#[repr(C)]
363#[derive(Debug, Copy, Clone)]
364pub struct _cef_string_map_t {
365 _unused: [u8; 0],
366}
367#[doc = "\n CEF string maps are a set of key/value string pairs.\n"]
368pub type cef_string_map_t = *mut _cef_string_map_t;
369extern "C" {
370 #[doc = "\n Allocate a new string map.\n"]
371 pub fn cef_string_map_alloc() -> cef_string_map_t;
372}
373extern "C" {
374 #[doc = "\n Return the number of elements in the string map.\n"]
375 pub fn cef_string_map_size(map: cef_string_map_t) -> usize;
376}
377extern "C" {
378 #[doc = "\n Return the value assigned to the specified key.\n"]
379 pub fn cef_string_map_find(
380 map: cef_string_map_t,
381 key: *const cef_string_t,
382 value: *mut cef_string_t,
383 ) -> ::std::os::raw::c_int;
384}
385extern "C" {
386 #[doc = "\n Return the key at the specified zero-based string map index.\n"]
387 pub fn cef_string_map_key(
388 map: cef_string_map_t,
389 index: usize,
390 key: *mut cef_string_t,
391 ) -> ::std::os::raw::c_int;
392}
393extern "C" {
394 #[doc = "\n Return the value at the specified zero-based string map index.\n"]
395 pub fn cef_string_map_value(
396 map: cef_string_map_t,
397 index: usize,
398 value: *mut cef_string_t,
399 ) -> ::std::os::raw::c_int;
400}
401extern "C" {
402 #[doc = "\n Append a new key/value pair at the end of the string map. If the key exists,\n overwrite the existing value with a new value w/o changing the pair order.\n"]
403 pub fn cef_string_map_append(
404 map: cef_string_map_t,
405 key: *const cef_string_t,
406 value: *const cef_string_t,
407 ) -> ::std::os::raw::c_int;
408}
409extern "C" {
410 #[doc = "\n Clear the string map.\n"]
411 pub fn cef_string_map_clear(map: cef_string_map_t);
412}
413extern "C" {
414 #[doc = "\n Free the string map.\n"]
415 pub fn cef_string_map_free(map: cef_string_map_t);
416}
417#[repr(C)]
418#[derive(Debug, Copy, Clone)]
419pub struct _cef_string_multimap_t {
420 _unused: [u8; 0],
421}
422#[doc = "\n CEF string multimaps are a set of key/value string pairs.\n More than one value can be assigned to a single key.\n"]
423pub type cef_string_multimap_t = *mut _cef_string_multimap_t;
424extern "C" {
425 #[doc = "\n Allocate a new string multimap.\n"]
426 pub fn cef_string_multimap_alloc() -> cef_string_multimap_t;
427}
428extern "C" {
429 #[doc = "\n Return the number of elements in the string multimap.\n"]
430 pub fn cef_string_multimap_size(map: cef_string_multimap_t) -> usize;
431}
432extern "C" {
433 #[doc = "\n Return the number of values with the specified key.\n"]
434 pub fn cef_string_multimap_find_count(
435 map: cef_string_multimap_t,
436 key: *const cef_string_t,
437 ) -> usize;
438}
439extern "C" {
440 #[doc = "\n Return the value_index-th value with the specified key.\n"]
441 pub fn cef_string_multimap_enumerate(
442 map: cef_string_multimap_t,
443 key: *const cef_string_t,
444 value_index: usize,
445 value: *mut cef_string_t,
446 ) -> ::std::os::raw::c_int;
447}
448extern "C" {
449 #[doc = "\n Return the key at the specified zero-based string multimap index.\n"]
450 pub fn cef_string_multimap_key(
451 map: cef_string_multimap_t,
452 index: usize,
453 key: *mut cef_string_t,
454 ) -> ::std::os::raw::c_int;
455}
456extern "C" {
457 #[doc = "\n Return the value at the specified zero-based string multimap index.\n"]
458 pub fn cef_string_multimap_value(
459 map: cef_string_multimap_t,
460 index: usize,
461 value: *mut cef_string_t,
462 ) -> ::std::os::raw::c_int;
463}
464extern "C" {
465 #[doc = "\n Append a new key/value pair at the end of the string multimap.\n"]
466 pub fn cef_string_multimap_append(
467 map: cef_string_multimap_t,
468 key: *const cef_string_t,
469 value: *const cef_string_t,
470 ) -> ::std::os::raw::c_int;
471}
472extern "C" {
473 #[doc = "\n Clear the string multimap.\n"]
474 pub fn cef_string_multimap_clear(map: cef_string_multimap_t);
475}
476extern "C" {
477 #[doc = "\n Free the string multimap.\n"]
478 pub fn cef_string_multimap_free(map: cef_string_multimap_t);
479}
480pub type time_t = __time_t;
481#[doc = "\n Represents a wall clock time in UTC. Values are not guaranteed to be\n monotonically non-decreasing and are subject to large amounts of skew.\n Time is stored internally as microseconds since the Windows epoch (1601).\n\n This is equivalent of Chromium `base::Time` (see base/time/time.h).\n"]
482#[repr(C)]
483#[derive(Debug, Copy, Clone)]
484pub struct _cef_basetime_t {
485 pub val: i64,
486}
487#[test]
488fn bindgen_test_layout__cef_basetime_t() {
489 const UNINIT: ::std::mem::MaybeUninit<_cef_basetime_t> = ::std::mem::MaybeUninit::uninit();
490 let ptr = UNINIT.as_ptr();
491 assert_eq!(
492 ::std::mem::size_of::<_cef_basetime_t>(),
493 8usize,
494 concat!("Size of: ", stringify!(_cef_basetime_t))
495 );
496 assert_eq!(
497 ::std::mem::align_of::<_cef_basetime_t>(),
498 8usize,
499 concat!("Alignment of ", stringify!(_cef_basetime_t))
500 );
501 assert_eq!(
502 unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize },
503 0usize,
504 concat!(
505 "Offset of field: ",
506 stringify!(_cef_basetime_t),
507 "::",
508 stringify!(val)
509 )
510 );
511}
512#[doc = "\n Represents a wall clock time in UTC. Values are not guaranteed to be\n monotonically non-decreasing and are subject to large amounts of skew.\n Time is stored internally as microseconds since the Windows epoch (1601).\n\n This is equivalent of Chromium `base::Time` (see base/time/time.h).\n"]
513pub type cef_basetime_t = _cef_basetime_t;
514#[doc = "\n Time information. Values should always be in UTC.\n"]
515#[repr(C)]
516#[derive(Debug, Copy, Clone)]
517pub struct _cef_time_t {
518 #[doc = "\n Four or five digit year \"2007\" (1601 to 30827 on Windows, 1970 to 2038 on\n 32-bit POSIX)\n"]
519 pub year: ::std::os::raw::c_int,
520 #[doc = "\n 1-based month (values 1 = January, etc.)\n"]
521 pub month: ::std::os::raw::c_int,
522 #[doc = "\n 0-based day of week (0 = Sunday, etc.)\n"]
523 pub day_of_week: ::std::os::raw::c_int,
524 #[doc = "\n 1-based day of month (1-31)\n"]
525 pub day_of_month: ::std::os::raw::c_int,
526 #[doc = "\n Hour within the current day (0-23)\n"]
527 pub hour: ::std::os::raw::c_int,
528 #[doc = "\n Minute within the current hour (0-59)\n"]
529 pub minute: ::std::os::raw::c_int,
530 #[doc = "\n Second within the current minute (0-59 plus leap seconds which may take\n it up to 60).\n"]
531 pub second: ::std::os::raw::c_int,
532 #[doc = "\n Milliseconds within the current second (0-999)\n"]
533 pub millisecond: ::std::os::raw::c_int,
534}
535#[test]
536fn bindgen_test_layout__cef_time_t() {
537 const UNINIT: ::std::mem::MaybeUninit<_cef_time_t> = ::std::mem::MaybeUninit::uninit();
538 let ptr = UNINIT.as_ptr();
539 assert_eq!(
540 ::std::mem::size_of::<_cef_time_t>(),
541 32usize,
542 concat!("Size of: ", stringify!(_cef_time_t))
543 );
544 assert_eq!(
545 ::std::mem::align_of::<_cef_time_t>(),
546 4usize,
547 concat!("Alignment of ", stringify!(_cef_time_t))
548 );
549 assert_eq!(
550 unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize },
551 0usize,
552 concat!(
553 "Offset of field: ",
554 stringify!(_cef_time_t),
555 "::",
556 stringify!(year)
557 )
558 );
559 assert_eq!(
560 unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize },
561 4usize,
562 concat!(
563 "Offset of field: ",
564 stringify!(_cef_time_t),
565 "::",
566 stringify!(month)
567 )
568 );
569 assert_eq!(
570 unsafe { ::std::ptr::addr_of!((*ptr).day_of_week) as usize - ptr as usize },
571 8usize,
572 concat!(
573 "Offset of field: ",
574 stringify!(_cef_time_t),
575 "::",
576 stringify!(day_of_week)
577 )
578 );
579 assert_eq!(
580 unsafe { ::std::ptr::addr_of!((*ptr).day_of_month) as usize - ptr as usize },
581 12usize,
582 concat!(
583 "Offset of field: ",
584 stringify!(_cef_time_t),
585 "::",
586 stringify!(day_of_month)
587 )
588 );
589 assert_eq!(
590 unsafe { ::std::ptr::addr_of!((*ptr).hour) as usize - ptr as usize },
591 16usize,
592 concat!(
593 "Offset of field: ",
594 stringify!(_cef_time_t),
595 "::",
596 stringify!(hour)
597 )
598 );
599 assert_eq!(
600 unsafe { ::std::ptr::addr_of!((*ptr).minute) as usize - ptr as usize },
601 20usize,
602 concat!(
603 "Offset of field: ",
604 stringify!(_cef_time_t),
605 "::",
606 stringify!(minute)
607 )
608 );
609 assert_eq!(
610 unsafe { ::std::ptr::addr_of!((*ptr).second) as usize - ptr as usize },
611 24usize,
612 concat!(
613 "Offset of field: ",
614 stringify!(_cef_time_t),
615 "::",
616 stringify!(second)
617 )
618 );
619 assert_eq!(
620 unsafe { ::std::ptr::addr_of!((*ptr).millisecond) as usize - ptr as usize },
621 28usize,
622 concat!(
623 "Offset of field: ",
624 stringify!(_cef_time_t),
625 "::",
626 stringify!(millisecond)
627 )
628 );
629}
630#[doc = "\n Time information. Values should always be in UTC.\n"]
631pub type cef_time_t = _cef_time_t;
632extern "C" {
633 #[doc = "\n Converts cef_time_t to/from time_t. Returns true (1) on success and false\n (0) on failure.\n"]
634 pub fn cef_time_to_timet(
635 cef_time: *const cef_time_t,
636 time: *mut time_t,
637 ) -> ::std::os::raw::c_int;
638}
639extern "C" {
640 pub fn cef_time_from_timet(time: time_t, cef_time: *mut cef_time_t) -> ::std::os::raw::c_int;
641}
642extern "C" {
643 #[doc = "\n Converts cef_time_t to/from a double which is the number of seconds since\n epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0\n means \"not initialized\". Returns true (1) on success and false (0) on\n failure.\n"]
644 pub fn cef_time_to_doublet(
645 cef_time: *const cef_time_t,
646 time: *mut f64,
647 ) -> ::std::os::raw::c_int;
648}
649extern "C" {
650 pub fn cef_time_from_doublet(time: f64, cef_time: *mut cef_time_t) -> ::std::os::raw::c_int;
651}
652extern "C" {
653 #[doc = "\n Retrieve the current system time. Returns true (1) on success and false (0)\n on failure.\n"]
654 pub fn cef_time_now(cef_time: *mut cef_time_t) -> ::std::os::raw::c_int;
655}
656extern "C" {
657 #[doc = "\n Retrieve the current system time.\n"]
658 pub fn cef_basetime_now() -> cef_basetime_t;
659}
660extern "C" {
661 #[doc = "\n Retrieve the delta in milliseconds between two time values. Returns true (1)\n on success and false (0) on failure."]
662 pub fn cef_time_delta(
663 cef_time1: *const cef_time_t,
664 cef_time2: *const cef_time_t,
665 delta: *mut ::std::os::raw::c_longlong,
666 ) -> ::std::os::raw::c_int;
667}
668extern "C" {
669 #[doc = "\n Converts cef_time_t to cef_basetime_t. Returns true (1) on success and\n false (0) on failure.\n"]
670 pub fn cef_time_to_basetime(
671 from: *const cef_time_t,
672 to: *mut cef_basetime_t,
673 ) -> ::std::os::raw::c_int;
674}
675extern "C" {
676 #[doc = "\n Converts cef_basetime_t to cef_time_t. Returns true (1) on success and\n false (0) on failure.\n"]
677 pub fn cef_time_from_basetime(
678 from: cef_basetime_t,
679 to: *mut cef_time_t,
680 ) -> ::std::os::raw::c_int;
681}
682#[repr(u32)]
683#[non_exhaustive]
684#[doc = "\n Supported content setting types. Some types are platform-specific or only\n supported with the Chrome runtime. Should be kept in sync with Chromium's\n ContentSettingsType type.\n"]
685#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
686pub enum cef_content_setting_types_t {
687 CEF_CONTENT_SETTING_TYPE_COOKIES = 0,
688 CEF_CONTENT_SETTING_TYPE_IMAGES = 1,
689 CEF_CONTENT_SETTING_TYPE_JAVASCRIPT = 2,
690 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
691 CEF_CONTENT_SETTING_TYPE_POPUPS = 3,
692 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
693 CEF_CONTENT_SETTING_TYPE_GEOLOCATION = 4,
694 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
695 CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS = 5,
696 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
697 CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE = 6,
698 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
699 CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT = 7,
700 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
701 CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC = 8,
702 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
703 CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA = 9,
704 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
705 CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS = 10,
706 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
707 CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER = 11,
708 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
709 CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS = 12,
710 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
711 CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX = 13,
712 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
713 CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS = 14,
714 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
715 CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER = 15,
716 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
717 CEF_CONTENT_SETTING_TYPE_APP_BANNER = 16,
718 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
719 CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT = 17,
720 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
721 CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE = 18,
722 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
723 CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA = 19,
724 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
725 CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD = 20,
726 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
727 CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC = 21,
728 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
729 CEF_CONTENT_SETTING_TYPE_AUTOPLAY = 22,
730 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
731 CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO = 23,
732 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
733 CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA = 24,
734 #[doc = " This setting governs both popups and unwanted redirects like tab-unders\n and framebusting."]
735 CEF_CONTENT_SETTING_TYPE_ADS = 25,
736 #[doc = " Website setting which stores metadata for the subresource filter to aid in\n decisions for whether or not to show the UI."]
737 CEF_CONTENT_SETTING_TYPE_ADS_DATA = 26,
738 #[doc = " This is special-cased in the permissions layer to always allow, and as\n such doesn't have associated prefs data."]
739 CEF_CONTENT_SETTING_TYPE_MIDI = 27,
740 #[doc = " This content setting type is for caching password protection service's\n verdicts of each origin."]
741 CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION = 28,
742 #[doc = " Website setting which stores engagement data for media related to a\n specific origin."]
743 CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT = 29,
744 #[doc = " Content setting which stores whether or not the site can play audible\n sound. This will not block playback but instead the user will not hear it."]
745 CEF_CONTENT_SETTING_TYPE_SOUND = 30,
746 #[doc = " Website setting which stores the list of client hints that the origin\n requested the browser to remember. The browser is expected to send all\n client hints in the HTTP request headers for every resource requested\n from that origin."]
747 CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS = 31,
748 #[doc = " Generic Sensor API covering ambient-light-sensor, accelerometer, gyroscope\n and magnetometer are all mapped to a single content_settings_type.\n Setting for the Generic Sensor API covering ambient-light-sensor,\n accelerometer, gyroscope and magnetometer. These are all mapped to a\n single ContentSettingsType."]
749 CEF_CONTENT_SETTING_TYPE_SENSORS = 32,
750 #[doc = " Content setting which stores whether or not the user has granted the site\n permission to respond to accessibility events, which can be used to\n provide a custom accessibility experience. Requires explicit user consent\n because some users may not want sites to know they're using assistive\n technology."]
751 CEF_CONTENT_SETTING_TYPE_ACCESSIBILITY_EVENTS = 33,
752 #[doc = " Used to store whether to allow a website to install a payment handler."]
753 CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER = 34,
754 #[doc = " Content setting which stores whether to allow sites to ask for permission\n to access USB devices. If this is allowed specific device permissions are\n stored under USB_CHOOSER_DATA."]
755 CEF_CONTENT_SETTING_TYPE_USB_GUARD = 35,
756 #[doc = " Nothing is stored in this setting at present. Please refer to\n BackgroundFetchPermissionContext for details on how this permission\n is ascertained."]
757 CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH = 36,
758 #[doc = " Website setting which stores the amount of times the user has dismissed\n intent picker UI without explicitly choosing an option."]
759 CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY = 37,
760 #[doc = " Used to store whether to allow a website to detect user active/idle state."]
761 CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION = 38,
762 #[doc = " Setting for enabling auto-select of all screens for getDisplayMediaSet."]
763 CEF_CONTENT_SETTING_TYPE_GET_DISPLAY_MEDIA_SET_SELECT_ALL_SCREENS = 39,
764 #[doc = " Content settings for access to serial ports. The \"guard\" content setting\n stores whether to allow sites to ask for permission to access a port. The\n permissions granted to access particular ports are stored in the \"chooser\n data\" website setting."]
765 CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD = 40,
766 #[doc = " Content settings for access to serial ports. The \"guard\" content setting\n stores whether to allow sites to ask for permission to access a port. The\n permissions granted to access particular ports are stored in the \"chooser\n data\" website setting."]
767 CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA = 41,
768 #[doc = " Nothing is stored in this setting at present. Please refer to\n PeriodicBackgroundSyncPermissionContext for details on how this permission\n is ascertained.\n This content setting is not registered because it does not require access\n to any existing providers."]
769 CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC = 42,
770 #[doc = " Content setting which stores whether to allow sites to ask for permission\n to do Bluetooth scanning."]
771 CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING = 43,
772 #[doc = " Content settings for access to HID devices. The \"guard\" content setting\n stores whether to allow sites to ask for permission to access a device.\n The permissions granted to access particular devices are stored in the\n \"chooser data\" website setting."]
773 CEF_CONTENT_SETTING_TYPE_HID_GUARD = 44,
774 #[doc = " Content settings for access to HID devices. The \"guard\" content setting\n stores whether to allow sites to ask for permission to access a device.\n The permissions granted to access particular devices are stored in the\n \"chooser data\" website setting."]
775 CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA = 45,
776 #[doc = " Wake Lock API, which has two lock types: screen and system locks.\n Currently, screen locks do not need any additional permission, and system\n locks are always denied while the right UI is worked out."]
777 CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN = 46,
778 #[doc = " Wake Lock API, which has two lock types: screen and system locks.\n Currently, screen locks do not need any additional permission, and system\n locks are always denied while the right UI is worked out."]
779 CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM = 47,
780 #[doc = " Legacy SameSite cookie behavior. This disables SameSite=Lax-by-default,\n SameSite=None requires Secure, and Schemeful Same-Site, forcing the\n legacy behavior wherein 1) cookies that don't specify SameSite are treated\n as SameSite=None, 2) SameSite=None cookies are not required to be Secure,\n and 3) schemeful same-site is not active.\n\n This will also be used to revert to legacy behavior when future changes\n in cookie handling are introduced."]
781 CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS = 48,
782 #[doc = " Content settings which stores whether to allow sites to ask for permission\n to save changes to an original file selected by the user through the\n File System Access API."]
783 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD = 49,
784 #[doc = " Used to store whether to allow a website to exchange data with NFC\n devices."]
785 CEF_CONTENT_SETTING_TYPE_NFC = 50,
786 #[doc = " Website setting to store permissions granted to access particular\n Bluetooth devices."]
787 CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA = 51,
788 #[doc = " Full access to the system clipboard (sanitized read without user gesture,\n and unsanitized read and write with user gesture)."]
789 CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE = 52,
790 #[doc = " This is special-cased in the permissions layer to always allow, and as\n such doesn't have associated prefs data."]
791 CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE = 53,
792 #[doc = " This content setting type is for caching safe browsing real time url\n check's verdicts of each origin."]
793 CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA = 54,
794 #[doc = " Used to store whether a site is allowed to request AR or VR sessions with\n the WebXr Device API."]
795 CEF_CONTENT_SETTING_TYPE_VR = 55,
796 #[doc = " Used to store whether a site is allowed to request AR or VR sessions with\n the WebXr Device API."]
797 CEF_CONTENT_SETTING_TYPE_AR = 56,
798 #[doc = " Content setting which stores whether to allow site to open and read files\n and directories selected through the File System Access API."]
799 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD = 57,
800 #[doc = " Access to first party storage in a third-party context. Exceptions are\n scoped to the combination of requesting/top-level origin, and are managed\n through the Storage Access API. For the time being, this content setting\n exists in parallel to third-party cookie rules stored in COOKIES."]
801 CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS = 58,
802 #[doc = " Content setting which stores whether to allow a site to control camera\n movements. It does not give access to camera."]
803 CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM = 59,
804 #[doc = " Content setting for Screen Enumeration and Screen Detail functionality.\n Permits access to detailed multi-screen information, like size and\n position. Permits placing fullscreen and windowed content on specific\n screens. See also: https://w3c.github.io/window-placement"]
805 CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT = 60,
806 #[doc = " Stores whether to allow insecure websites to make local network requests.\n See also: https://wicg.github.io/local-network-access\n Set through enterprise policies only."]
807 CEF_CONTENT_SETTING_TYPE_INSECURE_LOCAL_NETWORK = 61,
808 #[doc = " Content setting which stores whether or not a site can access low-level\n locally installed font data using the Local Fonts Access API."]
809 CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS = 62,
810 #[doc = " Stores per-origin state for permission auto-revocation (for all permission\n types)."]
811 CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA = 63,
812 #[doc = " Stores per-origin state of the most recently selected directory for the\n use by the File System Access API."]
813 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY = 64,
814 #[doc = " Controls access to the getDisplayMedia API when {preferCurrentTab: true}\n is specified."]
815 CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE = 65,
816 #[doc = " Website setting to store permissions metadata granted to paths on the\n local file system via the File System Access API.\n |FILE_SYSTEM_WRITE_GUARD| is the corresponding \"guard\" setting."]
817 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA = 66,
818 #[doc = " Stores a grant that allows a relying party to send a request for identity\n information to specified identity providers, potentially through any\n anti-tracking measures that would otherwise prevent it. This setting is\n associated with the relying party's origin."]
819 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING = 67,
820 #[doc = " Whether to use the v8 optimized JIT for running JavaScript on the page."]
821 CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT = 68,
822 #[doc = " Content setting which stores user decisions to allow loading a site over\n HTTP. Entries are added by hostname when a user bypasses the HTTPS-First\n Mode interstitial warning when a site does not support HTTPS. Allowed\n hosts are exact hostname matches -- subdomains of a host on the allowlist\n must be separately allowlisted."]
823 CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED = 69,
824 #[doc = " Stores metadata related to form fill, such as e.g. whether user data was\n autofilled on a specific website."]
825 CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA = 70,
826 #[doc = " Setting to indicate that there is an active federated sign-in session\n between a specified relying party and a specified identity provider for\n a specified account. When this is present it allows access to session\n management capabilities between the sites. This setting is associated\n with the relying party's origin."]
827 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_ACTIVE_SESSION = 71,
828 #[doc = " Setting to indicate whether Chrome should automatically apply darkening to\n web content."]
829 CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT = 72,
830 #[doc = " Setting to indicate whether Chrome should request the desktop view of a\n site instead of the mobile one."]
831 CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE = 73,
832 #[doc = " Setting to indicate whether browser should allow signing into a website\n via the browser FedCM API."]
833 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API = 74,
834 #[doc = " Stores notification interactions per origin for the past 90 days.\n Interactions per origin are pre-aggregated over seven-day windows: A\n notification interaction or display is assigned to the last Monday\n midnight in local time."]
835 CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS = 75,
836 #[doc = " Website setting which stores the last reduced accept language negotiated\n for a given origin, to be used on future visits to the origin."]
837 CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE = 76,
838 #[doc = " Website setting which is used for NotificationPermissionReviewService to\n store origin blocklist from review notification permissions feature."]
839 CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW = 77,
840 #[doc = " Website setting to store permissions granted to access particular devices\n in private network."]
841 CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD = 78,
842 #[doc = " Website setting to store permissions granted to access particular devices\n in private network."]
843 CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA = 79,
844 #[doc = " Website setting which stores whether the browser has observed the user\n signing into an identity-provider based on observing the IdP-SignIn-Status\n HTTP header."]
845 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS = 80,
846 #[doc = " Website setting which is used for UnusedSitePermissionsService to\n store revoked permissions of unused sites from unused site permissions\n feature."]
847 CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS = 81,
848 #[doc = " Similar to STORAGE_ACCESS, but applicable at the page-level rather than\n being specific to a frame."]
849 CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS = 82,
850 #[doc = " Setting to indicate whether user has opted in to allowing auto re-authn\n via the FedCM API."]
851 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION = 83,
852 #[doc = " Website setting which stores whether the user has explicitly registered\n a website as an identity-provider."]
853 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION = 84,
854 #[doc = " Content setting which is used to indicate whether anti-abuse functionality\n should be enabled."]
855 CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE = 85,
856 #[doc = " Content setting used to indicate whether third-party storage partitioning\n should be enabled."]
857 CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING = 86,
858 #[doc = " Used to indicate whether HTTPS-First Mode is enabled on the hostname."]
859 CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED = 87,
860 #[doc = " Stores per origin metadata for cookie controls."]
861 CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA = 88,
862 #[doc = " Setting for supporting 3PCD."]
863 CEF_CONTENT_SETTING_TYPE_TPCD_SUPPORT = 89,
864 #[doc = " Setting for supporting 3PCD."]
865 CEF_CONTENT_SETTING_TYPE_NUM_TYPES = 90,
866}
867#[repr(u32)]
868#[non_exhaustive]
869#[doc = "\n Supported content setting values. Should be kept in sync with Chromium's\n ContentSetting type.\n"]
870#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
871pub enum cef_content_setting_values_t {
872 CEF_CONTENT_SETTING_VALUE_DEFAULT = 0,
873 CEF_CONTENT_SETTING_VALUE_ALLOW = 1,
874 CEF_CONTENT_SETTING_VALUE_BLOCK = 2,
875 CEF_CONTENT_SETTING_VALUE_ASK = 3,
876 CEF_CONTENT_SETTING_VALUE_SESSION_ONLY = 4,
877 CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT = 5,
878 CEF_CONTENT_SETTING_VALUE_NUM_VALUES = 6,
879}
880#[doc = "\n Structure representing a point.\n"]
881#[repr(C)]
882#[derive(Debug, Copy, Clone)]
883pub struct _cef_point_t {
884 pub x: ::std::os::raw::c_int,
885 pub y: ::std::os::raw::c_int,
886}
887#[test]
888fn bindgen_test_layout__cef_point_t() {
889 const UNINIT: ::std::mem::MaybeUninit<_cef_point_t> = ::std::mem::MaybeUninit::uninit();
890 let ptr = UNINIT.as_ptr();
891 assert_eq!(
892 ::std::mem::size_of::<_cef_point_t>(),
893 8usize,
894 concat!("Size of: ", stringify!(_cef_point_t))
895 );
896 assert_eq!(
897 ::std::mem::align_of::<_cef_point_t>(),
898 4usize,
899 concat!("Alignment of ", stringify!(_cef_point_t))
900 );
901 assert_eq!(
902 unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
903 0usize,
904 concat!(
905 "Offset of field: ",
906 stringify!(_cef_point_t),
907 "::",
908 stringify!(x)
909 )
910 );
911 assert_eq!(
912 unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
913 4usize,
914 concat!(
915 "Offset of field: ",
916 stringify!(_cef_point_t),
917 "::",
918 stringify!(y)
919 )
920 );
921}
922#[doc = "\n Structure representing a point.\n"]
923pub type cef_point_t = _cef_point_t;
924#[doc = "\n Structure representing a rectangle.\n"]
925#[repr(C)]
926#[derive(Debug, Copy, Clone)]
927pub struct _cef_rect_t {
928 pub x: ::std::os::raw::c_int,
929 pub y: ::std::os::raw::c_int,
930 pub width: ::std::os::raw::c_int,
931 pub height: ::std::os::raw::c_int,
932}
933#[test]
934fn bindgen_test_layout__cef_rect_t() {
935 const UNINIT: ::std::mem::MaybeUninit<_cef_rect_t> = ::std::mem::MaybeUninit::uninit();
936 let ptr = UNINIT.as_ptr();
937 assert_eq!(
938 ::std::mem::size_of::<_cef_rect_t>(),
939 16usize,
940 concat!("Size of: ", stringify!(_cef_rect_t))
941 );
942 assert_eq!(
943 ::std::mem::align_of::<_cef_rect_t>(),
944 4usize,
945 concat!("Alignment of ", stringify!(_cef_rect_t))
946 );
947 assert_eq!(
948 unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
949 0usize,
950 concat!(
951 "Offset of field: ",
952 stringify!(_cef_rect_t),
953 "::",
954 stringify!(x)
955 )
956 );
957 assert_eq!(
958 unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
959 4usize,
960 concat!(
961 "Offset of field: ",
962 stringify!(_cef_rect_t),
963 "::",
964 stringify!(y)
965 )
966 );
967 assert_eq!(
968 unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize },
969 8usize,
970 concat!(
971 "Offset of field: ",
972 stringify!(_cef_rect_t),
973 "::",
974 stringify!(width)
975 )
976 );
977 assert_eq!(
978 unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize },
979 12usize,
980 concat!(
981 "Offset of field: ",
982 stringify!(_cef_rect_t),
983 "::",
984 stringify!(height)
985 )
986 );
987}
988#[doc = "\n Structure representing a rectangle.\n"]
989pub type cef_rect_t = _cef_rect_t;
990#[doc = "\n Structure representing a size.\n"]
991#[repr(C)]
992#[derive(Debug, Copy, Clone)]
993pub struct _cef_size_t {
994 pub width: ::std::os::raw::c_int,
995 pub height: ::std::os::raw::c_int,
996}
997#[test]
998fn bindgen_test_layout__cef_size_t() {
999 const UNINIT: ::std::mem::MaybeUninit<_cef_size_t> = ::std::mem::MaybeUninit::uninit();
1000 let ptr = UNINIT.as_ptr();
1001 assert_eq!(
1002 ::std::mem::size_of::<_cef_size_t>(),
1003 8usize,
1004 concat!("Size of: ", stringify!(_cef_size_t))
1005 );
1006 assert_eq!(
1007 ::std::mem::align_of::<_cef_size_t>(),
1008 4usize,
1009 concat!("Alignment of ", stringify!(_cef_size_t))
1010 );
1011 assert_eq!(
1012 unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize },
1013 0usize,
1014 concat!(
1015 "Offset of field: ",
1016 stringify!(_cef_size_t),
1017 "::",
1018 stringify!(width)
1019 )
1020 );
1021 assert_eq!(
1022 unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize },
1023 4usize,
1024 concat!(
1025 "Offset of field: ",
1026 stringify!(_cef_size_t),
1027 "::",
1028 stringify!(height)
1029 )
1030 );
1031}
1032#[doc = "\n Structure representing a size.\n"]
1033pub type cef_size_t = _cef_size_t;
1034#[doc = "\n Structure representing insets.\n"]
1035#[repr(C)]
1036#[derive(Debug, Copy, Clone)]
1037pub struct _cef_insets_t {
1038 pub top: ::std::os::raw::c_int,
1039 pub left: ::std::os::raw::c_int,
1040 pub bottom: ::std::os::raw::c_int,
1041 pub right: ::std::os::raw::c_int,
1042}
1043#[test]
1044fn bindgen_test_layout__cef_insets_t() {
1045 const UNINIT: ::std::mem::MaybeUninit<_cef_insets_t> = ::std::mem::MaybeUninit::uninit();
1046 let ptr = UNINIT.as_ptr();
1047 assert_eq!(
1048 ::std::mem::size_of::<_cef_insets_t>(),
1049 16usize,
1050 concat!("Size of: ", stringify!(_cef_insets_t))
1051 );
1052 assert_eq!(
1053 ::std::mem::align_of::<_cef_insets_t>(),
1054 4usize,
1055 concat!("Alignment of ", stringify!(_cef_insets_t))
1056 );
1057 assert_eq!(
1058 unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize },
1059 0usize,
1060 concat!(
1061 "Offset of field: ",
1062 stringify!(_cef_insets_t),
1063 "::",
1064 stringify!(top)
1065 )
1066 );
1067 assert_eq!(
1068 unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize },
1069 4usize,
1070 concat!(
1071 "Offset of field: ",
1072 stringify!(_cef_insets_t),
1073 "::",
1074 stringify!(left)
1075 )
1076 );
1077 assert_eq!(
1078 unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize },
1079 8usize,
1080 concat!(
1081 "Offset of field: ",
1082 stringify!(_cef_insets_t),
1083 "::",
1084 stringify!(bottom)
1085 )
1086 );
1087 assert_eq!(
1088 unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize },
1089 12usize,
1090 concat!(
1091 "Offset of field: ",
1092 stringify!(_cef_insets_t),
1093 "::",
1094 stringify!(right)
1095 )
1096 );
1097}
1098#[doc = "\n Structure representing insets.\n"]
1099pub type cef_insets_t = _cef_insets_t;
1100#[repr(C)]
1101#[derive(Copy, Clone)]
1102pub struct _XEvent {
1103 _unused: [u8; 0],
1104}
1105pub type XEvent = _XEvent;
1106#[repr(C)]
1107#[derive(Debug, Copy, Clone)]
1108pub struct _XDisplay {
1109 _unused: [u8; 0],
1110}
1111pub type XDisplay = _XDisplay;
1112extern "C" {
1113 pub fn cef_get_xdisplay() -> *mut XDisplay;
1114}
1115#[doc = "\n Structure representing CefExecuteProcess arguments.\n"]
1116#[repr(C)]
1117#[derive(Debug, Copy, Clone)]
1118pub struct _cef_main_args_t {
1119 pub argc: ::std::os::raw::c_int,
1120 pub argv: *mut *mut ::std::os::raw::c_char,
1121}
1122#[test]
1123fn bindgen_test_layout__cef_main_args_t() {
1124 const UNINIT: ::std::mem::MaybeUninit<_cef_main_args_t> = ::std::mem::MaybeUninit::uninit();
1125 let ptr = UNINIT.as_ptr();
1126 assert_eq!(
1127 ::std::mem::size_of::<_cef_main_args_t>(),
1128 16usize,
1129 concat!("Size of: ", stringify!(_cef_main_args_t))
1130 );
1131 assert_eq!(
1132 ::std::mem::align_of::<_cef_main_args_t>(),
1133 8usize,
1134 concat!("Alignment of ", stringify!(_cef_main_args_t))
1135 );
1136 assert_eq!(
1137 unsafe { ::std::ptr::addr_of!((*ptr).argc) as usize - ptr as usize },
1138 0usize,
1139 concat!(
1140 "Offset of field: ",
1141 stringify!(_cef_main_args_t),
1142 "::",
1143 stringify!(argc)
1144 )
1145 );
1146 assert_eq!(
1147 unsafe { ::std::ptr::addr_of!((*ptr).argv) as usize - ptr as usize },
1148 8usize,
1149 concat!(
1150 "Offset of field: ",
1151 stringify!(_cef_main_args_t),
1152 "::",
1153 stringify!(argv)
1154 )
1155 );
1156}
1157#[doc = "\n Structure representing CefExecuteProcess arguments.\n"]
1158pub type cef_main_args_t = _cef_main_args_t;
1159#[doc = "\n Class representing window information.\n"]
1160#[repr(C)]
1161#[derive(Debug, Copy, Clone)]
1162pub struct _cef_window_info_t {
1163 #[doc = "\n The initial title of the window, to be set when the window is created.\n Some layout managers (e.g., Compiz) can look at the window title\n in order to decide where to place the window when it is\n created. When this attribute is not empty, the window title will\n be set before the window is mapped to the dispay. Otherwise the\n title will be initially empty.\n"]
1164 pub window_name: cef_string_t,
1165 #[doc = "\n Initial window bounds.\n"]
1166 pub bounds: cef_rect_t,
1167 #[doc = "\n Pointer for the parent window.\n"]
1168 pub parent_window: ::std::os::raw::c_ulong,
1169 #[doc = "\n Set to true (1) to create the browser using windowless (off-screen)\n rendering. No window will be created for the browser and all rendering\n will occur via the CefRenderHandler interface. The |parent_window| value\n will be used to identify monitor info and to act as the parent window for\n dialogs, context menus, etc. If |parent_window| is not provided then the\n main screen monitor will be used and some functionality that requires a\n parent window may not function correctly. In order to create windowless\n browsers the CefSettings.windowless_rendering_enabled value must be set to\n true. Transparent painting is enabled by default but can be disabled by\n setting CefBrowserSettings.background_color to an opaque value.\n"]
1170 pub windowless_rendering_enabled: ::std::os::raw::c_int,
1171 #[doc = "\n Set to true (1) to enable shared textures for windowless rendering. Only\n valid if windowless_rendering_enabled above is also set to true. Currently\n only supported on Windows (D3D11).\n"]
1172 pub shared_texture_enabled: ::std::os::raw::c_int,
1173 #[doc = "\n Set to true (1) to enable the ability to issue BeginFrame requests from\n the client application by calling CefBrowserHost::SendExternalBeginFrame.\n"]
1174 pub external_begin_frame_enabled: ::std::os::raw::c_int,
1175 #[doc = "\n Pointer for the new browser window. Only used with windowed rendering.\n"]
1176 pub window: ::std::os::raw::c_ulong,
1177}
1178#[test]
1179fn bindgen_test_layout__cef_window_info_t() {
1180 const UNINIT: ::std::mem::MaybeUninit<_cef_window_info_t> = ::std::mem::MaybeUninit::uninit();
1181 let ptr = UNINIT.as_ptr();
1182 assert_eq!(
1183 ::std::mem::size_of::<_cef_window_info_t>(),
1184 72usize,
1185 concat!("Size of: ", stringify!(_cef_window_info_t))
1186 );
1187 assert_eq!(
1188 ::std::mem::align_of::<_cef_window_info_t>(),
1189 8usize,
1190 concat!("Alignment of ", stringify!(_cef_window_info_t))
1191 );
1192 assert_eq!(
1193 unsafe { ::std::ptr::addr_of!((*ptr).window_name) as usize - ptr as usize },
1194 0usize,
1195 concat!(
1196 "Offset of field: ",
1197 stringify!(_cef_window_info_t),
1198 "::",
1199 stringify!(window_name)
1200 )
1201 );
1202 assert_eq!(
1203 unsafe { ::std::ptr::addr_of!((*ptr).bounds) as usize - ptr as usize },
1204 24usize,
1205 concat!(
1206 "Offset of field: ",
1207 stringify!(_cef_window_info_t),
1208 "::",
1209 stringify!(bounds)
1210 )
1211 );
1212 assert_eq!(
1213 unsafe { ::std::ptr::addr_of!((*ptr).parent_window) as usize - ptr as usize },
1214 40usize,
1215 concat!(
1216 "Offset of field: ",
1217 stringify!(_cef_window_info_t),
1218 "::",
1219 stringify!(parent_window)
1220 )
1221 );
1222 assert_eq!(
1223 unsafe {
1224 ::std::ptr::addr_of!((*ptr).windowless_rendering_enabled) as usize - ptr as usize
1225 },
1226 48usize,
1227 concat!(
1228 "Offset of field: ",
1229 stringify!(_cef_window_info_t),
1230 "::",
1231 stringify!(windowless_rendering_enabled)
1232 )
1233 );
1234 assert_eq!(
1235 unsafe { ::std::ptr::addr_of!((*ptr).shared_texture_enabled) as usize - ptr as usize },
1236 52usize,
1237 concat!(
1238 "Offset of field: ",
1239 stringify!(_cef_window_info_t),
1240 "::",
1241 stringify!(shared_texture_enabled)
1242 )
1243 );
1244 assert_eq!(
1245 unsafe {
1246 ::std::ptr::addr_of!((*ptr).external_begin_frame_enabled) as usize - ptr as usize
1247 },
1248 56usize,
1249 concat!(
1250 "Offset of field: ",
1251 stringify!(_cef_window_info_t),
1252 "::",
1253 stringify!(external_begin_frame_enabled)
1254 )
1255 );
1256 assert_eq!(
1257 unsafe { ::std::ptr::addr_of!((*ptr).window) as usize - ptr as usize },
1258 64usize,
1259 concat!(
1260 "Offset of field: ",
1261 stringify!(_cef_window_info_t),
1262 "::",
1263 stringify!(window)
1264 )
1265 );
1266}
1267#[doc = "\n Class representing window information.\n"]
1268pub type cef_window_info_t = _cef_window_info_t;
1269pub type cef_color_t = u32;
1270impl cef_log_severity_t {
1271 pub const LOGSEVERITY_DEBUG: cef_log_severity_t = cef_log_severity_t::LOGSEVERITY_VERBOSE;
1272}
1273#[repr(u32)]
1274#[non_exhaustive]
1275#[doc = "\n Log severity levels.\n"]
1276#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1277pub enum cef_log_severity_t {
1278 #[doc = "\n Default logging (currently INFO logging).\n"]
1279 LOGSEVERITY_DEFAULT = 0,
1280 #[doc = "\n Verbose logging.\n"]
1281 LOGSEVERITY_VERBOSE = 1,
1282 #[doc = "\n INFO logging.\n"]
1283 LOGSEVERITY_INFO = 2,
1284 #[doc = "\n WARNING logging.\n"]
1285 LOGSEVERITY_WARNING = 3,
1286 #[doc = "\n ERROR logging.\n"]
1287 LOGSEVERITY_ERROR = 4,
1288 #[doc = "\n FATAL logging.\n"]
1289 LOGSEVERITY_FATAL = 5,
1290 #[doc = "\n Disable logging to file for all messages, and to stderr for messages with\n severity less than FATAL.\n"]
1291 LOGSEVERITY_DISABLE = 99,
1292}
1293#[repr(u32)]
1294#[non_exhaustive]
1295#[doc = "\n Log items prepended to each log line.\n"]
1296#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1297pub enum cef_log_items_t {
1298 #[doc = "\n Prepend the default list of items.\n"]
1299 LOG_ITEMS_DEFAULT = 0,
1300 #[doc = "\n Prepend no items.\n"]
1301 LOG_ITEMS_NONE = 1,
1302 #[doc = "\n Prepend the process ID.\n"]
1303 LOG_ITEMS_FLAG_PROCESS_ID = 2,
1304 #[doc = "\n Prepend the thread ID.\n"]
1305 LOG_ITEMS_FLAG_THREAD_ID = 4,
1306 #[doc = "\n Prepend the timestamp.\n"]
1307 LOG_ITEMS_FLAG_TIME_STAMP = 8,
1308 #[doc = "\n Prepend the tickcount.\n"]
1309 LOG_ITEMS_FLAG_TICK_COUNT = 16,
1310}
1311#[repr(u32)]
1312#[non_exhaustive]
1313#[doc = "\n Represents the state of a setting.\n"]
1314#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1315pub enum cef_state_t {
1316 #[doc = "\n Use the default state for the setting.\n"]
1317 STATE_DEFAULT = 0,
1318 #[doc = "\n Enable or allow the setting.\n"]
1319 STATE_ENABLED = 1,
1320 #[doc = "\n Disable or disallow the setting.\n"]
1321 STATE_DISABLED = 2,
1322}
1323#[doc = "\n Initialization settings. Specify NULL or 0 to get the recommended default\n values. Many of these and other settings can also configured using command-\n line switches.\n"]
1324#[repr(C)]
1325#[derive(Debug, Copy, Clone)]
1326pub struct _cef_settings_t {
1327 #[doc = "\n Size of this structure.\n"]
1328 pub size: usize,
1329 #[doc = "\n Set to true (1) to disable the sandbox for sub-processes. See\n cef_sandbox_win.h for requirements to enable the sandbox on Windows. Also\n configurable using the \"no-sandbox\" command-line switch.\n"]
1330 pub no_sandbox: ::std::os::raw::c_int,
1331 #[doc = "\n The path to a separate executable that will be launched for sub-processes.\n If this value is empty on Windows or Linux then the main process\n executable will be used. If this value is empty on macOS then a helper\n executable must exist at \"Contents/Frameworks/<app>\n Helper.app/Contents/MacOS/<app> Helper\" in the top-level app bundle. See\n the comments on CefExecuteProcess() for details. If this value is\n non-empty then it must be an absolute path. Also configurable using the\n \"browser-subprocess-path\" command-line switch.\n"]
1332 pub browser_subprocess_path: cef_string_t,
1333 #[doc = "\n The path to the CEF framework directory on macOS. If this value is empty\n then the framework must exist at \"Contents/Frameworks/Chromium Embedded\n Framework.framework\" in the top-level app bundle. If this value is\n non-empty then it must be an absolute path. Also configurable using the\n \"framework-dir-path\" command-line switch.\n"]
1334 pub framework_dir_path: cef_string_t,
1335 #[doc = "\n The path to the main bundle on macOS. If this value is empty then it\n defaults to the top-level app bundle. If this value is non-empty then it\n must be an absolute path. Also configurable using the \"main-bundle-path\"\n command-line switch.\n"]
1336 pub main_bundle_path: cef_string_t,
1337 #[doc = "\n Set to true (1) to enable use of the Chrome runtime in CEF. This feature\n is considered experimental and is not recommended for most users at this\n time. See issue #2969 for details.\n"]
1338 pub chrome_runtime: ::std::os::raw::c_int,
1339 #[doc = "\n Set to true (1) to have the browser process message loop run in a separate\n thread. If false (0) then the CefDoMessageLoopWork() function must be\n called from your application message loop. This option is only supported\n on Windows and Linux.\n"]
1340 pub multi_threaded_message_loop: ::std::os::raw::c_int,
1341 #[doc = "\n Set to true (1) to control browser process main (UI) thread message pump\n scheduling via the CefBrowserProcessHandler::OnScheduleMessagePumpWork()\n callback. This option is recommended for use in combination with the\n CefDoMessageLoopWork() function in cases where the CEF message loop must\n be integrated into an existing application message loop (see additional\n comments and warnings on CefDoMessageLoopWork). Enabling this option is\n not recommended for most users; leave this option disabled and use either\n the CefRunMessageLoop() function or multi_threaded_message_loop if\n possible.\n"]
1342 pub external_message_pump: ::std::os::raw::c_int,
1343 #[doc = "\n Set to true (1) to enable windowless (off-screen) rendering support. Do\n not enable this value if the application does not use windowless rendering\n as it may reduce rendering performance on some systems.\n"]
1344 pub windowless_rendering_enabled: ::std::os::raw::c_int,
1345 #[doc = "\n Set to true (1) to disable configuration of browser process features using\n standard CEF and Chromium command-line arguments. Configuration can still\n be specified using CEF data structures or via the\n CefApp::OnBeforeCommandLineProcessing() method.\n"]
1346 pub command_line_args_disabled: ::std::os::raw::c_int,
1347 #[doc = "\n The location where data for the global browser cache will be stored on\n disk. If this value is non-empty then it must be an absolute path that is\n either equal to or a child directory of CefSettings.root_cache_path. If\n this value is empty then browsers will be created in \"incognito mode\"\n where in-memory caches are used for storage and no data is persisted to\n disk. HTML5 databases such as localStorage will only persist across\n sessions if a cache path is specified. Can be overridden for individual\n CefRequestContext instances via the CefRequestContextSettings.cache_path\n value. When using the Chrome runtime the \"default\" profile will be used if\n |cache_path| and |root_cache_path| have the same value.\n"]
1348 pub cache_path: cef_string_t,
1349 #[doc = "\n The root directory that all CefSettings.cache_path and\n CefRequestContextSettings.cache_path values must have in common. If this\n value is empty and CefSettings.cache_path is non-empty then it will\n default to the CefSettings.cache_path value. If both values are empty\n then the default platform-specific directory will be used\n (\"~/.config/cef_user_data\" directory on Linux, \"~/Library/Application\n Support/CEF/User Data\" directory on MacOS, \"AppData\\Local\\CEF\\User Data\"\n directory under the user profile directory on Windows). If this value is\n non-empty then it must be an absolute path. Failure to set this value\n correctly may result in the sandbox blocking read/write access to certain\n files.\n"]
1350 pub root_cache_path: cef_string_t,
1351 #[doc = "\n To persist session cookies (cookies without an expiry date or validity\n interval) by default when using the global cookie manager set this value\n to true (1). Session cookies are generally intended to be transient and\n most Web browsers do not persist them. A |cache_path| value must also be\n specified to enable this feature. Also configurable using the\n \"persist-session-cookies\" command-line switch. Can be overridden for\n individual CefRequestContext instances via the\n CefRequestContextSettings.persist_session_cookies value.\n"]
1352 pub persist_session_cookies: ::std::os::raw::c_int,
1353 #[doc = "\n To persist user preferences as a JSON file in the cache path directory set\n this value to true (1). A |cache_path| value must also be specified\n to enable this feature. Also configurable using the\n \"persist-user-preferences\" command-line switch. Can be overridden for\n individual CefRequestContext instances via the\n CefRequestContextSettings.persist_user_preferences value.\n"]
1354 pub persist_user_preferences: ::std::os::raw::c_int,
1355 #[doc = "\n Value that will be returned as the User-Agent HTTP header. If empty the\n default User-Agent string will be used. Also configurable using the\n \"user-agent\" command-line switch.\n"]
1356 pub user_agent: cef_string_t,
1357 #[doc = "\n Value that will be inserted as the product portion of the default\n User-Agent string. If empty the Chromium product version will be used. If\n |userAgent| is specified this value will be ignored. Also configurable\n using the \"user-agent-product\" command-line switch.\n"]
1358 pub user_agent_product: cef_string_t,
1359 #[doc = "\n The locale string that will be passed to WebKit. If empty the default\n locale of \"en-US\" will be used. This value is ignored on Linux where\n locale is determined using environment variable parsing with the\n precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also\n configurable using the \"lang\" command-line switch.\n"]
1360 pub locale: cef_string_t,
1361 #[doc = "\n The directory and file name to use for the debug log. If empty a default\n log file name and location will be used. On Windows and Linux a\n \"debug.log\" file will be written in the main executable directory. On\n MacOS a \"~/Library/Logs/[app name]_debug.log\" file will be written where\n [app name] is the name of the main app executable. Also configurable using\n the \"log-file\" command-line switch.\n"]
1362 pub log_file: cef_string_t,
1363 #[doc = "\n The log severity. Only messages of this severity level or higher will be\n logged. When set to DISABLE no messages will be written to the log file,\n but FATAL messages will still be output to stderr. Also configurable using\n the \"log-severity\" command-line switch with a value of \"verbose\", \"info\",\n \"warning\", \"error\", \"fatal\" or \"disable\".\n"]
1364 pub log_severity: cef_log_severity_t,
1365 #[doc = "\n The log items prepended to each log line. If not set the default log items\n will be used. Also configurable using the \"log-items\" command-line switch\n with a value of \"none\" for no log items, or a comma-delimited list of\n values \"pid\", \"tid\", \"timestamp\" or \"tickcount\" for custom log items.\n"]
1366 pub log_items: cef_log_items_t,
1367 #[doc = "\n Custom flags that will be used when initializing the V8 JavaScript engine.\n The consequences of using custom flags may not be well tested. Also\n configurable using the \"js-flags\" command-line switch.\n"]
1368 pub javascript_flags: cef_string_t,
1369 #[doc = "\n The fully qualified path for the resources directory. If this value is\n empty the *.pak files must be located in the module directory on\n Windows/Linux or the app bundle Resources directory on MacOS. If this\n value is non-empty then it must be an absolute path. Also configurable\n using the \"resources-dir-path\" command-line switch.\n"]
1370 pub resources_dir_path: cef_string_t,
1371 #[doc = "\n The fully qualified path for the locales directory. If this value is empty\n the locales directory must be located in the module directory. If this\n value is non-empty then it must be an absolute path. This value is ignored\n on MacOS where pack files are always loaded from the app bundle Resources\n directory. Also configurable using the \"locales-dir-path\" command-line\n switch.\n"]
1372 pub locales_dir_path: cef_string_t,
1373 #[doc = "\n Set to true (1) to disable loading of pack files for resources and\n locales. A resource bundle handler must be provided for the browser and\n render processes via CefApp::GetResourceBundleHandler() if loading of pack\n files is disabled. Also configurable using the \"disable-pack-loading\"\n command- line switch.\n"]
1374 pub pack_loading_disabled: ::std::os::raw::c_int,
1375 #[doc = "\n Set to a value between 1024 and 65535 to enable remote debugging on the\n specified port. Also configurable using the \"remote-debugging-port\"\n command-line switch. Remote debugging can be accessed by loading the\n chrome://inspect page in Google Chrome. Port numbers 9222 and 9229 are\n discoverable by default. Other port numbers may need to be configured via\n \"Discover network targets\" on the Devices tab.\n"]
1376 pub remote_debugging_port: ::std::os::raw::c_int,
1377 #[doc = "\n The number of stack trace frames to capture for uncaught exceptions.\n Specify a positive value to enable the\n CefRenderProcessHandler::OnUncaughtException() callback. Specify 0\n (default value) and OnUncaughtException() will not be called. Also\n configurable using the \"uncaught-exception-stack-size\" command-line\n switch.\n"]
1378 pub uncaught_exception_stack_size: ::std::os::raw::c_int,
1379 #[doc = "\n Background color used for the browser before a document is loaded and when\n no document color is specified. The alpha component must be either fully\n opaque (0xFF) or fully transparent (0x00). If the alpha component is fully\n opaque then the RGB components will be used as the background color. If\n the alpha component is fully transparent for a windowed browser then the\n default value of opaque white be used. If the alpha component is fully\n transparent for a windowless (off-screen) browser then transparent\n painting will be enabled.\n"]
1380 pub background_color: cef_color_t,
1381 #[doc = "\n Comma delimited ordered list of language codes without any whitespace that\n will be used in the \"Accept-Language\" HTTP header. May be overridden on a\n per-browser basis using the CefBrowserSettings.accept_language_list value.\n If both values are empty then \"en-US,en\" will be used. Can be overridden\n for individual CefRequestContext instances via the\n CefRequestContextSettings.accept_language_list value.\n"]
1382 pub accept_language_list: cef_string_t,
1383 #[doc = "\n Comma delimited list of schemes supported by the associated\n CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0)\n the default schemes (\"http\", \"https\", \"ws\" and \"wss\") will also be\n supported. Not specifying a |cookieable_schemes_list| value and setting\n |cookieable_schemes_exclude_defaults| to true (1) will disable all loading\n and saving of cookies. These settings will only impact the global\n CefRequestContext. Individual CefRequestContext instances can be\n configured via the CefRequestContextSettings.cookieable_schemes_list and\n CefRequestContextSettings.cookieable_schemes_exclude_defaults values.\n"]
1384 pub cookieable_schemes_list: cef_string_t,
1385 pub cookieable_schemes_exclude_defaults: ::std::os::raw::c_int,
1386}
1387#[test]
1388fn bindgen_test_layout__cef_settings_t() {
1389 const UNINIT: ::std::mem::MaybeUninit<_cef_settings_t> = ::std::mem::MaybeUninit::uninit();
1390 let ptr = UNINIT.as_ptr();
1391 assert_eq!(
1392 ::std::mem::size_of::<_cef_settings_t>(),
1393 416usize,
1394 concat!("Size of: ", stringify!(_cef_settings_t))
1395 );
1396 assert_eq!(
1397 ::std::mem::align_of::<_cef_settings_t>(),
1398 8usize,
1399 concat!("Alignment of ", stringify!(_cef_settings_t))
1400 );
1401 assert_eq!(
1402 unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
1403 0usize,
1404 concat!(
1405 "Offset of field: ",
1406 stringify!(_cef_settings_t),
1407 "::",
1408 stringify!(size)
1409 )
1410 );
1411 assert_eq!(
1412 unsafe { ::std::ptr::addr_of!((*ptr).no_sandbox) as usize - ptr as usize },
1413 8usize,
1414 concat!(
1415 "Offset of field: ",
1416 stringify!(_cef_settings_t),
1417 "::",
1418 stringify!(no_sandbox)
1419 )
1420 );
1421 assert_eq!(
1422 unsafe { ::std::ptr::addr_of!((*ptr).browser_subprocess_path) as usize - ptr as usize },
1423 16usize,
1424 concat!(
1425 "Offset of field: ",
1426 stringify!(_cef_settings_t),
1427 "::",
1428 stringify!(browser_subprocess_path)
1429 )
1430 );
1431 assert_eq!(
1432 unsafe { ::std::ptr::addr_of!((*ptr).framework_dir_path) as usize - ptr as usize },
1433 40usize,
1434 concat!(
1435 "Offset of field: ",
1436 stringify!(_cef_settings_t),
1437 "::",
1438 stringify!(framework_dir_path)
1439 )
1440 );
1441 assert_eq!(
1442 unsafe { ::std::ptr::addr_of!((*ptr).main_bundle_path) as usize - ptr as usize },
1443 64usize,
1444 concat!(
1445 "Offset of field: ",
1446 stringify!(_cef_settings_t),
1447 "::",
1448 stringify!(main_bundle_path)
1449 )
1450 );
1451 assert_eq!(
1452 unsafe { ::std::ptr::addr_of!((*ptr).chrome_runtime) as usize - ptr as usize },
1453 88usize,
1454 concat!(
1455 "Offset of field: ",
1456 stringify!(_cef_settings_t),
1457 "::",
1458 stringify!(chrome_runtime)
1459 )
1460 );
1461 assert_eq!(
1462 unsafe { ::std::ptr::addr_of!((*ptr).multi_threaded_message_loop) as usize - ptr as usize },
1463 92usize,
1464 concat!(
1465 "Offset of field: ",
1466 stringify!(_cef_settings_t),
1467 "::",
1468 stringify!(multi_threaded_message_loop)
1469 )
1470 );
1471 assert_eq!(
1472 unsafe { ::std::ptr::addr_of!((*ptr).external_message_pump) as usize - ptr as usize },
1473 96usize,
1474 concat!(
1475 "Offset of field: ",
1476 stringify!(_cef_settings_t),
1477 "::",
1478 stringify!(external_message_pump)
1479 )
1480 );
1481 assert_eq!(
1482 unsafe {
1483 ::std::ptr::addr_of!((*ptr).windowless_rendering_enabled) as usize - ptr as usize
1484 },
1485 100usize,
1486 concat!(
1487 "Offset of field: ",
1488 stringify!(_cef_settings_t),
1489 "::",
1490 stringify!(windowless_rendering_enabled)
1491 )
1492 );
1493 assert_eq!(
1494 unsafe { ::std::ptr::addr_of!((*ptr).command_line_args_disabled) as usize - ptr as usize },
1495 104usize,
1496 concat!(
1497 "Offset of field: ",
1498 stringify!(_cef_settings_t),
1499 "::",
1500 stringify!(command_line_args_disabled)
1501 )
1502 );
1503 assert_eq!(
1504 unsafe { ::std::ptr::addr_of!((*ptr).cache_path) as usize - ptr as usize },
1505 112usize,
1506 concat!(
1507 "Offset of field: ",
1508 stringify!(_cef_settings_t),
1509 "::",
1510 stringify!(cache_path)
1511 )
1512 );
1513 assert_eq!(
1514 unsafe { ::std::ptr::addr_of!((*ptr).root_cache_path) as usize - ptr as usize },
1515 136usize,
1516 concat!(
1517 "Offset of field: ",
1518 stringify!(_cef_settings_t),
1519 "::",
1520 stringify!(root_cache_path)
1521 )
1522 );
1523 assert_eq!(
1524 unsafe { ::std::ptr::addr_of!((*ptr).persist_session_cookies) as usize - ptr as usize },
1525 160usize,
1526 concat!(
1527 "Offset of field: ",
1528 stringify!(_cef_settings_t),
1529 "::",
1530 stringify!(persist_session_cookies)
1531 )
1532 );
1533 assert_eq!(
1534 unsafe { ::std::ptr::addr_of!((*ptr).persist_user_preferences) as usize - ptr as usize },
1535 164usize,
1536 concat!(
1537 "Offset of field: ",
1538 stringify!(_cef_settings_t),
1539 "::",
1540 stringify!(persist_user_preferences)
1541 )
1542 );
1543 assert_eq!(
1544 unsafe { ::std::ptr::addr_of!((*ptr).user_agent) as usize - ptr as usize },
1545 168usize,
1546 concat!(
1547 "Offset of field: ",
1548 stringify!(_cef_settings_t),
1549 "::",
1550 stringify!(user_agent)
1551 )
1552 );
1553 assert_eq!(
1554 unsafe { ::std::ptr::addr_of!((*ptr).user_agent_product) as usize - ptr as usize },
1555 192usize,
1556 concat!(
1557 "Offset of field: ",
1558 stringify!(_cef_settings_t),
1559 "::",
1560 stringify!(user_agent_product)
1561 )
1562 );
1563 assert_eq!(
1564 unsafe { ::std::ptr::addr_of!((*ptr).locale) as usize - ptr as usize },
1565 216usize,
1566 concat!(
1567 "Offset of field: ",
1568 stringify!(_cef_settings_t),
1569 "::",
1570 stringify!(locale)
1571 )
1572 );
1573 assert_eq!(
1574 unsafe { ::std::ptr::addr_of!((*ptr).log_file) as usize - ptr as usize },
1575 240usize,
1576 concat!(
1577 "Offset of field: ",
1578 stringify!(_cef_settings_t),
1579 "::",
1580 stringify!(log_file)
1581 )
1582 );
1583 assert_eq!(
1584 unsafe { ::std::ptr::addr_of!((*ptr).log_severity) as usize - ptr as usize },
1585 264usize,
1586 concat!(
1587 "Offset of field: ",
1588 stringify!(_cef_settings_t),
1589 "::",
1590 stringify!(log_severity)
1591 )
1592 );
1593 assert_eq!(
1594 unsafe { ::std::ptr::addr_of!((*ptr).log_items) as usize - ptr as usize },
1595 268usize,
1596 concat!(
1597 "Offset of field: ",
1598 stringify!(_cef_settings_t),
1599 "::",
1600 stringify!(log_items)
1601 )
1602 );
1603 assert_eq!(
1604 unsafe { ::std::ptr::addr_of!((*ptr).javascript_flags) as usize - ptr as usize },
1605 272usize,
1606 concat!(
1607 "Offset of field: ",
1608 stringify!(_cef_settings_t),
1609 "::",
1610 stringify!(javascript_flags)
1611 )
1612 );
1613 assert_eq!(
1614 unsafe { ::std::ptr::addr_of!((*ptr).resources_dir_path) as usize - ptr as usize },
1615 296usize,
1616 concat!(
1617 "Offset of field: ",
1618 stringify!(_cef_settings_t),
1619 "::",
1620 stringify!(resources_dir_path)
1621 )
1622 );
1623 assert_eq!(
1624 unsafe { ::std::ptr::addr_of!((*ptr).locales_dir_path) as usize - ptr as usize },
1625 320usize,
1626 concat!(
1627 "Offset of field: ",
1628 stringify!(_cef_settings_t),
1629 "::",
1630 stringify!(locales_dir_path)
1631 )
1632 );
1633 assert_eq!(
1634 unsafe { ::std::ptr::addr_of!((*ptr).pack_loading_disabled) as usize - ptr as usize },
1635 344usize,
1636 concat!(
1637 "Offset of field: ",
1638 stringify!(_cef_settings_t),
1639 "::",
1640 stringify!(pack_loading_disabled)
1641 )
1642 );
1643 assert_eq!(
1644 unsafe { ::std::ptr::addr_of!((*ptr).remote_debugging_port) as usize - ptr as usize },
1645 348usize,
1646 concat!(
1647 "Offset of field: ",
1648 stringify!(_cef_settings_t),
1649 "::",
1650 stringify!(remote_debugging_port)
1651 )
1652 );
1653 assert_eq!(
1654 unsafe {
1655 ::std::ptr::addr_of!((*ptr).uncaught_exception_stack_size) as usize - ptr as usize
1656 },
1657 352usize,
1658 concat!(
1659 "Offset of field: ",
1660 stringify!(_cef_settings_t),
1661 "::",
1662 stringify!(uncaught_exception_stack_size)
1663 )
1664 );
1665 assert_eq!(
1666 unsafe { ::std::ptr::addr_of!((*ptr).background_color) as usize - ptr as usize },
1667 356usize,
1668 concat!(
1669 "Offset of field: ",
1670 stringify!(_cef_settings_t),
1671 "::",
1672 stringify!(background_color)
1673 )
1674 );
1675 assert_eq!(
1676 unsafe { ::std::ptr::addr_of!((*ptr).accept_language_list) as usize - ptr as usize },
1677 360usize,
1678 concat!(
1679 "Offset of field: ",
1680 stringify!(_cef_settings_t),
1681 "::",
1682 stringify!(accept_language_list)
1683 )
1684 );
1685 assert_eq!(
1686 unsafe { ::std::ptr::addr_of!((*ptr).cookieable_schemes_list) as usize - ptr as usize },
1687 384usize,
1688 concat!(
1689 "Offset of field: ",
1690 stringify!(_cef_settings_t),
1691 "::",
1692 stringify!(cookieable_schemes_list)
1693 )
1694 );
1695 assert_eq!(
1696 unsafe {
1697 ::std::ptr::addr_of!((*ptr).cookieable_schemes_exclude_defaults) as usize - ptr as usize
1698 },
1699 408usize,
1700 concat!(
1701 "Offset of field: ",
1702 stringify!(_cef_settings_t),
1703 "::",
1704 stringify!(cookieable_schemes_exclude_defaults)
1705 )
1706 );
1707}
1708#[doc = "\n Initialization settings. Specify NULL or 0 to get the recommended default\n values. Many of these and other settings can also configured using command-\n line switches.\n"]
1709pub type cef_settings_t = _cef_settings_t;
1710#[doc = "\n Request context initialization settings. Specify NULL or 0 to get the\n recommended default values.\n"]
1711#[repr(C)]
1712#[derive(Debug, Copy, Clone)]
1713pub struct _cef_request_context_settings_t {
1714 #[doc = "\n Size of this structure.\n"]
1715 pub size: usize,
1716 #[doc = "\n The location where cache data for this request context will be stored on\n disk. If this value is non-empty then it must be an absolute path that is\n either equal to or a child directory of CefSettings.root_cache_path. If\n this value is empty then browsers will be created in \"incognito mode\"\n where in-memory caches are used for storage and no data is persisted to\n disk. HTML5 databases such as localStorage will only persist across\n sessions if a cache path is specified. To share the global browser cache\n and related configuration set this value to match the\n CefSettings.cache_path value.\n"]
1717 pub cache_path: cef_string_t,
1718 #[doc = "\n To persist session cookies (cookies without an expiry date or validity\n interval) by default when using the global cookie manager set this value\n to true (1). Session cookies are generally intended to be transient and\n most Web browsers do not persist them. Can be set globally using the\n CefSettings.persist_session_cookies value. This value will be ignored if\n |cache_path| is empty or if it matches the CefSettings.cache_path value.\n"]
1719 pub persist_session_cookies: ::std::os::raw::c_int,
1720 #[doc = "\n To persist user preferences as a JSON file in the cache path directory set\n this value to true (1). Can be set globally using the\n CefSettings.persist_user_preferences value. This value will be ignored if\n |cache_path| is empty or if it matches the CefSettings.cache_path value.\n"]
1721 pub persist_user_preferences: ::std::os::raw::c_int,
1722 #[doc = "\n Comma delimited ordered list of language codes without any whitespace that\n will be used in the \"Accept-Language\" HTTP header. Can be set globally\n using the CefSettings.accept_language_list value or overridden on a per-\n browser basis using the CefBrowserSettings.accept_language_list value. If\n all values are empty then \"en-US,en\" will be used. This value will be\n ignored if |cache_path| matches the CefSettings.cache_path value.\n"]
1723 pub accept_language_list: cef_string_t,
1724 #[doc = "\n Comma delimited list of schemes supported by the associated\n CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0)\n the default schemes (\"http\", \"https\", \"ws\" and \"wss\") will also be\n supported. Not specifying a |cookieable_schemes_list| value and setting\n |cookieable_schemes_exclude_defaults| to true (1) will disable all loading\n and saving of cookies. These values will be ignored if |cache_path|\n matches the CefSettings.cache_path value.\n"]
1725 pub cookieable_schemes_list: cef_string_t,
1726 pub cookieable_schemes_exclude_defaults: ::std::os::raw::c_int,
1727}
1728#[test]
1729fn bindgen_test_layout__cef_request_context_settings_t() {
1730 const UNINIT: ::std::mem::MaybeUninit<_cef_request_context_settings_t> =
1731 ::std::mem::MaybeUninit::uninit();
1732 let ptr = UNINIT.as_ptr();
1733 assert_eq!(
1734 ::std::mem::size_of::<_cef_request_context_settings_t>(),
1735 96usize,
1736 concat!("Size of: ", stringify!(_cef_request_context_settings_t))
1737 );
1738 assert_eq!(
1739 ::std::mem::align_of::<_cef_request_context_settings_t>(),
1740 8usize,
1741 concat!("Alignment of ", stringify!(_cef_request_context_settings_t))
1742 );
1743 assert_eq!(
1744 unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
1745 0usize,
1746 concat!(
1747 "Offset of field: ",
1748 stringify!(_cef_request_context_settings_t),
1749 "::",
1750 stringify!(size)
1751 )
1752 );
1753 assert_eq!(
1754 unsafe { ::std::ptr::addr_of!((*ptr).cache_path) as usize - ptr as usize },
1755 8usize,
1756 concat!(
1757 "Offset of field: ",
1758 stringify!(_cef_request_context_settings_t),
1759 "::",
1760 stringify!(cache_path)
1761 )
1762 );
1763 assert_eq!(
1764 unsafe { ::std::ptr::addr_of!((*ptr).persist_session_cookies) as usize - ptr as usize },
1765 32usize,
1766 concat!(
1767 "Offset of field: ",
1768 stringify!(_cef_request_context_settings_t),
1769 "::",
1770 stringify!(persist_session_cookies)
1771 )
1772 );
1773 assert_eq!(
1774 unsafe { ::std::ptr::addr_of!((*ptr).persist_user_preferences) as usize - ptr as usize },
1775 36usize,
1776 concat!(
1777 "Offset of field: ",
1778 stringify!(_cef_request_context_settings_t),
1779 "::",
1780 stringify!(persist_user_preferences)
1781 )
1782 );
1783 assert_eq!(
1784 unsafe { ::std::ptr::addr_of!((*ptr).accept_language_list) as usize - ptr as usize },
1785 40usize,
1786 concat!(
1787 "Offset of field: ",
1788 stringify!(_cef_request_context_settings_t),
1789 "::",
1790 stringify!(accept_language_list)
1791 )
1792 );
1793 assert_eq!(
1794 unsafe { ::std::ptr::addr_of!((*ptr).cookieable_schemes_list) as usize - ptr as usize },
1795 64usize,
1796 concat!(
1797 "Offset of field: ",
1798 stringify!(_cef_request_context_settings_t),
1799 "::",
1800 stringify!(cookieable_schemes_list)
1801 )
1802 );
1803 assert_eq!(
1804 unsafe {
1805 ::std::ptr::addr_of!((*ptr).cookieable_schemes_exclude_defaults) as usize - ptr as usize
1806 },
1807 88usize,
1808 concat!(
1809 "Offset of field: ",
1810 stringify!(_cef_request_context_settings_t),
1811 "::",
1812 stringify!(cookieable_schemes_exclude_defaults)
1813 )
1814 );
1815}
1816#[doc = "\n Request context initialization settings. Specify NULL or 0 to get the\n recommended default values.\n"]
1817pub type cef_request_context_settings_t = _cef_request_context_settings_t;
1818#[doc = "\n Browser initialization settings. Specify NULL or 0 to get the recommended\n default values. The consequences of using custom values may not be well\n tested. Many of these and other settings can also configured using command-\n line switches.\n"]
1819#[repr(C)]
1820#[derive(Debug, Copy, Clone)]
1821pub struct _cef_browser_settings_t {
1822 #[doc = "\n Size of this structure.\n"]
1823 pub size: usize,
1824 #[doc = "\n The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint\n will be called for a windowless browser. The actual fps may be lower if\n the browser cannot generate frames at the requested rate. The minimum\n value is 1 and the maximum value is 60 (default 30). This value can also\n be changed dynamically via CefBrowserHost::SetWindowlessFrameRate.\n"]
1825 pub windowless_frame_rate: ::std::os::raw::c_int,
1826 #[doc = "\n Font settings.\n"]
1827 pub standard_font_family: cef_string_t,
1828 pub fixed_font_family: cef_string_t,
1829 pub serif_font_family: cef_string_t,
1830 pub sans_serif_font_family: cef_string_t,
1831 pub cursive_font_family: cef_string_t,
1832 pub fantasy_font_family: cef_string_t,
1833 pub default_font_size: ::std::os::raw::c_int,
1834 pub default_fixed_font_size: ::std::os::raw::c_int,
1835 pub minimum_font_size: ::std::os::raw::c_int,
1836 pub minimum_logical_font_size: ::std::os::raw::c_int,
1837 #[doc = "\n Default encoding for Web content. If empty \"ISO-8859-1\" will be used. Also\n configurable using the \"default-encoding\" command-line switch.\n"]
1838 pub default_encoding: cef_string_t,
1839 #[doc = "\n Controls the loading of fonts from remote sources. Also configurable using\n the \"disable-remote-fonts\" command-line switch.\n"]
1840 pub remote_fonts: cef_state_t,
1841 #[doc = "\n Controls whether JavaScript can be executed. Also configurable using the\n \"disable-javascript\" command-line switch.\n"]
1842 pub javascript: cef_state_t,
1843 #[doc = "\n Controls whether JavaScript can be used to close windows that were not\n opened via JavaScript. JavaScript can still be used to close windows that\n were opened via JavaScript or that have no back/forward history. Also\n configurable using the \"disable-javascript-close-windows\" command-line\n switch.\n"]
1844 pub javascript_close_windows: cef_state_t,
1845 #[doc = "\n Controls whether JavaScript can access the clipboard. Also configurable\n using the \"disable-javascript-access-clipboard\" command-line switch.\n"]
1846 pub javascript_access_clipboard: cef_state_t,
1847 #[doc = "\n Controls whether DOM pasting is supported in the editor via\n execCommand(\"paste\"). The |javascript_access_clipboard| setting must also\n be enabled. Also configurable using the \"disable-javascript-dom-paste\"\n command-line switch.\n"]
1848 pub javascript_dom_paste: cef_state_t,
1849 #[doc = "\n Controls whether image URLs will be loaded from the network. A cached\n image will still be rendered if requested. Also configurable using the\n \"disable-image-loading\" command-line switch.\n"]
1850 pub image_loading: cef_state_t,
1851 #[doc = "\n Controls whether standalone images will be shrunk to fit the page. Also\n configurable using the \"image-shrink-standalone-to-fit\" command-line\n switch.\n"]
1852 pub image_shrink_standalone_to_fit: cef_state_t,
1853 #[doc = "\n Controls whether text areas can be resized. Also configurable using the\n \"disable-text-area-resize\" command-line switch.\n"]
1854 pub text_area_resize: cef_state_t,
1855 #[doc = "\n Controls whether the tab key can advance focus to links. Also configurable\n using the \"disable-tab-to-links\" command-line switch.\n"]
1856 pub tab_to_links: cef_state_t,
1857 #[doc = "\n Controls whether local storage can be used. Also configurable using the\n \"disable-local-storage\" command-line switch.\n"]
1858 pub local_storage: cef_state_t,
1859 #[doc = "\n Controls whether databases can be used. Also configurable using the\n \"disable-databases\" command-line switch.\n"]
1860 pub databases: cef_state_t,
1861 #[doc = "\n Controls whether WebGL can be used. Note that WebGL requires hardware\n support and may not work on all systems even when enabled. Also\n configurable using the \"disable-webgl\" command-line switch.\n"]
1862 pub webgl: cef_state_t,
1863 #[doc = "\n Background color used for the browser before a document is loaded and when\n no document color is specified. The alpha component must be either fully\n opaque (0xFF) or fully transparent (0x00). If the alpha component is fully\n opaque then the RGB components will be used as the background color. If\n the alpha component is fully transparent for a windowed browser then the\n CefSettings.background_color value will be used. If the alpha component is\n fully transparent for a windowless (off-screen) browser then transparent\n painting will be enabled.\n"]
1864 pub background_color: cef_color_t,
1865 #[doc = "\n Comma delimited ordered list of language codes without any whitespace that\n will be used in the \"Accept-Language\" HTTP header. May be set globally\n using the CefSettings.accept_language_list value. If both values are\n empty then \"en-US,en\" will be used.\n"]
1866 pub accept_language_list: cef_string_t,
1867 #[doc = "\n Controls whether the Chrome status bubble will be used. Only supported\n with the Chrome runtime. For details about the status bubble see\n https://www.chromium.org/user-experience/status-bubble/\n"]
1868 pub chrome_status_bubble: cef_state_t,
1869}
1870#[test]
1871fn bindgen_test_layout__cef_browser_settings_t() {
1872 const UNINIT: ::std::mem::MaybeUninit<_cef_browser_settings_t> =
1873 ::std::mem::MaybeUninit::uninit();
1874 let ptr = UNINIT.as_ptr();
1875 assert_eq!(
1876 ::std::mem::size_of::<_cef_browser_settings_t>(),
1877 288usize,
1878 concat!("Size of: ", stringify!(_cef_browser_settings_t))
1879 );
1880 assert_eq!(
1881 ::std::mem::align_of::<_cef_browser_settings_t>(),
1882 8usize,
1883 concat!("Alignment of ", stringify!(_cef_browser_settings_t))
1884 );
1885 assert_eq!(
1886 unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
1887 0usize,
1888 concat!(
1889 "Offset of field: ",
1890 stringify!(_cef_browser_settings_t),
1891 "::",
1892 stringify!(size)
1893 )
1894 );
1895 assert_eq!(
1896 unsafe { ::std::ptr::addr_of!((*ptr).windowless_frame_rate) as usize - ptr as usize },
1897 8usize,
1898 concat!(
1899 "Offset of field: ",
1900 stringify!(_cef_browser_settings_t),
1901 "::",
1902 stringify!(windowless_frame_rate)
1903 )
1904 );
1905 assert_eq!(
1906 unsafe { ::std::ptr::addr_of!((*ptr).standard_font_family) as usize - ptr as usize },
1907 16usize,
1908 concat!(
1909 "Offset of field: ",
1910 stringify!(_cef_browser_settings_t),
1911 "::",
1912 stringify!(standard_font_family)
1913 )
1914 );
1915 assert_eq!(
1916 unsafe { ::std::ptr::addr_of!((*ptr).fixed_font_family) as usize - ptr as usize },
1917 40usize,
1918 concat!(
1919 "Offset of field: ",
1920 stringify!(_cef_browser_settings_t),
1921 "::",
1922 stringify!(fixed_font_family)
1923 )
1924 );
1925 assert_eq!(
1926 unsafe { ::std::ptr::addr_of!((*ptr).serif_font_family) as usize - ptr as usize },
1927 64usize,
1928 concat!(
1929 "Offset of field: ",
1930 stringify!(_cef_browser_settings_t),
1931 "::",
1932 stringify!(serif_font_family)
1933 )
1934 );
1935 assert_eq!(
1936 unsafe { ::std::ptr::addr_of!((*ptr).sans_serif_font_family) as usize - ptr as usize },
1937 88usize,
1938 concat!(
1939 "Offset of field: ",
1940 stringify!(_cef_browser_settings_t),
1941 "::",
1942 stringify!(sans_serif_font_family)
1943 )
1944 );
1945 assert_eq!(
1946 unsafe { ::std::ptr::addr_of!((*ptr).cursive_font_family) as usize - ptr as usize },
1947 112usize,
1948 concat!(
1949 "Offset of field: ",
1950 stringify!(_cef_browser_settings_t),
1951 "::",
1952 stringify!(cursive_font_family)
1953 )
1954 );
1955 assert_eq!(
1956 unsafe { ::std::ptr::addr_of!((*ptr).fantasy_font_family) as usize - ptr as usize },
1957 136usize,
1958 concat!(
1959 "Offset of field: ",
1960 stringify!(_cef_browser_settings_t),
1961 "::",
1962 stringify!(fantasy_font_family)
1963 )
1964 );
1965 assert_eq!(
1966 unsafe { ::std::ptr::addr_of!((*ptr).default_font_size) as usize - ptr as usize },
1967 160usize,
1968 concat!(
1969 "Offset of field: ",
1970 stringify!(_cef_browser_settings_t),
1971 "::",
1972 stringify!(default_font_size)
1973 )
1974 );
1975 assert_eq!(
1976 unsafe { ::std::ptr::addr_of!((*ptr).default_fixed_font_size) as usize - ptr as usize },
1977 164usize,
1978 concat!(
1979 "Offset of field: ",
1980 stringify!(_cef_browser_settings_t),
1981 "::",
1982 stringify!(default_fixed_font_size)
1983 )
1984 );
1985 assert_eq!(
1986 unsafe { ::std::ptr::addr_of!((*ptr).minimum_font_size) as usize - ptr as usize },
1987 168usize,
1988 concat!(
1989 "Offset of field: ",
1990 stringify!(_cef_browser_settings_t),
1991 "::",
1992 stringify!(minimum_font_size)
1993 )
1994 );
1995 assert_eq!(
1996 unsafe { ::std::ptr::addr_of!((*ptr).minimum_logical_font_size) as usize - ptr as usize },
1997 172usize,
1998 concat!(
1999 "Offset of field: ",
2000 stringify!(_cef_browser_settings_t),
2001 "::",
2002 stringify!(minimum_logical_font_size)
2003 )
2004 );
2005 assert_eq!(
2006 unsafe { ::std::ptr::addr_of!((*ptr).default_encoding) as usize - ptr as usize },
2007 176usize,
2008 concat!(
2009 "Offset of field: ",
2010 stringify!(_cef_browser_settings_t),
2011 "::",
2012 stringify!(default_encoding)
2013 )
2014 );
2015 assert_eq!(
2016 unsafe { ::std::ptr::addr_of!((*ptr).remote_fonts) as usize - ptr as usize },
2017 200usize,
2018 concat!(
2019 "Offset of field: ",
2020 stringify!(_cef_browser_settings_t),
2021 "::",
2022 stringify!(remote_fonts)
2023 )
2024 );
2025 assert_eq!(
2026 unsafe { ::std::ptr::addr_of!((*ptr).javascript) as usize - ptr as usize },
2027 204usize,
2028 concat!(
2029 "Offset of field: ",
2030 stringify!(_cef_browser_settings_t),
2031 "::",
2032 stringify!(javascript)
2033 )
2034 );
2035 assert_eq!(
2036 unsafe { ::std::ptr::addr_of!((*ptr).javascript_close_windows) as usize - ptr as usize },
2037 208usize,
2038 concat!(
2039 "Offset of field: ",
2040 stringify!(_cef_browser_settings_t),
2041 "::",
2042 stringify!(javascript_close_windows)
2043 )
2044 );
2045 assert_eq!(
2046 unsafe { ::std::ptr::addr_of!((*ptr).javascript_access_clipboard) as usize - ptr as usize },
2047 212usize,
2048 concat!(
2049 "Offset of field: ",
2050 stringify!(_cef_browser_settings_t),
2051 "::",
2052 stringify!(javascript_access_clipboard)
2053 )
2054 );
2055 assert_eq!(
2056 unsafe { ::std::ptr::addr_of!((*ptr).javascript_dom_paste) as usize - ptr as usize },
2057 216usize,
2058 concat!(
2059 "Offset of field: ",
2060 stringify!(_cef_browser_settings_t),
2061 "::",
2062 stringify!(javascript_dom_paste)
2063 )
2064 );
2065 assert_eq!(
2066 unsafe { ::std::ptr::addr_of!((*ptr).image_loading) as usize - ptr as usize },
2067 220usize,
2068 concat!(
2069 "Offset of field: ",
2070 stringify!(_cef_browser_settings_t),
2071 "::",
2072 stringify!(image_loading)
2073 )
2074 );
2075 assert_eq!(
2076 unsafe {
2077 ::std::ptr::addr_of!((*ptr).image_shrink_standalone_to_fit) as usize - ptr as usize
2078 },
2079 224usize,
2080 concat!(
2081 "Offset of field: ",
2082 stringify!(_cef_browser_settings_t),
2083 "::",
2084 stringify!(image_shrink_standalone_to_fit)
2085 )
2086 );
2087 assert_eq!(
2088 unsafe { ::std::ptr::addr_of!((*ptr).text_area_resize) as usize - ptr as usize },
2089 228usize,
2090 concat!(
2091 "Offset of field: ",
2092 stringify!(_cef_browser_settings_t),
2093 "::",
2094 stringify!(text_area_resize)
2095 )
2096 );
2097 assert_eq!(
2098 unsafe { ::std::ptr::addr_of!((*ptr).tab_to_links) as usize - ptr as usize },
2099 232usize,
2100 concat!(
2101 "Offset of field: ",
2102 stringify!(_cef_browser_settings_t),
2103 "::",
2104 stringify!(tab_to_links)
2105 )
2106 );
2107 assert_eq!(
2108 unsafe { ::std::ptr::addr_of!((*ptr).local_storage) as usize - ptr as usize },
2109 236usize,
2110 concat!(
2111 "Offset of field: ",
2112 stringify!(_cef_browser_settings_t),
2113 "::",
2114 stringify!(local_storage)
2115 )
2116 );
2117 assert_eq!(
2118 unsafe { ::std::ptr::addr_of!((*ptr).databases) as usize - ptr as usize },
2119 240usize,
2120 concat!(
2121 "Offset of field: ",
2122 stringify!(_cef_browser_settings_t),
2123 "::",
2124 stringify!(databases)
2125 )
2126 );
2127 assert_eq!(
2128 unsafe { ::std::ptr::addr_of!((*ptr).webgl) as usize - ptr as usize },
2129 244usize,
2130 concat!(
2131 "Offset of field: ",
2132 stringify!(_cef_browser_settings_t),
2133 "::",
2134 stringify!(webgl)
2135 )
2136 );
2137 assert_eq!(
2138 unsafe { ::std::ptr::addr_of!((*ptr).background_color) as usize - ptr as usize },
2139 248usize,
2140 concat!(
2141 "Offset of field: ",
2142 stringify!(_cef_browser_settings_t),
2143 "::",
2144 stringify!(background_color)
2145 )
2146 );
2147 assert_eq!(
2148 unsafe { ::std::ptr::addr_of!((*ptr).accept_language_list) as usize - ptr as usize },
2149 256usize,
2150 concat!(
2151 "Offset of field: ",
2152 stringify!(_cef_browser_settings_t),
2153 "::",
2154 stringify!(accept_language_list)
2155 )
2156 );
2157 assert_eq!(
2158 unsafe { ::std::ptr::addr_of!((*ptr).chrome_status_bubble) as usize - ptr as usize },
2159 280usize,
2160 concat!(
2161 "Offset of field: ",
2162 stringify!(_cef_browser_settings_t),
2163 "::",
2164 stringify!(chrome_status_bubble)
2165 )
2166 );
2167}
2168#[doc = "\n Browser initialization settings. Specify NULL or 0 to get the recommended\n default values. The consequences of using custom values may not be well\n tested. Many of these and other settings can also configured using command-\n line switches.\n"]
2169pub type cef_browser_settings_t = _cef_browser_settings_t;
2170#[repr(u32)]
2171#[non_exhaustive]
2172#[doc = "\n Return value types.\n"]
2173#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2174pub enum cef_return_value_t {
2175 #[doc = "\n Cancel immediately.\n"]
2176 RV_CANCEL = 0,
2177 #[doc = "\n Continue immediately.\n"]
2178 RV_CONTINUE = 1,
2179 #[doc = "\n Continue asynchronously (usually via a callback).\n"]
2180 RV_CONTINUE_ASYNC = 2,
2181}
2182#[doc = "\n URL component parts.\n"]
2183#[repr(C)]
2184#[derive(Debug, Copy, Clone)]
2185pub struct _cef_urlparts_t {
2186 #[doc = "\n The complete URL specification.\n"]
2187 pub spec: cef_string_t,
2188 #[doc = "\n Scheme component not including the colon (e.g., \"http\").\n"]
2189 pub scheme: cef_string_t,
2190 #[doc = "\n User name component.\n"]
2191 pub username: cef_string_t,
2192 #[doc = "\n Password component.\n"]
2193 pub password: cef_string_t,
2194 #[doc = "\n Host component. This may be a hostname, an IPv4 address or an IPv6 literal\n surrounded by square brackets (e.g., \"[2001:db8::1]\").\n"]
2195 pub host: cef_string_t,
2196 #[doc = "\n Port number component.\n"]
2197 pub port: cef_string_t,
2198 #[doc = "\n Origin contains just the scheme, host, and port from a URL. Equivalent to\n clearing any username and password, replacing the path with a slash, and\n clearing everything after that. This value will be empty for non-standard\n URLs.\n"]
2199 pub origin: cef_string_t,
2200 #[doc = "\n Path component including the first slash following the host.\n"]
2201 pub path: cef_string_t,
2202 #[doc = "\n Query string component (i.e., everything following the '?').\n"]
2203 pub query: cef_string_t,
2204 #[doc = "\n Fragment (hash) identifier component (i.e., the string following the '#').\n"]
2205 pub fragment: cef_string_t,
2206}
2207#[test]
2208fn bindgen_test_layout__cef_urlparts_t() {
2209 const UNINIT: ::std::mem::MaybeUninit<_cef_urlparts_t> = ::std::mem::MaybeUninit::uninit();
2210 let ptr = UNINIT.as_ptr();
2211 assert_eq!(
2212 ::std::mem::size_of::<_cef_urlparts_t>(),
2213 240usize,
2214 concat!("Size of: ", stringify!(_cef_urlparts_t))
2215 );
2216 assert_eq!(
2217 ::std::mem::align_of::<_cef_urlparts_t>(),
2218 8usize,
2219 concat!("Alignment of ", stringify!(_cef_urlparts_t))
2220 );
2221 assert_eq!(
2222 unsafe { ::std::ptr::addr_of!((*ptr).spec) as usize - ptr as usize },
2223 0usize,
2224 concat!(
2225 "Offset of field: ",
2226 stringify!(_cef_urlparts_t),
2227 "::",
2228 stringify!(spec)
2229 )
2230 );
2231 assert_eq!(
2232 unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize },
2233 24usize,
2234 concat!(
2235 "Offset of field: ",
2236 stringify!(_cef_urlparts_t),
2237 "::",
2238 stringify!(scheme)
2239 )
2240 );
2241 assert_eq!(
2242 unsafe { ::std::ptr::addr_of!((*ptr).username) as usize - ptr as usize },
2243 48usize,
2244 concat!(
2245 "Offset of field: ",
2246 stringify!(_cef_urlparts_t),
2247 "::",
2248 stringify!(username)
2249 )
2250 );
2251 assert_eq!(
2252 unsafe { ::std::ptr::addr_of!((*ptr).password) as usize - ptr as usize },
2253 72usize,
2254 concat!(
2255 "Offset of field: ",
2256 stringify!(_cef_urlparts_t),
2257 "::",
2258 stringify!(password)
2259 )
2260 );
2261 assert_eq!(
2262 unsafe { ::std::ptr::addr_of!((*ptr).host) as usize - ptr as usize },
2263 96usize,
2264 concat!(
2265 "Offset of field: ",
2266 stringify!(_cef_urlparts_t),
2267 "::",
2268 stringify!(host)
2269 )
2270 );
2271 assert_eq!(
2272 unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize },
2273 120usize,
2274 concat!(
2275 "Offset of field: ",
2276 stringify!(_cef_urlparts_t),
2277 "::",
2278 stringify!(port)
2279 )
2280 );
2281 assert_eq!(
2282 unsafe { ::std::ptr::addr_of!((*ptr).origin) as usize - ptr as usize },
2283 144usize,
2284 concat!(
2285 "Offset of field: ",
2286 stringify!(_cef_urlparts_t),
2287 "::",
2288 stringify!(origin)
2289 )
2290 );
2291 assert_eq!(
2292 unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize },
2293 168usize,
2294 concat!(
2295 "Offset of field: ",
2296 stringify!(_cef_urlparts_t),
2297 "::",
2298 stringify!(path)
2299 )
2300 );
2301 assert_eq!(
2302 unsafe { ::std::ptr::addr_of!((*ptr).query) as usize - ptr as usize },
2303 192usize,
2304 concat!(
2305 "Offset of field: ",
2306 stringify!(_cef_urlparts_t),
2307 "::",
2308 stringify!(query)
2309 )
2310 );
2311 assert_eq!(
2312 unsafe { ::std::ptr::addr_of!((*ptr).fragment) as usize - ptr as usize },
2313 216usize,
2314 concat!(
2315 "Offset of field: ",
2316 stringify!(_cef_urlparts_t),
2317 "::",
2318 stringify!(fragment)
2319 )
2320 );
2321}
2322#[doc = "\n URL component parts.\n"]
2323pub type cef_urlparts_t = _cef_urlparts_t;
2324#[repr(i32)]
2325#[non_exhaustive]
2326#[doc = "\n Cookie priority values.\n"]
2327#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2328pub enum cef_cookie_priority_t {
2329 CEF_COOKIE_PRIORITY_LOW = -1,
2330 CEF_COOKIE_PRIORITY_MEDIUM = 0,
2331 CEF_COOKIE_PRIORITY_HIGH = 1,
2332}
2333#[repr(u32)]
2334#[non_exhaustive]
2335#[doc = "\n Cookie same site values.\n"]
2336#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2337pub enum cef_cookie_same_site_t {
2338 CEF_COOKIE_SAME_SITE_UNSPECIFIED = 0,
2339 CEF_COOKIE_SAME_SITE_NO_RESTRICTION = 1,
2340 CEF_COOKIE_SAME_SITE_LAX_MODE = 2,
2341 CEF_COOKIE_SAME_SITE_STRICT_MODE = 3,
2342}
2343#[doc = "\n Cookie information.\n"]
2344#[repr(C)]
2345#[derive(Debug, Copy, Clone)]
2346pub struct _cef_cookie_t {
2347 #[doc = "\n The cookie name.\n"]
2348 pub name: cef_string_t,
2349 #[doc = "\n The cookie value.\n"]
2350 pub value: cef_string_t,
2351 #[doc = "\n If |domain| is empty a host cookie will be created instead of a domain\n cookie. Domain cookies are stored with a leading \".\" and are visible to\n sub-domains whereas host cookies are not.\n"]
2352 pub domain: cef_string_t,
2353 #[doc = "\n If |path| is non-empty only URLs at or below the path will get the cookie\n value.\n"]
2354 pub path: cef_string_t,
2355 #[doc = "\n If |secure| is true the cookie will only be sent for HTTPS requests.\n"]
2356 pub secure: ::std::os::raw::c_int,
2357 #[doc = "\n If |httponly| is true the cookie will only be sent for HTTP requests.\n"]
2358 pub httponly: ::std::os::raw::c_int,
2359 #[doc = "\n The cookie creation date. This is automatically populated by the system on\n cookie creation.\n"]
2360 pub creation: cef_basetime_t,
2361 #[doc = "\n The cookie last access date. This is automatically populated by the system\n on access.\n"]
2362 pub last_access: cef_basetime_t,
2363 #[doc = "\n The cookie expiration date is only valid if |has_expires| is true.\n"]
2364 pub has_expires: ::std::os::raw::c_int,
2365 pub expires: cef_basetime_t,
2366 #[doc = "\n Same site.\n"]
2367 pub same_site: cef_cookie_same_site_t,
2368 #[doc = "\n Priority.\n"]
2369 pub priority: cef_cookie_priority_t,
2370}
2371#[test]
2372fn bindgen_test_layout__cef_cookie_t() {
2373 const UNINIT: ::std::mem::MaybeUninit<_cef_cookie_t> = ::std::mem::MaybeUninit::uninit();
2374 let ptr = UNINIT.as_ptr();
2375 assert_eq!(
2376 ::std::mem::size_of::<_cef_cookie_t>(),
2377 144usize,
2378 concat!("Size of: ", stringify!(_cef_cookie_t))
2379 );
2380 assert_eq!(
2381 ::std::mem::align_of::<_cef_cookie_t>(),
2382 8usize,
2383 concat!("Alignment of ", stringify!(_cef_cookie_t))
2384 );
2385 assert_eq!(
2386 unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
2387 0usize,
2388 concat!(
2389 "Offset of field: ",
2390 stringify!(_cef_cookie_t),
2391 "::",
2392 stringify!(name)
2393 )
2394 );
2395 assert_eq!(
2396 unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
2397 24usize,
2398 concat!(
2399 "Offset of field: ",
2400 stringify!(_cef_cookie_t),
2401 "::",
2402 stringify!(value)
2403 )
2404 );
2405 assert_eq!(
2406 unsafe { ::std::ptr::addr_of!((*ptr).domain) as usize - ptr as usize },
2407 48usize,
2408 concat!(
2409 "Offset of field: ",
2410 stringify!(_cef_cookie_t),
2411 "::",
2412 stringify!(domain)
2413 )
2414 );
2415 assert_eq!(
2416 unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize },
2417 72usize,
2418 concat!(
2419 "Offset of field: ",
2420 stringify!(_cef_cookie_t),
2421 "::",
2422 stringify!(path)
2423 )
2424 );
2425 assert_eq!(
2426 unsafe { ::std::ptr::addr_of!((*ptr).secure) as usize - ptr as usize },
2427 96usize,
2428 concat!(
2429 "Offset of field: ",
2430 stringify!(_cef_cookie_t),
2431 "::",
2432 stringify!(secure)
2433 )
2434 );
2435 assert_eq!(
2436 unsafe { ::std::ptr::addr_of!((*ptr).httponly) as usize - ptr as usize },
2437 100usize,
2438 concat!(
2439 "Offset of field: ",
2440 stringify!(_cef_cookie_t),
2441 "::",
2442 stringify!(httponly)
2443 )
2444 );
2445 assert_eq!(
2446 unsafe { ::std::ptr::addr_of!((*ptr).creation) as usize - ptr as usize },
2447 104usize,
2448 concat!(
2449 "Offset of field: ",
2450 stringify!(_cef_cookie_t),
2451 "::",
2452 stringify!(creation)
2453 )
2454 );
2455 assert_eq!(
2456 unsafe { ::std::ptr::addr_of!((*ptr).last_access) as usize - ptr as usize },
2457 112usize,
2458 concat!(
2459 "Offset of field: ",
2460 stringify!(_cef_cookie_t),
2461 "::",
2462 stringify!(last_access)
2463 )
2464 );
2465 assert_eq!(
2466 unsafe { ::std::ptr::addr_of!((*ptr).has_expires) as usize - ptr as usize },
2467 120usize,
2468 concat!(
2469 "Offset of field: ",
2470 stringify!(_cef_cookie_t),
2471 "::",
2472 stringify!(has_expires)
2473 )
2474 );
2475 assert_eq!(
2476 unsafe { ::std::ptr::addr_of!((*ptr).expires) as usize - ptr as usize },
2477 128usize,
2478 concat!(
2479 "Offset of field: ",
2480 stringify!(_cef_cookie_t),
2481 "::",
2482 stringify!(expires)
2483 )
2484 );
2485 assert_eq!(
2486 unsafe { ::std::ptr::addr_of!((*ptr).same_site) as usize - ptr as usize },
2487 136usize,
2488 concat!(
2489 "Offset of field: ",
2490 stringify!(_cef_cookie_t),
2491 "::",
2492 stringify!(same_site)
2493 )
2494 );
2495 assert_eq!(
2496 unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize },
2497 140usize,
2498 concat!(
2499 "Offset of field: ",
2500 stringify!(_cef_cookie_t),
2501 "::",
2502 stringify!(priority)
2503 )
2504 );
2505}
2506#[doc = "\n Cookie information.\n"]
2507pub type cef_cookie_t = _cef_cookie_t;
2508#[repr(u32)]
2509#[non_exhaustive]
2510#[doc = "\n Process termination status values.\n"]
2511#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2512pub enum cef_termination_status_t {
2513 #[doc = "\n Non-zero exit status.\n"]
2514 TS_ABNORMAL_TERMINATION = 0,
2515 #[doc = "\n SIGKILL or task manager kill.\n"]
2516 TS_PROCESS_WAS_KILLED = 1,
2517 #[doc = "\n Segmentation fault.\n"]
2518 TS_PROCESS_CRASHED = 2,
2519 #[doc = "\n Out of memory. Some platforms may use TS_PROCESS_CRASHED instead.\n"]
2520 TS_PROCESS_OOM = 3,
2521}
2522#[repr(u32)]
2523#[non_exhaustive]
2524#[doc = "\n Path key values.\n"]
2525#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2526pub enum cef_path_key_t {
2527 #[doc = "\n Current directory.\n"]
2528 PK_DIR_CURRENT = 0,
2529 #[doc = "\n Directory containing PK_FILE_EXE.\n"]
2530 PK_DIR_EXE = 1,
2531 #[doc = "\n Directory containing PK_FILE_MODULE.\n"]
2532 PK_DIR_MODULE = 2,
2533 #[doc = "\n Temporary directory.\n"]
2534 PK_DIR_TEMP = 3,
2535 #[doc = "\n Path and filename of the current executable.\n"]
2536 PK_FILE_EXE = 4,
2537 #[doc = "\n Path and filename of the module containing the CEF code (usually the\n libcef module).\n"]
2538 PK_FILE_MODULE = 5,
2539 #[doc = "\n \"Local Settings\\Application Data\" directory under the user profile\n directory on Windows.\n"]
2540 PK_LOCAL_APP_DATA = 6,
2541 #[doc = "\n \"Application Data\" directory under the user profile directory on Windows\n and \"~/Library/Application Support\" directory on MacOS.\n"]
2542 PK_USER_DATA = 7,
2543 #[doc = "\n Directory containing application resources. Can be configured via\n CefSettings.resources_dir_path.\n"]
2544 PK_DIR_RESOURCES = 8,
2545}
2546#[repr(u32)]
2547#[non_exhaustive]
2548#[doc = "\n Storage types.\n"]
2549#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2550pub enum cef_storage_type_t {
2551 ST_LOCALSTORAGE = 0,
2552 ST_SESSIONSTORAGE = 1,
2553}
2554#[repr(i32)]
2555#[non_exhaustive]
2556#[doc = "\n Supported error code values. For the complete list of error values see\n \"include/base/internal/cef_net_error_list.h\".\n"]
2557#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2558pub enum cef_errorcode_t {
2559 ERR_NONE = 0,
2560 ERR_IO_PENDING = -1,
2561 ERR_FAILED = -2,
2562 ERR_ABORTED = -3,
2563 ERR_INVALID_ARGUMENT = -4,
2564 ERR_INVALID_HANDLE = -5,
2565 ERR_FILE_NOT_FOUND = -6,
2566 ERR_TIMED_OUT = -7,
2567 ERR_FILE_TOO_BIG = -8,
2568 ERR_UNEXPECTED = -9,
2569 ERR_ACCESS_DENIED = -10,
2570 ERR_NOT_IMPLEMENTED = -11,
2571 ERR_INSUFFICIENT_RESOURCES = -12,
2572 ERR_OUT_OF_MEMORY = -13,
2573 ERR_UPLOAD_FILE_CHANGED = -14,
2574 ERR_SOCKET_NOT_CONNECTED = -15,
2575 ERR_FILE_EXISTS = -16,
2576 ERR_FILE_PATH_TOO_LONG = -17,
2577 ERR_FILE_NO_SPACE = -18,
2578 ERR_FILE_VIRUS_INFECTED = -19,
2579 ERR_BLOCKED_BY_CLIENT = -20,
2580 ERR_NETWORK_CHANGED = -21,
2581 ERR_BLOCKED_BY_ADMINISTRATOR = -22,
2582 ERR_SOCKET_IS_CONNECTED = -23,
2583 ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = -25,
2584 ERR_CONTEXT_SHUT_DOWN = -26,
2585 ERR_BLOCKED_BY_RESPONSE = -27,
2586 ERR_CLEARTEXT_NOT_PERMITTED = -29,
2587 ERR_BLOCKED_BY_CSP = -30,
2588 ERR_H2_OR_QUIC_REQUIRED = -31,
2589 ERR_BLOCKED_BY_ORB = -32,
2590 ERR_CONNECTION_CLOSED = -100,
2591 ERR_CONNECTION_RESET = -101,
2592 ERR_CONNECTION_REFUSED = -102,
2593 ERR_CONNECTION_ABORTED = -103,
2594 ERR_CONNECTION_FAILED = -104,
2595 ERR_NAME_NOT_RESOLVED = -105,
2596 ERR_INTERNET_DISCONNECTED = -106,
2597 ERR_SSL_PROTOCOL_ERROR = -107,
2598 ERR_ADDRESS_INVALID = -108,
2599 ERR_ADDRESS_UNREACHABLE = -109,
2600 ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110,
2601 ERR_TUNNEL_CONNECTION_FAILED = -111,
2602 ERR_NO_SSL_VERSIONS_ENABLED = -112,
2603 ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113,
2604 ERR_SSL_RENEGOTIATION_REQUESTED = -114,
2605 ERR_PROXY_AUTH_UNSUPPORTED = -115,
2606 ERR_BAD_SSL_CLIENT_AUTH_CERT = -117,
2607 ERR_CONNECTION_TIMED_OUT = -118,
2608 ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = -119,
2609 ERR_SOCKS_CONNECTION_FAILED = -120,
2610 ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = -121,
2611 ERR_ALPN_NEGOTIATION_FAILED = -122,
2612 ERR_SSL_NO_RENEGOTIATION = -123,
2613 ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = -124,
2614 ERR_SSL_DECOMPRESSION_FAILURE_ALERT = -125,
2615 ERR_SSL_BAD_RECORD_MAC_ALERT = -126,
2616 ERR_PROXY_AUTH_REQUESTED = -127,
2617 ERR_PROXY_CONNECTION_FAILED = -130,
2618 ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = -131,
2619 ERR_PRECONNECT_MAX_SOCKET_LIMIT = -133,
2620 ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = -134,
2621 ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = -135,
2622 ERR_PROXY_CERTIFICATE_INVALID = -136,
2623 ERR_NAME_RESOLUTION_FAILED = -137,
2624 ERR_NETWORK_ACCESS_DENIED = -138,
2625 ERR_TEMPORARILY_THROTTLED = -139,
2626 ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = -140,
2627 ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = -141,
2628 ERR_MSG_TOO_BIG = -142,
2629 ERR_WS_PROTOCOL_ERROR = -145,
2630 ERR_ADDRESS_IN_USE = -147,
2631 ERR_SSL_HANDSHAKE_NOT_COMPLETED = -148,
2632 ERR_SSL_BAD_PEER_PUBLIC_KEY = -149,
2633 ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = -150,
2634 ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = -151,
2635 ERR_SSL_DECRYPT_ERROR_ALERT = -153,
2636 ERR_WS_THROTTLE_QUEUE_TOO_LARGE = -154,
2637 ERR_SSL_SERVER_CERT_CHANGED = -156,
2638 ERR_SSL_UNRECOGNIZED_NAME_ALERT = -159,
2639 ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = -160,
2640 ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = -161,
2641 ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = -162,
2642 ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = -163,
2643 ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = -164,
2644 ERR_ICANN_NAME_COLLISION = -166,
2645 ERR_SSL_SERVER_CERT_BAD_FORMAT = -167,
2646 ERR_CT_STH_PARSING_FAILED = -168,
2647 ERR_CT_STH_INCOMPLETE = -169,
2648 ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = -170,
2649 ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = -171,
2650 ERR_SSL_OBSOLETE_CIPHER = -172,
2651 ERR_WS_UPGRADE = -173,
2652 ERR_READ_IF_READY_NOT_IMPLEMENTED = -174,
2653 ERR_NO_BUFFER_SPACE = -176,
2654 ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = -177,
2655 ERR_EARLY_DATA_REJECTED = -178,
2656 ERR_WRONG_VERSION_ON_EARLY_DATA = -179,
2657 ERR_TLS13_DOWNGRADE_DETECTED = -180,
2658 ERR_SSL_KEY_USAGE_INCOMPATIBLE = -181,
2659 ERR_INVALID_ECH_CONFIG_LIST = -182,
2660 ERR_ECH_NOT_NEGOTIATED = -183,
2661 ERR_ECH_FALLBACK_CERTIFICATE_INVALID = -184,
2662 ERR_CERT_COMMON_NAME_INVALID = -200,
2663 ERR_CERT_DATE_INVALID = -201,
2664 ERR_CERT_AUTHORITY_INVALID = -202,
2665 ERR_CERT_CONTAINS_ERRORS = -203,
2666 ERR_CERT_NO_REVOCATION_MECHANISM = -204,
2667 ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205,
2668 ERR_CERT_REVOKED = -206,
2669 ERR_CERT_INVALID = -207,
2670 ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208,
2671 ERR_CERT_NON_UNIQUE_NAME = -210,
2672 ERR_CERT_WEAK_KEY = -211,
2673 ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212,
2674 ERR_CERT_VALIDITY_TOO_LONG = -213,
2675 ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = -214,
2676 ERR_CERT_SYMANTEC_LEGACY = -215,
2677 ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = -217,
2678 ERR_CERT_END = -219,
2679 ERR_INVALID_URL = -300,
2680 ERR_DISALLOWED_URL_SCHEME = -301,
2681 ERR_UNKNOWN_URL_SCHEME = -302,
2682 ERR_INVALID_REDIRECT = -303,
2683 ERR_TOO_MANY_REDIRECTS = -310,
2684 ERR_UNSAFE_REDIRECT = -311,
2685 ERR_UNSAFE_PORT = -312,
2686 ERR_INVALID_RESPONSE = -320,
2687 ERR_INVALID_CHUNKED_ENCODING = -321,
2688 ERR_METHOD_NOT_SUPPORTED = -322,
2689 ERR_UNEXPECTED_PROXY_AUTH = -323,
2690 ERR_EMPTY_RESPONSE = -324,
2691 ERR_RESPONSE_HEADERS_TOO_BIG = -325,
2692 ERR_PAC_SCRIPT_FAILED = -327,
2693 ERR_REQUEST_RANGE_NOT_SATISFIABLE = -328,
2694 ERR_MALFORMED_IDENTITY = -329,
2695 ERR_CONTENT_DECODING_FAILED = -330,
2696 ERR_NETWORK_IO_SUSPENDED = -331,
2697 ERR_SYN_REPLY_NOT_RECEIVED = -332,
2698 ERR_ENCODING_CONVERSION_FAILED = -333,
2699 ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = -334,
2700 ERR_NO_SUPPORTED_PROXIES = -336,
2701 ERR_HTTP2_PROTOCOL_ERROR = -337,
2702 ERR_INVALID_AUTH_CREDENTIALS = -338,
2703 ERR_UNSUPPORTED_AUTH_SCHEME = -339,
2704 ERR_ENCODING_DETECTION_FAILED = -340,
2705 ERR_MISSING_AUTH_CREDENTIALS = -341,
2706 ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = -342,
2707 ERR_MISCONFIGURED_AUTH_ENVIRONMENT = -343,
2708 ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = -344,
2709 ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = -345,
2710 ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = -346,
2711 ERR_INCOMPLETE_HTTP2_HEADERS = -347,
2712 ERR_PAC_NOT_IN_DHCP = -348,
2713 ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = -349,
2714 ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = -350,
2715 ERR_HTTP2_SERVER_REFUSED_STREAM = -351,
2716 ERR_HTTP2_PING_FAILED = -352,
2717 ERR_CONTENT_LENGTH_MISMATCH = -354,
2718 ERR_INCOMPLETE_CHUNKED_ENCODING = -355,
2719 ERR_QUIC_PROTOCOL_ERROR = -356,
2720 ERR_RESPONSE_HEADERS_TRUNCATED = -357,
2721 ERR_QUIC_HANDSHAKE_FAILED = -358,
2722 ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = -360,
2723 ERR_HTTP2_FLOW_CONTROL_ERROR = -361,
2724 ERR_HTTP2_FRAME_SIZE_ERROR = -362,
2725 ERR_HTTP2_COMPRESSION_ERROR = -363,
2726 ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = -364,
2727 ERR_HTTP_1_1_REQUIRED = -365,
2728 ERR_PROXY_HTTP_1_1_REQUIRED = -366,
2729 ERR_PAC_SCRIPT_TERMINATED = -367,
2730 ERR_INVALID_HTTP_RESPONSE = -370,
2731 ERR_CONTENT_DECODING_INIT_FAILED = -371,
2732 ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = -372,
2733 ERR_TOO_MANY_RETRIES = -375,
2734 ERR_HTTP2_STREAM_CLOSED = -376,
2735 ERR_HTTP_RESPONSE_CODE_FAILURE = -379,
2736 ERR_QUIC_CERT_ROOT_NOT_KNOWN = -380,
2737 ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = -381,
2738 ERR_TOO_MANY_ACCEPT_CH_RESTARTS = -382,
2739 ERR_INCONSISTENT_IP_ADDRESS_SPACE = -383,
2740 ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_POLICY = -384,
2741 ERR_CACHE_MISS = -400,
2742 ERR_CACHE_READ_FAILURE = -401,
2743 ERR_CACHE_WRITE_FAILURE = -402,
2744 ERR_CACHE_OPERATION_NOT_SUPPORTED = -403,
2745 ERR_CACHE_OPEN_FAILURE = -404,
2746 ERR_CACHE_CREATE_FAILURE = -405,
2747 ERR_CACHE_RACE = -406,
2748 ERR_CACHE_CHECKSUM_READ_FAILURE = -407,
2749 ERR_CACHE_CHECKSUM_MISMATCH = -408,
2750 ERR_CACHE_LOCK_TIMEOUT = -409,
2751 ERR_CACHE_AUTH_FAILURE_AFTER_READ = -410,
2752 ERR_CACHE_ENTRY_NOT_SUITABLE = -411,
2753 ERR_CACHE_DOOM_FAILURE = -412,
2754 ERR_CACHE_OPEN_OR_CREATE_FAILURE = -413,
2755 ERR_INSECURE_RESPONSE = -501,
2756 ERR_NO_PRIVATE_KEY_FOR_CERT = -502,
2757 ERR_ADD_USER_CERT_FAILED = -503,
2758 ERR_INVALID_SIGNED_EXCHANGE = -504,
2759 ERR_INVALID_WEB_BUNDLE = -505,
2760 ERR_TRUST_TOKEN_OPERATION_FAILED = -506,
2761 ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = -507,
2762 ERR_FTP_FAILED = -601,
2763 ERR_FTP_SERVICE_UNAVAILABLE = -602,
2764 ERR_FTP_TRANSFER_ABORTED = -603,
2765 ERR_FTP_FILE_BUSY = -604,
2766 ERR_FTP_SYNTAX_ERROR = -605,
2767 ERR_FTP_COMMAND_NOT_SUPPORTED = -606,
2768 ERR_FTP_BAD_COMMAND_SEQUENCE = -607,
2769 ERR_PKCS12_IMPORT_BAD_PASSWORD = -701,
2770 ERR_PKCS12_IMPORT_FAILED = -702,
2771 ERR_IMPORT_CA_CERT_NOT_CA = -703,
2772 ERR_IMPORT_CERT_ALREADY_EXISTS = -704,
2773 ERR_IMPORT_CA_CERT_FAILED = -705,
2774 ERR_IMPORT_SERVER_CERT_FAILED = -706,
2775 ERR_PKCS12_IMPORT_INVALID_MAC = -707,
2776 ERR_PKCS12_IMPORT_INVALID_FILE = -708,
2777 ERR_PKCS12_IMPORT_UNSUPPORTED = -709,
2778 ERR_KEY_GENERATION_FAILED = -710,
2779 ERR_PRIVATE_KEY_EXPORT_FAILED = -712,
2780 ERR_SELF_SIGNED_CERT_GENERATION_FAILED = -713,
2781 ERR_CERT_DATABASE_CHANGED = -714,
2782 ERR_CERT_VERIFIER_CHANGED = -716,
2783 ERR_DNS_MALFORMED_RESPONSE = -800,
2784 ERR_DNS_SERVER_REQUIRES_TCP = -801,
2785 ERR_DNS_SERVER_FAILED = -802,
2786 ERR_DNS_TIMED_OUT = -803,
2787 ERR_DNS_CACHE_MISS = -804,
2788 ERR_DNS_SEARCH_EMPTY = -805,
2789 ERR_DNS_SORT_ERROR = -806,
2790 ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = -808,
2791 ERR_DNS_NAME_HTTPS_ONLY = -809,
2792 ERR_DNS_REQUEST_CANCELLED = -810,
2793 ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = -811,
2794 ERR_DICTIONARY_LOAD_FAILED = -812,
2795}
2796#[repr(u32)]
2797#[non_exhaustive]
2798#[doc = "\n Supported certificate status code values. See net\\cert\\cert_status_flags.h\n for more information. CERT_STATUS_NONE is new in CEF because we use an\n enum while cert_status_flags.h uses a typedef and static const variables.\n"]
2799#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2800pub enum cef_cert_status_t {
2801 CERT_STATUS_NONE = 0,
2802 CERT_STATUS_COMMON_NAME_INVALID = 1,
2803 CERT_STATUS_DATE_INVALID = 2,
2804 CERT_STATUS_AUTHORITY_INVALID = 4,
2805 CERT_STATUS_NO_REVOCATION_MECHANISM = 16,
2806 CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = 32,
2807 CERT_STATUS_REVOKED = 64,
2808 CERT_STATUS_INVALID = 128,
2809 CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = 256,
2810 CERT_STATUS_NON_UNIQUE_NAME = 1024,
2811 CERT_STATUS_WEAK_KEY = 2048,
2812 CERT_STATUS_PINNED_KEY_MISSING = 8192,
2813 CERT_STATUS_NAME_CONSTRAINT_VIOLATION = 16384,
2814 CERT_STATUS_VALIDITY_TOO_LONG = 32768,
2815 CERT_STATUS_IS_EV = 65536,
2816 CERT_STATUS_REV_CHECKING_ENABLED = 131072,
2817 CERT_STATUS_SHA1_SIGNATURE_PRESENT = 524288,
2818 CERT_STATUS_CT_COMPLIANCE_FAILED = 1048576,
2819}
2820#[repr(u32)]
2821#[non_exhaustive]
2822#[doc = "\n The manner in which a link click should be opened. These constants match\n their equivalents in Chromium's window_open_disposition.h and should not be\n renumbered.\n"]
2823#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2824pub enum cef_window_open_disposition_t {
2825 WOD_UNKNOWN = 0,
2826 #[doc = "\n Current tab. This is the default in most cases.\n"]
2827 WOD_CURRENT_TAB = 1,
2828 #[doc = "\n Indicates that only one tab with the url should exist in the same window.\n"]
2829 WOD_SINGLETON_TAB = 2,
2830 #[doc = "\n Shift key + Middle mouse button or meta/ctrl key while clicking.\n"]
2831 WOD_NEW_FOREGROUND_TAB = 3,
2832 #[doc = "\n Middle mouse button or meta/ctrl key while clicking.\n"]
2833 WOD_NEW_BACKGROUND_TAB = 4,
2834 #[doc = "\n New popup window.\n"]
2835 WOD_NEW_POPUP = 5,
2836 #[doc = "\n Shift key while clicking.\n"]
2837 WOD_NEW_WINDOW = 6,
2838 #[doc = "\n Alt key while clicking.\n"]
2839 WOD_SAVE_TO_DISK = 7,
2840 #[doc = "\n New off-the-record (incognito) window.\n"]
2841 WOD_OFF_THE_RECORD = 8,
2842 #[doc = "\n Special case error condition from the renderer.\n"]
2843 WOD_IGNORE_ACTION = 9,
2844 #[doc = "\n Activates an existing tab containing the url, rather than navigating.\n This is similar to SINGLETON_TAB, but searches across all windows from\n the current profile and anonymity (instead of just the current one);\n closes the current tab on switching if the current tab was the NTP with\n no session history; and behaves like CURRENT_TAB instead of\n NEW_FOREGROUND_TAB when no existing tab is found.\n"]
2845 WOD_SWITCH_TO_TAB = 10,
2846 #[doc = "\n Creates a new document picture-in-picture window showing a child WebView.\n"]
2847 WOD_NEW_PICTURE_IN_PICTURE = 11,
2848}
2849impl cef_drag_operations_mask_t {
2850 pub const DRAG_OPERATION_NONE: cef_drag_operations_mask_t = cef_drag_operations_mask_t(0);
2851}
2852impl cef_drag_operations_mask_t {
2853 pub const DRAG_OPERATION_COPY: cef_drag_operations_mask_t = cef_drag_operations_mask_t(1);
2854}
2855impl cef_drag_operations_mask_t {
2856 pub const DRAG_OPERATION_LINK: cef_drag_operations_mask_t = cef_drag_operations_mask_t(2);
2857}
2858impl cef_drag_operations_mask_t {
2859 pub const DRAG_OPERATION_GENERIC: cef_drag_operations_mask_t = cef_drag_operations_mask_t(4);
2860}
2861impl cef_drag_operations_mask_t {
2862 pub const DRAG_OPERATION_PRIVATE: cef_drag_operations_mask_t = cef_drag_operations_mask_t(8);
2863}
2864impl cef_drag_operations_mask_t {
2865 pub const DRAG_OPERATION_MOVE: cef_drag_operations_mask_t = cef_drag_operations_mask_t(16);
2866}
2867impl cef_drag_operations_mask_t {
2868 pub const DRAG_OPERATION_DELETE: cef_drag_operations_mask_t = cef_drag_operations_mask_t(32);
2869}
2870impl cef_drag_operations_mask_t {
2871 pub const DRAG_OPERATION_EVERY: cef_drag_operations_mask_t =
2872 cef_drag_operations_mask_t(4294967295);
2873}
2874impl ::std::ops::BitOr<cef_drag_operations_mask_t> for cef_drag_operations_mask_t {
2875 type Output = Self;
2876 #[inline]
2877 fn bitor(self, other: Self) -> Self {
2878 cef_drag_operations_mask_t(self.0 | other.0)
2879 }
2880}
2881impl ::std::ops::BitOrAssign for cef_drag_operations_mask_t {
2882 #[inline]
2883 fn bitor_assign(&mut self, rhs: cef_drag_operations_mask_t) {
2884 self.0 |= rhs.0;
2885 }
2886}
2887impl ::std::ops::BitAnd<cef_drag_operations_mask_t> for cef_drag_operations_mask_t {
2888 type Output = Self;
2889 #[inline]
2890 fn bitand(self, other: Self) -> Self {
2891 cef_drag_operations_mask_t(self.0 & other.0)
2892 }
2893}
2894impl ::std::ops::BitAndAssign for cef_drag_operations_mask_t {
2895 #[inline]
2896 fn bitand_assign(&mut self, rhs: cef_drag_operations_mask_t) {
2897 self.0 &= rhs.0;
2898 }
2899}
2900#[repr(transparent)]
2901#[doc = "\n \"Verb\" of a drag-and-drop operation as negotiated between the source and\n destination. These constants match their equivalents in WebCore's\n DragActions.h and should not be renumbered.\n"]
2902#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2903pub struct cef_drag_operations_mask_t(pub ::std::os::raw::c_uint);
2904impl cef_text_input_mode_t {
2905 pub const CEF_TEXT_INPUT_MODE_MAX: cef_text_input_mode_t =
2906 cef_text_input_mode_t::CEF_TEXT_INPUT_MODE_SEARCH;
2907}
2908#[repr(u32)]
2909#[non_exhaustive]
2910#[doc = "\n Input mode of a virtual keyboard. These constants match their equivalents\n in Chromium's text_input_mode.h and should not be renumbered.\n See https://html.spec.whatwg.org/#input-modalities:-the-inputmode-attribute\n"]
2911#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2912pub enum cef_text_input_mode_t {
2913 CEF_TEXT_INPUT_MODE_DEFAULT = 0,
2914 CEF_TEXT_INPUT_MODE_NONE = 1,
2915 CEF_TEXT_INPUT_MODE_TEXT = 2,
2916 CEF_TEXT_INPUT_MODE_TEL = 3,
2917 CEF_TEXT_INPUT_MODE_URL = 4,
2918 CEF_TEXT_INPUT_MODE_EMAIL = 5,
2919 CEF_TEXT_INPUT_MODE_NUMERIC = 6,
2920 CEF_TEXT_INPUT_MODE_DECIMAL = 7,
2921 CEF_TEXT_INPUT_MODE_SEARCH = 8,
2922}
2923#[repr(u32)]
2924#[non_exhaustive]
2925#[doc = "\n V8 access control values.\n"]
2926#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2927pub enum cef_v8_accesscontrol_t {
2928 V8_ACCESS_CONTROL_DEFAULT = 0,
2929 V8_ACCESS_CONTROL_ALL_CAN_READ = 1,
2930 V8_ACCESS_CONTROL_ALL_CAN_WRITE = 2,
2931 V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = 4,
2932}
2933#[repr(u32)]
2934#[non_exhaustive]
2935#[doc = "\n V8 property attribute values.\n"]
2936#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2937pub enum cef_v8_propertyattribute_t {
2938 #[doc = "\n Writeable, Enumerable, Configurable\n"]
2939 V8_PROPERTY_ATTRIBUTE_NONE = 0,
2940 #[doc = "\n Not writeable\n"]
2941 V8_PROPERTY_ATTRIBUTE_READONLY = 1,
2942 #[doc = "\n Not enumerable\n"]
2943 V8_PROPERTY_ATTRIBUTE_DONTENUM = 2,
2944 #[doc = "\n Not configurable\n"]
2945 V8_PROPERTY_ATTRIBUTE_DONTDELETE = 4,
2946}
2947#[repr(u32)]
2948#[non_exhaustive]
2949#[doc = "\n Post data elements may represent either bytes or files.\n"]
2950#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2951pub enum cef_postdataelement_type_t {
2952 PDE_TYPE_EMPTY = 0,
2953 PDE_TYPE_BYTES = 1,
2954 PDE_TYPE_FILE = 2,
2955}
2956#[repr(u32)]
2957#[non_exhaustive]
2958#[doc = "\n Resource type for a request. These constants match their equivalents in\n Chromium's ResourceType and should not be renumbered.\n"]
2959#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2960pub enum cef_resource_type_t {
2961 #[doc = "\n Top level page.\n"]
2962 RT_MAIN_FRAME = 0,
2963 #[doc = "\n Frame or iframe.\n"]
2964 RT_SUB_FRAME = 1,
2965 #[doc = "\n CSS stylesheet.\n"]
2966 RT_STYLESHEET = 2,
2967 #[doc = "\n External script.\n"]
2968 RT_SCRIPT = 3,
2969 #[doc = "\n Image (jpg/gif/png/etc).\n"]
2970 RT_IMAGE = 4,
2971 #[doc = "\n Font.\n"]
2972 RT_FONT_RESOURCE = 5,
2973 #[doc = "\n Some other subresource. This is the default type if the actual type is\n unknown.\n"]
2974 RT_SUB_RESOURCE = 6,
2975 #[doc = "\n Object (or embed) tag for a plugin, or a resource that a plugin requested.\n"]
2976 RT_OBJECT = 7,
2977 #[doc = "\n Media resource.\n"]
2978 RT_MEDIA = 8,
2979 #[doc = "\n Main resource of a dedicated worker.\n"]
2980 RT_WORKER = 9,
2981 #[doc = "\n Main resource of a shared worker.\n"]
2982 RT_SHARED_WORKER = 10,
2983 #[doc = "\n Explicitly requested prefetch.\n"]
2984 RT_PREFETCH = 11,
2985 #[doc = "\n Favicon.\n"]
2986 RT_FAVICON = 12,
2987 #[doc = "\n XMLHttpRequest.\n"]
2988 RT_XHR = 13,
2989 #[doc = "\n A request for a \"<ping>\".\n"]
2990 RT_PING = 14,
2991 #[doc = "\n Main resource of a service worker.\n"]
2992 RT_SERVICE_WORKER = 15,
2993 #[doc = "\n A report of Content Security Policy violations.\n"]
2994 RT_CSP_REPORT = 16,
2995 #[doc = "\n A resource that a plugin requested.\n"]
2996 RT_PLUGIN_RESOURCE = 17,
2997 #[doc = "\n A main-frame service worker navigation preload request.\n"]
2998 RT_NAVIGATION_PRELOAD_MAIN_FRAME = 19,
2999 #[doc = "\n A sub-frame service worker navigation preload request.\n"]
3000 RT_NAVIGATION_PRELOAD_SUB_FRAME = 20,
3001}
3002#[repr(u32)]
3003#[non_exhaustive]
3004#[doc = "\n Transition type for a request. Made up of one source value and 0 or more\n qualifiers.\n"]
3005#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3006pub enum cef_transition_type_t {
3007 #[doc = "\n Source is a link click or the JavaScript window.open function. This is\n also the default value for requests like sub-resource loads that are not\n navigations.\n"]
3008 TT_LINK = 0,
3009 #[doc = "\n Source is some other \"explicit\" navigation. This is the default value for\n navigations where the actual type is unknown. See also\n TT_DIRECT_LOAD_FLAG.\n"]
3010 TT_EXPLICIT = 1,
3011 #[doc = "\n User got to this page through a suggestion in the UI (for example, via the\n destinations page). Chrome runtime only.\n"]
3012 TT_AUTO_BOOKMARK = 2,
3013 #[doc = "\n Source is a subframe navigation. This is any content that is automatically\n loaded in a non-toplevel frame. For example, if a page consists of several\n frames containing ads, those ad URLs will have this transition type.\n The user may not even realize the content in these pages is a separate\n frame, so may not care about the URL.\n"]
3014 TT_AUTO_SUBFRAME = 3,
3015 #[doc = "\n Source is a subframe navigation explicitly requested by the user that will\n generate new navigation entries in the back/forward list. These are\n probably more important than frames that were automatically loaded in\n the background because the user probably cares about the fact that this\n link was loaded.\n"]
3016 TT_MANUAL_SUBFRAME = 4,
3017 #[doc = "\n User got to this page by typing in the URL bar and selecting an entry\n that did not look like a URL. For example, a match might have the URL\n of a Google search result page, but appear like \"Search Google for ...\".\n These are not quite the same as EXPLICIT navigations because the user\n didn't type or see the destination URL. Chrome runtime only.\n See also TT_KEYWORD.\n"]
3018 TT_GENERATED = 5,
3019 #[doc = "\n This is a toplevel navigation. This is any content that is automatically\n loaded in a toplevel frame. For example, opening a tab to show the ASH\n screen saver, opening the devtools window, opening the NTP after the safe\n browsing warning, opening web-based dialog boxes are examples of\n AUTO_TOPLEVEL navigations. Chrome runtime only.\n"]
3020 TT_AUTO_TOPLEVEL = 6,
3021 #[doc = "\n Source is a form submission by the user. NOTE: In some situations\n submitting a form does not result in this transition type. This can happen\n if the form uses a script to submit the contents.\n"]
3022 TT_FORM_SUBMIT = 7,
3023 #[doc = "\n Source is a \"reload\" of the page via the Reload function or by re-visiting\n the same URL. NOTE: This is distinct from the concept of whether a\n particular load uses \"reload semantics\" (i.e. bypasses cached data).\n"]
3024 TT_RELOAD = 8,
3025 #[doc = "\n The url was generated from a replaceable keyword other than the default\n search provider. If the user types a keyword (which also applies to\n tab-to-search) in the omnibox this qualifier is applied to the transition\n type of the generated url. TemplateURLModel then may generate an\n additional visit with a transition type of TT_KEYWORD_GENERATED against\n the url 'http://' + keyword. For example, if you do a tab-to-search\n against wikipedia the generated url has a transition qualifer of\n TT_KEYWORD, and TemplateURLModel generates a visit for 'wikipedia.org'\n with a transition type of TT_KEYWORD_GENERATED. Chrome runtime only.\n"]
3026 TT_KEYWORD = 9,
3027 #[doc = "\n Corresponds to a visit generated for a keyword. See description of\n TT_KEYWORD for more details. Chrome runtime only.\n"]
3028 TT_KEYWORD_GENERATED = 10,
3029 #[doc = "\n General mask defining the bits used for the source values.\n"]
3030 TT_SOURCE_MASK = 255,
3031 #[doc = "\n Attempted to visit a URL but was blocked.\n"]
3032 TT_BLOCKED_FLAG = 8388608,
3033 #[doc = "\n Used the Forward or Back function to navigate among browsing history.\n Will be ORed to the transition type for the original load.\n"]
3034 TT_FORWARD_BACK_FLAG = 16777216,
3035 #[doc = "\n Loaded a URL directly via CreateBrowser, LoadURL or LoadRequest.\n"]
3036 TT_DIRECT_LOAD_FLAG = 33554432,
3037 #[doc = "\n User is navigating to the home page. Chrome runtime only.\n"]
3038 TT_HOME_PAGE_FLAG = 67108864,
3039 #[doc = "\n The transition originated from an external application; the exact\n definition of this is embedder dependent. Chrome runtime and\n extension system only.\n"]
3040 TT_FROM_API_FLAG = 134217728,
3041 #[doc = "\n The beginning of a navigation chain.\n"]
3042 TT_CHAIN_START_FLAG = 268435456,
3043 #[doc = "\n The last transition in a redirect chain.\n"]
3044 TT_CHAIN_END_FLAG = 536870912,
3045 #[doc = "\n Redirects caused by JavaScript or a meta refresh tag on the page.\n"]
3046 TT_CLIENT_REDIRECT_FLAG = 1073741824,
3047 #[doc = "\n Redirects sent from the server by HTTP headers.\n"]
3048 TT_SERVER_REDIRECT_FLAG = 2147483648,
3049 #[doc = "\n Used to test whether a transition involves a redirect.\n"]
3050 TT_IS_REDIRECT_MASK = 3221225472,
3051 #[doc = "\n General mask defining the bits used for the qualifiers.\n"]
3052 TT_QUALIFIER_MASK = 4294967040,
3053}
3054#[repr(u32)]
3055#[non_exhaustive]
3056#[doc = "\n Flags used to customize the behavior of CefURLRequest.\n"]
3057#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3058pub enum cef_urlrequest_flags_t {
3059 #[doc = "\n Default behavior.\n"]
3060 UR_FLAG_NONE = 0,
3061 #[doc = "\n If set the cache will be skipped when handling the request. Setting this\n value is equivalent to specifying the \"Cache-Control: no-cache\" request\n header. Setting this value in combination with UR_FLAG_ONLY_FROM_CACHE\n will cause the request to fail.\n"]
3062 UR_FLAG_SKIP_CACHE = 1,
3063 #[doc = "\n If set the request will fail if it cannot be served from the cache (or\n some equivalent local store). Setting this value is equivalent to\n specifying the \"Cache-Control: only-if-cached\" request header. Setting\n this value in combination with UR_FLAG_SKIP_CACHE or UR_FLAG_DISABLE_CACHE\n will cause the request to fail.\n"]
3064 UR_FLAG_ONLY_FROM_CACHE = 2,
3065 #[doc = "\n If set the cache will not be used at all. Setting this value is equivalent\n to specifying the \"Cache-Control: no-store\" request header. Setting this\n value in combination with UR_FLAG_ONLY_FROM_CACHE will cause the request\n to fail.\n"]
3066 UR_FLAG_DISABLE_CACHE = 4,
3067 #[doc = "\n If set user name, password, and cookies may be sent with the request, and\n cookies may be saved from the response.\n"]
3068 UR_FLAG_ALLOW_STORED_CREDENTIALS = 8,
3069 #[doc = "\n If set upload progress events will be generated when a request has a body.\n"]
3070 UR_FLAG_REPORT_UPLOAD_PROGRESS = 16,
3071 #[doc = "\n If set the CefURLRequestClient::OnDownloadData method will not be called.\n"]
3072 UR_FLAG_NO_DOWNLOAD_DATA = 32,
3073 #[doc = "\n If set 5XX redirect errors will be propagated to the observer instead of\n automatically re-tried. This currently only applies for requests\n originated in the browser process.\n"]
3074 UR_FLAG_NO_RETRY_ON_5XX = 64,
3075 #[doc = "\n If set 3XX responses will cause the fetch to halt immediately rather than\n continue through the redirect.\n"]
3076 UR_FLAG_STOP_ON_REDIRECT = 128,
3077}
3078#[repr(u32)]
3079#[non_exhaustive]
3080#[doc = "\n Flags that represent CefURLRequest status.\n"]
3081#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3082pub enum cef_urlrequest_status_t {
3083 #[doc = "\n Unknown status.\n"]
3084 UR_UNKNOWN = 0,
3085 #[doc = "\n Request succeeded.\n"]
3086 UR_SUCCESS = 1,
3087 #[doc = "\n An IO request is pending, and the caller will be informed when it is\n completed.\n"]
3088 UR_IO_PENDING = 2,
3089 #[doc = "\n Request was canceled programatically.\n"]
3090 UR_CANCELED = 3,
3091 #[doc = "\n Request failed for some reason.\n"]
3092 UR_FAILED = 4,
3093}
3094#[doc = " Structure representing a draggable region.\n"]
3095#[repr(C)]
3096#[derive(Debug, Copy, Clone)]
3097pub struct _cef_draggable_region_t {
3098 #[doc = "\n Bounds of the region.\n"]
3099 pub bounds: cef_rect_t,
3100 #[doc = "\n True (1) this this region is draggable and false (0) otherwise.\n"]
3101 pub draggable: ::std::os::raw::c_int,
3102}
3103#[test]
3104fn bindgen_test_layout__cef_draggable_region_t() {
3105 const UNINIT: ::std::mem::MaybeUninit<_cef_draggable_region_t> =
3106 ::std::mem::MaybeUninit::uninit();
3107 let ptr = UNINIT.as_ptr();
3108 assert_eq!(
3109 ::std::mem::size_of::<_cef_draggable_region_t>(),
3110 20usize,
3111 concat!("Size of: ", stringify!(_cef_draggable_region_t))
3112 );
3113 assert_eq!(
3114 ::std::mem::align_of::<_cef_draggable_region_t>(),
3115 4usize,
3116 concat!("Alignment of ", stringify!(_cef_draggable_region_t))
3117 );
3118 assert_eq!(
3119 unsafe { ::std::ptr::addr_of!((*ptr).bounds) as usize - ptr as usize },
3120 0usize,
3121 concat!(
3122 "Offset of field: ",
3123 stringify!(_cef_draggable_region_t),
3124 "::",
3125 stringify!(bounds)
3126 )
3127 );
3128 assert_eq!(
3129 unsafe { ::std::ptr::addr_of!((*ptr).draggable) as usize - ptr as usize },
3130 16usize,
3131 concat!(
3132 "Offset of field: ",
3133 stringify!(_cef_draggable_region_t),
3134 "::",
3135 stringify!(draggable)
3136 )
3137 );
3138}
3139#[doc = " Structure representing a draggable region.\n"]
3140pub type cef_draggable_region_t = _cef_draggable_region_t;
3141#[repr(u32)]
3142#[non_exhaustive]
3143#[doc = "\n Existing process IDs.\n"]
3144#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3145pub enum cef_process_id_t {
3146 #[doc = "\n Browser process.\n"]
3147 PID_BROWSER = 0,
3148 #[doc = "\n Renderer process.\n"]
3149 PID_RENDERER = 1,
3150}
3151#[repr(u32)]
3152#[non_exhaustive]
3153#[doc = "\n Existing thread IDs.\n"]
3154#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3155pub enum cef_thread_id_t {
3156 #[doc = "\n The main thread in the browser. This will be the same as the main\n application thread if CefInitialize() is called with a\n CefSettings.multi_threaded_message_loop value of false. Do not perform\n blocking tasks on this thread. All tasks posted after\n CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()\n are guaranteed to run. This thread will outlive all other CEF threads.\n"]
3157 TID_UI = 0,
3158 #[doc = "\n Used for blocking tasks like file system access where the user won't\n notice if the task takes an arbitrarily long time to complete. All tasks\n posted after CefBrowserProcessHandler::OnContextInitialized() and before\n CefShutdown() are guaranteed to run.\n"]
3159 TID_FILE_BACKGROUND = 1,
3160 #[doc = "\n Used for blocking tasks like file system access that affect UI or\n responsiveness of future user interactions. Do not use if an immediate\n response to a user interaction is expected. All tasks posted after\n CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()\n are guaranteed to run.\n Examples:\n - Updating the UI to reflect progress on a long task.\n - Loading data that might be shown in the UI after a future user\n interaction.\n"]
3161 TID_FILE_USER_VISIBLE = 2,
3162 #[doc = "\n Used for blocking tasks like file system access that affect UI\n immediately after a user interaction. All tasks posted after\n CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()\n are guaranteed to run.\n Example: Generating data shown in the UI immediately after a click.\n"]
3163 TID_FILE_USER_BLOCKING = 3,
3164 #[doc = "\n Used to launch and terminate browser processes.\n"]
3165 TID_PROCESS_LAUNCHER = 4,
3166 #[doc = "\n Used to process IPC and network messages. Do not perform blocking tasks on\n this thread. All tasks posted after\n CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()\n are guaranteed to run.\n"]
3167 TID_IO = 5,
3168 #[doc = "\n The main thread in the renderer. Used for all WebKit and V8 interaction.\n Tasks may be posted to this thread after\n CefRenderProcessHandler::OnWebKitInitialized but are not guaranteed to\n run before sub-process termination (sub-processes may be killed at any\n time without warning).\n"]
3169 TID_RENDERER = 6,
3170}
3171#[repr(u32)]
3172#[non_exhaustive]
3173#[doc = "\n Thread priority values listed in increasing order of importance.\n"]
3174#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3175pub enum cef_thread_priority_t {
3176 #[doc = "\n Suitable for threads that shouldn't disrupt high priority work.\n"]
3177 TP_BACKGROUND = 0,
3178 #[doc = "\n Default priority level.\n"]
3179 TP_NORMAL = 1,
3180 #[doc = "\n Suitable for threads which generate data for the display (at ~60Hz).\n"]
3181 TP_DISPLAY = 2,
3182 #[doc = "\n Suitable for low-latency, glitch-resistant audio.\n"]
3183 TP_REALTIME_AUDIO = 3,
3184}
3185#[repr(u32)]
3186#[non_exhaustive]
3187#[doc = "\n Message loop types. Indicates the set of asynchronous events that a message\n loop can process.\n"]
3188#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3189pub enum cef_message_loop_type_t {
3190 #[doc = "\n Supports tasks and timers.\n"]
3191 ML_TYPE_DEFAULT = 0,
3192 #[doc = "\n Supports tasks, timers and native UI events (e.g. Windows messages).\n"]
3193 ML_TYPE_UI = 1,
3194 #[doc = "\n Supports tasks, timers and asynchronous IO events.\n"]
3195 ML_TYPE_IO = 2,
3196}
3197#[repr(u32)]
3198#[non_exhaustive]
3199#[doc = "\n Windows COM initialization mode. Specifies how COM will be initialized for a\n new thread.\n"]
3200#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3201pub enum cef_com_init_mode_t {
3202 #[doc = "\n No COM initialization.\n"]
3203 COM_INIT_MODE_NONE = 0,
3204 #[doc = "\n Initialize COM using single-threaded apartments.\n"]
3205 COM_INIT_MODE_STA = 1,
3206 #[doc = "\n Initialize COM using multi-threaded apartments.\n"]
3207 COM_INIT_MODE_MTA = 2,
3208}
3209#[repr(u32)]
3210#[non_exhaustive]
3211#[doc = "\n Supported value types.\n"]
3212#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3213pub enum cef_value_type_t {
3214 VTYPE_INVALID = 0,
3215 VTYPE_NULL = 1,
3216 VTYPE_BOOL = 2,
3217 VTYPE_INT = 3,
3218 VTYPE_DOUBLE = 4,
3219 VTYPE_STRING = 5,
3220 VTYPE_BINARY = 6,
3221 VTYPE_DICTIONARY = 7,
3222 VTYPE_LIST = 8,
3223}
3224#[repr(u32)]
3225#[non_exhaustive]
3226#[doc = "\n Supported JavaScript dialog types.\n"]
3227#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3228pub enum cef_jsdialog_type_t {
3229 JSDIALOGTYPE_ALERT = 0,
3230 JSDIALOGTYPE_CONFIRM = 1,
3231 JSDIALOGTYPE_PROMPT = 2,
3232}
3233#[doc = "\n Screen information used when window rendering is disabled. This structure is\n passed as a parameter to CefRenderHandler::GetScreenInfo and should be\n filled in by the client.\n"]
3234#[repr(C)]
3235#[derive(Debug, Copy, Clone)]
3236pub struct _cef_screen_info_t {
3237 #[doc = "\n Device scale factor. Specifies the ratio between physical and logical\n pixels.\n"]
3238 pub device_scale_factor: f32,
3239 #[doc = "\n The screen depth in bits per pixel.\n"]
3240 pub depth: ::std::os::raw::c_int,
3241 #[doc = "\n The bits per color component. This assumes that the colors are balanced\n equally.\n"]
3242 pub depth_per_component: ::std::os::raw::c_int,
3243 #[doc = "\n This can be true for black and white printers.\n"]
3244 pub is_monochrome: ::std::os::raw::c_int,
3245 #[doc = " The |rect| and |available_rect| properties are used to determine the\n available surface for rendering popup views.\n"]
3246 pub rect: cef_rect_t,
3247 #[doc = " The |rect| and |available_rect| properties are used to determine the\n available surface for rendering popup views.\n"]
3248 pub available_rect: cef_rect_t,
3249}
3250#[test]
3251fn bindgen_test_layout__cef_screen_info_t() {
3252 const UNINIT: ::std::mem::MaybeUninit<_cef_screen_info_t> = ::std::mem::MaybeUninit::uninit();
3253 let ptr = UNINIT.as_ptr();
3254 assert_eq!(
3255 ::std::mem::size_of::<_cef_screen_info_t>(),
3256 48usize,
3257 concat!("Size of: ", stringify!(_cef_screen_info_t))
3258 );
3259 assert_eq!(
3260 ::std::mem::align_of::<_cef_screen_info_t>(),
3261 4usize,
3262 concat!("Alignment of ", stringify!(_cef_screen_info_t))
3263 );
3264 assert_eq!(
3265 unsafe { ::std::ptr::addr_of!((*ptr).device_scale_factor) as usize - ptr as usize },
3266 0usize,
3267 concat!(
3268 "Offset of field: ",
3269 stringify!(_cef_screen_info_t),
3270 "::",
3271 stringify!(device_scale_factor)
3272 )
3273 );
3274 assert_eq!(
3275 unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize },
3276 4usize,
3277 concat!(
3278 "Offset of field: ",
3279 stringify!(_cef_screen_info_t),
3280 "::",
3281 stringify!(depth)
3282 )
3283 );
3284 assert_eq!(
3285 unsafe { ::std::ptr::addr_of!((*ptr).depth_per_component) as usize - ptr as usize },
3286 8usize,
3287 concat!(
3288 "Offset of field: ",
3289 stringify!(_cef_screen_info_t),
3290 "::",
3291 stringify!(depth_per_component)
3292 )
3293 );
3294 assert_eq!(
3295 unsafe { ::std::ptr::addr_of!((*ptr).is_monochrome) as usize - ptr as usize },
3296 12usize,
3297 concat!(
3298 "Offset of field: ",
3299 stringify!(_cef_screen_info_t),
3300 "::",
3301 stringify!(is_monochrome)
3302 )
3303 );
3304 assert_eq!(
3305 unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize },
3306 16usize,
3307 concat!(
3308 "Offset of field: ",
3309 stringify!(_cef_screen_info_t),
3310 "::",
3311 stringify!(rect)
3312 )
3313 );
3314 assert_eq!(
3315 unsafe { ::std::ptr::addr_of!((*ptr).available_rect) as usize - ptr as usize },
3316 32usize,
3317 concat!(
3318 "Offset of field: ",
3319 stringify!(_cef_screen_info_t),
3320 "::",
3321 stringify!(available_rect)
3322 )
3323 );
3324}
3325#[doc = "\n Screen information used when window rendering is disabled. This structure is\n passed as a parameter to CefRenderHandler::GetScreenInfo and should be\n filled in by the client.\n"]
3326pub type cef_screen_info_t = _cef_screen_info_t;
3327impl cef_menu_id_t {
3328 pub const MENU_ID_SPELLCHECK_SUGGESTION_LAST: cef_menu_id_t =
3329 cef_menu_id_t::MENU_ID_SPELLCHECK_SUGGESTION_4;
3330}
3331#[repr(u32)]
3332#[non_exhaustive]
3333#[doc = "\n Supported menu IDs. Non-English translations can be provided for the\n IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString().\n"]
3334#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3335pub enum cef_menu_id_t {
3336 MENU_ID_BACK = 100,
3337 MENU_ID_FORWARD = 101,
3338 MENU_ID_RELOAD = 102,
3339 MENU_ID_RELOAD_NOCACHE = 103,
3340 MENU_ID_STOPLOAD = 104,
3341 MENU_ID_UNDO = 110,
3342 MENU_ID_REDO = 111,
3343 MENU_ID_CUT = 112,
3344 MENU_ID_COPY = 113,
3345 MENU_ID_PASTE = 114,
3346 MENU_ID_DELETE = 115,
3347 MENU_ID_SELECT_ALL = 116,
3348 MENU_ID_FIND = 130,
3349 MENU_ID_PRINT = 131,
3350 MENU_ID_VIEW_SOURCE = 132,
3351 MENU_ID_SPELLCHECK_SUGGESTION_0 = 200,
3352 MENU_ID_SPELLCHECK_SUGGESTION_1 = 201,
3353 MENU_ID_SPELLCHECK_SUGGESTION_2 = 202,
3354 MENU_ID_SPELLCHECK_SUGGESTION_3 = 203,
3355 MENU_ID_SPELLCHECK_SUGGESTION_4 = 204,
3356 MENU_ID_NO_SPELLING_SUGGESTIONS = 205,
3357 MENU_ID_ADD_TO_DICTIONARY = 206,
3358 MENU_ID_CUSTOM_FIRST = 220,
3359 MENU_ID_CUSTOM_LAST = 250,
3360 MENU_ID_USER_FIRST = 26500,
3361 MENU_ID_USER_LAST = 28500,
3362}
3363#[repr(u32)]
3364#[non_exhaustive]
3365#[doc = "\n Mouse button types.\n"]
3366#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3367pub enum cef_mouse_button_type_t {
3368 MBT_LEFT = 0,
3369 MBT_MIDDLE = 1,
3370 MBT_RIGHT = 2,
3371}
3372#[doc = "\n Structure representing mouse event information.\n"]
3373#[repr(C)]
3374#[derive(Debug, Copy, Clone)]
3375pub struct _cef_mouse_event_t {
3376 #[doc = "\n X coordinate relative to the left side of the view.\n"]
3377 pub x: ::std::os::raw::c_int,
3378 #[doc = "\n Y coordinate relative to the top side of the view.\n"]
3379 pub y: ::std::os::raw::c_int,
3380 #[doc = "\n Bit flags describing any pressed modifier keys. See\n cef_event_flags_t for values.\n"]
3381 pub modifiers: u32,
3382}
3383#[test]
3384fn bindgen_test_layout__cef_mouse_event_t() {
3385 const UNINIT: ::std::mem::MaybeUninit<_cef_mouse_event_t> = ::std::mem::MaybeUninit::uninit();
3386 let ptr = UNINIT.as_ptr();
3387 assert_eq!(
3388 ::std::mem::size_of::<_cef_mouse_event_t>(),
3389 12usize,
3390 concat!("Size of: ", stringify!(_cef_mouse_event_t))
3391 );
3392 assert_eq!(
3393 ::std::mem::align_of::<_cef_mouse_event_t>(),
3394 4usize,
3395 concat!("Alignment of ", stringify!(_cef_mouse_event_t))
3396 );
3397 assert_eq!(
3398 unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
3399 0usize,
3400 concat!(
3401 "Offset of field: ",
3402 stringify!(_cef_mouse_event_t),
3403 "::",
3404 stringify!(x)
3405 )
3406 );
3407 assert_eq!(
3408 unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
3409 4usize,
3410 concat!(
3411 "Offset of field: ",
3412 stringify!(_cef_mouse_event_t),
3413 "::",
3414 stringify!(y)
3415 )
3416 );
3417 assert_eq!(
3418 unsafe { ::std::ptr::addr_of!((*ptr).modifiers) as usize - ptr as usize },
3419 8usize,
3420 concat!(
3421 "Offset of field: ",
3422 stringify!(_cef_mouse_event_t),
3423 "::",
3424 stringify!(modifiers)
3425 )
3426 );
3427}
3428#[doc = "\n Structure representing mouse event information.\n"]
3429pub type cef_mouse_event_t = _cef_mouse_event_t;
3430#[repr(u32)]
3431#[non_exhaustive]
3432#[doc = "\n Touch points states types.\n"]
3433#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3434pub enum cef_touch_event_type_t {
3435 CEF_TET_RELEASED = 0,
3436 CEF_TET_PRESSED = 1,
3437 CEF_TET_MOVED = 2,
3438 CEF_TET_CANCELLED = 3,
3439}
3440#[repr(u32)]
3441#[non_exhaustive]
3442#[doc = "\n The device type that caused the event.\n"]
3443#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3444pub enum cef_pointer_type_t {
3445 CEF_POINTER_TYPE_TOUCH = 0,
3446 CEF_POINTER_TYPE_MOUSE = 1,
3447 CEF_POINTER_TYPE_PEN = 2,
3448 CEF_POINTER_TYPE_ERASER = 3,
3449 CEF_POINTER_TYPE_UNKNOWN = 4,
3450}
3451#[doc = "\n Structure representing touch event information.\n"]
3452#[repr(C)]
3453#[derive(Debug, Copy, Clone)]
3454pub struct _cef_touch_event_t {
3455 #[doc = "\n Id of a touch point. Must be unique per touch, can be any number except\n -1. Note that a maximum of 16 concurrent touches will be tracked; touches\n beyond that will be ignored.\n"]
3456 pub id: ::std::os::raw::c_int,
3457 #[doc = "\n X coordinate relative to the left side of the view.\n"]
3458 pub x: f32,
3459 #[doc = "\n Y coordinate relative to the top side of the view.\n"]
3460 pub y: f32,
3461 #[doc = "\n X radius in pixels. Set to 0 if not applicable.\n"]
3462 pub radius_x: f32,
3463 #[doc = "\n Y radius in pixels. Set to 0 if not applicable.\n"]
3464 pub radius_y: f32,
3465 #[doc = "\n Rotation angle in radians. Set to 0 if not applicable.\n"]
3466 pub rotation_angle: f32,
3467 #[doc = "\n The normalized pressure of the pointer input in the range of [0,1].\n Set to 0 if not applicable.\n"]
3468 pub pressure: f32,
3469 #[doc = "\n The state of the touch point. Touches begin with one CEF_TET_PRESSED event\n followed by zero or more CEF_TET_MOVED events and finally one\n CEF_TET_RELEASED or CEF_TET_CANCELLED event. Events not respecting this\n order will be ignored.\n"]
3470 pub type_: cef_touch_event_type_t,
3471 #[doc = "\n Bit flags describing any pressed modifier keys. See\n cef_event_flags_t for values.\n"]
3472 pub modifiers: u32,
3473 #[doc = "\n The device type that caused the event.\n"]
3474 pub pointer_type: cef_pointer_type_t,
3475}
3476#[test]
3477fn bindgen_test_layout__cef_touch_event_t() {
3478 const UNINIT: ::std::mem::MaybeUninit<_cef_touch_event_t> = ::std::mem::MaybeUninit::uninit();
3479 let ptr = UNINIT.as_ptr();
3480 assert_eq!(
3481 ::std::mem::size_of::<_cef_touch_event_t>(),
3482 40usize,
3483 concat!("Size of: ", stringify!(_cef_touch_event_t))
3484 );
3485 assert_eq!(
3486 ::std::mem::align_of::<_cef_touch_event_t>(),
3487 4usize,
3488 concat!("Alignment of ", stringify!(_cef_touch_event_t))
3489 );
3490 assert_eq!(
3491 unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
3492 0usize,
3493 concat!(
3494 "Offset of field: ",
3495 stringify!(_cef_touch_event_t),
3496 "::",
3497 stringify!(id)
3498 )
3499 );
3500 assert_eq!(
3501 unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
3502 4usize,
3503 concat!(
3504 "Offset of field: ",
3505 stringify!(_cef_touch_event_t),
3506 "::",
3507 stringify!(x)
3508 )
3509 );
3510 assert_eq!(
3511 unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
3512 8usize,
3513 concat!(
3514 "Offset of field: ",
3515 stringify!(_cef_touch_event_t),
3516 "::",
3517 stringify!(y)
3518 )
3519 );
3520 assert_eq!(
3521 unsafe { ::std::ptr::addr_of!((*ptr).radius_x) as usize - ptr as usize },
3522 12usize,
3523 concat!(
3524 "Offset of field: ",
3525 stringify!(_cef_touch_event_t),
3526 "::",
3527 stringify!(radius_x)
3528 )
3529 );
3530 assert_eq!(
3531 unsafe { ::std::ptr::addr_of!((*ptr).radius_y) as usize - ptr as usize },
3532 16usize,
3533 concat!(
3534 "Offset of field: ",
3535 stringify!(_cef_touch_event_t),
3536 "::",
3537 stringify!(radius_y)
3538 )
3539 );
3540 assert_eq!(
3541 unsafe { ::std::ptr::addr_of!((*ptr).rotation_angle) as usize - ptr as usize },
3542 20usize,
3543 concat!(
3544 "Offset of field: ",
3545 stringify!(_cef_touch_event_t),
3546 "::",
3547 stringify!(rotation_angle)
3548 )
3549 );
3550 assert_eq!(
3551 unsafe { ::std::ptr::addr_of!((*ptr).pressure) as usize - ptr as usize },
3552 24usize,
3553 concat!(
3554 "Offset of field: ",
3555 stringify!(_cef_touch_event_t),
3556 "::",
3557 stringify!(pressure)
3558 )
3559 );
3560 assert_eq!(
3561 unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
3562 28usize,
3563 concat!(
3564 "Offset of field: ",
3565 stringify!(_cef_touch_event_t),
3566 "::",
3567 stringify!(type_)
3568 )
3569 );
3570 assert_eq!(
3571 unsafe { ::std::ptr::addr_of!((*ptr).modifiers) as usize - ptr as usize },
3572 32usize,
3573 concat!(
3574 "Offset of field: ",
3575 stringify!(_cef_touch_event_t),
3576 "::",
3577 stringify!(modifiers)
3578 )
3579 );
3580 assert_eq!(
3581 unsafe { ::std::ptr::addr_of!((*ptr).pointer_type) as usize - ptr as usize },
3582 36usize,
3583 concat!(
3584 "Offset of field: ",
3585 stringify!(_cef_touch_event_t),
3586 "::",
3587 stringify!(pointer_type)
3588 )
3589 );
3590}
3591#[doc = "\n Structure representing touch event information.\n"]
3592pub type cef_touch_event_t = _cef_touch_event_t;
3593#[repr(u32)]
3594#[non_exhaustive]
3595#[doc = "\n Paint element types.\n"]
3596#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3597pub enum cef_paint_element_type_t {
3598 PET_VIEW = 0,
3599 PET_POPUP = 1,
3600}
3601#[repr(u32)]
3602#[non_exhaustive]
3603#[doc = "\n Supported event bit flags.\n"]
3604#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3605pub enum cef_event_flags_t {
3606 EVENTFLAG_NONE = 0,
3607 EVENTFLAG_CAPS_LOCK_ON = 1,
3608 EVENTFLAG_SHIFT_DOWN = 2,
3609 EVENTFLAG_CONTROL_DOWN = 4,
3610 EVENTFLAG_ALT_DOWN = 8,
3611 EVENTFLAG_LEFT_MOUSE_BUTTON = 16,
3612 EVENTFLAG_MIDDLE_MOUSE_BUTTON = 32,
3613 EVENTFLAG_RIGHT_MOUSE_BUTTON = 64,
3614 #[doc = " Mac OS-X command key."]
3615 EVENTFLAG_COMMAND_DOWN = 128,
3616 #[doc = " Mac OS-X command key."]
3617 EVENTFLAG_NUM_LOCK_ON = 256,
3618 #[doc = " Mac OS-X command key."]
3619 EVENTFLAG_IS_KEY_PAD = 512,
3620 #[doc = " Mac OS-X command key."]
3621 EVENTFLAG_IS_LEFT = 1024,
3622 #[doc = " Mac OS-X command key."]
3623 EVENTFLAG_IS_RIGHT = 2048,
3624 #[doc = " Mac OS-X command key."]
3625 EVENTFLAG_ALTGR_DOWN = 4096,
3626 #[doc = " Mac OS-X command key."]
3627 EVENTFLAG_IS_REPEAT = 8192,
3628}
3629#[repr(u32)]
3630#[non_exhaustive]
3631#[doc = "\n Supported menu item types.\n"]
3632#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3633pub enum cef_menu_item_type_t {
3634 MENUITEMTYPE_NONE = 0,
3635 MENUITEMTYPE_COMMAND = 1,
3636 MENUITEMTYPE_CHECK = 2,
3637 MENUITEMTYPE_RADIO = 3,
3638 MENUITEMTYPE_SEPARATOR = 4,
3639 MENUITEMTYPE_SUBMENU = 5,
3640}
3641#[repr(u32)]
3642#[non_exhaustive]
3643#[doc = "\n Supported context menu type flags.\n"]
3644#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3645pub enum cef_context_menu_type_flags_t {
3646 #[doc = "\n No node is selected.\n"]
3647 CM_TYPEFLAG_NONE = 0,
3648 #[doc = "\n The top page is selected.\n"]
3649 CM_TYPEFLAG_PAGE = 1,
3650 #[doc = "\n A subframe page is selected.\n"]
3651 CM_TYPEFLAG_FRAME = 2,
3652 #[doc = "\n A link is selected.\n"]
3653 CM_TYPEFLAG_LINK = 4,
3654 #[doc = "\n A media node is selected.\n"]
3655 CM_TYPEFLAG_MEDIA = 8,
3656 #[doc = "\n There is a textual or mixed selection that is selected.\n"]
3657 CM_TYPEFLAG_SELECTION = 16,
3658 #[doc = "\n An editable element is selected.\n"]
3659 CM_TYPEFLAG_EDITABLE = 32,
3660}
3661#[repr(u32)]
3662#[non_exhaustive]
3663#[doc = "\n Supported context menu media types. These constants match their equivalents\n in Chromium's ContextMenuDataMediaType and should not be renumbered.\n"]
3664#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3665pub enum cef_context_menu_media_type_t {
3666 #[doc = "\n No special node is in context.\n"]
3667 CM_MEDIATYPE_NONE = 0,
3668 #[doc = "\n An image node is selected.\n"]
3669 CM_MEDIATYPE_IMAGE = 1,
3670 #[doc = "\n A video node is selected.\n"]
3671 CM_MEDIATYPE_VIDEO = 2,
3672 #[doc = "\n An audio node is selected.\n"]
3673 CM_MEDIATYPE_AUDIO = 3,
3674 #[doc = "\n An canvas node is selected.\n"]
3675 CM_MEDIATYPE_CANVAS = 4,
3676 #[doc = "\n A file node is selected.\n"]
3677 CM_MEDIATYPE_FILE = 5,
3678 #[doc = "\n A plugin node is selected.\n"]
3679 CM_MEDIATYPE_PLUGIN = 6,
3680}
3681#[repr(u32)]
3682#[non_exhaustive]
3683#[doc = "\n Supported context menu media state bit flags. These constants match their\n equivalents in Chromium's ContextMenuData::MediaFlags and should not be\n renumbered.\n"]
3684#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3685pub enum cef_context_menu_media_state_flags_t {
3686 CM_MEDIAFLAG_NONE = 0,
3687 CM_MEDIAFLAG_IN_ERROR = 1,
3688 CM_MEDIAFLAG_PAUSED = 2,
3689 CM_MEDIAFLAG_MUTED = 4,
3690 CM_MEDIAFLAG_LOOP = 8,
3691 CM_MEDIAFLAG_CAN_SAVE = 16,
3692 CM_MEDIAFLAG_HAS_AUDIO = 32,
3693 CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS = 64,
3694 CM_MEDIAFLAG_CONTROLS = 128,
3695 CM_MEDIAFLAG_CAN_PRINT = 256,
3696 CM_MEDIAFLAG_CAN_ROTATE = 512,
3697 CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE = 1024,
3698 CM_MEDIAFLAG_PICTURE_IN_PICTURE = 2048,
3699 CM_MEDIAFLAG_CAN_LOOP = 4096,
3700}
3701#[repr(u32)]
3702#[non_exhaustive]
3703#[doc = "\n Supported context menu edit state bit flags. These constants match their\n equivalents in Chromium's ContextMenuDataEditFlags and should not be\n renumbered.\n"]
3704#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3705pub enum cef_context_menu_edit_state_flags_t {
3706 CM_EDITFLAG_NONE = 0,
3707 CM_EDITFLAG_CAN_UNDO = 1,
3708 CM_EDITFLAG_CAN_REDO = 2,
3709 CM_EDITFLAG_CAN_CUT = 4,
3710 CM_EDITFLAG_CAN_COPY = 8,
3711 CM_EDITFLAG_CAN_PASTE = 16,
3712 CM_EDITFLAG_CAN_DELETE = 32,
3713 CM_EDITFLAG_CAN_SELECT_ALL = 64,
3714 CM_EDITFLAG_CAN_TRANSLATE = 128,
3715 CM_EDITFLAG_CAN_EDIT_RICHLY = 256,
3716}
3717#[repr(u32)]
3718#[non_exhaustive]
3719#[doc = "\n Supported quick menu state bit flags.\n"]
3720#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3721pub enum cef_quick_menu_edit_state_flags_t {
3722 QM_EDITFLAG_NONE = 0,
3723 QM_EDITFLAG_CAN_ELLIPSIS = 1,
3724 QM_EDITFLAG_CAN_CUT = 2,
3725 QM_EDITFLAG_CAN_COPY = 4,
3726 QM_EDITFLAG_CAN_PASTE = 8,
3727}
3728#[repr(u32)]
3729#[non_exhaustive]
3730#[doc = "\n Key event types.\n"]
3731#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3732pub enum cef_key_event_type_t {
3733 #[doc = "\n Notification that a key transitioned from \"up\" to \"down\".\n"]
3734 KEYEVENT_RAWKEYDOWN = 0,
3735 #[doc = "\n Notification that a key was pressed. This does not necessarily correspond\n to a character depending on the key and language. Use KEYEVENT_CHAR for\n character input.\n"]
3736 KEYEVENT_KEYDOWN = 1,
3737 #[doc = "\n Notification that a key was released.\n"]
3738 KEYEVENT_KEYUP = 2,
3739 #[doc = "\n Notification that a character was typed. Use this for text input. Key\n down events may generate 0, 1, or more than one character event depending\n on the key, locale, and operating system.\n"]
3740 KEYEVENT_CHAR = 3,
3741}
3742#[doc = "\n Structure representing keyboard event information.\n"]
3743#[repr(C)]
3744#[derive(Debug, Copy, Clone)]
3745pub struct _cef_key_event_t {
3746 #[doc = "\n The type of keyboard event.\n"]
3747 pub type_: cef_key_event_type_t,
3748 #[doc = "\n Bit flags describing any pressed modifier keys. See\n cef_event_flags_t for values.\n"]
3749 pub modifiers: u32,
3750 #[doc = "\n The Windows key code for the key event. This value is used by the DOM\n specification. Sometimes it comes directly from the event (i.e. on\n Windows) and sometimes it's determined using a mapping function. See\n WebCore/platform/chromium/KeyboardCodes.h for the list of values.\n"]
3751 pub windows_key_code: ::std::os::raw::c_int,
3752 #[doc = "\n The actual key code genenerated by the platform.\n"]
3753 pub native_key_code: ::std::os::raw::c_int,
3754 #[doc = "\n Indicates whether the event is considered a \"system key\" event (see\n http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details).\n This value will always be false on non-Windows platforms.\n"]
3755 pub is_system_key: ::std::os::raw::c_int,
3756 #[doc = "\n The character generated by the keystroke.\n"]
3757 pub character: char16_t,
3758 #[doc = "\n Same as |character| but unmodified by any concurrently-held modifiers\n (except shift). This is useful for working out shortcut keys.\n"]
3759 pub unmodified_character: char16_t,
3760 #[doc = "\n True if the focus is currently on an editable field on the page. This is\n useful for determining if standard key events should be intercepted.\n"]
3761 pub focus_on_editable_field: ::std::os::raw::c_int,
3762}
3763#[test]
3764fn bindgen_test_layout__cef_key_event_t() {
3765 const UNINIT: ::std::mem::MaybeUninit<_cef_key_event_t> = ::std::mem::MaybeUninit::uninit();
3766 let ptr = UNINIT.as_ptr();
3767 assert_eq!(
3768 ::std::mem::size_of::<_cef_key_event_t>(),
3769 28usize,
3770 concat!("Size of: ", stringify!(_cef_key_event_t))
3771 );
3772 assert_eq!(
3773 ::std::mem::align_of::<_cef_key_event_t>(),
3774 4usize,
3775 concat!("Alignment of ", stringify!(_cef_key_event_t))
3776 );
3777 assert_eq!(
3778 unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
3779 0usize,
3780 concat!(
3781 "Offset of field: ",
3782 stringify!(_cef_key_event_t),
3783 "::",
3784 stringify!(type_)
3785 )
3786 );
3787 assert_eq!(
3788 unsafe { ::std::ptr::addr_of!((*ptr).modifiers) as usize - ptr as usize },
3789 4usize,
3790 concat!(
3791 "Offset of field: ",
3792 stringify!(_cef_key_event_t),
3793 "::",
3794 stringify!(modifiers)
3795 )
3796 );
3797 assert_eq!(
3798 unsafe { ::std::ptr::addr_of!((*ptr).windows_key_code) as usize - ptr as usize },
3799 8usize,
3800 concat!(
3801 "Offset of field: ",
3802 stringify!(_cef_key_event_t),
3803 "::",
3804 stringify!(windows_key_code)
3805 )
3806 );
3807 assert_eq!(
3808 unsafe { ::std::ptr::addr_of!((*ptr).native_key_code) as usize - ptr as usize },
3809 12usize,
3810 concat!(
3811 "Offset of field: ",
3812 stringify!(_cef_key_event_t),
3813 "::",
3814 stringify!(native_key_code)
3815 )
3816 );
3817 assert_eq!(
3818 unsafe { ::std::ptr::addr_of!((*ptr).is_system_key) as usize - ptr as usize },
3819 16usize,
3820 concat!(
3821 "Offset of field: ",
3822 stringify!(_cef_key_event_t),
3823 "::",
3824 stringify!(is_system_key)
3825 )
3826 );
3827 assert_eq!(
3828 unsafe { ::std::ptr::addr_of!((*ptr).character) as usize - ptr as usize },
3829 20usize,
3830 concat!(
3831 "Offset of field: ",
3832 stringify!(_cef_key_event_t),
3833 "::",
3834 stringify!(character)
3835 )
3836 );
3837 assert_eq!(
3838 unsafe { ::std::ptr::addr_of!((*ptr).unmodified_character) as usize - ptr as usize },
3839 22usize,
3840 concat!(
3841 "Offset of field: ",
3842 stringify!(_cef_key_event_t),
3843 "::",
3844 stringify!(unmodified_character)
3845 )
3846 );
3847 assert_eq!(
3848 unsafe { ::std::ptr::addr_of!((*ptr).focus_on_editable_field) as usize - ptr as usize },
3849 24usize,
3850 concat!(
3851 "Offset of field: ",
3852 stringify!(_cef_key_event_t),
3853 "::",
3854 stringify!(focus_on_editable_field)
3855 )
3856 );
3857}
3858#[doc = "\n Structure representing keyboard event information.\n"]
3859pub type cef_key_event_t = _cef_key_event_t;
3860#[repr(u32)]
3861#[non_exhaustive]
3862#[doc = "\n Focus sources.\n"]
3863#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3864pub enum cef_focus_source_t {
3865 #[doc = "\n The source is explicit navigation via the API (LoadURL(), etc).\n"]
3866 FOCUS_SOURCE_NAVIGATION = 0,
3867 #[doc = "\n The source is a system-generated focus event.\n"]
3868 FOCUS_SOURCE_SYSTEM = 1,
3869}
3870#[repr(u32)]
3871#[non_exhaustive]
3872#[doc = "\n Navigation types.\n"]
3873#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3874pub enum cef_navigation_type_t {
3875 NAVIGATION_LINK_CLICKED = 0,
3876 NAVIGATION_FORM_SUBMITTED = 1,
3877 NAVIGATION_BACK_FORWARD = 2,
3878 NAVIGATION_RELOAD = 3,
3879 NAVIGATION_FORM_RESUBMITTED = 4,
3880 NAVIGATION_OTHER = 5,
3881}
3882#[repr(u32)]
3883#[non_exhaustive]
3884#[doc = "\n Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and\n UTF16 (LE and BE) by default. All other types must be translated to UTF8\n before being passed to the parser. If a BOM is detected and the correct\n decoder is available then that decoder will be used automatically.\n"]
3885#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3886pub enum cef_xml_encoding_type_t {
3887 XML_ENCODING_NONE = 0,
3888 XML_ENCODING_UTF8 = 1,
3889 XML_ENCODING_UTF16LE = 2,
3890 XML_ENCODING_UTF16BE = 3,
3891 XML_ENCODING_ASCII = 4,
3892}
3893#[repr(u32)]
3894#[non_exhaustive]
3895#[doc = "\n XML node types.\n"]
3896#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3897pub enum cef_xml_node_type_t {
3898 XML_NODE_UNSUPPORTED = 0,
3899 XML_NODE_PROCESSING_INSTRUCTION = 1,
3900 XML_NODE_DOCUMENT_TYPE = 2,
3901 XML_NODE_ELEMENT_START = 3,
3902 XML_NODE_ELEMENT_END = 4,
3903 XML_NODE_ATTRIBUTE = 5,
3904 XML_NODE_TEXT = 6,
3905 XML_NODE_CDATA = 7,
3906 XML_NODE_ENTITY_REFERENCE = 8,
3907 XML_NODE_WHITESPACE = 9,
3908 XML_NODE_COMMENT = 10,
3909}
3910#[doc = "\n Popup window features.\n"]
3911#[repr(C)]
3912#[derive(Debug, Copy, Clone)]
3913pub struct _cef_popup_features_t {
3914 pub x: ::std::os::raw::c_int,
3915 pub xSet: ::std::os::raw::c_int,
3916 pub y: ::std::os::raw::c_int,
3917 pub ySet: ::std::os::raw::c_int,
3918 pub width: ::std::os::raw::c_int,
3919 pub widthSet: ::std::os::raw::c_int,
3920 pub height: ::std::os::raw::c_int,
3921 pub heightSet: ::std::os::raw::c_int,
3922 #[doc = " True (1) if browser interface elements should be hidden."]
3923 pub isPopup: ::std::os::raw::c_int,
3924}
3925#[test]
3926fn bindgen_test_layout__cef_popup_features_t() {
3927 const UNINIT: ::std::mem::MaybeUninit<_cef_popup_features_t> =
3928 ::std::mem::MaybeUninit::uninit();
3929 let ptr = UNINIT.as_ptr();
3930 assert_eq!(
3931 ::std::mem::size_of::<_cef_popup_features_t>(),
3932 36usize,
3933 concat!("Size of: ", stringify!(_cef_popup_features_t))
3934 );
3935 assert_eq!(
3936 ::std::mem::align_of::<_cef_popup_features_t>(),
3937 4usize,
3938 concat!("Alignment of ", stringify!(_cef_popup_features_t))
3939 );
3940 assert_eq!(
3941 unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
3942 0usize,
3943 concat!(
3944 "Offset of field: ",
3945 stringify!(_cef_popup_features_t),
3946 "::",
3947 stringify!(x)
3948 )
3949 );
3950 assert_eq!(
3951 unsafe { ::std::ptr::addr_of!((*ptr).xSet) as usize - ptr as usize },
3952 4usize,
3953 concat!(
3954 "Offset of field: ",
3955 stringify!(_cef_popup_features_t),
3956 "::",
3957 stringify!(xSet)
3958 )
3959 );
3960 assert_eq!(
3961 unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
3962 8usize,
3963 concat!(
3964 "Offset of field: ",
3965 stringify!(_cef_popup_features_t),
3966 "::",
3967 stringify!(y)
3968 )
3969 );
3970 assert_eq!(
3971 unsafe { ::std::ptr::addr_of!((*ptr).ySet) as usize - ptr as usize },
3972 12usize,
3973 concat!(
3974 "Offset of field: ",
3975 stringify!(_cef_popup_features_t),
3976 "::",
3977 stringify!(ySet)
3978 )
3979 );
3980 assert_eq!(
3981 unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize },
3982 16usize,
3983 concat!(
3984 "Offset of field: ",
3985 stringify!(_cef_popup_features_t),
3986 "::",
3987 stringify!(width)
3988 )
3989 );
3990 assert_eq!(
3991 unsafe { ::std::ptr::addr_of!((*ptr).widthSet) as usize - ptr as usize },
3992 20usize,
3993 concat!(
3994 "Offset of field: ",
3995 stringify!(_cef_popup_features_t),
3996 "::",
3997 stringify!(widthSet)
3998 )
3999 );
4000 assert_eq!(
4001 unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize },
4002 24usize,
4003 concat!(
4004 "Offset of field: ",
4005 stringify!(_cef_popup_features_t),
4006 "::",
4007 stringify!(height)
4008 )
4009 );
4010 assert_eq!(
4011 unsafe { ::std::ptr::addr_of!((*ptr).heightSet) as usize - ptr as usize },
4012 28usize,
4013 concat!(
4014 "Offset of field: ",
4015 stringify!(_cef_popup_features_t),
4016 "::",
4017 stringify!(heightSet)
4018 )
4019 );
4020 assert_eq!(
4021 unsafe { ::std::ptr::addr_of!((*ptr).isPopup) as usize - ptr as usize },
4022 32usize,
4023 concat!(
4024 "Offset of field: ",
4025 stringify!(_cef_popup_features_t),
4026 "::",
4027 stringify!(isPopup)
4028 )
4029 );
4030}
4031#[doc = "\n Popup window features.\n"]
4032pub type cef_popup_features_t = _cef_popup_features_t;
4033#[repr(u32)]
4034#[non_exhaustive]
4035#[doc = "\n DOM document types.\n"]
4036#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4037pub enum cef_dom_document_type_t {
4038 DOM_DOCUMENT_TYPE_UNKNOWN = 0,
4039 DOM_DOCUMENT_TYPE_HTML = 1,
4040 DOM_DOCUMENT_TYPE_XHTML = 2,
4041 DOM_DOCUMENT_TYPE_PLUGIN = 3,
4042}
4043#[repr(u32)]
4044#[non_exhaustive]
4045#[doc = "\n DOM event category flags.\n"]
4046#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4047pub enum cef_dom_event_category_t {
4048 DOM_EVENT_CATEGORY_UNKNOWN = 0,
4049 DOM_EVENT_CATEGORY_UI = 1,
4050 DOM_EVENT_CATEGORY_MOUSE = 2,
4051 DOM_EVENT_CATEGORY_MUTATION = 4,
4052 DOM_EVENT_CATEGORY_KEYBOARD = 8,
4053 DOM_EVENT_CATEGORY_TEXT = 16,
4054 DOM_EVENT_CATEGORY_COMPOSITION = 32,
4055 DOM_EVENT_CATEGORY_DRAG = 64,
4056 DOM_EVENT_CATEGORY_CLIPBOARD = 128,
4057 DOM_EVENT_CATEGORY_MESSAGE = 256,
4058 DOM_EVENT_CATEGORY_WHEEL = 512,
4059 DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = 1024,
4060 DOM_EVENT_CATEGORY_OVERFLOW = 2048,
4061 DOM_EVENT_CATEGORY_PAGE_TRANSITION = 4096,
4062 DOM_EVENT_CATEGORY_POPSTATE = 8192,
4063 DOM_EVENT_CATEGORY_PROGRESS = 16384,
4064 DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 32768,
4065}
4066#[repr(u32)]
4067#[non_exhaustive]
4068#[doc = "\n DOM event processing phases.\n"]
4069#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4070pub enum cef_dom_event_phase_t {
4071 DOM_EVENT_PHASE_UNKNOWN = 0,
4072 DOM_EVENT_PHASE_CAPTURING = 1,
4073 DOM_EVENT_PHASE_AT_TARGET = 2,
4074 DOM_EVENT_PHASE_BUBBLING = 3,
4075}
4076#[repr(u32)]
4077#[non_exhaustive]
4078#[doc = "\n DOM node types.\n"]
4079#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4080pub enum cef_dom_node_type_t {
4081 DOM_NODE_TYPE_UNSUPPORTED = 0,
4082 DOM_NODE_TYPE_ELEMENT = 1,
4083 DOM_NODE_TYPE_ATTRIBUTE = 2,
4084 DOM_NODE_TYPE_TEXT = 3,
4085 DOM_NODE_TYPE_CDATA_SECTION = 4,
4086 DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS = 5,
4087 DOM_NODE_TYPE_COMMENT = 6,
4088 DOM_NODE_TYPE_DOCUMENT = 7,
4089 DOM_NODE_TYPE_DOCUMENT_TYPE = 8,
4090 DOM_NODE_TYPE_DOCUMENT_FRAGMENT = 9,
4091}
4092#[repr(u32)]
4093#[non_exhaustive]
4094#[doc = "\n Supported file dialog modes.\n"]
4095#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4096pub enum cef_file_dialog_mode_t {
4097 #[doc = "\n Requires that the file exists before allowing the user to pick it.\n"]
4098 FILE_DIALOG_OPEN = 0,
4099 #[doc = "\n Like Open, but allows picking multiple files to open.\n"]
4100 FILE_DIALOG_OPEN_MULTIPLE = 1,
4101 #[doc = "\n Like Open, but selects a folder to open.\n"]
4102 FILE_DIALOG_OPEN_FOLDER = 2,
4103 #[doc = "\n Allows picking a nonexistent file, and prompts to overwrite if the file\n already exists.\n"]
4104 FILE_DIALOG_SAVE = 3,
4105}
4106#[repr(u32)]
4107#[non_exhaustive]
4108#[doc = "\n Print job color mode values.\n"]
4109#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4110pub enum cef_color_model_t {
4111 COLOR_MODEL_UNKNOWN = 0,
4112 COLOR_MODEL_GRAY = 1,
4113 COLOR_MODEL_COLOR = 2,
4114 COLOR_MODEL_CMYK = 3,
4115 COLOR_MODEL_CMY = 4,
4116 COLOR_MODEL_KCMY = 5,
4117 COLOR_MODEL_CMY_K = 6,
4118 COLOR_MODEL_BLACK = 7,
4119 COLOR_MODEL_GRAYSCALE = 8,
4120 COLOR_MODEL_RGB = 9,
4121 COLOR_MODEL_RGB16 = 10,
4122 COLOR_MODEL_RGBA = 11,
4123 COLOR_MODEL_COLORMODE_COLOR = 12,
4124 COLOR_MODEL_COLORMODE_MONOCHROME = 13,
4125 COLOR_MODEL_HP_COLOR_COLOR = 14,
4126 COLOR_MODEL_HP_COLOR_BLACK = 15,
4127 COLOR_MODEL_PRINTOUTMODE_NORMAL = 16,
4128 COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY = 17,
4129 COLOR_MODEL_PROCESSCOLORMODEL_CMYK = 18,
4130 COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE = 19,
4131 COLOR_MODEL_PROCESSCOLORMODEL_RGB = 20,
4132}
4133#[repr(i32)]
4134#[non_exhaustive]
4135#[doc = "\n Print job duplex mode values.\n"]
4136#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4137pub enum cef_duplex_mode_t {
4138 DUPLEX_MODE_UNKNOWN = -1,
4139 DUPLEX_MODE_SIMPLEX = 0,
4140 DUPLEX_MODE_LONG_EDGE = 1,
4141 DUPLEX_MODE_SHORT_EDGE = 2,
4142}
4143#[repr(u32)]
4144#[non_exhaustive]
4145#[doc = "\n Cursor type values.\n"]
4146#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4147pub enum cef_cursor_type_t {
4148 CT_POINTER = 0,
4149 CT_CROSS = 1,
4150 CT_HAND = 2,
4151 CT_IBEAM = 3,
4152 CT_WAIT = 4,
4153 CT_HELP = 5,
4154 CT_EASTRESIZE = 6,
4155 CT_NORTHRESIZE = 7,
4156 CT_NORTHEASTRESIZE = 8,
4157 CT_NORTHWESTRESIZE = 9,
4158 CT_SOUTHRESIZE = 10,
4159 CT_SOUTHEASTRESIZE = 11,
4160 CT_SOUTHWESTRESIZE = 12,
4161 CT_WESTRESIZE = 13,
4162 CT_NORTHSOUTHRESIZE = 14,
4163 CT_EASTWESTRESIZE = 15,
4164 CT_NORTHEASTSOUTHWESTRESIZE = 16,
4165 CT_NORTHWESTSOUTHEASTRESIZE = 17,
4166 CT_COLUMNRESIZE = 18,
4167 CT_ROWRESIZE = 19,
4168 CT_MIDDLEPANNING = 20,
4169 CT_EASTPANNING = 21,
4170 CT_NORTHPANNING = 22,
4171 CT_NORTHEASTPANNING = 23,
4172 CT_NORTHWESTPANNING = 24,
4173 CT_SOUTHPANNING = 25,
4174 CT_SOUTHEASTPANNING = 26,
4175 CT_SOUTHWESTPANNING = 27,
4176 CT_WESTPANNING = 28,
4177 CT_MOVE = 29,
4178 CT_VERTICALTEXT = 30,
4179 CT_CELL = 31,
4180 CT_CONTEXTMENU = 32,
4181 CT_ALIAS = 33,
4182 CT_PROGRESS = 34,
4183 CT_NODROP = 35,
4184 CT_COPY = 36,
4185 CT_NONE = 37,
4186 CT_NOTALLOWED = 38,
4187 CT_ZOOMIN = 39,
4188 CT_ZOOMOUT = 40,
4189 CT_GRAB = 41,
4190 CT_GRABBING = 42,
4191 CT_MIDDLE_PANNING_VERTICAL = 43,
4192 CT_MIDDLE_PANNING_HORIZONTAL = 44,
4193 CT_CUSTOM = 45,
4194 CT_DND_NONE = 46,
4195 CT_DND_MOVE = 47,
4196 CT_DND_COPY = 48,
4197 CT_DND_LINK = 49,
4198}
4199#[doc = "\n Structure representing cursor information. |buffer| will be\n |size.width|*|size.height|*4 bytes in size and represents a BGRA image with\n an upper-left origin.\n"]
4200#[repr(C)]
4201#[derive(Debug, Copy, Clone)]
4202pub struct _cef_cursor_info_t {
4203 pub hotspot: cef_point_t,
4204 pub image_scale_factor: f32,
4205 pub buffer: *mut ::std::os::raw::c_void,
4206 pub size: cef_size_t,
4207}
4208#[test]
4209fn bindgen_test_layout__cef_cursor_info_t() {
4210 const UNINIT: ::std::mem::MaybeUninit<_cef_cursor_info_t> = ::std::mem::MaybeUninit::uninit();
4211 let ptr = UNINIT.as_ptr();
4212 assert_eq!(
4213 ::std::mem::size_of::<_cef_cursor_info_t>(),
4214 32usize,
4215 concat!("Size of: ", stringify!(_cef_cursor_info_t))
4216 );
4217 assert_eq!(
4218 ::std::mem::align_of::<_cef_cursor_info_t>(),
4219 8usize,
4220 concat!("Alignment of ", stringify!(_cef_cursor_info_t))
4221 );
4222 assert_eq!(
4223 unsafe { ::std::ptr::addr_of!((*ptr).hotspot) as usize - ptr as usize },
4224 0usize,
4225 concat!(
4226 "Offset of field: ",
4227 stringify!(_cef_cursor_info_t),
4228 "::",
4229 stringify!(hotspot)
4230 )
4231 );
4232 assert_eq!(
4233 unsafe { ::std::ptr::addr_of!((*ptr).image_scale_factor) as usize - ptr as usize },
4234 8usize,
4235 concat!(
4236 "Offset of field: ",
4237 stringify!(_cef_cursor_info_t),
4238 "::",
4239 stringify!(image_scale_factor)
4240 )
4241 );
4242 assert_eq!(
4243 unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
4244 16usize,
4245 concat!(
4246 "Offset of field: ",
4247 stringify!(_cef_cursor_info_t),
4248 "::",
4249 stringify!(buffer)
4250 )
4251 );
4252 assert_eq!(
4253 unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
4254 24usize,
4255 concat!(
4256 "Offset of field: ",
4257 stringify!(_cef_cursor_info_t),
4258 "::",
4259 stringify!(size)
4260 )
4261 );
4262}
4263#[doc = "\n Structure representing cursor information. |buffer| will be\n |size.width|*|size.height|*4 bytes in size and represents a BGRA image with\n an upper-left origin.\n"]
4264pub type cef_cursor_info_t = _cef_cursor_info_t;
4265#[repr(u32)]
4266#[non_exhaustive]
4267#[doc = "\n URI unescape rules passed to CefURIDecode().\n"]
4268#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4269pub enum cef_uri_unescape_rule_t {
4270 #[doc = "\n Don't unescape anything at all.\n"]
4271 UU_NONE = 0,
4272 #[doc = "\n Don't unescape anything special, but all normal unescaping will happen.\n This is a placeholder and can't be combined with other flags (since it's\n just the absence of them). All other unescape rules imply \"normal\" in\n addition to their special meaning. Things like escaped letters, digits,\n and most symbols will get unescaped with this mode.\n"]
4273 UU_NORMAL = 1,
4274 #[doc = "\n Convert %20 to spaces. In some places where we're showing URLs, we may\n want this. In places where the URL may be copied and pasted out, then\n you wouldn't want this since it might not be interpreted in one piece\n by other applications.\n"]
4275 UU_SPACES = 2,
4276 #[doc = "\n Unescapes '/' and '\\\\'. If these characters were unescaped, the resulting\n URL won't be the same as the source one. Moreover, they are dangerous to\n unescape in strings that will be used as file paths or names. This value\n should only be used when slashes don't have special meaning, like data\n URLs.\n"]
4277 UU_PATH_SEPARATORS = 4,
4278 #[doc = "\n Unescapes various characters that will change the meaning of URLs,\n including '%', '+', '&', '#'. Does not unescape path separators.\n If these characters were unescaped, the resulting URL won't be the same\n as the source one. This flag is used when generating final output like\n filenames for URLs where we won't be interpreting as a URL and want to do\n as much unescaping as possible.\n"]
4279 UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 8,
4280 #[doc = "\n URL queries use \"+\" for space. This flag controls that replacement.\n"]
4281 UU_REPLACE_PLUS_WITH_SPACE = 16,
4282}
4283#[repr(u32)]
4284#[non_exhaustive]
4285#[doc = "\n Options that can be passed to CefParseJSON.\n"]
4286#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4287pub enum cef_json_parser_options_t {
4288 #[doc = "\n Parses the input strictly according to RFC 4627. See comments in\n Chromium's base/json/json_reader.h file for known limitations/\n deviations from the RFC.\n"]
4289 JSON_PARSER_RFC = 0,
4290 #[doc = "\n Allows commas to exist after the last element in structures.\n"]
4291 JSON_PARSER_ALLOW_TRAILING_COMMAS = 1,
4292}
4293#[repr(u32)]
4294#[non_exhaustive]
4295#[doc = "\n Options that can be passed to CefWriteJSON.\n"]
4296#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4297pub enum cef_json_writer_options_t {
4298 #[doc = "\n Default behavior.\n"]
4299 JSON_WRITER_DEFAULT = 0,
4300 #[doc = "\n This option instructs the writer that if a Binary value is encountered,\n the value (and key if within a dictionary) will be omitted from the\n output, and success will be returned. Otherwise, if a binary value is\n encountered, failure will be returned.\n"]
4301 JSON_WRITER_OMIT_BINARY_VALUES = 1,
4302 #[doc = "\n This option instructs the writer to write doubles that have no fractional\n part as a normal integer (i.e., without using exponential notation\n or appending a '.0') as long as the value is within the range of a\n 64-bit int.\n"]
4303 JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = 2,
4304 #[doc = "\n Return a slightly nicer formatted json string (pads with whitespace to\n help with readability).\n"]
4305 JSON_WRITER_PRETTY_PRINT = 4,
4306}
4307#[repr(u32)]
4308#[non_exhaustive]
4309#[doc = "\n Margin type for PDF printing.\n"]
4310#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4311pub enum cef_pdf_print_margin_type_t {
4312 #[doc = "\n Default margins of 1cm (~0.4 inches).\n"]
4313 PDF_PRINT_MARGIN_DEFAULT = 0,
4314 #[doc = "\n No margins.\n"]
4315 PDF_PRINT_MARGIN_NONE = 1,
4316 #[doc = "\n Custom margins using the |margin_*| values from cef_pdf_print_settings_t.\n"]
4317 PDF_PRINT_MARGIN_CUSTOM = 2,
4318}
4319#[doc = "\n Structure representing PDF print settings. These values match the parameters\n supported by the DevTools Page.printToPDF function. See\n https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF\n"]
4320#[repr(C)]
4321#[derive(Debug, Copy, Clone)]
4322pub struct _cef_pdf_print_settings_t {
4323 #[doc = "\n Set to true (1) for landscape mode or false (0) for portrait mode.\n"]
4324 pub landscape: ::std::os::raw::c_int,
4325 #[doc = "\n Set to true (1) to print background graphics.\n"]
4326 pub print_background: ::std::os::raw::c_int,
4327 #[doc = "\n The percentage to scale the PDF by before printing (e.g. .5 is 50%).\n If this value is less than or equal to zero the default value of 1.0\n will be used.\n"]
4328 pub scale: f64,
4329 #[doc = "\n Output paper size in inches. If either of these values is less than or\n equal to zero then the default paper size (letter, 8.5 x 11 inches) will\n be used.\n"]
4330 pub paper_width: f64,
4331 pub paper_height: f64,
4332 #[doc = "\n Set to true (1) to prefer page size as defined by css. Defaults to false\n (0), in which case the content will be scaled to fit the paper size.\n"]
4333 pub prefer_css_page_size: ::std::os::raw::c_int,
4334 #[doc = "\n Margin type.\n"]
4335 pub margin_type: cef_pdf_print_margin_type_t,
4336 #[doc = "\n Margins in inches. Only used if |margin_type| is set to\n PDF_PRINT_MARGIN_CUSTOM.\n"]
4337 pub margin_top: f64,
4338 pub margin_right: f64,
4339 pub margin_bottom: f64,
4340 pub margin_left: f64,
4341 #[doc = "\n Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed\n in the document order, not in the order specified, and no more than once.\n Defaults to empty string, which implies the entire document is printed.\n The page numbers are quietly capped to actual page count of the document,\n and ranges beyond the end of the document are ignored. If this results in\n no pages to print, an error is reported. It is an error to specify a range\n with start greater than end.\n"]
4342 pub page_ranges: cef_string_t,
4343 #[doc = "\n Set to true (1) to display the header and/or footer. Modify\n |header_template| and/or |footer_template| to customize the display.\n"]
4344 pub display_header_footer: ::std::os::raw::c_int,
4345 #[doc = "\n HTML template for the print header. Only displayed if\n |display_header_footer| is true (1). Should be valid HTML markup with\n the following classes used to inject printing values into them:\n\n - date: formatted print date\n - title: document title\n - url: document location\n - pageNumber: current page number\n - totalPages: total pages in the document\n\n For example, \"<span class=title></span>\" would generate a span containing\n the title.\n"]
4346 pub header_template: cef_string_t,
4347 #[doc = "\n HTML template for the print footer. Only displayed if\n |display_header_footer| is true (1). Uses the same format as\n |header_template|.\n"]
4348 pub footer_template: cef_string_t,
4349 #[doc = "\n Set to true (1) to generate tagged (accessible) PDF.\n"]
4350 pub generate_tagged_pdf: ::std::os::raw::c_int,
4351}
4352#[test]
4353fn bindgen_test_layout__cef_pdf_print_settings_t() {
4354 const UNINIT: ::std::mem::MaybeUninit<_cef_pdf_print_settings_t> =
4355 ::std::mem::MaybeUninit::uninit();
4356 let ptr = UNINIT.as_ptr();
4357 assert_eq!(
4358 ::std::mem::size_of::<_cef_pdf_print_settings_t>(),
4359 160usize,
4360 concat!("Size of: ", stringify!(_cef_pdf_print_settings_t))
4361 );
4362 assert_eq!(
4363 ::std::mem::align_of::<_cef_pdf_print_settings_t>(),
4364 8usize,
4365 concat!("Alignment of ", stringify!(_cef_pdf_print_settings_t))
4366 );
4367 assert_eq!(
4368 unsafe { ::std::ptr::addr_of!((*ptr).landscape) as usize - ptr as usize },
4369 0usize,
4370 concat!(
4371 "Offset of field: ",
4372 stringify!(_cef_pdf_print_settings_t),
4373 "::",
4374 stringify!(landscape)
4375 )
4376 );
4377 assert_eq!(
4378 unsafe { ::std::ptr::addr_of!((*ptr).print_background) as usize - ptr as usize },
4379 4usize,
4380 concat!(
4381 "Offset of field: ",
4382 stringify!(_cef_pdf_print_settings_t),
4383 "::",
4384 stringify!(print_background)
4385 )
4386 );
4387 assert_eq!(
4388 unsafe { ::std::ptr::addr_of!((*ptr).scale) as usize - ptr as usize },
4389 8usize,
4390 concat!(
4391 "Offset of field: ",
4392 stringify!(_cef_pdf_print_settings_t),
4393 "::",
4394 stringify!(scale)
4395 )
4396 );
4397 assert_eq!(
4398 unsafe { ::std::ptr::addr_of!((*ptr).paper_width) as usize - ptr as usize },
4399 16usize,
4400 concat!(
4401 "Offset of field: ",
4402 stringify!(_cef_pdf_print_settings_t),
4403 "::",
4404 stringify!(paper_width)
4405 )
4406 );
4407 assert_eq!(
4408 unsafe { ::std::ptr::addr_of!((*ptr).paper_height) as usize - ptr as usize },
4409 24usize,
4410 concat!(
4411 "Offset of field: ",
4412 stringify!(_cef_pdf_print_settings_t),
4413 "::",
4414 stringify!(paper_height)
4415 )
4416 );
4417 assert_eq!(
4418 unsafe { ::std::ptr::addr_of!((*ptr).prefer_css_page_size) as usize - ptr as usize },
4419 32usize,
4420 concat!(
4421 "Offset of field: ",
4422 stringify!(_cef_pdf_print_settings_t),
4423 "::",
4424 stringify!(prefer_css_page_size)
4425 )
4426 );
4427 assert_eq!(
4428 unsafe { ::std::ptr::addr_of!((*ptr).margin_type) as usize - ptr as usize },
4429 36usize,
4430 concat!(
4431 "Offset of field: ",
4432 stringify!(_cef_pdf_print_settings_t),
4433 "::",
4434 stringify!(margin_type)
4435 )
4436 );
4437 assert_eq!(
4438 unsafe { ::std::ptr::addr_of!((*ptr).margin_top) as usize - ptr as usize },
4439 40usize,
4440 concat!(
4441 "Offset of field: ",
4442 stringify!(_cef_pdf_print_settings_t),
4443 "::",
4444 stringify!(margin_top)
4445 )
4446 );
4447 assert_eq!(
4448 unsafe { ::std::ptr::addr_of!((*ptr).margin_right) as usize - ptr as usize },
4449 48usize,
4450 concat!(
4451 "Offset of field: ",
4452 stringify!(_cef_pdf_print_settings_t),
4453 "::",
4454 stringify!(margin_right)
4455 )
4456 );
4457 assert_eq!(
4458 unsafe { ::std::ptr::addr_of!((*ptr).margin_bottom) as usize - ptr as usize },
4459 56usize,
4460 concat!(
4461 "Offset of field: ",
4462 stringify!(_cef_pdf_print_settings_t),
4463 "::",
4464 stringify!(margin_bottom)
4465 )
4466 );
4467 assert_eq!(
4468 unsafe { ::std::ptr::addr_of!((*ptr).margin_left) as usize - ptr as usize },
4469 64usize,
4470 concat!(
4471 "Offset of field: ",
4472 stringify!(_cef_pdf_print_settings_t),
4473 "::",
4474 stringify!(margin_left)
4475 )
4476 );
4477 assert_eq!(
4478 unsafe { ::std::ptr::addr_of!((*ptr).page_ranges) as usize - ptr as usize },
4479 72usize,
4480 concat!(
4481 "Offset of field: ",
4482 stringify!(_cef_pdf_print_settings_t),
4483 "::",
4484 stringify!(page_ranges)
4485 )
4486 );
4487 assert_eq!(
4488 unsafe { ::std::ptr::addr_of!((*ptr).display_header_footer) as usize - ptr as usize },
4489 96usize,
4490 concat!(
4491 "Offset of field: ",
4492 stringify!(_cef_pdf_print_settings_t),
4493 "::",
4494 stringify!(display_header_footer)
4495 )
4496 );
4497 assert_eq!(
4498 unsafe { ::std::ptr::addr_of!((*ptr).header_template) as usize - ptr as usize },
4499 104usize,
4500 concat!(
4501 "Offset of field: ",
4502 stringify!(_cef_pdf_print_settings_t),
4503 "::",
4504 stringify!(header_template)
4505 )
4506 );
4507 assert_eq!(
4508 unsafe { ::std::ptr::addr_of!((*ptr).footer_template) as usize - ptr as usize },
4509 128usize,
4510 concat!(
4511 "Offset of field: ",
4512 stringify!(_cef_pdf_print_settings_t),
4513 "::",
4514 stringify!(footer_template)
4515 )
4516 );
4517 assert_eq!(
4518 unsafe { ::std::ptr::addr_of!((*ptr).generate_tagged_pdf) as usize - ptr as usize },
4519 152usize,
4520 concat!(
4521 "Offset of field: ",
4522 stringify!(_cef_pdf_print_settings_t),
4523 "::",
4524 stringify!(generate_tagged_pdf)
4525 )
4526 );
4527}
4528#[doc = "\n Structure representing PDF print settings. These values match the parameters\n supported by the DevTools Page.printToPDF function. See\n https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF\n"]
4529pub type cef_pdf_print_settings_t = _cef_pdf_print_settings_t;
4530#[repr(u32)]
4531#[non_exhaustive]
4532#[doc = "\n Supported UI scale factors for the platform. SCALE_FACTOR_NONE is used for\n density independent resources such as string, html/js files or an image that\n can be used for any scale factors (such as wallpapers).\n"]
4533#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4534pub enum cef_scale_factor_t {
4535 SCALE_FACTOR_NONE = 0,
4536 SCALE_FACTOR_100P = 1,
4537 SCALE_FACTOR_125P = 2,
4538 SCALE_FACTOR_133P = 3,
4539 SCALE_FACTOR_140P = 4,
4540 SCALE_FACTOR_150P = 5,
4541 SCALE_FACTOR_180P = 6,
4542 SCALE_FACTOR_200P = 7,
4543 SCALE_FACTOR_250P = 8,
4544 SCALE_FACTOR_300P = 9,
4545}
4546impl cef_referrer_policy_t {
4547 pub const REFERRER_POLICY_DEFAULT: cef_referrer_policy_t =
4548 cef_referrer_policy_t::REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE;
4549}
4550impl cef_referrer_policy_t {
4551 pub const REFERRER_POLICY_LAST_VALUE: cef_referrer_policy_t =
4552 cef_referrer_policy_t::REFERRER_POLICY_NO_REFERRER;
4553}
4554#[repr(u32)]
4555#[non_exhaustive]
4556#[doc = "\n Policy for how the Referrer HTTP header value will be sent during\n navigation. If the `--no-referrers` command-line flag is specified then the\n policy value will be ignored and the Referrer value will never be sent. Must\n be kept synchronized with net::URLRequest::ReferrerPolicy from Chromium.\n"]
4557#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4558pub enum cef_referrer_policy_t {
4559 #[doc = "\n Clear the referrer header if the header value is HTTPS but the request\n destination is HTTP. This is the default behavior.\n"]
4560 REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 0,
4561 #[doc = "\n A slight variant on CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE:\n If the request destination is HTTP, an HTTPS referrer will be cleared. If\n the request's destination is cross-origin with the referrer (but does not\n downgrade), the referrer's granularity will be stripped down to an origin\n rather than a full URL. Same-origin requests will send the full referrer.\n"]
4562 REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = 1,
4563 #[doc = "\n Strip the referrer down to an origin when the origin of the referrer is\n different from the destination's origin.\n"]
4564 REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = 2,
4565 #[doc = "\n Never change the referrer.\n"]
4566 REFERRER_POLICY_NEVER_CLEAR_REFERRER = 3,
4567 #[doc = "\n Strip the referrer down to the origin regardless of the redirect location.\n"]
4568 REFERRER_POLICY_ORIGIN = 4,
4569 #[doc = "\n Clear the referrer when the request's referrer is cross-origin with the\n request's destination.\n"]
4570 REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = 5,
4571 #[doc = "\n Strip the referrer down to the origin, but clear it entirely if the\n referrer value is HTTPS and the destination is HTTP.\n"]
4572 REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 6,
4573 #[doc = "\n Always clear the referrer regardless of the request destination.\n"]
4574 REFERRER_POLICY_NO_REFERRER = 7,
4575}
4576#[repr(u32)]
4577#[non_exhaustive]
4578#[doc = "\n Return values for CefResponseFilter::Filter().\n"]
4579#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4580pub enum cef_response_filter_status_t {
4581 #[doc = "\n Some or all of the pre-filter data was read successfully but more data is\n needed in order to continue filtering (filtered output is pending).\n"]
4582 RESPONSE_FILTER_NEED_MORE_DATA = 0,
4583 #[doc = "\n Some or all of the pre-filter data was read successfully and all available\n filtered output has been written.\n"]
4584 RESPONSE_FILTER_DONE = 1,
4585 #[doc = "\n An error occurred during filtering.\n"]
4586 RESPONSE_FILTER_ERROR = 2,
4587}
4588#[repr(u32)]
4589#[non_exhaustive]
4590#[doc = "\n Describes how to interpret the components of a pixel.\n"]
4591#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4592pub enum cef_color_type_t {
4593 #[doc = "\n RGBA with 8 bits per pixel (32bits total).\n"]
4594 CEF_COLOR_TYPE_RGBA_8888 = 0,
4595 #[doc = "\n BGRA with 8 bits per pixel (32bits total).\n"]
4596 CEF_COLOR_TYPE_BGRA_8888 = 1,
4597}
4598#[repr(u32)]
4599#[non_exhaustive]
4600#[doc = "\n Describes how to interpret the alpha component of a pixel.\n"]
4601#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4602pub enum cef_alpha_type_t {
4603 #[doc = "\n No transparency. The alpha component is ignored.\n"]
4604 CEF_ALPHA_TYPE_OPAQUE = 0,
4605 #[doc = "\n Transparency with pre-multiplied alpha component.\n"]
4606 CEF_ALPHA_TYPE_PREMULTIPLIED = 1,
4607 #[doc = "\n Transparency with post-multiplied alpha component.\n"]
4608 CEF_ALPHA_TYPE_POSTMULTIPLIED = 2,
4609}
4610#[repr(u32)]
4611#[non_exhaustive]
4612#[doc = "\n Text style types. Should be kepy in sync with gfx::TextStyle.\n"]
4613#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4614pub enum cef_text_style_t {
4615 CEF_TEXT_STYLE_BOLD = 0,
4616 CEF_TEXT_STYLE_ITALIC = 1,
4617 CEF_TEXT_STYLE_STRIKE = 2,
4618 CEF_TEXT_STYLE_DIAGONAL_STRIKE = 3,
4619 CEF_TEXT_STYLE_UNDERLINE = 4,
4620}
4621#[repr(u32)]
4622#[non_exhaustive]
4623#[doc = "\n Specifies where along the main axis the CefBoxLayout child views should be\n laid out.\n"]
4624#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4625pub enum cef_main_axis_alignment_t {
4626 #[doc = "\n Child views will be left-aligned.\n"]
4627 CEF_MAIN_AXIS_ALIGNMENT_START = 0,
4628 #[doc = "\n Child views will be center-aligned.\n"]
4629 CEF_MAIN_AXIS_ALIGNMENT_CENTER = 1,
4630 #[doc = "\n Child views will be right-aligned.\n"]
4631 CEF_MAIN_AXIS_ALIGNMENT_END = 2,
4632}
4633#[repr(u32)]
4634#[non_exhaustive]
4635#[doc = "\n Specifies where along the cross axis the CefBoxLayout child views should be\n laid out.\n"]
4636#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4637pub enum cef_cross_axis_alignment_t {
4638 #[doc = "\n Child views will be stretched to fit.\n"]
4639 CEF_CROSS_AXIS_ALIGNMENT_STRETCH = 0,
4640 #[doc = "\n Child views will be left-aligned.\n"]
4641 CEF_CROSS_AXIS_ALIGNMENT_START = 1,
4642 #[doc = "\n Child views will be center-aligned.\n"]
4643 CEF_CROSS_AXIS_ALIGNMENT_CENTER = 2,
4644 #[doc = "\n Child views will be right-aligned.\n"]
4645 CEF_CROSS_AXIS_ALIGNMENT_END = 3,
4646}
4647#[doc = "\n Settings used when initializing a CefBoxLayout.\n"]
4648#[repr(C)]
4649#[derive(Debug, Copy, Clone)]
4650pub struct _cef_box_layout_settings_t {
4651 #[doc = "\n If true (1) the layout will be horizontal, otherwise the layout will be\n vertical.\n"]
4652 pub horizontal: ::std::os::raw::c_int,
4653 #[doc = "\n Adds additional horizontal space between the child view area and the host\n view border.\n"]
4654 pub inside_border_horizontal_spacing: ::std::os::raw::c_int,
4655 #[doc = "\n Adds additional vertical space between the child view area and the host\n view border.\n"]
4656 pub inside_border_vertical_spacing: ::std::os::raw::c_int,
4657 #[doc = "\n Adds additional space around the child view area.\n"]
4658 pub inside_border_insets: cef_insets_t,
4659 #[doc = "\n Adds additional space between child views.\n"]
4660 pub between_child_spacing: ::std::os::raw::c_int,
4661 #[doc = "\n Specifies where along the main axis the child views should be laid out.\n"]
4662 pub main_axis_alignment: cef_main_axis_alignment_t,
4663 #[doc = "\n Specifies where along the cross axis the child views should be laid out.\n"]
4664 pub cross_axis_alignment: cef_cross_axis_alignment_t,
4665 #[doc = "\n Minimum cross axis size.\n"]
4666 pub minimum_cross_axis_size: ::std::os::raw::c_int,
4667 #[doc = "\n Default flex for views when none is specified via CefBoxLayout methods.\n Using the preferred size as the basis, free space along the main axis is\n distributed to views in the ratio of their flex weights. Similarly, if the\n views will overflow the parent, space is subtracted in these ratios. A\n flex of 0 means this view is not resized. Flex values must not be\n negative.\n"]
4668 pub default_flex: ::std::os::raw::c_int,
4669}
4670#[test]
4671fn bindgen_test_layout__cef_box_layout_settings_t() {
4672 const UNINIT: ::std::mem::MaybeUninit<_cef_box_layout_settings_t> =
4673 ::std::mem::MaybeUninit::uninit();
4674 let ptr = UNINIT.as_ptr();
4675 assert_eq!(
4676 ::std::mem::size_of::<_cef_box_layout_settings_t>(),
4677 48usize,
4678 concat!("Size of: ", stringify!(_cef_box_layout_settings_t))
4679 );
4680 assert_eq!(
4681 ::std::mem::align_of::<_cef_box_layout_settings_t>(),
4682 4usize,
4683 concat!("Alignment of ", stringify!(_cef_box_layout_settings_t))
4684 );
4685 assert_eq!(
4686 unsafe { ::std::ptr::addr_of!((*ptr).horizontal) as usize - ptr as usize },
4687 0usize,
4688 concat!(
4689 "Offset of field: ",
4690 stringify!(_cef_box_layout_settings_t),
4691 "::",
4692 stringify!(horizontal)
4693 )
4694 );
4695 assert_eq!(
4696 unsafe {
4697 ::std::ptr::addr_of!((*ptr).inside_border_horizontal_spacing) as usize - ptr as usize
4698 },
4699 4usize,
4700 concat!(
4701 "Offset of field: ",
4702 stringify!(_cef_box_layout_settings_t),
4703 "::",
4704 stringify!(inside_border_horizontal_spacing)
4705 )
4706 );
4707 assert_eq!(
4708 unsafe {
4709 ::std::ptr::addr_of!((*ptr).inside_border_vertical_spacing) as usize - ptr as usize
4710 },
4711 8usize,
4712 concat!(
4713 "Offset of field: ",
4714 stringify!(_cef_box_layout_settings_t),
4715 "::",
4716 stringify!(inside_border_vertical_spacing)
4717 )
4718 );
4719 assert_eq!(
4720 unsafe { ::std::ptr::addr_of!((*ptr).inside_border_insets) as usize - ptr as usize },
4721 12usize,
4722 concat!(
4723 "Offset of field: ",
4724 stringify!(_cef_box_layout_settings_t),
4725 "::",
4726 stringify!(inside_border_insets)
4727 )
4728 );
4729 assert_eq!(
4730 unsafe { ::std::ptr::addr_of!((*ptr).between_child_spacing) as usize - ptr as usize },
4731 28usize,
4732 concat!(
4733 "Offset of field: ",
4734 stringify!(_cef_box_layout_settings_t),
4735 "::",
4736 stringify!(between_child_spacing)
4737 )
4738 );
4739 assert_eq!(
4740 unsafe { ::std::ptr::addr_of!((*ptr).main_axis_alignment) as usize - ptr as usize },
4741 32usize,
4742 concat!(
4743 "Offset of field: ",
4744 stringify!(_cef_box_layout_settings_t),
4745 "::",
4746 stringify!(main_axis_alignment)
4747 )
4748 );
4749 assert_eq!(
4750 unsafe { ::std::ptr::addr_of!((*ptr).cross_axis_alignment) as usize - ptr as usize },
4751 36usize,
4752 concat!(
4753 "Offset of field: ",
4754 stringify!(_cef_box_layout_settings_t),
4755 "::",
4756 stringify!(cross_axis_alignment)
4757 )
4758 );
4759 assert_eq!(
4760 unsafe { ::std::ptr::addr_of!((*ptr).minimum_cross_axis_size) as usize - ptr as usize },
4761 40usize,
4762 concat!(
4763 "Offset of field: ",
4764 stringify!(_cef_box_layout_settings_t),
4765 "::",
4766 stringify!(minimum_cross_axis_size)
4767 )
4768 );
4769 assert_eq!(
4770 unsafe { ::std::ptr::addr_of!((*ptr).default_flex) as usize - ptr as usize },
4771 44usize,
4772 concat!(
4773 "Offset of field: ",
4774 stringify!(_cef_box_layout_settings_t),
4775 "::",
4776 stringify!(default_flex)
4777 )
4778 );
4779}
4780#[doc = "\n Settings used when initializing a CefBoxLayout.\n"]
4781pub type cef_box_layout_settings_t = _cef_box_layout_settings_t;
4782#[repr(u32)]
4783#[non_exhaustive]
4784#[doc = "\n Specifies the button display state.\n"]
4785#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4786pub enum cef_button_state_t {
4787 CEF_BUTTON_STATE_NORMAL = 0,
4788 CEF_BUTTON_STATE_HOVERED = 1,
4789 CEF_BUTTON_STATE_PRESSED = 2,
4790 CEF_BUTTON_STATE_DISABLED = 3,
4791}
4792#[repr(u32)]
4793#[non_exhaustive]
4794#[doc = "\n Specifies the horizontal text alignment mode.\n"]
4795#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4796pub enum cef_horizontal_alignment_t {
4797 #[doc = "\n Align the text's left edge with that of its display area.\n"]
4798 CEF_HORIZONTAL_ALIGNMENT_LEFT = 0,
4799 #[doc = "\n Align the text's center with that of its display area.\n"]
4800 CEF_HORIZONTAL_ALIGNMENT_CENTER = 1,
4801 #[doc = "\n Align the text's right edge with that of its display area.\n"]
4802 CEF_HORIZONTAL_ALIGNMENT_RIGHT = 2,
4803}
4804#[repr(u32)]
4805#[non_exhaustive]
4806#[doc = "\n Specifies how a menu will be anchored for non-RTL languages. The opposite\n position will be used for RTL languages.\n"]
4807#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4808pub enum cef_menu_anchor_position_t {
4809 CEF_MENU_ANCHOR_TOPLEFT = 0,
4810 CEF_MENU_ANCHOR_TOPRIGHT = 1,
4811 CEF_MENU_ANCHOR_BOTTOMCENTER = 2,
4812}
4813#[repr(u32)]
4814#[non_exhaustive]
4815#[doc = "\n Supported color types for menu items.\n"]
4816#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4817pub enum cef_menu_color_type_t {
4818 CEF_MENU_COLOR_TEXT = 0,
4819 CEF_MENU_COLOR_TEXT_HOVERED = 1,
4820 CEF_MENU_COLOR_TEXT_ACCELERATOR = 2,
4821 CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED = 3,
4822 CEF_MENU_COLOR_BACKGROUND = 4,
4823 CEF_MENU_COLOR_BACKGROUND_HOVERED = 5,
4824 CEF_MENU_COLOR_COUNT = 6,
4825}
4826#[repr(u32)]
4827#[non_exhaustive]
4828#[doc = " Supported SSL version values. See net/ssl/ssl_connection_status_flags.h\n for more information."]
4829#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4830pub enum cef_ssl_version_t {
4831 SSL_CONNECTION_VERSION_UNKNOWN = 0,
4832 SSL_CONNECTION_VERSION_SSL2 = 1,
4833 SSL_CONNECTION_VERSION_SSL3 = 2,
4834 SSL_CONNECTION_VERSION_TLS1 = 3,
4835 SSL_CONNECTION_VERSION_TLS1_1 = 4,
4836 SSL_CONNECTION_VERSION_TLS1_2 = 5,
4837 SSL_CONNECTION_VERSION_TLS1_3 = 6,
4838 SSL_CONNECTION_VERSION_QUIC = 7,
4839}
4840#[repr(u32)]
4841#[non_exhaustive]
4842#[doc = " Supported SSL content status flags. See content/public/common/ssl_status.h\n for more information."]
4843#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4844pub enum cef_ssl_content_status_t {
4845 SSL_CONTENT_NORMAL_CONTENT = 0,
4846 SSL_CONTENT_DISPLAYED_INSECURE_CONTENT = 1,
4847 SSL_CONTENT_RAN_INSECURE_CONTENT = 2,
4848}
4849#[repr(u32)]
4850#[non_exhaustive]
4851#[doc = " Configuration options for registering a custom scheme.\n These values are used when calling AddCustomScheme."]
4852#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4853pub enum cef_scheme_options_t {
4854 CEF_SCHEME_OPTION_NONE = 0,
4855 #[doc = " For non-standard scheme URLs only the \"scheme:\" component is parsed and\n canonicalized. The remainder of the URL will be passed to the handler as-\n is. For example, \"scheme:///some%20text\" will remain the same.\n Non-standard scheme URLs cannot be used as a target for form submission.\n"]
4856 CEF_SCHEME_OPTION_STANDARD = 1,
4857 #[doc = "\n If CEF_SCHEME_OPTION_LOCAL is set the scheme will be treated with the same\n security rules as those applied to \"file\" URLs. Normal pages cannot link\n to or access local URLs. Also, by default, local URLs can only perform\n XMLHttpRequest calls to the same URL (origin + path) that originated the\n request. To allow XMLHttpRequest calls from a local URL to other URLs with\n the same origin set the CefSettings.file_access_from_file_urls_allowed\n value to true (1). To allow XMLHttpRequest calls from a local URL to all\n origins set the CefSettings.universal_access_from_file_urls_allowed value\n to true (1).\n"]
4858 CEF_SCHEME_OPTION_LOCAL = 2,
4859 #[doc = "\n If CEF_SCHEME_OPTION_DISPLAY_ISOLATED is set the scheme can only be\n displayed from other content hosted with the same scheme. For example,\n pages in other origins cannot create iframes or hyperlinks to URLs with\n the scheme. For schemes that must be accessible from other schemes don't\n set this, set CEF_SCHEME_OPTION_CORS_ENABLED, and use CORS\n \"Access-Control-Allow-Origin\" headers to further restrict access.\n"]
4860 CEF_SCHEME_OPTION_DISPLAY_ISOLATED = 4,
4861 #[doc = "\n If CEF_SCHEME_OPTION_SECURE is set the scheme will be treated with the\n same security rules as those applied to \"https\" URLs. For example, loading\n this scheme from other secure schemes will not trigger mixed content\n warnings.\n"]
4862 CEF_SCHEME_OPTION_SECURE = 8,
4863 #[doc = "\n If CEF_SCHEME_OPTION_CORS_ENABLED is set the scheme can be sent CORS\n requests. This value should be set in most cases where\n CEF_SCHEME_OPTION_STANDARD is set.\n"]
4864 CEF_SCHEME_OPTION_CORS_ENABLED = 16,
4865 #[doc = "\n If CEF_SCHEME_OPTION_CSP_BYPASSING is set the scheme can bypass Content-\n Security-Policy (CSP) checks. This value should not be set in most cases\n where CEF_SCHEME_OPTION_STANDARD is set.\n"]
4866 CEF_SCHEME_OPTION_CSP_BYPASSING = 32,
4867 #[doc = "\n If CEF_SCHEME_OPTION_FETCH_ENABLED is set the scheme can perform Fetch API\n requests.\n"]
4868 CEF_SCHEME_OPTION_FETCH_ENABLED = 64,
4869}
4870#[doc = "\n Structure representing a range.\n"]
4871#[repr(C)]
4872#[derive(Debug, Copy, Clone)]
4873pub struct _cef_range_t {
4874 pub from: u32,
4875 pub to: u32,
4876}
4877#[test]
4878fn bindgen_test_layout__cef_range_t() {
4879 const UNINIT: ::std::mem::MaybeUninit<_cef_range_t> = ::std::mem::MaybeUninit::uninit();
4880 let ptr = UNINIT.as_ptr();
4881 assert_eq!(
4882 ::std::mem::size_of::<_cef_range_t>(),
4883 8usize,
4884 concat!("Size of: ", stringify!(_cef_range_t))
4885 );
4886 assert_eq!(
4887 ::std::mem::align_of::<_cef_range_t>(),
4888 4usize,
4889 concat!("Alignment of ", stringify!(_cef_range_t))
4890 );
4891 assert_eq!(
4892 unsafe { ::std::ptr::addr_of!((*ptr).from) as usize - ptr as usize },
4893 0usize,
4894 concat!(
4895 "Offset of field: ",
4896 stringify!(_cef_range_t),
4897 "::",
4898 stringify!(from)
4899 )
4900 );
4901 assert_eq!(
4902 unsafe { ::std::ptr::addr_of!((*ptr).to) as usize - ptr as usize },
4903 4usize,
4904 concat!(
4905 "Offset of field: ",
4906 stringify!(_cef_range_t),
4907 "::",
4908 stringify!(to)
4909 )
4910 );
4911}
4912#[doc = "\n Structure representing a range.\n"]
4913pub type cef_range_t = _cef_range_t;
4914#[repr(u32)]
4915#[non_exhaustive]
4916#[doc = "\n Composition underline style.\n"]
4917#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4918pub enum cef_composition_underline_style_t {
4919 CEF_CUS_SOLID = 0,
4920 CEF_CUS_DOT = 1,
4921 CEF_CUS_DASH = 2,
4922 CEF_CUS_NONE = 3,
4923}
4924#[doc = "\n Structure representing IME composition underline information. This is a thin\n wrapper around Blink's WebCompositionUnderline class and should be kept in\n sync with that.\n"]
4925#[repr(C)]
4926#[derive(Debug, Copy, Clone)]
4927pub struct _cef_composition_underline_t {
4928 #[doc = "\n Underline character range.\n"]
4929 pub range: cef_range_t,
4930 #[doc = "\n Text color.\n"]
4931 pub color: cef_color_t,
4932 #[doc = "\n Background color.\n"]
4933 pub background_color: cef_color_t,
4934 #[doc = "\n Set to true (1) for thick underline.\n"]
4935 pub thick: ::std::os::raw::c_int,
4936 #[doc = "\n Style.\n"]
4937 pub style: cef_composition_underline_style_t,
4938}
4939#[test]
4940fn bindgen_test_layout__cef_composition_underline_t() {
4941 const UNINIT: ::std::mem::MaybeUninit<_cef_composition_underline_t> =
4942 ::std::mem::MaybeUninit::uninit();
4943 let ptr = UNINIT.as_ptr();
4944 assert_eq!(
4945 ::std::mem::size_of::<_cef_composition_underline_t>(),
4946 24usize,
4947 concat!("Size of: ", stringify!(_cef_composition_underline_t))
4948 );
4949 assert_eq!(
4950 ::std::mem::align_of::<_cef_composition_underline_t>(),
4951 4usize,
4952 concat!("Alignment of ", stringify!(_cef_composition_underline_t))
4953 );
4954 assert_eq!(
4955 unsafe { ::std::ptr::addr_of!((*ptr).range) as usize - ptr as usize },
4956 0usize,
4957 concat!(
4958 "Offset of field: ",
4959 stringify!(_cef_composition_underline_t),
4960 "::",
4961 stringify!(range)
4962 )
4963 );
4964 assert_eq!(
4965 unsafe { ::std::ptr::addr_of!((*ptr).color) as usize - ptr as usize },
4966 8usize,
4967 concat!(
4968 "Offset of field: ",
4969 stringify!(_cef_composition_underline_t),
4970 "::",
4971 stringify!(color)
4972 )
4973 );
4974 assert_eq!(
4975 unsafe { ::std::ptr::addr_of!((*ptr).background_color) as usize - ptr as usize },
4976 12usize,
4977 concat!(
4978 "Offset of field: ",
4979 stringify!(_cef_composition_underline_t),
4980 "::",
4981 stringify!(background_color)
4982 )
4983 );
4984 assert_eq!(
4985 unsafe { ::std::ptr::addr_of!((*ptr).thick) as usize - ptr as usize },
4986 16usize,
4987 concat!(
4988 "Offset of field: ",
4989 stringify!(_cef_composition_underline_t),
4990 "::",
4991 stringify!(thick)
4992 )
4993 );
4994 assert_eq!(
4995 unsafe { ::std::ptr::addr_of!((*ptr).style) as usize - ptr as usize },
4996 20usize,
4997 concat!(
4998 "Offset of field: ",
4999 stringify!(_cef_composition_underline_t),
5000 "::",
5001 stringify!(style)
5002 )
5003 );
5004}
5005#[doc = "\n Structure representing IME composition underline information. This is a thin\n wrapper around Blink's WebCompositionUnderline class and should be kept in\n sync with that.\n"]
5006pub type cef_composition_underline_t = _cef_composition_underline_t;
5007impl cef_channel_layout_t {
5008 pub const CEF_CHANNEL_LAYOUT_MAX: cef_channel_layout_t =
5009 cef_channel_layout_t::CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX;
5010}
5011#[repr(u32)]
5012#[non_exhaustive]
5013#[doc = "\n Enumerates the various representations of the ordering of audio channels.\n Must be kept synchronized with media::ChannelLayout from Chromium.\n See media\\base\\channel_layout.h\n"]
5014#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5015pub enum cef_channel_layout_t {
5016 CEF_CHANNEL_LAYOUT_NONE = 0,
5017 CEF_CHANNEL_LAYOUT_UNSUPPORTED = 1,
5018 #[doc = " Front C"]
5019 CEF_CHANNEL_LAYOUT_MONO = 2,
5020 #[doc = " Front L, Front R"]
5021 CEF_CHANNEL_LAYOUT_STEREO = 3,
5022 #[doc = " Front L, Front R, Back C"]
5023 CEF_CHANNEL_LAYOUT_2_1 = 4,
5024 #[doc = " Front L, Front R, Front C"]
5025 CEF_CHANNEL_LAYOUT_SURROUND = 5,
5026 #[doc = " Front L, Front R, Front C, Back C"]
5027 CEF_CHANNEL_LAYOUT_4_0 = 6,
5028 #[doc = " Front L, Front R, Side L, Side R"]
5029 CEF_CHANNEL_LAYOUT_2_2 = 7,
5030 #[doc = " Front L, Front R, Back L, Back R"]
5031 CEF_CHANNEL_LAYOUT_QUAD = 8,
5032 #[doc = " Front L, Front R, Front C, Side L, Side R"]
5033 CEF_CHANNEL_LAYOUT_5_0 = 9,
5034 #[doc = " Front L, Front R, Front C, LFE, Side L, Side R"]
5035 CEF_CHANNEL_LAYOUT_5_1 = 10,
5036 #[doc = " Front L, Front R, Front C, Back L, Back R"]
5037 CEF_CHANNEL_LAYOUT_5_0_BACK = 11,
5038 #[doc = " Front L, Front R, Front C, LFE, Back L, Back R"]
5039 CEF_CHANNEL_LAYOUT_5_1_BACK = 12,
5040 #[doc = " Front L, Front R, Front C, Side L, Side R, Back L, Back R"]
5041 CEF_CHANNEL_LAYOUT_7_0 = 13,
5042 #[doc = " Front L, Front R, Front C, LFE, Side L, Side R, Back L, Back R"]
5043 CEF_CHANNEL_LAYOUT_7_1 = 14,
5044 #[doc = " Front L, Front R, Front C, LFE, Side L, Side R, Front LofC, Front RofC"]
5045 CEF_CHANNEL_LAYOUT_7_1_WIDE = 15,
5046 #[doc = " Stereo L, Stereo R"]
5047 CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX = 16,
5048 #[doc = " Stereo L, Stereo R, LFE"]
5049 CEF_CHANNEL_LAYOUT_2POINT1 = 17,
5050 #[doc = " Stereo L, Stereo R, Front C, LFE"]
5051 CEF_CHANNEL_LAYOUT_3_1 = 18,
5052 #[doc = " Stereo L, Stereo R, Front C, Rear C, LFE"]
5053 CEF_CHANNEL_LAYOUT_4_1 = 19,
5054 #[doc = " Stereo L, Stereo R, Front C, Side L, Side R, Back C"]
5055 CEF_CHANNEL_LAYOUT_6_0 = 20,
5056 #[doc = " Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC"]
5057 CEF_CHANNEL_LAYOUT_6_0_FRONT = 21,
5058 #[doc = " Stereo L, Stereo R, Front C, Rear L, Rear R, Rear C"]
5059 CEF_CHANNEL_LAYOUT_HEXAGONAL = 22,
5060 #[doc = " Stereo L, Stereo R, Front C, LFE, Side L, Side R, Rear Center"]
5061 CEF_CHANNEL_LAYOUT_6_1 = 23,
5062 #[doc = " Stereo L, Stereo R, Front C, LFE, Back L, Back R, Rear Center"]
5063 CEF_CHANNEL_LAYOUT_6_1_BACK = 24,
5064 #[doc = " Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC, LFE"]
5065 CEF_CHANNEL_LAYOUT_6_1_FRONT = 25,
5066 #[doc = " Front L, Front R, Front C, Side L, Side R, Front LofC, Front RofC"]
5067 CEF_CHANNEL_LAYOUT_7_0_FRONT = 26,
5068 #[doc = " Front L, Front R, Front C, LFE, Back L, Back R, Front LofC, Front RofC"]
5069 CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK = 27,
5070 #[doc = " Front L, Front R, Front C, Side L, Side R, Rear L, Back R, Back C."]
5071 CEF_CHANNEL_LAYOUT_OCTAGONAL = 28,
5072 #[doc = " Channels are not explicitly mapped to speakers."]
5073 CEF_CHANNEL_LAYOUT_DISCRETE = 29,
5074 #[doc = " Front L, Front R, Front C. Front C contains the keyboard mic audio. This\n layout is only intended for input for WebRTC. The Front C channel\n is stripped away in the WebRTC audio input pipeline and never seen outside\n of that."]
5075 CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = 30,
5076 #[doc = " Front L, Front R, Side L, Side R, LFE"]
5077 CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE = 31,
5078 #[doc = " Actual channel layout is specified in the bitstream and the actual channel\n count is unknown at Chromium media pipeline level (useful for audio\n pass-through mode)."]
5079 CEF_CHANNEL_LAYOUT_BITSTREAM = 32,
5080 #[doc = " Front L, Front R, Front C, LFE, Side L, Side R,\n Front Height L, Front Height R, Rear Height L, Rear Height R\n Will be represented as six channels (5.1) due to eight channel limit\n kMaxConcurrentChannels"]
5081 CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX = 33,
5082}
5083#[doc = "\n Structure representing the audio parameters for setting up the audio\n handler.\n"]
5084#[repr(C)]
5085#[derive(Debug, Copy, Clone)]
5086pub struct _cef_audio_parameters_t {
5087 #[doc = "\n Layout of the audio channels\n"]
5088 pub channel_layout: cef_channel_layout_t,
5089 #[doc = "\n Sample rate"]
5090 pub sample_rate: ::std::os::raw::c_int,
5091 #[doc = "\n Number of frames per buffer\n"]
5092 pub frames_per_buffer: ::std::os::raw::c_int,
5093}
5094#[test]
5095fn bindgen_test_layout__cef_audio_parameters_t() {
5096 const UNINIT: ::std::mem::MaybeUninit<_cef_audio_parameters_t> =
5097 ::std::mem::MaybeUninit::uninit();
5098 let ptr = UNINIT.as_ptr();
5099 assert_eq!(
5100 ::std::mem::size_of::<_cef_audio_parameters_t>(),
5101 12usize,
5102 concat!("Size of: ", stringify!(_cef_audio_parameters_t))
5103 );
5104 assert_eq!(
5105 ::std::mem::align_of::<_cef_audio_parameters_t>(),
5106 4usize,
5107 concat!("Alignment of ", stringify!(_cef_audio_parameters_t))
5108 );
5109 assert_eq!(
5110 unsafe { ::std::ptr::addr_of!((*ptr).channel_layout) as usize - ptr as usize },
5111 0usize,
5112 concat!(
5113 "Offset of field: ",
5114 stringify!(_cef_audio_parameters_t),
5115 "::",
5116 stringify!(channel_layout)
5117 )
5118 );
5119 assert_eq!(
5120 unsafe { ::std::ptr::addr_of!((*ptr).sample_rate) as usize - ptr as usize },
5121 4usize,
5122 concat!(
5123 "Offset of field: ",
5124 stringify!(_cef_audio_parameters_t),
5125 "::",
5126 stringify!(sample_rate)
5127 )
5128 );
5129 assert_eq!(
5130 unsafe { ::std::ptr::addr_of!((*ptr).frames_per_buffer) as usize - ptr as usize },
5131 8usize,
5132 concat!(
5133 "Offset of field: ",
5134 stringify!(_cef_audio_parameters_t),
5135 "::",
5136 stringify!(frames_per_buffer)
5137 )
5138 );
5139}
5140#[doc = "\n Structure representing the audio parameters for setting up the audio\n handler.\n"]
5141pub type cef_audio_parameters_t = _cef_audio_parameters_t;
5142#[repr(u32)]
5143#[non_exhaustive]
5144#[doc = "\n Result codes for CefMediaRouter::CreateRoute. Should be kept in sync with\n Chromium's media_router::mojom::RouteRequestResultCode type.\n"]
5145#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5146pub enum cef_media_route_create_result_t {
5147 CEF_MRCR_UNKNOWN_ERROR = 0,
5148 CEF_MRCR_OK = 1,
5149 CEF_MRCR_TIMED_OUT = 2,
5150 CEF_MRCR_ROUTE_NOT_FOUND = 3,
5151 CEF_MRCR_SINK_NOT_FOUND = 4,
5152 CEF_MRCR_INVALID_ORIGIN = 5,
5153 CEF_MRCR_NO_SUPPORTED_PROVIDER = 7,
5154 CEF_MRCR_CANCELLED = 8,
5155 CEF_MRCR_ROUTE_ALREADY_EXISTS = 9,
5156 CEF_MRCR_ROUTE_ALREADY_TERMINATED = 11,
5157}
5158#[repr(u32)]
5159#[non_exhaustive]
5160#[doc = "\n Connection state for a MediaRoute object.\n"]
5161#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5162pub enum cef_media_route_connection_state_t {
5163 CEF_MRCS_UNKNOWN = 0,
5164 CEF_MRCS_CONNECTING = 1,
5165 CEF_MRCS_CONNECTED = 2,
5166 CEF_MRCS_CLOSED = 3,
5167 CEF_MRCS_TERMINATED = 4,
5168}
5169#[repr(u32)]
5170#[non_exhaustive]
5171#[doc = "\n Icon types for a MediaSink object. Should be kept in sync with Chromium's\n media_router::SinkIconType type.\n"]
5172#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5173pub enum cef_media_sink_icon_type_t {
5174 CEF_MSIT_CAST = 0,
5175 CEF_MSIT_CAST_AUDIO_GROUP = 1,
5176 CEF_MSIT_CAST_AUDIO = 2,
5177 CEF_MSIT_MEETING = 3,
5178 CEF_MSIT_HANGOUT = 4,
5179 CEF_MSIT_EDUCATION = 5,
5180 CEF_MSIT_WIRED_DISPLAY = 6,
5181 CEF_MSIT_GENERIC = 7,
5182 CEF_MSIT_TOTAL_COUNT = 8,
5183}
5184#[doc = "\n Device information for a MediaSink object.\n"]
5185#[repr(C)]
5186#[derive(Debug, Copy, Clone)]
5187pub struct _cef_media_sink_device_info_t {
5188 pub ip_address: cef_string_t,
5189 pub port: ::std::os::raw::c_int,
5190 pub model_name: cef_string_t,
5191}
5192#[test]
5193fn bindgen_test_layout__cef_media_sink_device_info_t() {
5194 const UNINIT: ::std::mem::MaybeUninit<_cef_media_sink_device_info_t> =
5195 ::std::mem::MaybeUninit::uninit();
5196 let ptr = UNINIT.as_ptr();
5197 assert_eq!(
5198 ::std::mem::size_of::<_cef_media_sink_device_info_t>(),
5199 56usize,
5200 concat!("Size of: ", stringify!(_cef_media_sink_device_info_t))
5201 );
5202 assert_eq!(
5203 ::std::mem::align_of::<_cef_media_sink_device_info_t>(),
5204 8usize,
5205 concat!("Alignment of ", stringify!(_cef_media_sink_device_info_t))
5206 );
5207 assert_eq!(
5208 unsafe { ::std::ptr::addr_of!((*ptr).ip_address) as usize - ptr as usize },
5209 0usize,
5210 concat!(
5211 "Offset of field: ",
5212 stringify!(_cef_media_sink_device_info_t),
5213 "::",
5214 stringify!(ip_address)
5215 )
5216 );
5217 assert_eq!(
5218 unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize },
5219 24usize,
5220 concat!(
5221 "Offset of field: ",
5222 stringify!(_cef_media_sink_device_info_t),
5223 "::",
5224 stringify!(port)
5225 )
5226 );
5227 assert_eq!(
5228 unsafe { ::std::ptr::addr_of!((*ptr).model_name) as usize - ptr as usize },
5229 32usize,
5230 concat!(
5231 "Offset of field: ",
5232 stringify!(_cef_media_sink_device_info_t),
5233 "::",
5234 stringify!(model_name)
5235 )
5236 );
5237}
5238#[doc = "\n Device information for a MediaSink object.\n"]
5239pub type cef_media_sink_device_info_t = _cef_media_sink_device_info_t;
5240#[repr(u32)]
5241#[non_exhaustive]
5242#[doc = "\n Represents commands available to TextField.\n"]
5243#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5244pub enum cef_text_field_commands_t {
5245 CEF_TFC_CUT = 1,
5246 CEF_TFC_COPY = 2,
5247 CEF_TFC_PASTE = 3,
5248 CEF_TFC_UNDO = 4,
5249 CEF_TFC_DELETE = 5,
5250 CEF_TFC_SELECT_ALL = 6,
5251}
5252#[repr(u32)]
5253#[non_exhaustive]
5254#[doc = "\n Chrome toolbar types.\n"]
5255#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5256pub enum cef_chrome_toolbar_type_t {
5257 CEF_CTT_NONE = 1,
5258 CEF_CTT_NORMAL = 2,
5259 CEF_CTT_LOCATION = 3,
5260}
5261impl cef_chrome_page_action_icon_type_t {
5262 pub const CEF_CPAIT_MAX_VALUE: cef_chrome_page_action_icon_type_t =
5263 cef_chrome_page_action_icon_type_t::CEF_CPAIT_PRICE_INSIGHTS;
5264}
5265#[repr(u32)]
5266#[non_exhaustive]
5267#[doc = "\n Chrome page action icon types. Should be kept in sync with Chromium's\n PageActionIconType type.\n"]
5268#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5269pub enum cef_chrome_page_action_icon_type_t {
5270 CEF_CPAIT_BOOKMARK_STAR = 0,
5271 CEF_CPAIT_CLICK_TO_CALL = 1,
5272 CEF_CPAIT_COOKIE_CONTROLS = 2,
5273 CEF_CPAIT_FILE_SYSTEM_ACCESS = 3,
5274 CEF_CPAIT_FIND = 4,
5275 CEF_CPAIT_HIGH_EFFICIENCY = 5,
5276 CEF_CPAIT_INTENT_PICKER = 6,
5277 CEF_CPAIT_LOCAL_CARD_MIGRATION = 7,
5278 CEF_CPAIT_MANAGE_PASSWORDS = 8,
5279 CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION = 9,
5280 CEF_CPAIT_PRICE_TRACKING = 10,
5281 CEF_CPAIT_PWA_INSTALL = 11,
5282 CEF_CPAIT_QR_CODE_GENERATOR = 12,
5283 CEF_CPAIT_READER_MODE = 13,
5284 CEF_CPAIT_SAVE_AUTOFILL_ADDRESS = 14,
5285 CEF_CPAIT_SAVE_CARD = 15,
5286 CEF_CPAIT_SEND_TAB_TO_SELF = 16,
5287 CEF_CPAIT_SHARING_HUB = 17,
5288 CEF_CPAIT_SIDE_SEARCH = 18,
5289 CEF_CPAIT_SMS_REMOTE_FETCHER = 19,
5290 CEF_CPAIT_TRANSLATE = 20,
5291 CEF_CPAIT_VIRTUAL_CARD_ENROLL = 21,
5292 CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK = 22,
5293 CEF_CPAIT_ZOOM = 23,
5294 CEF_CPAIT_SAVE_IBAN = 24,
5295 CEF_CPAIT_MANDATORY_REAUTH = 25,
5296 CEF_CPAIT_PRICE_INSIGHTS = 26,
5297}
5298impl cef_chrome_toolbar_button_type_t {
5299 pub const CEF_CTBT_MAX_VALUE: cef_chrome_toolbar_button_type_t =
5300 cef_chrome_toolbar_button_type_t::CEF_CTBT_SIDE_PANEL;
5301}
5302#[repr(u32)]
5303#[non_exhaustive]
5304#[doc = "\n Chrome toolbar button types. Should be kept in sync with CEF's internal\n ToolbarButtonType type.\n"]
5305#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5306pub enum cef_chrome_toolbar_button_type_t {
5307 CEF_CTBT_CAST = 0,
5308 CEF_CTBT_DOWNLOAD = 1,
5309 CEF_CTBT_SEND_TAB_TO_SELF = 2,
5310 CEF_CTBT_SIDE_PANEL = 3,
5311}
5312#[repr(u32)]
5313#[non_exhaustive]
5314#[doc = "\n Docking modes supported by CefWindow::AddOverlay.\n"]
5315#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5316pub enum cef_docking_mode_t {
5317 CEF_DOCKING_MODE_TOP_LEFT = 1,
5318 CEF_DOCKING_MODE_TOP_RIGHT = 2,
5319 CEF_DOCKING_MODE_BOTTOM_LEFT = 3,
5320 CEF_DOCKING_MODE_BOTTOM_RIGHT = 4,
5321 CEF_DOCKING_MODE_CUSTOM = 5,
5322}
5323#[repr(u32)]
5324#[non_exhaustive]
5325#[doc = "\n Show states supported by CefWindowDelegate::GetInitialShowState.\n"]
5326#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5327pub enum cef_show_state_t {
5328 CEF_SHOW_STATE_NORMAL = 1,
5329 CEF_SHOW_STATE_MINIMIZED = 2,
5330 CEF_SHOW_STATE_MAXIMIZED = 3,
5331 CEF_SHOW_STATE_FULLSCREEN = 4,
5332}
5333#[repr(u32)]
5334#[non_exhaustive]
5335#[doc = "\n Values indicating what state of the touch handle is set.\n"]
5336#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5337pub enum cef_touch_handle_state_flags_t {
5338 CEF_THS_FLAG_NONE = 0,
5339 CEF_THS_FLAG_ENABLED = 1,
5340 CEF_THS_FLAG_ORIENTATION = 2,
5341 CEF_THS_FLAG_ORIGIN = 4,
5342 CEF_THS_FLAG_ALPHA = 8,
5343}
5344#[repr(C)]
5345#[derive(Debug, Copy, Clone)]
5346pub struct _cef_touch_handle_state_t {
5347 #[doc = "\n Touch handle id. Increments for each new touch handle.\n"]
5348 pub touch_handle_id: ::std::os::raw::c_int,
5349 #[doc = "\n Combination of cef_touch_handle_state_flags_t values indicating what state\n is set.\n"]
5350 pub flags: u32,
5351 #[doc = "\n Enabled state. Only set if |flags| contains CEF_THS_FLAG_ENABLED.\n"]
5352 pub enabled: ::std::os::raw::c_int,
5353 #[doc = "\n Orientation state. Only set if |flags| contains CEF_THS_FLAG_ORIENTATION.\n"]
5354 pub orientation: cef_horizontal_alignment_t,
5355 pub mirror_vertical: ::std::os::raw::c_int,
5356 pub mirror_horizontal: ::std::os::raw::c_int,
5357 #[doc = "\n Origin state. Only set if |flags| contains CEF_THS_FLAG_ORIGIN.\n"]
5358 pub origin: cef_point_t,
5359 #[doc = "\n Alpha state. Only set if |flags| contains CEF_THS_FLAG_ALPHA.\n"]
5360 pub alpha: f32,
5361}
5362#[test]
5363fn bindgen_test_layout__cef_touch_handle_state_t() {
5364 const UNINIT: ::std::mem::MaybeUninit<_cef_touch_handle_state_t> =
5365 ::std::mem::MaybeUninit::uninit();
5366 let ptr = UNINIT.as_ptr();
5367 assert_eq!(
5368 ::std::mem::size_of::<_cef_touch_handle_state_t>(),
5369 36usize,
5370 concat!("Size of: ", stringify!(_cef_touch_handle_state_t))
5371 );
5372 assert_eq!(
5373 ::std::mem::align_of::<_cef_touch_handle_state_t>(),
5374 4usize,
5375 concat!("Alignment of ", stringify!(_cef_touch_handle_state_t))
5376 );
5377 assert_eq!(
5378 unsafe { ::std::ptr::addr_of!((*ptr).touch_handle_id) as usize - ptr as usize },
5379 0usize,
5380 concat!(
5381 "Offset of field: ",
5382 stringify!(_cef_touch_handle_state_t),
5383 "::",
5384 stringify!(touch_handle_id)
5385 )
5386 );
5387 assert_eq!(
5388 unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
5389 4usize,
5390 concat!(
5391 "Offset of field: ",
5392 stringify!(_cef_touch_handle_state_t),
5393 "::",
5394 stringify!(flags)
5395 )
5396 );
5397 assert_eq!(
5398 unsafe { ::std::ptr::addr_of!((*ptr).enabled) as usize - ptr as usize },
5399 8usize,
5400 concat!(
5401 "Offset of field: ",
5402 stringify!(_cef_touch_handle_state_t),
5403 "::",
5404 stringify!(enabled)
5405 )
5406 );
5407 assert_eq!(
5408 unsafe { ::std::ptr::addr_of!((*ptr).orientation) as usize - ptr as usize },
5409 12usize,
5410 concat!(
5411 "Offset of field: ",
5412 stringify!(_cef_touch_handle_state_t),
5413 "::",
5414 stringify!(orientation)
5415 )
5416 );
5417 assert_eq!(
5418 unsafe { ::std::ptr::addr_of!((*ptr).mirror_vertical) as usize - ptr as usize },
5419 16usize,
5420 concat!(
5421 "Offset of field: ",
5422 stringify!(_cef_touch_handle_state_t),
5423 "::",
5424 stringify!(mirror_vertical)
5425 )
5426 );
5427 assert_eq!(
5428 unsafe { ::std::ptr::addr_of!((*ptr).mirror_horizontal) as usize - ptr as usize },
5429 20usize,
5430 concat!(
5431 "Offset of field: ",
5432 stringify!(_cef_touch_handle_state_t),
5433 "::",
5434 stringify!(mirror_horizontal)
5435 )
5436 );
5437 assert_eq!(
5438 unsafe { ::std::ptr::addr_of!((*ptr).origin) as usize - ptr as usize },
5439 24usize,
5440 concat!(
5441 "Offset of field: ",
5442 stringify!(_cef_touch_handle_state_t),
5443 "::",
5444 stringify!(origin)
5445 )
5446 );
5447 assert_eq!(
5448 unsafe { ::std::ptr::addr_of!((*ptr).alpha) as usize - ptr as usize },
5449 32usize,
5450 concat!(
5451 "Offset of field: ",
5452 stringify!(_cef_touch_handle_state_t),
5453 "::",
5454 stringify!(alpha)
5455 )
5456 );
5457}
5458pub type cef_touch_handle_state_t = _cef_touch_handle_state_t;
5459#[repr(u32)]
5460#[non_exhaustive]
5461#[doc = "\n Media access permissions used by OnRequestMediaAccessPermission.\n"]
5462#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5463pub enum cef_media_access_permission_types_t {
5464 #[doc = "\n No permission.\n"]
5465 CEF_MEDIA_PERMISSION_NONE = 0,
5466 #[doc = "\n Device audio capture permission.\n"]
5467 CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE = 1,
5468 #[doc = "\n Device video capture permission.\n"]
5469 CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE = 2,
5470 #[doc = "\n Desktop audio capture permission.\n"]
5471 CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE = 4,
5472 #[doc = "\n Desktop video capture permission.\n"]
5473 CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE = 8,
5474}
5475#[repr(u32)]
5476#[non_exhaustive]
5477#[doc = "\n Permission types used with OnShowPermissionPrompt. Some types are\n platform-specific or only supported with the Chrome runtime. Should be kept\n in sync with Chromium's permissions::RequestType type.\n"]
5478#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5479pub enum cef_permission_request_types_t {
5480 CEF_PERMISSION_TYPE_NONE = 0,
5481 CEF_PERMISSION_TYPE_ACCESSIBILITY_EVENTS = 1,
5482 CEF_PERMISSION_TYPE_AR_SESSION = 2,
5483 CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = 4,
5484 CEF_PERMISSION_TYPE_CAMERA_STREAM = 8,
5485 CEF_PERMISSION_TYPE_CLIPBOARD = 16,
5486 CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = 32,
5487 CEF_PERMISSION_TYPE_DISK_QUOTA = 64,
5488 CEF_PERMISSION_TYPE_LOCAL_FONTS = 128,
5489 CEF_PERMISSION_TYPE_GEOLOCATION = 256,
5490 CEF_PERMISSION_TYPE_IDLE_DETECTION = 512,
5491 CEF_PERMISSION_TYPE_MIC_STREAM = 1024,
5492 CEF_PERMISSION_TYPE_MIDI = 2048,
5493 CEF_PERMISSION_TYPE_MIDI_SYSEX = 4096,
5494 CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 8192,
5495 CEF_PERMISSION_TYPE_NOTIFICATIONS = 16384,
5496 CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 32768,
5497 CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 65536,
5498 CEF_PERMISSION_TYPE_STORAGE_ACCESS = 131072,
5499 CEF_PERMISSION_TYPE_VR_SESSION = 262144,
5500 CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 524288,
5501}
5502#[repr(u32)]
5503#[non_exhaustive]
5504#[doc = "\n Permission request results.\n"]
5505#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5506pub enum cef_permission_request_result_t {
5507 #[doc = "\n Accept the permission request as an explicit user action.\n"]
5508 CEF_PERMISSION_RESULT_ACCEPT = 0,
5509 #[doc = "\n Deny the permission request as an explicit user action.\n"]
5510 CEF_PERMISSION_RESULT_DENY = 1,
5511 #[doc = "\n Dismiss the permission request as an explicit user action.\n"]
5512 CEF_PERMISSION_RESULT_DISMISS = 2,
5513 #[doc = "\n Ignore the permission request. If the prompt remains unhandled (e.g.\n OnShowPermissionPrompt returns false and there is no default permissions\n UI) then any related promises may remain unresolved.\n"]
5514 CEF_PERMISSION_RESULT_IGNORE = 3,
5515}
5516#[repr(u32)]
5517#[non_exhaustive]
5518#[doc = "\n Certificate types supported by CefTestServer::CreateAndStart. The matching\n certificate file must exist in the \"net/data/ssl/certificates\" directory.\n See CefSetDataDirectoryForTests() for related configuration.\n"]
5519#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5520pub enum cef_test_cert_type_t {
5521 #[doc = " Valid certificate using the IP (127.0.0.1). Loads the \"ok_cert.pem\" file."]
5522 CEF_TEST_CERT_OK_IP = 0,
5523 #[doc = " Valid certificate using the domain (\"localhost\"). Loads the\n \"localhost_cert.pem\" file."]
5524 CEF_TEST_CERT_OK_DOMAIN = 1,
5525 #[doc = " Expired certificate. Loads the \"expired_cert.pem\" file."]
5526 CEF_TEST_CERT_EXPIRED = 2,
5527}
5528#[repr(u32)]
5529#[non_exhaustive]
5530#[doc = "\n Preferences type passed to\n CefBrowserProcessHandler::OnRegisterCustomPreferences.\n"]
5531#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5532pub enum cef_preferences_type_t {
5533 #[doc = " Global preferences registered a single time at application startup."]
5534 CEF_PREFERENCES_TYPE_GLOBAL = 0,
5535 #[doc = " Request context preferences registered each time a new CefRequestContext\n is created."]
5536 CEF_PREFERENCES_TYPE_REQUEST_CONTEXT = 1,
5537}
5538#[repr(u32)]
5539#[non_exhaustive]
5540#[doc = "\n Download interrupt reasons. Should be kept in sync with\n Chromium's download::DownloadInterruptReason type.\n"]
5541#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5542pub enum cef_download_interrupt_reason_t {
5543 CEF_DOWNLOAD_INTERRUPT_REASON_NONE = 0,
5544 #[doc = " Generic file operation failure."]
5545 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED = 1,
5546 #[doc = " The file cannot be accessed due to security restrictions."]
5547 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED = 2,
5548 #[doc = " There is not enough room on the drive."]
5549 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE = 3,
5550 #[doc = " The directory or file name is too long."]
5551 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG = 5,
5552 #[doc = " The file is too large for the file system to handle."]
5553 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE = 6,
5554 #[doc = " The file contains a virus."]
5555 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED = 7,
5556 #[doc = " The file was in use. Too many files are opened at once. We have run out of\n memory."]
5557 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR = 10,
5558 #[doc = " The file was blocked due to local policy."]
5559 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED = 11,
5560 #[doc = " An attempt to check the safety of the download failed due to unexpected\n reasons. See http://crbug.com/153212."]
5561 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED = 12,
5562 #[doc = " An attempt was made to seek past the end of a file in opening\n a file (as part of resuming a previously interrupted download)."]
5563 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT = 13,
5564 #[doc = " The partial file didn't match the expected hash."]
5565 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH = 14,
5566 #[doc = " The source and the target of the download were the same."]
5567 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE = 15,
5568 #[doc = " Generic network failure."]
5569 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED = 20,
5570 #[doc = " The network operation timed out."]
5571 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT = 21,
5572 #[doc = " The network connection has been lost."]
5573 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED = 22,
5574 #[doc = " The server has gone down."]
5575 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN = 23,
5576 #[doc = " The network request was invalid. This may be due to the original URL or a\n redirected URL:\n - Having an unsupported scheme.\n - Being an invalid URL.\n - Being disallowed by policy."]
5577 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST = 24,
5578 #[doc = " The server indicates that the operation has failed (generic)."]
5579 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED = 30,
5580 #[doc = " The server does not support range requests.\n Internal use only: must restart from the beginning."]
5581 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE = 31,
5582 #[doc = " The server does not have the requested data."]
5583 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT = 33,
5584 #[doc = " Server didn't authorize access to resource."]
5585 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED = 34,
5586 #[doc = " Server certificate problem."]
5587 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM = 35,
5588 #[doc = " Server access forbidden."]
5589 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN = 36,
5590 #[doc = " Unexpected server response. This might indicate that the responding server\n may not be the intended server."]
5591 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE = 37,
5592 #[doc = " The server sent fewer bytes than the content-length header. It may\n indicate that the connection was closed prematurely, or the Content-Length\n header was invalid. The download is only interrupted if strong validators\n are present. Otherwise, it is treated as finished."]
5593 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH = 38,
5594 #[doc = " An unexpected cross-origin redirect happened."]
5595 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT = 39,
5596 #[doc = " The user canceled the download."]
5597 CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED = 40,
5598 #[doc = " The user shut down the browser.\n Internal use only: resume pending downloads if possible."]
5599 CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN = 41,
5600 #[doc = " The browser crashed.\n Internal use only: resume pending downloads if possible."]
5601 CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = 50,
5602}
5603#[repr(u32)]
5604#[non_exhaustive]
5605#[doc = "\n Specifies the gesture commands.\n"]
5606#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5607pub enum cef_gesture_command_t {
5608 CEF_GESTURE_COMMAND_BACK = 0,
5609 CEF_GESTURE_COMMAND_FORWARD = 1,
5610}
5611#[repr(C)]
5612#[derive(Debug, Copy, Clone)]
5613pub struct _cef_base_ref_counted_t {
5614 pub size: usize,
5615 pub add_ref: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t)>,
5616 pub release: ::std::option::Option<
5617 unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t) -> ::std::os::raw::c_int,
5618 >,
5619 pub has_one_ref: ::std::option::Option<
5620 unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t) -> ::std::os::raw::c_int,
5621 >,
5622 pub has_at_least_one_ref: ::std::option::Option<
5623 unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t) -> ::std::os::raw::c_int,
5624 >,
5625}
5626#[test]
5627fn bindgen_test_layout__cef_base_ref_counted_t() {
5628 const UNINIT: ::std::mem::MaybeUninit<_cef_base_ref_counted_t> =
5629 ::std::mem::MaybeUninit::uninit();
5630 let ptr = UNINIT.as_ptr();
5631 assert_eq!(
5632 ::std::mem::size_of::<_cef_base_ref_counted_t>(),
5633 40usize,
5634 concat!("Size of: ", stringify!(_cef_base_ref_counted_t))
5635 );
5636 assert_eq!(
5637 ::std::mem::align_of::<_cef_base_ref_counted_t>(),
5638 8usize,
5639 concat!("Alignment of ", stringify!(_cef_base_ref_counted_t))
5640 );
5641 assert_eq!(
5642 unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
5643 0usize,
5644 concat!(
5645 "Offset of field: ",
5646 stringify!(_cef_base_ref_counted_t),
5647 "::",
5648 stringify!(size)
5649 )
5650 );
5651 assert_eq!(
5652 unsafe { ::std::ptr::addr_of!((*ptr).add_ref) as usize - ptr as usize },
5653 8usize,
5654 concat!(
5655 "Offset of field: ",
5656 stringify!(_cef_base_ref_counted_t),
5657 "::",
5658 stringify!(add_ref)
5659 )
5660 );
5661 assert_eq!(
5662 unsafe { ::std::ptr::addr_of!((*ptr).release) as usize - ptr as usize },
5663 16usize,
5664 concat!(
5665 "Offset of field: ",
5666 stringify!(_cef_base_ref_counted_t),
5667 "::",
5668 stringify!(release)
5669 )
5670 );
5671 assert_eq!(
5672 unsafe { ::std::ptr::addr_of!((*ptr).has_one_ref) as usize - ptr as usize },
5673 24usize,
5674 concat!(
5675 "Offset of field: ",
5676 stringify!(_cef_base_ref_counted_t),
5677 "::",
5678 stringify!(has_one_ref)
5679 )
5680 );
5681 assert_eq!(
5682 unsafe { ::std::ptr::addr_of!((*ptr).has_at_least_one_ref) as usize - ptr as usize },
5683 32usize,
5684 concat!(
5685 "Offset of field: ",
5686 stringify!(_cef_base_ref_counted_t),
5687 "::",
5688 stringify!(has_at_least_one_ref)
5689 )
5690 );
5691}
5692pub type cef_base_ref_counted_t = _cef_base_ref_counted_t;
5693#[repr(C)]
5694#[derive(Debug, Copy, Clone)]
5695pub struct _cef_base_scoped_t {
5696 pub size: usize,
5697 pub del: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_base_scoped_t)>,
5698}
5699#[test]
5700fn bindgen_test_layout__cef_base_scoped_t() {
5701 const UNINIT: ::std::mem::MaybeUninit<_cef_base_scoped_t> = ::std::mem::MaybeUninit::uninit();
5702 let ptr = UNINIT.as_ptr();
5703 assert_eq!(
5704 ::std::mem::size_of::<_cef_base_scoped_t>(),
5705 16usize,
5706 concat!("Size of: ", stringify!(_cef_base_scoped_t))
5707 );
5708 assert_eq!(
5709 ::std::mem::align_of::<_cef_base_scoped_t>(),
5710 8usize,
5711 concat!("Alignment of ", stringify!(_cef_base_scoped_t))
5712 );
5713 assert_eq!(
5714 unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
5715 0usize,
5716 concat!(
5717 "Offset of field: ",
5718 stringify!(_cef_base_scoped_t),
5719 "::",
5720 stringify!(size)
5721 )
5722 );
5723 assert_eq!(
5724 unsafe { ::std::ptr::addr_of!((*ptr).del) as usize - ptr as usize },
5725 8usize,
5726 concat!(
5727 "Offset of field: ",
5728 stringify!(_cef_base_scoped_t),
5729 "::",
5730 stringify!(del)
5731 )
5732 );
5733}
5734pub type cef_base_scoped_t = _cef_base_scoped_t;
5735#[doc = "\n Callback structure for cef_browser_host_t::AddDevToolsMessageObserver. The\n functions of this structure will be called on the browser process UI thread.\n"]
5736#[repr(C)]
5737#[derive(Debug, Copy, Clone)]
5738pub struct _cef_dev_tools_message_observer_t {
5739 #[doc = "\n Base structure.\n"]
5740 pub base: cef_base_ref_counted_t,
5741 #[doc = "\n Method that will be called on receipt of a DevTools protocol message.\n |browser| is the originating browser instance. |message| is a UTF8-encoded\n JSON dictionary representing either a function result or an event.\n |message| is only valid for the scope of this callback and should be\n copied if necessary. Return true (1) if the message was handled or false\n (0) if the message should be further processed and passed to the\n OnDevToolsMethodResult or OnDevToolsEvent functions as appropriate.\n\n Method result dictionaries include an \"id\" (int) value that identifies the\n orginating function call sent from\n cef_browser_host_t::SendDevToolsMessage, and optionally either a \"result\"\n (dictionary) or \"error\" (dictionary) value. The \"error\" dictionary will\n contain \"code\" (int) and \"message\" (string) values. Event dictionaries\n include a \"function\" (string) value and optionally a \"params\" (dictionary)\n value. See the DevTools protocol documentation at\n https://chromedevtools.github.io/devtools-protocol/ for details of\n supported function calls and the expected \"result\" or \"params\" dictionary\n contents. JSON dictionaries can be parsed using the CefParseJSON function\n if desired, however be aware of performance considerations when parsing\n large messages (some of which may exceed 1MB in size).\n"]
5742 pub on_dev_tools_message: ::std::option::Option<
5743 unsafe extern "C" fn(
5744 self_: *mut _cef_dev_tools_message_observer_t,
5745 browser: *mut _cef_browser_t,
5746 message: *const ::std::os::raw::c_void,
5747 message_size: usize,
5748 ) -> ::std::os::raw::c_int,
5749 >,
5750 #[doc = "\n Method that will be called after attempted execution of a DevTools\n protocol function. |browser| is the originating browser instance.\n |message_id| is the \"id\" value that identifies the originating function\n call message. If the function succeeded |success| will be true (1) and\n |result| will be the UTF8-encoded JSON \"result\" dictionary value (which\n may be NULL). If the function failed |success| will be false (0) and\n |result| will be the UTF8-encoded JSON \"error\" dictionary value. |result|\n is only valid for the scope of this callback and should be copied if\n necessary. See the OnDevToolsMessage documentation for additional details\n on |result| contents.\n"]
5751 pub on_dev_tools_method_result: ::std::option::Option<
5752 unsafe extern "C" fn(
5753 self_: *mut _cef_dev_tools_message_observer_t,
5754 browser: *mut _cef_browser_t,
5755 message_id: ::std::os::raw::c_int,
5756 success: ::std::os::raw::c_int,
5757 result: *const ::std::os::raw::c_void,
5758 result_size: usize,
5759 ),
5760 >,
5761 #[doc = "\n Method that will be called on receipt of a DevTools protocol event.\n |browser| is the originating browser instance. |function| is the\n \"function\" value. |params| is the UTF8-encoded JSON \"params\" dictionary\n value (which may be NULL). |params| is only valid for the scope of this\n callback and should be copied if necessary. See the OnDevToolsMessage\n documentation for additional details on |params| contents.\n"]
5762 pub on_dev_tools_event: ::std::option::Option<
5763 unsafe extern "C" fn(
5764 self_: *mut _cef_dev_tools_message_observer_t,
5765 browser: *mut _cef_browser_t,
5766 method: *const cef_string_t,
5767 params: *const ::std::os::raw::c_void,
5768 params_size: usize,
5769 ),
5770 >,
5771 #[doc = "\n Method that will be called when the DevTools agent has attached. |browser|\n is the originating browser instance. This will generally occur in response\n to the first message sent while the agent is detached.\n"]
5772 pub on_dev_tools_agent_attached: ::std::option::Option<
5773 unsafe extern "C" fn(
5774 self_: *mut _cef_dev_tools_message_observer_t,
5775 browser: *mut _cef_browser_t,
5776 ),
5777 >,
5778 #[doc = "\n Method that will be called when the DevTools agent has detached. |browser|\n is the originating browser instance. Any function results that were\n pending before the agent became detached will not be delivered, and any\n active event subscriptions will be canceled.\n"]
5779 pub on_dev_tools_agent_detached: ::std::option::Option<
5780 unsafe extern "C" fn(
5781 self_: *mut _cef_dev_tools_message_observer_t,
5782 browser: *mut _cef_browser_t,
5783 ),
5784 >,
5785}
5786#[test]
5787fn bindgen_test_layout__cef_dev_tools_message_observer_t() {
5788 const UNINIT: ::std::mem::MaybeUninit<_cef_dev_tools_message_observer_t> =
5789 ::std::mem::MaybeUninit::uninit();
5790 let ptr = UNINIT.as_ptr();
5791 assert_eq!(
5792 ::std::mem::size_of::<_cef_dev_tools_message_observer_t>(),
5793 80usize,
5794 concat!("Size of: ", stringify!(_cef_dev_tools_message_observer_t))
5795 );
5796 assert_eq!(
5797 ::std::mem::align_of::<_cef_dev_tools_message_observer_t>(),
5798 8usize,
5799 concat!(
5800 "Alignment of ",
5801 stringify!(_cef_dev_tools_message_observer_t)
5802 )
5803 );
5804 assert_eq!(
5805 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
5806 0usize,
5807 concat!(
5808 "Offset of field: ",
5809 stringify!(_cef_dev_tools_message_observer_t),
5810 "::",
5811 stringify!(base)
5812 )
5813 );
5814 assert_eq!(
5815 unsafe { ::std::ptr::addr_of!((*ptr).on_dev_tools_message) as usize - ptr as usize },
5816 40usize,
5817 concat!(
5818 "Offset of field: ",
5819 stringify!(_cef_dev_tools_message_observer_t),
5820 "::",
5821 stringify!(on_dev_tools_message)
5822 )
5823 );
5824 assert_eq!(
5825 unsafe { ::std::ptr::addr_of!((*ptr).on_dev_tools_method_result) as usize - ptr as usize },
5826 48usize,
5827 concat!(
5828 "Offset of field: ",
5829 stringify!(_cef_dev_tools_message_observer_t),
5830 "::",
5831 stringify!(on_dev_tools_method_result)
5832 )
5833 );
5834 assert_eq!(
5835 unsafe { ::std::ptr::addr_of!((*ptr).on_dev_tools_event) as usize - ptr as usize },
5836 56usize,
5837 concat!(
5838 "Offset of field: ",
5839 stringify!(_cef_dev_tools_message_observer_t),
5840 "::",
5841 stringify!(on_dev_tools_event)
5842 )
5843 );
5844 assert_eq!(
5845 unsafe { ::std::ptr::addr_of!((*ptr).on_dev_tools_agent_attached) as usize - ptr as usize },
5846 64usize,
5847 concat!(
5848 "Offset of field: ",
5849 stringify!(_cef_dev_tools_message_observer_t),
5850 "::",
5851 stringify!(on_dev_tools_agent_attached)
5852 )
5853 );
5854 assert_eq!(
5855 unsafe { ::std::ptr::addr_of!((*ptr).on_dev_tools_agent_detached) as usize - ptr as usize },
5856 72usize,
5857 concat!(
5858 "Offset of field: ",
5859 stringify!(_cef_dev_tools_message_observer_t),
5860 "::",
5861 stringify!(on_dev_tools_agent_detached)
5862 )
5863 );
5864}
5865#[doc = "\n Callback structure for cef_browser_host_t::AddDevToolsMessageObserver. The\n functions of this structure will be called on the browser process UI thread.\n"]
5866pub type cef_dev_tools_message_observer_t = _cef_dev_tools_message_observer_t;
5867#[doc = "\n Structure that wraps other data value types. Complex types (binary,\n dictionary and list) will be referenced but not owned by this object. Can be\n used on any process and thread.\n"]
5868#[repr(C)]
5869#[derive(Debug, Copy, Clone)]
5870pub struct _cef_value_t {
5871 #[doc = "\n Base structure.\n"]
5872 pub base: cef_base_ref_counted_t,
5873 #[doc = "\n Returns true (1) if the underlying data is valid. This will always be true\n (1) for simple types. For complex types (binary, dictionary and list) the\n underlying data may become invalid if owned by another object (e.g. list\n or dictionary) and that other object is then modified or destroyed. This\n value object can be re-used by calling Set*() even if the underlying data\n is invalid.\n"]
5874 pub is_valid: ::std::option::Option<
5875 unsafe extern "C" fn(self_: *mut _cef_value_t) -> ::std::os::raw::c_int,
5876 >,
5877 #[doc = "\n Returns true (1) if the underlying data is owned by another object.\n"]
5878 pub is_owned: ::std::option::Option<
5879 unsafe extern "C" fn(self_: *mut _cef_value_t) -> ::std::os::raw::c_int,
5880 >,
5881 #[doc = "\n Returns true (1) if the underlying data is read-only. Some APIs may expose\n read-only objects.\n"]
5882 pub is_read_only: ::std::option::Option<
5883 unsafe extern "C" fn(self_: *mut _cef_value_t) -> ::std::os::raw::c_int,
5884 >,
5885 #[doc = "\n Returns true (1) if this object and |that| object have the same underlying\n data. If true (1) modifications to this object will also affect |that|\n object and vice-versa.\n"]
5886 pub is_same: ::std::option::Option<
5887 unsafe extern "C" fn(
5888 self_: *mut _cef_value_t,
5889 that: *mut _cef_value_t,
5890 ) -> ::std::os::raw::c_int,
5891 >,
5892 #[doc = "\n Returns true (1) if this object and |that| object have an equivalent\n underlying value but are not necessarily the same object.\n"]
5893 pub is_equal: ::std::option::Option<
5894 unsafe extern "C" fn(
5895 self_: *mut _cef_value_t,
5896 that: *mut _cef_value_t,
5897 ) -> ::std::os::raw::c_int,
5898 >,
5899 #[doc = "\n Returns a copy of this object. The underlying data will also be copied.\n"]
5900 pub copy:
5901 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_value_t) -> *mut _cef_value_t>,
5902 #[doc = "\n Returns the underlying value type.\n"]
5903 pub get_type:
5904 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_value_t) -> cef_value_type_t>,
5905 #[doc = "\n Returns the underlying value as type bool.\n"]
5906 pub get_bool: ::std::option::Option<
5907 unsafe extern "C" fn(self_: *mut _cef_value_t) -> ::std::os::raw::c_int,
5908 >,
5909 #[doc = "\n Returns the underlying value as type int.\n"]
5910 pub get_int: ::std::option::Option<
5911 unsafe extern "C" fn(self_: *mut _cef_value_t) -> ::std::os::raw::c_int,
5912 >,
5913 #[doc = "\n Returns the underlying value as type double.\n"]
5914 pub get_double: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_value_t) -> f64>,
5915 #[doc = "\n Returns the underlying value as type string.\n"]
5916 pub get_string: ::std::option::Option<
5917 unsafe extern "C" fn(self_: *mut _cef_value_t) -> cef_string_userfree_t,
5918 >,
5919 #[doc = "\n Returns the underlying value as type binary. The returned reference may\n become invalid if the value is owned by another object or if ownership is\n transferred to another object in the future. To maintain a reference to\n the value after assigning ownership to a dictionary or list pass this\n object to the set_value() function instead of passing the returned\n reference to set_binary().\n"]
5920 pub get_binary: ::std::option::Option<
5921 unsafe extern "C" fn(self_: *mut _cef_value_t) -> *mut _cef_binary_value_t,
5922 >,
5923 #[doc = "\n Returns the underlying value as type dictionary. The returned reference\n may become invalid if the value is owned by another object or if ownership\n is transferred to another object in the future. To maintain a reference to\n the value after assigning ownership to a dictionary or list pass this\n object to the set_value() function instead of passing the returned\n reference to set_dictionary().\n"]
5924 pub get_dictionary: ::std::option::Option<
5925 unsafe extern "C" fn(self_: *mut _cef_value_t) -> *mut _cef_dictionary_value_t,
5926 >,
5927 #[doc = "\n Returns the underlying value as type list. The returned reference may\n become invalid if the value is owned by another object or if ownership is\n transferred to another object in the future. To maintain a reference to\n the value after assigning ownership to a dictionary or list pass this\n object to the set_value() function instead of passing the returned\n reference to set_list().\n"]
5928 pub get_list: ::std::option::Option<
5929 unsafe extern "C" fn(self_: *mut _cef_value_t) -> *mut _cef_list_value_t,
5930 >,
5931 #[doc = "\n Sets the underlying value as type null. Returns true (1) if the value was\n set successfully.\n"]
5932 pub set_null: ::std::option::Option<
5933 unsafe extern "C" fn(self_: *mut _cef_value_t) -> ::std::os::raw::c_int,
5934 >,
5935 #[doc = "\n Sets the underlying value as type bool. Returns true (1) if the value was\n set successfully.\n"]
5936 pub set_bool: ::std::option::Option<
5937 unsafe extern "C" fn(
5938 self_: *mut _cef_value_t,
5939 value: ::std::os::raw::c_int,
5940 ) -> ::std::os::raw::c_int,
5941 >,
5942 #[doc = "\n Sets the underlying value as type int. Returns true (1) if the value was\n set successfully.\n"]
5943 pub set_int: ::std::option::Option<
5944 unsafe extern "C" fn(
5945 self_: *mut _cef_value_t,
5946 value: ::std::os::raw::c_int,
5947 ) -> ::std::os::raw::c_int,
5948 >,
5949 #[doc = "\n Sets the underlying value as type double. Returns true (1) if the value\n was set successfully.\n"]
5950 pub set_double: ::std::option::Option<
5951 unsafe extern "C" fn(self_: *mut _cef_value_t, value: f64) -> ::std::os::raw::c_int,
5952 >,
5953 #[doc = "\n Sets the underlying value as type string. Returns true (1) if the value\n was set successfully.\n"]
5954 pub set_string: ::std::option::Option<
5955 unsafe extern "C" fn(
5956 self_: *mut _cef_value_t,
5957 value: *const cef_string_t,
5958 ) -> ::std::os::raw::c_int,
5959 >,
5960 #[doc = "\n Sets the underlying value as type binary. Returns true (1) if the value\n was set successfully. This object keeps a reference to |value| and\n ownership of the underlying data remains unchanged.\n"]
5961 pub set_binary: ::std::option::Option<
5962 unsafe extern "C" fn(
5963 self_: *mut _cef_value_t,
5964 value: *mut _cef_binary_value_t,
5965 ) -> ::std::os::raw::c_int,
5966 >,
5967 #[doc = "\n Sets the underlying value as type dict. Returns true (1) if the value was\n set successfully. This object keeps a reference to |value| and ownership\n of the underlying data remains unchanged.\n"]
5968 pub set_dictionary: ::std::option::Option<
5969 unsafe extern "C" fn(
5970 self_: *mut _cef_value_t,
5971 value: *mut _cef_dictionary_value_t,
5972 ) -> ::std::os::raw::c_int,
5973 >,
5974 #[doc = "\n Sets the underlying value as type list. Returns true (1) if the value was\n set successfully. This object keeps a reference to |value| and ownership\n of the underlying data remains unchanged.\n"]
5975 pub set_list: ::std::option::Option<
5976 unsafe extern "C" fn(
5977 self_: *mut _cef_value_t,
5978 value: *mut _cef_list_value_t,
5979 ) -> ::std::os::raw::c_int,
5980 >,
5981}
5982#[test]
5983fn bindgen_test_layout__cef_value_t() {
5984 const UNINIT: ::std::mem::MaybeUninit<_cef_value_t> = ::std::mem::MaybeUninit::uninit();
5985 let ptr = UNINIT.as_ptr();
5986 assert_eq!(
5987 ::std::mem::size_of::<_cef_value_t>(),
5988 216usize,
5989 concat!("Size of: ", stringify!(_cef_value_t))
5990 );
5991 assert_eq!(
5992 ::std::mem::align_of::<_cef_value_t>(),
5993 8usize,
5994 concat!("Alignment of ", stringify!(_cef_value_t))
5995 );
5996 assert_eq!(
5997 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
5998 0usize,
5999 concat!(
6000 "Offset of field: ",
6001 stringify!(_cef_value_t),
6002 "::",
6003 stringify!(base)
6004 )
6005 );
6006 assert_eq!(
6007 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
6008 40usize,
6009 concat!(
6010 "Offset of field: ",
6011 stringify!(_cef_value_t),
6012 "::",
6013 stringify!(is_valid)
6014 )
6015 );
6016 assert_eq!(
6017 unsafe { ::std::ptr::addr_of!((*ptr).is_owned) as usize - ptr as usize },
6018 48usize,
6019 concat!(
6020 "Offset of field: ",
6021 stringify!(_cef_value_t),
6022 "::",
6023 stringify!(is_owned)
6024 )
6025 );
6026 assert_eq!(
6027 unsafe { ::std::ptr::addr_of!((*ptr).is_read_only) as usize - ptr as usize },
6028 56usize,
6029 concat!(
6030 "Offset of field: ",
6031 stringify!(_cef_value_t),
6032 "::",
6033 stringify!(is_read_only)
6034 )
6035 );
6036 assert_eq!(
6037 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
6038 64usize,
6039 concat!(
6040 "Offset of field: ",
6041 stringify!(_cef_value_t),
6042 "::",
6043 stringify!(is_same)
6044 )
6045 );
6046 assert_eq!(
6047 unsafe { ::std::ptr::addr_of!((*ptr).is_equal) as usize - ptr as usize },
6048 72usize,
6049 concat!(
6050 "Offset of field: ",
6051 stringify!(_cef_value_t),
6052 "::",
6053 stringify!(is_equal)
6054 )
6055 );
6056 assert_eq!(
6057 unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize },
6058 80usize,
6059 concat!(
6060 "Offset of field: ",
6061 stringify!(_cef_value_t),
6062 "::",
6063 stringify!(copy)
6064 )
6065 );
6066 assert_eq!(
6067 unsafe { ::std::ptr::addr_of!((*ptr).get_type) as usize - ptr as usize },
6068 88usize,
6069 concat!(
6070 "Offset of field: ",
6071 stringify!(_cef_value_t),
6072 "::",
6073 stringify!(get_type)
6074 )
6075 );
6076 assert_eq!(
6077 unsafe { ::std::ptr::addr_of!((*ptr).get_bool) as usize - ptr as usize },
6078 96usize,
6079 concat!(
6080 "Offset of field: ",
6081 stringify!(_cef_value_t),
6082 "::",
6083 stringify!(get_bool)
6084 )
6085 );
6086 assert_eq!(
6087 unsafe { ::std::ptr::addr_of!((*ptr).get_int) as usize - ptr as usize },
6088 104usize,
6089 concat!(
6090 "Offset of field: ",
6091 stringify!(_cef_value_t),
6092 "::",
6093 stringify!(get_int)
6094 )
6095 );
6096 assert_eq!(
6097 unsafe { ::std::ptr::addr_of!((*ptr).get_double) as usize - ptr as usize },
6098 112usize,
6099 concat!(
6100 "Offset of field: ",
6101 stringify!(_cef_value_t),
6102 "::",
6103 stringify!(get_double)
6104 )
6105 );
6106 assert_eq!(
6107 unsafe { ::std::ptr::addr_of!((*ptr).get_string) as usize - ptr as usize },
6108 120usize,
6109 concat!(
6110 "Offset of field: ",
6111 stringify!(_cef_value_t),
6112 "::",
6113 stringify!(get_string)
6114 )
6115 );
6116 assert_eq!(
6117 unsafe { ::std::ptr::addr_of!((*ptr).get_binary) as usize - ptr as usize },
6118 128usize,
6119 concat!(
6120 "Offset of field: ",
6121 stringify!(_cef_value_t),
6122 "::",
6123 stringify!(get_binary)
6124 )
6125 );
6126 assert_eq!(
6127 unsafe { ::std::ptr::addr_of!((*ptr).get_dictionary) as usize - ptr as usize },
6128 136usize,
6129 concat!(
6130 "Offset of field: ",
6131 stringify!(_cef_value_t),
6132 "::",
6133 stringify!(get_dictionary)
6134 )
6135 );
6136 assert_eq!(
6137 unsafe { ::std::ptr::addr_of!((*ptr).get_list) as usize - ptr as usize },
6138 144usize,
6139 concat!(
6140 "Offset of field: ",
6141 stringify!(_cef_value_t),
6142 "::",
6143 stringify!(get_list)
6144 )
6145 );
6146 assert_eq!(
6147 unsafe { ::std::ptr::addr_of!((*ptr).set_null) as usize - ptr as usize },
6148 152usize,
6149 concat!(
6150 "Offset of field: ",
6151 stringify!(_cef_value_t),
6152 "::",
6153 stringify!(set_null)
6154 )
6155 );
6156 assert_eq!(
6157 unsafe { ::std::ptr::addr_of!((*ptr).set_bool) as usize - ptr as usize },
6158 160usize,
6159 concat!(
6160 "Offset of field: ",
6161 stringify!(_cef_value_t),
6162 "::",
6163 stringify!(set_bool)
6164 )
6165 );
6166 assert_eq!(
6167 unsafe { ::std::ptr::addr_of!((*ptr).set_int) as usize - ptr as usize },
6168 168usize,
6169 concat!(
6170 "Offset of field: ",
6171 stringify!(_cef_value_t),
6172 "::",
6173 stringify!(set_int)
6174 )
6175 );
6176 assert_eq!(
6177 unsafe { ::std::ptr::addr_of!((*ptr).set_double) as usize - ptr as usize },
6178 176usize,
6179 concat!(
6180 "Offset of field: ",
6181 stringify!(_cef_value_t),
6182 "::",
6183 stringify!(set_double)
6184 )
6185 );
6186 assert_eq!(
6187 unsafe { ::std::ptr::addr_of!((*ptr).set_string) as usize - ptr as usize },
6188 184usize,
6189 concat!(
6190 "Offset of field: ",
6191 stringify!(_cef_value_t),
6192 "::",
6193 stringify!(set_string)
6194 )
6195 );
6196 assert_eq!(
6197 unsafe { ::std::ptr::addr_of!((*ptr).set_binary) as usize - ptr as usize },
6198 192usize,
6199 concat!(
6200 "Offset of field: ",
6201 stringify!(_cef_value_t),
6202 "::",
6203 stringify!(set_binary)
6204 )
6205 );
6206 assert_eq!(
6207 unsafe { ::std::ptr::addr_of!((*ptr).set_dictionary) as usize - ptr as usize },
6208 200usize,
6209 concat!(
6210 "Offset of field: ",
6211 stringify!(_cef_value_t),
6212 "::",
6213 stringify!(set_dictionary)
6214 )
6215 );
6216 assert_eq!(
6217 unsafe { ::std::ptr::addr_of!((*ptr).set_list) as usize - ptr as usize },
6218 208usize,
6219 concat!(
6220 "Offset of field: ",
6221 stringify!(_cef_value_t),
6222 "::",
6223 stringify!(set_list)
6224 )
6225 );
6226}
6227#[doc = "\n Structure that wraps other data value types. Complex types (binary,\n dictionary and list) will be referenced but not owned by this object. Can be\n used on any process and thread.\n"]
6228pub type cef_value_t = _cef_value_t;
6229extern "C" {
6230 #[doc = "\n Creates a new object.\n"]
6231 pub fn cef_value_create() -> *mut cef_value_t;
6232}
6233#[doc = "\n Structure representing a binary value. Can be used on any process and\n thread.\n"]
6234#[repr(C)]
6235#[derive(Debug, Copy, Clone)]
6236pub struct _cef_binary_value_t {
6237 #[doc = "\n Base structure.\n"]
6238 pub base: cef_base_ref_counted_t,
6239 #[doc = "\n Returns true (1) if this object is valid. This object may become invalid\n if the underlying data is owned by another object (e.g. list or\n dictionary) and that other object is then modified or destroyed. Do not\n call any other functions if this function returns false (0).\n"]
6240 pub is_valid: ::std::option::Option<
6241 unsafe extern "C" fn(self_: *mut _cef_binary_value_t) -> ::std::os::raw::c_int,
6242 >,
6243 #[doc = "\n Returns true (1) if this object is currently owned by another object.\n"]
6244 pub is_owned: ::std::option::Option<
6245 unsafe extern "C" fn(self_: *mut _cef_binary_value_t) -> ::std::os::raw::c_int,
6246 >,
6247 #[doc = "\n Returns true (1) if this object and |that| object have the same underlying\n data.\n"]
6248 pub is_same: ::std::option::Option<
6249 unsafe extern "C" fn(
6250 self_: *mut _cef_binary_value_t,
6251 that: *mut _cef_binary_value_t,
6252 ) -> ::std::os::raw::c_int,
6253 >,
6254 #[doc = "\n Returns true (1) if this object and |that| object have an equivalent\n underlying value but are not necessarily the same object.\n"]
6255 pub is_equal: ::std::option::Option<
6256 unsafe extern "C" fn(
6257 self_: *mut _cef_binary_value_t,
6258 that: *mut _cef_binary_value_t,
6259 ) -> ::std::os::raw::c_int,
6260 >,
6261 #[doc = "\n Returns a copy of this object. The data in this object will also be\n copied.\n"]
6262 pub copy: ::std::option::Option<
6263 unsafe extern "C" fn(self_: *mut _cef_binary_value_t) -> *mut _cef_binary_value_t,
6264 >,
6265 #[doc = "\n Returns the data size.\n"]
6266 pub get_size:
6267 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_binary_value_t) -> usize>,
6268 #[doc = "\n Read up to |buffer_size| number of bytes into |buffer|. Reading begins at\n the specified byte |data_offset|. Returns the number of bytes read.\n"]
6269 pub get_data: ::std::option::Option<
6270 unsafe extern "C" fn(
6271 self_: *mut _cef_binary_value_t,
6272 buffer: *mut ::std::os::raw::c_void,
6273 buffer_size: usize,
6274 data_offset: usize,
6275 ) -> usize,
6276 >,
6277}
6278#[test]
6279fn bindgen_test_layout__cef_binary_value_t() {
6280 const UNINIT: ::std::mem::MaybeUninit<_cef_binary_value_t> = ::std::mem::MaybeUninit::uninit();
6281 let ptr = UNINIT.as_ptr();
6282 assert_eq!(
6283 ::std::mem::size_of::<_cef_binary_value_t>(),
6284 96usize,
6285 concat!("Size of: ", stringify!(_cef_binary_value_t))
6286 );
6287 assert_eq!(
6288 ::std::mem::align_of::<_cef_binary_value_t>(),
6289 8usize,
6290 concat!("Alignment of ", stringify!(_cef_binary_value_t))
6291 );
6292 assert_eq!(
6293 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
6294 0usize,
6295 concat!(
6296 "Offset of field: ",
6297 stringify!(_cef_binary_value_t),
6298 "::",
6299 stringify!(base)
6300 )
6301 );
6302 assert_eq!(
6303 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
6304 40usize,
6305 concat!(
6306 "Offset of field: ",
6307 stringify!(_cef_binary_value_t),
6308 "::",
6309 stringify!(is_valid)
6310 )
6311 );
6312 assert_eq!(
6313 unsafe { ::std::ptr::addr_of!((*ptr).is_owned) as usize - ptr as usize },
6314 48usize,
6315 concat!(
6316 "Offset of field: ",
6317 stringify!(_cef_binary_value_t),
6318 "::",
6319 stringify!(is_owned)
6320 )
6321 );
6322 assert_eq!(
6323 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
6324 56usize,
6325 concat!(
6326 "Offset of field: ",
6327 stringify!(_cef_binary_value_t),
6328 "::",
6329 stringify!(is_same)
6330 )
6331 );
6332 assert_eq!(
6333 unsafe { ::std::ptr::addr_of!((*ptr).is_equal) as usize - ptr as usize },
6334 64usize,
6335 concat!(
6336 "Offset of field: ",
6337 stringify!(_cef_binary_value_t),
6338 "::",
6339 stringify!(is_equal)
6340 )
6341 );
6342 assert_eq!(
6343 unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize },
6344 72usize,
6345 concat!(
6346 "Offset of field: ",
6347 stringify!(_cef_binary_value_t),
6348 "::",
6349 stringify!(copy)
6350 )
6351 );
6352 assert_eq!(
6353 unsafe { ::std::ptr::addr_of!((*ptr).get_size) as usize - ptr as usize },
6354 80usize,
6355 concat!(
6356 "Offset of field: ",
6357 stringify!(_cef_binary_value_t),
6358 "::",
6359 stringify!(get_size)
6360 )
6361 );
6362 assert_eq!(
6363 unsafe { ::std::ptr::addr_of!((*ptr).get_data) as usize - ptr as usize },
6364 88usize,
6365 concat!(
6366 "Offset of field: ",
6367 stringify!(_cef_binary_value_t),
6368 "::",
6369 stringify!(get_data)
6370 )
6371 );
6372}
6373#[doc = "\n Structure representing a binary value. Can be used on any process and\n thread.\n"]
6374pub type cef_binary_value_t = _cef_binary_value_t;
6375extern "C" {
6376 #[doc = "\n Creates a new object that is not owned by any other object. The specified\n |data| will be copied.\n"]
6377 pub fn cef_binary_value_create(
6378 data: *const ::std::os::raw::c_void,
6379 data_size: usize,
6380 ) -> *mut cef_binary_value_t;
6381}
6382#[doc = "\n Structure representing a dictionary value. Can be used on any process and\n thread.\n"]
6383#[repr(C)]
6384#[derive(Debug, Copy, Clone)]
6385pub struct _cef_dictionary_value_t {
6386 #[doc = "\n Base structure.\n"]
6387 pub base: cef_base_ref_counted_t,
6388 #[doc = "\n Returns true (1) if this object is valid. This object may become invalid\n if the underlying data is owned by another object (e.g. list or\n dictionary) and that other object is then modified or destroyed. Do not\n call any other functions if this function returns false (0).\n"]
6389 pub is_valid: ::std::option::Option<
6390 unsafe extern "C" fn(self_: *mut _cef_dictionary_value_t) -> ::std::os::raw::c_int,
6391 >,
6392 #[doc = "\n Returns true (1) if this object is currently owned by another object.\n"]
6393 pub is_owned: ::std::option::Option<
6394 unsafe extern "C" fn(self_: *mut _cef_dictionary_value_t) -> ::std::os::raw::c_int,
6395 >,
6396 #[doc = "\n Returns true (1) if the values of this object are read-only. Some APIs may\n expose read-only objects.\n"]
6397 pub is_read_only: ::std::option::Option<
6398 unsafe extern "C" fn(self_: *mut _cef_dictionary_value_t) -> ::std::os::raw::c_int,
6399 >,
6400 #[doc = "\n Returns true (1) if this object and |that| object have the same underlying\n data. If true (1) modifications to this object will also affect |that|\n object and vice-versa.\n"]
6401 pub is_same: ::std::option::Option<
6402 unsafe extern "C" fn(
6403 self_: *mut _cef_dictionary_value_t,
6404 that: *mut _cef_dictionary_value_t,
6405 ) -> ::std::os::raw::c_int,
6406 >,
6407 #[doc = "\n Returns true (1) if this object and |that| object have an equivalent\n underlying value but are not necessarily the same object.\n"]
6408 pub is_equal: ::std::option::Option<
6409 unsafe extern "C" fn(
6410 self_: *mut _cef_dictionary_value_t,
6411 that: *mut _cef_dictionary_value_t,
6412 ) -> ::std::os::raw::c_int,
6413 >,
6414 #[doc = "\n Returns a writable copy of this object. If |exclude_NULL_children| is true\n (1) any NULL dictionaries or lists will be excluded from the copy.\n"]
6415 pub copy: ::std::option::Option<
6416 unsafe extern "C" fn(
6417 self_: *mut _cef_dictionary_value_t,
6418 exclude_empty_children: ::std::os::raw::c_int,
6419 ) -> *mut _cef_dictionary_value_t,
6420 >,
6421 #[doc = "\n Returns the number of values.\n"]
6422 pub get_size:
6423 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_dictionary_value_t) -> usize>,
6424 #[doc = "\n Removes all values. Returns true (1) on success.\n"]
6425 pub clear: ::std::option::Option<
6426 unsafe extern "C" fn(self_: *mut _cef_dictionary_value_t) -> ::std::os::raw::c_int,
6427 >,
6428 #[doc = "\n Returns true (1) if the current dictionary has a value for the given key.\n"]
6429 pub has_key: ::std::option::Option<
6430 unsafe extern "C" fn(
6431 self_: *mut _cef_dictionary_value_t,
6432 key: *const cef_string_t,
6433 ) -> ::std::os::raw::c_int,
6434 >,
6435 #[doc = "\n Reads all keys for this dictionary into the specified vector.\n"]
6436 pub get_keys: ::std::option::Option<
6437 unsafe extern "C" fn(
6438 self_: *mut _cef_dictionary_value_t,
6439 keys: cef_string_list_t,
6440 ) -> ::std::os::raw::c_int,
6441 >,
6442 #[doc = "\n Removes the value at the specified key. Returns true (1) is the value was\n removed successfully.\n"]
6443 pub remove: ::std::option::Option<
6444 unsafe extern "C" fn(
6445 self_: *mut _cef_dictionary_value_t,
6446 key: *const cef_string_t,
6447 ) -> ::std::os::raw::c_int,
6448 >,
6449 #[doc = "\n Returns the value type for the specified key.\n"]
6450 pub get_type: ::std::option::Option<
6451 unsafe extern "C" fn(
6452 self_: *mut _cef_dictionary_value_t,
6453 key: *const cef_string_t,
6454 ) -> cef_value_type_t,
6455 >,
6456 #[doc = "\n Returns the value at the specified key. For simple types the returned\n value will copy existing data and modifications to the value will not\n modify this object. For complex types (binary, dictionary and list) the\n returned value will reference existing data and modifications to the value\n will modify this object.\n"]
6457 pub get_value: ::std::option::Option<
6458 unsafe extern "C" fn(
6459 self_: *mut _cef_dictionary_value_t,
6460 key: *const cef_string_t,
6461 ) -> *mut _cef_value_t,
6462 >,
6463 #[doc = "\n Returns the value at the specified key as type bool.\n"]
6464 pub get_bool: ::std::option::Option<
6465 unsafe extern "C" fn(
6466 self_: *mut _cef_dictionary_value_t,
6467 key: *const cef_string_t,
6468 ) -> ::std::os::raw::c_int,
6469 >,
6470 #[doc = "\n Returns the value at the specified key as type int.\n"]
6471 pub get_int: ::std::option::Option<
6472 unsafe extern "C" fn(
6473 self_: *mut _cef_dictionary_value_t,
6474 key: *const cef_string_t,
6475 ) -> ::std::os::raw::c_int,
6476 >,
6477 #[doc = "\n Returns the value at the specified key as type double.\n"]
6478 pub get_double: ::std::option::Option<
6479 unsafe extern "C" fn(self_: *mut _cef_dictionary_value_t, key: *const cef_string_t) -> f64,
6480 >,
6481 #[doc = "\n Returns the value at the specified key as type string.\n"]
6482 pub get_string: ::std::option::Option<
6483 unsafe extern "C" fn(
6484 self_: *mut _cef_dictionary_value_t,
6485 key: *const cef_string_t,
6486 ) -> cef_string_userfree_t,
6487 >,
6488 #[doc = "\n Returns the value at the specified key as type binary. The returned value\n will reference existing data.\n"]
6489 pub get_binary: ::std::option::Option<
6490 unsafe extern "C" fn(
6491 self_: *mut _cef_dictionary_value_t,
6492 key: *const cef_string_t,
6493 ) -> *mut _cef_binary_value_t,
6494 >,
6495 #[doc = "\n Returns the value at the specified key as type dictionary. The returned\n value will reference existing data and modifications to the value will\n modify this object.\n"]
6496 pub get_dictionary: ::std::option::Option<
6497 unsafe extern "C" fn(
6498 self_: *mut _cef_dictionary_value_t,
6499 key: *const cef_string_t,
6500 ) -> *mut _cef_dictionary_value_t,
6501 >,
6502 #[doc = "\n Returns the value at the specified key as type list. The returned value\n will reference existing data and modifications to the value will modify\n this object.\n"]
6503 pub get_list: ::std::option::Option<
6504 unsafe extern "C" fn(
6505 self_: *mut _cef_dictionary_value_t,
6506 key: *const cef_string_t,
6507 ) -> *mut _cef_list_value_t,
6508 >,
6509 #[doc = "\n Sets the value at the specified key. Returns true (1) if the value was set\n successfully. If |value| represents simple data then the underlying data\n will be copied and modifications to |value| will not modify this object.\n If |value| represents complex data (binary, dictionary or list) then the\n underlying data will be referenced and modifications to |value| will\n modify this object.\n"]
6510 pub set_value: ::std::option::Option<
6511 unsafe extern "C" fn(
6512 self_: *mut _cef_dictionary_value_t,
6513 key: *const cef_string_t,
6514 value: *mut _cef_value_t,
6515 ) -> ::std::os::raw::c_int,
6516 >,
6517 #[doc = "\n Sets the value at the specified key as type null. Returns true (1) if the\n value was set successfully.\n"]
6518 pub set_null: ::std::option::Option<
6519 unsafe extern "C" fn(
6520 self_: *mut _cef_dictionary_value_t,
6521 key: *const cef_string_t,
6522 ) -> ::std::os::raw::c_int,
6523 >,
6524 #[doc = "\n Sets the value at the specified key as type bool. Returns true (1) if the\n value was set successfully.\n"]
6525 pub set_bool: ::std::option::Option<
6526 unsafe extern "C" fn(
6527 self_: *mut _cef_dictionary_value_t,
6528 key: *const cef_string_t,
6529 value: ::std::os::raw::c_int,
6530 ) -> ::std::os::raw::c_int,
6531 >,
6532 #[doc = "\n Sets the value at the specified key as type int. Returns true (1) if the\n value was set successfully.\n"]
6533 pub set_int: ::std::option::Option<
6534 unsafe extern "C" fn(
6535 self_: *mut _cef_dictionary_value_t,
6536 key: *const cef_string_t,
6537 value: ::std::os::raw::c_int,
6538 ) -> ::std::os::raw::c_int,
6539 >,
6540 #[doc = "\n Sets the value at the specified key as type double. Returns true (1) if\n the value was set successfully.\n"]
6541 pub set_double: ::std::option::Option<
6542 unsafe extern "C" fn(
6543 self_: *mut _cef_dictionary_value_t,
6544 key: *const cef_string_t,
6545 value: f64,
6546 ) -> ::std::os::raw::c_int,
6547 >,
6548 #[doc = "\n Sets the value at the specified key as type string. Returns true (1) if\n the value was set successfully.\n"]
6549 pub set_string: ::std::option::Option<
6550 unsafe extern "C" fn(
6551 self_: *mut _cef_dictionary_value_t,
6552 key: *const cef_string_t,
6553 value: *const cef_string_t,
6554 ) -> ::std::os::raw::c_int,
6555 >,
6556 #[doc = "\n Sets the value at the specified key as type binary. Returns true (1) if\n the value was set successfully. If |value| is currently owned by another\n object then the value will be copied and the |value| reference will not\n change. Otherwise, ownership will be transferred to this object and the\n |value| reference will be invalidated.\n"]
6557 pub set_binary: ::std::option::Option<
6558 unsafe extern "C" fn(
6559 self_: *mut _cef_dictionary_value_t,
6560 key: *const cef_string_t,
6561 value: *mut _cef_binary_value_t,
6562 ) -> ::std::os::raw::c_int,
6563 >,
6564 #[doc = "\n Sets the value at the specified key as type dict. Returns true (1) if the\n value was set successfully. If |value| is currently owned by another\n object then the value will be copied and the |value| reference will not\n change. Otherwise, ownership will be transferred to this object and the\n |value| reference will be invalidated.\n"]
6565 pub set_dictionary: ::std::option::Option<
6566 unsafe extern "C" fn(
6567 self_: *mut _cef_dictionary_value_t,
6568 key: *const cef_string_t,
6569 value: *mut _cef_dictionary_value_t,
6570 ) -> ::std::os::raw::c_int,
6571 >,
6572 #[doc = "\n Sets the value at the specified key as type list. Returns true (1) if the\n value was set successfully. If |value| is currently owned by another\n object then the value will be copied and the |value| reference will not\n change. Otherwise, ownership will be transferred to this object and the\n |value| reference will be invalidated.\n"]
6573 pub set_list: ::std::option::Option<
6574 unsafe extern "C" fn(
6575 self_: *mut _cef_dictionary_value_t,
6576 key: *const cef_string_t,
6577 value: *mut _cef_list_value_t,
6578 ) -> ::std::os::raw::c_int,
6579 >,
6580}
6581#[test]
6582fn bindgen_test_layout__cef_dictionary_value_t() {
6583 const UNINIT: ::std::mem::MaybeUninit<_cef_dictionary_value_t> =
6584 ::std::mem::MaybeUninit::uninit();
6585 let ptr = UNINIT.as_ptr();
6586 assert_eq!(
6587 ::std::mem::size_of::<_cef_dictionary_value_t>(),
6588 272usize,
6589 concat!("Size of: ", stringify!(_cef_dictionary_value_t))
6590 );
6591 assert_eq!(
6592 ::std::mem::align_of::<_cef_dictionary_value_t>(),
6593 8usize,
6594 concat!("Alignment of ", stringify!(_cef_dictionary_value_t))
6595 );
6596 assert_eq!(
6597 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
6598 0usize,
6599 concat!(
6600 "Offset of field: ",
6601 stringify!(_cef_dictionary_value_t),
6602 "::",
6603 stringify!(base)
6604 )
6605 );
6606 assert_eq!(
6607 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
6608 40usize,
6609 concat!(
6610 "Offset of field: ",
6611 stringify!(_cef_dictionary_value_t),
6612 "::",
6613 stringify!(is_valid)
6614 )
6615 );
6616 assert_eq!(
6617 unsafe { ::std::ptr::addr_of!((*ptr).is_owned) as usize - ptr as usize },
6618 48usize,
6619 concat!(
6620 "Offset of field: ",
6621 stringify!(_cef_dictionary_value_t),
6622 "::",
6623 stringify!(is_owned)
6624 )
6625 );
6626 assert_eq!(
6627 unsafe { ::std::ptr::addr_of!((*ptr).is_read_only) as usize - ptr as usize },
6628 56usize,
6629 concat!(
6630 "Offset of field: ",
6631 stringify!(_cef_dictionary_value_t),
6632 "::",
6633 stringify!(is_read_only)
6634 )
6635 );
6636 assert_eq!(
6637 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
6638 64usize,
6639 concat!(
6640 "Offset of field: ",
6641 stringify!(_cef_dictionary_value_t),
6642 "::",
6643 stringify!(is_same)
6644 )
6645 );
6646 assert_eq!(
6647 unsafe { ::std::ptr::addr_of!((*ptr).is_equal) as usize - ptr as usize },
6648 72usize,
6649 concat!(
6650 "Offset of field: ",
6651 stringify!(_cef_dictionary_value_t),
6652 "::",
6653 stringify!(is_equal)
6654 )
6655 );
6656 assert_eq!(
6657 unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize },
6658 80usize,
6659 concat!(
6660 "Offset of field: ",
6661 stringify!(_cef_dictionary_value_t),
6662 "::",
6663 stringify!(copy)
6664 )
6665 );
6666 assert_eq!(
6667 unsafe { ::std::ptr::addr_of!((*ptr).get_size) as usize - ptr as usize },
6668 88usize,
6669 concat!(
6670 "Offset of field: ",
6671 stringify!(_cef_dictionary_value_t),
6672 "::",
6673 stringify!(get_size)
6674 )
6675 );
6676 assert_eq!(
6677 unsafe { ::std::ptr::addr_of!((*ptr).clear) as usize - ptr as usize },
6678 96usize,
6679 concat!(
6680 "Offset of field: ",
6681 stringify!(_cef_dictionary_value_t),
6682 "::",
6683 stringify!(clear)
6684 )
6685 );
6686 assert_eq!(
6687 unsafe { ::std::ptr::addr_of!((*ptr).has_key) as usize - ptr as usize },
6688 104usize,
6689 concat!(
6690 "Offset of field: ",
6691 stringify!(_cef_dictionary_value_t),
6692 "::",
6693 stringify!(has_key)
6694 )
6695 );
6696 assert_eq!(
6697 unsafe { ::std::ptr::addr_of!((*ptr).get_keys) as usize - ptr as usize },
6698 112usize,
6699 concat!(
6700 "Offset of field: ",
6701 stringify!(_cef_dictionary_value_t),
6702 "::",
6703 stringify!(get_keys)
6704 )
6705 );
6706 assert_eq!(
6707 unsafe { ::std::ptr::addr_of!((*ptr).remove) as usize - ptr as usize },
6708 120usize,
6709 concat!(
6710 "Offset of field: ",
6711 stringify!(_cef_dictionary_value_t),
6712 "::",
6713 stringify!(remove)
6714 )
6715 );
6716 assert_eq!(
6717 unsafe { ::std::ptr::addr_of!((*ptr).get_type) as usize - ptr as usize },
6718 128usize,
6719 concat!(
6720 "Offset of field: ",
6721 stringify!(_cef_dictionary_value_t),
6722 "::",
6723 stringify!(get_type)
6724 )
6725 );
6726 assert_eq!(
6727 unsafe { ::std::ptr::addr_of!((*ptr).get_value) as usize - ptr as usize },
6728 136usize,
6729 concat!(
6730 "Offset of field: ",
6731 stringify!(_cef_dictionary_value_t),
6732 "::",
6733 stringify!(get_value)
6734 )
6735 );
6736 assert_eq!(
6737 unsafe { ::std::ptr::addr_of!((*ptr).get_bool) as usize - ptr as usize },
6738 144usize,
6739 concat!(
6740 "Offset of field: ",
6741 stringify!(_cef_dictionary_value_t),
6742 "::",
6743 stringify!(get_bool)
6744 )
6745 );
6746 assert_eq!(
6747 unsafe { ::std::ptr::addr_of!((*ptr).get_int) as usize - ptr as usize },
6748 152usize,
6749 concat!(
6750 "Offset of field: ",
6751 stringify!(_cef_dictionary_value_t),
6752 "::",
6753 stringify!(get_int)
6754 )
6755 );
6756 assert_eq!(
6757 unsafe { ::std::ptr::addr_of!((*ptr).get_double) as usize - ptr as usize },
6758 160usize,
6759 concat!(
6760 "Offset of field: ",
6761 stringify!(_cef_dictionary_value_t),
6762 "::",
6763 stringify!(get_double)
6764 )
6765 );
6766 assert_eq!(
6767 unsafe { ::std::ptr::addr_of!((*ptr).get_string) as usize - ptr as usize },
6768 168usize,
6769 concat!(
6770 "Offset of field: ",
6771 stringify!(_cef_dictionary_value_t),
6772 "::",
6773 stringify!(get_string)
6774 )
6775 );
6776 assert_eq!(
6777 unsafe { ::std::ptr::addr_of!((*ptr).get_binary) as usize - ptr as usize },
6778 176usize,
6779 concat!(
6780 "Offset of field: ",
6781 stringify!(_cef_dictionary_value_t),
6782 "::",
6783 stringify!(get_binary)
6784 )
6785 );
6786 assert_eq!(
6787 unsafe { ::std::ptr::addr_of!((*ptr).get_dictionary) as usize - ptr as usize },
6788 184usize,
6789 concat!(
6790 "Offset of field: ",
6791 stringify!(_cef_dictionary_value_t),
6792 "::",
6793 stringify!(get_dictionary)
6794 )
6795 );
6796 assert_eq!(
6797 unsafe { ::std::ptr::addr_of!((*ptr).get_list) as usize - ptr as usize },
6798 192usize,
6799 concat!(
6800 "Offset of field: ",
6801 stringify!(_cef_dictionary_value_t),
6802 "::",
6803 stringify!(get_list)
6804 )
6805 );
6806 assert_eq!(
6807 unsafe { ::std::ptr::addr_of!((*ptr).set_value) as usize - ptr as usize },
6808 200usize,
6809 concat!(
6810 "Offset of field: ",
6811 stringify!(_cef_dictionary_value_t),
6812 "::",
6813 stringify!(set_value)
6814 )
6815 );
6816 assert_eq!(
6817 unsafe { ::std::ptr::addr_of!((*ptr).set_null) as usize - ptr as usize },
6818 208usize,
6819 concat!(
6820 "Offset of field: ",
6821 stringify!(_cef_dictionary_value_t),
6822 "::",
6823 stringify!(set_null)
6824 )
6825 );
6826 assert_eq!(
6827 unsafe { ::std::ptr::addr_of!((*ptr).set_bool) as usize - ptr as usize },
6828 216usize,
6829 concat!(
6830 "Offset of field: ",
6831 stringify!(_cef_dictionary_value_t),
6832 "::",
6833 stringify!(set_bool)
6834 )
6835 );
6836 assert_eq!(
6837 unsafe { ::std::ptr::addr_of!((*ptr).set_int) as usize - ptr as usize },
6838 224usize,
6839 concat!(
6840 "Offset of field: ",
6841 stringify!(_cef_dictionary_value_t),
6842 "::",
6843 stringify!(set_int)
6844 )
6845 );
6846 assert_eq!(
6847 unsafe { ::std::ptr::addr_of!((*ptr).set_double) as usize - ptr as usize },
6848 232usize,
6849 concat!(
6850 "Offset of field: ",
6851 stringify!(_cef_dictionary_value_t),
6852 "::",
6853 stringify!(set_double)
6854 )
6855 );
6856 assert_eq!(
6857 unsafe { ::std::ptr::addr_of!((*ptr).set_string) as usize - ptr as usize },
6858 240usize,
6859 concat!(
6860 "Offset of field: ",
6861 stringify!(_cef_dictionary_value_t),
6862 "::",
6863 stringify!(set_string)
6864 )
6865 );
6866 assert_eq!(
6867 unsafe { ::std::ptr::addr_of!((*ptr).set_binary) as usize - ptr as usize },
6868 248usize,
6869 concat!(
6870 "Offset of field: ",
6871 stringify!(_cef_dictionary_value_t),
6872 "::",
6873 stringify!(set_binary)
6874 )
6875 );
6876 assert_eq!(
6877 unsafe { ::std::ptr::addr_of!((*ptr).set_dictionary) as usize - ptr as usize },
6878 256usize,
6879 concat!(
6880 "Offset of field: ",
6881 stringify!(_cef_dictionary_value_t),
6882 "::",
6883 stringify!(set_dictionary)
6884 )
6885 );
6886 assert_eq!(
6887 unsafe { ::std::ptr::addr_of!((*ptr).set_list) as usize - ptr as usize },
6888 264usize,
6889 concat!(
6890 "Offset of field: ",
6891 stringify!(_cef_dictionary_value_t),
6892 "::",
6893 stringify!(set_list)
6894 )
6895 );
6896}
6897#[doc = "\n Structure representing a dictionary value. Can be used on any process and\n thread.\n"]
6898pub type cef_dictionary_value_t = _cef_dictionary_value_t;
6899extern "C" {
6900 #[doc = "\n Creates a new object that is not owned by any other object.\n"]
6901 pub fn cef_dictionary_value_create() -> *mut cef_dictionary_value_t;
6902}
6903#[doc = "\n Structure representing a list value. Can be used on any process and thread.\n"]
6904#[repr(C)]
6905#[derive(Debug, Copy, Clone)]
6906pub struct _cef_list_value_t {
6907 #[doc = "\n Base structure.\n"]
6908 pub base: cef_base_ref_counted_t,
6909 #[doc = "\n Returns true (1) if this object is valid. This object may become invalid\n if the underlying data is owned by another object (e.g. list or\n dictionary) and that other object is then modified or destroyed. Do not\n call any other functions if this function returns false (0).\n"]
6910 pub is_valid: ::std::option::Option<
6911 unsafe extern "C" fn(self_: *mut _cef_list_value_t) -> ::std::os::raw::c_int,
6912 >,
6913 #[doc = "\n Returns true (1) if this object is currently owned by another object.\n"]
6914 pub is_owned: ::std::option::Option<
6915 unsafe extern "C" fn(self_: *mut _cef_list_value_t) -> ::std::os::raw::c_int,
6916 >,
6917 #[doc = "\n Returns true (1) if the values of this object are read-only. Some APIs may\n expose read-only objects.\n"]
6918 pub is_read_only: ::std::option::Option<
6919 unsafe extern "C" fn(self_: *mut _cef_list_value_t) -> ::std::os::raw::c_int,
6920 >,
6921 #[doc = "\n Returns true (1) if this object and |that| object have the same underlying\n data. If true (1) modifications to this object will also affect |that|\n object and vice-versa.\n"]
6922 pub is_same: ::std::option::Option<
6923 unsafe extern "C" fn(
6924 self_: *mut _cef_list_value_t,
6925 that: *mut _cef_list_value_t,
6926 ) -> ::std::os::raw::c_int,
6927 >,
6928 #[doc = "\n Returns true (1) if this object and |that| object have an equivalent\n underlying value but are not necessarily the same object.\n"]
6929 pub is_equal: ::std::option::Option<
6930 unsafe extern "C" fn(
6931 self_: *mut _cef_list_value_t,
6932 that: *mut _cef_list_value_t,
6933 ) -> ::std::os::raw::c_int,
6934 >,
6935 #[doc = "\n Returns a writable copy of this object.\n"]
6936 pub copy: ::std::option::Option<
6937 unsafe extern "C" fn(self_: *mut _cef_list_value_t) -> *mut _cef_list_value_t,
6938 >,
6939 #[doc = "\n Sets the number of values. If the number of values is expanded all new\n value slots will default to type null. Returns true (1) on success.\n"]
6940 pub set_size: ::std::option::Option<
6941 unsafe extern "C" fn(self_: *mut _cef_list_value_t, size: usize) -> ::std::os::raw::c_int,
6942 >,
6943 #[doc = "\n Returns the number of values.\n"]
6944 pub get_size:
6945 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_list_value_t) -> usize>,
6946 #[doc = "\n Removes all values. Returns true (1) on success.\n"]
6947 pub clear: ::std::option::Option<
6948 unsafe extern "C" fn(self_: *mut _cef_list_value_t) -> ::std::os::raw::c_int,
6949 >,
6950 #[doc = "\n Removes the value at the specified index.\n"]
6951 pub remove: ::std::option::Option<
6952 unsafe extern "C" fn(self_: *mut _cef_list_value_t, index: usize) -> ::std::os::raw::c_int,
6953 >,
6954 #[doc = "\n Returns the value type at the specified index.\n"]
6955 pub get_type: ::std::option::Option<
6956 unsafe extern "C" fn(self_: *mut _cef_list_value_t, index: usize) -> cef_value_type_t,
6957 >,
6958 #[doc = "\n Returns the value at the specified index. For simple types the returned\n value will copy existing data and modifications to the value will not\n modify this object. For complex types (binary, dictionary and list) the\n returned value will reference existing data and modifications to the value\n will modify this object.\n"]
6959 pub get_value: ::std::option::Option<
6960 unsafe extern "C" fn(self_: *mut _cef_list_value_t, index: usize) -> *mut _cef_value_t,
6961 >,
6962 #[doc = "\n Returns the value at the specified index as type bool.\n"]
6963 pub get_bool: ::std::option::Option<
6964 unsafe extern "C" fn(self_: *mut _cef_list_value_t, index: usize) -> ::std::os::raw::c_int,
6965 >,
6966 #[doc = "\n Returns the value at the specified index as type int.\n"]
6967 pub get_int: ::std::option::Option<
6968 unsafe extern "C" fn(self_: *mut _cef_list_value_t, index: usize) -> ::std::os::raw::c_int,
6969 >,
6970 #[doc = "\n Returns the value at the specified index as type double.\n"]
6971 pub get_double: ::std::option::Option<
6972 unsafe extern "C" fn(self_: *mut _cef_list_value_t, index: usize) -> f64,
6973 >,
6974 #[doc = "\n Returns the value at the specified index as type string.\n"]
6975 pub get_string: ::std::option::Option<
6976 unsafe extern "C" fn(self_: *mut _cef_list_value_t, index: usize) -> cef_string_userfree_t,
6977 >,
6978 #[doc = "\n Returns the value at the specified index as type binary. The returned\n value will reference existing data.\n"]
6979 pub get_binary: ::std::option::Option<
6980 unsafe extern "C" fn(
6981 self_: *mut _cef_list_value_t,
6982 index: usize,
6983 ) -> *mut _cef_binary_value_t,
6984 >,
6985 #[doc = "\n Returns the value at the specified index as type dictionary. The returned\n value will reference existing data and modifications to the value will\n modify this object.\n"]
6986 pub get_dictionary: ::std::option::Option<
6987 unsafe extern "C" fn(
6988 self_: *mut _cef_list_value_t,
6989 index: usize,
6990 ) -> *mut _cef_dictionary_value_t,
6991 >,
6992 #[doc = "\n Returns the value at the specified index as type list. The returned value\n will reference existing data and modifications to the value will modify\n this object.\n"]
6993 pub get_list: ::std::option::Option<
6994 unsafe extern "C" fn(self_: *mut _cef_list_value_t, index: usize) -> *mut _cef_list_value_t,
6995 >,
6996 #[doc = "\n Sets the value at the specified index. Returns true (1) if the value was\n set successfully. If |value| represents simple data then the underlying\n data will be copied and modifications to |value| will not modify this\n object. If |value| represents complex data (binary, dictionary or list)\n then the underlying data will be referenced and modifications to |value|\n will modify this object.\n"]
6997 pub set_value: ::std::option::Option<
6998 unsafe extern "C" fn(
6999 self_: *mut _cef_list_value_t,
7000 index: usize,
7001 value: *mut _cef_value_t,
7002 ) -> ::std::os::raw::c_int,
7003 >,
7004 #[doc = "\n Sets the value at the specified index as type null. Returns true (1) if\n the value was set successfully.\n"]
7005 pub set_null: ::std::option::Option<
7006 unsafe extern "C" fn(self_: *mut _cef_list_value_t, index: usize) -> ::std::os::raw::c_int,
7007 >,
7008 #[doc = "\n Sets the value at the specified index as type bool. Returns true (1) if\n the value was set successfully.\n"]
7009 pub set_bool: ::std::option::Option<
7010 unsafe extern "C" fn(
7011 self_: *mut _cef_list_value_t,
7012 index: usize,
7013 value: ::std::os::raw::c_int,
7014 ) -> ::std::os::raw::c_int,
7015 >,
7016 #[doc = "\n Sets the value at the specified index as type int. Returns true (1) if the\n value was set successfully.\n"]
7017 pub set_int: ::std::option::Option<
7018 unsafe extern "C" fn(
7019 self_: *mut _cef_list_value_t,
7020 index: usize,
7021 value: ::std::os::raw::c_int,
7022 ) -> ::std::os::raw::c_int,
7023 >,
7024 #[doc = "\n Sets the value at the specified index as type double. Returns true (1) if\n the value was set successfully.\n"]
7025 pub set_double: ::std::option::Option<
7026 unsafe extern "C" fn(
7027 self_: *mut _cef_list_value_t,
7028 index: usize,
7029 value: f64,
7030 ) -> ::std::os::raw::c_int,
7031 >,
7032 #[doc = "\n Sets the value at the specified index as type string. Returns true (1) if\n the value was set successfully.\n"]
7033 pub set_string: ::std::option::Option<
7034 unsafe extern "C" fn(
7035 self_: *mut _cef_list_value_t,
7036 index: usize,
7037 value: *const cef_string_t,
7038 ) -> ::std::os::raw::c_int,
7039 >,
7040 #[doc = "\n Sets the value at the specified index as type binary. Returns true (1) if\n the value was set successfully. If |value| is currently owned by another\n object then the value will be copied and the |value| reference will not\n change. Otherwise, ownership will be transferred to this object and the\n |value| reference will be invalidated.\n"]
7041 pub set_binary: ::std::option::Option<
7042 unsafe extern "C" fn(
7043 self_: *mut _cef_list_value_t,
7044 index: usize,
7045 value: *mut _cef_binary_value_t,
7046 ) -> ::std::os::raw::c_int,
7047 >,
7048 #[doc = "\n Sets the value at the specified index as type dict. Returns true (1) if\n the value was set successfully. If |value| is currently owned by another\n object then the value will be copied and the |value| reference will not\n change. Otherwise, ownership will be transferred to this object and the\n |value| reference will be invalidated.\n"]
7049 pub set_dictionary: ::std::option::Option<
7050 unsafe extern "C" fn(
7051 self_: *mut _cef_list_value_t,
7052 index: usize,
7053 value: *mut _cef_dictionary_value_t,
7054 ) -> ::std::os::raw::c_int,
7055 >,
7056 #[doc = "\n Sets the value at the specified index as type list. Returns true (1) if\n the value was set successfully. If |value| is currently owned by another\n object then the value will be copied and the |value| reference will not\n change. Otherwise, ownership will be transferred to this object and the\n |value| reference will be invalidated.\n"]
7057 pub set_list: ::std::option::Option<
7058 unsafe extern "C" fn(
7059 self_: *mut _cef_list_value_t,
7060 index: usize,
7061 value: *mut _cef_list_value_t,
7062 ) -> ::std::os::raw::c_int,
7063 >,
7064}
7065#[test]
7066fn bindgen_test_layout__cef_list_value_t() {
7067 const UNINIT: ::std::mem::MaybeUninit<_cef_list_value_t> = ::std::mem::MaybeUninit::uninit();
7068 let ptr = UNINIT.as_ptr();
7069 assert_eq!(
7070 ::std::mem::size_of::<_cef_list_value_t>(),
7071 264usize,
7072 concat!("Size of: ", stringify!(_cef_list_value_t))
7073 );
7074 assert_eq!(
7075 ::std::mem::align_of::<_cef_list_value_t>(),
7076 8usize,
7077 concat!("Alignment of ", stringify!(_cef_list_value_t))
7078 );
7079 assert_eq!(
7080 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
7081 0usize,
7082 concat!(
7083 "Offset of field: ",
7084 stringify!(_cef_list_value_t),
7085 "::",
7086 stringify!(base)
7087 )
7088 );
7089 assert_eq!(
7090 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
7091 40usize,
7092 concat!(
7093 "Offset of field: ",
7094 stringify!(_cef_list_value_t),
7095 "::",
7096 stringify!(is_valid)
7097 )
7098 );
7099 assert_eq!(
7100 unsafe { ::std::ptr::addr_of!((*ptr).is_owned) as usize - ptr as usize },
7101 48usize,
7102 concat!(
7103 "Offset of field: ",
7104 stringify!(_cef_list_value_t),
7105 "::",
7106 stringify!(is_owned)
7107 )
7108 );
7109 assert_eq!(
7110 unsafe { ::std::ptr::addr_of!((*ptr).is_read_only) as usize - ptr as usize },
7111 56usize,
7112 concat!(
7113 "Offset of field: ",
7114 stringify!(_cef_list_value_t),
7115 "::",
7116 stringify!(is_read_only)
7117 )
7118 );
7119 assert_eq!(
7120 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
7121 64usize,
7122 concat!(
7123 "Offset of field: ",
7124 stringify!(_cef_list_value_t),
7125 "::",
7126 stringify!(is_same)
7127 )
7128 );
7129 assert_eq!(
7130 unsafe { ::std::ptr::addr_of!((*ptr).is_equal) as usize - ptr as usize },
7131 72usize,
7132 concat!(
7133 "Offset of field: ",
7134 stringify!(_cef_list_value_t),
7135 "::",
7136 stringify!(is_equal)
7137 )
7138 );
7139 assert_eq!(
7140 unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize },
7141 80usize,
7142 concat!(
7143 "Offset of field: ",
7144 stringify!(_cef_list_value_t),
7145 "::",
7146 stringify!(copy)
7147 )
7148 );
7149 assert_eq!(
7150 unsafe { ::std::ptr::addr_of!((*ptr).set_size) as usize - ptr as usize },
7151 88usize,
7152 concat!(
7153 "Offset of field: ",
7154 stringify!(_cef_list_value_t),
7155 "::",
7156 stringify!(set_size)
7157 )
7158 );
7159 assert_eq!(
7160 unsafe { ::std::ptr::addr_of!((*ptr).get_size) as usize - ptr as usize },
7161 96usize,
7162 concat!(
7163 "Offset of field: ",
7164 stringify!(_cef_list_value_t),
7165 "::",
7166 stringify!(get_size)
7167 )
7168 );
7169 assert_eq!(
7170 unsafe { ::std::ptr::addr_of!((*ptr).clear) as usize - ptr as usize },
7171 104usize,
7172 concat!(
7173 "Offset of field: ",
7174 stringify!(_cef_list_value_t),
7175 "::",
7176 stringify!(clear)
7177 )
7178 );
7179 assert_eq!(
7180 unsafe { ::std::ptr::addr_of!((*ptr).remove) as usize - ptr as usize },
7181 112usize,
7182 concat!(
7183 "Offset of field: ",
7184 stringify!(_cef_list_value_t),
7185 "::",
7186 stringify!(remove)
7187 )
7188 );
7189 assert_eq!(
7190 unsafe { ::std::ptr::addr_of!((*ptr).get_type) as usize - ptr as usize },
7191 120usize,
7192 concat!(
7193 "Offset of field: ",
7194 stringify!(_cef_list_value_t),
7195 "::",
7196 stringify!(get_type)
7197 )
7198 );
7199 assert_eq!(
7200 unsafe { ::std::ptr::addr_of!((*ptr).get_value) as usize - ptr as usize },
7201 128usize,
7202 concat!(
7203 "Offset of field: ",
7204 stringify!(_cef_list_value_t),
7205 "::",
7206 stringify!(get_value)
7207 )
7208 );
7209 assert_eq!(
7210 unsafe { ::std::ptr::addr_of!((*ptr).get_bool) as usize - ptr as usize },
7211 136usize,
7212 concat!(
7213 "Offset of field: ",
7214 stringify!(_cef_list_value_t),
7215 "::",
7216 stringify!(get_bool)
7217 )
7218 );
7219 assert_eq!(
7220 unsafe { ::std::ptr::addr_of!((*ptr).get_int) as usize - ptr as usize },
7221 144usize,
7222 concat!(
7223 "Offset of field: ",
7224 stringify!(_cef_list_value_t),
7225 "::",
7226 stringify!(get_int)
7227 )
7228 );
7229 assert_eq!(
7230 unsafe { ::std::ptr::addr_of!((*ptr).get_double) as usize - ptr as usize },
7231 152usize,
7232 concat!(
7233 "Offset of field: ",
7234 stringify!(_cef_list_value_t),
7235 "::",
7236 stringify!(get_double)
7237 )
7238 );
7239 assert_eq!(
7240 unsafe { ::std::ptr::addr_of!((*ptr).get_string) as usize - ptr as usize },
7241 160usize,
7242 concat!(
7243 "Offset of field: ",
7244 stringify!(_cef_list_value_t),
7245 "::",
7246 stringify!(get_string)
7247 )
7248 );
7249 assert_eq!(
7250 unsafe { ::std::ptr::addr_of!((*ptr).get_binary) as usize - ptr as usize },
7251 168usize,
7252 concat!(
7253 "Offset of field: ",
7254 stringify!(_cef_list_value_t),
7255 "::",
7256 stringify!(get_binary)
7257 )
7258 );
7259 assert_eq!(
7260 unsafe { ::std::ptr::addr_of!((*ptr).get_dictionary) as usize - ptr as usize },
7261 176usize,
7262 concat!(
7263 "Offset of field: ",
7264 stringify!(_cef_list_value_t),
7265 "::",
7266 stringify!(get_dictionary)
7267 )
7268 );
7269 assert_eq!(
7270 unsafe { ::std::ptr::addr_of!((*ptr).get_list) as usize - ptr as usize },
7271 184usize,
7272 concat!(
7273 "Offset of field: ",
7274 stringify!(_cef_list_value_t),
7275 "::",
7276 stringify!(get_list)
7277 )
7278 );
7279 assert_eq!(
7280 unsafe { ::std::ptr::addr_of!((*ptr).set_value) as usize - ptr as usize },
7281 192usize,
7282 concat!(
7283 "Offset of field: ",
7284 stringify!(_cef_list_value_t),
7285 "::",
7286 stringify!(set_value)
7287 )
7288 );
7289 assert_eq!(
7290 unsafe { ::std::ptr::addr_of!((*ptr).set_null) as usize - ptr as usize },
7291 200usize,
7292 concat!(
7293 "Offset of field: ",
7294 stringify!(_cef_list_value_t),
7295 "::",
7296 stringify!(set_null)
7297 )
7298 );
7299 assert_eq!(
7300 unsafe { ::std::ptr::addr_of!((*ptr).set_bool) as usize - ptr as usize },
7301 208usize,
7302 concat!(
7303 "Offset of field: ",
7304 stringify!(_cef_list_value_t),
7305 "::",
7306 stringify!(set_bool)
7307 )
7308 );
7309 assert_eq!(
7310 unsafe { ::std::ptr::addr_of!((*ptr).set_int) as usize - ptr as usize },
7311 216usize,
7312 concat!(
7313 "Offset of field: ",
7314 stringify!(_cef_list_value_t),
7315 "::",
7316 stringify!(set_int)
7317 )
7318 );
7319 assert_eq!(
7320 unsafe { ::std::ptr::addr_of!((*ptr).set_double) as usize - ptr as usize },
7321 224usize,
7322 concat!(
7323 "Offset of field: ",
7324 stringify!(_cef_list_value_t),
7325 "::",
7326 stringify!(set_double)
7327 )
7328 );
7329 assert_eq!(
7330 unsafe { ::std::ptr::addr_of!((*ptr).set_string) as usize - ptr as usize },
7331 232usize,
7332 concat!(
7333 "Offset of field: ",
7334 stringify!(_cef_list_value_t),
7335 "::",
7336 stringify!(set_string)
7337 )
7338 );
7339 assert_eq!(
7340 unsafe { ::std::ptr::addr_of!((*ptr).set_binary) as usize - ptr as usize },
7341 240usize,
7342 concat!(
7343 "Offset of field: ",
7344 stringify!(_cef_list_value_t),
7345 "::",
7346 stringify!(set_binary)
7347 )
7348 );
7349 assert_eq!(
7350 unsafe { ::std::ptr::addr_of!((*ptr).set_dictionary) as usize - ptr as usize },
7351 248usize,
7352 concat!(
7353 "Offset of field: ",
7354 stringify!(_cef_list_value_t),
7355 "::",
7356 stringify!(set_dictionary)
7357 )
7358 );
7359 assert_eq!(
7360 unsafe { ::std::ptr::addr_of!((*ptr).set_list) as usize - ptr as usize },
7361 256usize,
7362 concat!(
7363 "Offset of field: ",
7364 stringify!(_cef_list_value_t),
7365 "::",
7366 stringify!(set_list)
7367 )
7368 );
7369}
7370#[doc = "\n Structure representing a list value. Can be used on any process and thread.\n"]
7371pub type cef_list_value_t = _cef_list_value_t;
7372extern "C" {
7373 #[doc = "\n Creates a new object that is not owned by any other object.\n"]
7374 pub fn cef_list_value_create() -> *mut cef_list_value_t;
7375}
7376#[doc = "\n Container for a single image represented at different scale factors. All\n image representations should be the same size in density independent pixel\n (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels\n then the image at scale factor 2.0 should be 200x200 pixels -- both images\n will display with a DIP size of 100x100 units. The functions of this\n structure can be called on any browser process thread.\n"]
7377#[repr(C)]
7378#[derive(Debug, Copy, Clone)]
7379pub struct _cef_image_t {
7380 #[doc = "\n Base structure.\n"]
7381 pub base: cef_base_ref_counted_t,
7382 #[doc = "\n Returns true (1) if this Image is NULL.\n"]
7383 pub is_empty: ::std::option::Option<
7384 unsafe extern "C" fn(self_: *mut _cef_image_t) -> ::std::os::raw::c_int,
7385 >,
7386 #[doc = "\n Returns true (1) if this Image and |that| Image share the same underlying\n storage. Will also return true (1) if both images are NULL.\n"]
7387 pub is_same: ::std::option::Option<
7388 unsafe extern "C" fn(
7389 self_: *mut _cef_image_t,
7390 that: *mut _cef_image_t,
7391 ) -> ::std::os::raw::c_int,
7392 >,
7393 #[doc = "\n Add a bitmap image representation for |scale_factor|. Only 32-bit\n RGBA/BGRA formats are supported. |pixel_width| and |pixel_height| are the\n bitmap representation size in pixel coordinates. |pixel_data| is the array\n of pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in\n size. |color_type| and |alpha_type| values specify the pixel format.\n"]
7394 pub add_bitmap: ::std::option::Option<
7395 unsafe extern "C" fn(
7396 self_: *mut _cef_image_t,
7397 scale_factor: f32,
7398 pixel_width: ::std::os::raw::c_int,
7399 pixel_height: ::std::os::raw::c_int,
7400 color_type: cef_color_type_t,
7401 alpha_type: cef_alpha_type_t,
7402 pixel_data: *const ::std::os::raw::c_void,
7403 pixel_data_size: usize,
7404 ) -> ::std::os::raw::c_int,
7405 >,
7406 #[doc = "\n Add a PNG image representation for |scale_factor|. |png_data| is the image\n data of size |png_data_size|. Any alpha transparency in the PNG data will\n be maintained.\n"]
7407 pub add_png: ::std::option::Option<
7408 unsafe extern "C" fn(
7409 self_: *mut _cef_image_t,
7410 scale_factor: f32,
7411 png_data: *const ::std::os::raw::c_void,
7412 png_data_size: usize,
7413 ) -> ::std::os::raw::c_int,
7414 >,
7415 #[doc = "\n Create a JPEG image representation for |scale_factor|. |jpeg_data| is the\n image data of size |jpeg_data_size|. The JPEG format does not support\n transparency so the alpha byte will be set to 0xFF for all pixels.\n"]
7416 pub add_jpeg: ::std::option::Option<
7417 unsafe extern "C" fn(
7418 self_: *mut _cef_image_t,
7419 scale_factor: f32,
7420 jpeg_data: *const ::std::os::raw::c_void,
7421 jpeg_data_size: usize,
7422 ) -> ::std::os::raw::c_int,
7423 >,
7424 #[doc = "\n Returns the image width in density independent pixel (DIP) units.\n"]
7425 pub get_width: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_image_t) -> usize>,
7426 #[doc = "\n Returns the image height in density independent pixel (DIP) units.\n"]
7427 pub get_height: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_image_t) -> usize>,
7428 #[doc = "\n Returns true (1) if this image contains a representation for\n |scale_factor|.\n"]
7429 pub has_representation: ::std::option::Option<
7430 unsafe extern "C" fn(self_: *mut _cef_image_t, scale_factor: f32) -> ::std::os::raw::c_int,
7431 >,
7432 #[doc = "\n Removes the representation for |scale_factor|. Returns true (1) on\n success.\n"]
7433 pub remove_representation: ::std::option::Option<
7434 unsafe extern "C" fn(self_: *mut _cef_image_t, scale_factor: f32) -> ::std::os::raw::c_int,
7435 >,
7436 #[doc = "\n Returns information for the representation that most closely matches\n |scale_factor|. |actual_scale_factor| is the actual scale factor for the\n representation. |pixel_width| and |pixel_height| are the representation\n size in pixel coordinates. Returns true (1) on success.\n"]
7437 pub get_representation_info: ::std::option::Option<
7438 unsafe extern "C" fn(
7439 self_: *mut _cef_image_t,
7440 scale_factor: f32,
7441 actual_scale_factor: *mut f32,
7442 pixel_width: *mut ::std::os::raw::c_int,
7443 pixel_height: *mut ::std::os::raw::c_int,
7444 ) -> ::std::os::raw::c_int,
7445 >,
7446 #[doc = "\n Returns the bitmap representation that most closely matches\n |scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |color_type|\n and |alpha_type| values specify the desired output pixel format.\n |pixel_width| and |pixel_height| are the output representation size in\n pixel coordinates. Returns a cef_binary_value_t containing the pixel data\n on success or NULL on failure.\n"]
7447 pub get_as_bitmap: ::std::option::Option<
7448 unsafe extern "C" fn(
7449 self_: *mut _cef_image_t,
7450 scale_factor: f32,
7451 color_type: cef_color_type_t,
7452 alpha_type: cef_alpha_type_t,
7453 pixel_width: *mut ::std::os::raw::c_int,
7454 pixel_height: *mut ::std::os::raw::c_int,
7455 ) -> *mut _cef_binary_value_t,
7456 >,
7457 #[doc = "\n Returns the PNG representation that most closely matches |scale_factor|.\n If |with_transparency| is true (1) any alpha transparency in the image\n will be represented in the resulting PNG data. |pixel_width| and\n |pixel_height| are the output representation size in pixel coordinates.\n Returns a cef_binary_value_t containing the PNG image data on success or\n NULL on failure.\n"]
7458 pub get_as_png: ::std::option::Option<
7459 unsafe extern "C" fn(
7460 self_: *mut _cef_image_t,
7461 scale_factor: f32,
7462 with_transparency: ::std::os::raw::c_int,
7463 pixel_width: *mut ::std::os::raw::c_int,
7464 pixel_height: *mut ::std::os::raw::c_int,
7465 ) -> *mut _cef_binary_value_t,
7466 >,
7467 #[doc = "\n Returns the JPEG representation that most closely matches |scale_factor|.\n |quality| determines the compression level with 0 == lowest and 100 ==\n highest. The JPEG format does not support alpha transparency and the alpha\n channel, if any, will be discarded. |pixel_width| and |pixel_height| are\n the output representation size in pixel coordinates. Returns a\n cef_binary_value_t containing the JPEG image data on success or NULL on\n failure.\n"]
7468 pub get_as_jpeg: ::std::option::Option<
7469 unsafe extern "C" fn(
7470 self_: *mut _cef_image_t,
7471 scale_factor: f32,
7472 quality: ::std::os::raw::c_int,
7473 pixel_width: *mut ::std::os::raw::c_int,
7474 pixel_height: *mut ::std::os::raw::c_int,
7475 ) -> *mut _cef_binary_value_t,
7476 >,
7477}
7478#[test]
7479fn bindgen_test_layout__cef_image_t() {
7480 const UNINIT: ::std::mem::MaybeUninit<_cef_image_t> = ::std::mem::MaybeUninit::uninit();
7481 let ptr = UNINIT.as_ptr();
7482 assert_eq!(
7483 ::std::mem::size_of::<_cef_image_t>(),
7484 144usize,
7485 concat!("Size of: ", stringify!(_cef_image_t))
7486 );
7487 assert_eq!(
7488 ::std::mem::align_of::<_cef_image_t>(),
7489 8usize,
7490 concat!("Alignment of ", stringify!(_cef_image_t))
7491 );
7492 assert_eq!(
7493 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
7494 0usize,
7495 concat!(
7496 "Offset of field: ",
7497 stringify!(_cef_image_t),
7498 "::",
7499 stringify!(base)
7500 )
7501 );
7502 assert_eq!(
7503 unsafe { ::std::ptr::addr_of!((*ptr).is_empty) as usize - ptr as usize },
7504 40usize,
7505 concat!(
7506 "Offset of field: ",
7507 stringify!(_cef_image_t),
7508 "::",
7509 stringify!(is_empty)
7510 )
7511 );
7512 assert_eq!(
7513 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
7514 48usize,
7515 concat!(
7516 "Offset of field: ",
7517 stringify!(_cef_image_t),
7518 "::",
7519 stringify!(is_same)
7520 )
7521 );
7522 assert_eq!(
7523 unsafe { ::std::ptr::addr_of!((*ptr).add_bitmap) as usize - ptr as usize },
7524 56usize,
7525 concat!(
7526 "Offset of field: ",
7527 stringify!(_cef_image_t),
7528 "::",
7529 stringify!(add_bitmap)
7530 )
7531 );
7532 assert_eq!(
7533 unsafe { ::std::ptr::addr_of!((*ptr).add_png) as usize - ptr as usize },
7534 64usize,
7535 concat!(
7536 "Offset of field: ",
7537 stringify!(_cef_image_t),
7538 "::",
7539 stringify!(add_png)
7540 )
7541 );
7542 assert_eq!(
7543 unsafe { ::std::ptr::addr_of!((*ptr).add_jpeg) as usize - ptr as usize },
7544 72usize,
7545 concat!(
7546 "Offset of field: ",
7547 stringify!(_cef_image_t),
7548 "::",
7549 stringify!(add_jpeg)
7550 )
7551 );
7552 assert_eq!(
7553 unsafe { ::std::ptr::addr_of!((*ptr).get_width) as usize - ptr as usize },
7554 80usize,
7555 concat!(
7556 "Offset of field: ",
7557 stringify!(_cef_image_t),
7558 "::",
7559 stringify!(get_width)
7560 )
7561 );
7562 assert_eq!(
7563 unsafe { ::std::ptr::addr_of!((*ptr).get_height) as usize - ptr as usize },
7564 88usize,
7565 concat!(
7566 "Offset of field: ",
7567 stringify!(_cef_image_t),
7568 "::",
7569 stringify!(get_height)
7570 )
7571 );
7572 assert_eq!(
7573 unsafe { ::std::ptr::addr_of!((*ptr).has_representation) as usize - ptr as usize },
7574 96usize,
7575 concat!(
7576 "Offset of field: ",
7577 stringify!(_cef_image_t),
7578 "::",
7579 stringify!(has_representation)
7580 )
7581 );
7582 assert_eq!(
7583 unsafe { ::std::ptr::addr_of!((*ptr).remove_representation) as usize - ptr as usize },
7584 104usize,
7585 concat!(
7586 "Offset of field: ",
7587 stringify!(_cef_image_t),
7588 "::",
7589 stringify!(remove_representation)
7590 )
7591 );
7592 assert_eq!(
7593 unsafe { ::std::ptr::addr_of!((*ptr).get_representation_info) as usize - ptr as usize },
7594 112usize,
7595 concat!(
7596 "Offset of field: ",
7597 stringify!(_cef_image_t),
7598 "::",
7599 stringify!(get_representation_info)
7600 )
7601 );
7602 assert_eq!(
7603 unsafe { ::std::ptr::addr_of!((*ptr).get_as_bitmap) as usize - ptr as usize },
7604 120usize,
7605 concat!(
7606 "Offset of field: ",
7607 stringify!(_cef_image_t),
7608 "::",
7609 stringify!(get_as_bitmap)
7610 )
7611 );
7612 assert_eq!(
7613 unsafe { ::std::ptr::addr_of!((*ptr).get_as_png) as usize - ptr as usize },
7614 128usize,
7615 concat!(
7616 "Offset of field: ",
7617 stringify!(_cef_image_t),
7618 "::",
7619 stringify!(get_as_png)
7620 )
7621 );
7622 assert_eq!(
7623 unsafe { ::std::ptr::addr_of!((*ptr).get_as_jpeg) as usize - ptr as usize },
7624 136usize,
7625 concat!(
7626 "Offset of field: ",
7627 stringify!(_cef_image_t),
7628 "::",
7629 stringify!(get_as_jpeg)
7630 )
7631 );
7632}
7633#[doc = "\n Container for a single image represented at different scale factors. All\n image representations should be the same size in density independent pixel\n (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels\n then the image at scale factor 2.0 should be 200x200 pixels -- both images\n will display with a DIP size of 100x100 units. The functions of this\n structure can be called on any browser process thread.\n"]
7634pub type cef_image_t = _cef_image_t;
7635extern "C" {
7636 #[doc = "\n Create a new cef_image_t. It will initially be NULL. Use the Add*()\n functions to add representations at different scale factors.\n"]
7637 pub fn cef_image_create() -> *mut cef_image_t;
7638}
7639#[doc = "\n Structure the client can implement to provide a custom stream reader. The\n functions of this structure may be called on any thread.\n"]
7640#[repr(C)]
7641#[derive(Debug, Copy, Clone)]
7642pub struct _cef_read_handler_t {
7643 #[doc = "\n Base structure.\n"]
7644 pub base: cef_base_ref_counted_t,
7645 #[doc = "\n Read raw binary data.\n"]
7646 pub read: ::std::option::Option<
7647 unsafe extern "C" fn(
7648 self_: *mut _cef_read_handler_t,
7649 ptr: *mut ::std::os::raw::c_void,
7650 size: usize,
7651 n: usize,
7652 ) -> usize,
7653 >,
7654 #[doc = "\n Seek to the specified offset position. |whence| may be any one of\n SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on\n failure.\n"]
7655 pub seek: ::std::option::Option<
7656 unsafe extern "C" fn(
7657 self_: *mut _cef_read_handler_t,
7658 offset: i64,
7659 whence: ::std::os::raw::c_int,
7660 ) -> ::std::os::raw::c_int,
7661 >,
7662 #[doc = "\n Return the current offset position.\n"]
7663 pub tell: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_read_handler_t) -> i64>,
7664 #[doc = "\n Return non-zero if at end of file.\n"]
7665 pub eof: ::std::option::Option<
7666 unsafe extern "C" fn(self_: *mut _cef_read_handler_t) -> ::std::os::raw::c_int,
7667 >,
7668 #[doc = "\n Return true (1) if this handler performs work like accessing the file\n system which may block. Used as a hint for determining the thread to\n access the handler from.\n"]
7669 pub may_block: ::std::option::Option<
7670 unsafe extern "C" fn(self_: *mut _cef_read_handler_t) -> ::std::os::raw::c_int,
7671 >,
7672}
7673#[test]
7674fn bindgen_test_layout__cef_read_handler_t() {
7675 const UNINIT: ::std::mem::MaybeUninit<_cef_read_handler_t> = ::std::mem::MaybeUninit::uninit();
7676 let ptr = UNINIT.as_ptr();
7677 assert_eq!(
7678 ::std::mem::size_of::<_cef_read_handler_t>(),
7679 80usize,
7680 concat!("Size of: ", stringify!(_cef_read_handler_t))
7681 );
7682 assert_eq!(
7683 ::std::mem::align_of::<_cef_read_handler_t>(),
7684 8usize,
7685 concat!("Alignment of ", stringify!(_cef_read_handler_t))
7686 );
7687 assert_eq!(
7688 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
7689 0usize,
7690 concat!(
7691 "Offset of field: ",
7692 stringify!(_cef_read_handler_t),
7693 "::",
7694 stringify!(base)
7695 )
7696 );
7697 assert_eq!(
7698 unsafe { ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize },
7699 40usize,
7700 concat!(
7701 "Offset of field: ",
7702 stringify!(_cef_read_handler_t),
7703 "::",
7704 stringify!(read)
7705 )
7706 );
7707 assert_eq!(
7708 unsafe { ::std::ptr::addr_of!((*ptr).seek) as usize - ptr as usize },
7709 48usize,
7710 concat!(
7711 "Offset of field: ",
7712 stringify!(_cef_read_handler_t),
7713 "::",
7714 stringify!(seek)
7715 )
7716 );
7717 assert_eq!(
7718 unsafe { ::std::ptr::addr_of!((*ptr).tell) as usize - ptr as usize },
7719 56usize,
7720 concat!(
7721 "Offset of field: ",
7722 stringify!(_cef_read_handler_t),
7723 "::",
7724 stringify!(tell)
7725 )
7726 );
7727 assert_eq!(
7728 unsafe { ::std::ptr::addr_of!((*ptr).eof) as usize - ptr as usize },
7729 64usize,
7730 concat!(
7731 "Offset of field: ",
7732 stringify!(_cef_read_handler_t),
7733 "::",
7734 stringify!(eof)
7735 )
7736 );
7737 assert_eq!(
7738 unsafe { ::std::ptr::addr_of!((*ptr).may_block) as usize - ptr as usize },
7739 72usize,
7740 concat!(
7741 "Offset of field: ",
7742 stringify!(_cef_read_handler_t),
7743 "::",
7744 stringify!(may_block)
7745 )
7746 );
7747}
7748#[doc = "\n Structure the client can implement to provide a custom stream reader. The\n functions of this structure may be called on any thread.\n"]
7749pub type cef_read_handler_t = _cef_read_handler_t;
7750#[doc = "\n Structure used to read data from a stream. The functions of this structure\n may be called on any thread.\n"]
7751#[repr(C)]
7752#[derive(Debug, Copy, Clone)]
7753pub struct _cef_stream_reader_t {
7754 #[doc = "\n Base structure.\n"]
7755 pub base: cef_base_ref_counted_t,
7756 #[doc = "\n Read raw binary data.\n"]
7757 pub read: ::std::option::Option<
7758 unsafe extern "C" fn(
7759 self_: *mut _cef_stream_reader_t,
7760 ptr: *mut ::std::os::raw::c_void,
7761 size: usize,
7762 n: usize,
7763 ) -> usize,
7764 >,
7765 #[doc = "\n Seek to the specified offset position. |whence| may be any one of\n SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on\n failure.\n"]
7766 pub seek: ::std::option::Option<
7767 unsafe extern "C" fn(
7768 self_: *mut _cef_stream_reader_t,
7769 offset: i64,
7770 whence: ::std::os::raw::c_int,
7771 ) -> ::std::os::raw::c_int,
7772 >,
7773 #[doc = "\n Return the current offset position.\n"]
7774 pub tell: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_stream_reader_t) -> i64>,
7775 #[doc = "\n Return non-zero if at end of file.\n"]
7776 pub eof: ::std::option::Option<
7777 unsafe extern "C" fn(self_: *mut _cef_stream_reader_t) -> ::std::os::raw::c_int,
7778 >,
7779 #[doc = "\n Returns true (1) if this reader performs work like accessing the file\n system which may block. Used as a hint for determining the thread to\n access the reader from.\n"]
7780 pub may_block: ::std::option::Option<
7781 unsafe extern "C" fn(self_: *mut _cef_stream_reader_t) -> ::std::os::raw::c_int,
7782 >,
7783}
7784#[test]
7785fn bindgen_test_layout__cef_stream_reader_t() {
7786 const UNINIT: ::std::mem::MaybeUninit<_cef_stream_reader_t> = ::std::mem::MaybeUninit::uninit();
7787 let ptr = UNINIT.as_ptr();
7788 assert_eq!(
7789 ::std::mem::size_of::<_cef_stream_reader_t>(),
7790 80usize,
7791 concat!("Size of: ", stringify!(_cef_stream_reader_t))
7792 );
7793 assert_eq!(
7794 ::std::mem::align_of::<_cef_stream_reader_t>(),
7795 8usize,
7796 concat!("Alignment of ", stringify!(_cef_stream_reader_t))
7797 );
7798 assert_eq!(
7799 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
7800 0usize,
7801 concat!(
7802 "Offset of field: ",
7803 stringify!(_cef_stream_reader_t),
7804 "::",
7805 stringify!(base)
7806 )
7807 );
7808 assert_eq!(
7809 unsafe { ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize },
7810 40usize,
7811 concat!(
7812 "Offset of field: ",
7813 stringify!(_cef_stream_reader_t),
7814 "::",
7815 stringify!(read)
7816 )
7817 );
7818 assert_eq!(
7819 unsafe { ::std::ptr::addr_of!((*ptr).seek) as usize - ptr as usize },
7820 48usize,
7821 concat!(
7822 "Offset of field: ",
7823 stringify!(_cef_stream_reader_t),
7824 "::",
7825 stringify!(seek)
7826 )
7827 );
7828 assert_eq!(
7829 unsafe { ::std::ptr::addr_of!((*ptr).tell) as usize - ptr as usize },
7830 56usize,
7831 concat!(
7832 "Offset of field: ",
7833 stringify!(_cef_stream_reader_t),
7834 "::",
7835 stringify!(tell)
7836 )
7837 );
7838 assert_eq!(
7839 unsafe { ::std::ptr::addr_of!((*ptr).eof) as usize - ptr as usize },
7840 64usize,
7841 concat!(
7842 "Offset of field: ",
7843 stringify!(_cef_stream_reader_t),
7844 "::",
7845 stringify!(eof)
7846 )
7847 );
7848 assert_eq!(
7849 unsafe { ::std::ptr::addr_of!((*ptr).may_block) as usize - ptr as usize },
7850 72usize,
7851 concat!(
7852 "Offset of field: ",
7853 stringify!(_cef_stream_reader_t),
7854 "::",
7855 stringify!(may_block)
7856 )
7857 );
7858}
7859#[doc = "\n Structure used to read data from a stream. The functions of this structure\n may be called on any thread.\n"]
7860pub type cef_stream_reader_t = _cef_stream_reader_t;
7861extern "C" {
7862 #[doc = "\n Create a new cef_stream_reader_t object from a file.\n"]
7863 pub fn cef_stream_reader_create_for_file(
7864 fileName: *const cef_string_t,
7865 ) -> *mut cef_stream_reader_t;
7866}
7867extern "C" {
7868 #[doc = "\n Create a new cef_stream_reader_t object from data.\n"]
7869 pub fn cef_stream_reader_create_for_data(
7870 data: *mut ::std::os::raw::c_void,
7871 size: usize,
7872 ) -> *mut cef_stream_reader_t;
7873}
7874extern "C" {
7875 #[doc = "\n Create a new cef_stream_reader_t object from a custom handler.\n"]
7876 pub fn cef_stream_reader_create_for_handler(
7877 handler: *mut cef_read_handler_t,
7878 ) -> *mut cef_stream_reader_t;
7879}
7880#[doc = "\n Structure the client can implement to provide a custom stream writer. The\n functions of this structure may be called on any thread.\n"]
7881#[repr(C)]
7882#[derive(Debug, Copy, Clone)]
7883pub struct _cef_write_handler_t {
7884 #[doc = "\n Base structure.\n"]
7885 pub base: cef_base_ref_counted_t,
7886 #[doc = "\n Write raw binary data.\n"]
7887 pub write: ::std::option::Option<
7888 unsafe extern "C" fn(
7889 self_: *mut _cef_write_handler_t,
7890 ptr: *const ::std::os::raw::c_void,
7891 size: usize,
7892 n: usize,
7893 ) -> usize,
7894 >,
7895 #[doc = "\n Seek to the specified offset position. |whence| may be any one of\n SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on\n failure.\n"]
7896 pub seek: ::std::option::Option<
7897 unsafe extern "C" fn(
7898 self_: *mut _cef_write_handler_t,
7899 offset: i64,
7900 whence: ::std::os::raw::c_int,
7901 ) -> ::std::os::raw::c_int,
7902 >,
7903 #[doc = "\n Return the current offset position.\n"]
7904 pub tell: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_write_handler_t) -> i64>,
7905 #[doc = "\n Flush the stream.\n"]
7906 pub flush: ::std::option::Option<
7907 unsafe extern "C" fn(self_: *mut _cef_write_handler_t) -> ::std::os::raw::c_int,
7908 >,
7909 #[doc = "\n Return true (1) if this handler performs work like accessing the file\n system which may block. Used as a hint for determining the thread to\n access the handler from.\n"]
7910 pub may_block: ::std::option::Option<
7911 unsafe extern "C" fn(self_: *mut _cef_write_handler_t) -> ::std::os::raw::c_int,
7912 >,
7913}
7914#[test]
7915fn bindgen_test_layout__cef_write_handler_t() {
7916 const UNINIT: ::std::mem::MaybeUninit<_cef_write_handler_t> = ::std::mem::MaybeUninit::uninit();
7917 let ptr = UNINIT.as_ptr();
7918 assert_eq!(
7919 ::std::mem::size_of::<_cef_write_handler_t>(),
7920 80usize,
7921 concat!("Size of: ", stringify!(_cef_write_handler_t))
7922 );
7923 assert_eq!(
7924 ::std::mem::align_of::<_cef_write_handler_t>(),
7925 8usize,
7926 concat!("Alignment of ", stringify!(_cef_write_handler_t))
7927 );
7928 assert_eq!(
7929 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
7930 0usize,
7931 concat!(
7932 "Offset of field: ",
7933 stringify!(_cef_write_handler_t),
7934 "::",
7935 stringify!(base)
7936 )
7937 );
7938 assert_eq!(
7939 unsafe { ::std::ptr::addr_of!((*ptr).write) as usize - ptr as usize },
7940 40usize,
7941 concat!(
7942 "Offset of field: ",
7943 stringify!(_cef_write_handler_t),
7944 "::",
7945 stringify!(write)
7946 )
7947 );
7948 assert_eq!(
7949 unsafe { ::std::ptr::addr_of!((*ptr).seek) as usize - ptr as usize },
7950 48usize,
7951 concat!(
7952 "Offset of field: ",
7953 stringify!(_cef_write_handler_t),
7954 "::",
7955 stringify!(seek)
7956 )
7957 );
7958 assert_eq!(
7959 unsafe { ::std::ptr::addr_of!((*ptr).tell) as usize - ptr as usize },
7960 56usize,
7961 concat!(
7962 "Offset of field: ",
7963 stringify!(_cef_write_handler_t),
7964 "::",
7965 stringify!(tell)
7966 )
7967 );
7968 assert_eq!(
7969 unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize },
7970 64usize,
7971 concat!(
7972 "Offset of field: ",
7973 stringify!(_cef_write_handler_t),
7974 "::",
7975 stringify!(flush)
7976 )
7977 );
7978 assert_eq!(
7979 unsafe { ::std::ptr::addr_of!((*ptr).may_block) as usize - ptr as usize },
7980 72usize,
7981 concat!(
7982 "Offset of field: ",
7983 stringify!(_cef_write_handler_t),
7984 "::",
7985 stringify!(may_block)
7986 )
7987 );
7988}
7989#[doc = "\n Structure the client can implement to provide a custom stream writer. The\n functions of this structure may be called on any thread.\n"]
7990pub type cef_write_handler_t = _cef_write_handler_t;
7991#[doc = "\n Structure used to write data to a stream. The functions of this structure\n may be called on any thread.\n"]
7992#[repr(C)]
7993#[derive(Debug, Copy, Clone)]
7994pub struct _cef_stream_writer_t {
7995 #[doc = "\n Base structure.\n"]
7996 pub base: cef_base_ref_counted_t,
7997 #[doc = "\n Write raw binary data.\n"]
7998 pub write: ::std::option::Option<
7999 unsafe extern "C" fn(
8000 self_: *mut _cef_stream_writer_t,
8001 ptr: *const ::std::os::raw::c_void,
8002 size: usize,
8003 n: usize,
8004 ) -> usize,
8005 >,
8006 #[doc = "\n Seek to the specified offset position. |whence| may be any one of\n SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on\n failure.\n"]
8007 pub seek: ::std::option::Option<
8008 unsafe extern "C" fn(
8009 self_: *mut _cef_stream_writer_t,
8010 offset: i64,
8011 whence: ::std::os::raw::c_int,
8012 ) -> ::std::os::raw::c_int,
8013 >,
8014 #[doc = "\n Return the current offset position.\n"]
8015 pub tell: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_stream_writer_t) -> i64>,
8016 #[doc = "\n Flush the stream.\n"]
8017 pub flush: ::std::option::Option<
8018 unsafe extern "C" fn(self_: *mut _cef_stream_writer_t) -> ::std::os::raw::c_int,
8019 >,
8020 #[doc = "\n Returns true (1) if this writer performs work like accessing the file\n system which may block. Used as a hint for determining the thread to\n access the writer from.\n"]
8021 pub may_block: ::std::option::Option<
8022 unsafe extern "C" fn(self_: *mut _cef_stream_writer_t) -> ::std::os::raw::c_int,
8023 >,
8024}
8025#[test]
8026fn bindgen_test_layout__cef_stream_writer_t() {
8027 const UNINIT: ::std::mem::MaybeUninit<_cef_stream_writer_t> = ::std::mem::MaybeUninit::uninit();
8028 let ptr = UNINIT.as_ptr();
8029 assert_eq!(
8030 ::std::mem::size_of::<_cef_stream_writer_t>(),
8031 80usize,
8032 concat!("Size of: ", stringify!(_cef_stream_writer_t))
8033 );
8034 assert_eq!(
8035 ::std::mem::align_of::<_cef_stream_writer_t>(),
8036 8usize,
8037 concat!("Alignment of ", stringify!(_cef_stream_writer_t))
8038 );
8039 assert_eq!(
8040 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
8041 0usize,
8042 concat!(
8043 "Offset of field: ",
8044 stringify!(_cef_stream_writer_t),
8045 "::",
8046 stringify!(base)
8047 )
8048 );
8049 assert_eq!(
8050 unsafe { ::std::ptr::addr_of!((*ptr).write) as usize - ptr as usize },
8051 40usize,
8052 concat!(
8053 "Offset of field: ",
8054 stringify!(_cef_stream_writer_t),
8055 "::",
8056 stringify!(write)
8057 )
8058 );
8059 assert_eq!(
8060 unsafe { ::std::ptr::addr_of!((*ptr).seek) as usize - ptr as usize },
8061 48usize,
8062 concat!(
8063 "Offset of field: ",
8064 stringify!(_cef_stream_writer_t),
8065 "::",
8066 stringify!(seek)
8067 )
8068 );
8069 assert_eq!(
8070 unsafe { ::std::ptr::addr_of!((*ptr).tell) as usize - ptr as usize },
8071 56usize,
8072 concat!(
8073 "Offset of field: ",
8074 stringify!(_cef_stream_writer_t),
8075 "::",
8076 stringify!(tell)
8077 )
8078 );
8079 assert_eq!(
8080 unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize },
8081 64usize,
8082 concat!(
8083 "Offset of field: ",
8084 stringify!(_cef_stream_writer_t),
8085 "::",
8086 stringify!(flush)
8087 )
8088 );
8089 assert_eq!(
8090 unsafe { ::std::ptr::addr_of!((*ptr).may_block) as usize - ptr as usize },
8091 72usize,
8092 concat!(
8093 "Offset of field: ",
8094 stringify!(_cef_stream_writer_t),
8095 "::",
8096 stringify!(may_block)
8097 )
8098 );
8099}
8100#[doc = "\n Structure used to write data to a stream. The functions of this structure\n may be called on any thread.\n"]
8101pub type cef_stream_writer_t = _cef_stream_writer_t;
8102extern "C" {
8103 #[doc = "\n Create a new cef_stream_writer_t object for a file.\n"]
8104 pub fn cef_stream_writer_create_for_file(
8105 fileName: *const cef_string_t,
8106 ) -> *mut cef_stream_writer_t;
8107}
8108extern "C" {
8109 #[doc = "\n Create a new cef_stream_writer_t object for a custom handler.\n"]
8110 pub fn cef_stream_writer_create_for_handler(
8111 handler: *mut cef_write_handler_t,
8112 ) -> *mut cef_stream_writer_t;
8113}
8114#[doc = "\n Structure used to represent drag data. The functions of this structure may\n be called on any thread.\n"]
8115#[repr(C)]
8116#[derive(Debug, Copy, Clone)]
8117pub struct _cef_drag_data_t {
8118 #[doc = "\n Base structure.\n"]
8119 pub base: cef_base_ref_counted_t,
8120 #[doc = "\n Returns a copy of the current object.\n"]
8121 pub clone: ::std::option::Option<
8122 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> *mut _cef_drag_data_t,
8123 >,
8124 #[doc = "\n Returns true (1) if this object is read-only.\n"]
8125 pub is_read_only: ::std::option::Option<
8126 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> ::std::os::raw::c_int,
8127 >,
8128 #[doc = "\n Returns true (1) if the drag data is a link.\n"]
8129 pub is_link: ::std::option::Option<
8130 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> ::std::os::raw::c_int,
8131 >,
8132 #[doc = "\n Returns true (1) if the drag data is a text or html fragment.\n"]
8133 pub is_fragment: ::std::option::Option<
8134 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> ::std::os::raw::c_int,
8135 >,
8136 #[doc = "\n Returns true (1) if the drag data is a file.\n"]
8137 pub is_file: ::std::option::Option<
8138 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> ::std::os::raw::c_int,
8139 >,
8140 #[doc = "\n Return the link URL that is being dragged.\n"]
8141 pub get_link_url: ::std::option::Option<
8142 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t,
8143 >,
8144 #[doc = "\n Return the title associated with the link being dragged.\n"]
8145 pub get_link_title: ::std::option::Option<
8146 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t,
8147 >,
8148 #[doc = "\n Return the metadata, if any, associated with the link being dragged.\n"]
8149 pub get_link_metadata: ::std::option::Option<
8150 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t,
8151 >,
8152 #[doc = "\n Return the plain text fragment that is being dragged.\n"]
8153 pub get_fragment_text: ::std::option::Option<
8154 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t,
8155 >,
8156 #[doc = "\n Return the text/html fragment that is being dragged.\n"]
8157 pub get_fragment_html: ::std::option::Option<
8158 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t,
8159 >,
8160 #[doc = "\n Return the base URL that the fragment came from. This value is used for\n resolving relative URLs and may be NULL.\n"]
8161 pub get_fragment_base_url: ::std::option::Option<
8162 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t,
8163 >,
8164 #[doc = "\n Return the name of the file being dragged out of the browser window.\n"]
8165 pub get_file_name: ::std::option::Option<
8166 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t,
8167 >,
8168 #[doc = "\n Write the contents of the file being dragged out of the web view into\n |writer|. Returns the number of bytes sent to |writer|. If |writer| is\n NULL this function will return the size of the file contents in bytes.\n Call get_file_name() to get a suggested name for the file.\n"]
8169 pub get_file_contents: ::std::option::Option<
8170 unsafe extern "C" fn(
8171 self_: *mut _cef_drag_data_t,
8172 writer: *mut _cef_stream_writer_t,
8173 ) -> usize,
8174 >,
8175 #[doc = "\n Retrieve the list of file names that are being dragged into the browser\n window.\n"]
8176 pub get_file_names: ::std::option::Option<
8177 unsafe extern "C" fn(
8178 self_: *mut _cef_drag_data_t,
8179 names: cef_string_list_t,
8180 ) -> ::std::os::raw::c_int,
8181 >,
8182 #[doc = "\n Set the link URL that is being dragged.\n"]
8183 pub set_link_url: ::std::option::Option<
8184 unsafe extern "C" fn(self_: *mut _cef_drag_data_t, url: *const cef_string_t),
8185 >,
8186 #[doc = "\n Set the title associated with the link being dragged.\n"]
8187 pub set_link_title: ::std::option::Option<
8188 unsafe extern "C" fn(self_: *mut _cef_drag_data_t, title: *const cef_string_t),
8189 >,
8190 #[doc = "\n Set the metadata associated with the link being dragged.\n"]
8191 pub set_link_metadata: ::std::option::Option<
8192 unsafe extern "C" fn(self_: *mut _cef_drag_data_t, data: *const cef_string_t),
8193 >,
8194 #[doc = "\n Set the plain text fragment that is being dragged.\n"]
8195 pub set_fragment_text: ::std::option::Option<
8196 unsafe extern "C" fn(self_: *mut _cef_drag_data_t, text: *const cef_string_t),
8197 >,
8198 #[doc = "\n Set the text/html fragment that is being dragged.\n"]
8199 pub set_fragment_html: ::std::option::Option<
8200 unsafe extern "C" fn(self_: *mut _cef_drag_data_t, html: *const cef_string_t),
8201 >,
8202 #[doc = "\n Set the base URL that the fragment came from.\n"]
8203 pub set_fragment_base_url: ::std::option::Option<
8204 unsafe extern "C" fn(self_: *mut _cef_drag_data_t, base_url: *const cef_string_t),
8205 >,
8206 #[doc = "\n Reset the file contents. You should do this before calling\n cef_browser_host_t::DragTargetDragEnter as the web view does not allow us\n to drag in this kind of data.\n"]
8207 pub reset_file_contents:
8208 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t)>,
8209 #[doc = "\n Add a file that is being dragged into the webview.\n"]
8210 pub add_file: ::std::option::Option<
8211 unsafe extern "C" fn(
8212 self_: *mut _cef_drag_data_t,
8213 path: *const cef_string_t,
8214 display_name: *const cef_string_t,
8215 ),
8216 >,
8217 #[doc = "\n Clear list of filenames.\n"]
8218 pub clear_filenames: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t)>,
8219 #[doc = "\n Get the image representation of drag data. May return NULL if no image\n representation is available.\n"]
8220 pub get_image: ::std::option::Option<
8221 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> *mut _cef_image_t,
8222 >,
8223 #[doc = "\n Get the image hotspot (drag start location relative to image dimensions).\n"]
8224 pub get_image_hotspot:
8225 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_point_t>,
8226 #[doc = "\n Returns true (1) if an image representation of drag data is available.\n"]
8227 pub has_image: ::std::option::Option<
8228 unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> ::std::os::raw::c_int,
8229 >,
8230}
8231#[test]
8232fn bindgen_test_layout__cef_drag_data_t() {
8233 const UNINIT: ::std::mem::MaybeUninit<_cef_drag_data_t> = ::std::mem::MaybeUninit::uninit();
8234 let ptr = UNINIT.as_ptr();
8235 assert_eq!(
8236 ::std::mem::size_of::<_cef_drag_data_t>(),
8237 248usize,
8238 concat!("Size of: ", stringify!(_cef_drag_data_t))
8239 );
8240 assert_eq!(
8241 ::std::mem::align_of::<_cef_drag_data_t>(),
8242 8usize,
8243 concat!("Alignment of ", stringify!(_cef_drag_data_t))
8244 );
8245 assert_eq!(
8246 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
8247 0usize,
8248 concat!(
8249 "Offset of field: ",
8250 stringify!(_cef_drag_data_t),
8251 "::",
8252 stringify!(base)
8253 )
8254 );
8255 assert_eq!(
8256 unsafe { ::std::ptr::addr_of!((*ptr).clone) as usize - ptr as usize },
8257 40usize,
8258 concat!(
8259 "Offset of field: ",
8260 stringify!(_cef_drag_data_t),
8261 "::",
8262 stringify!(clone)
8263 )
8264 );
8265 assert_eq!(
8266 unsafe { ::std::ptr::addr_of!((*ptr).is_read_only) as usize - ptr as usize },
8267 48usize,
8268 concat!(
8269 "Offset of field: ",
8270 stringify!(_cef_drag_data_t),
8271 "::",
8272 stringify!(is_read_only)
8273 )
8274 );
8275 assert_eq!(
8276 unsafe { ::std::ptr::addr_of!((*ptr).is_link) as usize - ptr as usize },
8277 56usize,
8278 concat!(
8279 "Offset of field: ",
8280 stringify!(_cef_drag_data_t),
8281 "::",
8282 stringify!(is_link)
8283 )
8284 );
8285 assert_eq!(
8286 unsafe { ::std::ptr::addr_of!((*ptr).is_fragment) as usize - ptr as usize },
8287 64usize,
8288 concat!(
8289 "Offset of field: ",
8290 stringify!(_cef_drag_data_t),
8291 "::",
8292 stringify!(is_fragment)
8293 )
8294 );
8295 assert_eq!(
8296 unsafe { ::std::ptr::addr_of!((*ptr).is_file) as usize - ptr as usize },
8297 72usize,
8298 concat!(
8299 "Offset of field: ",
8300 stringify!(_cef_drag_data_t),
8301 "::",
8302 stringify!(is_file)
8303 )
8304 );
8305 assert_eq!(
8306 unsafe { ::std::ptr::addr_of!((*ptr).get_link_url) as usize - ptr as usize },
8307 80usize,
8308 concat!(
8309 "Offset of field: ",
8310 stringify!(_cef_drag_data_t),
8311 "::",
8312 stringify!(get_link_url)
8313 )
8314 );
8315 assert_eq!(
8316 unsafe { ::std::ptr::addr_of!((*ptr).get_link_title) as usize - ptr as usize },
8317 88usize,
8318 concat!(
8319 "Offset of field: ",
8320 stringify!(_cef_drag_data_t),
8321 "::",
8322 stringify!(get_link_title)
8323 )
8324 );
8325 assert_eq!(
8326 unsafe { ::std::ptr::addr_of!((*ptr).get_link_metadata) as usize - ptr as usize },
8327 96usize,
8328 concat!(
8329 "Offset of field: ",
8330 stringify!(_cef_drag_data_t),
8331 "::",
8332 stringify!(get_link_metadata)
8333 )
8334 );
8335 assert_eq!(
8336 unsafe { ::std::ptr::addr_of!((*ptr).get_fragment_text) as usize - ptr as usize },
8337 104usize,
8338 concat!(
8339 "Offset of field: ",
8340 stringify!(_cef_drag_data_t),
8341 "::",
8342 stringify!(get_fragment_text)
8343 )
8344 );
8345 assert_eq!(
8346 unsafe { ::std::ptr::addr_of!((*ptr).get_fragment_html) as usize - ptr as usize },
8347 112usize,
8348 concat!(
8349 "Offset of field: ",
8350 stringify!(_cef_drag_data_t),
8351 "::",
8352 stringify!(get_fragment_html)
8353 )
8354 );
8355 assert_eq!(
8356 unsafe { ::std::ptr::addr_of!((*ptr).get_fragment_base_url) as usize - ptr as usize },
8357 120usize,
8358 concat!(
8359 "Offset of field: ",
8360 stringify!(_cef_drag_data_t),
8361 "::",
8362 stringify!(get_fragment_base_url)
8363 )
8364 );
8365 assert_eq!(
8366 unsafe { ::std::ptr::addr_of!((*ptr).get_file_name) as usize - ptr as usize },
8367 128usize,
8368 concat!(
8369 "Offset of field: ",
8370 stringify!(_cef_drag_data_t),
8371 "::",
8372 stringify!(get_file_name)
8373 )
8374 );
8375 assert_eq!(
8376 unsafe { ::std::ptr::addr_of!((*ptr).get_file_contents) as usize - ptr as usize },
8377 136usize,
8378 concat!(
8379 "Offset of field: ",
8380 stringify!(_cef_drag_data_t),
8381 "::",
8382 stringify!(get_file_contents)
8383 )
8384 );
8385 assert_eq!(
8386 unsafe { ::std::ptr::addr_of!((*ptr).get_file_names) as usize - ptr as usize },
8387 144usize,
8388 concat!(
8389 "Offset of field: ",
8390 stringify!(_cef_drag_data_t),
8391 "::",
8392 stringify!(get_file_names)
8393 )
8394 );
8395 assert_eq!(
8396 unsafe { ::std::ptr::addr_of!((*ptr).set_link_url) as usize - ptr as usize },
8397 152usize,
8398 concat!(
8399 "Offset of field: ",
8400 stringify!(_cef_drag_data_t),
8401 "::",
8402 stringify!(set_link_url)
8403 )
8404 );
8405 assert_eq!(
8406 unsafe { ::std::ptr::addr_of!((*ptr).set_link_title) as usize - ptr as usize },
8407 160usize,
8408 concat!(
8409 "Offset of field: ",
8410 stringify!(_cef_drag_data_t),
8411 "::",
8412 stringify!(set_link_title)
8413 )
8414 );
8415 assert_eq!(
8416 unsafe { ::std::ptr::addr_of!((*ptr).set_link_metadata) as usize - ptr as usize },
8417 168usize,
8418 concat!(
8419 "Offset of field: ",
8420 stringify!(_cef_drag_data_t),
8421 "::",
8422 stringify!(set_link_metadata)
8423 )
8424 );
8425 assert_eq!(
8426 unsafe { ::std::ptr::addr_of!((*ptr).set_fragment_text) as usize - ptr as usize },
8427 176usize,
8428 concat!(
8429 "Offset of field: ",
8430 stringify!(_cef_drag_data_t),
8431 "::",
8432 stringify!(set_fragment_text)
8433 )
8434 );
8435 assert_eq!(
8436 unsafe { ::std::ptr::addr_of!((*ptr).set_fragment_html) as usize - ptr as usize },
8437 184usize,
8438 concat!(
8439 "Offset of field: ",
8440 stringify!(_cef_drag_data_t),
8441 "::",
8442 stringify!(set_fragment_html)
8443 )
8444 );
8445 assert_eq!(
8446 unsafe { ::std::ptr::addr_of!((*ptr).set_fragment_base_url) as usize - ptr as usize },
8447 192usize,
8448 concat!(
8449 "Offset of field: ",
8450 stringify!(_cef_drag_data_t),
8451 "::",
8452 stringify!(set_fragment_base_url)
8453 )
8454 );
8455 assert_eq!(
8456 unsafe { ::std::ptr::addr_of!((*ptr).reset_file_contents) as usize - ptr as usize },
8457 200usize,
8458 concat!(
8459 "Offset of field: ",
8460 stringify!(_cef_drag_data_t),
8461 "::",
8462 stringify!(reset_file_contents)
8463 )
8464 );
8465 assert_eq!(
8466 unsafe { ::std::ptr::addr_of!((*ptr).add_file) as usize - ptr as usize },
8467 208usize,
8468 concat!(
8469 "Offset of field: ",
8470 stringify!(_cef_drag_data_t),
8471 "::",
8472 stringify!(add_file)
8473 )
8474 );
8475 assert_eq!(
8476 unsafe { ::std::ptr::addr_of!((*ptr).clear_filenames) as usize - ptr as usize },
8477 216usize,
8478 concat!(
8479 "Offset of field: ",
8480 stringify!(_cef_drag_data_t),
8481 "::",
8482 stringify!(clear_filenames)
8483 )
8484 );
8485 assert_eq!(
8486 unsafe { ::std::ptr::addr_of!((*ptr).get_image) as usize - ptr as usize },
8487 224usize,
8488 concat!(
8489 "Offset of field: ",
8490 stringify!(_cef_drag_data_t),
8491 "::",
8492 stringify!(get_image)
8493 )
8494 );
8495 assert_eq!(
8496 unsafe { ::std::ptr::addr_of!((*ptr).get_image_hotspot) as usize - ptr as usize },
8497 232usize,
8498 concat!(
8499 "Offset of field: ",
8500 stringify!(_cef_drag_data_t),
8501 "::",
8502 stringify!(get_image_hotspot)
8503 )
8504 );
8505 assert_eq!(
8506 unsafe { ::std::ptr::addr_of!((*ptr).has_image) as usize - ptr as usize },
8507 240usize,
8508 concat!(
8509 "Offset of field: ",
8510 stringify!(_cef_drag_data_t),
8511 "::",
8512 stringify!(has_image)
8513 )
8514 );
8515}
8516#[doc = "\n Structure used to represent drag data. The functions of this structure may\n be called on any thread.\n"]
8517pub type cef_drag_data_t = _cef_drag_data_t;
8518extern "C" {
8519 #[doc = "\n Create a new cef_drag_data_t object.\n"]
8520 pub fn cef_drag_data_create() -> *mut cef_drag_data_t;
8521}
8522#[doc = "\n Structure to implement for visiting the DOM. The functions of this structure\n will be called on the render process main thread.\n"]
8523#[repr(C)]
8524#[derive(Debug, Copy, Clone)]
8525pub struct _cef_domvisitor_t {
8526 #[doc = "\n Base structure.\n"]
8527 pub base: cef_base_ref_counted_t,
8528 #[doc = "\n Method executed for visiting the DOM. The document object passed to this\n function represents a snapshot of the DOM at the time this function is\n executed. DOM objects are only valid for the scope of this function. Do\n not keep references to or attempt to access any DOM objects outside the\n scope of this function.\n"]
8529 pub visit: ::std::option::Option<
8530 unsafe extern "C" fn(self_: *mut _cef_domvisitor_t, document: *mut _cef_domdocument_t),
8531 >,
8532}
8533#[test]
8534fn bindgen_test_layout__cef_domvisitor_t() {
8535 const UNINIT: ::std::mem::MaybeUninit<_cef_domvisitor_t> = ::std::mem::MaybeUninit::uninit();
8536 let ptr = UNINIT.as_ptr();
8537 assert_eq!(
8538 ::std::mem::size_of::<_cef_domvisitor_t>(),
8539 48usize,
8540 concat!("Size of: ", stringify!(_cef_domvisitor_t))
8541 );
8542 assert_eq!(
8543 ::std::mem::align_of::<_cef_domvisitor_t>(),
8544 8usize,
8545 concat!("Alignment of ", stringify!(_cef_domvisitor_t))
8546 );
8547 assert_eq!(
8548 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
8549 0usize,
8550 concat!(
8551 "Offset of field: ",
8552 stringify!(_cef_domvisitor_t),
8553 "::",
8554 stringify!(base)
8555 )
8556 );
8557 assert_eq!(
8558 unsafe { ::std::ptr::addr_of!((*ptr).visit) as usize - ptr as usize },
8559 40usize,
8560 concat!(
8561 "Offset of field: ",
8562 stringify!(_cef_domvisitor_t),
8563 "::",
8564 stringify!(visit)
8565 )
8566 );
8567}
8568#[doc = "\n Structure to implement for visiting the DOM. The functions of this structure\n will be called on the render process main thread.\n"]
8569pub type cef_domvisitor_t = _cef_domvisitor_t;
8570#[doc = "\n Structure used to represent a DOM document. The functions of this structure\n should only be called on the render process main thread thread.\n"]
8571#[repr(C)]
8572#[derive(Debug, Copy, Clone)]
8573pub struct _cef_domdocument_t {
8574 #[doc = "\n Base structure.\n"]
8575 pub base: cef_base_ref_counted_t,
8576 #[doc = "\n Returns the document type.\n"]
8577 pub get_type: ::std::option::Option<
8578 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> cef_dom_document_type_t,
8579 >,
8580 #[doc = "\n Returns the root document node.\n"]
8581 pub get_document: ::std::option::Option<
8582 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> *mut _cef_domnode_t,
8583 >,
8584 #[doc = "\n Returns the BODY node of an HTML document.\n"]
8585 pub get_body: ::std::option::Option<
8586 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> *mut _cef_domnode_t,
8587 >,
8588 #[doc = "\n Returns the HEAD node of an HTML document.\n"]
8589 pub get_head: ::std::option::Option<
8590 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> *mut _cef_domnode_t,
8591 >,
8592 #[doc = "\n Returns the title of an HTML document.\n"]
8593 pub get_title: ::std::option::Option<
8594 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> cef_string_userfree_t,
8595 >,
8596 #[doc = "\n Returns the document element with the specified ID value.\n"]
8597 pub get_element_by_id: ::std::option::Option<
8598 unsafe extern "C" fn(
8599 self_: *mut _cef_domdocument_t,
8600 id: *const cef_string_t,
8601 ) -> *mut _cef_domnode_t,
8602 >,
8603 #[doc = "\n Returns the node that currently has keyboard focus.\n"]
8604 pub get_focused_node: ::std::option::Option<
8605 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> *mut _cef_domnode_t,
8606 >,
8607 #[doc = "\n Returns true (1) if a portion of the document is selected.\n"]
8608 pub has_selection: ::std::option::Option<
8609 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> ::std::os::raw::c_int,
8610 >,
8611 #[doc = "\n Returns the selection offset within the start node.\n"]
8612 pub get_selection_start_offset: ::std::option::Option<
8613 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> ::std::os::raw::c_int,
8614 >,
8615 #[doc = "\n Returns the selection offset within the end node.\n"]
8616 pub get_selection_end_offset: ::std::option::Option<
8617 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> ::std::os::raw::c_int,
8618 >,
8619 #[doc = "\n Returns the contents of this selection as markup.\n"]
8620 pub get_selection_as_markup: ::std::option::Option<
8621 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> cef_string_userfree_t,
8622 >,
8623 #[doc = "\n Returns the contents of this selection as text.\n"]
8624 pub get_selection_as_text: ::std::option::Option<
8625 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> cef_string_userfree_t,
8626 >,
8627 #[doc = "\n Returns the base URL for the document.\n"]
8628 pub get_base_url: ::std::option::Option<
8629 unsafe extern "C" fn(self_: *mut _cef_domdocument_t) -> cef_string_userfree_t,
8630 >,
8631 #[doc = "\n Returns a complete URL based on the document base URL and the specified\n partial URL.\n"]
8632 pub get_complete_url: ::std::option::Option<
8633 unsafe extern "C" fn(
8634 self_: *mut _cef_domdocument_t,
8635 partialURL: *const cef_string_t,
8636 ) -> cef_string_userfree_t,
8637 >,
8638}
8639#[test]
8640fn bindgen_test_layout__cef_domdocument_t() {
8641 const UNINIT: ::std::mem::MaybeUninit<_cef_domdocument_t> = ::std::mem::MaybeUninit::uninit();
8642 let ptr = UNINIT.as_ptr();
8643 assert_eq!(
8644 ::std::mem::size_of::<_cef_domdocument_t>(),
8645 152usize,
8646 concat!("Size of: ", stringify!(_cef_domdocument_t))
8647 );
8648 assert_eq!(
8649 ::std::mem::align_of::<_cef_domdocument_t>(),
8650 8usize,
8651 concat!("Alignment of ", stringify!(_cef_domdocument_t))
8652 );
8653 assert_eq!(
8654 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
8655 0usize,
8656 concat!(
8657 "Offset of field: ",
8658 stringify!(_cef_domdocument_t),
8659 "::",
8660 stringify!(base)
8661 )
8662 );
8663 assert_eq!(
8664 unsafe { ::std::ptr::addr_of!((*ptr).get_type) as usize - ptr as usize },
8665 40usize,
8666 concat!(
8667 "Offset of field: ",
8668 stringify!(_cef_domdocument_t),
8669 "::",
8670 stringify!(get_type)
8671 )
8672 );
8673 assert_eq!(
8674 unsafe { ::std::ptr::addr_of!((*ptr).get_document) as usize - ptr as usize },
8675 48usize,
8676 concat!(
8677 "Offset of field: ",
8678 stringify!(_cef_domdocument_t),
8679 "::",
8680 stringify!(get_document)
8681 )
8682 );
8683 assert_eq!(
8684 unsafe { ::std::ptr::addr_of!((*ptr).get_body) as usize - ptr as usize },
8685 56usize,
8686 concat!(
8687 "Offset of field: ",
8688 stringify!(_cef_domdocument_t),
8689 "::",
8690 stringify!(get_body)
8691 )
8692 );
8693 assert_eq!(
8694 unsafe { ::std::ptr::addr_of!((*ptr).get_head) as usize - ptr as usize },
8695 64usize,
8696 concat!(
8697 "Offset of field: ",
8698 stringify!(_cef_domdocument_t),
8699 "::",
8700 stringify!(get_head)
8701 )
8702 );
8703 assert_eq!(
8704 unsafe { ::std::ptr::addr_of!((*ptr).get_title) as usize - ptr as usize },
8705 72usize,
8706 concat!(
8707 "Offset of field: ",
8708 stringify!(_cef_domdocument_t),
8709 "::",
8710 stringify!(get_title)
8711 )
8712 );
8713 assert_eq!(
8714 unsafe { ::std::ptr::addr_of!((*ptr).get_element_by_id) as usize - ptr as usize },
8715 80usize,
8716 concat!(
8717 "Offset of field: ",
8718 stringify!(_cef_domdocument_t),
8719 "::",
8720 stringify!(get_element_by_id)
8721 )
8722 );
8723 assert_eq!(
8724 unsafe { ::std::ptr::addr_of!((*ptr).get_focused_node) as usize - ptr as usize },
8725 88usize,
8726 concat!(
8727 "Offset of field: ",
8728 stringify!(_cef_domdocument_t),
8729 "::",
8730 stringify!(get_focused_node)
8731 )
8732 );
8733 assert_eq!(
8734 unsafe { ::std::ptr::addr_of!((*ptr).has_selection) as usize - ptr as usize },
8735 96usize,
8736 concat!(
8737 "Offset of field: ",
8738 stringify!(_cef_domdocument_t),
8739 "::",
8740 stringify!(has_selection)
8741 )
8742 );
8743 assert_eq!(
8744 unsafe { ::std::ptr::addr_of!((*ptr).get_selection_start_offset) as usize - ptr as usize },
8745 104usize,
8746 concat!(
8747 "Offset of field: ",
8748 stringify!(_cef_domdocument_t),
8749 "::",
8750 stringify!(get_selection_start_offset)
8751 )
8752 );
8753 assert_eq!(
8754 unsafe { ::std::ptr::addr_of!((*ptr).get_selection_end_offset) as usize - ptr as usize },
8755 112usize,
8756 concat!(
8757 "Offset of field: ",
8758 stringify!(_cef_domdocument_t),
8759 "::",
8760 stringify!(get_selection_end_offset)
8761 )
8762 );
8763 assert_eq!(
8764 unsafe { ::std::ptr::addr_of!((*ptr).get_selection_as_markup) as usize - ptr as usize },
8765 120usize,
8766 concat!(
8767 "Offset of field: ",
8768 stringify!(_cef_domdocument_t),
8769 "::",
8770 stringify!(get_selection_as_markup)
8771 )
8772 );
8773 assert_eq!(
8774 unsafe { ::std::ptr::addr_of!((*ptr).get_selection_as_text) as usize - ptr as usize },
8775 128usize,
8776 concat!(
8777 "Offset of field: ",
8778 stringify!(_cef_domdocument_t),
8779 "::",
8780 stringify!(get_selection_as_text)
8781 )
8782 );
8783 assert_eq!(
8784 unsafe { ::std::ptr::addr_of!((*ptr).get_base_url) as usize - ptr as usize },
8785 136usize,
8786 concat!(
8787 "Offset of field: ",
8788 stringify!(_cef_domdocument_t),
8789 "::",
8790 stringify!(get_base_url)
8791 )
8792 );
8793 assert_eq!(
8794 unsafe { ::std::ptr::addr_of!((*ptr).get_complete_url) as usize - ptr as usize },
8795 144usize,
8796 concat!(
8797 "Offset of field: ",
8798 stringify!(_cef_domdocument_t),
8799 "::",
8800 stringify!(get_complete_url)
8801 )
8802 );
8803}
8804#[doc = "\n Structure used to represent a DOM document. The functions of this structure\n should only be called on the render process main thread thread.\n"]
8805pub type cef_domdocument_t = _cef_domdocument_t;
8806#[doc = "\n Structure used to represent a DOM node. The functions of this structure\n should only be called on the render process main thread.\n"]
8807#[repr(C)]
8808#[derive(Debug, Copy, Clone)]
8809pub struct _cef_domnode_t {
8810 #[doc = "\n Base structure.\n"]
8811 pub base: cef_base_ref_counted_t,
8812 #[doc = "\n Returns the type for this node.\n"]
8813 pub get_type: ::std::option::Option<
8814 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> cef_dom_node_type_t,
8815 >,
8816 #[doc = "\n Returns true (1) if this is a text node.\n"]
8817 pub is_text: ::std::option::Option<
8818 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> ::std::os::raw::c_int,
8819 >,
8820 #[doc = "\n Returns true (1) if this is an element node.\n"]
8821 pub is_element: ::std::option::Option<
8822 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> ::std::os::raw::c_int,
8823 >,
8824 #[doc = "\n Returns true (1) if this is an editable node.\n"]
8825 pub is_editable: ::std::option::Option<
8826 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> ::std::os::raw::c_int,
8827 >,
8828 #[doc = "\n Returns true (1) if this is a form control element node.\n"]
8829 pub is_form_control_element: ::std::option::Option<
8830 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> ::std::os::raw::c_int,
8831 >,
8832 #[doc = "\n Returns the type of this form control element node.\n"]
8833 pub get_form_control_element_type: ::std::option::Option<
8834 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> cef_string_userfree_t,
8835 >,
8836 #[doc = "\n Returns true (1) if this object is pointing to the same handle as |that|\n object.\n"]
8837 pub is_same: ::std::option::Option<
8838 unsafe extern "C" fn(
8839 self_: *mut _cef_domnode_t,
8840 that: *mut _cef_domnode_t,
8841 ) -> ::std::os::raw::c_int,
8842 >,
8843 #[doc = "\n Returns the name of this node.\n"]
8844 pub get_name: ::std::option::Option<
8845 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> cef_string_userfree_t,
8846 >,
8847 #[doc = "\n Returns the value of this node.\n"]
8848 pub get_value: ::std::option::Option<
8849 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> cef_string_userfree_t,
8850 >,
8851 #[doc = "\n Set the value of this node. Returns true (1) on success.\n"]
8852 pub set_value: ::std::option::Option<
8853 unsafe extern "C" fn(
8854 self_: *mut _cef_domnode_t,
8855 value: *const cef_string_t,
8856 ) -> ::std::os::raw::c_int,
8857 >,
8858 #[doc = "\n Returns the contents of this node as markup.\n"]
8859 pub get_as_markup: ::std::option::Option<
8860 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> cef_string_userfree_t,
8861 >,
8862 #[doc = "\n Returns the document associated with this node.\n"]
8863 pub get_document: ::std::option::Option<
8864 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> *mut _cef_domdocument_t,
8865 >,
8866 #[doc = "\n Returns the parent node.\n"]
8867 pub get_parent: ::std::option::Option<
8868 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> *mut _cef_domnode_t,
8869 >,
8870 #[doc = "\n Returns the previous sibling node.\n"]
8871 pub get_previous_sibling: ::std::option::Option<
8872 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> *mut _cef_domnode_t,
8873 >,
8874 #[doc = "\n Returns the next sibling node.\n"]
8875 pub get_next_sibling: ::std::option::Option<
8876 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> *mut _cef_domnode_t,
8877 >,
8878 #[doc = "\n Returns true (1) if this node has child nodes.\n"]
8879 pub has_children: ::std::option::Option<
8880 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> ::std::os::raw::c_int,
8881 >,
8882 #[doc = "\n Return the first child node.\n"]
8883 pub get_first_child: ::std::option::Option<
8884 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> *mut _cef_domnode_t,
8885 >,
8886 #[doc = "\n Returns the last child node.\n"]
8887 pub get_last_child: ::std::option::Option<
8888 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> *mut _cef_domnode_t,
8889 >,
8890 #[doc = "\n Returns the tag name of this element.\n"]
8891 pub get_element_tag_name: ::std::option::Option<
8892 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> cef_string_userfree_t,
8893 >,
8894 #[doc = "\n Returns true (1) if this element has attributes.\n"]
8895 pub has_element_attributes: ::std::option::Option<
8896 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> ::std::os::raw::c_int,
8897 >,
8898 #[doc = "\n Returns true (1) if this element has an attribute named |attrName|.\n"]
8899 pub has_element_attribute: ::std::option::Option<
8900 unsafe extern "C" fn(
8901 self_: *mut _cef_domnode_t,
8902 attrName: *const cef_string_t,
8903 ) -> ::std::os::raw::c_int,
8904 >,
8905 #[doc = "\n Returns the element attribute named |attrName|.\n"]
8906 pub get_element_attribute: ::std::option::Option<
8907 unsafe extern "C" fn(
8908 self_: *mut _cef_domnode_t,
8909 attrName: *const cef_string_t,
8910 ) -> cef_string_userfree_t,
8911 >,
8912 #[doc = "\n Returns a map of all element attributes.\n"]
8913 pub get_element_attributes: ::std::option::Option<
8914 unsafe extern "C" fn(self_: *mut _cef_domnode_t, attrMap: cef_string_map_t),
8915 >,
8916 #[doc = "\n Set the value for the element attribute named |attrName|. Returns true (1)\n on success.\n"]
8917 pub set_element_attribute: ::std::option::Option<
8918 unsafe extern "C" fn(
8919 self_: *mut _cef_domnode_t,
8920 attrName: *const cef_string_t,
8921 value: *const cef_string_t,
8922 ) -> ::std::os::raw::c_int,
8923 >,
8924 #[doc = "\n Returns the inner text of the element.\n"]
8925 pub get_element_inner_text: ::std::option::Option<
8926 unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> cef_string_userfree_t,
8927 >,
8928 #[doc = "\n Returns the bounds of the element in device pixels. Use\n \"window.devicePixelRatio\" to convert to/from CSS pixels.\n"]
8929 pub get_element_bounds:
8930 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_domnode_t) -> cef_rect_t>,
8931}
8932#[test]
8933fn bindgen_test_layout__cef_domnode_t() {
8934 const UNINIT: ::std::mem::MaybeUninit<_cef_domnode_t> = ::std::mem::MaybeUninit::uninit();
8935 let ptr = UNINIT.as_ptr();
8936 assert_eq!(
8937 ::std::mem::size_of::<_cef_domnode_t>(),
8938 248usize,
8939 concat!("Size of: ", stringify!(_cef_domnode_t))
8940 );
8941 assert_eq!(
8942 ::std::mem::align_of::<_cef_domnode_t>(),
8943 8usize,
8944 concat!("Alignment of ", stringify!(_cef_domnode_t))
8945 );
8946 assert_eq!(
8947 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
8948 0usize,
8949 concat!(
8950 "Offset of field: ",
8951 stringify!(_cef_domnode_t),
8952 "::",
8953 stringify!(base)
8954 )
8955 );
8956 assert_eq!(
8957 unsafe { ::std::ptr::addr_of!((*ptr).get_type) as usize - ptr as usize },
8958 40usize,
8959 concat!(
8960 "Offset of field: ",
8961 stringify!(_cef_domnode_t),
8962 "::",
8963 stringify!(get_type)
8964 )
8965 );
8966 assert_eq!(
8967 unsafe { ::std::ptr::addr_of!((*ptr).is_text) as usize - ptr as usize },
8968 48usize,
8969 concat!(
8970 "Offset of field: ",
8971 stringify!(_cef_domnode_t),
8972 "::",
8973 stringify!(is_text)
8974 )
8975 );
8976 assert_eq!(
8977 unsafe { ::std::ptr::addr_of!((*ptr).is_element) as usize - ptr as usize },
8978 56usize,
8979 concat!(
8980 "Offset of field: ",
8981 stringify!(_cef_domnode_t),
8982 "::",
8983 stringify!(is_element)
8984 )
8985 );
8986 assert_eq!(
8987 unsafe { ::std::ptr::addr_of!((*ptr).is_editable) as usize - ptr as usize },
8988 64usize,
8989 concat!(
8990 "Offset of field: ",
8991 stringify!(_cef_domnode_t),
8992 "::",
8993 stringify!(is_editable)
8994 )
8995 );
8996 assert_eq!(
8997 unsafe { ::std::ptr::addr_of!((*ptr).is_form_control_element) as usize - ptr as usize },
8998 72usize,
8999 concat!(
9000 "Offset of field: ",
9001 stringify!(_cef_domnode_t),
9002 "::",
9003 stringify!(is_form_control_element)
9004 )
9005 );
9006 assert_eq!(
9007 unsafe {
9008 ::std::ptr::addr_of!((*ptr).get_form_control_element_type) as usize - ptr as usize
9009 },
9010 80usize,
9011 concat!(
9012 "Offset of field: ",
9013 stringify!(_cef_domnode_t),
9014 "::",
9015 stringify!(get_form_control_element_type)
9016 )
9017 );
9018 assert_eq!(
9019 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
9020 88usize,
9021 concat!(
9022 "Offset of field: ",
9023 stringify!(_cef_domnode_t),
9024 "::",
9025 stringify!(is_same)
9026 )
9027 );
9028 assert_eq!(
9029 unsafe { ::std::ptr::addr_of!((*ptr).get_name) as usize - ptr as usize },
9030 96usize,
9031 concat!(
9032 "Offset of field: ",
9033 stringify!(_cef_domnode_t),
9034 "::",
9035 stringify!(get_name)
9036 )
9037 );
9038 assert_eq!(
9039 unsafe { ::std::ptr::addr_of!((*ptr).get_value) as usize - ptr as usize },
9040 104usize,
9041 concat!(
9042 "Offset of field: ",
9043 stringify!(_cef_domnode_t),
9044 "::",
9045 stringify!(get_value)
9046 )
9047 );
9048 assert_eq!(
9049 unsafe { ::std::ptr::addr_of!((*ptr).set_value) as usize - ptr as usize },
9050 112usize,
9051 concat!(
9052 "Offset of field: ",
9053 stringify!(_cef_domnode_t),
9054 "::",
9055 stringify!(set_value)
9056 )
9057 );
9058 assert_eq!(
9059 unsafe { ::std::ptr::addr_of!((*ptr).get_as_markup) as usize - ptr as usize },
9060 120usize,
9061 concat!(
9062 "Offset of field: ",
9063 stringify!(_cef_domnode_t),
9064 "::",
9065 stringify!(get_as_markup)
9066 )
9067 );
9068 assert_eq!(
9069 unsafe { ::std::ptr::addr_of!((*ptr).get_document) as usize - ptr as usize },
9070 128usize,
9071 concat!(
9072 "Offset of field: ",
9073 stringify!(_cef_domnode_t),
9074 "::",
9075 stringify!(get_document)
9076 )
9077 );
9078 assert_eq!(
9079 unsafe { ::std::ptr::addr_of!((*ptr).get_parent) as usize - ptr as usize },
9080 136usize,
9081 concat!(
9082 "Offset of field: ",
9083 stringify!(_cef_domnode_t),
9084 "::",
9085 stringify!(get_parent)
9086 )
9087 );
9088 assert_eq!(
9089 unsafe { ::std::ptr::addr_of!((*ptr).get_previous_sibling) as usize - ptr as usize },
9090 144usize,
9091 concat!(
9092 "Offset of field: ",
9093 stringify!(_cef_domnode_t),
9094 "::",
9095 stringify!(get_previous_sibling)
9096 )
9097 );
9098 assert_eq!(
9099 unsafe { ::std::ptr::addr_of!((*ptr).get_next_sibling) as usize - ptr as usize },
9100 152usize,
9101 concat!(
9102 "Offset of field: ",
9103 stringify!(_cef_domnode_t),
9104 "::",
9105 stringify!(get_next_sibling)
9106 )
9107 );
9108 assert_eq!(
9109 unsafe { ::std::ptr::addr_of!((*ptr).has_children) as usize - ptr as usize },
9110 160usize,
9111 concat!(
9112 "Offset of field: ",
9113 stringify!(_cef_domnode_t),
9114 "::",
9115 stringify!(has_children)
9116 )
9117 );
9118 assert_eq!(
9119 unsafe { ::std::ptr::addr_of!((*ptr).get_first_child) as usize - ptr as usize },
9120 168usize,
9121 concat!(
9122 "Offset of field: ",
9123 stringify!(_cef_domnode_t),
9124 "::",
9125 stringify!(get_first_child)
9126 )
9127 );
9128 assert_eq!(
9129 unsafe { ::std::ptr::addr_of!((*ptr).get_last_child) as usize - ptr as usize },
9130 176usize,
9131 concat!(
9132 "Offset of field: ",
9133 stringify!(_cef_domnode_t),
9134 "::",
9135 stringify!(get_last_child)
9136 )
9137 );
9138 assert_eq!(
9139 unsafe { ::std::ptr::addr_of!((*ptr).get_element_tag_name) as usize - ptr as usize },
9140 184usize,
9141 concat!(
9142 "Offset of field: ",
9143 stringify!(_cef_domnode_t),
9144 "::",
9145 stringify!(get_element_tag_name)
9146 )
9147 );
9148 assert_eq!(
9149 unsafe { ::std::ptr::addr_of!((*ptr).has_element_attributes) as usize - ptr as usize },
9150 192usize,
9151 concat!(
9152 "Offset of field: ",
9153 stringify!(_cef_domnode_t),
9154 "::",
9155 stringify!(has_element_attributes)
9156 )
9157 );
9158 assert_eq!(
9159 unsafe { ::std::ptr::addr_of!((*ptr).has_element_attribute) as usize - ptr as usize },
9160 200usize,
9161 concat!(
9162 "Offset of field: ",
9163 stringify!(_cef_domnode_t),
9164 "::",
9165 stringify!(has_element_attribute)
9166 )
9167 );
9168 assert_eq!(
9169 unsafe { ::std::ptr::addr_of!((*ptr).get_element_attribute) as usize - ptr as usize },
9170 208usize,
9171 concat!(
9172 "Offset of field: ",
9173 stringify!(_cef_domnode_t),
9174 "::",
9175 stringify!(get_element_attribute)
9176 )
9177 );
9178 assert_eq!(
9179 unsafe { ::std::ptr::addr_of!((*ptr).get_element_attributes) as usize - ptr as usize },
9180 216usize,
9181 concat!(
9182 "Offset of field: ",
9183 stringify!(_cef_domnode_t),
9184 "::",
9185 stringify!(get_element_attributes)
9186 )
9187 );
9188 assert_eq!(
9189 unsafe { ::std::ptr::addr_of!((*ptr).set_element_attribute) as usize - ptr as usize },
9190 224usize,
9191 concat!(
9192 "Offset of field: ",
9193 stringify!(_cef_domnode_t),
9194 "::",
9195 stringify!(set_element_attribute)
9196 )
9197 );
9198 assert_eq!(
9199 unsafe { ::std::ptr::addr_of!((*ptr).get_element_inner_text) as usize - ptr as usize },
9200 232usize,
9201 concat!(
9202 "Offset of field: ",
9203 stringify!(_cef_domnode_t),
9204 "::",
9205 stringify!(get_element_inner_text)
9206 )
9207 );
9208 assert_eq!(
9209 unsafe { ::std::ptr::addr_of!((*ptr).get_element_bounds) as usize - ptr as usize },
9210 240usize,
9211 concat!(
9212 "Offset of field: ",
9213 stringify!(_cef_domnode_t),
9214 "::",
9215 stringify!(get_element_bounds)
9216 )
9217 );
9218}
9219#[doc = "\n Structure used to represent a DOM node. The functions of this structure\n should only be called on the render process main thread.\n"]
9220pub type cef_domnode_t = _cef_domnode_t;
9221#[doc = "\n Structure that wraps platform-dependent share memory region mapping.\n"]
9222#[repr(C)]
9223#[derive(Debug, Copy, Clone)]
9224pub struct _cef_shared_memory_region_t {
9225 #[doc = "\n Base structure.\n"]
9226 pub base: cef_base_ref_counted_t,
9227 #[doc = "\n Returns true (1) if the mapping is valid.\n"]
9228 pub is_valid: ::std::option::Option<
9229 unsafe extern "C" fn(self_: *mut _cef_shared_memory_region_t) -> ::std::os::raw::c_int,
9230 >,
9231 #[doc = "\n Returns the size of the mapping in bytes. Returns 0 for invalid instances.\n"]
9232 pub size: ::std::option::Option<
9233 unsafe extern "C" fn(self_: *mut _cef_shared_memory_region_t) -> usize,
9234 >,
9235 #[doc = "\n Returns the pointer to the memory. Returns nullptr for invalid instances.\n The returned pointer is only valid for the life span of this object.\n"]
9236 pub memory: ::std::option::Option<
9237 unsafe extern "C" fn(
9238 self_: *mut _cef_shared_memory_region_t,
9239 ) -> *const ::std::os::raw::c_void,
9240 >,
9241}
9242#[test]
9243fn bindgen_test_layout__cef_shared_memory_region_t() {
9244 const UNINIT: ::std::mem::MaybeUninit<_cef_shared_memory_region_t> =
9245 ::std::mem::MaybeUninit::uninit();
9246 let ptr = UNINIT.as_ptr();
9247 assert_eq!(
9248 ::std::mem::size_of::<_cef_shared_memory_region_t>(),
9249 64usize,
9250 concat!("Size of: ", stringify!(_cef_shared_memory_region_t))
9251 );
9252 assert_eq!(
9253 ::std::mem::align_of::<_cef_shared_memory_region_t>(),
9254 8usize,
9255 concat!("Alignment of ", stringify!(_cef_shared_memory_region_t))
9256 );
9257 assert_eq!(
9258 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
9259 0usize,
9260 concat!(
9261 "Offset of field: ",
9262 stringify!(_cef_shared_memory_region_t),
9263 "::",
9264 stringify!(base)
9265 )
9266 );
9267 assert_eq!(
9268 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
9269 40usize,
9270 concat!(
9271 "Offset of field: ",
9272 stringify!(_cef_shared_memory_region_t),
9273 "::",
9274 stringify!(is_valid)
9275 )
9276 );
9277 assert_eq!(
9278 unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
9279 48usize,
9280 concat!(
9281 "Offset of field: ",
9282 stringify!(_cef_shared_memory_region_t),
9283 "::",
9284 stringify!(size)
9285 )
9286 );
9287 assert_eq!(
9288 unsafe { ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize },
9289 56usize,
9290 concat!(
9291 "Offset of field: ",
9292 stringify!(_cef_shared_memory_region_t),
9293 "::",
9294 stringify!(memory)
9295 )
9296 );
9297}
9298#[doc = "\n Structure that wraps platform-dependent share memory region mapping.\n"]
9299pub type cef_shared_memory_region_t = _cef_shared_memory_region_t;
9300#[doc = "\n Structure representing a message. Can be used on any process and thread.\n"]
9301#[repr(C)]
9302#[derive(Debug, Copy, Clone)]
9303pub struct _cef_process_message_t {
9304 #[doc = "\n Base structure.\n"]
9305 pub base: cef_base_ref_counted_t,
9306 #[doc = "\n Returns true (1) if this object is valid. Do not call any other functions\n if this function returns false (0).\n"]
9307 pub is_valid: ::std::option::Option<
9308 unsafe extern "C" fn(self_: *mut _cef_process_message_t) -> ::std::os::raw::c_int,
9309 >,
9310 #[doc = "\n Returns true (1) if the values of this object are read-only. Some APIs may\n expose read-only objects.\n"]
9311 pub is_read_only: ::std::option::Option<
9312 unsafe extern "C" fn(self_: *mut _cef_process_message_t) -> ::std::os::raw::c_int,
9313 >,
9314 #[doc = "\n Returns a writable copy of this object. Returns nullptr when message\n contains a shared memory region.\n"]
9315 pub copy: ::std::option::Option<
9316 unsafe extern "C" fn(self_: *mut _cef_process_message_t) -> *mut _cef_process_message_t,
9317 >,
9318 #[doc = "\n Returns the message name.\n"]
9319 pub get_name: ::std::option::Option<
9320 unsafe extern "C" fn(self_: *mut _cef_process_message_t) -> cef_string_userfree_t,
9321 >,
9322 #[doc = "\n Returns the list of arguments. Returns nullptr when message contains a\n shared memory region.\n"]
9323 pub get_argument_list: ::std::option::Option<
9324 unsafe extern "C" fn(self_: *mut _cef_process_message_t) -> *mut _cef_list_value_t,
9325 >,
9326 #[doc = "\n Returns the shared memory region. Returns nullptr when message contains an\n argument list.\n"]
9327 pub get_shared_memory_region: ::std::option::Option<
9328 unsafe extern "C" fn(
9329 self_: *mut _cef_process_message_t,
9330 ) -> *mut _cef_shared_memory_region_t,
9331 >,
9332}
9333#[test]
9334fn bindgen_test_layout__cef_process_message_t() {
9335 const UNINIT: ::std::mem::MaybeUninit<_cef_process_message_t> =
9336 ::std::mem::MaybeUninit::uninit();
9337 let ptr = UNINIT.as_ptr();
9338 assert_eq!(
9339 ::std::mem::size_of::<_cef_process_message_t>(),
9340 88usize,
9341 concat!("Size of: ", stringify!(_cef_process_message_t))
9342 );
9343 assert_eq!(
9344 ::std::mem::align_of::<_cef_process_message_t>(),
9345 8usize,
9346 concat!("Alignment of ", stringify!(_cef_process_message_t))
9347 );
9348 assert_eq!(
9349 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
9350 0usize,
9351 concat!(
9352 "Offset of field: ",
9353 stringify!(_cef_process_message_t),
9354 "::",
9355 stringify!(base)
9356 )
9357 );
9358 assert_eq!(
9359 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
9360 40usize,
9361 concat!(
9362 "Offset of field: ",
9363 stringify!(_cef_process_message_t),
9364 "::",
9365 stringify!(is_valid)
9366 )
9367 );
9368 assert_eq!(
9369 unsafe { ::std::ptr::addr_of!((*ptr).is_read_only) as usize - ptr as usize },
9370 48usize,
9371 concat!(
9372 "Offset of field: ",
9373 stringify!(_cef_process_message_t),
9374 "::",
9375 stringify!(is_read_only)
9376 )
9377 );
9378 assert_eq!(
9379 unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize },
9380 56usize,
9381 concat!(
9382 "Offset of field: ",
9383 stringify!(_cef_process_message_t),
9384 "::",
9385 stringify!(copy)
9386 )
9387 );
9388 assert_eq!(
9389 unsafe { ::std::ptr::addr_of!((*ptr).get_name) as usize - ptr as usize },
9390 64usize,
9391 concat!(
9392 "Offset of field: ",
9393 stringify!(_cef_process_message_t),
9394 "::",
9395 stringify!(get_name)
9396 )
9397 );
9398 assert_eq!(
9399 unsafe { ::std::ptr::addr_of!((*ptr).get_argument_list) as usize - ptr as usize },
9400 72usize,
9401 concat!(
9402 "Offset of field: ",
9403 stringify!(_cef_process_message_t),
9404 "::",
9405 stringify!(get_argument_list)
9406 )
9407 );
9408 assert_eq!(
9409 unsafe { ::std::ptr::addr_of!((*ptr).get_shared_memory_region) as usize - ptr as usize },
9410 80usize,
9411 concat!(
9412 "Offset of field: ",
9413 stringify!(_cef_process_message_t),
9414 "::",
9415 stringify!(get_shared_memory_region)
9416 )
9417 );
9418}
9419#[doc = "\n Structure representing a message. Can be used on any process and thread.\n"]
9420pub type cef_process_message_t = _cef_process_message_t;
9421extern "C" {
9422 #[doc = "\n Create a new cef_process_message_t object with the specified name.\n"]
9423 pub fn cef_process_message_create(name: *const cef_string_t) -> *mut cef_process_message_t;
9424}
9425#[doc = "\n Structure used to represent a web request. The functions of this structure\n may be called on any thread.\n"]
9426#[repr(C)]
9427#[derive(Debug, Copy, Clone)]
9428pub struct _cef_request_t {
9429 #[doc = "\n Base structure.\n"]
9430 pub base: cef_base_ref_counted_t,
9431 #[doc = "\n Returns true (1) if this object is read-only.\n"]
9432 pub is_read_only: ::std::option::Option<
9433 unsafe extern "C" fn(self_: *mut _cef_request_t) -> ::std::os::raw::c_int,
9434 >,
9435 #[doc = "\n Get the fully qualified URL.\n"]
9436 pub get_url: ::std::option::Option<
9437 unsafe extern "C" fn(self_: *mut _cef_request_t) -> cef_string_userfree_t,
9438 >,
9439 #[doc = "\n Set the fully qualified URL.\n"]
9440 pub set_url: ::std::option::Option<
9441 unsafe extern "C" fn(self_: *mut _cef_request_t, url: *const cef_string_t),
9442 >,
9443 #[doc = "\n Get the request function type. The value will default to POST if post data\n is provided and GET otherwise.\n"]
9444 pub get_method: ::std::option::Option<
9445 unsafe extern "C" fn(self_: *mut _cef_request_t) -> cef_string_userfree_t,
9446 >,
9447 #[doc = "\n Set the request function type.\n"]
9448 pub set_method: ::std::option::Option<
9449 unsafe extern "C" fn(self_: *mut _cef_request_t, method: *const cef_string_t),
9450 >,
9451 #[doc = "\n Set the referrer URL and policy. If non-NULL the referrer URL must be\n fully qualified with an HTTP or HTTPS scheme component. Any username,\n password or ref component will be removed.\n"]
9452 pub set_referrer: ::std::option::Option<
9453 unsafe extern "C" fn(
9454 self_: *mut _cef_request_t,
9455 referrer_url: *const cef_string_t,
9456 policy: cef_referrer_policy_t,
9457 ),
9458 >,
9459 #[doc = "\n Get the referrer URL.\n"]
9460 pub get_referrer_url: ::std::option::Option<
9461 unsafe extern "C" fn(self_: *mut _cef_request_t) -> cef_string_userfree_t,
9462 >,
9463 #[doc = "\n Get the referrer policy.\n"]
9464 pub get_referrer_policy: ::std::option::Option<
9465 unsafe extern "C" fn(self_: *mut _cef_request_t) -> cef_referrer_policy_t,
9466 >,
9467 #[doc = "\n Get the post data.\n"]
9468 pub get_post_data: ::std::option::Option<
9469 unsafe extern "C" fn(self_: *mut _cef_request_t) -> *mut _cef_post_data_t,
9470 >,
9471 #[doc = "\n Set the post data.\n"]
9472 pub set_post_data: ::std::option::Option<
9473 unsafe extern "C" fn(self_: *mut _cef_request_t, postData: *mut _cef_post_data_t),
9474 >,
9475 #[doc = "\n Get the header values. Will not include the Referer value if any.\n"]
9476 pub get_header_map: ::std::option::Option<
9477 unsafe extern "C" fn(self_: *mut _cef_request_t, headerMap: cef_string_multimap_t),
9478 >,
9479 #[doc = "\n Set the header values. If a Referer value exists in the header map it will\n be removed and ignored.\n"]
9480 pub set_header_map: ::std::option::Option<
9481 unsafe extern "C" fn(self_: *mut _cef_request_t, headerMap: cef_string_multimap_t),
9482 >,
9483 #[doc = "\n Returns the first header value for |name| or an NULL string if not found.\n Will not return the Referer value if any. Use GetHeaderMap instead if\n |name| might have multiple values.\n"]
9484 pub get_header_by_name: ::std::option::Option<
9485 unsafe extern "C" fn(
9486 self_: *mut _cef_request_t,
9487 name: *const cef_string_t,
9488 ) -> cef_string_userfree_t,
9489 >,
9490 #[doc = "\n Set the header |name| to |value|. If |overwrite| is true (1) any existing\n values will be replaced with the new value. If |overwrite| is false (0)\n any existing values will not be overwritten. The Referer value cannot be\n set using this function.\n"]
9491 pub set_header_by_name: ::std::option::Option<
9492 unsafe extern "C" fn(
9493 self_: *mut _cef_request_t,
9494 name: *const cef_string_t,
9495 value: *const cef_string_t,
9496 overwrite: ::std::os::raw::c_int,
9497 ),
9498 >,
9499 #[doc = "\n Set all values at one time.\n"]
9500 pub set: ::std::option::Option<
9501 unsafe extern "C" fn(
9502 self_: *mut _cef_request_t,
9503 url: *const cef_string_t,
9504 method: *const cef_string_t,
9505 postData: *mut _cef_post_data_t,
9506 headerMap: cef_string_multimap_t,
9507 ),
9508 >,
9509 #[doc = "\n Get the flags used in combination with cef_urlrequest_t. See\n cef_urlrequest_flags_t for supported values.\n"]
9510 pub get_flags: ::std::option::Option<
9511 unsafe extern "C" fn(self_: *mut _cef_request_t) -> ::std::os::raw::c_int,
9512 >,
9513 #[doc = "\n Set the flags used in combination with cef_urlrequest_t. See\n cef_urlrequest_flags_t for supported values.\n"]
9514 pub set_flags: ::std::option::Option<
9515 unsafe extern "C" fn(self_: *mut _cef_request_t, flags: ::std::os::raw::c_int),
9516 >,
9517 #[doc = "\n Get the URL to the first party for cookies used in combination with\n cef_urlrequest_t.\n"]
9518 pub get_first_party_for_cookies: ::std::option::Option<
9519 unsafe extern "C" fn(self_: *mut _cef_request_t) -> cef_string_userfree_t,
9520 >,
9521 #[doc = "\n Set the URL to the first party for cookies used in combination with\n cef_urlrequest_t.\n"]
9522 pub set_first_party_for_cookies: ::std::option::Option<
9523 unsafe extern "C" fn(self_: *mut _cef_request_t, url: *const cef_string_t),
9524 >,
9525 #[doc = "\n Get the resource type for this request. Only available in the browser\n process.\n"]
9526 pub get_resource_type: ::std::option::Option<
9527 unsafe extern "C" fn(self_: *mut _cef_request_t) -> cef_resource_type_t,
9528 >,
9529 #[doc = "\n Get the transition type for this request. Only available in the browser\n process and only applies to requests that represent a main frame or sub-\n frame navigation.\n"]
9530 pub get_transition_type: ::std::option::Option<
9531 unsafe extern "C" fn(self_: *mut _cef_request_t) -> cef_transition_type_t,
9532 >,
9533 #[doc = "\n Returns the globally unique identifier for this request or 0 if not\n specified. Can be used by cef_resource_request_handler_t implementations\n in the browser process to track a single request across multiple\n callbacks.\n"]
9534 pub get_identifier:
9535 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_request_t) -> u64>,
9536}
9537#[test]
9538fn bindgen_test_layout__cef_request_t() {
9539 const UNINIT: ::std::mem::MaybeUninit<_cef_request_t> = ::std::mem::MaybeUninit::uninit();
9540 let ptr = UNINIT.as_ptr();
9541 assert_eq!(
9542 ::std::mem::size_of::<_cef_request_t>(),
9543 216usize,
9544 concat!("Size of: ", stringify!(_cef_request_t))
9545 );
9546 assert_eq!(
9547 ::std::mem::align_of::<_cef_request_t>(),
9548 8usize,
9549 concat!("Alignment of ", stringify!(_cef_request_t))
9550 );
9551 assert_eq!(
9552 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
9553 0usize,
9554 concat!(
9555 "Offset of field: ",
9556 stringify!(_cef_request_t),
9557 "::",
9558 stringify!(base)
9559 )
9560 );
9561 assert_eq!(
9562 unsafe { ::std::ptr::addr_of!((*ptr).is_read_only) as usize - ptr as usize },
9563 40usize,
9564 concat!(
9565 "Offset of field: ",
9566 stringify!(_cef_request_t),
9567 "::",
9568 stringify!(is_read_only)
9569 )
9570 );
9571 assert_eq!(
9572 unsafe { ::std::ptr::addr_of!((*ptr).get_url) as usize - ptr as usize },
9573 48usize,
9574 concat!(
9575 "Offset of field: ",
9576 stringify!(_cef_request_t),
9577 "::",
9578 stringify!(get_url)
9579 )
9580 );
9581 assert_eq!(
9582 unsafe { ::std::ptr::addr_of!((*ptr).set_url) as usize - ptr as usize },
9583 56usize,
9584 concat!(
9585 "Offset of field: ",
9586 stringify!(_cef_request_t),
9587 "::",
9588 stringify!(set_url)
9589 )
9590 );
9591 assert_eq!(
9592 unsafe { ::std::ptr::addr_of!((*ptr).get_method) as usize - ptr as usize },
9593 64usize,
9594 concat!(
9595 "Offset of field: ",
9596 stringify!(_cef_request_t),
9597 "::",
9598 stringify!(get_method)
9599 )
9600 );
9601 assert_eq!(
9602 unsafe { ::std::ptr::addr_of!((*ptr).set_method) as usize - ptr as usize },
9603 72usize,
9604 concat!(
9605 "Offset of field: ",
9606 stringify!(_cef_request_t),
9607 "::",
9608 stringify!(set_method)
9609 )
9610 );
9611 assert_eq!(
9612 unsafe { ::std::ptr::addr_of!((*ptr).set_referrer) as usize - ptr as usize },
9613 80usize,
9614 concat!(
9615 "Offset of field: ",
9616 stringify!(_cef_request_t),
9617 "::",
9618 stringify!(set_referrer)
9619 )
9620 );
9621 assert_eq!(
9622 unsafe { ::std::ptr::addr_of!((*ptr).get_referrer_url) as usize - ptr as usize },
9623 88usize,
9624 concat!(
9625 "Offset of field: ",
9626 stringify!(_cef_request_t),
9627 "::",
9628 stringify!(get_referrer_url)
9629 )
9630 );
9631 assert_eq!(
9632 unsafe { ::std::ptr::addr_of!((*ptr).get_referrer_policy) as usize - ptr as usize },
9633 96usize,
9634 concat!(
9635 "Offset of field: ",
9636 stringify!(_cef_request_t),
9637 "::",
9638 stringify!(get_referrer_policy)
9639 )
9640 );
9641 assert_eq!(
9642 unsafe { ::std::ptr::addr_of!((*ptr).get_post_data) as usize - ptr as usize },
9643 104usize,
9644 concat!(
9645 "Offset of field: ",
9646 stringify!(_cef_request_t),
9647 "::",
9648 stringify!(get_post_data)
9649 )
9650 );
9651 assert_eq!(
9652 unsafe { ::std::ptr::addr_of!((*ptr).set_post_data) as usize - ptr as usize },
9653 112usize,
9654 concat!(
9655 "Offset of field: ",
9656 stringify!(_cef_request_t),
9657 "::",
9658 stringify!(set_post_data)
9659 )
9660 );
9661 assert_eq!(
9662 unsafe { ::std::ptr::addr_of!((*ptr).get_header_map) as usize - ptr as usize },
9663 120usize,
9664 concat!(
9665 "Offset of field: ",
9666 stringify!(_cef_request_t),
9667 "::",
9668 stringify!(get_header_map)
9669 )
9670 );
9671 assert_eq!(
9672 unsafe { ::std::ptr::addr_of!((*ptr).set_header_map) as usize - ptr as usize },
9673 128usize,
9674 concat!(
9675 "Offset of field: ",
9676 stringify!(_cef_request_t),
9677 "::",
9678 stringify!(set_header_map)
9679 )
9680 );
9681 assert_eq!(
9682 unsafe { ::std::ptr::addr_of!((*ptr).get_header_by_name) as usize - ptr as usize },
9683 136usize,
9684 concat!(
9685 "Offset of field: ",
9686 stringify!(_cef_request_t),
9687 "::",
9688 stringify!(get_header_by_name)
9689 )
9690 );
9691 assert_eq!(
9692 unsafe { ::std::ptr::addr_of!((*ptr).set_header_by_name) as usize - ptr as usize },
9693 144usize,
9694 concat!(
9695 "Offset of field: ",
9696 stringify!(_cef_request_t),
9697 "::",
9698 stringify!(set_header_by_name)
9699 )
9700 );
9701 assert_eq!(
9702 unsafe { ::std::ptr::addr_of!((*ptr).set) as usize - ptr as usize },
9703 152usize,
9704 concat!(
9705 "Offset of field: ",
9706 stringify!(_cef_request_t),
9707 "::",
9708 stringify!(set)
9709 )
9710 );
9711 assert_eq!(
9712 unsafe { ::std::ptr::addr_of!((*ptr).get_flags) as usize - ptr as usize },
9713 160usize,
9714 concat!(
9715 "Offset of field: ",
9716 stringify!(_cef_request_t),
9717 "::",
9718 stringify!(get_flags)
9719 )
9720 );
9721 assert_eq!(
9722 unsafe { ::std::ptr::addr_of!((*ptr).set_flags) as usize - ptr as usize },
9723 168usize,
9724 concat!(
9725 "Offset of field: ",
9726 stringify!(_cef_request_t),
9727 "::",
9728 stringify!(set_flags)
9729 )
9730 );
9731 assert_eq!(
9732 unsafe { ::std::ptr::addr_of!((*ptr).get_first_party_for_cookies) as usize - ptr as usize },
9733 176usize,
9734 concat!(
9735 "Offset of field: ",
9736 stringify!(_cef_request_t),
9737 "::",
9738 stringify!(get_first_party_for_cookies)
9739 )
9740 );
9741 assert_eq!(
9742 unsafe { ::std::ptr::addr_of!((*ptr).set_first_party_for_cookies) as usize - ptr as usize },
9743 184usize,
9744 concat!(
9745 "Offset of field: ",
9746 stringify!(_cef_request_t),
9747 "::",
9748 stringify!(set_first_party_for_cookies)
9749 )
9750 );
9751 assert_eq!(
9752 unsafe { ::std::ptr::addr_of!((*ptr).get_resource_type) as usize - ptr as usize },
9753 192usize,
9754 concat!(
9755 "Offset of field: ",
9756 stringify!(_cef_request_t),
9757 "::",
9758 stringify!(get_resource_type)
9759 )
9760 );
9761 assert_eq!(
9762 unsafe { ::std::ptr::addr_of!((*ptr).get_transition_type) as usize - ptr as usize },
9763 200usize,
9764 concat!(
9765 "Offset of field: ",
9766 stringify!(_cef_request_t),
9767 "::",
9768 stringify!(get_transition_type)
9769 )
9770 );
9771 assert_eq!(
9772 unsafe { ::std::ptr::addr_of!((*ptr).get_identifier) as usize - ptr as usize },
9773 208usize,
9774 concat!(
9775 "Offset of field: ",
9776 stringify!(_cef_request_t),
9777 "::",
9778 stringify!(get_identifier)
9779 )
9780 );
9781}
9782#[doc = "\n Structure used to represent a web request. The functions of this structure\n may be called on any thread.\n"]
9783pub type cef_request_t = _cef_request_t;
9784extern "C" {
9785 #[doc = "\n Create a new cef_request_t object.\n"]
9786 pub fn cef_request_create() -> *mut cef_request_t;
9787}
9788#[doc = "\n Structure used to represent post data for a web request. The functions of\n this structure may be called on any thread.\n"]
9789#[repr(C)]
9790#[derive(Debug, Copy, Clone)]
9791pub struct _cef_post_data_t {
9792 #[doc = "\n Base structure.\n"]
9793 pub base: cef_base_ref_counted_t,
9794 #[doc = "\n Returns true (1) if this object is read-only.\n"]
9795 pub is_read_only: ::std::option::Option<
9796 unsafe extern "C" fn(self_: *mut _cef_post_data_t) -> ::std::os::raw::c_int,
9797 >,
9798 #[doc = "\n Returns true (1) if the underlying POST data includes elements that are\n not represented by this cef_post_data_t object (for example, multi-part\n file upload data). Modifying cef_post_data_t objects with excluded\n elements may result in the request failing.\n"]
9799 pub has_excluded_elements: ::std::option::Option<
9800 unsafe extern "C" fn(self_: *mut _cef_post_data_t) -> ::std::os::raw::c_int,
9801 >,
9802 #[doc = "\n Returns the number of existing post data elements.\n"]
9803 pub get_element_count:
9804 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_post_data_t) -> usize>,
9805 #[doc = "\n Retrieve the post data elements.\n"]
9806 pub get_elements: ::std::option::Option<
9807 unsafe extern "C" fn(
9808 self_: *mut _cef_post_data_t,
9809 elementsCount: *mut usize,
9810 elements: *mut *mut _cef_post_data_element_t,
9811 ),
9812 >,
9813 #[doc = "\n Remove the specified post data element. Returns true (1) if the removal\n succeeds.\n"]
9814 pub remove_element: ::std::option::Option<
9815 unsafe extern "C" fn(
9816 self_: *mut _cef_post_data_t,
9817 element: *mut _cef_post_data_element_t,
9818 ) -> ::std::os::raw::c_int,
9819 >,
9820 #[doc = "\n Add the specified post data element. Returns true (1) if the add\n succeeds.\n"]
9821 pub add_element: ::std::option::Option<
9822 unsafe extern "C" fn(
9823 self_: *mut _cef_post_data_t,
9824 element: *mut _cef_post_data_element_t,
9825 ) -> ::std::os::raw::c_int,
9826 >,
9827 #[doc = "\n Remove all existing post data elements.\n"]
9828 pub remove_elements: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_post_data_t)>,
9829}
9830#[test]
9831fn bindgen_test_layout__cef_post_data_t() {
9832 const UNINIT: ::std::mem::MaybeUninit<_cef_post_data_t> = ::std::mem::MaybeUninit::uninit();
9833 let ptr = UNINIT.as_ptr();
9834 assert_eq!(
9835 ::std::mem::size_of::<_cef_post_data_t>(),
9836 96usize,
9837 concat!("Size of: ", stringify!(_cef_post_data_t))
9838 );
9839 assert_eq!(
9840 ::std::mem::align_of::<_cef_post_data_t>(),
9841 8usize,
9842 concat!("Alignment of ", stringify!(_cef_post_data_t))
9843 );
9844 assert_eq!(
9845 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
9846 0usize,
9847 concat!(
9848 "Offset of field: ",
9849 stringify!(_cef_post_data_t),
9850 "::",
9851 stringify!(base)
9852 )
9853 );
9854 assert_eq!(
9855 unsafe { ::std::ptr::addr_of!((*ptr).is_read_only) as usize - ptr as usize },
9856 40usize,
9857 concat!(
9858 "Offset of field: ",
9859 stringify!(_cef_post_data_t),
9860 "::",
9861 stringify!(is_read_only)
9862 )
9863 );
9864 assert_eq!(
9865 unsafe { ::std::ptr::addr_of!((*ptr).has_excluded_elements) as usize - ptr as usize },
9866 48usize,
9867 concat!(
9868 "Offset of field: ",
9869 stringify!(_cef_post_data_t),
9870 "::",
9871 stringify!(has_excluded_elements)
9872 )
9873 );
9874 assert_eq!(
9875 unsafe { ::std::ptr::addr_of!((*ptr).get_element_count) as usize - ptr as usize },
9876 56usize,
9877 concat!(
9878 "Offset of field: ",
9879 stringify!(_cef_post_data_t),
9880 "::",
9881 stringify!(get_element_count)
9882 )
9883 );
9884 assert_eq!(
9885 unsafe { ::std::ptr::addr_of!((*ptr).get_elements) as usize - ptr as usize },
9886 64usize,
9887 concat!(
9888 "Offset of field: ",
9889 stringify!(_cef_post_data_t),
9890 "::",
9891 stringify!(get_elements)
9892 )
9893 );
9894 assert_eq!(
9895 unsafe { ::std::ptr::addr_of!((*ptr).remove_element) as usize - ptr as usize },
9896 72usize,
9897 concat!(
9898 "Offset of field: ",
9899 stringify!(_cef_post_data_t),
9900 "::",
9901 stringify!(remove_element)
9902 )
9903 );
9904 assert_eq!(
9905 unsafe { ::std::ptr::addr_of!((*ptr).add_element) as usize - ptr as usize },
9906 80usize,
9907 concat!(
9908 "Offset of field: ",
9909 stringify!(_cef_post_data_t),
9910 "::",
9911 stringify!(add_element)
9912 )
9913 );
9914 assert_eq!(
9915 unsafe { ::std::ptr::addr_of!((*ptr).remove_elements) as usize - ptr as usize },
9916 88usize,
9917 concat!(
9918 "Offset of field: ",
9919 stringify!(_cef_post_data_t),
9920 "::",
9921 stringify!(remove_elements)
9922 )
9923 );
9924}
9925#[doc = "\n Structure used to represent post data for a web request. The functions of\n this structure may be called on any thread.\n"]
9926pub type cef_post_data_t = _cef_post_data_t;
9927extern "C" {
9928 #[doc = "\n Create a new cef_post_data_t object.\n"]
9929 pub fn cef_post_data_create() -> *mut cef_post_data_t;
9930}
9931#[doc = "\n Structure used to represent a single element in the request post data. The\n functions of this structure may be called on any thread.\n"]
9932#[repr(C)]
9933#[derive(Debug, Copy, Clone)]
9934pub struct _cef_post_data_element_t {
9935 #[doc = "\n Base structure.\n"]
9936 pub base: cef_base_ref_counted_t,
9937 #[doc = "\n Returns true (1) if this object is read-only.\n"]
9938 pub is_read_only: ::std::option::Option<
9939 unsafe extern "C" fn(self_: *mut _cef_post_data_element_t) -> ::std::os::raw::c_int,
9940 >,
9941 #[doc = "\n Remove all contents from the post data element.\n"]
9942 pub set_to_empty:
9943 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_post_data_element_t)>,
9944 #[doc = "\n The post data element will represent a file.\n"]
9945 pub set_to_file: ::std::option::Option<
9946 unsafe extern "C" fn(self_: *mut _cef_post_data_element_t, fileName: *const cef_string_t),
9947 >,
9948 #[doc = "\n The post data element will represent bytes. The bytes passed in will be\n copied.\n"]
9949 pub set_to_bytes: ::std::option::Option<
9950 unsafe extern "C" fn(
9951 self_: *mut _cef_post_data_element_t,
9952 size: usize,
9953 bytes: *const ::std::os::raw::c_void,
9954 ),
9955 >,
9956 #[doc = "\n Return the type of this post data element.\n"]
9957 pub get_type: ::std::option::Option<
9958 unsafe extern "C" fn(self_: *mut _cef_post_data_element_t) -> cef_postdataelement_type_t,
9959 >,
9960 #[doc = "\n Return the file name.\n"]
9961 pub get_file: ::std::option::Option<
9962 unsafe extern "C" fn(self_: *mut _cef_post_data_element_t) -> cef_string_userfree_t,
9963 >,
9964 #[doc = "\n Return the number of bytes.\n"]
9965 pub get_bytes_count:
9966 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_post_data_element_t) -> usize>,
9967 #[doc = "\n Read up to |size| bytes into |bytes| and return the number of bytes\n actually read.\n"]
9968 pub get_bytes: ::std::option::Option<
9969 unsafe extern "C" fn(
9970 self_: *mut _cef_post_data_element_t,
9971 size: usize,
9972 bytes: *mut ::std::os::raw::c_void,
9973 ) -> usize,
9974 >,
9975}
9976#[test]
9977fn bindgen_test_layout__cef_post_data_element_t() {
9978 const UNINIT: ::std::mem::MaybeUninit<_cef_post_data_element_t> =
9979 ::std::mem::MaybeUninit::uninit();
9980 let ptr = UNINIT.as_ptr();
9981 assert_eq!(
9982 ::std::mem::size_of::<_cef_post_data_element_t>(),
9983 104usize,
9984 concat!("Size of: ", stringify!(_cef_post_data_element_t))
9985 );
9986 assert_eq!(
9987 ::std::mem::align_of::<_cef_post_data_element_t>(),
9988 8usize,
9989 concat!("Alignment of ", stringify!(_cef_post_data_element_t))
9990 );
9991 assert_eq!(
9992 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
9993 0usize,
9994 concat!(
9995 "Offset of field: ",
9996 stringify!(_cef_post_data_element_t),
9997 "::",
9998 stringify!(base)
9999 )
10000 );
10001 assert_eq!(
10002 unsafe { ::std::ptr::addr_of!((*ptr).is_read_only) as usize - ptr as usize },
10003 40usize,
10004 concat!(
10005 "Offset of field: ",
10006 stringify!(_cef_post_data_element_t),
10007 "::",
10008 stringify!(is_read_only)
10009 )
10010 );
10011 assert_eq!(
10012 unsafe { ::std::ptr::addr_of!((*ptr).set_to_empty) as usize - ptr as usize },
10013 48usize,
10014 concat!(
10015 "Offset of field: ",
10016 stringify!(_cef_post_data_element_t),
10017 "::",
10018 stringify!(set_to_empty)
10019 )
10020 );
10021 assert_eq!(
10022 unsafe { ::std::ptr::addr_of!((*ptr).set_to_file) as usize - ptr as usize },
10023 56usize,
10024 concat!(
10025 "Offset of field: ",
10026 stringify!(_cef_post_data_element_t),
10027 "::",
10028 stringify!(set_to_file)
10029 )
10030 );
10031 assert_eq!(
10032 unsafe { ::std::ptr::addr_of!((*ptr).set_to_bytes) as usize - ptr as usize },
10033 64usize,
10034 concat!(
10035 "Offset of field: ",
10036 stringify!(_cef_post_data_element_t),
10037 "::",
10038 stringify!(set_to_bytes)
10039 )
10040 );
10041 assert_eq!(
10042 unsafe { ::std::ptr::addr_of!((*ptr).get_type) as usize - ptr as usize },
10043 72usize,
10044 concat!(
10045 "Offset of field: ",
10046 stringify!(_cef_post_data_element_t),
10047 "::",
10048 stringify!(get_type)
10049 )
10050 );
10051 assert_eq!(
10052 unsafe { ::std::ptr::addr_of!((*ptr).get_file) as usize - ptr as usize },
10053 80usize,
10054 concat!(
10055 "Offset of field: ",
10056 stringify!(_cef_post_data_element_t),
10057 "::",
10058 stringify!(get_file)
10059 )
10060 );
10061 assert_eq!(
10062 unsafe { ::std::ptr::addr_of!((*ptr).get_bytes_count) as usize - ptr as usize },
10063 88usize,
10064 concat!(
10065 "Offset of field: ",
10066 stringify!(_cef_post_data_element_t),
10067 "::",
10068 stringify!(get_bytes_count)
10069 )
10070 );
10071 assert_eq!(
10072 unsafe { ::std::ptr::addr_of!((*ptr).get_bytes) as usize - ptr as usize },
10073 96usize,
10074 concat!(
10075 "Offset of field: ",
10076 stringify!(_cef_post_data_element_t),
10077 "::",
10078 stringify!(get_bytes)
10079 )
10080 );
10081}
10082#[doc = "\n Structure used to represent a single element in the request post data. The\n functions of this structure may be called on any thread.\n"]
10083pub type cef_post_data_element_t = _cef_post_data_element_t;
10084extern "C" {
10085 #[doc = "\n Create a new cef_post_data_element_t object.\n"]
10086 pub fn cef_post_data_element_create() -> *mut cef_post_data_element_t;
10087}
10088#[doc = "\n Implement this structure to receive string values asynchronously.\n"]
10089#[repr(C)]
10090#[derive(Debug, Copy, Clone)]
10091pub struct _cef_string_visitor_t {
10092 #[doc = "\n Base structure.\n"]
10093 pub base: cef_base_ref_counted_t,
10094 #[doc = "\n Method that will be executed.\n"]
10095 pub visit: ::std::option::Option<
10096 unsafe extern "C" fn(self_: *mut _cef_string_visitor_t, string: *const cef_string_t),
10097 >,
10098}
10099#[test]
10100fn bindgen_test_layout__cef_string_visitor_t() {
10101 const UNINIT: ::std::mem::MaybeUninit<_cef_string_visitor_t> =
10102 ::std::mem::MaybeUninit::uninit();
10103 let ptr = UNINIT.as_ptr();
10104 assert_eq!(
10105 ::std::mem::size_of::<_cef_string_visitor_t>(),
10106 48usize,
10107 concat!("Size of: ", stringify!(_cef_string_visitor_t))
10108 );
10109 assert_eq!(
10110 ::std::mem::align_of::<_cef_string_visitor_t>(),
10111 8usize,
10112 concat!("Alignment of ", stringify!(_cef_string_visitor_t))
10113 );
10114 assert_eq!(
10115 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
10116 0usize,
10117 concat!(
10118 "Offset of field: ",
10119 stringify!(_cef_string_visitor_t),
10120 "::",
10121 stringify!(base)
10122 )
10123 );
10124 assert_eq!(
10125 unsafe { ::std::ptr::addr_of!((*ptr).visit) as usize - ptr as usize },
10126 40usize,
10127 concat!(
10128 "Offset of field: ",
10129 stringify!(_cef_string_visitor_t),
10130 "::",
10131 stringify!(visit)
10132 )
10133 );
10134}
10135#[doc = "\n Implement this structure to receive string values asynchronously.\n"]
10136pub type cef_string_visitor_t = _cef_string_visitor_t;
10137#[repr(C)]
10138#[derive(Debug, Copy, Clone)]
10139pub struct _cef_urlrequest_client_t {
10140 _unused: [u8; 0],
10141}
10142#[repr(C)]
10143#[derive(Debug, Copy, Clone)]
10144pub struct _cef_urlrequest_t {
10145 _unused: [u8; 0],
10146}
10147#[doc = "\n Structure used to represent a frame in the browser window. When used in the\n browser process the functions of this structure may be called on any thread\n unless otherwise indicated in the comments. When used in the render process\n the functions of this structure may only be called on the main thread.\n"]
10148#[repr(C)]
10149#[derive(Debug, Copy, Clone)]
10150pub struct _cef_frame_t {
10151 #[doc = "\n Base structure.\n"]
10152 pub base: cef_base_ref_counted_t,
10153 #[doc = "\n True if this object is currently attached to a valid frame.\n"]
10154 pub is_valid: ::std::option::Option<
10155 unsafe extern "C" fn(self_: *mut _cef_frame_t) -> ::std::os::raw::c_int,
10156 >,
10157 #[doc = "\n Execute undo in this frame.\n"]
10158 pub undo: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
10159 #[doc = "\n Execute redo in this frame.\n"]
10160 pub redo: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
10161 #[doc = "\n Execute cut in this frame.\n"]
10162 pub cut: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
10163 #[doc = "\n Execute copy in this frame.\n"]
10164 pub copy: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
10165 #[doc = "\n Execute paste in this frame.\n"]
10166 pub paste: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
10167 #[doc = "\n Execute delete in this frame.\n"]
10168 pub del: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
10169 #[doc = "\n Execute select all in this frame.\n"]
10170 pub select_all: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
10171 #[doc = "\n Save this frame's HTML source to a temporary file and open it in the\n default text viewing application. This function can only be called from\n the browser process.\n"]
10172 pub view_source: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
10173 #[doc = "\n Retrieve this frame's HTML source as a string sent to the specified\n visitor.\n"]
10174 pub get_source: ::std::option::Option<
10175 unsafe extern "C" fn(self_: *mut _cef_frame_t, visitor: *mut _cef_string_visitor_t),
10176 >,
10177 #[doc = "\n Retrieve this frame's display text as a string sent to the specified\n visitor.\n"]
10178 pub get_text: ::std::option::Option<
10179 unsafe extern "C" fn(self_: *mut _cef_frame_t, visitor: *mut _cef_string_visitor_t),
10180 >,
10181 #[doc = "\n Load the request represented by the |request| object.\n\n WARNING: This function will fail with \"bad IPC message\" reason\n INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request\n origin using some other mechanism (LoadURL, link click, etc).\n"]
10182 pub load_request: ::std::option::Option<
10183 unsafe extern "C" fn(self_: *mut _cef_frame_t, request: *mut _cef_request_t),
10184 >,
10185 #[doc = "\n Load the specified |url|.\n"]
10186 pub load_url: ::std::option::Option<
10187 unsafe extern "C" fn(self_: *mut _cef_frame_t, url: *const cef_string_t),
10188 >,
10189 #[doc = "\n Execute a string of JavaScript code in this frame. The |script_url|\n parameter is the URL where the script in question can be found, if any.\n The renderer may request this URL to show the developer the source of the\n error. The |start_line| parameter is the base line number to use for\n error reporting.\n"]
10190 pub execute_java_script: ::std::option::Option<
10191 unsafe extern "C" fn(
10192 self_: *mut _cef_frame_t,
10193 code: *const cef_string_t,
10194 script_url: *const cef_string_t,
10195 start_line: ::std::os::raw::c_int,
10196 ),
10197 >,
10198 #[doc = "\n Returns true (1) if this is the main (top-level) frame.\n"]
10199 pub is_main: ::std::option::Option<
10200 unsafe extern "C" fn(self_: *mut _cef_frame_t) -> ::std::os::raw::c_int,
10201 >,
10202 #[doc = "\n Returns true (1) if this is the focused frame.\n"]
10203 pub is_focused: ::std::option::Option<
10204 unsafe extern "C" fn(self_: *mut _cef_frame_t) -> ::std::os::raw::c_int,
10205 >,
10206 #[doc = "\n Returns the name for this frame. If the frame has an assigned name (for\n example, set via the iframe \"name\" attribute) then that value will be\n returned. Otherwise a unique name will be constructed based on the frame\n parent hierarchy. The main (top-level) frame will always have an NULL name\n value.\n"]
10207 pub get_name: ::std::option::Option<
10208 unsafe extern "C" fn(self_: *mut _cef_frame_t) -> cef_string_userfree_t,
10209 >,
10210 #[doc = "\n Returns the globally unique identifier for this frame or < 0 if the\n underlying frame does not yet exist.\n"]
10211 pub get_identifier:
10212 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> i64>,
10213 #[doc = "\n Returns the parent of this frame or NULL if this is the main (top-level)\n frame.\n"]
10214 pub get_parent:
10215 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> *mut _cef_frame_t>,
10216 #[doc = "\n Returns the URL currently loaded in this frame.\n"]
10217 pub get_url: ::std::option::Option<
10218 unsafe extern "C" fn(self_: *mut _cef_frame_t) -> cef_string_userfree_t,
10219 >,
10220 #[doc = "\n Returns the browser that this frame belongs to.\n"]
10221 pub get_browser: ::std::option::Option<
10222 unsafe extern "C" fn(self_: *mut _cef_frame_t) -> *mut _cef_browser_t,
10223 >,
10224 #[doc = "\n Get the V8 context associated with the frame. This function can only be\n called from the render process.\n"]
10225 pub get_v8context: ::std::option::Option<
10226 unsafe extern "C" fn(self_: *mut _cef_frame_t) -> *mut _cef_v8context_t,
10227 >,
10228 #[doc = "\n Visit the DOM document. This function can only be called from the render\n process.\n"]
10229 pub visit_dom: ::std::option::Option<
10230 unsafe extern "C" fn(self_: *mut _cef_frame_t, visitor: *mut _cef_domvisitor_t),
10231 >,
10232 #[doc = "\n Create a new URL request that will be treated as originating from this\n frame and the associated browser. Use cef_urlrequest_t::Create instead if\n you do not want the request to have this association, in which case it may\n be handled differently (see documentation on that function). A request\n created with this function may only originate from the browser process,\n and will behave as follows:\n - It may be intercepted by the client via CefResourceRequestHandler or\n CefSchemeHandlerFactory.\n - POST data may only contain a single element of type PDE_TYPE_FILE or\n PDE_TYPE_BYTES.\n\n The |request| object will be marked as read-only after calling this\n function.\n"]
10233 pub create_urlrequest: ::std::option::Option<
10234 unsafe extern "C" fn(
10235 self_: *mut _cef_frame_t,
10236 request: *mut _cef_request_t,
10237 client: *mut _cef_urlrequest_client_t,
10238 ) -> *mut _cef_urlrequest_t,
10239 >,
10240 #[doc = "\n Send a message to the specified |target_process|. Ownership of the message\n contents will be transferred and the |message| reference will be\n invalidated. Message delivery is not guaranteed in all cases (for example,\n if the browser is closing, navigating, or if the target process crashes).\n Send an ACK message back from the target process if confirmation is\n required.\n"]
10241 pub send_process_message: ::std::option::Option<
10242 unsafe extern "C" fn(
10243 self_: *mut _cef_frame_t,
10244 target_process: cef_process_id_t,
10245 message: *mut _cef_process_message_t,
10246 ),
10247 >,
10248}
10249#[test]
10250fn bindgen_test_layout__cef_frame_t() {
10251 const UNINIT: ::std::mem::MaybeUninit<_cef_frame_t> = ::std::mem::MaybeUninit::uninit();
10252 let ptr = UNINIT.as_ptr();
10253 assert_eq!(
10254 ::std::mem::size_of::<_cef_frame_t>(),
10255 240usize,
10256 concat!("Size of: ", stringify!(_cef_frame_t))
10257 );
10258 assert_eq!(
10259 ::std::mem::align_of::<_cef_frame_t>(),
10260 8usize,
10261 concat!("Alignment of ", stringify!(_cef_frame_t))
10262 );
10263 assert_eq!(
10264 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
10265 0usize,
10266 concat!(
10267 "Offset of field: ",
10268 stringify!(_cef_frame_t),
10269 "::",
10270 stringify!(base)
10271 )
10272 );
10273 assert_eq!(
10274 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
10275 40usize,
10276 concat!(
10277 "Offset of field: ",
10278 stringify!(_cef_frame_t),
10279 "::",
10280 stringify!(is_valid)
10281 )
10282 );
10283 assert_eq!(
10284 unsafe { ::std::ptr::addr_of!((*ptr).undo) as usize - ptr as usize },
10285 48usize,
10286 concat!(
10287 "Offset of field: ",
10288 stringify!(_cef_frame_t),
10289 "::",
10290 stringify!(undo)
10291 )
10292 );
10293 assert_eq!(
10294 unsafe { ::std::ptr::addr_of!((*ptr).redo) as usize - ptr as usize },
10295 56usize,
10296 concat!(
10297 "Offset of field: ",
10298 stringify!(_cef_frame_t),
10299 "::",
10300 stringify!(redo)
10301 )
10302 );
10303 assert_eq!(
10304 unsafe { ::std::ptr::addr_of!((*ptr).cut) as usize - ptr as usize },
10305 64usize,
10306 concat!(
10307 "Offset of field: ",
10308 stringify!(_cef_frame_t),
10309 "::",
10310 stringify!(cut)
10311 )
10312 );
10313 assert_eq!(
10314 unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize },
10315 72usize,
10316 concat!(
10317 "Offset of field: ",
10318 stringify!(_cef_frame_t),
10319 "::",
10320 stringify!(copy)
10321 )
10322 );
10323 assert_eq!(
10324 unsafe { ::std::ptr::addr_of!((*ptr).paste) as usize - ptr as usize },
10325 80usize,
10326 concat!(
10327 "Offset of field: ",
10328 stringify!(_cef_frame_t),
10329 "::",
10330 stringify!(paste)
10331 )
10332 );
10333 assert_eq!(
10334 unsafe { ::std::ptr::addr_of!((*ptr).del) as usize - ptr as usize },
10335 88usize,
10336 concat!(
10337 "Offset of field: ",
10338 stringify!(_cef_frame_t),
10339 "::",
10340 stringify!(del)
10341 )
10342 );
10343 assert_eq!(
10344 unsafe { ::std::ptr::addr_of!((*ptr).select_all) as usize - ptr as usize },
10345 96usize,
10346 concat!(
10347 "Offset of field: ",
10348 stringify!(_cef_frame_t),
10349 "::",
10350 stringify!(select_all)
10351 )
10352 );
10353 assert_eq!(
10354 unsafe { ::std::ptr::addr_of!((*ptr).view_source) as usize - ptr as usize },
10355 104usize,
10356 concat!(
10357 "Offset of field: ",
10358 stringify!(_cef_frame_t),
10359 "::",
10360 stringify!(view_source)
10361 )
10362 );
10363 assert_eq!(
10364 unsafe { ::std::ptr::addr_of!((*ptr).get_source) as usize - ptr as usize },
10365 112usize,
10366 concat!(
10367 "Offset of field: ",
10368 stringify!(_cef_frame_t),
10369 "::",
10370 stringify!(get_source)
10371 )
10372 );
10373 assert_eq!(
10374 unsafe { ::std::ptr::addr_of!((*ptr).get_text) as usize - ptr as usize },
10375 120usize,
10376 concat!(
10377 "Offset of field: ",
10378 stringify!(_cef_frame_t),
10379 "::",
10380 stringify!(get_text)
10381 )
10382 );
10383 assert_eq!(
10384 unsafe { ::std::ptr::addr_of!((*ptr).load_request) as usize - ptr as usize },
10385 128usize,
10386 concat!(
10387 "Offset of field: ",
10388 stringify!(_cef_frame_t),
10389 "::",
10390 stringify!(load_request)
10391 )
10392 );
10393 assert_eq!(
10394 unsafe { ::std::ptr::addr_of!((*ptr).load_url) as usize - ptr as usize },
10395 136usize,
10396 concat!(
10397 "Offset of field: ",
10398 stringify!(_cef_frame_t),
10399 "::",
10400 stringify!(load_url)
10401 )
10402 );
10403 assert_eq!(
10404 unsafe { ::std::ptr::addr_of!((*ptr).execute_java_script) as usize - ptr as usize },
10405 144usize,
10406 concat!(
10407 "Offset of field: ",
10408 stringify!(_cef_frame_t),
10409 "::",
10410 stringify!(execute_java_script)
10411 )
10412 );
10413 assert_eq!(
10414 unsafe { ::std::ptr::addr_of!((*ptr).is_main) as usize - ptr as usize },
10415 152usize,
10416 concat!(
10417 "Offset of field: ",
10418 stringify!(_cef_frame_t),
10419 "::",
10420 stringify!(is_main)
10421 )
10422 );
10423 assert_eq!(
10424 unsafe { ::std::ptr::addr_of!((*ptr).is_focused) as usize - ptr as usize },
10425 160usize,
10426 concat!(
10427 "Offset of field: ",
10428 stringify!(_cef_frame_t),
10429 "::",
10430 stringify!(is_focused)
10431 )
10432 );
10433 assert_eq!(
10434 unsafe { ::std::ptr::addr_of!((*ptr).get_name) as usize - ptr as usize },
10435 168usize,
10436 concat!(
10437 "Offset of field: ",
10438 stringify!(_cef_frame_t),
10439 "::",
10440 stringify!(get_name)
10441 )
10442 );
10443 assert_eq!(
10444 unsafe { ::std::ptr::addr_of!((*ptr).get_identifier) as usize - ptr as usize },
10445 176usize,
10446 concat!(
10447 "Offset of field: ",
10448 stringify!(_cef_frame_t),
10449 "::",
10450 stringify!(get_identifier)
10451 )
10452 );
10453 assert_eq!(
10454 unsafe { ::std::ptr::addr_of!((*ptr).get_parent) as usize - ptr as usize },
10455 184usize,
10456 concat!(
10457 "Offset of field: ",
10458 stringify!(_cef_frame_t),
10459 "::",
10460 stringify!(get_parent)
10461 )
10462 );
10463 assert_eq!(
10464 unsafe { ::std::ptr::addr_of!((*ptr).get_url) as usize - ptr as usize },
10465 192usize,
10466 concat!(
10467 "Offset of field: ",
10468 stringify!(_cef_frame_t),
10469 "::",
10470 stringify!(get_url)
10471 )
10472 );
10473 assert_eq!(
10474 unsafe { ::std::ptr::addr_of!((*ptr).get_browser) as usize - ptr as usize },
10475 200usize,
10476 concat!(
10477 "Offset of field: ",
10478 stringify!(_cef_frame_t),
10479 "::",
10480 stringify!(get_browser)
10481 )
10482 );
10483 assert_eq!(
10484 unsafe { ::std::ptr::addr_of!((*ptr).get_v8context) as usize - ptr as usize },
10485 208usize,
10486 concat!(
10487 "Offset of field: ",
10488 stringify!(_cef_frame_t),
10489 "::",
10490 stringify!(get_v8context)
10491 )
10492 );
10493 assert_eq!(
10494 unsafe { ::std::ptr::addr_of!((*ptr).visit_dom) as usize - ptr as usize },
10495 216usize,
10496 concat!(
10497 "Offset of field: ",
10498 stringify!(_cef_frame_t),
10499 "::",
10500 stringify!(visit_dom)
10501 )
10502 );
10503 assert_eq!(
10504 unsafe { ::std::ptr::addr_of!((*ptr).create_urlrequest) as usize - ptr as usize },
10505 224usize,
10506 concat!(
10507 "Offset of field: ",
10508 stringify!(_cef_frame_t),
10509 "::",
10510 stringify!(create_urlrequest)
10511 )
10512 );
10513 assert_eq!(
10514 unsafe { ::std::ptr::addr_of!((*ptr).send_process_message) as usize - ptr as usize },
10515 232usize,
10516 concat!(
10517 "Offset of field: ",
10518 stringify!(_cef_frame_t),
10519 "::",
10520 stringify!(send_process_message)
10521 )
10522 );
10523}
10524#[doc = "\n Structure used to represent a frame in the browser window. When used in the\n browser process the functions of this structure may be called on any thread\n unless otherwise indicated in the comments. When used in the render process\n the functions of this structure may only be called on the main thread.\n"]
10525pub type cef_frame_t = _cef_frame_t;
10526#[doc = "\n Structure representing the issuer or subject field of an X.509 certificate.\n"]
10527#[repr(C)]
10528#[derive(Debug, Copy, Clone)]
10529pub struct _cef_x509cert_principal_t {
10530 #[doc = "\n Base structure.\n"]
10531 pub base: cef_base_ref_counted_t,
10532 #[doc = "\n Returns a name that can be used to represent the issuer. It tries in this\n order: Common Name (CN), Organization Name (O) and Organizational Unit\n Name (OU) and returns the first non-NULL one found.\n"]
10533 pub get_display_name: ::std::option::Option<
10534 unsafe extern "C" fn(self_: *mut _cef_x509cert_principal_t) -> cef_string_userfree_t,
10535 >,
10536 #[doc = "\n Returns the common name.\n"]
10537 pub get_common_name: ::std::option::Option<
10538 unsafe extern "C" fn(self_: *mut _cef_x509cert_principal_t) -> cef_string_userfree_t,
10539 >,
10540 #[doc = "\n Returns the locality name.\n"]
10541 pub get_locality_name: ::std::option::Option<
10542 unsafe extern "C" fn(self_: *mut _cef_x509cert_principal_t) -> cef_string_userfree_t,
10543 >,
10544 #[doc = "\n Returns the state or province name.\n"]
10545 pub get_state_or_province_name: ::std::option::Option<
10546 unsafe extern "C" fn(self_: *mut _cef_x509cert_principal_t) -> cef_string_userfree_t,
10547 >,
10548 #[doc = "\n Returns the country name.\n"]
10549 pub get_country_name: ::std::option::Option<
10550 unsafe extern "C" fn(self_: *mut _cef_x509cert_principal_t) -> cef_string_userfree_t,
10551 >,
10552 #[doc = "\n Retrieve the list of organization names.\n"]
10553 pub get_organization_names: ::std::option::Option<
10554 unsafe extern "C" fn(self_: *mut _cef_x509cert_principal_t, names: cef_string_list_t),
10555 >,
10556 #[doc = "\n Retrieve the list of organization unit names.\n"]
10557 pub get_organization_unit_names: ::std::option::Option<
10558 unsafe extern "C" fn(self_: *mut _cef_x509cert_principal_t, names: cef_string_list_t),
10559 >,
10560}
10561#[test]
10562fn bindgen_test_layout__cef_x509cert_principal_t() {
10563 const UNINIT: ::std::mem::MaybeUninit<_cef_x509cert_principal_t> =
10564 ::std::mem::MaybeUninit::uninit();
10565 let ptr = UNINIT.as_ptr();
10566 assert_eq!(
10567 ::std::mem::size_of::<_cef_x509cert_principal_t>(),
10568 96usize,
10569 concat!("Size of: ", stringify!(_cef_x509cert_principal_t))
10570 );
10571 assert_eq!(
10572 ::std::mem::align_of::<_cef_x509cert_principal_t>(),
10573 8usize,
10574 concat!("Alignment of ", stringify!(_cef_x509cert_principal_t))
10575 );
10576 assert_eq!(
10577 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
10578 0usize,
10579 concat!(
10580 "Offset of field: ",
10581 stringify!(_cef_x509cert_principal_t),
10582 "::",
10583 stringify!(base)
10584 )
10585 );
10586 assert_eq!(
10587 unsafe { ::std::ptr::addr_of!((*ptr).get_display_name) as usize - ptr as usize },
10588 40usize,
10589 concat!(
10590 "Offset of field: ",
10591 stringify!(_cef_x509cert_principal_t),
10592 "::",
10593 stringify!(get_display_name)
10594 )
10595 );
10596 assert_eq!(
10597 unsafe { ::std::ptr::addr_of!((*ptr).get_common_name) as usize - ptr as usize },
10598 48usize,
10599 concat!(
10600 "Offset of field: ",
10601 stringify!(_cef_x509cert_principal_t),
10602 "::",
10603 stringify!(get_common_name)
10604 )
10605 );
10606 assert_eq!(
10607 unsafe { ::std::ptr::addr_of!((*ptr).get_locality_name) as usize - ptr as usize },
10608 56usize,
10609 concat!(
10610 "Offset of field: ",
10611 stringify!(_cef_x509cert_principal_t),
10612 "::",
10613 stringify!(get_locality_name)
10614 )
10615 );
10616 assert_eq!(
10617 unsafe { ::std::ptr::addr_of!((*ptr).get_state_or_province_name) as usize - ptr as usize },
10618 64usize,
10619 concat!(
10620 "Offset of field: ",
10621 stringify!(_cef_x509cert_principal_t),
10622 "::",
10623 stringify!(get_state_or_province_name)
10624 )
10625 );
10626 assert_eq!(
10627 unsafe { ::std::ptr::addr_of!((*ptr).get_country_name) as usize - ptr as usize },
10628 72usize,
10629 concat!(
10630 "Offset of field: ",
10631 stringify!(_cef_x509cert_principal_t),
10632 "::",
10633 stringify!(get_country_name)
10634 )
10635 );
10636 assert_eq!(
10637 unsafe { ::std::ptr::addr_of!((*ptr).get_organization_names) as usize - ptr as usize },
10638 80usize,
10639 concat!(
10640 "Offset of field: ",
10641 stringify!(_cef_x509cert_principal_t),
10642 "::",
10643 stringify!(get_organization_names)
10644 )
10645 );
10646 assert_eq!(
10647 unsafe { ::std::ptr::addr_of!((*ptr).get_organization_unit_names) as usize - ptr as usize },
10648 88usize,
10649 concat!(
10650 "Offset of field: ",
10651 stringify!(_cef_x509cert_principal_t),
10652 "::",
10653 stringify!(get_organization_unit_names)
10654 )
10655 );
10656}
10657#[doc = "\n Structure representing the issuer or subject field of an X.509 certificate.\n"]
10658pub type cef_x509cert_principal_t = _cef_x509cert_principal_t;
10659#[doc = "\n Structure representing a X.509 certificate.\n"]
10660#[repr(C)]
10661#[derive(Debug, Copy, Clone)]
10662pub struct _cef_x509certificate_t {
10663 #[doc = "\n Base structure.\n"]
10664 pub base: cef_base_ref_counted_t,
10665 #[doc = "\n Returns the subject of the X.509 certificate. For HTTPS server\n certificates this represents the web server. The common name of the\n subject should match the host name of the web server.\n"]
10666 pub get_subject: ::std::option::Option<
10667 unsafe extern "C" fn(self_: *mut _cef_x509certificate_t) -> *mut _cef_x509cert_principal_t,
10668 >,
10669 #[doc = "\n Returns the issuer of the X.509 certificate.\n"]
10670 pub get_issuer: ::std::option::Option<
10671 unsafe extern "C" fn(self_: *mut _cef_x509certificate_t) -> *mut _cef_x509cert_principal_t,
10672 >,
10673 #[doc = "\n Returns the DER encoded serial number for the X.509 certificate. The value\n possibly includes a leading 00 byte.\n"]
10674 pub get_serial_number: ::std::option::Option<
10675 unsafe extern "C" fn(self_: *mut _cef_x509certificate_t) -> *mut _cef_binary_value_t,
10676 >,
10677 #[doc = "\n Returns the date before which the X.509 certificate is invalid.\n CefBaseTime.GetTimeT() will return 0 if no date was specified.\n"]
10678 pub get_valid_start: ::std::option::Option<
10679 unsafe extern "C" fn(self_: *mut _cef_x509certificate_t) -> cef_basetime_t,
10680 >,
10681 #[doc = "\n Returns the date after which the X.509 certificate is invalid.\n CefBaseTime.GetTimeT() will return 0 if no date was specified.\n"]
10682 pub get_valid_expiry: ::std::option::Option<
10683 unsafe extern "C" fn(self_: *mut _cef_x509certificate_t) -> cef_basetime_t,
10684 >,
10685 #[doc = "\n Returns the DER encoded data for the X.509 certificate.\n"]
10686 pub get_derencoded: ::std::option::Option<
10687 unsafe extern "C" fn(self_: *mut _cef_x509certificate_t) -> *mut _cef_binary_value_t,
10688 >,
10689 #[doc = "\n Returns the PEM encoded data for the X.509 certificate.\n"]
10690 pub get_pemencoded: ::std::option::Option<
10691 unsafe extern "C" fn(self_: *mut _cef_x509certificate_t) -> *mut _cef_binary_value_t,
10692 >,
10693 #[doc = "\n Returns the number of certificates in the issuer chain. If 0, the\n certificate is self-signed.\n"]
10694 pub get_issuer_chain_size:
10695 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_x509certificate_t) -> usize>,
10696 #[doc = "\n Returns the DER encoded data for the certificate issuer chain. If we\n failed to encode a certificate in the chain it is still present in the\n array but is an NULL string.\n"]
10697 pub get_derencoded_issuer_chain: ::std::option::Option<
10698 unsafe extern "C" fn(
10699 self_: *mut _cef_x509certificate_t,
10700 chainCount: *mut usize,
10701 chain: *mut *mut _cef_binary_value_t,
10702 ),
10703 >,
10704 #[doc = "\n Returns the PEM encoded data for the certificate issuer chain. If we\n failed to encode a certificate in the chain it is still present in the\n array but is an NULL string.\n"]
10705 pub get_pemencoded_issuer_chain: ::std::option::Option<
10706 unsafe extern "C" fn(
10707 self_: *mut _cef_x509certificate_t,
10708 chainCount: *mut usize,
10709 chain: *mut *mut _cef_binary_value_t,
10710 ),
10711 >,
10712}
10713#[test]
10714fn bindgen_test_layout__cef_x509certificate_t() {
10715 const UNINIT: ::std::mem::MaybeUninit<_cef_x509certificate_t> =
10716 ::std::mem::MaybeUninit::uninit();
10717 let ptr = UNINIT.as_ptr();
10718 assert_eq!(
10719 ::std::mem::size_of::<_cef_x509certificate_t>(),
10720 120usize,
10721 concat!("Size of: ", stringify!(_cef_x509certificate_t))
10722 );
10723 assert_eq!(
10724 ::std::mem::align_of::<_cef_x509certificate_t>(),
10725 8usize,
10726 concat!("Alignment of ", stringify!(_cef_x509certificate_t))
10727 );
10728 assert_eq!(
10729 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
10730 0usize,
10731 concat!(
10732 "Offset of field: ",
10733 stringify!(_cef_x509certificate_t),
10734 "::",
10735 stringify!(base)
10736 )
10737 );
10738 assert_eq!(
10739 unsafe { ::std::ptr::addr_of!((*ptr).get_subject) as usize - ptr as usize },
10740 40usize,
10741 concat!(
10742 "Offset of field: ",
10743 stringify!(_cef_x509certificate_t),
10744 "::",
10745 stringify!(get_subject)
10746 )
10747 );
10748 assert_eq!(
10749 unsafe { ::std::ptr::addr_of!((*ptr).get_issuer) as usize - ptr as usize },
10750 48usize,
10751 concat!(
10752 "Offset of field: ",
10753 stringify!(_cef_x509certificate_t),
10754 "::",
10755 stringify!(get_issuer)
10756 )
10757 );
10758 assert_eq!(
10759 unsafe { ::std::ptr::addr_of!((*ptr).get_serial_number) as usize - ptr as usize },
10760 56usize,
10761 concat!(
10762 "Offset of field: ",
10763 stringify!(_cef_x509certificate_t),
10764 "::",
10765 stringify!(get_serial_number)
10766 )
10767 );
10768 assert_eq!(
10769 unsafe { ::std::ptr::addr_of!((*ptr).get_valid_start) as usize - ptr as usize },
10770 64usize,
10771 concat!(
10772 "Offset of field: ",
10773 stringify!(_cef_x509certificate_t),
10774 "::",
10775 stringify!(get_valid_start)
10776 )
10777 );
10778 assert_eq!(
10779 unsafe { ::std::ptr::addr_of!((*ptr).get_valid_expiry) as usize - ptr as usize },
10780 72usize,
10781 concat!(
10782 "Offset of field: ",
10783 stringify!(_cef_x509certificate_t),
10784 "::",
10785 stringify!(get_valid_expiry)
10786 )
10787 );
10788 assert_eq!(
10789 unsafe { ::std::ptr::addr_of!((*ptr).get_derencoded) as usize - ptr as usize },
10790 80usize,
10791 concat!(
10792 "Offset of field: ",
10793 stringify!(_cef_x509certificate_t),
10794 "::",
10795 stringify!(get_derencoded)
10796 )
10797 );
10798 assert_eq!(
10799 unsafe { ::std::ptr::addr_of!((*ptr).get_pemencoded) as usize - ptr as usize },
10800 88usize,
10801 concat!(
10802 "Offset of field: ",
10803 stringify!(_cef_x509certificate_t),
10804 "::",
10805 stringify!(get_pemencoded)
10806 )
10807 );
10808 assert_eq!(
10809 unsafe { ::std::ptr::addr_of!((*ptr).get_issuer_chain_size) as usize - ptr as usize },
10810 96usize,
10811 concat!(
10812 "Offset of field: ",
10813 stringify!(_cef_x509certificate_t),
10814 "::",
10815 stringify!(get_issuer_chain_size)
10816 )
10817 );
10818 assert_eq!(
10819 unsafe { ::std::ptr::addr_of!((*ptr).get_derencoded_issuer_chain) as usize - ptr as usize },
10820 104usize,
10821 concat!(
10822 "Offset of field: ",
10823 stringify!(_cef_x509certificate_t),
10824 "::",
10825 stringify!(get_derencoded_issuer_chain)
10826 )
10827 );
10828 assert_eq!(
10829 unsafe { ::std::ptr::addr_of!((*ptr).get_pemencoded_issuer_chain) as usize - ptr as usize },
10830 112usize,
10831 concat!(
10832 "Offset of field: ",
10833 stringify!(_cef_x509certificate_t),
10834 "::",
10835 stringify!(get_pemencoded_issuer_chain)
10836 )
10837 );
10838}
10839#[doc = "\n Structure representing a X.509 certificate.\n"]
10840pub type cef_x509certificate_t = _cef_x509certificate_t;
10841#[doc = "\n Structure representing the SSL information for a navigation entry.\n"]
10842#[repr(C)]
10843#[derive(Debug, Copy, Clone)]
10844pub struct _cef_sslstatus_t {
10845 #[doc = "\n Base structure.\n"]
10846 pub base: cef_base_ref_counted_t,
10847 #[doc = "\n Returns true (1) if the status is related to a secure SSL/TLS connection.\n"]
10848 pub is_secure_connection: ::std::option::Option<
10849 unsafe extern "C" fn(self_: *mut _cef_sslstatus_t) -> ::std::os::raw::c_int,
10850 >,
10851 #[doc = "\n Returns a bitmask containing any and all problems verifying the server\n certificate.\n"]
10852 pub get_cert_status: ::std::option::Option<
10853 unsafe extern "C" fn(self_: *mut _cef_sslstatus_t) -> cef_cert_status_t,
10854 >,
10855 #[doc = "\n Returns the SSL version used for the SSL connection.\n"]
10856 pub get_sslversion: ::std::option::Option<
10857 unsafe extern "C" fn(self_: *mut _cef_sslstatus_t) -> cef_ssl_version_t,
10858 >,
10859 #[doc = "\n Returns a bitmask containing the page security content status.\n"]
10860 pub get_content_status: ::std::option::Option<
10861 unsafe extern "C" fn(self_: *mut _cef_sslstatus_t) -> cef_ssl_content_status_t,
10862 >,
10863 #[doc = "\n Returns the X.509 certificate.\n"]
10864 pub get_x509certificate: ::std::option::Option<
10865 unsafe extern "C" fn(self_: *mut _cef_sslstatus_t) -> *mut _cef_x509certificate_t,
10866 >,
10867}
10868#[test]
10869fn bindgen_test_layout__cef_sslstatus_t() {
10870 const UNINIT: ::std::mem::MaybeUninit<_cef_sslstatus_t> = ::std::mem::MaybeUninit::uninit();
10871 let ptr = UNINIT.as_ptr();
10872 assert_eq!(
10873 ::std::mem::size_of::<_cef_sslstatus_t>(),
10874 80usize,
10875 concat!("Size of: ", stringify!(_cef_sslstatus_t))
10876 );
10877 assert_eq!(
10878 ::std::mem::align_of::<_cef_sslstatus_t>(),
10879 8usize,
10880 concat!("Alignment of ", stringify!(_cef_sslstatus_t))
10881 );
10882 assert_eq!(
10883 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
10884 0usize,
10885 concat!(
10886 "Offset of field: ",
10887 stringify!(_cef_sslstatus_t),
10888 "::",
10889 stringify!(base)
10890 )
10891 );
10892 assert_eq!(
10893 unsafe { ::std::ptr::addr_of!((*ptr).is_secure_connection) as usize - ptr as usize },
10894 40usize,
10895 concat!(
10896 "Offset of field: ",
10897 stringify!(_cef_sslstatus_t),
10898 "::",
10899 stringify!(is_secure_connection)
10900 )
10901 );
10902 assert_eq!(
10903 unsafe { ::std::ptr::addr_of!((*ptr).get_cert_status) as usize - ptr as usize },
10904 48usize,
10905 concat!(
10906 "Offset of field: ",
10907 stringify!(_cef_sslstatus_t),
10908 "::",
10909 stringify!(get_cert_status)
10910 )
10911 );
10912 assert_eq!(
10913 unsafe { ::std::ptr::addr_of!((*ptr).get_sslversion) as usize - ptr as usize },
10914 56usize,
10915 concat!(
10916 "Offset of field: ",
10917 stringify!(_cef_sslstatus_t),
10918 "::",
10919 stringify!(get_sslversion)
10920 )
10921 );
10922 assert_eq!(
10923 unsafe { ::std::ptr::addr_of!((*ptr).get_content_status) as usize - ptr as usize },
10924 64usize,
10925 concat!(
10926 "Offset of field: ",
10927 stringify!(_cef_sslstatus_t),
10928 "::",
10929 stringify!(get_content_status)
10930 )
10931 );
10932 assert_eq!(
10933 unsafe { ::std::ptr::addr_of!((*ptr).get_x509certificate) as usize - ptr as usize },
10934 72usize,
10935 concat!(
10936 "Offset of field: ",
10937 stringify!(_cef_sslstatus_t),
10938 "::",
10939 stringify!(get_x509certificate)
10940 )
10941 );
10942}
10943#[doc = "\n Structure representing the SSL information for a navigation entry.\n"]
10944pub type cef_sslstatus_t = _cef_sslstatus_t;
10945#[doc = "\n Structure used to represent an entry in navigation history.\n"]
10946#[repr(C)]
10947#[derive(Debug, Copy, Clone)]
10948pub struct _cef_navigation_entry_t {
10949 #[doc = "\n Base structure.\n"]
10950 pub base: cef_base_ref_counted_t,
10951 #[doc = "\n Returns true (1) if this object is valid. Do not call any other functions\n if this function returns false (0).\n"]
10952 pub is_valid: ::std::option::Option<
10953 unsafe extern "C" fn(self_: *mut _cef_navigation_entry_t) -> ::std::os::raw::c_int,
10954 >,
10955 #[doc = "\n Returns the actual URL of the page. For some pages this may be data: URL\n or similar. Use get_display_url() to return a display-friendly version.\n"]
10956 pub get_url: ::std::option::Option<
10957 unsafe extern "C" fn(self_: *mut _cef_navigation_entry_t) -> cef_string_userfree_t,
10958 >,
10959 #[doc = "\n Returns a display-friendly version of the URL.\n"]
10960 pub get_display_url: ::std::option::Option<
10961 unsafe extern "C" fn(self_: *mut _cef_navigation_entry_t) -> cef_string_userfree_t,
10962 >,
10963 #[doc = "\n Returns the original URL that was entered by the user before any\n redirects.\n"]
10964 pub get_original_url: ::std::option::Option<
10965 unsafe extern "C" fn(self_: *mut _cef_navigation_entry_t) -> cef_string_userfree_t,
10966 >,
10967 #[doc = "\n Returns the title set by the page. This value may be NULL.\n"]
10968 pub get_title: ::std::option::Option<
10969 unsafe extern "C" fn(self_: *mut _cef_navigation_entry_t) -> cef_string_userfree_t,
10970 >,
10971 #[doc = "\n Returns the transition type which indicates what the user did to move to\n this page from the previous page.\n"]
10972 pub get_transition_type: ::std::option::Option<
10973 unsafe extern "C" fn(self_: *mut _cef_navigation_entry_t) -> cef_transition_type_t,
10974 >,
10975 #[doc = "\n Returns true (1) if this navigation includes post data.\n"]
10976 pub has_post_data: ::std::option::Option<
10977 unsafe extern "C" fn(self_: *mut _cef_navigation_entry_t) -> ::std::os::raw::c_int,
10978 >,
10979 #[doc = "\n Returns the time for the last known successful navigation completion. A\n navigation may be completed more than once if the page is reloaded. May be\n 0 if the navigation has not yet completed.\n"]
10980 pub get_completion_time: ::std::option::Option<
10981 unsafe extern "C" fn(self_: *mut _cef_navigation_entry_t) -> cef_basetime_t,
10982 >,
10983 #[doc = "\n Returns the HTTP status code for the last known successful navigation\n response. May be 0 if the response has not yet been received or if the\n navigation has not yet completed.\n"]
10984 pub get_http_status_code: ::std::option::Option<
10985 unsafe extern "C" fn(self_: *mut _cef_navigation_entry_t) -> ::std::os::raw::c_int,
10986 >,
10987 #[doc = "\n Returns the SSL information for this navigation entry.\n"]
10988 pub get_sslstatus: ::std::option::Option<
10989 unsafe extern "C" fn(self_: *mut _cef_navigation_entry_t) -> *mut _cef_sslstatus_t,
10990 >,
10991}
10992#[test]
10993fn bindgen_test_layout__cef_navigation_entry_t() {
10994 const UNINIT: ::std::mem::MaybeUninit<_cef_navigation_entry_t> =
10995 ::std::mem::MaybeUninit::uninit();
10996 let ptr = UNINIT.as_ptr();
10997 assert_eq!(
10998 ::std::mem::size_of::<_cef_navigation_entry_t>(),
10999 120usize,
11000 concat!("Size of: ", stringify!(_cef_navigation_entry_t))
11001 );
11002 assert_eq!(
11003 ::std::mem::align_of::<_cef_navigation_entry_t>(),
11004 8usize,
11005 concat!("Alignment of ", stringify!(_cef_navigation_entry_t))
11006 );
11007 assert_eq!(
11008 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
11009 0usize,
11010 concat!(
11011 "Offset of field: ",
11012 stringify!(_cef_navigation_entry_t),
11013 "::",
11014 stringify!(base)
11015 )
11016 );
11017 assert_eq!(
11018 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
11019 40usize,
11020 concat!(
11021 "Offset of field: ",
11022 stringify!(_cef_navigation_entry_t),
11023 "::",
11024 stringify!(is_valid)
11025 )
11026 );
11027 assert_eq!(
11028 unsafe { ::std::ptr::addr_of!((*ptr).get_url) as usize - ptr as usize },
11029 48usize,
11030 concat!(
11031 "Offset of field: ",
11032 stringify!(_cef_navigation_entry_t),
11033 "::",
11034 stringify!(get_url)
11035 )
11036 );
11037 assert_eq!(
11038 unsafe { ::std::ptr::addr_of!((*ptr).get_display_url) as usize - ptr as usize },
11039 56usize,
11040 concat!(
11041 "Offset of field: ",
11042 stringify!(_cef_navigation_entry_t),
11043 "::",
11044 stringify!(get_display_url)
11045 )
11046 );
11047 assert_eq!(
11048 unsafe { ::std::ptr::addr_of!((*ptr).get_original_url) as usize - ptr as usize },
11049 64usize,
11050 concat!(
11051 "Offset of field: ",
11052 stringify!(_cef_navigation_entry_t),
11053 "::",
11054 stringify!(get_original_url)
11055 )
11056 );
11057 assert_eq!(
11058 unsafe { ::std::ptr::addr_of!((*ptr).get_title) as usize - ptr as usize },
11059 72usize,
11060 concat!(
11061 "Offset of field: ",
11062 stringify!(_cef_navigation_entry_t),
11063 "::",
11064 stringify!(get_title)
11065 )
11066 );
11067 assert_eq!(
11068 unsafe { ::std::ptr::addr_of!((*ptr).get_transition_type) as usize - ptr as usize },
11069 80usize,
11070 concat!(
11071 "Offset of field: ",
11072 stringify!(_cef_navigation_entry_t),
11073 "::",
11074 stringify!(get_transition_type)
11075 )
11076 );
11077 assert_eq!(
11078 unsafe { ::std::ptr::addr_of!((*ptr).has_post_data) as usize - ptr as usize },
11079 88usize,
11080 concat!(
11081 "Offset of field: ",
11082 stringify!(_cef_navigation_entry_t),
11083 "::",
11084 stringify!(has_post_data)
11085 )
11086 );
11087 assert_eq!(
11088 unsafe { ::std::ptr::addr_of!((*ptr).get_completion_time) as usize - ptr as usize },
11089 96usize,
11090 concat!(
11091 "Offset of field: ",
11092 stringify!(_cef_navigation_entry_t),
11093 "::",
11094 stringify!(get_completion_time)
11095 )
11096 );
11097 assert_eq!(
11098 unsafe { ::std::ptr::addr_of!((*ptr).get_http_status_code) as usize - ptr as usize },
11099 104usize,
11100 concat!(
11101 "Offset of field: ",
11102 stringify!(_cef_navigation_entry_t),
11103 "::",
11104 stringify!(get_http_status_code)
11105 )
11106 );
11107 assert_eq!(
11108 unsafe { ::std::ptr::addr_of!((*ptr).get_sslstatus) as usize - ptr as usize },
11109 112usize,
11110 concat!(
11111 "Offset of field: ",
11112 stringify!(_cef_navigation_entry_t),
11113 "::",
11114 stringify!(get_sslstatus)
11115 )
11116 );
11117}
11118#[doc = "\n Structure used to represent an entry in navigation history.\n"]
11119pub type cef_navigation_entry_t = _cef_navigation_entry_t;
11120#[doc = "\n Generic callback structure used for managing the lifespan of a registration.\n"]
11121#[repr(C)]
11122#[derive(Debug, Copy, Clone)]
11123pub struct _cef_registration_t {
11124 #[doc = "\n Base structure.\n"]
11125 pub base: cef_base_ref_counted_t,
11126}
11127#[test]
11128fn bindgen_test_layout__cef_registration_t() {
11129 const UNINIT: ::std::mem::MaybeUninit<_cef_registration_t> = ::std::mem::MaybeUninit::uninit();
11130 let ptr = UNINIT.as_ptr();
11131 assert_eq!(
11132 ::std::mem::size_of::<_cef_registration_t>(),
11133 40usize,
11134 concat!("Size of: ", stringify!(_cef_registration_t))
11135 );
11136 assert_eq!(
11137 ::std::mem::align_of::<_cef_registration_t>(),
11138 8usize,
11139 concat!("Alignment of ", stringify!(_cef_registration_t))
11140 );
11141 assert_eq!(
11142 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
11143 0usize,
11144 concat!(
11145 "Offset of field: ",
11146 stringify!(_cef_registration_t),
11147 "::",
11148 stringify!(base)
11149 )
11150 );
11151}
11152#[doc = "\n Generic callback structure used for managing the lifespan of a registration.\n"]
11153pub type cef_registration_t = _cef_registration_t;
11154#[doc = "\n Generic callback structure used for asynchronous continuation.\n"]
11155#[repr(C)]
11156#[derive(Debug, Copy, Clone)]
11157pub struct _cef_callback_t {
11158 #[doc = "\n Base structure.\n"]
11159 pub base: cef_base_ref_counted_t,
11160 #[doc = "\n Continue processing.\n"]
11161 pub cont: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_callback_t)>,
11162 #[doc = "\n Cancel processing.\n"]
11163 pub cancel: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_callback_t)>,
11164}
11165#[test]
11166fn bindgen_test_layout__cef_callback_t() {
11167 const UNINIT: ::std::mem::MaybeUninit<_cef_callback_t> = ::std::mem::MaybeUninit::uninit();
11168 let ptr = UNINIT.as_ptr();
11169 assert_eq!(
11170 ::std::mem::size_of::<_cef_callback_t>(),
11171 56usize,
11172 concat!("Size of: ", stringify!(_cef_callback_t))
11173 );
11174 assert_eq!(
11175 ::std::mem::align_of::<_cef_callback_t>(),
11176 8usize,
11177 concat!("Alignment of ", stringify!(_cef_callback_t))
11178 );
11179 assert_eq!(
11180 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
11181 0usize,
11182 concat!(
11183 "Offset of field: ",
11184 stringify!(_cef_callback_t),
11185 "::",
11186 stringify!(base)
11187 )
11188 );
11189 assert_eq!(
11190 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
11191 40usize,
11192 concat!(
11193 "Offset of field: ",
11194 stringify!(_cef_callback_t),
11195 "::",
11196 stringify!(cont)
11197 )
11198 );
11199 assert_eq!(
11200 unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize },
11201 48usize,
11202 concat!(
11203 "Offset of field: ",
11204 stringify!(_cef_callback_t),
11205 "::",
11206 stringify!(cancel)
11207 )
11208 );
11209}
11210#[doc = "\n Generic callback structure used for asynchronous continuation.\n"]
11211pub type cef_callback_t = _cef_callback_t;
11212#[doc = "\n Generic callback structure used for asynchronous completion.\n"]
11213#[repr(C)]
11214#[derive(Debug, Copy, Clone)]
11215pub struct _cef_completion_callback_t {
11216 #[doc = "\n Base structure.\n"]
11217 pub base: cef_base_ref_counted_t,
11218 #[doc = "\n Method that will be called once the task is complete.\n"]
11219 pub on_complete:
11220 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_completion_callback_t)>,
11221}
11222#[test]
11223fn bindgen_test_layout__cef_completion_callback_t() {
11224 const UNINIT: ::std::mem::MaybeUninit<_cef_completion_callback_t> =
11225 ::std::mem::MaybeUninit::uninit();
11226 let ptr = UNINIT.as_ptr();
11227 assert_eq!(
11228 ::std::mem::size_of::<_cef_completion_callback_t>(),
11229 48usize,
11230 concat!("Size of: ", stringify!(_cef_completion_callback_t))
11231 );
11232 assert_eq!(
11233 ::std::mem::align_of::<_cef_completion_callback_t>(),
11234 8usize,
11235 concat!("Alignment of ", stringify!(_cef_completion_callback_t))
11236 );
11237 assert_eq!(
11238 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
11239 0usize,
11240 concat!(
11241 "Offset of field: ",
11242 stringify!(_cef_completion_callback_t),
11243 "::",
11244 stringify!(base)
11245 )
11246 );
11247 assert_eq!(
11248 unsafe { ::std::ptr::addr_of!((*ptr).on_complete) as usize - ptr as usize },
11249 40usize,
11250 concat!(
11251 "Offset of field: ",
11252 stringify!(_cef_completion_callback_t),
11253 "::",
11254 stringify!(on_complete)
11255 )
11256 );
11257}
11258#[doc = "\n Generic callback structure used for asynchronous completion.\n"]
11259pub type cef_completion_callback_t = _cef_completion_callback_t;
11260#[doc = "\n Structure used for managing cookies. The functions of this structure may be\n called on any thread unless otherwise indicated.\n"]
11261#[repr(C)]
11262#[derive(Debug, Copy, Clone)]
11263pub struct _cef_cookie_manager_t {
11264 #[doc = "\n Base structure.\n"]
11265 pub base: cef_base_ref_counted_t,
11266 #[doc = "\n Visit all cookies on the UI thread. The returned cookies are ordered by\n longest path, then by earliest creation date. Returns false (0) if cookies\n cannot be accessed.\n"]
11267 pub visit_all_cookies: ::std::option::Option<
11268 unsafe extern "C" fn(
11269 self_: *mut _cef_cookie_manager_t,
11270 visitor: *mut _cef_cookie_visitor_t,
11271 ) -> ::std::os::raw::c_int,
11272 >,
11273 #[doc = "\n Visit a subset of cookies on the UI thread. The results are filtered by\n the given url scheme, host, domain and path. If |includeHttpOnly| is true\n (1) HTTP-only cookies will also be included in the results. The returned\n cookies are ordered by longest path, then by earliest creation date.\n Returns false (0) if cookies cannot be accessed.\n"]
11274 pub visit_url_cookies: ::std::option::Option<
11275 unsafe extern "C" fn(
11276 self_: *mut _cef_cookie_manager_t,
11277 url: *const cef_string_t,
11278 includeHttpOnly: ::std::os::raw::c_int,
11279 visitor: *mut _cef_cookie_visitor_t,
11280 ) -> ::std::os::raw::c_int,
11281 >,
11282 #[doc = "\n Sets a cookie given a valid URL and explicit user-provided cookie\n attributes. This function expects each attribute to be well-formed. It\n will check for disallowed characters (e.g. the ';' character is disallowed\n within the cookie value attribute) and fail without setting the cookie if\n such characters are found. If |callback| is non-NULL it will be executed\n asnychronously on the UI thread after the cookie has been set. Returns\n false (0) if an invalid URL is specified or if cookies cannot be accessed.\n"]
11283 pub set_cookie: ::std::option::Option<
11284 unsafe extern "C" fn(
11285 self_: *mut _cef_cookie_manager_t,
11286 url: *const cef_string_t,
11287 cookie: *const _cef_cookie_t,
11288 callback: *mut _cef_set_cookie_callback_t,
11289 ) -> ::std::os::raw::c_int,
11290 >,
11291 #[doc = "\n Delete all cookies that match the specified parameters. If both |url| and\n |cookie_name| values are specified all host and domain cookies matching\n both will be deleted. If only |url| is specified all host cookies (but not\n domain cookies) irrespective of path will be deleted. If |url| is NULL all\n cookies for all hosts and domains will be deleted. If |callback| is non-\n NULL it will be executed asnychronously on the UI thread after the cookies\n have been deleted. Returns false (0) if a non-NULL invalid URL is\n specified or if cookies cannot be accessed. Cookies can alternately be\n deleted using the Visit*Cookies() functions.\n"]
11292 pub delete_cookies: ::std::option::Option<
11293 unsafe extern "C" fn(
11294 self_: *mut _cef_cookie_manager_t,
11295 url: *const cef_string_t,
11296 cookie_name: *const cef_string_t,
11297 callback: *mut _cef_delete_cookies_callback_t,
11298 ) -> ::std::os::raw::c_int,
11299 >,
11300 #[doc = "\n Flush the backing store (if any) to disk. If |callback| is non-NULL it\n will be executed asnychronously on the UI thread after the flush is\n complete. Returns false (0) if cookies cannot be accessed.\n"]
11301 pub flush_store: ::std::option::Option<
11302 unsafe extern "C" fn(
11303 self_: *mut _cef_cookie_manager_t,
11304 callback: *mut _cef_completion_callback_t,
11305 ) -> ::std::os::raw::c_int,
11306 >,
11307}
11308#[test]
11309fn bindgen_test_layout__cef_cookie_manager_t() {
11310 const UNINIT: ::std::mem::MaybeUninit<_cef_cookie_manager_t> =
11311 ::std::mem::MaybeUninit::uninit();
11312 let ptr = UNINIT.as_ptr();
11313 assert_eq!(
11314 ::std::mem::size_of::<_cef_cookie_manager_t>(),
11315 80usize,
11316 concat!("Size of: ", stringify!(_cef_cookie_manager_t))
11317 );
11318 assert_eq!(
11319 ::std::mem::align_of::<_cef_cookie_manager_t>(),
11320 8usize,
11321 concat!("Alignment of ", stringify!(_cef_cookie_manager_t))
11322 );
11323 assert_eq!(
11324 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
11325 0usize,
11326 concat!(
11327 "Offset of field: ",
11328 stringify!(_cef_cookie_manager_t),
11329 "::",
11330 stringify!(base)
11331 )
11332 );
11333 assert_eq!(
11334 unsafe { ::std::ptr::addr_of!((*ptr).visit_all_cookies) as usize - ptr as usize },
11335 40usize,
11336 concat!(
11337 "Offset of field: ",
11338 stringify!(_cef_cookie_manager_t),
11339 "::",
11340 stringify!(visit_all_cookies)
11341 )
11342 );
11343 assert_eq!(
11344 unsafe { ::std::ptr::addr_of!((*ptr).visit_url_cookies) as usize - ptr as usize },
11345 48usize,
11346 concat!(
11347 "Offset of field: ",
11348 stringify!(_cef_cookie_manager_t),
11349 "::",
11350 stringify!(visit_url_cookies)
11351 )
11352 );
11353 assert_eq!(
11354 unsafe { ::std::ptr::addr_of!((*ptr).set_cookie) as usize - ptr as usize },
11355 56usize,
11356 concat!(
11357 "Offset of field: ",
11358 stringify!(_cef_cookie_manager_t),
11359 "::",
11360 stringify!(set_cookie)
11361 )
11362 );
11363 assert_eq!(
11364 unsafe { ::std::ptr::addr_of!((*ptr).delete_cookies) as usize - ptr as usize },
11365 64usize,
11366 concat!(
11367 "Offset of field: ",
11368 stringify!(_cef_cookie_manager_t),
11369 "::",
11370 stringify!(delete_cookies)
11371 )
11372 );
11373 assert_eq!(
11374 unsafe { ::std::ptr::addr_of!((*ptr).flush_store) as usize - ptr as usize },
11375 72usize,
11376 concat!(
11377 "Offset of field: ",
11378 stringify!(_cef_cookie_manager_t),
11379 "::",
11380 stringify!(flush_store)
11381 )
11382 );
11383}
11384#[doc = "\n Structure used for managing cookies. The functions of this structure may be\n called on any thread unless otherwise indicated.\n"]
11385pub type cef_cookie_manager_t = _cef_cookie_manager_t;
11386extern "C" {
11387 #[doc = "\n Returns the global cookie manager. By default data will be stored at\n cef_settings_t.cache_path if specified or in memory otherwise. If |callback|\n is non-NULL it will be executed asnychronously on the UI thread after the\n manager's storage has been initialized. Using this function is equivalent to\n calling cef_request_context_t::cef_request_context_get_global_context()->Get\n DefaultCookieManager().\n"]
11388 pub fn cef_cookie_manager_get_global_manager(
11389 callback: *mut _cef_completion_callback_t,
11390 ) -> *mut cef_cookie_manager_t;
11391}
11392#[doc = "\n Structure to implement for visiting cookie values. The functions of this\n structure will always be called on the UI thread.\n"]
11393#[repr(C)]
11394#[derive(Debug, Copy, Clone)]
11395pub struct _cef_cookie_visitor_t {
11396 #[doc = "\n Base structure.\n"]
11397 pub base: cef_base_ref_counted_t,
11398 #[doc = "\n Method that will be called once for each cookie. |count| is the 0-based\n index for the current cookie. |total| is the total number of cookies. Set\n |deleteCookie| to true (1) to delete the cookie currently being visited.\n Return false (0) to stop visiting cookies. This function may never be\n called if no cookies are found.\n"]
11399 pub visit: ::std::option::Option<
11400 unsafe extern "C" fn(
11401 self_: *mut _cef_cookie_visitor_t,
11402 cookie: *const _cef_cookie_t,
11403 count: ::std::os::raw::c_int,
11404 total: ::std::os::raw::c_int,
11405 deleteCookie: *mut ::std::os::raw::c_int,
11406 ) -> ::std::os::raw::c_int,
11407 >,
11408}
11409#[test]
11410fn bindgen_test_layout__cef_cookie_visitor_t() {
11411 const UNINIT: ::std::mem::MaybeUninit<_cef_cookie_visitor_t> =
11412 ::std::mem::MaybeUninit::uninit();
11413 let ptr = UNINIT.as_ptr();
11414 assert_eq!(
11415 ::std::mem::size_of::<_cef_cookie_visitor_t>(),
11416 48usize,
11417 concat!("Size of: ", stringify!(_cef_cookie_visitor_t))
11418 );
11419 assert_eq!(
11420 ::std::mem::align_of::<_cef_cookie_visitor_t>(),
11421 8usize,
11422 concat!("Alignment of ", stringify!(_cef_cookie_visitor_t))
11423 );
11424 assert_eq!(
11425 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
11426 0usize,
11427 concat!(
11428 "Offset of field: ",
11429 stringify!(_cef_cookie_visitor_t),
11430 "::",
11431 stringify!(base)
11432 )
11433 );
11434 assert_eq!(
11435 unsafe { ::std::ptr::addr_of!((*ptr).visit) as usize - ptr as usize },
11436 40usize,
11437 concat!(
11438 "Offset of field: ",
11439 stringify!(_cef_cookie_visitor_t),
11440 "::",
11441 stringify!(visit)
11442 )
11443 );
11444}
11445#[doc = "\n Structure to implement for visiting cookie values. The functions of this\n structure will always be called on the UI thread.\n"]
11446pub type cef_cookie_visitor_t = _cef_cookie_visitor_t;
11447#[doc = "\n Structure to implement to be notified of asynchronous completion via\n cef_cookie_manager_t::set_cookie().\n"]
11448#[repr(C)]
11449#[derive(Debug, Copy, Clone)]
11450pub struct _cef_set_cookie_callback_t {
11451 #[doc = "\n Base structure.\n"]
11452 pub base: cef_base_ref_counted_t,
11453 #[doc = "\n Method that will be called upon completion. |success| will be true (1) if\n the cookie was set successfully.\n"]
11454 pub on_complete: ::std::option::Option<
11455 unsafe extern "C" fn(
11456 self_: *mut _cef_set_cookie_callback_t,
11457 success: ::std::os::raw::c_int,
11458 ),
11459 >,
11460}
11461#[test]
11462fn bindgen_test_layout__cef_set_cookie_callback_t() {
11463 const UNINIT: ::std::mem::MaybeUninit<_cef_set_cookie_callback_t> =
11464 ::std::mem::MaybeUninit::uninit();
11465 let ptr = UNINIT.as_ptr();
11466 assert_eq!(
11467 ::std::mem::size_of::<_cef_set_cookie_callback_t>(),
11468 48usize,
11469 concat!("Size of: ", stringify!(_cef_set_cookie_callback_t))
11470 );
11471 assert_eq!(
11472 ::std::mem::align_of::<_cef_set_cookie_callback_t>(),
11473 8usize,
11474 concat!("Alignment of ", stringify!(_cef_set_cookie_callback_t))
11475 );
11476 assert_eq!(
11477 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
11478 0usize,
11479 concat!(
11480 "Offset of field: ",
11481 stringify!(_cef_set_cookie_callback_t),
11482 "::",
11483 stringify!(base)
11484 )
11485 );
11486 assert_eq!(
11487 unsafe { ::std::ptr::addr_of!((*ptr).on_complete) as usize - ptr as usize },
11488 40usize,
11489 concat!(
11490 "Offset of field: ",
11491 stringify!(_cef_set_cookie_callback_t),
11492 "::",
11493 stringify!(on_complete)
11494 )
11495 );
11496}
11497#[doc = "\n Structure to implement to be notified of asynchronous completion via\n cef_cookie_manager_t::set_cookie().\n"]
11498pub type cef_set_cookie_callback_t = _cef_set_cookie_callback_t;
11499#[doc = "\n Structure to implement to be notified of asynchronous completion via\n cef_cookie_manager_t::delete_cookies().\n"]
11500#[repr(C)]
11501#[derive(Debug, Copy, Clone)]
11502pub struct _cef_delete_cookies_callback_t {
11503 #[doc = "\n Base structure.\n"]
11504 pub base: cef_base_ref_counted_t,
11505 #[doc = "\n Method that will be called upon completion. |num_deleted| will be the\n number of cookies that were deleted.\n"]
11506 pub on_complete: ::std::option::Option<
11507 unsafe extern "C" fn(
11508 self_: *mut _cef_delete_cookies_callback_t,
11509 num_deleted: ::std::os::raw::c_int,
11510 ),
11511 >,
11512}
11513#[test]
11514fn bindgen_test_layout__cef_delete_cookies_callback_t() {
11515 const UNINIT: ::std::mem::MaybeUninit<_cef_delete_cookies_callback_t> =
11516 ::std::mem::MaybeUninit::uninit();
11517 let ptr = UNINIT.as_ptr();
11518 assert_eq!(
11519 ::std::mem::size_of::<_cef_delete_cookies_callback_t>(),
11520 48usize,
11521 concat!("Size of: ", stringify!(_cef_delete_cookies_callback_t))
11522 );
11523 assert_eq!(
11524 ::std::mem::align_of::<_cef_delete_cookies_callback_t>(),
11525 8usize,
11526 concat!("Alignment of ", stringify!(_cef_delete_cookies_callback_t))
11527 );
11528 assert_eq!(
11529 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
11530 0usize,
11531 concat!(
11532 "Offset of field: ",
11533 stringify!(_cef_delete_cookies_callback_t),
11534 "::",
11535 stringify!(base)
11536 )
11537 );
11538 assert_eq!(
11539 unsafe { ::std::ptr::addr_of!((*ptr).on_complete) as usize - ptr as usize },
11540 40usize,
11541 concat!(
11542 "Offset of field: ",
11543 stringify!(_cef_delete_cookies_callback_t),
11544 "::",
11545 stringify!(on_complete)
11546 )
11547 );
11548}
11549#[doc = "\n Structure to implement to be notified of asynchronous completion via\n cef_cookie_manager_t::delete_cookies().\n"]
11550pub type cef_delete_cookies_callback_t = _cef_delete_cookies_callback_t;
11551#[doc = "\n Object representing an extension. Methods may be called on any thread unless\n otherwise indicated.\n"]
11552#[repr(C)]
11553#[derive(Debug, Copy, Clone)]
11554pub struct _cef_extension_t {
11555 #[doc = "\n Base structure.\n"]
11556 pub base: cef_base_ref_counted_t,
11557 #[doc = "\n Returns the unique extension identifier. This is calculated based on the\n extension public key, if available, or on the extension path. See\n https://developer.chrome.com/extensions/manifest/key for details.\n"]
11558 pub get_identifier: ::std::option::Option<
11559 unsafe extern "C" fn(self_: *mut _cef_extension_t) -> cef_string_userfree_t,
11560 >,
11561 #[doc = "\n Returns the absolute path to the extension directory on disk. This value\n will be prefixed with PK_DIR_RESOURCES if a relative path was passed to\n cef_request_context_t::LoadExtension.\n"]
11562 pub get_path: ::std::option::Option<
11563 unsafe extern "C" fn(self_: *mut _cef_extension_t) -> cef_string_userfree_t,
11564 >,
11565 #[doc = "\n Returns the extension manifest contents as a cef_dictionary_value_t\n object. See https://developer.chrome.com/extensions/manifest for details.\n"]
11566 pub get_manifest: ::std::option::Option<
11567 unsafe extern "C" fn(self_: *mut _cef_extension_t) -> *mut _cef_dictionary_value_t,
11568 >,
11569 #[doc = "\n Returns true (1) if this object is the same extension as |that| object.\n Extensions are considered the same if identifier, path and loader context\n match.\n"]
11570 pub is_same: ::std::option::Option<
11571 unsafe extern "C" fn(
11572 self_: *mut _cef_extension_t,
11573 that: *mut _cef_extension_t,
11574 ) -> ::std::os::raw::c_int,
11575 >,
11576 #[doc = "\n Returns the handler for this extension. Will return NULL for internal\n extensions or if no handler was passed to\n cef_request_context_t::LoadExtension.\n"]
11577 pub get_handler: ::std::option::Option<
11578 unsafe extern "C" fn(self_: *mut _cef_extension_t) -> *mut _cef_extension_handler_t,
11579 >,
11580 #[doc = "\n Returns the request context that loaded this extension. Will return NULL\n for internal extensions or if the extension has been unloaded. See the\n cef_request_context_t::LoadExtension documentation for more information\n about loader contexts. Must be called on the browser process UI thread.\n"]
11581 pub get_loader_context: ::std::option::Option<
11582 unsafe extern "C" fn(self_: *mut _cef_extension_t) -> *mut _cef_request_context_t,
11583 >,
11584 #[doc = "\n Returns true (1) if this extension is currently loaded. Must be called on\n the browser process UI thread.\n"]
11585 pub is_loaded: ::std::option::Option<
11586 unsafe extern "C" fn(self_: *mut _cef_extension_t) -> ::std::os::raw::c_int,
11587 >,
11588 #[doc = "\n Unload this extension if it is not an internal extension and is currently\n loaded. Will result in a call to\n cef_extension_handler_t::OnExtensionUnloaded on success.\n"]
11589 pub unload: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_extension_t)>,
11590}
11591#[test]
11592fn bindgen_test_layout__cef_extension_t() {
11593 const UNINIT: ::std::mem::MaybeUninit<_cef_extension_t> = ::std::mem::MaybeUninit::uninit();
11594 let ptr = UNINIT.as_ptr();
11595 assert_eq!(
11596 ::std::mem::size_of::<_cef_extension_t>(),
11597 104usize,
11598 concat!("Size of: ", stringify!(_cef_extension_t))
11599 );
11600 assert_eq!(
11601 ::std::mem::align_of::<_cef_extension_t>(),
11602 8usize,
11603 concat!("Alignment of ", stringify!(_cef_extension_t))
11604 );
11605 assert_eq!(
11606 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
11607 0usize,
11608 concat!(
11609 "Offset of field: ",
11610 stringify!(_cef_extension_t),
11611 "::",
11612 stringify!(base)
11613 )
11614 );
11615 assert_eq!(
11616 unsafe { ::std::ptr::addr_of!((*ptr).get_identifier) as usize - ptr as usize },
11617 40usize,
11618 concat!(
11619 "Offset of field: ",
11620 stringify!(_cef_extension_t),
11621 "::",
11622 stringify!(get_identifier)
11623 )
11624 );
11625 assert_eq!(
11626 unsafe { ::std::ptr::addr_of!((*ptr).get_path) as usize - ptr as usize },
11627 48usize,
11628 concat!(
11629 "Offset of field: ",
11630 stringify!(_cef_extension_t),
11631 "::",
11632 stringify!(get_path)
11633 )
11634 );
11635 assert_eq!(
11636 unsafe { ::std::ptr::addr_of!((*ptr).get_manifest) as usize - ptr as usize },
11637 56usize,
11638 concat!(
11639 "Offset of field: ",
11640 stringify!(_cef_extension_t),
11641 "::",
11642 stringify!(get_manifest)
11643 )
11644 );
11645 assert_eq!(
11646 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
11647 64usize,
11648 concat!(
11649 "Offset of field: ",
11650 stringify!(_cef_extension_t),
11651 "::",
11652 stringify!(is_same)
11653 )
11654 );
11655 assert_eq!(
11656 unsafe { ::std::ptr::addr_of!((*ptr).get_handler) as usize - ptr as usize },
11657 72usize,
11658 concat!(
11659 "Offset of field: ",
11660 stringify!(_cef_extension_t),
11661 "::",
11662 stringify!(get_handler)
11663 )
11664 );
11665 assert_eq!(
11666 unsafe { ::std::ptr::addr_of!((*ptr).get_loader_context) as usize - ptr as usize },
11667 80usize,
11668 concat!(
11669 "Offset of field: ",
11670 stringify!(_cef_extension_t),
11671 "::",
11672 stringify!(get_loader_context)
11673 )
11674 );
11675 assert_eq!(
11676 unsafe { ::std::ptr::addr_of!((*ptr).is_loaded) as usize - ptr as usize },
11677 88usize,
11678 concat!(
11679 "Offset of field: ",
11680 stringify!(_cef_extension_t),
11681 "::",
11682 stringify!(is_loaded)
11683 )
11684 );
11685 assert_eq!(
11686 unsafe { ::std::ptr::addr_of!((*ptr).unload) as usize - ptr as usize },
11687 96usize,
11688 concat!(
11689 "Offset of field: ",
11690 stringify!(_cef_extension_t),
11691 "::",
11692 stringify!(unload)
11693 )
11694 );
11695}
11696#[doc = "\n Object representing an extension. Methods may be called on any thread unless\n otherwise indicated.\n"]
11697pub type cef_extension_t = _cef_extension_t;
11698#[doc = "\n Callback structure used for asynchronous continuation of\n cef_extension_handler_t::GetExtensionResource.\n"]
11699#[repr(C)]
11700#[derive(Debug, Copy, Clone)]
11701pub struct _cef_get_extension_resource_callback_t {
11702 #[doc = "\n Base structure.\n"]
11703 pub base: cef_base_ref_counted_t,
11704 #[doc = "\n Continue the request. Read the resource contents from |stream|.\n"]
11705 pub cont: ::std::option::Option<
11706 unsafe extern "C" fn(
11707 self_: *mut _cef_get_extension_resource_callback_t,
11708 stream: *mut _cef_stream_reader_t,
11709 ),
11710 >,
11711 #[doc = "\n Cancel the request.\n"]
11712 pub cancel: ::std::option::Option<
11713 unsafe extern "C" fn(self_: *mut _cef_get_extension_resource_callback_t),
11714 >,
11715}
11716#[test]
11717fn bindgen_test_layout__cef_get_extension_resource_callback_t() {
11718 const UNINIT: ::std::mem::MaybeUninit<_cef_get_extension_resource_callback_t> =
11719 ::std::mem::MaybeUninit::uninit();
11720 let ptr = UNINIT.as_ptr();
11721 assert_eq!(
11722 ::std::mem::size_of::<_cef_get_extension_resource_callback_t>(),
11723 56usize,
11724 concat!(
11725 "Size of: ",
11726 stringify!(_cef_get_extension_resource_callback_t)
11727 )
11728 );
11729 assert_eq!(
11730 ::std::mem::align_of::<_cef_get_extension_resource_callback_t>(),
11731 8usize,
11732 concat!(
11733 "Alignment of ",
11734 stringify!(_cef_get_extension_resource_callback_t)
11735 )
11736 );
11737 assert_eq!(
11738 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
11739 0usize,
11740 concat!(
11741 "Offset of field: ",
11742 stringify!(_cef_get_extension_resource_callback_t),
11743 "::",
11744 stringify!(base)
11745 )
11746 );
11747 assert_eq!(
11748 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
11749 40usize,
11750 concat!(
11751 "Offset of field: ",
11752 stringify!(_cef_get_extension_resource_callback_t),
11753 "::",
11754 stringify!(cont)
11755 )
11756 );
11757 assert_eq!(
11758 unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize },
11759 48usize,
11760 concat!(
11761 "Offset of field: ",
11762 stringify!(_cef_get_extension_resource_callback_t),
11763 "::",
11764 stringify!(cancel)
11765 )
11766 );
11767}
11768#[doc = "\n Callback structure used for asynchronous continuation of\n cef_extension_handler_t::GetExtensionResource.\n"]
11769pub type cef_get_extension_resource_callback_t = _cef_get_extension_resource_callback_t;
11770#[doc = "\n Implement this structure to handle events related to browser extensions. The\n functions of this structure will be called on the UI thread. See\n cef_request_context_t::LoadExtension for information about extension\n loading.\n"]
11771#[repr(C)]
11772#[derive(Debug, Copy, Clone)]
11773pub struct _cef_extension_handler_t {
11774 #[doc = "\n Base structure.\n"]
11775 pub base: cef_base_ref_counted_t,
11776 #[doc = "\n Called if the cef_request_context_t::LoadExtension request fails. |result|\n will be the error code.\n"]
11777 pub on_extension_load_failed: ::std::option::Option<
11778 unsafe extern "C" fn(self_: *mut _cef_extension_handler_t, result: cef_errorcode_t),
11779 >,
11780 #[doc = "\n Called if the cef_request_context_t::LoadExtension request succeeds.\n |extension| is the loaded extension.\n"]
11781 pub on_extension_loaded: ::std::option::Option<
11782 unsafe extern "C" fn(
11783 self_: *mut _cef_extension_handler_t,
11784 extension: *mut _cef_extension_t,
11785 ),
11786 >,
11787 #[doc = "\n Called after the cef_extension_t::Unload request has completed.\n"]
11788 pub on_extension_unloaded: ::std::option::Option<
11789 unsafe extern "C" fn(
11790 self_: *mut _cef_extension_handler_t,
11791 extension: *mut _cef_extension_t,
11792 ),
11793 >,
11794 #[doc = "\n Called when an extension needs a browser to host a background script\n specified via the \"background\" manifest key. The browser will have no\n visible window and cannot be displayed. |extension| is the extension that\n is loading the background script. |url| is an internally generated\n reference to an HTML page that will be used to load the background script\n via a \"<script>\" src attribute. To allow creation of the browser\n optionally modify |client| and |settings| and return false (0). To cancel\n creation of the browser (and consequently cancel load of the background\n script) return true (1). Successful creation will be indicated by a call\n to cef_life_span_handler_t::OnAfterCreated, and\n cef_browser_host_t::IsBackgroundHost will return true (1) for the\n resulting browser. See https://developer.chrome.com/extensions/event_pages\n for more information about extension background script usage.\n"]
11795 pub on_before_background_browser: ::std::option::Option<
11796 unsafe extern "C" fn(
11797 self_: *mut _cef_extension_handler_t,
11798 extension: *mut _cef_extension_t,
11799 url: *const cef_string_t,
11800 client: *mut *mut _cef_client_t,
11801 settings: *mut _cef_browser_settings_t,
11802 ) -> ::std::os::raw::c_int,
11803 >,
11804 #[doc = "\n Called when an extension API (e.g. chrome.tabs.create) requests creation\n of a new browser. |extension| and |browser| are the source of the API\n call. |active_browser| may optionally be specified via the windowId\n property or returned via the get_active_browser() callback and provides\n the default |client| and |settings| values for the new browser. |index| is\n the position value optionally specified via the index property. |url| is\n the URL that will be loaded in the browser. |active| is true (1) if the\n new browser should be active when opened. To allow creation of the\n browser optionally modify |windowInfo|, |client| and |settings| and return\n false (0). To cancel creation of the browser return true (1). Successful\n creation will be indicated by a call to\n cef_life_span_handler_t::OnAfterCreated. Any modifications to |windowInfo|\n will be ignored if |active_browser| is wrapped in a cef_browser_view_t.\n"]
11805 pub on_before_browser: ::std::option::Option<
11806 unsafe extern "C" fn(
11807 self_: *mut _cef_extension_handler_t,
11808 extension: *mut _cef_extension_t,
11809 browser: *mut _cef_browser_t,
11810 active_browser: *mut _cef_browser_t,
11811 index: ::std::os::raw::c_int,
11812 url: *const cef_string_t,
11813 active: ::std::os::raw::c_int,
11814 windowInfo: *mut _cef_window_info_t,
11815 client: *mut *mut _cef_client_t,
11816 settings: *mut _cef_browser_settings_t,
11817 ) -> ::std::os::raw::c_int,
11818 >,
11819 #[doc = "\n Called when no tabId is specified to an extension API call that accepts a\n tabId parameter (e.g. chrome.tabs.*). |extension| and |browser| are the\n source of the API call. Return the browser that will be acted on by the\n API call or return NULL to act on |browser|. The returned browser must\n share the same cef_request_context_t as |browser|. Incognito browsers\n should not be considered unless the source extension has incognito access\n enabled, in which case |include_incognito| will be true (1).\n"]
11820 pub get_active_browser: ::std::option::Option<
11821 unsafe extern "C" fn(
11822 self_: *mut _cef_extension_handler_t,
11823 extension: *mut _cef_extension_t,
11824 browser: *mut _cef_browser_t,
11825 include_incognito: ::std::os::raw::c_int,
11826 ) -> *mut _cef_browser_t,
11827 >,
11828 #[doc = "\n Called when the tabId associated with |target_browser| is specified to an\n extension API call that accepts a tabId parameter (e.g. chrome.tabs.*).\n |extension| and |browser| are the source of the API call. Return true (1)\n to allow access of false (0) to deny access. Access to incognito browsers\n should not be allowed unless the source extension has incognito access\n enabled, in which case |include_incognito| will be true (1).\n"]
11829 pub can_access_browser: ::std::option::Option<
11830 unsafe extern "C" fn(
11831 self_: *mut _cef_extension_handler_t,
11832 extension: *mut _cef_extension_t,
11833 browser: *mut _cef_browser_t,
11834 include_incognito: ::std::os::raw::c_int,
11835 target_browser: *mut _cef_browser_t,
11836 ) -> ::std::os::raw::c_int,
11837 >,
11838 #[doc = "\n Called to retrieve an extension resource that would normally be loaded\n from disk (e.g. if a file parameter is specified to\n chrome.tabs.executeScript). |extension| and |browser| are the source of\n the resource request. |file| is the requested relative file path. To\n handle the resource request return true (1) and execute |callback| either\n synchronously or asynchronously. For the default behavior which reads the\n resource from the extension directory on disk return false (0).\n Localization substitutions will not be applied to resources handled via\n this function.\n"]
11839 pub get_extension_resource: ::std::option::Option<
11840 unsafe extern "C" fn(
11841 self_: *mut _cef_extension_handler_t,
11842 extension: *mut _cef_extension_t,
11843 browser: *mut _cef_browser_t,
11844 file: *const cef_string_t,
11845 callback: *mut _cef_get_extension_resource_callback_t,
11846 ) -> ::std::os::raw::c_int,
11847 >,
11848}
11849#[test]
11850fn bindgen_test_layout__cef_extension_handler_t() {
11851 const UNINIT: ::std::mem::MaybeUninit<_cef_extension_handler_t> =
11852 ::std::mem::MaybeUninit::uninit();
11853 let ptr = UNINIT.as_ptr();
11854 assert_eq!(
11855 ::std::mem::size_of::<_cef_extension_handler_t>(),
11856 104usize,
11857 concat!("Size of: ", stringify!(_cef_extension_handler_t))
11858 );
11859 assert_eq!(
11860 ::std::mem::align_of::<_cef_extension_handler_t>(),
11861 8usize,
11862 concat!("Alignment of ", stringify!(_cef_extension_handler_t))
11863 );
11864 assert_eq!(
11865 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
11866 0usize,
11867 concat!(
11868 "Offset of field: ",
11869 stringify!(_cef_extension_handler_t),
11870 "::",
11871 stringify!(base)
11872 )
11873 );
11874 assert_eq!(
11875 unsafe { ::std::ptr::addr_of!((*ptr).on_extension_load_failed) as usize - ptr as usize },
11876 40usize,
11877 concat!(
11878 "Offset of field: ",
11879 stringify!(_cef_extension_handler_t),
11880 "::",
11881 stringify!(on_extension_load_failed)
11882 )
11883 );
11884 assert_eq!(
11885 unsafe { ::std::ptr::addr_of!((*ptr).on_extension_loaded) as usize - ptr as usize },
11886 48usize,
11887 concat!(
11888 "Offset of field: ",
11889 stringify!(_cef_extension_handler_t),
11890 "::",
11891 stringify!(on_extension_loaded)
11892 )
11893 );
11894 assert_eq!(
11895 unsafe { ::std::ptr::addr_of!((*ptr).on_extension_unloaded) as usize - ptr as usize },
11896 56usize,
11897 concat!(
11898 "Offset of field: ",
11899 stringify!(_cef_extension_handler_t),
11900 "::",
11901 stringify!(on_extension_unloaded)
11902 )
11903 );
11904 assert_eq!(
11905 unsafe {
11906 ::std::ptr::addr_of!((*ptr).on_before_background_browser) as usize - ptr as usize
11907 },
11908 64usize,
11909 concat!(
11910 "Offset of field: ",
11911 stringify!(_cef_extension_handler_t),
11912 "::",
11913 stringify!(on_before_background_browser)
11914 )
11915 );
11916 assert_eq!(
11917 unsafe { ::std::ptr::addr_of!((*ptr).on_before_browser) as usize - ptr as usize },
11918 72usize,
11919 concat!(
11920 "Offset of field: ",
11921 stringify!(_cef_extension_handler_t),
11922 "::",
11923 stringify!(on_before_browser)
11924 )
11925 );
11926 assert_eq!(
11927 unsafe { ::std::ptr::addr_of!((*ptr).get_active_browser) as usize - ptr as usize },
11928 80usize,
11929 concat!(
11930 "Offset of field: ",
11931 stringify!(_cef_extension_handler_t),
11932 "::",
11933 stringify!(get_active_browser)
11934 )
11935 );
11936 assert_eq!(
11937 unsafe { ::std::ptr::addr_of!((*ptr).can_access_browser) as usize - ptr as usize },
11938 88usize,
11939 concat!(
11940 "Offset of field: ",
11941 stringify!(_cef_extension_handler_t),
11942 "::",
11943 stringify!(can_access_browser)
11944 )
11945 );
11946 assert_eq!(
11947 unsafe { ::std::ptr::addr_of!((*ptr).get_extension_resource) as usize - ptr as usize },
11948 96usize,
11949 concat!(
11950 "Offset of field: ",
11951 stringify!(_cef_extension_handler_t),
11952 "::",
11953 stringify!(get_extension_resource)
11954 )
11955 );
11956}
11957#[doc = "\n Implement this structure to handle events related to browser extensions. The\n functions of this structure will be called on the UI thread. See\n cef_request_context_t::LoadExtension for information about extension\n loading.\n"]
11958pub type cef_extension_handler_t = _cef_extension_handler_t;
11959#[doc = "\n Supports discovery of and communication with media devices on the local\n network via the Cast and DIAL protocols. The functions of this structure may\n be called on any browser process thread unless otherwise indicated.\n"]
11960#[repr(C)]
11961#[derive(Debug, Copy, Clone)]
11962pub struct _cef_media_router_t {
11963 #[doc = "\n Base structure.\n"]
11964 pub base: cef_base_ref_counted_t,
11965 #[doc = "\n Add an observer for MediaRouter events. The observer will remain\n registered until the returned Registration object is destroyed.\n"]
11966 pub add_observer: ::std::option::Option<
11967 unsafe extern "C" fn(
11968 self_: *mut _cef_media_router_t,
11969 observer: *mut _cef_media_observer_t,
11970 ) -> *mut _cef_registration_t,
11971 >,
11972 #[doc = "\n Returns a MediaSource object for the specified media source URN. Supported\n URN schemes include \"cast:\" and \"dial:\", and will be already known by the\n client application (e.g. \"cast:<appId>?clientId=<clientId>\").\n"]
11973 pub get_source: ::std::option::Option<
11974 unsafe extern "C" fn(
11975 self_: *mut _cef_media_router_t,
11976 urn: *const cef_string_t,
11977 ) -> *mut _cef_media_source_t,
11978 >,
11979 #[doc = "\n Trigger an asynchronous call to cef_media_observer_t::OnSinks on all\n registered observers.\n"]
11980 pub notify_current_sinks:
11981 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_media_router_t)>,
11982 #[doc = "\n Create a new route between |source| and |sink|. Source and sink must be\n valid, compatible (as reported by cef_media_sink_t::IsCompatibleWith), and\n a route between them must not already exist. |callback| will be executed\n on success or failure. If route creation succeeds it will also trigger an\n asynchronous call to cef_media_observer_t::OnRoutes on all registered\n observers.\n"]
11983 pub create_route: ::std::option::Option<
11984 unsafe extern "C" fn(
11985 self_: *mut _cef_media_router_t,
11986 source: *mut _cef_media_source_t,
11987 sink: *mut _cef_media_sink_t,
11988 callback: *mut _cef_media_route_create_callback_t,
11989 ),
11990 >,
11991 #[doc = "\n Trigger an asynchronous call to cef_media_observer_t::OnRoutes on all\n registered observers.\n"]
11992 pub notify_current_routes:
11993 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_media_router_t)>,
11994}
11995#[test]
11996fn bindgen_test_layout__cef_media_router_t() {
11997 const UNINIT: ::std::mem::MaybeUninit<_cef_media_router_t> = ::std::mem::MaybeUninit::uninit();
11998 let ptr = UNINIT.as_ptr();
11999 assert_eq!(
12000 ::std::mem::size_of::<_cef_media_router_t>(),
12001 80usize,
12002 concat!("Size of: ", stringify!(_cef_media_router_t))
12003 );
12004 assert_eq!(
12005 ::std::mem::align_of::<_cef_media_router_t>(),
12006 8usize,
12007 concat!("Alignment of ", stringify!(_cef_media_router_t))
12008 );
12009 assert_eq!(
12010 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
12011 0usize,
12012 concat!(
12013 "Offset of field: ",
12014 stringify!(_cef_media_router_t),
12015 "::",
12016 stringify!(base)
12017 )
12018 );
12019 assert_eq!(
12020 unsafe { ::std::ptr::addr_of!((*ptr).add_observer) as usize - ptr as usize },
12021 40usize,
12022 concat!(
12023 "Offset of field: ",
12024 stringify!(_cef_media_router_t),
12025 "::",
12026 stringify!(add_observer)
12027 )
12028 );
12029 assert_eq!(
12030 unsafe { ::std::ptr::addr_of!((*ptr).get_source) as usize - ptr as usize },
12031 48usize,
12032 concat!(
12033 "Offset of field: ",
12034 stringify!(_cef_media_router_t),
12035 "::",
12036 stringify!(get_source)
12037 )
12038 );
12039 assert_eq!(
12040 unsafe { ::std::ptr::addr_of!((*ptr).notify_current_sinks) as usize - ptr as usize },
12041 56usize,
12042 concat!(
12043 "Offset of field: ",
12044 stringify!(_cef_media_router_t),
12045 "::",
12046 stringify!(notify_current_sinks)
12047 )
12048 );
12049 assert_eq!(
12050 unsafe { ::std::ptr::addr_of!((*ptr).create_route) as usize - ptr as usize },
12051 64usize,
12052 concat!(
12053 "Offset of field: ",
12054 stringify!(_cef_media_router_t),
12055 "::",
12056 stringify!(create_route)
12057 )
12058 );
12059 assert_eq!(
12060 unsafe { ::std::ptr::addr_of!((*ptr).notify_current_routes) as usize - ptr as usize },
12061 72usize,
12062 concat!(
12063 "Offset of field: ",
12064 stringify!(_cef_media_router_t),
12065 "::",
12066 stringify!(notify_current_routes)
12067 )
12068 );
12069}
12070#[doc = "\n Supports discovery of and communication with media devices on the local\n network via the Cast and DIAL protocols. The functions of this structure may\n be called on any browser process thread unless otherwise indicated.\n"]
12071pub type cef_media_router_t = _cef_media_router_t;
12072extern "C" {
12073 #[doc = "\n Returns the MediaRouter object associated with the global request context.\n If |callback| is non-NULL it will be executed asnychronously on the UI\n thread after the manager's storage has been initialized. Equivalent to\n calling cef_request_context_t::cef_request_context_get_global_context()->get\n _media_router().\n"]
12074 pub fn cef_media_router_get_global(
12075 callback: *mut _cef_completion_callback_t,
12076 ) -> *mut cef_media_router_t;
12077}
12078#[doc = "\n Implemented by the client to observe MediaRouter events and registered via\n cef_media_router_t::AddObserver. The functions of this structure will be\n called on the browser process UI thread.\n"]
12079#[repr(C)]
12080#[derive(Debug, Copy, Clone)]
12081pub struct _cef_media_observer_t {
12082 #[doc = "\n Base structure.\n"]
12083 pub base: cef_base_ref_counted_t,
12084 #[doc = "\n The list of available media sinks has changed or\n cef_media_router_t::NotifyCurrentSinks was called.\n"]
12085 pub on_sinks: ::std::option::Option<
12086 unsafe extern "C" fn(
12087 self_: *mut _cef_media_observer_t,
12088 sinksCount: usize,
12089 sinks: *const *mut _cef_media_sink_t,
12090 ),
12091 >,
12092 #[doc = "\n The list of available media routes has changed or\n cef_media_router_t::NotifyCurrentRoutes was called.\n"]
12093 pub on_routes: ::std::option::Option<
12094 unsafe extern "C" fn(
12095 self_: *mut _cef_media_observer_t,
12096 routesCount: usize,
12097 routes: *const *mut _cef_media_route_t,
12098 ),
12099 >,
12100 #[doc = "\n The connection state of |route| has changed.\n"]
12101 pub on_route_state_changed: ::std::option::Option<
12102 unsafe extern "C" fn(
12103 self_: *mut _cef_media_observer_t,
12104 route: *mut _cef_media_route_t,
12105 state: cef_media_route_connection_state_t,
12106 ),
12107 >,
12108 #[doc = "\n A message was recieved over |route|. |message| is only valid for the scope\n of this callback and should be copied if necessary.\n"]
12109 pub on_route_message_received: ::std::option::Option<
12110 unsafe extern "C" fn(
12111 self_: *mut _cef_media_observer_t,
12112 route: *mut _cef_media_route_t,
12113 message: *const ::std::os::raw::c_void,
12114 message_size: usize,
12115 ),
12116 >,
12117}
12118#[test]
12119fn bindgen_test_layout__cef_media_observer_t() {
12120 const UNINIT: ::std::mem::MaybeUninit<_cef_media_observer_t> =
12121 ::std::mem::MaybeUninit::uninit();
12122 let ptr = UNINIT.as_ptr();
12123 assert_eq!(
12124 ::std::mem::size_of::<_cef_media_observer_t>(),
12125 72usize,
12126 concat!("Size of: ", stringify!(_cef_media_observer_t))
12127 );
12128 assert_eq!(
12129 ::std::mem::align_of::<_cef_media_observer_t>(),
12130 8usize,
12131 concat!("Alignment of ", stringify!(_cef_media_observer_t))
12132 );
12133 assert_eq!(
12134 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
12135 0usize,
12136 concat!(
12137 "Offset of field: ",
12138 stringify!(_cef_media_observer_t),
12139 "::",
12140 stringify!(base)
12141 )
12142 );
12143 assert_eq!(
12144 unsafe { ::std::ptr::addr_of!((*ptr).on_sinks) as usize - ptr as usize },
12145 40usize,
12146 concat!(
12147 "Offset of field: ",
12148 stringify!(_cef_media_observer_t),
12149 "::",
12150 stringify!(on_sinks)
12151 )
12152 );
12153 assert_eq!(
12154 unsafe { ::std::ptr::addr_of!((*ptr).on_routes) as usize - ptr as usize },
12155 48usize,
12156 concat!(
12157 "Offset of field: ",
12158 stringify!(_cef_media_observer_t),
12159 "::",
12160 stringify!(on_routes)
12161 )
12162 );
12163 assert_eq!(
12164 unsafe { ::std::ptr::addr_of!((*ptr).on_route_state_changed) as usize - ptr as usize },
12165 56usize,
12166 concat!(
12167 "Offset of field: ",
12168 stringify!(_cef_media_observer_t),
12169 "::",
12170 stringify!(on_route_state_changed)
12171 )
12172 );
12173 assert_eq!(
12174 unsafe { ::std::ptr::addr_of!((*ptr).on_route_message_received) as usize - ptr as usize },
12175 64usize,
12176 concat!(
12177 "Offset of field: ",
12178 stringify!(_cef_media_observer_t),
12179 "::",
12180 stringify!(on_route_message_received)
12181 )
12182 );
12183}
12184#[doc = "\n Implemented by the client to observe MediaRouter events and registered via\n cef_media_router_t::AddObserver. The functions of this structure will be\n called on the browser process UI thread.\n"]
12185pub type cef_media_observer_t = _cef_media_observer_t;
12186#[doc = "\n Represents the route between a media source and sink. Instances of this\n object are created via cef_media_router_t::CreateRoute and retrieved via\n cef_media_observer_t::OnRoutes. Contains the status and metadata of a\n routing operation. The functions of this structure may be called on any\n browser process thread unless otherwise indicated.\n"]
12187#[repr(C)]
12188#[derive(Debug, Copy, Clone)]
12189pub struct _cef_media_route_t {
12190 #[doc = "\n Base structure.\n"]
12191 pub base: cef_base_ref_counted_t,
12192 #[doc = "\n Returns the ID for this route.\n"]
12193 pub get_id: ::std::option::Option<
12194 unsafe extern "C" fn(self_: *mut _cef_media_route_t) -> cef_string_userfree_t,
12195 >,
12196 #[doc = "\n Returns the source associated with this route.\n"]
12197 pub get_source: ::std::option::Option<
12198 unsafe extern "C" fn(self_: *mut _cef_media_route_t) -> *mut _cef_media_source_t,
12199 >,
12200 #[doc = "\n Returns the sink associated with this route.\n"]
12201 pub get_sink: ::std::option::Option<
12202 unsafe extern "C" fn(self_: *mut _cef_media_route_t) -> *mut _cef_media_sink_t,
12203 >,
12204 #[doc = "\n Send a message over this route. |message| will be copied if necessary.\n"]
12205 pub send_route_message: ::std::option::Option<
12206 unsafe extern "C" fn(
12207 self_: *mut _cef_media_route_t,
12208 message: *const ::std::os::raw::c_void,
12209 message_size: usize,
12210 ),
12211 >,
12212 #[doc = "\n Terminate this route. Will result in an asynchronous call to\n cef_media_observer_t::OnRoutes on all registered observers.\n"]
12213 pub terminate: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_media_route_t)>,
12214}
12215#[test]
12216fn bindgen_test_layout__cef_media_route_t() {
12217 const UNINIT: ::std::mem::MaybeUninit<_cef_media_route_t> = ::std::mem::MaybeUninit::uninit();
12218 let ptr = UNINIT.as_ptr();
12219 assert_eq!(
12220 ::std::mem::size_of::<_cef_media_route_t>(),
12221 80usize,
12222 concat!("Size of: ", stringify!(_cef_media_route_t))
12223 );
12224 assert_eq!(
12225 ::std::mem::align_of::<_cef_media_route_t>(),
12226 8usize,
12227 concat!("Alignment of ", stringify!(_cef_media_route_t))
12228 );
12229 assert_eq!(
12230 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
12231 0usize,
12232 concat!(
12233 "Offset of field: ",
12234 stringify!(_cef_media_route_t),
12235 "::",
12236 stringify!(base)
12237 )
12238 );
12239 assert_eq!(
12240 unsafe { ::std::ptr::addr_of!((*ptr).get_id) as usize - ptr as usize },
12241 40usize,
12242 concat!(
12243 "Offset of field: ",
12244 stringify!(_cef_media_route_t),
12245 "::",
12246 stringify!(get_id)
12247 )
12248 );
12249 assert_eq!(
12250 unsafe { ::std::ptr::addr_of!((*ptr).get_source) as usize - ptr as usize },
12251 48usize,
12252 concat!(
12253 "Offset of field: ",
12254 stringify!(_cef_media_route_t),
12255 "::",
12256 stringify!(get_source)
12257 )
12258 );
12259 assert_eq!(
12260 unsafe { ::std::ptr::addr_of!((*ptr).get_sink) as usize - ptr as usize },
12261 56usize,
12262 concat!(
12263 "Offset of field: ",
12264 stringify!(_cef_media_route_t),
12265 "::",
12266 stringify!(get_sink)
12267 )
12268 );
12269 assert_eq!(
12270 unsafe { ::std::ptr::addr_of!((*ptr).send_route_message) as usize - ptr as usize },
12271 64usize,
12272 concat!(
12273 "Offset of field: ",
12274 stringify!(_cef_media_route_t),
12275 "::",
12276 stringify!(send_route_message)
12277 )
12278 );
12279 assert_eq!(
12280 unsafe { ::std::ptr::addr_of!((*ptr).terminate) as usize - ptr as usize },
12281 72usize,
12282 concat!(
12283 "Offset of field: ",
12284 stringify!(_cef_media_route_t),
12285 "::",
12286 stringify!(terminate)
12287 )
12288 );
12289}
12290#[doc = "\n Represents the route between a media source and sink. Instances of this\n object are created via cef_media_router_t::CreateRoute and retrieved via\n cef_media_observer_t::OnRoutes. Contains the status and metadata of a\n routing operation. The functions of this structure may be called on any\n browser process thread unless otherwise indicated.\n"]
12291pub type cef_media_route_t = _cef_media_route_t;
12292#[doc = "\n Callback structure for cef_media_router_t::CreateRoute. The functions of\n this structure will be called on the browser process UI thread.\n"]
12293#[repr(C)]
12294#[derive(Debug, Copy, Clone)]
12295pub struct _cef_media_route_create_callback_t {
12296 #[doc = "\n Base structure.\n"]
12297 pub base: cef_base_ref_counted_t,
12298 #[doc = "\n Method that will be executed when the route creation has finished.\n |result| will be CEF_MRCR_OK if the route creation succeeded. |error| will\n be a description of the error if the route creation failed. |route| is the\n resulting route, or NULL if the route creation failed.\n"]
12299 pub on_media_route_create_finished: ::std::option::Option<
12300 unsafe extern "C" fn(
12301 self_: *mut _cef_media_route_create_callback_t,
12302 result: cef_media_route_create_result_t,
12303 error: *const cef_string_t,
12304 route: *mut _cef_media_route_t,
12305 ),
12306 >,
12307}
12308#[test]
12309fn bindgen_test_layout__cef_media_route_create_callback_t() {
12310 const UNINIT: ::std::mem::MaybeUninit<_cef_media_route_create_callback_t> =
12311 ::std::mem::MaybeUninit::uninit();
12312 let ptr = UNINIT.as_ptr();
12313 assert_eq!(
12314 ::std::mem::size_of::<_cef_media_route_create_callback_t>(),
12315 48usize,
12316 concat!("Size of: ", stringify!(_cef_media_route_create_callback_t))
12317 );
12318 assert_eq!(
12319 ::std::mem::align_of::<_cef_media_route_create_callback_t>(),
12320 8usize,
12321 concat!(
12322 "Alignment of ",
12323 stringify!(_cef_media_route_create_callback_t)
12324 )
12325 );
12326 assert_eq!(
12327 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
12328 0usize,
12329 concat!(
12330 "Offset of field: ",
12331 stringify!(_cef_media_route_create_callback_t),
12332 "::",
12333 stringify!(base)
12334 )
12335 );
12336 assert_eq!(
12337 unsafe {
12338 ::std::ptr::addr_of!((*ptr).on_media_route_create_finished) as usize - ptr as usize
12339 },
12340 40usize,
12341 concat!(
12342 "Offset of field: ",
12343 stringify!(_cef_media_route_create_callback_t),
12344 "::",
12345 stringify!(on_media_route_create_finished)
12346 )
12347 );
12348}
12349#[doc = "\n Callback structure for cef_media_router_t::CreateRoute. The functions of\n this structure will be called on the browser process UI thread.\n"]
12350pub type cef_media_route_create_callback_t = _cef_media_route_create_callback_t;
12351#[doc = "\n Represents a sink to which media can be routed. Instances of this object are\n retrieved via cef_media_observer_t::OnSinks. The functions of this structure\n may be called on any browser process thread unless otherwise indicated.\n"]
12352#[repr(C)]
12353#[derive(Debug, Copy, Clone)]
12354pub struct _cef_media_sink_t {
12355 #[doc = "\n Base structure.\n"]
12356 pub base: cef_base_ref_counted_t,
12357 #[doc = "\n Returns the ID for this sink.\n"]
12358 pub get_id: ::std::option::Option<
12359 unsafe extern "C" fn(self_: *mut _cef_media_sink_t) -> cef_string_userfree_t,
12360 >,
12361 #[doc = "\n Returns the name of this sink.\n"]
12362 pub get_name: ::std::option::Option<
12363 unsafe extern "C" fn(self_: *mut _cef_media_sink_t) -> cef_string_userfree_t,
12364 >,
12365 #[doc = "\n Returns the icon type for this sink.\n"]
12366 pub get_icon_type: ::std::option::Option<
12367 unsafe extern "C" fn(self_: *mut _cef_media_sink_t) -> cef_media_sink_icon_type_t,
12368 >,
12369 #[doc = "\n Asynchronously retrieves device info.\n"]
12370 pub get_device_info: ::std::option::Option<
12371 unsafe extern "C" fn(
12372 self_: *mut _cef_media_sink_t,
12373 callback: *mut _cef_media_sink_device_info_callback_t,
12374 ),
12375 >,
12376 #[doc = "\n Returns true (1) if this sink accepts content via Cast.\n"]
12377 pub is_cast_sink: ::std::option::Option<
12378 unsafe extern "C" fn(self_: *mut _cef_media_sink_t) -> ::std::os::raw::c_int,
12379 >,
12380 #[doc = "\n Returns true (1) if this sink accepts content via DIAL.\n"]
12381 pub is_dial_sink: ::std::option::Option<
12382 unsafe extern "C" fn(self_: *mut _cef_media_sink_t) -> ::std::os::raw::c_int,
12383 >,
12384 #[doc = "\n Returns true (1) if this sink is compatible with |source|.\n"]
12385 pub is_compatible_with: ::std::option::Option<
12386 unsafe extern "C" fn(
12387 self_: *mut _cef_media_sink_t,
12388 source: *mut _cef_media_source_t,
12389 ) -> ::std::os::raw::c_int,
12390 >,
12391}
12392#[test]
12393fn bindgen_test_layout__cef_media_sink_t() {
12394 const UNINIT: ::std::mem::MaybeUninit<_cef_media_sink_t> = ::std::mem::MaybeUninit::uninit();
12395 let ptr = UNINIT.as_ptr();
12396 assert_eq!(
12397 ::std::mem::size_of::<_cef_media_sink_t>(),
12398 96usize,
12399 concat!("Size of: ", stringify!(_cef_media_sink_t))
12400 );
12401 assert_eq!(
12402 ::std::mem::align_of::<_cef_media_sink_t>(),
12403 8usize,
12404 concat!("Alignment of ", stringify!(_cef_media_sink_t))
12405 );
12406 assert_eq!(
12407 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
12408 0usize,
12409 concat!(
12410 "Offset of field: ",
12411 stringify!(_cef_media_sink_t),
12412 "::",
12413 stringify!(base)
12414 )
12415 );
12416 assert_eq!(
12417 unsafe { ::std::ptr::addr_of!((*ptr).get_id) as usize - ptr as usize },
12418 40usize,
12419 concat!(
12420 "Offset of field: ",
12421 stringify!(_cef_media_sink_t),
12422 "::",
12423 stringify!(get_id)
12424 )
12425 );
12426 assert_eq!(
12427 unsafe { ::std::ptr::addr_of!((*ptr).get_name) as usize - ptr as usize },
12428 48usize,
12429 concat!(
12430 "Offset of field: ",
12431 stringify!(_cef_media_sink_t),
12432 "::",
12433 stringify!(get_name)
12434 )
12435 );
12436 assert_eq!(
12437 unsafe { ::std::ptr::addr_of!((*ptr).get_icon_type) as usize - ptr as usize },
12438 56usize,
12439 concat!(
12440 "Offset of field: ",
12441 stringify!(_cef_media_sink_t),
12442 "::",
12443 stringify!(get_icon_type)
12444 )
12445 );
12446 assert_eq!(
12447 unsafe { ::std::ptr::addr_of!((*ptr).get_device_info) as usize - ptr as usize },
12448 64usize,
12449 concat!(
12450 "Offset of field: ",
12451 stringify!(_cef_media_sink_t),
12452 "::",
12453 stringify!(get_device_info)
12454 )
12455 );
12456 assert_eq!(
12457 unsafe { ::std::ptr::addr_of!((*ptr).is_cast_sink) as usize - ptr as usize },
12458 72usize,
12459 concat!(
12460 "Offset of field: ",
12461 stringify!(_cef_media_sink_t),
12462 "::",
12463 stringify!(is_cast_sink)
12464 )
12465 );
12466 assert_eq!(
12467 unsafe { ::std::ptr::addr_of!((*ptr).is_dial_sink) as usize - ptr as usize },
12468 80usize,
12469 concat!(
12470 "Offset of field: ",
12471 stringify!(_cef_media_sink_t),
12472 "::",
12473 stringify!(is_dial_sink)
12474 )
12475 );
12476 assert_eq!(
12477 unsafe { ::std::ptr::addr_of!((*ptr).is_compatible_with) as usize - ptr as usize },
12478 88usize,
12479 concat!(
12480 "Offset of field: ",
12481 stringify!(_cef_media_sink_t),
12482 "::",
12483 stringify!(is_compatible_with)
12484 )
12485 );
12486}
12487#[doc = "\n Represents a sink to which media can be routed. Instances of this object are\n retrieved via cef_media_observer_t::OnSinks. The functions of this structure\n may be called on any browser process thread unless otherwise indicated.\n"]
12488pub type cef_media_sink_t = _cef_media_sink_t;
12489#[doc = "\n Callback structure for cef_media_sink_t::GetDeviceInfo. The functions of\n this structure will be called on the browser process UI thread.\n"]
12490#[repr(C)]
12491#[derive(Debug, Copy, Clone)]
12492pub struct _cef_media_sink_device_info_callback_t {
12493 #[doc = "\n Base structure.\n"]
12494 pub base: cef_base_ref_counted_t,
12495 #[doc = "\n Method that will be executed asyncronously once device information has\n been retrieved.\n"]
12496 pub on_media_sink_device_info: ::std::option::Option<
12497 unsafe extern "C" fn(
12498 self_: *mut _cef_media_sink_device_info_callback_t,
12499 device_info: *const _cef_media_sink_device_info_t,
12500 ),
12501 >,
12502}
12503#[test]
12504fn bindgen_test_layout__cef_media_sink_device_info_callback_t() {
12505 const UNINIT: ::std::mem::MaybeUninit<_cef_media_sink_device_info_callback_t> =
12506 ::std::mem::MaybeUninit::uninit();
12507 let ptr = UNINIT.as_ptr();
12508 assert_eq!(
12509 ::std::mem::size_of::<_cef_media_sink_device_info_callback_t>(),
12510 48usize,
12511 concat!(
12512 "Size of: ",
12513 stringify!(_cef_media_sink_device_info_callback_t)
12514 )
12515 );
12516 assert_eq!(
12517 ::std::mem::align_of::<_cef_media_sink_device_info_callback_t>(),
12518 8usize,
12519 concat!(
12520 "Alignment of ",
12521 stringify!(_cef_media_sink_device_info_callback_t)
12522 )
12523 );
12524 assert_eq!(
12525 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
12526 0usize,
12527 concat!(
12528 "Offset of field: ",
12529 stringify!(_cef_media_sink_device_info_callback_t),
12530 "::",
12531 stringify!(base)
12532 )
12533 );
12534 assert_eq!(
12535 unsafe { ::std::ptr::addr_of!((*ptr).on_media_sink_device_info) as usize - ptr as usize },
12536 40usize,
12537 concat!(
12538 "Offset of field: ",
12539 stringify!(_cef_media_sink_device_info_callback_t),
12540 "::",
12541 stringify!(on_media_sink_device_info)
12542 )
12543 );
12544}
12545#[doc = "\n Callback structure for cef_media_sink_t::GetDeviceInfo. The functions of\n this structure will be called on the browser process UI thread.\n"]
12546pub type cef_media_sink_device_info_callback_t = _cef_media_sink_device_info_callback_t;
12547#[doc = "\n Represents a source from which media can be routed. Instances of this object\n are retrieved via cef_media_router_t::GetSource. The functions of this\n structure may be called on any browser process thread unless otherwise\n indicated.\n"]
12548#[repr(C)]
12549#[derive(Debug, Copy, Clone)]
12550pub struct _cef_media_source_t {
12551 #[doc = "\n Base structure.\n"]
12552 pub base: cef_base_ref_counted_t,
12553 #[doc = "\n Returns the ID (media source URN or URL) for this source.\n"]
12554 pub get_id: ::std::option::Option<
12555 unsafe extern "C" fn(self_: *mut _cef_media_source_t) -> cef_string_userfree_t,
12556 >,
12557 #[doc = "\n Returns true (1) if this source outputs its content via Cast.\n"]
12558 pub is_cast_source: ::std::option::Option<
12559 unsafe extern "C" fn(self_: *mut _cef_media_source_t) -> ::std::os::raw::c_int,
12560 >,
12561 #[doc = "\n Returns true (1) if this source outputs its content via DIAL.\n"]
12562 pub is_dial_source: ::std::option::Option<
12563 unsafe extern "C" fn(self_: *mut _cef_media_source_t) -> ::std::os::raw::c_int,
12564 >,
12565}
12566#[test]
12567fn bindgen_test_layout__cef_media_source_t() {
12568 const UNINIT: ::std::mem::MaybeUninit<_cef_media_source_t> = ::std::mem::MaybeUninit::uninit();
12569 let ptr = UNINIT.as_ptr();
12570 assert_eq!(
12571 ::std::mem::size_of::<_cef_media_source_t>(),
12572 64usize,
12573 concat!("Size of: ", stringify!(_cef_media_source_t))
12574 );
12575 assert_eq!(
12576 ::std::mem::align_of::<_cef_media_source_t>(),
12577 8usize,
12578 concat!("Alignment of ", stringify!(_cef_media_source_t))
12579 );
12580 assert_eq!(
12581 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
12582 0usize,
12583 concat!(
12584 "Offset of field: ",
12585 stringify!(_cef_media_source_t),
12586 "::",
12587 stringify!(base)
12588 )
12589 );
12590 assert_eq!(
12591 unsafe { ::std::ptr::addr_of!((*ptr).get_id) as usize - ptr as usize },
12592 40usize,
12593 concat!(
12594 "Offset of field: ",
12595 stringify!(_cef_media_source_t),
12596 "::",
12597 stringify!(get_id)
12598 )
12599 );
12600 assert_eq!(
12601 unsafe { ::std::ptr::addr_of!((*ptr).is_cast_source) as usize - ptr as usize },
12602 48usize,
12603 concat!(
12604 "Offset of field: ",
12605 stringify!(_cef_media_source_t),
12606 "::",
12607 stringify!(is_cast_source)
12608 )
12609 );
12610 assert_eq!(
12611 unsafe { ::std::ptr::addr_of!((*ptr).is_dial_source) as usize - ptr as usize },
12612 56usize,
12613 concat!(
12614 "Offset of field: ",
12615 stringify!(_cef_media_source_t),
12616 "::",
12617 stringify!(is_dial_source)
12618 )
12619 );
12620}
12621#[doc = "\n Represents a source from which media can be routed. Instances of this object\n are retrieved via cef_media_router_t::GetSource. The functions of this\n structure may be called on any browser process thread unless otherwise\n indicated.\n"]
12622pub type cef_media_source_t = _cef_media_source_t;
12623#[doc = "\n Structure that manages custom preference registrations.\n"]
12624#[repr(C)]
12625#[derive(Debug, Copy, Clone)]
12626pub struct _cef_preference_registrar_t {
12627 #[doc = "\n Base structure.\n"]
12628 pub base: cef_base_scoped_t,
12629 #[doc = "\n Register a preference with the specified |name| and |default_value|. To\n avoid conflicts with built-in preferences the |name| value should contain\n an application-specific prefix followed by a period (e.g. \"myapp.value\").\n The contents of |default_value| will be copied. The data type for the\n preference will be inferred from |default_value|'s type and cannot be\n changed after registration. Returns true (1) on success. Returns false (0)\n if |name| is already registered or if |default_value| has an invalid type.\n This function must be called from within the scope of the\n cef_browser_process_handler_t::OnRegisterCustomPreferences callback.\n"]
12630 pub add_preference: ::std::option::Option<
12631 unsafe extern "C" fn(
12632 self_: *mut _cef_preference_registrar_t,
12633 name: *const cef_string_t,
12634 default_value: *mut _cef_value_t,
12635 ) -> ::std::os::raw::c_int,
12636 >,
12637}
12638#[test]
12639fn bindgen_test_layout__cef_preference_registrar_t() {
12640 const UNINIT: ::std::mem::MaybeUninit<_cef_preference_registrar_t> =
12641 ::std::mem::MaybeUninit::uninit();
12642 let ptr = UNINIT.as_ptr();
12643 assert_eq!(
12644 ::std::mem::size_of::<_cef_preference_registrar_t>(),
12645 24usize,
12646 concat!("Size of: ", stringify!(_cef_preference_registrar_t))
12647 );
12648 assert_eq!(
12649 ::std::mem::align_of::<_cef_preference_registrar_t>(),
12650 8usize,
12651 concat!("Alignment of ", stringify!(_cef_preference_registrar_t))
12652 );
12653 assert_eq!(
12654 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
12655 0usize,
12656 concat!(
12657 "Offset of field: ",
12658 stringify!(_cef_preference_registrar_t),
12659 "::",
12660 stringify!(base)
12661 )
12662 );
12663 assert_eq!(
12664 unsafe { ::std::ptr::addr_of!((*ptr).add_preference) as usize - ptr as usize },
12665 16usize,
12666 concat!(
12667 "Offset of field: ",
12668 stringify!(_cef_preference_registrar_t),
12669 "::",
12670 stringify!(add_preference)
12671 )
12672 );
12673}
12674#[doc = "\n Structure that manages custom preference registrations.\n"]
12675pub type cef_preference_registrar_t = _cef_preference_registrar_t;
12676#[doc = "\n Manage access to preferences. Many built-in preferences are registered by\n Chromium. Custom preferences can be registered in\n cef_browser_process_handler_t::OnRegisterCustomPreferences.\n"]
12677#[repr(C)]
12678#[derive(Debug, Copy, Clone)]
12679pub struct _cef_preference_manager_t {
12680 #[doc = "\n Base structure.\n"]
12681 pub base: cef_base_ref_counted_t,
12682 #[doc = "\n Returns true (1) if a preference with the specified |name| exists. This\n function must be called on the browser process UI thread.\n"]
12683 pub has_preference: ::std::option::Option<
12684 unsafe extern "C" fn(
12685 self_: *mut _cef_preference_manager_t,
12686 name: *const cef_string_t,
12687 ) -> ::std::os::raw::c_int,
12688 >,
12689 #[doc = "\n Returns the value for the preference with the specified |name|. Returns\n NULL if the preference does not exist. The returned object contains a copy\n of the underlying preference value and modifications to the returned\n object will not modify the underlying preference value. This function must\n be called on the browser process UI thread.\n"]
12690 pub get_preference: ::std::option::Option<
12691 unsafe extern "C" fn(
12692 self_: *mut _cef_preference_manager_t,
12693 name: *const cef_string_t,
12694 ) -> *mut _cef_value_t,
12695 >,
12696 #[doc = "\n Returns all preferences as a dictionary. If |include_defaults| is true (1)\n then preferences currently at their default value will be included. The\n returned object contains a copy of the underlying preference values and\n modifications to the returned object will not modify the underlying\n preference values. This function must be called on the browser process UI\n thread.\n"]
12697 pub get_all_preferences: ::std::option::Option<
12698 unsafe extern "C" fn(
12699 self_: *mut _cef_preference_manager_t,
12700 include_defaults: ::std::os::raw::c_int,
12701 ) -> *mut _cef_dictionary_value_t,
12702 >,
12703 #[doc = "\n Returns true (1) if the preference with the specified |name| can be\n modified using SetPreference. As one example preferences set via the\n command-line usually cannot be modified. This function must be called on\n the browser process UI thread.\n"]
12704 pub can_set_preference: ::std::option::Option<
12705 unsafe extern "C" fn(
12706 self_: *mut _cef_preference_manager_t,
12707 name: *const cef_string_t,
12708 ) -> ::std::os::raw::c_int,
12709 >,
12710 #[doc = "\n Set the |value| associated with preference |name|. Returns true (1) if the\n value is set successfully and false (0) otherwise. If |value| is NULL the\n preference will be restored to its default value. If setting the\n preference fails then |error| will be populated with a detailed\n description of the problem. This function must be called on the browser\n process UI thread.\n"]
12711 pub set_preference: ::std::option::Option<
12712 unsafe extern "C" fn(
12713 self_: *mut _cef_preference_manager_t,
12714 name: *const cef_string_t,
12715 value: *mut _cef_value_t,
12716 error: *mut cef_string_t,
12717 ) -> ::std::os::raw::c_int,
12718 >,
12719}
12720#[test]
12721fn bindgen_test_layout__cef_preference_manager_t() {
12722 const UNINIT: ::std::mem::MaybeUninit<_cef_preference_manager_t> =
12723 ::std::mem::MaybeUninit::uninit();
12724 let ptr = UNINIT.as_ptr();
12725 assert_eq!(
12726 ::std::mem::size_of::<_cef_preference_manager_t>(),
12727 80usize,
12728 concat!("Size of: ", stringify!(_cef_preference_manager_t))
12729 );
12730 assert_eq!(
12731 ::std::mem::align_of::<_cef_preference_manager_t>(),
12732 8usize,
12733 concat!("Alignment of ", stringify!(_cef_preference_manager_t))
12734 );
12735 assert_eq!(
12736 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
12737 0usize,
12738 concat!(
12739 "Offset of field: ",
12740 stringify!(_cef_preference_manager_t),
12741 "::",
12742 stringify!(base)
12743 )
12744 );
12745 assert_eq!(
12746 unsafe { ::std::ptr::addr_of!((*ptr).has_preference) as usize - ptr as usize },
12747 40usize,
12748 concat!(
12749 "Offset of field: ",
12750 stringify!(_cef_preference_manager_t),
12751 "::",
12752 stringify!(has_preference)
12753 )
12754 );
12755 assert_eq!(
12756 unsafe { ::std::ptr::addr_of!((*ptr).get_preference) as usize - ptr as usize },
12757 48usize,
12758 concat!(
12759 "Offset of field: ",
12760 stringify!(_cef_preference_manager_t),
12761 "::",
12762 stringify!(get_preference)
12763 )
12764 );
12765 assert_eq!(
12766 unsafe { ::std::ptr::addr_of!((*ptr).get_all_preferences) as usize - ptr as usize },
12767 56usize,
12768 concat!(
12769 "Offset of field: ",
12770 stringify!(_cef_preference_manager_t),
12771 "::",
12772 stringify!(get_all_preferences)
12773 )
12774 );
12775 assert_eq!(
12776 unsafe { ::std::ptr::addr_of!((*ptr).can_set_preference) as usize - ptr as usize },
12777 64usize,
12778 concat!(
12779 "Offset of field: ",
12780 stringify!(_cef_preference_manager_t),
12781 "::",
12782 stringify!(can_set_preference)
12783 )
12784 );
12785 assert_eq!(
12786 unsafe { ::std::ptr::addr_of!((*ptr).set_preference) as usize - ptr as usize },
12787 72usize,
12788 concat!(
12789 "Offset of field: ",
12790 stringify!(_cef_preference_manager_t),
12791 "::",
12792 stringify!(set_preference)
12793 )
12794 );
12795}
12796#[doc = "\n Manage access to preferences. Many built-in preferences are registered by\n Chromium. Custom preferences can be registered in\n cef_browser_process_handler_t::OnRegisterCustomPreferences.\n"]
12797pub type cef_preference_manager_t = _cef_preference_manager_t;
12798extern "C" {
12799 #[doc = "\n Returns the global preference manager object.\n"]
12800 pub fn cef_preference_manager_get_global() -> *mut cef_preference_manager_t;
12801}
12802#[repr(C)]
12803#[derive(Debug, Copy, Clone)]
12804pub struct _cef_request_context_handler_t {
12805 _unused: [u8; 0],
12806}
12807#[doc = "\n Callback structure for cef_request_context_t::ResolveHost.\n"]
12808#[repr(C)]
12809#[derive(Debug, Copy, Clone)]
12810pub struct _cef_resolve_callback_t {
12811 #[doc = "\n Base structure.\n"]
12812 pub base: cef_base_ref_counted_t,
12813 #[doc = "\n Called on the UI thread after the ResolveHost request has completed.\n |result| will be the result code. |resolved_ips| will be the list of\n resolved IP addresses or NULL if the resolution failed.\n"]
12814 pub on_resolve_completed: ::std::option::Option<
12815 unsafe extern "C" fn(
12816 self_: *mut _cef_resolve_callback_t,
12817 result: cef_errorcode_t,
12818 resolved_ips: cef_string_list_t,
12819 ),
12820 >,
12821}
12822#[test]
12823fn bindgen_test_layout__cef_resolve_callback_t() {
12824 const UNINIT: ::std::mem::MaybeUninit<_cef_resolve_callback_t> =
12825 ::std::mem::MaybeUninit::uninit();
12826 let ptr = UNINIT.as_ptr();
12827 assert_eq!(
12828 ::std::mem::size_of::<_cef_resolve_callback_t>(),
12829 48usize,
12830 concat!("Size of: ", stringify!(_cef_resolve_callback_t))
12831 );
12832 assert_eq!(
12833 ::std::mem::align_of::<_cef_resolve_callback_t>(),
12834 8usize,
12835 concat!("Alignment of ", stringify!(_cef_resolve_callback_t))
12836 );
12837 assert_eq!(
12838 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
12839 0usize,
12840 concat!(
12841 "Offset of field: ",
12842 stringify!(_cef_resolve_callback_t),
12843 "::",
12844 stringify!(base)
12845 )
12846 );
12847 assert_eq!(
12848 unsafe { ::std::ptr::addr_of!((*ptr).on_resolve_completed) as usize - ptr as usize },
12849 40usize,
12850 concat!(
12851 "Offset of field: ",
12852 stringify!(_cef_resolve_callback_t),
12853 "::",
12854 stringify!(on_resolve_completed)
12855 )
12856 );
12857}
12858#[doc = "\n Callback structure for cef_request_context_t::ResolveHost.\n"]
12859pub type cef_resolve_callback_t = _cef_resolve_callback_t;
12860#[doc = "\n A request context provides request handling for a set of related browser or\n URL request objects. A request context can be specified when creating a new\n browser via the cef_browser_host_t static factory functions or when creating\n a new URL request via the cef_urlrequest_t static factory functions. Browser\n objects with different request contexts will never be hosted in the same\n render process. Browser objects with the same request context may or may not\n be hosted in the same render process depending on the process model. Browser\n objects created indirectly via the JavaScript window.open function or\n targeted links will share the same render process and the same request\n context as the source browser. When running in single-process mode there is\n only a single render process (the main process) and so all browsers created\n in single-process mode will share the same request context. This will be the\n first request context passed into a cef_browser_host_t static factory\n function and all other request context objects will be ignored.\n"]
12861#[repr(C)]
12862#[derive(Debug, Copy, Clone)]
12863pub struct _cef_request_context_t {
12864 #[doc = "\n Base structure.\n"]
12865 pub base: cef_preference_manager_t,
12866 #[doc = "\n Returns true (1) if this object is pointing to the same context as |that|\n object.\n"]
12867 pub is_same: ::std::option::Option<
12868 unsafe extern "C" fn(
12869 self_: *mut _cef_request_context_t,
12870 other: *mut _cef_request_context_t,
12871 ) -> ::std::os::raw::c_int,
12872 >,
12873 #[doc = "\n Returns true (1) if this object is sharing the same storage as |that|\n object.\n"]
12874 pub is_sharing_with: ::std::option::Option<
12875 unsafe extern "C" fn(
12876 self_: *mut _cef_request_context_t,
12877 other: *mut _cef_request_context_t,
12878 ) -> ::std::os::raw::c_int,
12879 >,
12880 #[doc = "\n Returns true (1) if this object is the global context. The global context\n is used by default when creating a browser or URL request with a NULL\n context argument.\n"]
12881 pub is_global: ::std::option::Option<
12882 unsafe extern "C" fn(self_: *mut _cef_request_context_t) -> ::std::os::raw::c_int,
12883 >,
12884 #[doc = "\n Returns the handler for this context if any.\n"]
12885 pub get_handler: ::std::option::Option<
12886 unsafe extern "C" fn(
12887 self_: *mut _cef_request_context_t,
12888 ) -> *mut _cef_request_context_handler_t,
12889 >,
12890 #[doc = "\n Returns the cache path for this object. If NULL an \"incognito mode\" in-\n memory cache is being used.\n"]
12891 pub get_cache_path: ::std::option::Option<
12892 unsafe extern "C" fn(self_: *mut _cef_request_context_t) -> cef_string_userfree_t,
12893 >,
12894 #[doc = "\n Returns the cookie manager for this object. If |callback| is non-NULL it\n will be executed asnychronously on the UI thread after the manager's\n storage has been initialized.\n"]
12895 pub get_cookie_manager: ::std::option::Option<
12896 unsafe extern "C" fn(
12897 self_: *mut _cef_request_context_t,
12898 callback: *mut _cef_completion_callback_t,
12899 ) -> *mut _cef_cookie_manager_t,
12900 >,
12901 #[doc = "\n Register a scheme handler factory for the specified |scheme_name| and\n optional |domain_name|. An NULL |domain_name| value for a standard scheme\n will cause the factory to match all domain names. The |domain_name| value\n will be ignored for non-standard schemes. If |scheme_name| is a built-in\n scheme and no handler is returned by |factory| then the built-in scheme\n handler factory will be called. If |scheme_name| is a custom scheme then\n you must also implement the cef_app_t::on_register_custom_schemes()\n function in all processes. This function may be called multiple times to\n change or remove the factory that matches the specified |scheme_name| and\n optional |domain_name|. Returns false (0) if an error occurs. This\n function may be called on any thread in the browser process.\n"]
12902 pub register_scheme_handler_factory: ::std::option::Option<
12903 unsafe extern "C" fn(
12904 self_: *mut _cef_request_context_t,
12905 scheme_name: *const cef_string_t,
12906 domain_name: *const cef_string_t,
12907 factory: *mut _cef_scheme_handler_factory_t,
12908 ) -> ::std::os::raw::c_int,
12909 >,
12910 #[doc = "\n Clear all registered scheme handler factories. Returns false (0) on error.\n This function may be called on any thread in the browser process.\n"]
12911 pub clear_scheme_handler_factories: ::std::option::Option<
12912 unsafe extern "C" fn(self_: *mut _cef_request_context_t) -> ::std::os::raw::c_int,
12913 >,
12914 #[doc = "\n Clears all certificate exceptions that were added as part of handling\n cef_request_handler_t::on_certificate_error(). If you call this it is\n recommended that you also call close_all_connections() or you risk not\n being prompted again for server certificates if you reconnect quickly. If\n |callback| is non-NULL it will be executed on the UI thread after\n completion.\n"]
12915 pub clear_certificate_exceptions: ::std::option::Option<
12916 unsafe extern "C" fn(
12917 self_: *mut _cef_request_context_t,
12918 callback: *mut _cef_completion_callback_t,
12919 ),
12920 >,
12921 #[doc = "\n Clears all HTTP authentication credentials that were added as part of\n handling GetAuthCredentials. If |callback| is non-NULL it will be executed\n on the UI thread after completion.\n"]
12922 pub clear_http_auth_credentials: ::std::option::Option<
12923 unsafe extern "C" fn(
12924 self_: *mut _cef_request_context_t,
12925 callback: *mut _cef_completion_callback_t,
12926 ),
12927 >,
12928 #[doc = "\n Clears all active and idle connections that Chromium currently has. This\n is only recommended if you have released all other CEF objects but don't\n yet want to call cef_shutdown(). If |callback| is non-NULL it will be\n executed on the UI thread after completion.\n"]
12929 pub close_all_connections: ::std::option::Option<
12930 unsafe extern "C" fn(
12931 self_: *mut _cef_request_context_t,
12932 callback: *mut _cef_completion_callback_t,
12933 ),
12934 >,
12935 #[doc = "\n Attempts to resolve |origin| to a list of associated IP addresses.\n |callback| will be executed on the UI thread after completion.\n"]
12936 pub resolve_host: ::std::option::Option<
12937 unsafe extern "C" fn(
12938 self_: *mut _cef_request_context_t,
12939 origin: *const cef_string_t,
12940 callback: *mut _cef_resolve_callback_t,
12941 ),
12942 >,
12943 #[doc = "\n Load an extension.\n\n If extension resources will be read from disk using the default load\n implementation then |root_directory| should be the absolute path to the\n extension resources directory and |manifest| should be NULL. If extension\n resources will be provided by the client (e.g. via cef_request_handler_t\n and/or cef_extension_handler_t) then |root_directory| should be a path\n component unique to the extension (if not absolute this will be internally\n prefixed with the PK_DIR_RESOURCES path) and |manifest| should contain the\n contents that would otherwise be read from the \"manifest.json\" file on\n disk.\n\n The loaded extension will be accessible in all contexts sharing the same\n storage (HasExtension returns true (1)). However, only the context on\n which this function was called is considered the loader (DidLoadExtension\n returns true (1)) and only the loader will receive\n cef_request_context_handler_t callbacks for the extension.\n\n cef_extension_handler_t::OnExtensionLoaded will be called on load success\n or cef_extension_handler_t::OnExtensionLoadFailed will be called on load\n failure.\n\n If the extension specifies a background script via the \"background\"\n manifest key then cef_extension_handler_t::OnBeforeBackgroundBrowser will\n be called to create the background browser. See that function for\n additional information about background scripts.\n\n For visible extension views the client application should evaluate the\n manifest to determine the correct extension URL to load and then pass that\n URL to the cef_browser_host_t::CreateBrowser* function after the extension\n has loaded. For example, the client can look for the \"browser_action\"\n manifest key as documented at\n https://developer.chrome.com/extensions/browserAction. Extension URLs take\n the form \"chrome-extension://<extension_id>/<path>\".\n\n Browsers that host extensions differ from normal browsers as follows:\n - Can access chrome.* JavaScript APIs if allowed by the manifest. Visit\n chrome://extensions-support for the list of extension APIs currently\n supported by CEF.\n - Main frame navigation to non-extension content is blocked.\n - Pinch-zooming is disabled.\n - CefBrowserHost::GetExtension returns the hosted extension.\n - CefBrowserHost::IsBackgroundHost returns true for background hosts.\n\n See https://developer.chrome.com/extensions for extension implementation\n and usage documentation.\n"]
12944 pub load_extension: ::std::option::Option<
12945 unsafe extern "C" fn(
12946 self_: *mut _cef_request_context_t,
12947 root_directory: *const cef_string_t,
12948 manifest: *mut _cef_dictionary_value_t,
12949 handler: *mut _cef_extension_handler_t,
12950 ),
12951 >,
12952 #[doc = "\n Returns true (1) if this context was used to load the extension identified\n by |extension_id|. Other contexts sharing the same storage will also have\n access to the extension (see HasExtension). This function must be called\n on the browser process UI thread.\n"]
12953 pub did_load_extension: ::std::option::Option<
12954 unsafe extern "C" fn(
12955 self_: *mut _cef_request_context_t,
12956 extension_id: *const cef_string_t,
12957 ) -> ::std::os::raw::c_int,
12958 >,
12959 #[doc = "\n Returns true (1) if this context has access to the extension identified by\n |extension_id|. This may not be the context that was used to load the\n extension (see DidLoadExtension). This function must be called on the\n browser process UI thread.\n"]
12960 pub has_extension: ::std::option::Option<
12961 unsafe extern "C" fn(
12962 self_: *mut _cef_request_context_t,
12963 extension_id: *const cef_string_t,
12964 ) -> ::std::os::raw::c_int,
12965 >,
12966 #[doc = "\n Retrieve the list of all extensions that this context has access to (see\n HasExtension). |extension_ids| will be populated with the list of\n extension ID values. Returns true (1) on success. This function must be\n called on the browser process UI thread.\n"]
12967 pub get_extensions: ::std::option::Option<
12968 unsafe extern "C" fn(
12969 self_: *mut _cef_request_context_t,
12970 extension_ids: cef_string_list_t,
12971 ) -> ::std::os::raw::c_int,
12972 >,
12973 #[doc = "\n Returns the extension matching |extension_id| or NULL if no matching\n extension is accessible in this context (see HasExtension). This function\n must be called on the browser process UI thread.\n"]
12974 pub get_extension: ::std::option::Option<
12975 unsafe extern "C" fn(
12976 self_: *mut _cef_request_context_t,
12977 extension_id: *const cef_string_t,
12978 ) -> *mut _cef_extension_t,
12979 >,
12980 #[doc = "\n Returns the MediaRouter object associated with this context. If\n |callback| is non-NULL it will be executed asnychronously on the UI thread\n after the manager's context has been initialized.\n"]
12981 pub get_media_router: ::std::option::Option<
12982 unsafe extern "C" fn(
12983 self_: *mut _cef_request_context_t,
12984 callback: *mut _cef_completion_callback_t,
12985 ) -> *mut _cef_media_router_t,
12986 >,
12987 #[doc = "\n Returns the current value for |content_type| that applies for the\n specified URLs. If both URLs are NULL the default value will be returned.\n Returns nullptr if no value is configured. Must be called on the browser\n process UI thread.\n"]
12988 pub get_website_setting: ::std::option::Option<
12989 unsafe extern "C" fn(
12990 self_: *mut _cef_request_context_t,
12991 requesting_url: *const cef_string_t,
12992 top_level_url: *const cef_string_t,
12993 content_type: cef_content_setting_types_t,
12994 ) -> *mut _cef_value_t,
12995 >,
12996 #[doc = "\n Sets the current value for |content_type| for the specified URLs in the\n default scope. If both URLs are NULL, and the context is not incognito,\n the default value will be set. Pass nullptr for |value| to remove the\n default value for this content type.\n\n WARNING: Incorrect usage of this function may cause instability or\n security issues in Chromium. Make sure that you first understand the\n potential impact of any changes to |content_type| by reviewing the related\n source code in Chromium. For example, if you plan to modify\n CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of\n ContentSettingsType::POPUPS in Chromium:\n https://source.chromium.org/search?q=ContentSettingsType::POPUPS\n"]
12997 pub set_website_setting: ::std::option::Option<
12998 unsafe extern "C" fn(
12999 self_: *mut _cef_request_context_t,
13000 requesting_url: *const cef_string_t,
13001 top_level_url: *const cef_string_t,
13002 content_type: cef_content_setting_types_t,
13003 value: *mut _cef_value_t,
13004 ),
13005 >,
13006 #[doc = "\n Returns the current value for |content_type| that applies for the\n specified URLs. If both URLs are NULL the default value will be returned.\n Returns CEF_CONTENT_SETTING_VALUE_DEFAULT if no value is configured. Must\n be called on the browser process UI thread.\n"]
13007 pub get_content_setting: ::std::option::Option<
13008 unsafe extern "C" fn(
13009 self_: *mut _cef_request_context_t,
13010 requesting_url: *const cef_string_t,
13011 top_level_url: *const cef_string_t,
13012 content_type: cef_content_setting_types_t,
13013 ) -> cef_content_setting_values_t,
13014 >,
13015 #[doc = "\n Sets the current value for |content_type| for the specified URLs in the\n default scope. If both URLs are NULL, and the context is not incognito,\n the default value will be set. Pass CEF_CONTENT_SETTING_VALUE_DEFAULT for\n |value| to use the default value for this content type.\n\n WARNING: Incorrect usage of this function may cause instability or\n security issues in Chromium. Make sure that you first understand the\n potential impact of any changes to |content_type| by reviewing the related\n source code in Chromium. For example, if you plan to modify\n CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of\n ContentSettingsType::POPUPS in Chromium:\n https://source.chromium.org/search?q=ContentSettingsType::POPUPS\n"]
13016 pub set_content_setting: ::std::option::Option<
13017 unsafe extern "C" fn(
13018 self_: *mut _cef_request_context_t,
13019 requesting_url: *const cef_string_t,
13020 top_level_url: *const cef_string_t,
13021 content_type: cef_content_setting_types_t,
13022 value: cef_content_setting_values_t,
13023 ),
13024 >,
13025}
13026#[test]
13027fn bindgen_test_layout__cef_request_context_t() {
13028 const UNINIT: ::std::mem::MaybeUninit<_cef_request_context_t> =
13029 ::std::mem::MaybeUninit::uninit();
13030 let ptr = UNINIT.as_ptr();
13031 assert_eq!(
13032 ::std::mem::size_of::<_cef_request_context_t>(),
13033 256usize,
13034 concat!("Size of: ", stringify!(_cef_request_context_t))
13035 );
13036 assert_eq!(
13037 ::std::mem::align_of::<_cef_request_context_t>(),
13038 8usize,
13039 concat!("Alignment of ", stringify!(_cef_request_context_t))
13040 );
13041 assert_eq!(
13042 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
13043 0usize,
13044 concat!(
13045 "Offset of field: ",
13046 stringify!(_cef_request_context_t),
13047 "::",
13048 stringify!(base)
13049 )
13050 );
13051 assert_eq!(
13052 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
13053 80usize,
13054 concat!(
13055 "Offset of field: ",
13056 stringify!(_cef_request_context_t),
13057 "::",
13058 stringify!(is_same)
13059 )
13060 );
13061 assert_eq!(
13062 unsafe { ::std::ptr::addr_of!((*ptr).is_sharing_with) as usize - ptr as usize },
13063 88usize,
13064 concat!(
13065 "Offset of field: ",
13066 stringify!(_cef_request_context_t),
13067 "::",
13068 stringify!(is_sharing_with)
13069 )
13070 );
13071 assert_eq!(
13072 unsafe { ::std::ptr::addr_of!((*ptr).is_global) as usize - ptr as usize },
13073 96usize,
13074 concat!(
13075 "Offset of field: ",
13076 stringify!(_cef_request_context_t),
13077 "::",
13078 stringify!(is_global)
13079 )
13080 );
13081 assert_eq!(
13082 unsafe { ::std::ptr::addr_of!((*ptr).get_handler) as usize - ptr as usize },
13083 104usize,
13084 concat!(
13085 "Offset of field: ",
13086 stringify!(_cef_request_context_t),
13087 "::",
13088 stringify!(get_handler)
13089 )
13090 );
13091 assert_eq!(
13092 unsafe { ::std::ptr::addr_of!((*ptr).get_cache_path) as usize - ptr as usize },
13093 112usize,
13094 concat!(
13095 "Offset of field: ",
13096 stringify!(_cef_request_context_t),
13097 "::",
13098 stringify!(get_cache_path)
13099 )
13100 );
13101 assert_eq!(
13102 unsafe { ::std::ptr::addr_of!((*ptr).get_cookie_manager) as usize - ptr as usize },
13103 120usize,
13104 concat!(
13105 "Offset of field: ",
13106 stringify!(_cef_request_context_t),
13107 "::",
13108 stringify!(get_cookie_manager)
13109 )
13110 );
13111 assert_eq!(
13112 unsafe {
13113 ::std::ptr::addr_of!((*ptr).register_scheme_handler_factory) as usize - ptr as usize
13114 },
13115 128usize,
13116 concat!(
13117 "Offset of field: ",
13118 stringify!(_cef_request_context_t),
13119 "::",
13120 stringify!(register_scheme_handler_factory)
13121 )
13122 );
13123 assert_eq!(
13124 unsafe {
13125 ::std::ptr::addr_of!((*ptr).clear_scheme_handler_factories) as usize - ptr as usize
13126 },
13127 136usize,
13128 concat!(
13129 "Offset of field: ",
13130 stringify!(_cef_request_context_t),
13131 "::",
13132 stringify!(clear_scheme_handler_factories)
13133 )
13134 );
13135 assert_eq!(
13136 unsafe {
13137 ::std::ptr::addr_of!((*ptr).clear_certificate_exceptions) as usize - ptr as usize
13138 },
13139 144usize,
13140 concat!(
13141 "Offset of field: ",
13142 stringify!(_cef_request_context_t),
13143 "::",
13144 stringify!(clear_certificate_exceptions)
13145 )
13146 );
13147 assert_eq!(
13148 unsafe { ::std::ptr::addr_of!((*ptr).clear_http_auth_credentials) as usize - ptr as usize },
13149 152usize,
13150 concat!(
13151 "Offset of field: ",
13152 stringify!(_cef_request_context_t),
13153 "::",
13154 stringify!(clear_http_auth_credentials)
13155 )
13156 );
13157 assert_eq!(
13158 unsafe { ::std::ptr::addr_of!((*ptr).close_all_connections) as usize - ptr as usize },
13159 160usize,
13160 concat!(
13161 "Offset of field: ",
13162 stringify!(_cef_request_context_t),
13163 "::",
13164 stringify!(close_all_connections)
13165 )
13166 );
13167 assert_eq!(
13168 unsafe { ::std::ptr::addr_of!((*ptr).resolve_host) as usize - ptr as usize },
13169 168usize,
13170 concat!(
13171 "Offset of field: ",
13172 stringify!(_cef_request_context_t),
13173 "::",
13174 stringify!(resolve_host)
13175 )
13176 );
13177 assert_eq!(
13178 unsafe { ::std::ptr::addr_of!((*ptr).load_extension) as usize - ptr as usize },
13179 176usize,
13180 concat!(
13181 "Offset of field: ",
13182 stringify!(_cef_request_context_t),
13183 "::",
13184 stringify!(load_extension)
13185 )
13186 );
13187 assert_eq!(
13188 unsafe { ::std::ptr::addr_of!((*ptr).did_load_extension) as usize - ptr as usize },
13189 184usize,
13190 concat!(
13191 "Offset of field: ",
13192 stringify!(_cef_request_context_t),
13193 "::",
13194 stringify!(did_load_extension)
13195 )
13196 );
13197 assert_eq!(
13198 unsafe { ::std::ptr::addr_of!((*ptr).has_extension) as usize - ptr as usize },
13199 192usize,
13200 concat!(
13201 "Offset of field: ",
13202 stringify!(_cef_request_context_t),
13203 "::",
13204 stringify!(has_extension)
13205 )
13206 );
13207 assert_eq!(
13208 unsafe { ::std::ptr::addr_of!((*ptr).get_extensions) as usize - ptr as usize },
13209 200usize,
13210 concat!(
13211 "Offset of field: ",
13212 stringify!(_cef_request_context_t),
13213 "::",
13214 stringify!(get_extensions)
13215 )
13216 );
13217 assert_eq!(
13218 unsafe { ::std::ptr::addr_of!((*ptr).get_extension) as usize - ptr as usize },
13219 208usize,
13220 concat!(
13221 "Offset of field: ",
13222 stringify!(_cef_request_context_t),
13223 "::",
13224 stringify!(get_extension)
13225 )
13226 );
13227 assert_eq!(
13228 unsafe { ::std::ptr::addr_of!((*ptr).get_media_router) as usize - ptr as usize },
13229 216usize,
13230 concat!(
13231 "Offset of field: ",
13232 stringify!(_cef_request_context_t),
13233 "::",
13234 stringify!(get_media_router)
13235 )
13236 );
13237 assert_eq!(
13238 unsafe { ::std::ptr::addr_of!((*ptr).get_website_setting) as usize - ptr as usize },
13239 224usize,
13240 concat!(
13241 "Offset of field: ",
13242 stringify!(_cef_request_context_t),
13243 "::",
13244 stringify!(get_website_setting)
13245 )
13246 );
13247 assert_eq!(
13248 unsafe { ::std::ptr::addr_of!((*ptr).set_website_setting) as usize - ptr as usize },
13249 232usize,
13250 concat!(
13251 "Offset of field: ",
13252 stringify!(_cef_request_context_t),
13253 "::",
13254 stringify!(set_website_setting)
13255 )
13256 );
13257 assert_eq!(
13258 unsafe { ::std::ptr::addr_of!((*ptr).get_content_setting) as usize - ptr as usize },
13259 240usize,
13260 concat!(
13261 "Offset of field: ",
13262 stringify!(_cef_request_context_t),
13263 "::",
13264 stringify!(get_content_setting)
13265 )
13266 );
13267 assert_eq!(
13268 unsafe { ::std::ptr::addr_of!((*ptr).set_content_setting) as usize - ptr as usize },
13269 248usize,
13270 concat!(
13271 "Offset of field: ",
13272 stringify!(_cef_request_context_t),
13273 "::",
13274 stringify!(set_content_setting)
13275 )
13276 );
13277}
13278#[doc = "\n A request context provides request handling for a set of related browser or\n URL request objects. A request context can be specified when creating a new\n browser via the cef_browser_host_t static factory functions or when creating\n a new URL request via the cef_urlrequest_t static factory functions. Browser\n objects with different request contexts will never be hosted in the same\n render process. Browser objects with the same request context may or may not\n be hosted in the same render process depending on the process model. Browser\n objects created indirectly via the JavaScript window.open function or\n targeted links will share the same render process and the same request\n context as the source browser. When running in single-process mode there is\n only a single render process (the main process) and so all browsers created\n in single-process mode will share the same request context. This will be the\n first request context passed into a cef_browser_host_t static factory\n function and all other request context objects will be ignored.\n"]
13279pub type cef_request_context_t = _cef_request_context_t;
13280extern "C" {
13281 #[doc = "\n Returns the global context object.\n"]
13282 pub fn cef_request_context_get_global_context() -> *mut cef_request_context_t;
13283}
13284extern "C" {
13285 #[doc = "\n Creates a new context object with the specified |settings| and optional\n |handler|.\n"]
13286 pub fn cef_request_context_create_context(
13287 settings: *const _cef_request_context_settings_t,
13288 handler: *mut _cef_request_context_handler_t,
13289 ) -> *mut cef_request_context_t;
13290}
13291extern "C" {
13292 #[doc = "\n Creates a new context object that shares storage with |other| and uses an\n optional |handler|.\n"]
13293 pub fn cef_create_context_shared(
13294 other: *mut cef_request_context_t,
13295 handler: *mut _cef_request_context_handler_t,
13296 ) -> *mut cef_request_context_t;
13297}
13298#[doc = "\n Structure used to represent a browser. When used in the browser process the\n functions of this structure may be called on any thread unless otherwise\n indicated in the comments. When used in the render process the functions of\n this structure may only be called on the main thread.\n"]
13299#[repr(C)]
13300#[derive(Debug, Copy, Clone)]
13301pub struct _cef_browser_t {
13302 #[doc = "\n Base structure.\n"]
13303 pub base: cef_base_ref_counted_t,
13304 #[doc = "\n True if this object is currently valid. This will return false (0) after\n cef_life_span_handler_t::OnBeforeClose is called.\n"]
13305 pub is_valid: ::std::option::Option<
13306 unsafe extern "C" fn(self_: *mut _cef_browser_t) -> ::std::os::raw::c_int,
13307 >,
13308 #[doc = "\n Returns the browser host object. This function can only be called in the\n browser process.\n"]
13309 pub get_host: ::std::option::Option<
13310 unsafe extern "C" fn(self_: *mut _cef_browser_t) -> *mut _cef_browser_host_t,
13311 >,
13312 #[doc = "\n Returns true (1) if the browser can navigate backwards.\n"]
13313 pub can_go_back: ::std::option::Option<
13314 unsafe extern "C" fn(self_: *mut _cef_browser_t) -> ::std::os::raw::c_int,
13315 >,
13316 #[doc = "\n Navigate backwards.\n"]
13317 pub go_back: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_t)>,
13318 #[doc = "\n Returns true (1) if the browser can navigate forwards.\n"]
13319 pub can_go_forward: ::std::option::Option<
13320 unsafe extern "C" fn(self_: *mut _cef_browser_t) -> ::std::os::raw::c_int,
13321 >,
13322 #[doc = "\n Navigate forwards.\n"]
13323 pub go_forward: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_t)>,
13324 #[doc = "\n Returns true (1) if the browser is currently loading.\n"]
13325 pub is_loading: ::std::option::Option<
13326 unsafe extern "C" fn(self_: *mut _cef_browser_t) -> ::std::os::raw::c_int,
13327 >,
13328 #[doc = "\n Reload the current page.\n"]
13329 pub reload: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_t)>,
13330 #[doc = "\n Reload the current page ignoring any cached data.\n"]
13331 pub reload_ignore_cache:
13332 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_t)>,
13333 #[doc = "\n Stop loading the page.\n"]
13334 pub stop_load: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_t)>,
13335 #[doc = "\n Returns the globally unique identifier for this browser. This value is\n also used as the tabId for extension APIs.\n"]
13336 pub get_identifier: ::std::option::Option<
13337 unsafe extern "C" fn(self_: *mut _cef_browser_t) -> ::std::os::raw::c_int,
13338 >,
13339 #[doc = "\n Returns true (1) if this object is pointing to the same handle as |that|\n object.\n"]
13340 pub is_same: ::std::option::Option<
13341 unsafe extern "C" fn(
13342 self_: *mut _cef_browser_t,
13343 that: *mut _cef_browser_t,
13344 ) -> ::std::os::raw::c_int,
13345 >,
13346 #[doc = "\n Returns true (1) if the browser is a popup.\n"]
13347 pub is_popup: ::std::option::Option<
13348 unsafe extern "C" fn(self_: *mut _cef_browser_t) -> ::std::os::raw::c_int,
13349 >,
13350 #[doc = "\n Returns true (1) if a document has been loaded in the browser.\n"]
13351 pub has_document: ::std::option::Option<
13352 unsafe extern "C" fn(self_: *mut _cef_browser_t) -> ::std::os::raw::c_int,
13353 >,
13354 #[doc = "\n Returns the main (top-level) frame for the browser. In the browser process\n this will return a valid object until after\n cef_life_span_handler_t::OnBeforeClose is called. In the renderer process\n this will return NULL if the main frame is hosted in a different renderer\n process (e.g. for cross-origin sub-frames). The main frame object will\n change during cross-origin navigation or re-navigation after renderer\n process termination (due to crashes, etc).\n"]
13355 pub get_main_frame: ::std::option::Option<
13356 unsafe extern "C" fn(self_: *mut _cef_browser_t) -> *mut _cef_frame_t,
13357 >,
13358 #[doc = "\n Returns the focused frame for the browser.\n"]
13359 pub get_focused_frame: ::std::option::Option<
13360 unsafe extern "C" fn(self_: *mut _cef_browser_t) -> *mut _cef_frame_t,
13361 >,
13362 #[doc = "\n Returns the frame with the specified identifier, or NULL if not found.\n"]
13363 pub get_frame_byident: ::std::option::Option<
13364 unsafe extern "C" fn(self_: *mut _cef_browser_t, identifier: i64) -> *mut _cef_frame_t,
13365 >,
13366 #[doc = "\n Returns the frame with the specified name, or NULL if not found.\n"]
13367 pub get_frame: ::std::option::Option<
13368 unsafe extern "C" fn(
13369 self_: *mut _cef_browser_t,
13370 name: *const cef_string_t,
13371 ) -> *mut _cef_frame_t,
13372 >,
13373 #[doc = "\n Returns the number of frames that currently exist.\n"]
13374 pub get_frame_count:
13375 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_t) -> usize>,
13376 #[doc = "\n Returns the identifiers of all existing frames.\n"]
13377 pub get_frame_identifiers: ::std::option::Option<
13378 unsafe extern "C" fn(
13379 self_: *mut _cef_browser_t,
13380 identifiersCount: *mut usize,
13381 identifiers: *mut i64,
13382 ),
13383 >,
13384 #[doc = "\n Returns the names of all existing frames.\n"]
13385 pub get_frame_names: ::std::option::Option<
13386 unsafe extern "C" fn(self_: *mut _cef_browser_t, names: cef_string_list_t),
13387 >,
13388}
13389#[test]
13390fn bindgen_test_layout__cef_browser_t() {
13391 const UNINIT: ::std::mem::MaybeUninit<_cef_browser_t> = ::std::mem::MaybeUninit::uninit();
13392 let ptr = UNINIT.as_ptr();
13393 assert_eq!(
13394 ::std::mem::size_of::<_cef_browser_t>(),
13395 208usize,
13396 concat!("Size of: ", stringify!(_cef_browser_t))
13397 );
13398 assert_eq!(
13399 ::std::mem::align_of::<_cef_browser_t>(),
13400 8usize,
13401 concat!("Alignment of ", stringify!(_cef_browser_t))
13402 );
13403 assert_eq!(
13404 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
13405 0usize,
13406 concat!(
13407 "Offset of field: ",
13408 stringify!(_cef_browser_t),
13409 "::",
13410 stringify!(base)
13411 )
13412 );
13413 assert_eq!(
13414 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
13415 40usize,
13416 concat!(
13417 "Offset of field: ",
13418 stringify!(_cef_browser_t),
13419 "::",
13420 stringify!(is_valid)
13421 )
13422 );
13423 assert_eq!(
13424 unsafe { ::std::ptr::addr_of!((*ptr).get_host) as usize - ptr as usize },
13425 48usize,
13426 concat!(
13427 "Offset of field: ",
13428 stringify!(_cef_browser_t),
13429 "::",
13430 stringify!(get_host)
13431 )
13432 );
13433 assert_eq!(
13434 unsafe { ::std::ptr::addr_of!((*ptr).can_go_back) as usize - ptr as usize },
13435 56usize,
13436 concat!(
13437 "Offset of field: ",
13438 stringify!(_cef_browser_t),
13439 "::",
13440 stringify!(can_go_back)
13441 )
13442 );
13443 assert_eq!(
13444 unsafe { ::std::ptr::addr_of!((*ptr).go_back) as usize - ptr as usize },
13445 64usize,
13446 concat!(
13447 "Offset of field: ",
13448 stringify!(_cef_browser_t),
13449 "::",
13450 stringify!(go_back)
13451 )
13452 );
13453 assert_eq!(
13454 unsafe { ::std::ptr::addr_of!((*ptr).can_go_forward) as usize - ptr as usize },
13455 72usize,
13456 concat!(
13457 "Offset of field: ",
13458 stringify!(_cef_browser_t),
13459 "::",
13460 stringify!(can_go_forward)
13461 )
13462 );
13463 assert_eq!(
13464 unsafe { ::std::ptr::addr_of!((*ptr).go_forward) as usize - ptr as usize },
13465 80usize,
13466 concat!(
13467 "Offset of field: ",
13468 stringify!(_cef_browser_t),
13469 "::",
13470 stringify!(go_forward)
13471 )
13472 );
13473 assert_eq!(
13474 unsafe { ::std::ptr::addr_of!((*ptr).is_loading) as usize - ptr as usize },
13475 88usize,
13476 concat!(
13477 "Offset of field: ",
13478 stringify!(_cef_browser_t),
13479 "::",
13480 stringify!(is_loading)
13481 )
13482 );
13483 assert_eq!(
13484 unsafe { ::std::ptr::addr_of!((*ptr).reload) as usize - ptr as usize },
13485 96usize,
13486 concat!(
13487 "Offset of field: ",
13488 stringify!(_cef_browser_t),
13489 "::",
13490 stringify!(reload)
13491 )
13492 );
13493 assert_eq!(
13494 unsafe { ::std::ptr::addr_of!((*ptr).reload_ignore_cache) as usize - ptr as usize },
13495 104usize,
13496 concat!(
13497 "Offset of field: ",
13498 stringify!(_cef_browser_t),
13499 "::",
13500 stringify!(reload_ignore_cache)
13501 )
13502 );
13503 assert_eq!(
13504 unsafe { ::std::ptr::addr_of!((*ptr).stop_load) as usize - ptr as usize },
13505 112usize,
13506 concat!(
13507 "Offset of field: ",
13508 stringify!(_cef_browser_t),
13509 "::",
13510 stringify!(stop_load)
13511 )
13512 );
13513 assert_eq!(
13514 unsafe { ::std::ptr::addr_of!((*ptr).get_identifier) as usize - ptr as usize },
13515 120usize,
13516 concat!(
13517 "Offset of field: ",
13518 stringify!(_cef_browser_t),
13519 "::",
13520 stringify!(get_identifier)
13521 )
13522 );
13523 assert_eq!(
13524 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
13525 128usize,
13526 concat!(
13527 "Offset of field: ",
13528 stringify!(_cef_browser_t),
13529 "::",
13530 stringify!(is_same)
13531 )
13532 );
13533 assert_eq!(
13534 unsafe { ::std::ptr::addr_of!((*ptr).is_popup) as usize - ptr as usize },
13535 136usize,
13536 concat!(
13537 "Offset of field: ",
13538 stringify!(_cef_browser_t),
13539 "::",
13540 stringify!(is_popup)
13541 )
13542 );
13543 assert_eq!(
13544 unsafe { ::std::ptr::addr_of!((*ptr).has_document) as usize - ptr as usize },
13545 144usize,
13546 concat!(
13547 "Offset of field: ",
13548 stringify!(_cef_browser_t),
13549 "::",
13550 stringify!(has_document)
13551 )
13552 );
13553 assert_eq!(
13554 unsafe { ::std::ptr::addr_of!((*ptr).get_main_frame) as usize - ptr as usize },
13555 152usize,
13556 concat!(
13557 "Offset of field: ",
13558 stringify!(_cef_browser_t),
13559 "::",
13560 stringify!(get_main_frame)
13561 )
13562 );
13563 assert_eq!(
13564 unsafe { ::std::ptr::addr_of!((*ptr).get_focused_frame) as usize - ptr as usize },
13565 160usize,
13566 concat!(
13567 "Offset of field: ",
13568 stringify!(_cef_browser_t),
13569 "::",
13570 stringify!(get_focused_frame)
13571 )
13572 );
13573 assert_eq!(
13574 unsafe { ::std::ptr::addr_of!((*ptr).get_frame_byident) as usize - ptr as usize },
13575 168usize,
13576 concat!(
13577 "Offset of field: ",
13578 stringify!(_cef_browser_t),
13579 "::",
13580 stringify!(get_frame_byident)
13581 )
13582 );
13583 assert_eq!(
13584 unsafe { ::std::ptr::addr_of!((*ptr).get_frame) as usize - ptr as usize },
13585 176usize,
13586 concat!(
13587 "Offset of field: ",
13588 stringify!(_cef_browser_t),
13589 "::",
13590 stringify!(get_frame)
13591 )
13592 );
13593 assert_eq!(
13594 unsafe { ::std::ptr::addr_of!((*ptr).get_frame_count) as usize - ptr as usize },
13595 184usize,
13596 concat!(
13597 "Offset of field: ",
13598 stringify!(_cef_browser_t),
13599 "::",
13600 stringify!(get_frame_count)
13601 )
13602 );
13603 assert_eq!(
13604 unsafe { ::std::ptr::addr_of!((*ptr).get_frame_identifiers) as usize - ptr as usize },
13605 192usize,
13606 concat!(
13607 "Offset of field: ",
13608 stringify!(_cef_browser_t),
13609 "::",
13610 stringify!(get_frame_identifiers)
13611 )
13612 );
13613 assert_eq!(
13614 unsafe { ::std::ptr::addr_of!((*ptr).get_frame_names) as usize - ptr as usize },
13615 200usize,
13616 concat!(
13617 "Offset of field: ",
13618 stringify!(_cef_browser_t),
13619 "::",
13620 stringify!(get_frame_names)
13621 )
13622 );
13623}
13624#[doc = "\n Structure used to represent a browser. When used in the browser process the\n functions of this structure may be called on any thread unless otherwise\n indicated in the comments. When used in the render process the functions of\n this structure may only be called on the main thread.\n"]
13625pub type cef_browser_t = _cef_browser_t;
13626#[doc = "\n Callback structure for cef_browser_host_t::RunFileDialog. The functions of\n this structure will be called on the browser process UI thread.\n"]
13627#[repr(C)]
13628#[derive(Debug, Copy, Clone)]
13629pub struct _cef_run_file_dialog_callback_t {
13630 #[doc = "\n Base structure.\n"]
13631 pub base: cef_base_ref_counted_t,
13632 #[doc = "\n Called asynchronously after the file dialog is dismissed. |file_paths|\n will be a single value or a list of values depending on the dialog mode.\n If the selection was cancelled |file_paths| will be NULL.\n"]
13633 pub on_file_dialog_dismissed: ::std::option::Option<
13634 unsafe extern "C" fn(
13635 self_: *mut _cef_run_file_dialog_callback_t,
13636 file_paths: cef_string_list_t,
13637 ),
13638 >,
13639}
13640#[test]
13641fn bindgen_test_layout__cef_run_file_dialog_callback_t() {
13642 const UNINIT: ::std::mem::MaybeUninit<_cef_run_file_dialog_callback_t> =
13643 ::std::mem::MaybeUninit::uninit();
13644 let ptr = UNINIT.as_ptr();
13645 assert_eq!(
13646 ::std::mem::size_of::<_cef_run_file_dialog_callback_t>(),
13647 48usize,
13648 concat!("Size of: ", stringify!(_cef_run_file_dialog_callback_t))
13649 );
13650 assert_eq!(
13651 ::std::mem::align_of::<_cef_run_file_dialog_callback_t>(),
13652 8usize,
13653 concat!("Alignment of ", stringify!(_cef_run_file_dialog_callback_t))
13654 );
13655 assert_eq!(
13656 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
13657 0usize,
13658 concat!(
13659 "Offset of field: ",
13660 stringify!(_cef_run_file_dialog_callback_t),
13661 "::",
13662 stringify!(base)
13663 )
13664 );
13665 assert_eq!(
13666 unsafe { ::std::ptr::addr_of!((*ptr).on_file_dialog_dismissed) as usize - ptr as usize },
13667 40usize,
13668 concat!(
13669 "Offset of field: ",
13670 stringify!(_cef_run_file_dialog_callback_t),
13671 "::",
13672 stringify!(on_file_dialog_dismissed)
13673 )
13674 );
13675}
13676#[doc = "\n Callback structure for cef_browser_host_t::RunFileDialog. The functions of\n this structure will be called on the browser process UI thread.\n"]
13677pub type cef_run_file_dialog_callback_t = _cef_run_file_dialog_callback_t;
13678#[doc = "\n Callback structure for cef_browser_host_t::GetNavigationEntries. The\n functions of this structure will be called on the browser process UI thread.\n"]
13679#[repr(C)]
13680#[derive(Debug, Copy, Clone)]
13681pub struct _cef_navigation_entry_visitor_t {
13682 #[doc = "\n Base structure.\n"]
13683 pub base: cef_base_ref_counted_t,
13684 #[doc = "\n Method that will be executed. Do not keep a reference to |entry| outside\n of this callback. Return true (1) to continue visiting entries or false\n (0) to stop. |current| is true (1) if this entry is the currently loaded\n navigation entry. |index| is the 0-based index of this entry and |total|\n is the total number of entries.\n"]
13685 pub visit: ::std::option::Option<
13686 unsafe extern "C" fn(
13687 self_: *mut _cef_navigation_entry_visitor_t,
13688 entry: *mut _cef_navigation_entry_t,
13689 current: ::std::os::raw::c_int,
13690 index: ::std::os::raw::c_int,
13691 total: ::std::os::raw::c_int,
13692 ) -> ::std::os::raw::c_int,
13693 >,
13694}
13695#[test]
13696fn bindgen_test_layout__cef_navigation_entry_visitor_t() {
13697 const UNINIT: ::std::mem::MaybeUninit<_cef_navigation_entry_visitor_t> =
13698 ::std::mem::MaybeUninit::uninit();
13699 let ptr = UNINIT.as_ptr();
13700 assert_eq!(
13701 ::std::mem::size_of::<_cef_navigation_entry_visitor_t>(),
13702 48usize,
13703 concat!("Size of: ", stringify!(_cef_navigation_entry_visitor_t))
13704 );
13705 assert_eq!(
13706 ::std::mem::align_of::<_cef_navigation_entry_visitor_t>(),
13707 8usize,
13708 concat!("Alignment of ", stringify!(_cef_navigation_entry_visitor_t))
13709 );
13710 assert_eq!(
13711 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
13712 0usize,
13713 concat!(
13714 "Offset of field: ",
13715 stringify!(_cef_navigation_entry_visitor_t),
13716 "::",
13717 stringify!(base)
13718 )
13719 );
13720 assert_eq!(
13721 unsafe { ::std::ptr::addr_of!((*ptr).visit) as usize - ptr as usize },
13722 40usize,
13723 concat!(
13724 "Offset of field: ",
13725 stringify!(_cef_navigation_entry_visitor_t),
13726 "::",
13727 stringify!(visit)
13728 )
13729 );
13730}
13731#[doc = "\n Callback structure for cef_browser_host_t::GetNavigationEntries. The\n functions of this structure will be called on the browser process UI thread.\n"]
13732pub type cef_navigation_entry_visitor_t = _cef_navigation_entry_visitor_t;
13733#[doc = "\n Callback structure for cef_browser_host_t::PrintToPDF. The functions of this\n structure will be called on the browser process UI thread.\n"]
13734#[repr(C)]
13735#[derive(Debug, Copy, Clone)]
13736pub struct _cef_pdf_print_callback_t {
13737 #[doc = "\n Base structure.\n"]
13738 pub base: cef_base_ref_counted_t,
13739 #[doc = "\n Method that will be executed when the PDF printing has completed. |path|\n is the output path. |ok| will be true (1) if the printing completed\n successfully or false (0) otherwise.\n"]
13740 pub on_pdf_print_finished: ::std::option::Option<
13741 unsafe extern "C" fn(
13742 self_: *mut _cef_pdf_print_callback_t,
13743 path: *const cef_string_t,
13744 ok: ::std::os::raw::c_int,
13745 ),
13746 >,
13747}
13748#[test]
13749fn bindgen_test_layout__cef_pdf_print_callback_t() {
13750 const UNINIT: ::std::mem::MaybeUninit<_cef_pdf_print_callback_t> =
13751 ::std::mem::MaybeUninit::uninit();
13752 let ptr = UNINIT.as_ptr();
13753 assert_eq!(
13754 ::std::mem::size_of::<_cef_pdf_print_callback_t>(),
13755 48usize,
13756 concat!("Size of: ", stringify!(_cef_pdf_print_callback_t))
13757 );
13758 assert_eq!(
13759 ::std::mem::align_of::<_cef_pdf_print_callback_t>(),
13760 8usize,
13761 concat!("Alignment of ", stringify!(_cef_pdf_print_callback_t))
13762 );
13763 assert_eq!(
13764 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
13765 0usize,
13766 concat!(
13767 "Offset of field: ",
13768 stringify!(_cef_pdf_print_callback_t),
13769 "::",
13770 stringify!(base)
13771 )
13772 );
13773 assert_eq!(
13774 unsafe { ::std::ptr::addr_of!((*ptr).on_pdf_print_finished) as usize - ptr as usize },
13775 40usize,
13776 concat!(
13777 "Offset of field: ",
13778 stringify!(_cef_pdf_print_callback_t),
13779 "::",
13780 stringify!(on_pdf_print_finished)
13781 )
13782 );
13783}
13784#[doc = "\n Callback structure for cef_browser_host_t::PrintToPDF. The functions of this\n structure will be called on the browser process UI thread.\n"]
13785pub type cef_pdf_print_callback_t = _cef_pdf_print_callback_t;
13786#[doc = "\n Callback structure for cef_browser_host_t::DownloadImage. The functions of\n this structure will be called on the browser process UI thread.\n"]
13787#[repr(C)]
13788#[derive(Debug, Copy, Clone)]
13789pub struct _cef_download_image_callback_t {
13790 #[doc = "\n Base structure.\n"]
13791 pub base: cef_base_ref_counted_t,
13792 #[doc = "\n Method that will be executed when the image download has completed.\n |image_url| is the URL that was downloaded and |http_status_code| is the\n resulting HTTP status code. |image| is the resulting image, possibly at\n multiple scale factors, or NULL if the download failed.\n"]
13793 pub on_download_image_finished: ::std::option::Option<
13794 unsafe extern "C" fn(
13795 self_: *mut _cef_download_image_callback_t,
13796 image_url: *const cef_string_t,
13797 http_status_code: ::std::os::raw::c_int,
13798 image: *mut _cef_image_t,
13799 ),
13800 >,
13801}
13802#[test]
13803fn bindgen_test_layout__cef_download_image_callback_t() {
13804 const UNINIT: ::std::mem::MaybeUninit<_cef_download_image_callback_t> =
13805 ::std::mem::MaybeUninit::uninit();
13806 let ptr = UNINIT.as_ptr();
13807 assert_eq!(
13808 ::std::mem::size_of::<_cef_download_image_callback_t>(),
13809 48usize,
13810 concat!("Size of: ", stringify!(_cef_download_image_callback_t))
13811 );
13812 assert_eq!(
13813 ::std::mem::align_of::<_cef_download_image_callback_t>(),
13814 8usize,
13815 concat!("Alignment of ", stringify!(_cef_download_image_callback_t))
13816 );
13817 assert_eq!(
13818 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
13819 0usize,
13820 concat!(
13821 "Offset of field: ",
13822 stringify!(_cef_download_image_callback_t),
13823 "::",
13824 stringify!(base)
13825 )
13826 );
13827 assert_eq!(
13828 unsafe { ::std::ptr::addr_of!((*ptr).on_download_image_finished) as usize - ptr as usize },
13829 40usize,
13830 concat!(
13831 "Offset of field: ",
13832 stringify!(_cef_download_image_callback_t),
13833 "::",
13834 stringify!(on_download_image_finished)
13835 )
13836 );
13837}
13838#[doc = "\n Callback structure for cef_browser_host_t::DownloadImage. The functions of\n this structure will be called on the browser process UI thread.\n"]
13839pub type cef_download_image_callback_t = _cef_download_image_callback_t;
13840#[doc = "\n Structure used to represent the browser process aspects of a browser. The\n functions of this structure can only be called in the browser process. They\n may be called on any thread in that process unless otherwise indicated in\n the comments.\n"]
13841#[repr(C)]
13842#[derive(Debug, Copy, Clone)]
13843pub struct _cef_browser_host_t {
13844 #[doc = "\n Base structure.\n"]
13845 pub base: cef_base_ref_counted_t,
13846 #[doc = "\n Returns the hosted browser object.\n"]
13847 pub get_browser: ::std::option::Option<
13848 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> *mut _cef_browser_t,
13849 >,
13850 #[doc = "\n Request that the browser close. The JavaScript 'onbeforeunload' event will\n be fired. If |force_close| is false (0) the event handler, if any, will be\n allowed to prompt the user and the user can optionally cancel the close.\n If |force_close| is true (1) the prompt will not be displayed and the\n close will proceed. Results in a call to\n cef_life_span_handler_t::do_close() if the event handler allows the close\n or if |force_close| is true (1). See cef_life_span_handler_t::do_close()\n documentation for additional usage information.\n"]
13851 pub close_browser: ::std::option::Option<
13852 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, force_close: ::std::os::raw::c_int),
13853 >,
13854 #[doc = "\n Helper for closing a browser. Call this function from the top-level window\n close handler (if any). Internally this calls CloseBrowser(false (0)) if\n the close has not yet been initiated. This function returns false (0)\n while the close is pending and true (1) after the close has completed. See\n close_browser() and cef_life_span_handler_t::do_close() documentation for\n additional usage information. This function must be called on the browser\n process UI thread.\n"]
13855 pub try_close_browser: ::std::option::Option<
13856 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> ::std::os::raw::c_int,
13857 >,
13858 #[doc = "\n Set whether the browser is focused.\n"]
13859 pub set_focus: ::std::option::Option<
13860 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, focus: ::std::os::raw::c_int),
13861 >,
13862 #[doc = "\n Retrieve the window handle (if any) for this browser. If this browser is\n wrapped in a cef_browser_view_t this function should be called on the\n browser process UI thread and it will return the handle for the top-level\n native window.\n"]
13863 pub get_window_handle: ::std::option::Option<
13864 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> ::std::os::raw::c_ulong,
13865 >,
13866 #[doc = "\n Retrieve the window handle (if any) of the browser that opened this\n browser. Will return NULL for non-popup browsers or if this browser is\n wrapped in a cef_browser_view_t. This function can be used in combination\n with custom handling of modal windows.\n"]
13867 pub get_opener_window_handle: ::std::option::Option<
13868 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> ::std::os::raw::c_ulong,
13869 >,
13870 #[doc = "\n Returns true (1) if this browser is wrapped in a cef_browser_view_t.\n"]
13871 pub has_view: ::std::option::Option<
13872 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> ::std::os::raw::c_int,
13873 >,
13874 #[doc = "\n Returns the client for this browser.\n"]
13875 pub get_client: ::std::option::Option<
13876 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> *mut _cef_client_t,
13877 >,
13878 #[doc = "\n Returns the request context for this browser.\n"]
13879 pub get_request_context: ::std::option::Option<
13880 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> *mut _cef_request_context_t,
13881 >,
13882 #[doc = "\n Get the current zoom level. The default zoom level is 0.0. This function\n can only be called on the UI thread.\n"]
13883 pub get_zoom_level:
13884 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> f64>,
13885 #[doc = "\n Change the zoom level to the specified value. Specify 0.0 to reset the\n zoom level. If called on the UI thread the change will be applied\n immediately. Otherwise, the change will be applied asynchronously on the\n UI thread.\n"]
13886 pub set_zoom_level: ::std::option::Option<
13887 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, zoomLevel: f64),
13888 >,
13889 #[doc = "\n Call to run a file chooser dialog. Only a single file chooser dialog may\n be pending at any given time. |mode| represents the type of dialog to\n display. |title| to the title to be used for the dialog and may be NULL to\n show the default title (\"Open\" or \"Save\" depending on the mode).\n |default_file_path| is the path with optional directory and/or file name\n component that will be initially selected in the dialog. |accept_filters|\n are used to restrict the selectable file types and may any combination of\n (a) valid lower-cased MIME types (e.g. \"text/*\" or \"image/*\"), (b)\n individual file extensions (e.g. \".txt\" or \".png\"), or (c) combined\n description and file extension delimited using \"|\" and \";\" (e.g. \"Image\n Types|.png;.gif;.jpg\"). |callback| will be executed after the dialog is\n dismissed or immediately if another dialog is already pending. The dialog\n will be initiated asynchronously on the UI thread.\n"]
13890 pub run_file_dialog: ::std::option::Option<
13891 unsafe extern "C" fn(
13892 self_: *mut _cef_browser_host_t,
13893 mode: cef_file_dialog_mode_t,
13894 title: *const cef_string_t,
13895 default_file_path: *const cef_string_t,
13896 accept_filters: cef_string_list_t,
13897 callback: *mut _cef_run_file_dialog_callback_t,
13898 ),
13899 >,
13900 #[doc = "\n Download the file at |url| using cef_download_handler_t.\n"]
13901 pub start_download: ::std::option::Option<
13902 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, url: *const cef_string_t),
13903 >,
13904 #[doc = "\n Download |image_url| and execute |callback| on completion with the images\n received from the renderer. If |is_favicon| is true (1) then cookies are\n not sent and not accepted during download. Images with density independent\n pixel (DIP) sizes larger than |max_image_size| are filtered out from the\n image results. Versions of the image at different scale factors may be\n downloaded up to the maximum scale factor supported by the system. If\n there are no image results <= |max_image_size| then the smallest image is\n resized to |max_image_size| and is the only result. A |max_image_size| of\n 0 means unlimited. If |bypass_cache| is true (1) then |image_url| is\n requested from the server even if it is present in the browser cache.\n"]
13905 pub download_image: ::std::option::Option<
13906 unsafe extern "C" fn(
13907 self_: *mut _cef_browser_host_t,
13908 image_url: *const cef_string_t,
13909 is_favicon: ::std::os::raw::c_int,
13910 max_image_size: u32,
13911 bypass_cache: ::std::os::raw::c_int,
13912 callback: *mut _cef_download_image_callback_t,
13913 ),
13914 >,
13915 #[doc = "\n Print the current browser contents.\n"]
13916 pub print: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_host_t)>,
13917 #[doc = "\n Print the current browser contents to the PDF file specified by |path| and\n execute |callback| on completion. The caller is responsible for deleting\n |path| when done. For PDF printing to work on Linux you must implement the\n cef_print_handler_t::GetPdfPaperSize function.\n"]
13918 pub print_to_pdf: ::std::option::Option<
13919 unsafe extern "C" fn(
13920 self_: *mut _cef_browser_host_t,
13921 path: *const cef_string_t,
13922 settings: *const _cef_pdf_print_settings_t,
13923 callback: *mut _cef_pdf_print_callback_t,
13924 ),
13925 >,
13926 #[doc = "\n Search for |searchText|. |forward| indicates whether to search forward or\n backward within the page. |matchCase| indicates whether the search should\n be case-sensitive. |findNext| indicates whether this is the first request\n or a follow-up. The search will be restarted if |searchText| or\n |matchCase| change. The search will be stopped if |searchText| is NULL.\n The cef_find_handler_t instance, if any, returned via\n cef_client_t::GetFindHandler will be called to report find results.\n"]
13927 pub find: ::std::option::Option<
13928 unsafe extern "C" fn(
13929 self_: *mut _cef_browser_host_t,
13930 searchText: *const cef_string_t,
13931 forward: ::std::os::raw::c_int,
13932 matchCase: ::std::os::raw::c_int,
13933 findNext: ::std::os::raw::c_int,
13934 ),
13935 >,
13936 #[doc = "\n Cancel all searches that are currently going on.\n"]
13937 pub stop_finding: ::std::option::Option<
13938 unsafe extern "C" fn(
13939 self_: *mut _cef_browser_host_t,
13940 clearSelection: ::std::os::raw::c_int,
13941 ),
13942 >,
13943 #[doc = "\n Open developer tools (DevTools) in its own browser. The DevTools browser\n will remain associated with this browser. If the DevTools browser is\n already open then it will be focused, in which case the |windowInfo|,\n |client| and |settings| parameters will be ignored. If\n |inspect_element_at| is non-NULL then the element at the specified (x,y)\n location will be inspected. The |windowInfo| parameter will be ignored if\n this browser is wrapped in a cef_browser_view_t.\n"]
13944 pub show_dev_tools: ::std::option::Option<
13945 unsafe extern "C" fn(
13946 self_: *mut _cef_browser_host_t,
13947 windowInfo: *const _cef_window_info_t,
13948 client: *mut _cef_client_t,
13949 settings: *const _cef_browser_settings_t,
13950 inspect_element_at: *const cef_point_t,
13951 ),
13952 >,
13953 #[doc = "\n Explicitly close the associated DevTools browser, if any.\n"]
13954 pub close_dev_tools:
13955 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_host_t)>,
13956 #[doc = "\n Returns true (1) if this browser currently has an associated DevTools\n browser. Must be called on the browser process UI thread.\n"]
13957 pub has_dev_tools: ::std::option::Option<
13958 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> ::std::os::raw::c_int,
13959 >,
13960 #[doc = "\n Send a function call message over the DevTools protocol. |message| must be\n a UTF8-encoded JSON dictionary that contains \"id\" (int), \"function\"\n (string) and \"params\" (dictionary, optional) values. See the DevTools\n protocol documentation at https://chromedevtools.github.io/devtools-\n protocol/ for details of supported functions and the expected \"params\"\n dictionary contents. |message| will be copied if necessary. This function\n will return true (1) if called on the UI thread and the message was\n successfully submitted for validation, otherwise false (0). Validation\n will be applied asynchronously and any messages that fail due to\n formatting errors or missing parameters may be discarded without\n notification. Prefer ExecuteDevToolsMethod if a more structured approach\n to message formatting is desired.\n\n Every valid function call will result in an asynchronous function result\n or error message that references the sent message \"id\". Event messages are\n received while notifications are enabled (for example, between function\n calls for \"Page.enable\" and \"Page.disable\"). All received messages will be\n delivered to the observer(s) registered with AddDevToolsMessageObserver.\n See cef_dev_tools_message_observer_t::OnDevToolsMessage documentation for\n details of received message contents.\n\n Usage of the SendDevToolsMessage, ExecuteDevToolsMethod and\n AddDevToolsMessageObserver functions does not require an active DevTools\n front-end or remote-debugging session. Other active DevTools sessions will\n continue to function independently. However, any modification of global\n browser state by one session may not be reflected in the UI of other\n sessions.\n\n Communication with the DevTools front-end (when displayed) can be logged\n for development purposes by passing the `--devtools-protocol-log-\n file=<path>` command-line flag.\n"]
13961 pub send_dev_tools_message: ::std::option::Option<
13962 unsafe extern "C" fn(
13963 self_: *mut _cef_browser_host_t,
13964 message: *const ::std::os::raw::c_void,
13965 message_size: usize,
13966 ) -> ::std::os::raw::c_int,
13967 >,
13968 #[doc = "\n Execute a function call over the DevTools protocol. This is a more\n structured version of SendDevToolsMessage. |message_id| is an incremental\n number that uniquely identifies the message (pass 0 to have the next\n number assigned automatically based on previous values). |function| is the\n function name. |params| are the function parameters, which may be NULL.\n See the DevTools protocol documentation (linked above) for details of\n supported functions and the expected |params| dictionary contents. This\n function will return the assigned message ID if called on the UI thread\n and the message was successfully submitted for validation, otherwise 0.\n See the SendDevToolsMessage documentation for additional usage\n information.\n"]
13969 pub execute_dev_tools_method: ::std::option::Option<
13970 unsafe extern "C" fn(
13971 self_: *mut _cef_browser_host_t,
13972 message_id: ::std::os::raw::c_int,
13973 method: *const cef_string_t,
13974 params: *mut _cef_dictionary_value_t,
13975 ) -> ::std::os::raw::c_int,
13976 >,
13977 #[doc = "\n Add an observer for DevTools protocol messages (function results and\n events). The observer will remain registered until the returned\n Registration object is destroyed. See the SendDevToolsMessage\n documentation for additional usage information.\n"]
13978 pub add_dev_tools_message_observer: ::std::option::Option<
13979 unsafe extern "C" fn(
13980 self_: *mut _cef_browser_host_t,
13981 observer: *mut _cef_dev_tools_message_observer_t,
13982 ) -> *mut _cef_registration_t,
13983 >,
13984 #[doc = "\n Retrieve a snapshot of current navigation entries as values sent to the\n specified visitor. If |current_only| is true (1) only the current\n navigation entry will be sent, otherwise all navigation entries will be\n sent.\n"]
13985 pub get_navigation_entries: ::std::option::Option<
13986 unsafe extern "C" fn(
13987 self_: *mut _cef_browser_host_t,
13988 visitor: *mut _cef_navigation_entry_visitor_t,
13989 current_only: ::std::os::raw::c_int,
13990 ),
13991 >,
13992 #[doc = "\n If a misspelled word is currently selected in an editable node calling\n this function will replace it with the specified |word|.\n"]
13993 pub replace_misspelling: ::std::option::Option<
13994 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, word: *const cef_string_t),
13995 >,
13996 #[doc = "\n Add the specified |word| to the spelling dictionary.\n"]
13997 pub add_word_to_dictionary: ::std::option::Option<
13998 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, word: *const cef_string_t),
13999 >,
14000 #[doc = "\n Returns true (1) if window rendering is disabled.\n"]
14001 pub is_window_rendering_disabled: ::std::option::Option<
14002 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> ::std::os::raw::c_int,
14003 >,
14004 #[doc = "\n Notify the browser that the widget has been resized. The browser will\n first call cef_render_handler_t::GetViewRect to get the new size and then\n call cef_render_handler_t::OnPaint asynchronously with the updated\n regions. This function is only used when window rendering is disabled.\n"]
14005 pub was_resized: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_host_t)>,
14006 #[doc = "\n Notify the browser that it has been hidden or shown. Layouting and\n cef_render_handler_t::OnPaint notification will stop when the browser is\n hidden. This function is only used when window rendering is disabled.\n"]
14007 pub was_hidden: ::std::option::Option<
14008 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, hidden: ::std::os::raw::c_int),
14009 >,
14010 #[doc = "\n Send a notification to the browser that the screen info has changed. The\n browser will then call cef_render_handler_t::GetScreenInfo to update the\n screen information with the new values. This simulates moving the webview\n window from one display to another, or changing the properties of the\n current display. This function is only used when window rendering is\n disabled.\n"]
14011 pub notify_screen_info_changed:
14012 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_host_t)>,
14013 #[doc = "\n Invalidate the view. The browser will call cef_render_handler_t::OnPaint\n asynchronously. This function is only used when window rendering is\n disabled.\n"]
14014 pub invalidate: ::std::option::Option<
14015 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, type_: cef_paint_element_type_t),
14016 >,
14017 #[doc = "\n Issue a BeginFrame request to Chromium. Only valid when\n cef_window_tInfo::external_begin_frame_enabled is set to true (1).\n"]
14018 pub send_external_begin_frame:
14019 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_host_t)>,
14020 #[doc = "\n Send a key event to the browser.\n"]
14021 pub send_key_event: ::std::option::Option<
14022 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, event: *const cef_key_event_t),
14023 >,
14024 #[doc = "\n Send a mouse click event to the browser. The |x| and |y| coordinates are\n relative to the upper-left corner of the view.\n"]
14025 pub send_mouse_click_event: ::std::option::Option<
14026 unsafe extern "C" fn(
14027 self_: *mut _cef_browser_host_t,
14028 event: *const cef_mouse_event_t,
14029 type_: cef_mouse_button_type_t,
14030 mouseUp: ::std::os::raw::c_int,
14031 clickCount: ::std::os::raw::c_int,
14032 ),
14033 >,
14034 #[doc = "\n Send a mouse move event to the browser. The |x| and |y| coordinates are\n relative to the upper-left corner of the view.\n"]
14035 pub send_mouse_move_event: ::std::option::Option<
14036 unsafe extern "C" fn(
14037 self_: *mut _cef_browser_host_t,
14038 event: *const cef_mouse_event_t,
14039 mouseLeave: ::std::os::raw::c_int,
14040 ),
14041 >,
14042 #[doc = "\n Send a mouse wheel event to the browser. The |x| and |y| coordinates are\n relative to the upper-left corner of the view. The |deltaX| and |deltaY|\n values represent the movement delta in the X and Y directions\n respectively. In order to scroll inside select popups with window\n rendering disabled cef_render_handler_t::GetScreenPoint should be\n implemented properly.\n"]
14043 pub send_mouse_wheel_event: ::std::option::Option<
14044 unsafe extern "C" fn(
14045 self_: *mut _cef_browser_host_t,
14046 event: *const cef_mouse_event_t,
14047 deltaX: ::std::os::raw::c_int,
14048 deltaY: ::std::os::raw::c_int,
14049 ),
14050 >,
14051 #[doc = "\n Send a touch event to the browser for a windowless browser.\n"]
14052 pub send_touch_event: ::std::option::Option<
14053 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, event: *const cef_touch_event_t),
14054 >,
14055 #[doc = "\n Send a capture lost event to the browser.\n"]
14056 pub send_capture_lost_event:
14057 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_host_t)>,
14058 #[doc = "\n Notify the browser that the window hosting it is about to be moved or\n resized. This function is only used on Windows and Linux.\n"]
14059 pub notify_move_or_resize_started:
14060 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_host_t)>,
14061 #[doc = "\n Returns the maximum rate in frames per second (fps) that\n cef_render_handler_t::OnPaint will be called for a windowless browser. The\n actual fps may be lower if the browser cannot generate frames at the\n requested rate. The minimum value is 1 and the maximum value is 60\n (default 30). This function can only be called on the UI thread.\n"]
14062 pub get_windowless_frame_rate: ::std::option::Option<
14063 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> ::std::os::raw::c_int,
14064 >,
14065 #[doc = "\n Set the maximum rate in frames per second (fps) that\n cef_render_handler_t:: OnPaint will be called for a windowless browser.\n The actual fps may be lower if the browser cannot generate frames at the\n requested rate. The minimum value is 1 and the maximum value is 60\n (default 30). Can also be set at browser creation via\n cef_browser_tSettings.windowless_frame_rate.\n"]
14066 pub set_windowless_frame_rate: ::std::option::Option<
14067 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, frame_rate: ::std::os::raw::c_int),
14068 >,
14069 #[doc = "\n Begins a new composition or updates the existing composition. Blink has a\n special node (a composition node) that allows the input function to change\n text without affecting other DOM nodes. |text| is the optional text that\n will be inserted into the composition node. |underlines| is an optional\n set of ranges that will be underlined in the resulting text.\n |replacement_range| is an optional range of the existing text that will be\n replaced. |selection_range| is an optional range of the resulting text\n that will be selected after insertion or replacement. The\n |replacement_range| value is only used on OS X.\n\n This function may be called multiple times as the composition changes.\n When the client is done making changes the composition should either be\n canceled or completed. To cancel the composition call\n ImeCancelComposition. To complete the composition call either\n ImeCommitText or ImeFinishComposingText. Completion is usually signaled\n when:\n\n 1. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR\n flag (on Windows), or;\n 2. The client receives a \"commit\" signal of GtkIMContext (on Linux), or;\n 3. insertText of NSTextInput is called (on Mac).\n\n This function is only used when window rendering is disabled.\n"]
14070 pub ime_set_composition: ::std::option::Option<
14071 unsafe extern "C" fn(
14072 self_: *mut _cef_browser_host_t,
14073 text: *const cef_string_t,
14074 underlinesCount: usize,
14075 underlines: *const cef_composition_underline_t,
14076 replacement_range: *const cef_range_t,
14077 selection_range: *const cef_range_t,
14078 ),
14079 >,
14080 #[doc = "\n Completes the existing composition by optionally inserting the specified\n |text| into the composition node. |replacement_range| is an optional range\n of the existing text that will be replaced. |relative_cursor_pos| is where\n the cursor will be positioned relative to the current cursor position. See\n comments on ImeSetComposition for usage. The |replacement_range| and\n |relative_cursor_pos| values are only used on OS X. This function is only\n used when window rendering is disabled.\n"]
14081 pub ime_commit_text: ::std::option::Option<
14082 unsafe extern "C" fn(
14083 self_: *mut _cef_browser_host_t,
14084 text: *const cef_string_t,
14085 replacement_range: *const cef_range_t,
14086 relative_cursor_pos: ::std::os::raw::c_int,
14087 ),
14088 >,
14089 #[doc = "\n Completes the existing composition by applying the current composition\n node contents. If |keep_selection| is false (0) the current selection, if\n any, will be discarded. See comments on ImeSetComposition for usage. This\n function is only used when window rendering is disabled.\n"]
14090 pub ime_finish_composing_text: ::std::option::Option<
14091 unsafe extern "C" fn(
14092 self_: *mut _cef_browser_host_t,
14093 keep_selection: ::std::os::raw::c_int,
14094 ),
14095 >,
14096 #[doc = "\n Cancels the existing composition and discards the composition node\n contents without applying them. See comments on ImeSetComposition for\n usage. This function is only used when window rendering is disabled.\n"]
14097 pub ime_cancel_composition:
14098 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_host_t)>,
14099 #[doc = "\n Call this function when the user drags the mouse into the web view (before\n calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). |drag_data|\n should not contain file contents as this type of data is not allowed to be\n dragged into the web view. File contents can be removed using\n cef_drag_data_t::ResetFileContents (for example, if |drag_data| comes from\n cef_render_handler_t::StartDragging). This function is only used when\n window rendering is disabled.\n"]
14100 pub drag_target_drag_enter: ::std::option::Option<
14101 unsafe extern "C" fn(
14102 self_: *mut _cef_browser_host_t,
14103 drag_data: *mut _cef_drag_data_t,
14104 event: *const cef_mouse_event_t,
14105 allowed_ops: cef_drag_operations_mask_t,
14106 ),
14107 >,
14108 #[doc = "\n Call this function each time the mouse is moved across the web view during\n a drag operation (after calling DragTargetDragEnter and before calling\n DragTargetDragLeave/DragTargetDrop). This function is only used when\n window rendering is disabled.\n"]
14109 pub drag_target_drag_over: ::std::option::Option<
14110 unsafe extern "C" fn(
14111 self_: *mut _cef_browser_host_t,
14112 event: *const cef_mouse_event_t,
14113 allowed_ops: cef_drag_operations_mask_t,
14114 ),
14115 >,
14116 #[doc = "\n Call this function when the user drags the mouse out of the web view\n (after calling DragTargetDragEnter). This function is only used when\n window rendering is disabled.\n"]
14117 pub drag_target_drag_leave:
14118 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_host_t)>,
14119 #[doc = "\n Call this function when the user completes the drag operation by dropping\n the object onto the web view (after calling DragTargetDragEnter). The\n object being dropped is |drag_data|, given as an argument to the previous\n DragTargetDragEnter call. This function is only used when window rendering\n is disabled.\n"]
14120 pub drag_target_drop: ::std::option::Option<
14121 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, event: *const cef_mouse_event_t),
14122 >,
14123 #[doc = "\n Call this function when the drag operation started by a\n cef_render_handler_t::StartDragging call has ended either in a drop or by\n being cancelled. |x| and |y| are mouse coordinates relative to the upper-\n left corner of the view. If the web view is both the drag source and the\n drag target then all DragTarget* functions should be called before\n DragSource* mthods. This function is only used when window rendering is\n disabled.\n"]
14124 pub drag_source_ended_at: ::std::option::Option<
14125 unsafe extern "C" fn(
14126 self_: *mut _cef_browser_host_t,
14127 x: ::std::os::raw::c_int,
14128 y: ::std::os::raw::c_int,
14129 op: cef_drag_operations_mask_t,
14130 ),
14131 >,
14132 #[doc = "\n Call this function when the drag operation started by a\n cef_render_handler_t::StartDragging call has completed. This function may\n be called immediately without first calling DragSourceEndedAt to cancel a\n drag operation. If the web view is both the drag source and the drag\n target then all DragTarget* functions should be called before DragSource*\n mthods. This function is only used when window rendering is disabled.\n"]
14133 pub drag_source_system_drag_ended:
14134 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_host_t)>,
14135 #[doc = "\n Returns the current visible navigation entry for this browser. This\n function can only be called on the UI thread.\n"]
14136 pub get_visible_navigation_entry: ::std::option::Option<
14137 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> *mut _cef_navigation_entry_t,
14138 >,
14139 #[doc = "\n Set accessibility state for all frames. |accessibility_state| may be\n default, enabled or disabled. If |accessibility_state| is STATE_DEFAULT\n then accessibility will be disabled by default and the state may be\n further controlled with the \"force-renderer-accessibility\" and \"disable-\n renderer-accessibility\" command-line switches. If |accessibility_state| is\n STATE_ENABLED then accessibility will be enabled. If |accessibility_state|\n is STATE_DISABLED then accessibility will be completely disabled.\n\n For windowed browsers accessibility will be enabled in Complete mode\n (which corresponds to kAccessibilityModeComplete in Chromium). In this\n mode all platform accessibility objects will be created and managed by\n Chromium's internal implementation. The client needs only to detect the\n screen reader and call this function appropriately. For example, on macOS\n the client can handle the @\"AXEnhancedUserStructure\" accessibility\n attribute to detect VoiceOver state changes and on Windows the client can\n handle WM_GETOBJECT with OBJID_CLIENT to detect accessibility readers.\n\n For windowless browsers accessibility will be enabled in TreeOnly mode\n (which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In\n this mode renderer accessibility is enabled, the full tree is computed,\n and events are passed to CefAccessibiltyHandler, but platform\n accessibility objects are not created. The client may implement platform\n accessibility objects using CefAccessibiltyHandler callbacks if desired.\n"]
14140 pub set_accessibility_state: ::std::option::Option<
14141 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, accessibility_state: cef_state_t),
14142 >,
14143 #[doc = "\n Enable notifications of auto resize via\n cef_display_handler_t::OnAutoResize. Notifications are disabled by\n default. |min_size| and |max_size| define the range of allowed sizes.\n"]
14144 pub set_auto_resize_enabled: ::std::option::Option<
14145 unsafe extern "C" fn(
14146 self_: *mut _cef_browser_host_t,
14147 enabled: ::std::os::raw::c_int,
14148 min_size: *const cef_size_t,
14149 max_size: *const cef_size_t,
14150 ),
14151 >,
14152 #[doc = "\n Returns the extension hosted in this browser or NULL if no extension is\n hosted. See cef_request_context_t::LoadExtension for details.\n"]
14153 pub get_extension: ::std::option::Option<
14154 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> *mut _cef_extension_t,
14155 >,
14156 #[doc = "\n Returns true (1) if this browser is hosting an extension background\n script. Background hosts do not have a window and are not displayable. See\n cef_request_context_t::LoadExtension for details.\n"]
14157 pub is_background_host: ::std::option::Option<
14158 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> ::std::os::raw::c_int,
14159 >,
14160 #[doc = "\n Set whether the browser's audio is muted.\n"]
14161 pub set_audio_muted: ::std::option::Option<
14162 unsafe extern "C" fn(self_: *mut _cef_browser_host_t, mute: ::std::os::raw::c_int),
14163 >,
14164 #[doc = "\n Returns true (1) if the browser's audio is muted. This function can only\n be called on the UI thread.\n"]
14165 pub is_audio_muted: ::std::option::Option<
14166 unsafe extern "C" fn(self_: *mut _cef_browser_host_t) -> ::std::os::raw::c_int,
14167 >,
14168}
14169#[test]
14170fn bindgen_test_layout__cef_browser_host_t() {
14171 const UNINIT: ::std::mem::MaybeUninit<_cef_browser_host_t> = ::std::mem::MaybeUninit::uninit();
14172 let ptr = UNINIT.as_ptr();
14173 assert_eq!(
14174 ::std::mem::size_of::<_cef_browser_host_t>(),
14175 512usize,
14176 concat!("Size of: ", stringify!(_cef_browser_host_t))
14177 );
14178 assert_eq!(
14179 ::std::mem::align_of::<_cef_browser_host_t>(),
14180 8usize,
14181 concat!("Alignment of ", stringify!(_cef_browser_host_t))
14182 );
14183 assert_eq!(
14184 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
14185 0usize,
14186 concat!(
14187 "Offset of field: ",
14188 stringify!(_cef_browser_host_t),
14189 "::",
14190 stringify!(base)
14191 )
14192 );
14193 assert_eq!(
14194 unsafe { ::std::ptr::addr_of!((*ptr).get_browser) as usize - ptr as usize },
14195 40usize,
14196 concat!(
14197 "Offset of field: ",
14198 stringify!(_cef_browser_host_t),
14199 "::",
14200 stringify!(get_browser)
14201 )
14202 );
14203 assert_eq!(
14204 unsafe { ::std::ptr::addr_of!((*ptr).close_browser) as usize - ptr as usize },
14205 48usize,
14206 concat!(
14207 "Offset of field: ",
14208 stringify!(_cef_browser_host_t),
14209 "::",
14210 stringify!(close_browser)
14211 )
14212 );
14213 assert_eq!(
14214 unsafe { ::std::ptr::addr_of!((*ptr).try_close_browser) as usize - ptr as usize },
14215 56usize,
14216 concat!(
14217 "Offset of field: ",
14218 stringify!(_cef_browser_host_t),
14219 "::",
14220 stringify!(try_close_browser)
14221 )
14222 );
14223 assert_eq!(
14224 unsafe { ::std::ptr::addr_of!((*ptr).set_focus) as usize - ptr as usize },
14225 64usize,
14226 concat!(
14227 "Offset of field: ",
14228 stringify!(_cef_browser_host_t),
14229 "::",
14230 stringify!(set_focus)
14231 )
14232 );
14233 assert_eq!(
14234 unsafe { ::std::ptr::addr_of!((*ptr).get_window_handle) as usize - ptr as usize },
14235 72usize,
14236 concat!(
14237 "Offset of field: ",
14238 stringify!(_cef_browser_host_t),
14239 "::",
14240 stringify!(get_window_handle)
14241 )
14242 );
14243 assert_eq!(
14244 unsafe { ::std::ptr::addr_of!((*ptr).get_opener_window_handle) as usize - ptr as usize },
14245 80usize,
14246 concat!(
14247 "Offset of field: ",
14248 stringify!(_cef_browser_host_t),
14249 "::",
14250 stringify!(get_opener_window_handle)
14251 )
14252 );
14253 assert_eq!(
14254 unsafe { ::std::ptr::addr_of!((*ptr).has_view) as usize - ptr as usize },
14255 88usize,
14256 concat!(
14257 "Offset of field: ",
14258 stringify!(_cef_browser_host_t),
14259 "::",
14260 stringify!(has_view)
14261 )
14262 );
14263 assert_eq!(
14264 unsafe { ::std::ptr::addr_of!((*ptr).get_client) as usize - ptr as usize },
14265 96usize,
14266 concat!(
14267 "Offset of field: ",
14268 stringify!(_cef_browser_host_t),
14269 "::",
14270 stringify!(get_client)
14271 )
14272 );
14273 assert_eq!(
14274 unsafe { ::std::ptr::addr_of!((*ptr).get_request_context) as usize - ptr as usize },
14275 104usize,
14276 concat!(
14277 "Offset of field: ",
14278 stringify!(_cef_browser_host_t),
14279 "::",
14280 stringify!(get_request_context)
14281 )
14282 );
14283 assert_eq!(
14284 unsafe { ::std::ptr::addr_of!((*ptr).get_zoom_level) as usize - ptr as usize },
14285 112usize,
14286 concat!(
14287 "Offset of field: ",
14288 stringify!(_cef_browser_host_t),
14289 "::",
14290 stringify!(get_zoom_level)
14291 )
14292 );
14293 assert_eq!(
14294 unsafe { ::std::ptr::addr_of!((*ptr).set_zoom_level) as usize - ptr as usize },
14295 120usize,
14296 concat!(
14297 "Offset of field: ",
14298 stringify!(_cef_browser_host_t),
14299 "::",
14300 stringify!(set_zoom_level)
14301 )
14302 );
14303 assert_eq!(
14304 unsafe { ::std::ptr::addr_of!((*ptr).run_file_dialog) as usize - ptr as usize },
14305 128usize,
14306 concat!(
14307 "Offset of field: ",
14308 stringify!(_cef_browser_host_t),
14309 "::",
14310 stringify!(run_file_dialog)
14311 )
14312 );
14313 assert_eq!(
14314 unsafe { ::std::ptr::addr_of!((*ptr).start_download) as usize - ptr as usize },
14315 136usize,
14316 concat!(
14317 "Offset of field: ",
14318 stringify!(_cef_browser_host_t),
14319 "::",
14320 stringify!(start_download)
14321 )
14322 );
14323 assert_eq!(
14324 unsafe { ::std::ptr::addr_of!((*ptr).download_image) as usize - ptr as usize },
14325 144usize,
14326 concat!(
14327 "Offset of field: ",
14328 stringify!(_cef_browser_host_t),
14329 "::",
14330 stringify!(download_image)
14331 )
14332 );
14333 assert_eq!(
14334 unsafe { ::std::ptr::addr_of!((*ptr).print) as usize - ptr as usize },
14335 152usize,
14336 concat!(
14337 "Offset of field: ",
14338 stringify!(_cef_browser_host_t),
14339 "::",
14340 stringify!(print)
14341 )
14342 );
14343 assert_eq!(
14344 unsafe { ::std::ptr::addr_of!((*ptr).print_to_pdf) as usize - ptr as usize },
14345 160usize,
14346 concat!(
14347 "Offset of field: ",
14348 stringify!(_cef_browser_host_t),
14349 "::",
14350 stringify!(print_to_pdf)
14351 )
14352 );
14353 assert_eq!(
14354 unsafe { ::std::ptr::addr_of!((*ptr).find) as usize - ptr as usize },
14355 168usize,
14356 concat!(
14357 "Offset of field: ",
14358 stringify!(_cef_browser_host_t),
14359 "::",
14360 stringify!(find)
14361 )
14362 );
14363 assert_eq!(
14364 unsafe { ::std::ptr::addr_of!((*ptr).stop_finding) as usize - ptr as usize },
14365 176usize,
14366 concat!(
14367 "Offset of field: ",
14368 stringify!(_cef_browser_host_t),
14369 "::",
14370 stringify!(stop_finding)
14371 )
14372 );
14373 assert_eq!(
14374 unsafe { ::std::ptr::addr_of!((*ptr).show_dev_tools) as usize - ptr as usize },
14375 184usize,
14376 concat!(
14377 "Offset of field: ",
14378 stringify!(_cef_browser_host_t),
14379 "::",
14380 stringify!(show_dev_tools)
14381 )
14382 );
14383 assert_eq!(
14384 unsafe { ::std::ptr::addr_of!((*ptr).close_dev_tools) as usize - ptr as usize },
14385 192usize,
14386 concat!(
14387 "Offset of field: ",
14388 stringify!(_cef_browser_host_t),
14389 "::",
14390 stringify!(close_dev_tools)
14391 )
14392 );
14393 assert_eq!(
14394 unsafe { ::std::ptr::addr_of!((*ptr).has_dev_tools) as usize - ptr as usize },
14395 200usize,
14396 concat!(
14397 "Offset of field: ",
14398 stringify!(_cef_browser_host_t),
14399 "::",
14400 stringify!(has_dev_tools)
14401 )
14402 );
14403 assert_eq!(
14404 unsafe { ::std::ptr::addr_of!((*ptr).send_dev_tools_message) as usize - ptr as usize },
14405 208usize,
14406 concat!(
14407 "Offset of field: ",
14408 stringify!(_cef_browser_host_t),
14409 "::",
14410 stringify!(send_dev_tools_message)
14411 )
14412 );
14413 assert_eq!(
14414 unsafe { ::std::ptr::addr_of!((*ptr).execute_dev_tools_method) as usize - ptr as usize },
14415 216usize,
14416 concat!(
14417 "Offset of field: ",
14418 stringify!(_cef_browser_host_t),
14419 "::",
14420 stringify!(execute_dev_tools_method)
14421 )
14422 );
14423 assert_eq!(
14424 unsafe {
14425 ::std::ptr::addr_of!((*ptr).add_dev_tools_message_observer) as usize - ptr as usize
14426 },
14427 224usize,
14428 concat!(
14429 "Offset of field: ",
14430 stringify!(_cef_browser_host_t),
14431 "::",
14432 stringify!(add_dev_tools_message_observer)
14433 )
14434 );
14435 assert_eq!(
14436 unsafe { ::std::ptr::addr_of!((*ptr).get_navigation_entries) as usize - ptr as usize },
14437 232usize,
14438 concat!(
14439 "Offset of field: ",
14440 stringify!(_cef_browser_host_t),
14441 "::",
14442 stringify!(get_navigation_entries)
14443 )
14444 );
14445 assert_eq!(
14446 unsafe { ::std::ptr::addr_of!((*ptr).replace_misspelling) as usize - ptr as usize },
14447 240usize,
14448 concat!(
14449 "Offset of field: ",
14450 stringify!(_cef_browser_host_t),
14451 "::",
14452 stringify!(replace_misspelling)
14453 )
14454 );
14455 assert_eq!(
14456 unsafe { ::std::ptr::addr_of!((*ptr).add_word_to_dictionary) as usize - ptr as usize },
14457 248usize,
14458 concat!(
14459 "Offset of field: ",
14460 stringify!(_cef_browser_host_t),
14461 "::",
14462 stringify!(add_word_to_dictionary)
14463 )
14464 );
14465 assert_eq!(
14466 unsafe {
14467 ::std::ptr::addr_of!((*ptr).is_window_rendering_disabled) as usize - ptr as usize
14468 },
14469 256usize,
14470 concat!(
14471 "Offset of field: ",
14472 stringify!(_cef_browser_host_t),
14473 "::",
14474 stringify!(is_window_rendering_disabled)
14475 )
14476 );
14477 assert_eq!(
14478 unsafe { ::std::ptr::addr_of!((*ptr).was_resized) as usize - ptr as usize },
14479 264usize,
14480 concat!(
14481 "Offset of field: ",
14482 stringify!(_cef_browser_host_t),
14483 "::",
14484 stringify!(was_resized)
14485 )
14486 );
14487 assert_eq!(
14488 unsafe { ::std::ptr::addr_of!((*ptr).was_hidden) as usize - ptr as usize },
14489 272usize,
14490 concat!(
14491 "Offset of field: ",
14492 stringify!(_cef_browser_host_t),
14493 "::",
14494 stringify!(was_hidden)
14495 )
14496 );
14497 assert_eq!(
14498 unsafe { ::std::ptr::addr_of!((*ptr).notify_screen_info_changed) as usize - ptr as usize },
14499 280usize,
14500 concat!(
14501 "Offset of field: ",
14502 stringify!(_cef_browser_host_t),
14503 "::",
14504 stringify!(notify_screen_info_changed)
14505 )
14506 );
14507 assert_eq!(
14508 unsafe { ::std::ptr::addr_of!((*ptr).invalidate) as usize - ptr as usize },
14509 288usize,
14510 concat!(
14511 "Offset of field: ",
14512 stringify!(_cef_browser_host_t),
14513 "::",
14514 stringify!(invalidate)
14515 )
14516 );
14517 assert_eq!(
14518 unsafe { ::std::ptr::addr_of!((*ptr).send_external_begin_frame) as usize - ptr as usize },
14519 296usize,
14520 concat!(
14521 "Offset of field: ",
14522 stringify!(_cef_browser_host_t),
14523 "::",
14524 stringify!(send_external_begin_frame)
14525 )
14526 );
14527 assert_eq!(
14528 unsafe { ::std::ptr::addr_of!((*ptr).send_key_event) as usize - ptr as usize },
14529 304usize,
14530 concat!(
14531 "Offset of field: ",
14532 stringify!(_cef_browser_host_t),
14533 "::",
14534 stringify!(send_key_event)
14535 )
14536 );
14537 assert_eq!(
14538 unsafe { ::std::ptr::addr_of!((*ptr).send_mouse_click_event) as usize - ptr as usize },
14539 312usize,
14540 concat!(
14541 "Offset of field: ",
14542 stringify!(_cef_browser_host_t),
14543 "::",
14544 stringify!(send_mouse_click_event)
14545 )
14546 );
14547 assert_eq!(
14548 unsafe { ::std::ptr::addr_of!((*ptr).send_mouse_move_event) as usize - ptr as usize },
14549 320usize,
14550 concat!(
14551 "Offset of field: ",
14552 stringify!(_cef_browser_host_t),
14553 "::",
14554 stringify!(send_mouse_move_event)
14555 )
14556 );
14557 assert_eq!(
14558 unsafe { ::std::ptr::addr_of!((*ptr).send_mouse_wheel_event) as usize - ptr as usize },
14559 328usize,
14560 concat!(
14561 "Offset of field: ",
14562 stringify!(_cef_browser_host_t),
14563 "::",
14564 stringify!(send_mouse_wheel_event)
14565 )
14566 );
14567 assert_eq!(
14568 unsafe { ::std::ptr::addr_of!((*ptr).send_touch_event) as usize - ptr as usize },
14569 336usize,
14570 concat!(
14571 "Offset of field: ",
14572 stringify!(_cef_browser_host_t),
14573 "::",
14574 stringify!(send_touch_event)
14575 )
14576 );
14577 assert_eq!(
14578 unsafe { ::std::ptr::addr_of!((*ptr).send_capture_lost_event) as usize - ptr as usize },
14579 344usize,
14580 concat!(
14581 "Offset of field: ",
14582 stringify!(_cef_browser_host_t),
14583 "::",
14584 stringify!(send_capture_lost_event)
14585 )
14586 );
14587 assert_eq!(
14588 unsafe {
14589 ::std::ptr::addr_of!((*ptr).notify_move_or_resize_started) as usize - ptr as usize
14590 },
14591 352usize,
14592 concat!(
14593 "Offset of field: ",
14594 stringify!(_cef_browser_host_t),
14595 "::",
14596 stringify!(notify_move_or_resize_started)
14597 )
14598 );
14599 assert_eq!(
14600 unsafe { ::std::ptr::addr_of!((*ptr).get_windowless_frame_rate) as usize - ptr as usize },
14601 360usize,
14602 concat!(
14603 "Offset of field: ",
14604 stringify!(_cef_browser_host_t),
14605 "::",
14606 stringify!(get_windowless_frame_rate)
14607 )
14608 );
14609 assert_eq!(
14610 unsafe { ::std::ptr::addr_of!((*ptr).set_windowless_frame_rate) as usize - ptr as usize },
14611 368usize,
14612 concat!(
14613 "Offset of field: ",
14614 stringify!(_cef_browser_host_t),
14615 "::",
14616 stringify!(set_windowless_frame_rate)
14617 )
14618 );
14619 assert_eq!(
14620 unsafe { ::std::ptr::addr_of!((*ptr).ime_set_composition) as usize - ptr as usize },
14621 376usize,
14622 concat!(
14623 "Offset of field: ",
14624 stringify!(_cef_browser_host_t),
14625 "::",
14626 stringify!(ime_set_composition)
14627 )
14628 );
14629 assert_eq!(
14630 unsafe { ::std::ptr::addr_of!((*ptr).ime_commit_text) as usize - ptr as usize },
14631 384usize,
14632 concat!(
14633 "Offset of field: ",
14634 stringify!(_cef_browser_host_t),
14635 "::",
14636 stringify!(ime_commit_text)
14637 )
14638 );
14639 assert_eq!(
14640 unsafe { ::std::ptr::addr_of!((*ptr).ime_finish_composing_text) as usize - ptr as usize },
14641 392usize,
14642 concat!(
14643 "Offset of field: ",
14644 stringify!(_cef_browser_host_t),
14645 "::",
14646 stringify!(ime_finish_composing_text)
14647 )
14648 );
14649 assert_eq!(
14650 unsafe { ::std::ptr::addr_of!((*ptr).ime_cancel_composition) as usize - ptr as usize },
14651 400usize,
14652 concat!(
14653 "Offset of field: ",
14654 stringify!(_cef_browser_host_t),
14655 "::",
14656 stringify!(ime_cancel_composition)
14657 )
14658 );
14659 assert_eq!(
14660 unsafe { ::std::ptr::addr_of!((*ptr).drag_target_drag_enter) as usize - ptr as usize },
14661 408usize,
14662 concat!(
14663 "Offset of field: ",
14664 stringify!(_cef_browser_host_t),
14665 "::",
14666 stringify!(drag_target_drag_enter)
14667 )
14668 );
14669 assert_eq!(
14670 unsafe { ::std::ptr::addr_of!((*ptr).drag_target_drag_over) as usize - ptr as usize },
14671 416usize,
14672 concat!(
14673 "Offset of field: ",
14674 stringify!(_cef_browser_host_t),
14675 "::",
14676 stringify!(drag_target_drag_over)
14677 )
14678 );
14679 assert_eq!(
14680 unsafe { ::std::ptr::addr_of!((*ptr).drag_target_drag_leave) as usize - ptr as usize },
14681 424usize,
14682 concat!(
14683 "Offset of field: ",
14684 stringify!(_cef_browser_host_t),
14685 "::",
14686 stringify!(drag_target_drag_leave)
14687 )
14688 );
14689 assert_eq!(
14690 unsafe { ::std::ptr::addr_of!((*ptr).drag_target_drop) as usize - ptr as usize },
14691 432usize,
14692 concat!(
14693 "Offset of field: ",
14694 stringify!(_cef_browser_host_t),
14695 "::",
14696 stringify!(drag_target_drop)
14697 )
14698 );
14699 assert_eq!(
14700 unsafe { ::std::ptr::addr_of!((*ptr).drag_source_ended_at) as usize - ptr as usize },
14701 440usize,
14702 concat!(
14703 "Offset of field: ",
14704 stringify!(_cef_browser_host_t),
14705 "::",
14706 stringify!(drag_source_ended_at)
14707 )
14708 );
14709 assert_eq!(
14710 unsafe {
14711 ::std::ptr::addr_of!((*ptr).drag_source_system_drag_ended) as usize - ptr as usize
14712 },
14713 448usize,
14714 concat!(
14715 "Offset of field: ",
14716 stringify!(_cef_browser_host_t),
14717 "::",
14718 stringify!(drag_source_system_drag_ended)
14719 )
14720 );
14721 assert_eq!(
14722 unsafe {
14723 ::std::ptr::addr_of!((*ptr).get_visible_navigation_entry) as usize - ptr as usize
14724 },
14725 456usize,
14726 concat!(
14727 "Offset of field: ",
14728 stringify!(_cef_browser_host_t),
14729 "::",
14730 stringify!(get_visible_navigation_entry)
14731 )
14732 );
14733 assert_eq!(
14734 unsafe { ::std::ptr::addr_of!((*ptr).set_accessibility_state) as usize - ptr as usize },
14735 464usize,
14736 concat!(
14737 "Offset of field: ",
14738 stringify!(_cef_browser_host_t),
14739 "::",
14740 stringify!(set_accessibility_state)
14741 )
14742 );
14743 assert_eq!(
14744 unsafe { ::std::ptr::addr_of!((*ptr).set_auto_resize_enabled) as usize - ptr as usize },
14745 472usize,
14746 concat!(
14747 "Offset of field: ",
14748 stringify!(_cef_browser_host_t),
14749 "::",
14750 stringify!(set_auto_resize_enabled)
14751 )
14752 );
14753 assert_eq!(
14754 unsafe { ::std::ptr::addr_of!((*ptr).get_extension) as usize - ptr as usize },
14755 480usize,
14756 concat!(
14757 "Offset of field: ",
14758 stringify!(_cef_browser_host_t),
14759 "::",
14760 stringify!(get_extension)
14761 )
14762 );
14763 assert_eq!(
14764 unsafe { ::std::ptr::addr_of!((*ptr).is_background_host) as usize - ptr as usize },
14765 488usize,
14766 concat!(
14767 "Offset of field: ",
14768 stringify!(_cef_browser_host_t),
14769 "::",
14770 stringify!(is_background_host)
14771 )
14772 );
14773 assert_eq!(
14774 unsafe { ::std::ptr::addr_of!((*ptr).set_audio_muted) as usize - ptr as usize },
14775 496usize,
14776 concat!(
14777 "Offset of field: ",
14778 stringify!(_cef_browser_host_t),
14779 "::",
14780 stringify!(set_audio_muted)
14781 )
14782 );
14783 assert_eq!(
14784 unsafe { ::std::ptr::addr_of!((*ptr).is_audio_muted) as usize - ptr as usize },
14785 504usize,
14786 concat!(
14787 "Offset of field: ",
14788 stringify!(_cef_browser_host_t),
14789 "::",
14790 stringify!(is_audio_muted)
14791 )
14792 );
14793}
14794#[doc = "\n Structure used to represent the browser process aspects of a browser. The\n functions of this structure can only be called in the browser process. They\n may be called on any thread in that process unless otherwise indicated in\n the comments.\n"]
14795pub type cef_browser_host_t = _cef_browser_host_t;
14796extern "C" {
14797 #[doc = "\n Create a new browser using the window parameters specified by |windowInfo|.\n All values will be copied internally and the actual window (if any) will be\n created on the UI thread. If |request_context| is NULL the global request\n context will be used. This function can be called on any browser process\n thread and will not block. The optional |extra_info| parameter provides an\n opportunity to specify extra information specific to the created browser\n that will be passed to cef_render_process_handler_t::on_browser_created() in\n the render process.\n"]
14798 pub fn cef_browser_host_create_browser(
14799 windowInfo: *const cef_window_info_t,
14800 client: *mut _cef_client_t,
14801 url: *const cef_string_t,
14802 settings: *const _cef_browser_settings_t,
14803 extra_info: *mut _cef_dictionary_value_t,
14804 request_context: *mut _cef_request_context_t,
14805 ) -> ::std::os::raw::c_int;
14806}
14807extern "C" {
14808 #[doc = "\n Create a new browser using the window parameters specified by |windowInfo|.\n If |request_context| is NULL the global request context will be used. This\n function can only be called on the browser process UI thread. The optional\n |extra_info| parameter provides an opportunity to specify extra information\n specific to the created browser that will be passed to\n cef_render_process_handler_t::on_browser_created() in the render process.\n"]
14809 pub fn cef_browser_host_create_browser_sync(
14810 windowInfo: *const cef_window_info_t,
14811 client: *mut _cef_client_t,
14812 url: *const cef_string_t,
14813 settings: *const _cef_browser_settings_t,
14814 extra_info: *mut _cef_dictionary_value_t,
14815 request_context: *mut _cef_request_context_t,
14816 ) -> *mut cef_browser_t;
14817}
14818#[doc = "\n Implement this structure to handle audio events.\n"]
14819#[repr(C)]
14820#[derive(Debug, Copy, Clone)]
14821pub struct _cef_audio_handler_t {
14822 #[doc = "\n Base structure.\n"]
14823 pub base: cef_base_ref_counted_t,
14824 #[doc = "\n Called on the UI thread to allow configuration of audio stream parameters.\n Return true (1) to proceed with audio stream capture, or false (0) to\n cancel it. All members of |params| can optionally be configured here, but\n they are also pre-filled with some sensible defaults.\n"]
14825 pub get_audio_parameters: ::std::option::Option<
14826 unsafe extern "C" fn(
14827 self_: *mut _cef_audio_handler_t,
14828 browser: *mut _cef_browser_t,
14829 params: *mut cef_audio_parameters_t,
14830 ) -> ::std::os::raw::c_int,
14831 >,
14832 #[doc = "\n Called on a browser audio capture thread when the browser starts streaming\n audio. OnAudioStreamStopped will always be called after\n OnAudioStreamStarted; both functions may be called multiple times for the\n same browser. |params| contains the audio parameters like sample rate and\n channel layout. |channels| is the number of channels.\n"]
14833 pub on_audio_stream_started: ::std::option::Option<
14834 unsafe extern "C" fn(
14835 self_: *mut _cef_audio_handler_t,
14836 browser: *mut _cef_browser_t,
14837 params: *const cef_audio_parameters_t,
14838 channels: ::std::os::raw::c_int,
14839 ),
14840 >,
14841 #[doc = "\n Called on the audio stream thread when a PCM packet is received for the\n stream. |data| is an array representing the raw PCM data as a floating\n point type, i.e. 4-byte value(s). |frames| is the number of frames in the\n PCM packet. |pts| is the presentation timestamp (in milliseconds since the\n Unix Epoch) and represents the time at which the decompressed packet\n should be presented to the user. Based on |frames| and the\n |channel_layout| value passed to OnAudioStreamStarted you can calculate\n the size of the |data| array in bytes.\n"]
14842 pub on_audio_stream_packet: ::std::option::Option<
14843 unsafe extern "C" fn(
14844 self_: *mut _cef_audio_handler_t,
14845 browser: *mut _cef_browser_t,
14846 data: *mut *const f32,
14847 frames: ::std::os::raw::c_int,
14848 pts: i64,
14849 ),
14850 >,
14851 #[doc = "\n Called on the UI thread when the stream has stopped. OnAudioSteamStopped\n will always be called after OnAudioStreamStarted; both functions may be\n called multiple times for the same stream.\n"]
14852 pub on_audio_stream_stopped: ::std::option::Option<
14853 unsafe extern "C" fn(self_: *mut _cef_audio_handler_t, browser: *mut _cef_browser_t),
14854 >,
14855 #[doc = "\n Called on the UI or audio stream thread when an error occurred. During the\n stream creation phase this callback will be called on the UI thread while\n in the capturing phase it will be called on the audio stream thread. The\n stream will be stopped immediately.\n"]
14856 pub on_audio_stream_error: ::std::option::Option<
14857 unsafe extern "C" fn(
14858 self_: *mut _cef_audio_handler_t,
14859 browser: *mut _cef_browser_t,
14860 message: *const cef_string_t,
14861 ),
14862 >,
14863}
14864#[test]
14865fn bindgen_test_layout__cef_audio_handler_t() {
14866 const UNINIT: ::std::mem::MaybeUninit<_cef_audio_handler_t> = ::std::mem::MaybeUninit::uninit();
14867 let ptr = UNINIT.as_ptr();
14868 assert_eq!(
14869 ::std::mem::size_of::<_cef_audio_handler_t>(),
14870 80usize,
14871 concat!("Size of: ", stringify!(_cef_audio_handler_t))
14872 );
14873 assert_eq!(
14874 ::std::mem::align_of::<_cef_audio_handler_t>(),
14875 8usize,
14876 concat!("Alignment of ", stringify!(_cef_audio_handler_t))
14877 );
14878 assert_eq!(
14879 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
14880 0usize,
14881 concat!(
14882 "Offset of field: ",
14883 stringify!(_cef_audio_handler_t),
14884 "::",
14885 stringify!(base)
14886 )
14887 );
14888 assert_eq!(
14889 unsafe { ::std::ptr::addr_of!((*ptr).get_audio_parameters) as usize - ptr as usize },
14890 40usize,
14891 concat!(
14892 "Offset of field: ",
14893 stringify!(_cef_audio_handler_t),
14894 "::",
14895 stringify!(get_audio_parameters)
14896 )
14897 );
14898 assert_eq!(
14899 unsafe { ::std::ptr::addr_of!((*ptr).on_audio_stream_started) as usize - ptr as usize },
14900 48usize,
14901 concat!(
14902 "Offset of field: ",
14903 stringify!(_cef_audio_handler_t),
14904 "::",
14905 stringify!(on_audio_stream_started)
14906 )
14907 );
14908 assert_eq!(
14909 unsafe { ::std::ptr::addr_of!((*ptr).on_audio_stream_packet) as usize - ptr as usize },
14910 56usize,
14911 concat!(
14912 "Offset of field: ",
14913 stringify!(_cef_audio_handler_t),
14914 "::",
14915 stringify!(on_audio_stream_packet)
14916 )
14917 );
14918 assert_eq!(
14919 unsafe { ::std::ptr::addr_of!((*ptr).on_audio_stream_stopped) as usize - ptr as usize },
14920 64usize,
14921 concat!(
14922 "Offset of field: ",
14923 stringify!(_cef_audio_handler_t),
14924 "::",
14925 stringify!(on_audio_stream_stopped)
14926 )
14927 );
14928 assert_eq!(
14929 unsafe { ::std::ptr::addr_of!((*ptr).on_audio_stream_error) as usize - ptr as usize },
14930 72usize,
14931 concat!(
14932 "Offset of field: ",
14933 stringify!(_cef_audio_handler_t),
14934 "::",
14935 stringify!(on_audio_stream_error)
14936 )
14937 );
14938}
14939#[doc = "\n Implement this structure to handle audio events.\n"]
14940pub type cef_audio_handler_t = _cef_audio_handler_t;
14941#[doc = "\n Implement this structure to handle events related to commands. The functions\n of this structure will be called on the UI thread.\n"]
14942#[repr(C)]
14943#[derive(Debug, Copy, Clone)]
14944pub struct _cef_command_handler_t {
14945 #[doc = "\n Base structure.\n"]
14946 pub base: cef_base_ref_counted_t,
14947 #[doc = "\n Called to execute a Chrome command triggered via menu selection or\n keyboard shortcut. Values for |command_id| can be found in the\n cef_command_ids.h file. |disposition| provides information about the\n intended command target. Return true (1) if the command was handled or\n false (0) for the default implementation. For context menu commands this\n will be called after cef_context_menu_handler_t::OnContextMenuCommand.\n Only used with the Chrome runtime.\n"]
14948 pub on_chrome_command: ::std::option::Option<
14949 unsafe extern "C" fn(
14950 self_: *mut _cef_command_handler_t,
14951 browser: *mut _cef_browser_t,
14952 command_id: ::std::os::raw::c_int,
14953 disposition: cef_window_open_disposition_t,
14954 ) -> ::std::os::raw::c_int,
14955 >,
14956 #[doc = "\n Called to check if a Chrome app menu item should be visible. Values for\n |command_id| can be found in the cef_command_ids.h file. Only called for\n menu items that would be visible by default. Only used with the Chrome\n runtime.\n"]
14957 pub is_chrome_app_menu_item_visible: ::std::option::Option<
14958 unsafe extern "C" fn(
14959 self_: *mut _cef_command_handler_t,
14960 browser: *mut _cef_browser_t,
14961 command_id: ::std::os::raw::c_int,
14962 ) -> ::std::os::raw::c_int,
14963 >,
14964 #[doc = "\n Called to check if a Chrome app menu item should be enabled. Values for\n |command_id| can be found in the cef_command_ids.h file. Only called for\n menu items that would be enabled by default. Only used with the Chrome\n runtime.\n"]
14965 pub is_chrome_app_menu_item_enabled: ::std::option::Option<
14966 unsafe extern "C" fn(
14967 self_: *mut _cef_command_handler_t,
14968 browser: *mut _cef_browser_t,
14969 command_id: ::std::os::raw::c_int,
14970 ) -> ::std::os::raw::c_int,
14971 >,
14972 #[doc = "\n Called during browser creation to check if a Chrome page action icon\n should be visible. Only called for icons that would be visible by default.\n Only used with the Chrome runtime.\n"]
14973 pub is_chrome_page_action_icon_visible: ::std::option::Option<
14974 unsafe extern "C" fn(
14975 self_: *mut _cef_command_handler_t,
14976 icon_type: cef_chrome_page_action_icon_type_t,
14977 ) -> ::std::os::raw::c_int,
14978 >,
14979 #[doc = "\n Called during browser creation to check if a Chrome toolbar button should\n be visible. Only called for buttons that would be visible by default. Only\n used with the Chrome runtime.\n"]
14980 pub is_chrome_toolbar_button_visible: ::std::option::Option<
14981 unsafe extern "C" fn(
14982 self_: *mut _cef_command_handler_t,
14983 button_type: cef_chrome_toolbar_button_type_t,
14984 ) -> ::std::os::raw::c_int,
14985 >,
14986}
14987#[test]
14988fn bindgen_test_layout__cef_command_handler_t() {
14989 const UNINIT: ::std::mem::MaybeUninit<_cef_command_handler_t> =
14990 ::std::mem::MaybeUninit::uninit();
14991 let ptr = UNINIT.as_ptr();
14992 assert_eq!(
14993 ::std::mem::size_of::<_cef_command_handler_t>(),
14994 80usize,
14995 concat!("Size of: ", stringify!(_cef_command_handler_t))
14996 );
14997 assert_eq!(
14998 ::std::mem::align_of::<_cef_command_handler_t>(),
14999 8usize,
15000 concat!("Alignment of ", stringify!(_cef_command_handler_t))
15001 );
15002 assert_eq!(
15003 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
15004 0usize,
15005 concat!(
15006 "Offset of field: ",
15007 stringify!(_cef_command_handler_t),
15008 "::",
15009 stringify!(base)
15010 )
15011 );
15012 assert_eq!(
15013 unsafe { ::std::ptr::addr_of!((*ptr).on_chrome_command) as usize - ptr as usize },
15014 40usize,
15015 concat!(
15016 "Offset of field: ",
15017 stringify!(_cef_command_handler_t),
15018 "::",
15019 stringify!(on_chrome_command)
15020 )
15021 );
15022 assert_eq!(
15023 unsafe {
15024 ::std::ptr::addr_of!((*ptr).is_chrome_app_menu_item_visible) as usize - ptr as usize
15025 },
15026 48usize,
15027 concat!(
15028 "Offset of field: ",
15029 stringify!(_cef_command_handler_t),
15030 "::",
15031 stringify!(is_chrome_app_menu_item_visible)
15032 )
15033 );
15034 assert_eq!(
15035 unsafe {
15036 ::std::ptr::addr_of!((*ptr).is_chrome_app_menu_item_enabled) as usize - ptr as usize
15037 },
15038 56usize,
15039 concat!(
15040 "Offset of field: ",
15041 stringify!(_cef_command_handler_t),
15042 "::",
15043 stringify!(is_chrome_app_menu_item_enabled)
15044 )
15045 );
15046 assert_eq!(
15047 unsafe {
15048 ::std::ptr::addr_of!((*ptr).is_chrome_page_action_icon_visible) as usize - ptr as usize
15049 },
15050 64usize,
15051 concat!(
15052 "Offset of field: ",
15053 stringify!(_cef_command_handler_t),
15054 "::",
15055 stringify!(is_chrome_page_action_icon_visible)
15056 )
15057 );
15058 assert_eq!(
15059 unsafe {
15060 ::std::ptr::addr_of!((*ptr).is_chrome_toolbar_button_visible) as usize - ptr as usize
15061 },
15062 72usize,
15063 concat!(
15064 "Offset of field: ",
15065 stringify!(_cef_command_handler_t),
15066 "::",
15067 stringify!(is_chrome_toolbar_button_visible)
15068 )
15069 );
15070}
15071#[doc = "\n Implement this structure to handle events related to commands. The functions\n of this structure will be called on the UI thread.\n"]
15072pub type cef_command_handler_t = _cef_command_handler_t;
15073#[doc = "\n Implement this structure to handle menu model events. The functions of this\n structure will be called on the browser process UI thread unless otherwise\n indicated.\n"]
15074#[repr(C)]
15075#[derive(Debug, Copy, Clone)]
15076pub struct _cef_menu_model_delegate_t {
15077 #[doc = "\n Base structure.\n"]
15078 pub base: cef_base_ref_counted_t,
15079 #[doc = "\n Perform the action associated with the specified |command_id| and optional\n |event_flags|.\n"]
15080 pub execute_command: ::std::option::Option<
15081 unsafe extern "C" fn(
15082 self_: *mut _cef_menu_model_delegate_t,
15083 menu_model: *mut _cef_menu_model_t,
15084 command_id: ::std::os::raw::c_int,
15085 event_flags: cef_event_flags_t,
15086 ),
15087 >,
15088 #[doc = "\n Called when the user moves the mouse outside the menu and over the owning\n window.\n"]
15089 pub mouse_outside_menu: ::std::option::Option<
15090 unsafe extern "C" fn(
15091 self_: *mut _cef_menu_model_delegate_t,
15092 menu_model: *mut _cef_menu_model_t,
15093 screen_point: *const cef_point_t,
15094 ),
15095 >,
15096 #[doc = "\n Called on unhandled open submenu keyboard commands. |is_rtl| will be true\n (1) if the menu is displaying a right-to-left language.\n"]
15097 pub unhandled_open_submenu: ::std::option::Option<
15098 unsafe extern "C" fn(
15099 self_: *mut _cef_menu_model_delegate_t,
15100 menu_model: *mut _cef_menu_model_t,
15101 is_rtl: ::std::os::raw::c_int,
15102 ),
15103 >,
15104 #[doc = "\n Called on unhandled close submenu keyboard commands. |is_rtl| will be true\n (1) if the menu is displaying a right-to-left language.\n"]
15105 pub unhandled_close_submenu: ::std::option::Option<
15106 unsafe extern "C" fn(
15107 self_: *mut _cef_menu_model_delegate_t,
15108 menu_model: *mut _cef_menu_model_t,
15109 is_rtl: ::std::os::raw::c_int,
15110 ),
15111 >,
15112 #[doc = "\n The menu is about to show.\n"]
15113 pub menu_will_show: ::std::option::Option<
15114 unsafe extern "C" fn(
15115 self_: *mut _cef_menu_model_delegate_t,
15116 menu_model: *mut _cef_menu_model_t,
15117 ),
15118 >,
15119 #[doc = "\n The menu has closed.\n"]
15120 pub menu_closed: ::std::option::Option<
15121 unsafe extern "C" fn(
15122 self_: *mut _cef_menu_model_delegate_t,
15123 menu_model: *mut _cef_menu_model_t,
15124 ),
15125 >,
15126 #[doc = "\n Optionally modify a menu item label. Return true (1) if |label| was\n modified.\n"]
15127 pub format_label: ::std::option::Option<
15128 unsafe extern "C" fn(
15129 self_: *mut _cef_menu_model_delegate_t,
15130 menu_model: *mut _cef_menu_model_t,
15131 label: *mut cef_string_t,
15132 ) -> ::std::os::raw::c_int,
15133 >,
15134}
15135#[test]
15136fn bindgen_test_layout__cef_menu_model_delegate_t() {
15137 const UNINIT: ::std::mem::MaybeUninit<_cef_menu_model_delegate_t> =
15138 ::std::mem::MaybeUninit::uninit();
15139 let ptr = UNINIT.as_ptr();
15140 assert_eq!(
15141 ::std::mem::size_of::<_cef_menu_model_delegate_t>(),
15142 96usize,
15143 concat!("Size of: ", stringify!(_cef_menu_model_delegate_t))
15144 );
15145 assert_eq!(
15146 ::std::mem::align_of::<_cef_menu_model_delegate_t>(),
15147 8usize,
15148 concat!("Alignment of ", stringify!(_cef_menu_model_delegate_t))
15149 );
15150 assert_eq!(
15151 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
15152 0usize,
15153 concat!(
15154 "Offset of field: ",
15155 stringify!(_cef_menu_model_delegate_t),
15156 "::",
15157 stringify!(base)
15158 )
15159 );
15160 assert_eq!(
15161 unsafe { ::std::ptr::addr_of!((*ptr).execute_command) as usize - ptr as usize },
15162 40usize,
15163 concat!(
15164 "Offset of field: ",
15165 stringify!(_cef_menu_model_delegate_t),
15166 "::",
15167 stringify!(execute_command)
15168 )
15169 );
15170 assert_eq!(
15171 unsafe { ::std::ptr::addr_of!((*ptr).mouse_outside_menu) as usize - ptr as usize },
15172 48usize,
15173 concat!(
15174 "Offset of field: ",
15175 stringify!(_cef_menu_model_delegate_t),
15176 "::",
15177 stringify!(mouse_outside_menu)
15178 )
15179 );
15180 assert_eq!(
15181 unsafe { ::std::ptr::addr_of!((*ptr).unhandled_open_submenu) as usize - ptr as usize },
15182 56usize,
15183 concat!(
15184 "Offset of field: ",
15185 stringify!(_cef_menu_model_delegate_t),
15186 "::",
15187 stringify!(unhandled_open_submenu)
15188 )
15189 );
15190 assert_eq!(
15191 unsafe { ::std::ptr::addr_of!((*ptr).unhandled_close_submenu) as usize - ptr as usize },
15192 64usize,
15193 concat!(
15194 "Offset of field: ",
15195 stringify!(_cef_menu_model_delegate_t),
15196 "::",
15197 stringify!(unhandled_close_submenu)
15198 )
15199 );
15200 assert_eq!(
15201 unsafe { ::std::ptr::addr_of!((*ptr).menu_will_show) as usize - ptr as usize },
15202 72usize,
15203 concat!(
15204 "Offset of field: ",
15205 stringify!(_cef_menu_model_delegate_t),
15206 "::",
15207 stringify!(menu_will_show)
15208 )
15209 );
15210 assert_eq!(
15211 unsafe { ::std::ptr::addr_of!((*ptr).menu_closed) as usize - ptr as usize },
15212 80usize,
15213 concat!(
15214 "Offset of field: ",
15215 stringify!(_cef_menu_model_delegate_t),
15216 "::",
15217 stringify!(menu_closed)
15218 )
15219 );
15220 assert_eq!(
15221 unsafe { ::std::ptr::addr_of!((*ptr).format_label) as usize - ptr as usize },
15222 88usize,
15223 concat!(
15224 "Offset of field: ",
15225 stringify!(_cef_menu_model_delegate_t),
15226 "::",
15227 stringify!(format_label)
15228 )
15229 );
15230}
15231#[doc = "\n Implement this structure to handle menu model events. The functions of this\n structure will be called on the browser process UI thread unless otherwise\n indicated.\n"]
15232pub type cef_menu_model_delegate_t = _cef_menu_model_delegate_t;
15233#[doc = "\n Supports creation and modification of menus. See cef_menu_id_t for the\n command ids that have default implementations. All user-defined command ids\n should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of\n this structure can only be accessed on the browser process the UI thread.\n"]
15234#[repr(C)]
15235#[derive(Debug, Copy, Clone)]
15236pub struct _cef_menu_model_t {
15237 #[doc = "\n Base structure.\n"]
15238 pub base: cef_base_ref_counted_t,
15239 #[doc = "\n Returns true (1) if this menu is a submenu.\n"]
15240 pub is_sub_menu: ::std::option::Option<
15241 unsafe extern "C" fn(self_: *mut _cef_menu_model_t) -> ::std::os::raw::c_int,
15242 >,
15243 #[doc = "\n Clears the menu. Returns true (1) on success.\n"]
15244 pub clear: ::std::option::Option<
15245 unsafe extern "C" fn(self_: *mut _cef_menu_model_t) -> ::std::os::raw::c_int,
15246 >,
15247 #[doc = "\n Returns the number of items in this menu.\n"]
15248 pub get_count:
15249 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_menu_model_t) -> usize>,
15250 #[doc = "\n Add a separator to the menu. Returns true (1) on success.\n"]
15251 pub add_separator: ::std::option::Option<
15252 unsafe extern "C" fn(self_: *mut _cef_menu_model_t) -> ::std::os::raw::c_int,
15253 >,
15254 #[doc = "\n Add an item to the menu. Returns true (1) on success.\n"]
15255 pub add_item: ::std::option::Option<
15256 unsafe extern "C" fn(
15257 self_: *mut _cef_menu_model_t,
15258 command_id: ::std::os::raw::c_int,
15259 label: *const cef_string_t,
15260 ) -> ::std::os::raw::c_int,
15261 >,
15262 #[doc = "\n Add a check item to the menu. Returns true (1) on success.\n"]
15263 pub add_check_item: ::std::option::Option<
15264 unsafe extern "C" fn(
15265 self_: *mut _cef_menu_model_t,
15266 command_id: ::std::os::raw::c_int,
15267 label: *const cef_string_t,
15268 ) -> ::std::os::raw::c_int,
15269 >,
15270 #[doc = "\n Add a radio item to the menu. Only a single item with the specified\n |group_id| can be checked at a time. Returns true (1) on success.\n"]
15271 pub add_radio_item: ::std::option::Option<
15272 unsafe extern "C" fn(
15273 self_: *mut _cef_menu_model_t,
15274 command_id: ::std::os::raw::c_int,
15275 label: *const cef_string_t,
15276 group_id: ::std::os::raw::c_int,
15277 ) -> ::std::os::raw::c_int,
15278 >,
15279 #[doc = "\n Add a sub-menu to the menu. The new sub-menu is returned.\n"]
15280 pub add_sub_menu: ::std::option::Option<
15281 unsafe extern "C" fn(
15282 self_: *mut _cef_menu_model_t,
15283 command_id: ::std::os::raw::c_int,
15284 label: *const cef_string_t,
15285 ) -> *mut _cef_menu_model_t,
15286 >,
15287 #[doc = "\n Insert a separator in the menu at the specified |index|. Returns true (1)\n on success.\n"]
15288 pub insert_separator_at: ::std::option::Option<
15289 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> ::std::os::raw::c_int,
15290 >,
15291 #[doc = "\n Insert an item in the menu at the specified |index|. Returns true (1) on\n success.\n"]
15292 pub insert_item_at: ::std::option::Option<
15293 unsafe extern "C" fn(
15294 self_: *mut _cef_menu_model_t,
15295 index: usize,
15296 command_id: ::std::os::raw::c_int,
15297 label: *const cef_string_t,
15298 ) -> ::std::os::raw::c_int,
15299 >,
15300 #[doc = "\n Insert a check item in the menu at the specified |index|. Returns true (1)\n on success.\n"]
15301 pub insert_check_item_at: ::std::option::Option<
15302 unsafe extern "C" fn(
15303 self_: *mut _cef_menu_model_t,
15304 index: usize,
15305 command_id: ::std::os::raw::c_int,
15306 label: *const cef_string_t,
15307 ) -> ::std::os::raw::c_int,
15308 >,
15309 #[doc = "\n Insert a radio item in the menu at the specified |index|. Only a single\n item with the specified |group_id| can be checked at a time. Returns true\n (1) on success.\n"]
15310 pub insert_radio_item_at: ::std::option::Option<
15311 unsafe extern "C" fn(
15312 self_: *mut _cef_menu_model_t,
15313 index: usize,
15314 command_id: ::std::os::raw::c_int,
15315 label: *const cef_string_t,
15316 group_id: ::std::os::raw::c_int,
15317 ) -> ::std::os::raw::c_int,
15318 >,
15319 #[doc = "\n Insert a sub-menu in the menu at the specified |index|. The new sub-menu\n is returned.\n"]
15320 pub insert_sub_menu_at: ::std::option::Option<
15321 unsafe extern "C" fn(
15322 self_: *mut _cef_menu_model_t,
15323 index: usize,
15324 command_id: ::std::os::raw::c_int,
15325 label: *const cef_string_t,
15326 ) -> *mut _cef_menu_model_t,
15327 >,
15328 #[doc = "\n Removes the item with the specified |command_id|. Returns true (1) on\n success.\n"]
15329 pub remove: ::std::option::Option<
15330 unsafe extern "C" fn(
15331 self_: *mut _cef_menu_model_t,
15332 command_id: ::std::os::raw::c_int,
15333 ) -> ::std::os::raw::c_int,
15334 >,
15335 #[doc = "\n Removes the item at the specified |index|. Returns true (1) on success.\n"]
15336 pub remove_at: ::std::option::Option<
15337 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> ::std::os::raw::c_int,
15338 >,
15339 #[doc = "\n Returns the index associated with the specified |command_id| or -1 if not\n found due to the command id not existing in the menu.\n"]
15340 pub get_index_of: ::std::option::Option<
15341 unsafe extern "C" fn(
15342 self_: *mut _cef_menu_model_t,
15343 command_id: ::std::os::raw::c_int,
15344 ) -> ::std::os::raw::c_int,
15345 >,
15346 #[doc = "\n Returns the command id at the specified |index| or -1 if not found due to\n invalid range or the index being a separator.\n"]
15347 pub get_command_id_at: ::std::option::Option<
15348 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> ::std::os::raw::c_int,
15349 >,
15350 #[doc = "\n Sets the command id at the specified |index|. Returns true (1) on success.\n"]
15351 pub set_command_id_at: ::std::option::Option<
15352 unsafe extern "C" fn(
15353 self_: *mut _cef_menu_model_t,
15354 index: usize,
15355 command_id: ::std::os::raw::c_int,
15356 ) -> ::std::os::raw::c_int,
15357 >,
15358 #[doc = "\n Returns the label for the specified |command_id| or NULL if not found.\n"]
15359 pub get_label: ::std::option::Option<
15360 unsafe extern "C" fn(
15361 self_: *mut _cef_menu_model_t,
15362 command_id: ::std::os::raw::c_int,
15363 ) -> cef_string_userfree_t,
15364 >,
15365 #[doc = "\n Returns the label at the specified |index| or NULL if not found due to\n invalid range or the index being a separator.\n"]
15366 pub get_label_at: ::std::option::Option<
15367 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> cef_string_userfree_t,
15368 >,
15369 #[doc = "\n Sets the label for the specified |command_id|. Returns true (1) on\n success.\n"]
15370 pub set_label: ::std::option::Option<
15371 unsafe extern "C" fn(
15372 self_: *mut _cef_menu_model_t,
15373 command_id: ::std::os::raw::c_int,
15374 label: *const cef_string_t,
15375 ) -> ::std::os::raw::c_int,
15376 >,
15377 #[doc = "\n Set the label at the specified |index|. Returns true (1) on success.\n"]
15378 pub set_label_at: ::std::option::Option<
15379 unsafe extern "C" fn(
15380 self_: *mut _cef_menu_model_t,
15381 index: usize,
15382 label: *const cef_string_t,
15383 ) -> ::std::os::raw::c_int,
15384 >,
15385 #[doc = "\n Returns the item type for the specified |command_id|.\n"]
15386 pub get_type: ::std::option::Option<
15387 unsafe extern "C" fn(
15388 self_: *mut _cef_menu_model_t,
15389 command_id: ::std::os::raw::c_int,
15390 ) -> cef_menu_item_type_t,
15391 >,
15392 #[doc = "\n Returns the item type at the specified |index|.\n"]
15393 pub get_type_at: ::std::option::Option<
15394 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> cef_menu_item_type_t,
15395 >,
15396 #[doc = "\n Returns the group id for the specified |command_id| or -1 if invalid.\n"]
15397 pub get_group_id: ::std::option::Option<
15398 unsafe extern "C" fn(
15399 self_: *mut _cef_menu_model_t,
15400 command_id: ::std::os::raw::c_int,
15401 ) -> ::std::os::raw::c_int,
15402 >,
15403 #[doc = "\n Returns the group id at the specified |index| or -1 if invalid.\n"]
15404 pub get_group_id_at: ::std::option::Option<
15405 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> ::std::os::raw::c_int,
15406 >,
15407 #[doc = "\n Sets the group id for the specified |command_id|. Returns true (1) on\n success.\n"]
15408 pub set_group_id: ::std::option::Option<
15409 unsafe extern "C" fn(
15410 self_: *mut _cef_menu_model_t,
15411 command_id: ::std::os::raw::c_int,
15412 group_id: ::std::os::raw::c_int,
15413 ) -> ::std::os::raw::c_int,
15414 >,
15415 #[doc = "\n Sets the group id at the specified |index|. Returns true (1) on success.\n"]
15416 pub set_group_id_at: ::std::option::Option<
15417 unsafe extern "C" fn(
15418 self_: *mut _cef_menu_model_t,
15419 index: usize,
15420 group_id: ::std::os::raw::c_int,
15421 ) -> ::std::os::raw::c_int,
15422 >,
15423 #[doc = "\n Returns the submenu for the specified |command_id| or NULL if invalid.\n"]
15424 pub get_sub_menu: ::std::option::Option<
15425 unsafe extern "C" fn(
15426 self_: *mut _cef_menu_model_t,
15427 command_id: ::std::os::raw::c_int,
15428 ) -> *mut _cef_menu_model_t,
15429 >,
15430 #[doc = "\n Returns the submenu at the specified |index| or NULL if invalid.\n"]
15431 pub get_sub_menu_at: ::std::option::Option<
15432 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> *mut _cef_menu_model_t,
15433 >,
15434 #[doc = "\n Returns true (1) if the specified |command_id| is visible.\n"]
15435 pub is_visible: ::std::option::Option<
15436 unsafe extern "C" fn(
15437 self_: *mut _cef_menu_model_t,
15438 command_id: ::std::os::raw::c_int,
15439 ) -> ::std::os::raw::c_int,
15440 >,
15441 #[doc = "\n Returns true (1) if the specified |index| is visible.\n"]
15442 pub is_visible_at: ::std::option::Option<
15443 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> ::std::os::raw::c_int,
15444 >,
15445 #[doc = "\n Change the visibility of the specified |command_id|. Returns true (1) on\n success.\n"]
15446 pub set_visible: ::std::option::Option<
15447 unsafe extern "C" fn(
15448 self_: *mut _cef_menu_model_t,
15449 command_id: ::std::os::raw::c_int,
15450 visible: ::std::os::raw::c_int,
15451 ) -> ::std::os::raw::c_int,
15452 >,
15453 #[doc = "\n Change the visibility at the specified |index|. Returns true (1) on\n success.\n"]
15454 pub set_visible_at: ::std::option::Option<
15455 unsafe extern "C" fn(
15456 self_: *mut _cef_menu_model_t,
15457 index: usize,
15458 visible: ::std::os::raw::c_int,
15459 ) -> ::std::os::raw::c_int,
15460 >,
15461 #[doc = "\n Returns true (1) if the specified |command_id| is enabled.\n"]
15462 pub is_enabled: ::std::option::Option<
15463 unsafe extern "C" fn(
15464 self_: *mut _cef_menu_model_t,
15465 command_id: ::std::os::raw::c_int,
15466 ) -> ::std::os::raw::c_int,
15467 >,
15468 #[doc = "\n Returns true (1) if the specified |index| is enabled.\n"]
15469 pub is_enabled_at: ::std::option::Option<
15470 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> ::std::os::raw::c_int,
15471 >,
15472 #[doc = "\n Change the enabled status of the specified |command_id|. Returns true (1)\n on success.\n"]
15473 pub set_enabled: ::std::option::Option<
15474 unsafe extern "C" fn(
15475 self_: *mut _cef_menu_model_t,
15476 command_id: ::std::os::raw::c_int,
15477 enabled: ::std::os::raw::c_int,
15478 ) -> ::std::os::raw::c_int,
15479 >,
15480 #[doc = "\n Change the enabled status at the specified |index|. Returns true (1) on\n success.\n"]
15481 pub set_enabled_at: ::std::option::Option<
15482 unsafe extern "C" fn(
15483 self_: *mut _cef_menu_model_t,
15484 index: usize,
15485 enabled: ::std::os::raw::c_int,
15486 ) -> ::std::os::raw::c_int,
15487 >,
15488 #[doc = "\n Returns true (1) if the specified |command_id| is checked. Only applies to\n check and radio items.\n"]
15489 pub is_checked: ::std::option::Option<
15490 unsafe extern "C" fn(
15491 self_: *mut _cef_menu_model_t,
15492 command_id: ::std::os::raw::c_int,
15493 ) -> ::std::os::raw::c_int,
15494 >,
15495 #[doc = "\n Returns true (1) if the specified |index| is checked. Only applies to\n check and radio items.\n"]
15496 pub is_checked_at: ::std::option::Option<
15497 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> ::std::os::raw::c_int,
15498 >,
15499 #[doc = "\n Check the specified |command_id|. Only applies to check and radio items.\n Returns true (1) on success.\n"]
15500 pub set_checked: ::std::option::Option<
15501 unsafe extern "C" fn(
15502 self_: *mut _cef_menu_model_t,
15503 command_id: ::std::os::raw::c_int,
15504 checked: ::std::os::raw::c_int,
15505 ) -> ::std::os::raw::c_int,
15506 >,
15507 #[doc = "\n Check the specified |index|. Only applies to check and radio items.\n Returns true (1) on success.\n"]
15508 pub set_checked_at: ::std::option::Option<
15509 unsafe extern "C" fn(
15510 self_: *mut _cef_menu_model_t,
15511 index: usize,
15512 checked: ::std::os::raw::c_int,
15513 ) -> ::std::os::raw::c_int,
15514 >,
15515 #[doc = "\n Returns true (1) if the specified |command_id| has a keyboard accelerator\n assigned.\n"]
15516 pub has_accelerator: ::std::option::Option<
15517 unsafe extern "C" fn(
15518 self_: *mut _cef_menu_model_t,
15519 command_id: ::std::os::raw::c_int,
15520 ) -> ::std::os::raw::c_int,
15521 >,
15522 #[doc = "\n Returns true (1) if the specified |index| has a keyboard accelerator\n assigned.\n"]
15523 pub has_accelerator_at: ::std::option::Option<
15524 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> ::std::os::raw::c_int,
15525 >,
15526 #[doc = "\n Set the keyboard accelerator for the specified |command_id|. |key_code|\n can be any virtual key or character value. Returns true (1) on success.\n"]
15527 pub set_accelerator: ::std::option::Option<
15528 unsafe extern "C" fn(
15529 self_: *mut _cef_menu_model_t,
15530 command_id: ::std::os::raw::c_int,
15531 key_code: ::std::os::raw::c_int,
15532 shift_pressed: ::std::os::raw::c_int,
15533 ctrl_pressed: ::std::os::raw::c_int,
15534 alt_pressed: ::std::os::raw::c_int,
15535 ) -> ::std::os::raw::c_int,
15536 >,
15537 #[doc = "\n Set the keyboard accelerator at the specified |index|. |key_code| can be\n any virtual key or character value. Returns true (1) on success.\n"]
15538 pub set_accelerator_at: ::std::option::Option<
15539 unsafe extern "C" fn(
15540 self_: *mut _cef_menu_model_t,
15541 index: usize,
15542 key_code: ::std::os::raw::c_int,
15543 shift_pressed: ::std::os::raw::c_int,
15544 ctrl_pressed: ::std::os::raw::c_int,
15545 alt_pressed: ::std::os::raw::c_int,
15546 ) -> ::std::os::raw::c_int,
15547 >,
15548 #[doc = "\n Remove the keyboard accelerator for the specified |command_id|. Returns\n true (1) on success.\n"]
15549 pub remove_accelerator: ::std::option::Option<
15550 unsafe extern "C" fn(
15551 self_: *mut _cef_menu_model_t,
15552 command_id: ::std::os::raw::c_int,
15553 ) -> ::std::os::raw::c_int,
15554 >,
15555 #[doc = "\n Remove the keyboard accelerator at the specified |index|. Returns true (1)\n on success.\n"]
15556 pub remove_accelerator_at: ::std::option::Option<
15557 unsafe extern "C" fn(self_: *mut _cef_menu_model_t, index: usize) -> ::std::os::raw::c_int,
15558 >,
15559 #[doc = "\n Retrieves the keyboard accelerator for the specified |command_id|. Returns\n true (1) on success.\n"]
15560 pub get_accelerator: ::std::option::Option<
15561 unsafe extern "C" fn(
15562 self_: *mut _cef_menu_model_t,
15563 command_id: ::std::os::raw::c_int,
15564 key_code: *mut ::std::os::raw::c_int,
15565 shift_pressed: *mut ::std::os::raw::c_int,
15566 ctrl_pressed: *mut ::std::os::raw::c_int,
15567 alt_pressed: *mut ::std::os::raw::c_int,
15568 ) -> ::std::os::raw::c_int,
15569 >,
15570 #[doc = "\n Retrieves the keyboard accelerator for the specified |index|. Returns true\n (1) on success.\n"]
15571 pub get_accelerator_at: ::std::option::Option<
15572 unsafe extern "C" fn(
15573 self_: *mut _cef_menu_model_t,
15574 index: usize,
15575 key_code: *mut ::std::os::raw::c_int,
15576 shift_pressed: *mut ::std::os::raw::c_int,
15577 ctrl_pressed: *mut ::std::os::raw::c_int,
15578 alt_pressed: *mut ::std::os::raw::c_int,
15579 ) -> ::std::os::raw::c_int,
15580 >,
15581 #[doc = "\n Set the explicit color for |command_id| and |color_type| to |color|.\n Specify a |color| value of 0 to remove the explicit color. If no explicit\n color or default color is set for |color_type| then the system color will\n be used. Returns true (1) on success.\n"]
15582 pub set_color: ::std::option::Option<
15583 unsafe extern "C" fn(
15584 self_: *mut _cef_menu_model_t,
15585 command_id: ::std::os::raw::c_int,
15586 color_type: cef_menu_color_type_t,
15587 color: cef_color_t,
15588 ) -> ::std::os::raw::c_int,
15589 >,
15590 #[doc = "\n Set the explicit color for |command_id| and |index| to |color|. Specify a\n |color| value of 0 to remove the explicit color. Specify an |index| value\n of -1 to set the default color for items that do not have an explicit\n color set. If no explicit color or default color is set for |color_type|\n then the system color will be used. Returns true (1) on success.\n"]
15591 pub set_color_at: ::std::option::Option<
15592 unsafe extern "C" fn(
15593 self_: *mut _cef_menu_model_t,
15594 index: ::std::os::raw::c_int,
15595 color_type: cef_menu_color_type_t,
15596 color: cef_color_t,
15597 ) -> ::std::os::raw::c_int,
15598 >,
15599 #[doc = "\n Returns in |color| the color that was explicitly set for |command_id| and\n |color_type|. If a color was not set then 0 will be returned in |color|.\n Returns true (1) on success.\n"]
15600 pub get_color: ::std::option::Option<
15601 unsafe extern "C" fn(
15602 self_: *mut _cef_menu_model_t,
15603 command_id: ::std::os::raw::c_int,
15604 color_type: cef_menu_color_type_t,
15605 color: *mut cef_color_t,
15606 ) -> ::std::os::raw::c_int,
15607 >,
15608 #[doc = "\n Returns in |color| the color that was explicitly set for |command_id| and\n |color_type|. Specify an |index| value of -1 to return the default color\n in |color|. If a color was not set then 0 will be returned in |color|.\n Returns true (1) on success.\n"]
15609 pub get_color_at: ::std::option::Option<
15610 unsafe extern "C" fn(
15611 self_: *mut _cef_menu_model_t,
15612 index: ::std::os::raw::c_int,
15613 color_type: cef_menu_color_type_t,
15614 color: *mut cef_color_t,
15615 ) -> ::std::os::raw::c_int,
15616 >,
15617 #[doc = "\n Sets the font list for the specified |command_id|. If |font_list| is NULL\n the system font will be used. Returns true (1) on success. The format is\n \"<FONT_FAMILY_LIST>,[STYLES] <SIZE>\", where: - FONT_FAMILY_LIST is a\n comma-separated list of font family names, - STYLES is an optional space-\n separated list of style names\n (case-sensitive \"Bold\" and \"Italic\" are supported), and\n - SIZE is an integer font size in pixels with the suffix \"px\".\n\n Here are examples of valid font description strings: - \"Arial, Helvetica,\n Bold Italic 14px\" - \"Arial, 14px\"\n"]
15618 pub set_font_list: ::std::option::Option<
15619 unsafe extern "C" fn(
15620 self_: *mut _cef_menu_model_t,
15621 command_id: ::std::os::raw::c_int,
15622 font_list: *const cef_string_t,
15623 ) -> ::std::os::raw::c_int,
15624 >,
15625 #[doc = "\n Sets the font list for the specified |index|. Specify an |index| value of\n -1 to set the default font. If |font_list| is NULL the system font will be\n used. Returns true (1) on success. The format is\n \"<FONT_FAMILY_LIST>,[STYLES] <SIZE>\", where: - FONT_FAMILY_LIST is a\n comma-separated list of font family names, - STYLES is an optional space-\n separated list of style names\n (case-sensitive \"Bold\" and \"Italic\" are supported), and\n - SIZE is an integer font size in pixels with the suffix \"px\".\n\n Here are examples of valid font description strings: - \"Arial, Helvetica,\n Bold Italic 14px\" - \"Arial, 14px\"\n"]
15626 pub set_font_list_at: ::std::option::Option<
15627 unsafe extern "C" fn(
15628 self_: *mut _cef_menu_model_t,
15629 index: ::std::os::raw::c_int,
15630 font_list: *const cef_string_t,
15631 ) -> ::std::os::raw::c_int,
15632 >,
15633}
15634#[test]
15635fn bindgen_test_layout__cef_menu_model_t() {
15636 const UNINIT: ::std::mem::MaybeUninit<_cef_menu_model_t> = ::std::mem::MaybeUninit::uninit();
15637 let ptr = UNINIT.as_ptr();
15638 assert_eq!(
15639 ::std::mem::size_of::<_cef_menu_model_t>(),
15640 488usize,
15641 concat!("Size of: ", stringify!(_cef_menu_model_t))
15642 );
15643 assert_eq!(
15644 ::std::mem::align_of::<_cef_menu_model_t>(),
15645 8usize,
15646 concat!("Alignment of ", stringify!(_cef_menu_model_t))
15647 );
15648 assert_eq!(
15649 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
15650 0usize,
15651 concat!(
15652 "Offset of field: ",
15653 stringify!(_cef_menu_model_t),
15654 "::",
15655 stringify!(base)
15656 )
15657 );
15658 assert_eq!(
15659 unsafe { ::std::ptr::addr_of!((*ptr).is_sub_menu) as usize - ptr as usize },
15660 40usize,
15661 concat!(
15662 "Offset of field: ",
15663 stringify!(_cef_menu_model_t),
15664 "::",
15665 stringify!(is_sub_menu)
15666 )
15667 );
15668 assert_eq!(
15669 unsafe { ::std::ptr::addr_of!((*ptr).clear) as usize - ptr as usize },
15670 48usize,
15671 concat!(
15672 "Offset of field: ",
15673 stringify!(_cef_menu_model_t),
15674 "::",
15675 stringify!(clear)
15676 )
15677 );
15678 assert_eq!(
15679 unsafe { ::std::ptr::addr_of!((*ptr).get_count) as usize - ptr as usize },
15680 56usize,
15681 concat!(
15682 "Offset of field: ",
15683 stringify!(_cef_menu_model_t),
15684 "::",
15685 stringify!(get_count)
15686 )
15687 );
15688 assert_eq!(
15689 unsafe { ::std::ptr::addr_of!((*ptr).add_separator) as usize - ptr as usize },
15690 64usize,
15691 concat!(
15692 "Offset of field: ",
15693 stringify!(_cef_menu_model_t),
15694 "::",
15695 stringify!(add_separator)
15696 )
15697 );
15698 assert_eq!(
15699 unsafe { ::std::ptr::addr_of!((*ptr).add_item) as usize - ptr as usize },
15700 72usize,
15701 concat!(
15702 "Offset of field: ",
15703 stringify!(_cef_menu_model_t),
15704 "::",
15705 stringify!(add_item)
15706 )
15707 );
15708 assert_eq!(
15709 unsafe { ::std::ptr::addr_of!((*ptr).add_check_item) as usize - ptr as usize },
15710 80usize,
15711 concat!(
15712 "Offset of field: ",
15713 stringify!(_cef_menu_model_t),
15714 "::",
15715 stringify!(add_check_item)
15716 )
15717 );
15718 assert_eq!(
15719 unsafe { ::std::ptr::addr_of!((*ptr).add_radio_item) as usize - ptr as usize },
15720 88usize,
15721 concat!(
15722 "Offset of field: ",
15723 stringify!(_cef_menu_model_t),
15724 "::",
15725 stringify!(add_radio_item)
15726 )
15727 );
15728 assert_eq!(
15729 unsafe { ::std::ptr::addr_of!((*ptr).add_sub_menu) as usize - ptr as usize },
15730 96usize,
15731 concat!(
15732 "Offset of field: ",
15733 stringify!(_cef_menu_model_t),
15734 "::",
15735 stringify!(add_sub_menu)
15736 )
15737 );
15738 assert_eq!(
15739 unsafe { ::std::ptr::addr_of!((*ptr).insert_separator_at) as usize - ptr as usize },
15740 104usize,
15741 concat!(
15742 "Offset of field: ",
15743 stringify!(_cef_menu_model_t),
15744 "::",
15745 stringify!(insert_separator_at)
15746 )
15747 );
15748 assert_eq!(
15749 unsafe { ::std::ptr::addr_of!((*ptr).insert_item_at) as usize - ptr as usize },
15750 112usize,
15751 concat!(
15752 "Offset of field: ",
15753 stringify!(_cef_menu_model_t),
15754 "::",
15755 stringify!(insert_item_at)
15756 )
15757 );
15758 assert_eq!(
15759 unsafe { ::std::ptr::addr_of!((*ptr).insert_check_item_at) as usize - ptr as usize },
15760 120usize,
15761 concat!(
15762 "Offset of field: ",
15763 stringify!(_cef_menu_model_t),
15764 "::",
15765 stringify!(insert_check_item_at)
15766 )
15767 );
15768 assert_eq!(
15769 unsafe { ::std::ptr::addr_of!((*ptr).insert_radio_item_at) as usize - ptr as usize },
15770 128usize,
15771 concat!(
15772 "Offset of field: ",
15773 stringify!(_cef_menu_model_t),
15774 "::",
15775 stringify!(insert_radio_item_at)
15776 )
15777 );
15778 assert_eq!(
15779 unsafe { ::std::ptr::addr_of!((*ptr).insert_sub_menu_at) as usize - ptr as usize },
15780 136usize,
15781 concat!(
15782 "Offset of field: ",
15783 stringify!(_cef_menu_model_t),
15784 "::",
15785 stringify!(insert_sub_menu_at)
15786 )
15787 );
15788 assert_eq!(
15789 unsafe { ::std::ptr::addr_of!((*ptr).remove) as usize - ptr as usize },
15790 144usize,
15791 concat!(
15792 "Offset of field: ",
15793 stringify!(_cef_menu_model_t),
15794 "::",
15795 stringify!(remove)
15796 )
15797 );
15798 assert_eq!(
15799 unsafe { ::std::ptr::addr_of!((*ptr).remove_at) as usize - ptr as usize },
15800 152usize,
15801 concat!(
15802 "Offset of field: ",
15803 stringify!(_cef_menu_model_t),
15804 "::",
15805 stringify!(remove_at)
15806 )
15807 );
15808 assert_eq!(
15809 unsafe { ::std::ptr::addr_of!((*ptr).get_index_of) as usize - ptr as usize },
15810 160usize,
15811 concat!(
15812 "Offset of field: ",
15813 stringify!(_cef_menu_model_t),
15814 "::",
15815 stringify!(get_index_of)
15816 )
15817 );
15818 assert_eq!(
15819 unsafe { ::std::ptr::addr_of!((*ptr).get_command_id_at) as usize - ptr as usize },
15820 168usize,
15821 concat!(
15822 "Offset of field: ",
15823 stringify!(_cef_menu_model_t),
15824 "::",
15825 stringify!(get_command_id_at)
15826 )
15827 );
15828 assert_eq!(
15829 unsafe { ::std::ptr::addr_of!((*ptr).set_command_id_at) as usize - ptr as usize },
15830 176usize,
15831 concat!(
15832 "Offset of field: ",
15833 stringify!(_cef_menu_model_t),
15834 "::",
15835 stringify!(set_command_id_at)
15836 )
15837 );
15838 assert_eq!(
15839 unsafe { ::std::ptr::addr_of!((*ptr).get_label) as usize - ptr as usize },
15840 184usize,
15841 concat!(
15842 "Offset of field: ",
15843 stringify!(_cef_menu_model_t),
15844 "::",
15845 stringify!(get_label)
15846 )
15847 );
15848 assert_eq!(
15849 unsafe { ::std::ptr::addr_of!((*ptr).get_label_at) as usize - ptr as usize },
15850 192usize,
15851 concat!(
15852 "Offset of field: ",
15853 stringify!(_cef_menu_model_t),
15854 "::",
15855 stringify!(get_label_at)
15856 )
15857 );
15858 assert_eq!(
15859 unsafe { ::std::ptr::addr_of!((*ptr).set_label) as usize - ptr as usize },
15860 200usize,
15861 concat!(
15862 "Offset of field: ",
15863 stringify!(_cef_menu_model_t),
15864 "::",
15865 stringify!(set_label)
15866 )
15867 );
15868 assert_eq!(
15869 unsafe { ::std::ptr::addr_of!((*ptr).set_label_at) as usize - ptr as usize },
15870 208usize,
15871 concat!(
15872 "Offset of field: ",
15873 stringify!(_cef_menu_model_t),
15874 "::",
15875 stringify!(set_label_at)
15876 )
15877 );
15878 assert_eq!(
15879 unsafe { ::std::ptr::addr_of!((*ptr).get_type) as usize - ptr as usize },
15880 216usize,
15881 concat!(
15882 "Offset of field: ",
15883 stringify!(_cef_menu_model_t),
15884 "::",
15885 stringify!(get_type)
15886 )
15887 );
15888 assert_eq!(
15889 unsafe { ::std::ptr::addr_of!((*ptr).get_type_at) as usize - ptr as usize },
15890 224usize,
15891 concat!(
15892 "Offset of field: ",
15893 stringify!(_cef_menu_model_t),
15894 "::",
15895 stringify!(get_type_at)
15896 )
15897 );
15898 assert_eq!(
15899 unsafe { ::std::ptr::addr_of!((*ptr).get_group_id) as usize - ptr as usize },
15900 232usize,
15901 concat!(
15902 "Offset of field: ",
15903 stringify!(_cef_menu_model_t),
15904 "::",
15905 stringify!(get_group_id)
15906 )
15907 );
15908 assert_eq!(
15909 unsafe { ::std::ptr::addr_of!((*ptr).get_group_id_at) as usize - ptr as usize },
15910 240usize,
15911 concat!(
15912 "Offset of field: ",
15913 stringify!(_cef_menu_model_t),
15914 "::",
15915 stringify!(get_group_id_at)
15916 )
15917 );
15918 assert_eq!(
15919 unsafe { ::std::ptr::addr_of!((*ptr).set_group_id) as usize - ptr as usize },
15920 248usize,
15921 concat!(
15922 "Offset of field: ",
15923 stringify!(_cef_menu_model_t),
15924 "::",
15925 stringify!(set_group_id)
15926 )
15927 );
15928 assert_eq!(
15929 unsafe { ::std::ptr::addr_of!((*ptr).set_group_id_at) as usize - ptr as usize },
15930 256usize,
15931 concat!(
15932 "Offset of field: ",
15933 stringify!(_cef_menu_model_t),
15934 "::",
15935 stringify!(set_group_id_at)
15936 )
15937 );
15938 assert_eq!(
15939 unsafe { ::std::ptr::addr_of!((*ptr).get_sub_menu) as usize - ptr as usize },
15940 264usize,
15941 concat!(
15942 "Offset of field: ",
15943 stringify!(_cef_menu_model_t),
15944 "::",
15945 stringify!(get_sub_menu)
15946 )
15947 );
15948 assert_eq!(
15949 unsafe { ::std::ptr::addr_of!((*ptr).get_sub_menu_at) as usize - ptr as usize },
15950 272usize,
15951 concat!(
15952 "Offset of field: ",
15953 stringify!(_cef_menu_model_t),
15954 "::",
15955 stringify!(get_sub_menu_at)
15956 )
15957 );
15958 assert_eq!(
15959 unsafe { ::std::ptr::addr_of!((*ptr).is_visible) as usize - ptr as usize },
15960 280usize,
15961 concat!(
15962 "Offset of field: ",
15963 stringify!(_cef_menu_model_t),
15964 "::",
15965 stringify!(is_visible)
15966 )
15967 );
15968 assert_eq!(
15969 unsafe { ::std::ptr::addr_of!((*ptr).is_visible_at) as usize - ptr as usize },
15970 288usize,
15971 concat!(
15972 "Offset of field: ",
15973 stringify!(_cef_menu_model_t),
15974 "::",
15975 stringify!(is_visible_at)
15976 )
15977 );
15978 assert_eq!(
15979 unsafe { ::std::ptr::addr_of!((*ptr).set_visible) as usize - ptr as usize },
15980 296usize,
15981 concat!(
15982 "Offset of field: ",
15983 stringify!(_cef_menu_model_t),
15984 "::",
15985 stringify!(set_visible)
15986 )
15987 );
15988 assert_eq!(
15989 unsafe { ::std::ptr::addr_of!((*ptr).set_visible_at) as usize - ptr as usize },
15990 304usize,
15991 concat!(
15992 "Offset of field: ",
15993 stringify!(_cef_menu_model_t),
15994 "::",
15995 stringify!(set_visible_at)
15996 )
15997 );
15998 assert_eq!(
15999 unsafe { ::std::ptr::addr_of!((*ptr).is_enabled) as usize - ptr as usize },
16000 312usize,
16001 concat!(
16002 "Offset of field: ",
16003 stringify!(_cef_menu_model_t),
16004 "::",
16005 stringify!(is_enabled)
16006 )
16007 );
16008 assert_eq!(
16009 unsafe { ::std::ptr::addr_of!((*ptr).is_enabled_at) as usize - ptr as usize },
16010 320usize,
16011 concat!(
16012 "Offset of field: ",
16013 stringify!(_cef_menu_model_t),
16014 "::",
16015 stringify!(is_enabled_at)
16016 )
16017 );
16018 assert_eq!(
16019 unsafe { ::std::ptr::addr_of!((*ptr).set_enabled) as usize - ptr as usize },
16020 328usize,
16021 concat!(
16022 "Offset of field: ",
16023 stringify!(_cef_menu_model_t),
16024 "::",
16025 stringify!(set_enabled)
16026 )
16027 );
16028 assert_eq!(
16029 unsafe { ::std::ptr::addr_of!((*ptr).set_enabled_at) as usize - ptr as usize },
16030 336usize,
16031 concat!(
16032 "Offset of field: ",
16033 stringify!(_cef_menu_model_t),
16034 "::",
16035 stringify!(set_enabled_at)
16036 )
16037 );
16038 assert_eq!(
16039 unsafe { ::std::ptr::addr_of!((*ptr).is_checked) as usize - ptr as usize },
16040 344usize,
16041 concat!(
16042 "Offset of field: ",
16043 stringify!(_cef_menu_model_t),
16044 "::",
16045 stringify!(is_checked)
16046 )
16047 );
16048 assert_eq!(
16049 unsafe { ::std::ptr::addr_of!((*ptr).is_checked_at) as usize - ptr as usize },
16050 352usize,
16051 concat!(
16052 "Offset of field: ",
16053 stringify!(_cef_menu_model_t),
16054 "::",
16055 stringify!(is_checked_at)
16056 )
16057 );
16058 assert_eq!(
16059 unsafe { ::std::ptr::addr_of!((*ptr).set_checked) as usize - ptr as usize },
16060 360usize,
16061 concat!(
16062 "Offset of field: ",
16063 stringify!(_cef_menu_model_t),
16064 "::",
16065 stringify!(set_checked)
16066 )
16067 );
16068 assert_eq!(
16069 unsafe { ::std::ptr::addr_of!((*ptr).set_checked_at) as usize - ptr as usize },
16070 368usize,
16071 concat!(
16072 "Offset of field: ",
16073 stringify!(_cef_menu_model_t),
16074 "::",
16075 stringify!(set_checked_at)
16076 )
16077 );
16078 assert_eq!(
16079 unsafe { ::std::ptr::addr_of!((*ptr).has_accelerator) as usize - ptr as usize },
16080 376usize,
16081 concat!(
16082 "Offset of field: ",
16083 stringify!(_cef_menu_model_t),
16084 "::",
16085 stringify!(has_accelerator)
16086 )
16087 );
16088 assert_eq!(
16089 unsafe { ::std::ptr::addr_of!((*ptr).has_accelerator_at) as usize - ptr as usize },
16090 384usize,
16091 concat!(
16092 "Offset of field: ",
16093 stringify!(_cef_menu_model_t),
16094 "::",
16095 stringify!(has_accelerator_at)
16096 )
16097 );
16098 assert_eq!(
16099 unsafe { ::std::ptr::addr_of!((*ptr).set_accelerator) as usize - ptr as usize },
16100 392usize,
16101 concat!(
16102 "Offset of field: ",
16103 stringify!(_cef_menu_model_t),
16104 "::",
16105 stringify!(set_accelerator)
16106 )
16107 );
16108 assert_eq!(
16109 unsafe { ::std::ptr::addr_of!((*ptr).set_accelerator_at) as usize - ptr as usize },
16110 400usize,
16111 concat!(
16112 "Offset of field: ",
16113 stringify!(_cef_menu_model_t),
16114 "::",
16115 stringify!(set_accelerator_at)
16116 )
16117 );
16118 assert_eq!(
16119 unsafe { ::std::ptr::addr_of!((*ptr).remove_accelerator) as usize - ptr as usize },
16120 408usize,
16121 concat!(
16122 "Offset of field: ",
16123 stringify!(_cef_menu_model_t),
16124 "::",
16125 stringify!(remove_accelerator)
16126 )
16127 );
16128 assert_eq!(
16129 unsafe { ::std::ptr::addr_of!((*ptr).remove_accelerator_at) as usize - ptr as usize },
16130 416usize,
16131 concat!(
16132 "Offset of field: ",
16133 stringify!(_cef_menu_model_t),
16134 "::",
16135 stringify!(remove_accelerator_at)
16136 )
16137 );
16138 assert_eq!(
16139 unsafe { ::std::ptr::addr_of!((*ptr).get_accelerator) as usize - ptr as usize },
16140 424usize,
16141 concat!(
16142 "Offset of field: ",
16143 stringify!(_cef_menu_model_t),
16144 "::",
16145 stringify!(get_accelerator)
16146 )
16147 );
16148 assert_eq!(
16149 unsafe { ::std::ptr::addr_of!((*ptr).get_accelerator_at) as usize - ptr as usize },
16150 432usize,
16151 concat!(
16152 "Offset of field: ",
16153 stringify!(_cef_menu_model_t),
16154 "::",
16155 stringify!(get_accelerator_at)
16156 )
16157 );
16158 assert_eq!(
16159 unsafe { ::std::ptr::addr_of!((*ptr).set_color) as usize - ptr as usize },
16160 440usize,
16161 concat!(
16162 "Offset of field: ",
16163 stringify!(_cef_menu_model_t),
16164 "::",
16165 stringify!(set_color)
16166 )
16167 );
16168 assert_eq!(
16169 unsafe { ::std::ptr::addr_of!((*ptr).set_color_at) as usize - ptr as usize },
16170 448usize,
16171 concat!(
16172 "Offset of field: ",
16173 stringify!(_cef_menu_model_t),
16174 "::",
16175 stringify!(set_color_at)
16176 )
16177 );
16178 assert_eq!(
16179 unsafe { ::std::ptr::addr_of!((*ptr).get_color) as usize - ptr as usize },
16180 456usize,
16181 concat!(
16182 "Offset of field: ",
16183 stringify!(_cef_menu_model_t),
16184 "::",
16185 stringify!(get_color)
16186 )
16187 );
16188 assert_eq!(
16189 unsafe { ::std::ptr::addr_of!((*ptr).get_color_at) as usize - ptr as usize },
16190 464usize,
16191 concat!(
16192 "Offset of field: ",
16193 stringify!(_cef_menu_model_t),
16194 "::",
16195 stringify!(get_color_at)
16196 )
16197 );
16198 assert_eq!(
16199 unsafe { ::std::ptr::addr_of!((*ptr).set_font_list) as usize - ptr as usize },
16200 472usize,
16201 concat!(
16202 "Offset of field: ",
16203 stringify!(_cef_menu_model_t),
16204 "::",
16205 stringify!(set_font_list)
16206 )
16207 );
16208 assert_eq!(
16209 unsafe { ::std::ptr::addr_of!((*ptr).set_font_list_at) as usize - ptr as usize },
16210 480usize,
16211 concat!(
16212 "Offset of field: ",
16213 stringify!(_cef_menu_model_t),
16214 "::",
16215 stringify!(set_font_list_at)
16216 )
16217 );
16218}
16219#[doc = "\n Supports creation and modification of menus. See cef_menu_id_t for the\n command ids that have default implementations. All user-defined command ids\n should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of\n this structure can only be accessed on the browser process the UI thread.\n"]
16220pub type cef_menu_model_t = _cef_menu_model_t;
16221extern "C" {
16222 #[doc = "\n Create a new MenuModel with the specified |delegate|.\n"]
16223 pub fn cef_menu_model_create(
16224 delegate: *mut _cef_menu_model_delegate_t,
16225 ) -> *mut cef_menu_model_t;
16226}
16227#[doc = "\n Callback structure used for continuation of custom context menu display.\n"]
16228#[repr(C)]
16229#[derive(Debug, Copy, Clone)]
16230pub struct _cef_run_context_menu_callback_t {
16231 #[doc = "\n Base structure.\n"]
16232 pub base: cef_base_ref_counted_t,
16233 #[doc = "\n Complete context menu display by selecting the specified |command_id| and\n |event_flags|.\n"]
16234 pub cont: ::std::option::Option<
16235 unsafe extern "C" fn(
16236 self_: *mut _cef_run_context_menu_callback_t,
16237 command_id: ::std::os::raw::c_int,
16238 event_flags: cef_event_flags_t,
16239 ),
16240 >,
16241 #[doc = "\n Cancel context menu display.\n"]
16242 pub cancel:
16243 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_run_context_menu_callback_t)>,
16244}
16245#[test]
16246fn bindgen_test_layout__cef_run_context_menu_callback_t() {
16247 const UNINIT: ::std::mem::MaybeUninit<_cef_run_context_menu_callback_t> =
16248 ::std::mem::MaybeUninit::uninit();
16249 let ptr = UNINIT.as_ptr();
16250 assert_eq!(
16251 ::std::mem::size_of::<_cef_run_context_menu_callback_t>(),
16252 56usize,
16253 concat!("Size of: ", stringify!(_cef_run_context_menu_callback_t))
16254 );
16255 assert_eq!(
16256 ::std::mem::align_of::<_cef_run_context_menu_callback_t>(),
16257 8usize,
16258 concat!(
16259 "Alignment of ",
16260 stringify!(_cef_run_context_menu_callback_t)
16261 )
16262 );
16263 assert_eq!(
16264 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
16265 0usize,
16266 concat!(
16267 "Offset of field: ",
16268 stringify!(_cef_run_context_menu_callback_t),
16269 "::",
16270 stringify!(base)
16271 )
16272 );
16273 assert_eq!(
16274 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
16275 40usize,
16276 concat!(
16277 "Offset of field: ",
16278 stringify!(_cef_run_context_menu_callback_t),
16279 "::",
16280 stringify!(cont)
16281 )
16282 );
16283 assert_eq!(
16284 unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize },
16285 48usize,
16286 concat!(
16287 "Offset of field: ",
16288 stringify!(_cef_run_context_menu_callback_t),
16289 "::",
16290 stringify!(cancel)
16291 )
16292 );
16293}
16294#[doc = "\n Callback structure used for continuation of custom context menu display.\n"]
16295pub type cef_run_context_menu_callback_t = _cef_run_context_menu_callback_t;
16296#[doc = "\n Callback structure used for continuation of custom quick menu display.\n"]
16297#[repr(C)]
16298#[derive(Debug, Copy, Clone)]
16299pub struct _cef_run_quick_menu_callback_t {
16300 #[doc = "\n Base structure.\n"]
16301 pub base: cef_base_ref_counted_t,
16302 #[doc = "\n Complete quick menu display by selecting the specified |command_id| and\n |event_flags|.\n"]
16303 pub cont: ::std::option::Option<
16304 unsafe extern "C" fn(
16305 self_: *mut _cef_run_quick_menu_callback_t,
16306 command_id: ::std::os::raw::c_int,
16307 event_flags: cef_event_flags_t,
16308 ),
16309 >,
16310 #[doc = "\n Cancel quick menu display.\n"]
16311 pub cancel:
16312 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_run_quick_menu_callback_t)>,
16313}
16314#[test]
16315fn bindgen_test_layout__cef_run_quick_menu_callback_t() {
16316 const UNINIT: ::std::mem::MaybeUninit<_cef_run_quick_menu_callback_t> =
16317 ::std::mem::MaybeUninit::uninit();
16318 let ptr = UNINIT.as_ptr();
16319 assert_eq!(
16320 ::std::mem::size_of::<_cef_run_quick_menu_callback_t>(),
16321 56usize,
16322 concat!("Size of: ", stringify!(_cef_run_quick_menu_callback_t))
16323 );
16324 assert_eq!(
16325 ::std::mem::align_of::<_cef_run_quick_menu_callback_t>(),
16326 8usize,
16327 concat!("Alignment of ", stringify!(_cef_run_quick_menu_callback_t))
16328 );
16329 assert_eq!(
16330 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
16331 0usize,
16332 concat!(
16333 "Offset of field: ",
16334 stringify!(_cef_run_quick_menu_callback_t),
16335 "::",
16336 stringify!(base)
16337 )
16338 );
16339 assert_eq!(
16340 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
16341 40usize,
16342 concat!(
16343 "Offset of field: ",
16344 stringify!(_cef_run_quick_menu_callback_t),
16345 "::",
16346 stringify!(cont)
16347 )
16348 );
16349 assert_eq!(
16350 unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize },
16351 48usize,
16352 concat!(
16353 "Offset of field: ",
16354 stringify!(_cef_run_quick_menu_callback_t),
16355 "::",
16356 stringify!(cancel)
16357 )
16358 );
16359}
16360#[doc = "\n Callback structure used for continuation of custom quick menu display.\n"]
16361pub type cef_run_quick_menu_callback_t = _cef_run_quick_menu_callback_t;
16362#[doc = "\n Implement this structure to handle context menu events. The functions of\n this structure will be called on the UI thread.\n"]
16363#[repr(C)]
16364#[derive(Debug, Copy, Clone)]
16365pub struct _cef_context_menu_handler_t {
16366 #[doc = "\n Base structure.\n"]
16367 pub base: cef_base_ref_counted_t,
16368 #[doc = "\n Called before a context menu is displayed. |params| provides information\n about the context menu state. |model| initially contains the default\n context menu. The |model| can be cleared to show no context menu or\n modified to show a custom menu. Do not keep references to |params| or\n |model| outside of this callback.\n"]
16369 pub on_before_context_menu: ::std::option::Option<
16370 unsafe extern "C" fn(
16371 self_: *mut _cef_context_menu_handler_t,
16372 browser: *mut _cef_browser_t,
16373 frame: *mut _cef_frame_t,
16374 params: *mut _cef_context_menu_params_t,
16375 model: *mut _cef_menu_model_t,
16376 ),
16377 >,
16378 #[doc = "\n Called to allow custom display of the context menu. |params| provides\n information about the context menu state. |model| contains the context\n menu model resulting from OnBeforeContextMenu. For custom display return\n true (1) and execute |callback| either synchronously or asynchronously\n with the selected command ID. For default display return false (0). Do not\n keep references to |params| or |model| outside of this callback.\n"]
16379 pub run_context_menu: ::std::option::Option<
16380 unsafe extern "C" fn(
16381 self_: *mut _cef_context_menu_handler_t,
16382 browser: *mut _cef_browser_t,
16383 frame: *mut _cef_frame_t,
16384 params: *mut _cef_context_menu_params_t,
16385 model: *mut _cef_menu_model_t,
16386 callback: *mut _cef_run_context_menu_callback_t,
16387 ) -> ::std::os::raw::c_int,
16388 >,
16389 #[doc = "\n Called to execute a command selected from the context menu. Return true\n (1) if the command was handled or false (0) for the default\n implementation. See cef_menu_id_t for the command ids that have default\n implementations. All user-defined command ids should be between\n MENU_ID_USER_FIRST and MENU_ID_USER_LAST. |params| will have the same\n values as what was passed to on_before_context_menu(). Do not keep a\n reference to |params| outside of this callback.\n"]
16390 pub on_context_menu_command: ::std::option::Option<
16391 unsafe extern "C" fn(
16392 self_: *mut _cef_context_menu_handler_t,
16393 browser: *mut _cef_browser_t,
16394 frame: *mut _cef_frame_t,
16395 params: *mut _cef_context_menu_params_t,
16396 command_id: ::std::os::raw::c_int,
16397 event_flags: cef_event_flags_t,
16398 ) -> ::std::os::raw::c_int,
16399 >,
16400 #[doc = "\n Called when the context menu is dismissed irregardless of whether the menu\n was canceled or a command was selected.\n"]
16401 pub on_context_menu_dismissed: ::std::option::Option<
16402 unsafe extern "C" fn(
16403 self_: *mut _cef_context_menu_handler_t,
16404 browser: *mut _cef_browser_t,
16405 frame: *mut _cef_frame_t,
16406 ),
16407 >,
16408 #[doc = "\n Called to allow custom display of the quick menu for a windowless browser.\n |location| is the top left corner of the selected region. |size| is the\n size of the selected region. |edit_state_flags| is a combination of flags\n that represent the state of the quick menu. Return true (1) if the menu\n will be handled and execute |callback| either synchronously or\n asynchronously with the selected command ID. Return false (0) to cancel\n the menu.\n"]
16409 pub run_quick_menu: ::std::option::Option<
16410 unsafe extern "C" fn(
16411 self_: *mut _cef_context_menu_handler_t,
16412 browser: *mut _cef_browser_t,
16413 frame: *mut _cef_frame_t,
16414 location: *const cef_point_t,
16415 size: *const cef_size_t,
16416 edit_state_flags: cef_quick_menu_edit_state_flags_t,
16417 callback: *mut _cef_run_quick_menu_callback_t,
16418 ) -> ::std::os::raw::c_int,
16419 >,
16420 #[doc = "\n Called to execute a command selected from the quick menu for a windowless\n browser. Return true (1) if the command was handled or false (0) for the\n default implementation. See cef_menu_id_t for command IDs that have\n default implementations.\n"]
16421 pub on_quick_menu_command: ::std::option::Option<
16422 unsafe extern "C" fn(
16423 self_: *mut _cef_context_menu_handler_t,
16424 browser: *mut _cef_browser_t,
16425 frame: *mut _cef_frame_t,
16426 command_id: ::std::os::raw::c_int,
16427 event_flags: cef_event_flags_t,
16428 ) -> ::std::os::raw::c_int,
16429 >,
16430 #[doc = "\n Called when the quick menu for a windowless browser is dismissed\n irregardless of whether the menu was canceled or a command was selected.\n"]
16431 pub on_quick_menu_dismissed: ::std::option::Option<
16432 unsafe extern "C" fn(
16433 self_: *mut _cef_context_menu_handler_t,
16434 browser: *mut _cef_browser_t,
16435 frame: *mut _cef_frame_t,
16436 ),
16437 >,
16438}
16439#[test]
16440fn bindgen_test_layout__cef_context_menu_handler_t() {
16441 const UNINIT: ::std::mem::MaybeUninit<_cef_context_menu_handler_t> =
16442 ::std::mem::MaybeUninit::uninit();
16443 let ptr = UNINIT.as_ptr();
16444 assert_eq!(
16445 ::std::mem::size_of::<_cef_context_menu_handler_t>(),
16446 96usize,
16447 concat!("Size of: ", stringify!(_cef_context_menu_handler_t))
16448 );
16449 assert_eq!(
16450 ::std::mem::align_of::<_cef_context_menu_handler_t>(),
16451 8usize,
16452 concat!("Alignment of ", stringify!(_cef_context_menu_handler_t))
16453 );
16454 assert_eq!(
16455 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
16456 0usize,
16457 concat!(
16458 "Offset of field: ",
16459 stringify!(_cef_context_menu_handler_t),
16460 "::",
16461 stringify!(base)
16462 )
16463 );
16464 assert_eq!(
16465 unsafe { ::std::ptr::addr_of!((*ptr).on_before_context_menu) as usize - ptr as usize },
16466 40usize,
16467 concat!(
16468 "Offset of field: ",
16469 stringify!(_cef_context_menu_handler_t),
16470 "::",
16471 stringify!(on_before_context_menu)
16472 )
16473 );
16474 assert_eq!(
16475 unsafe { ::std::ptr::addr_of!((*ptr).run_context_menu) as usize - ptr as usize },
16476 48usize,
16477 concat!(
16478 "Offset of field: ",
16479 stringify!(_cef_context_menu_handler_t),
16480 "::",
16481 stringify!(run_context_menu)
16482 )
16483 );
16484 assert_eq!(
16485 unsafe { ::std::ptr::addr_of!((*ptr).on_context_menu_command) as usize - ptr as usize },
16486 56usize,
16487 concat!(
16488 "Offset of field: ",
16489 stringify!(_cef_context_menu_handler_t),
16490 "::",
16491 stringify!(on_context_menu_command)
16492 )
16493 );
16494 assert_eq!(
16495 unsafe { ::std::ptr::addr_of!((*ptr).on_context_menu_dismissed) as usize - ptr as usize },
16496 64usize,
16497 concat!(
16498 "Offset of field: ",
16499 stringify!(_cef_context_menu_handler_t),
16500 "::",
16501 stringify!(on_context_menu_dismissed)
16502 )
16503 );
16504 assert_eq!(
16505 unsafe { ::std::ptr::addr_of!((*ptr).run_quick_menu) as usize - ptr as usize },
16506 72usize,
16507 concat!(
16508 "Offset of field: ",
16509 stringify!(_cef_context_menu_handler_t),
16510 "::",
16511 stringify!(run_quick_menu)
16512 )
16513 );
16514 assert_eq!(
16515 unsafe { ::std::ptr::addr_of!((*ptr).on_quick_menu_command) as usize - ptr as usize },
16516 80usize,
16517 concat!(
16518 "Offset of field: ",
16519 stringify!(_cef_context_menu_handler_t),
16520 "::",
16521 stringify!(on_quick_menu_command)
16522 )
16523 );
16524 assert_eq!(
16525 unsafe { ::std::ptr::addr_of!((*ptr).on_quick_menu_dismissed) as usize - ptr as usize },
16526 88usize,
16527 concat!(
16528 "Offset of field: ",
16529 stringify!(_cef_context_menu_handler_t),
16530 "::",
16531 stringify!(on_quick_menu_dismissed)
16532 )
16533 );
16534}
16535#[doc = "\n Implement this structure to handle context menu events. The functions of\n this structure will be called on the UI thread.\n"]
16536pub type cef_context_menu_handler_t = _cef_context_menu_handler_t;
16537#[doc = "\n Provides information about the context menu state. The functions of this\n structure can only be accessed on browser process the UI thread.\n"]
16538#[repr(C)]
16539#[derive(Debug, Copy, Clone)]
16540pub struct _cef_context_menu_params_t {
16541 #[doc = "\n Base structure.\n"]
16542 pub base: cef_base_ref_counted_t,
16543 #[doc = "\n Returns the X coordinate of the mouse where the context menu was invoked.\n Coords are relative to the associated RenderView's origin.\n"]
16544 pub get_xcoord: ::std::option::Option<
16545 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> ::std::os::raw::c_int,
16546 >,
16547 #[doc = "\n Returns the Y coordinate of the mouse where the context menu was invoked.\n Coords are relative to the associated RenderView's origin.\n"]
16548 pub get_ycoord: ::std::option::Option<
16549 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> ::std::os::raw::c_int,
16550 >,
16551 #[doc = "\n Returns flags representing the type of node that the context menu was\n invoked on.\n"]
16552 pub get_type_flags: ::std::option::Option<
16553 unsafe extern "C" fn(
16554 self_: *mut _cef_context_menu_params_t,
16555 ) -> cef_context_menu_type_flags_t,
16556 >,
16557 #[doc = "\n Returns the URL of the link, if any, that encloses the node that the\n context menu was invoked on.\n"]
16558 pub get_link_url: ::std::option::Option<
16559 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> cef_string_userfree_t,
16560 >,
16561 #[doc = "\n Returns the link URL, if any, to be used ONLY for \"copy link address\". We\n don't validate this field in the frontend process.\n"]
16562 pub get_unfiltered_link_url: ::std::option::Option<
16563 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> cef_string_userfree_t,
16564 >,
16565 #[doc = "\n Returns the source URL, if any, for the element that the context menu was\n invoked on. Example of elements with source URLs are img, audio, and\n video.\n"]
16566 pub get_source_url: ::std::option::Option<
16567 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> cef_string_userfree_t,
16568 >,
16569 #[doc = "\n Returns true (1) if the context menu was invoked on an image which has\n non-NULL contents.\n"]
16570 pub has_image_contents: ::std::option::Option<
16571 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> ::std::os::raw::c_int,
16572 >,
16573 #[doc = "\n Returns the title text or the alt text if the context menu was invoked on\n an image.\n"]
16574 pub get_title_text: ::std::option::Option<
16575 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> cef_string_userfree_t,
16576 >,
16577 #[doc = "\n Returns the URL of the top level page that the context menu was invoked\n on.\n"]
16578 pub get_page_url: ::std::option::Option<
16579 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> cef_string_userfree_t,
16580 >,
16581 #[doc = "\n Returns the URL of the subframe that the context menu was invoked on.\n"]
16582 pub get_frame_url: ::std::option::Option<
16583 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> cef_string_userfree_t,
16584 >,
16585 #[doc = "\n Returns the character encoding of the subframe that the context menu was\n invoked on.\n"]
16586 pub get_frame_charset: ::std::option::Option<
16587 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> cef_string_userfree_t,
16588 >,
16589 #[doc = "\n Returns the type of context node that the context menu was invoked on.\n"]
16590 pub get_media_type: ::std::option::Option<
16591 unsafe extern "C" fn(
16592 self_: *mut _cef_context_menu_params_t,
16593 ) -> cef_context_menu_media_type_t,
16594 >,
16595 #[doc = "\n Returns flags representing the actions supported by the media element, if\n any, that the context menu was invoked on.\n"]
16596 pub get_media_state_flags: ::std::option::Option<
16597 unsafe extern "C" fn(
16598 self_: *mut _cef_context_menu_params_t,
16599 ) -> cef_context_menu_media_state_flags_t,
16600 >,
16601 #[doc = "\n Returns the text of the selection, if any, that the context menu was\n invoked on.\n"]
16602 pub get_selection_text: ::std::option::Option<
16603 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> cef_string_userfree_t,
16604 >,
16605 #[doc = "\n Returns the text of the misspelled word, if any, that the context menu was\n invoked on.\n"]
16606 pub get_misspelled_word: ::std::option::Option<
16607 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> cef_string_userfree_t,
16608 >,
16609 #[doc = "\n Returns true (1) if suggestions exist, false (0) otherwise. Fills in\n |suggestions| from the spell check service for the misspelled word if\n there is one.\n"]
16610 pub get_dictionary_suggestions: ::std::option::Option<
16611 unsafe extern "C" fn(
16612 self_: *mut _cef_context_menu_params_t,
16613 suggestions: cef_string_list_t,
16614 ) -> ::std::os::raw::c_int,
16615 >,
16616 #[doc = "\n Returns true (1) if the context menu was invoked on an editable node.\n"]
16617 pub is_editable: ::std::option::Option<
16618 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> ::std::os::raw::c_int,
16619 >,
16620 #[doc = "\n Returns true (1) if the context menu was invoked on an editable node where\n spell-check is enabled.\n"]
16621 pub is_spell_check_enabled: ::std::option::Option<
16622 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> ::std::os::raw::c_int,
16623 >,
16624 #[doc = "\n Returns flags representing the actions supported by the editable node, if\n any, that the context menu was invoked on.\n"]
16625 pub get_edit_state_flags: ::std::option::Option<
16626 unsafe extern "C" fn(
16627 self_: *mut _cef_context_menu_params_t,
16628 ) -> cef_context_menu_edit_state_flags_t,
16629 >,
16630 #[doc = "\n Returns true (1) if the context menu contains items specified by the\n renderer process.\n"]
16631 pub is_custom_menu: ::std::option::Option<
16632 unsafe extern "C" fn(self_: *mut _cef_context_menu_params_t) -> ::std::os::raw::c_int,
16633 >,
16634}
16635#[test]
16636fn bindgen_test_layout__cef_context_menu_params_t() {
16637 const UNINIT: ::std::mem::MaybeUninit<_cef_context_menu_params_t> =
16638 ::std::mem::MaybeUninit::uninit();
16639 let ptr = UNINIT.as_ptr();
16640 assert_eq!(
16641 ::std::mem::size_of::<_cef_context_menu_params_t>(),
16642 200usize,
16643 concat!("Size of: ", stringify!(_cef_context_menu_params_t))
16644 );
16645 assert_eq!(
16646 ::std::mem::align_of::<_cef_context_menu_params_t>(),
16647 8usize,
16648 concat!("Alignment of ", stringify!(_cef_context_menu_params_t))
16649 );
16650 assert_eq!(
16651 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
16652 0usize,
16653 concat!(
16654 "Offset of field: ",
16655 stringify!(_cef_context_menu_params_t),
16656 "::",
16657 stringify!(base)
16658 )
16659 );
16660 assert_eq!(
16661 unsafe { ::std::ptr::addr_of!((*ptr).get_xcoord) as usize - ptr as usize },
16662 40usize,
16663 concat!(
16664 "Offset of field: ",
16665 stringify!(_cef_context_menu_params_t),
16666 "::",
16667 stringify!(get_xcoord)
16668 )
16669 );
16670 assert_eq!(
16671 unsafe { ::std::ptr::addr_of!((*ptr).get_ycoord) as usize - ptr as usize },
16672 48usize,
16673 concat!(
16674 "Offset of field: ",
16675 stringify!(_cef_context_menu_params_t),
16676 "::",
16677 stringify!(get_ycoord)
16678 )
16679 );
16680 assert_eq!(
16681 unsafe { ::std::ptr::addr_of!((*ptr).get_type_flags) as usize - ptr as usize },
16682 56usize,
16683 concat!(
16684 "Offset of field: ",
16685 stringify!(_cef_context_menu_params_t),
16686 "::",
16687 stringify!(get_type_flags)
16688 )
16689 );
16690 assert_eq!(
16691 unsafe { ::std::ptr::addr_of!((*ptr).get_link_url) as usize - ptr as usize },
16692 64usize,
16693 concat!(
16694 "Offset of field: ",
16695 stringify!(_cef_context_menu_params_t),
16696 "::",
16697 stringify!(get_link_url)
16698 )
16699 );
16700 assert_eq!(
16701 unsafe { ::std::ptr::addr_of!((*ptr).get_unfiltered_link_url) as usize - ptr as usize },
16702 72usize,
16703 concat!(
16704 "Offset of field: ",
16705 stringify!(_cef_context_menu_params_t),
16706 "::",
16707 stringify!(get_unfiltered_link_url)
16708 )
16709 );
16710 assert_eq!(
16711 unsafe { ::std::ptr::addr_of!((*ptr).get_source_url) as usize - ptr as usize },
16712 80usize,
16713 concat!(
16714 "Offset of field: ",
16715 stringify!(_cef_context_menu_params_t),
16716 "::",
16717 stringify!(get_source_url)
16718 )
16719 );
16720 assert_eq!(
16721 unsafe { ::std::ptr::addr_of!((*ptr).has_image_contents) as usize - ptr as usize },
16722 88usize,
16723 concat!(
16724 "Offset of field: ",
16725 stringify!(_cef_context_menu_params_t),
16726 "::",
16727 stringify!(has_image_contents)
16728 )
16729 );
16730 assert_eq!(
16731 unsafe { ::std::ptr::addr_of!((*ptr).get_title_text) as usize - ptr as usize },
16732 96usize,
16733 concat!(
16734 "Offset of field: ",
16735 stringify!(_cef_context_menu_params_t),
16736 "::",
16737 stringify!(get_title_text)
16738 )
16739 );
16740 assert_eq!(
16741 unsafe { ::std::ptr::addr_of!((*ptr).get_page_url) as usize - ptr as usize },
16742 104usize,
16743 concat!(
16744 "Offset of field: ",
16745 stringify!(_cef_context_menu_params_t),
16746 "::",
16747 stringify!(get_page_url)
16748 )
16749 );
16750 assert_eq!(
16751 unsafe { ::std::ptr::addr_of!((*ptr).get_frame_url) as usize - ptr as usize },
16752 112usize,
16753 concat!(
16754 "Offset of field: ",
16755 stringify!(_cef_context_menu_params_t),
16756 "::",
16757 stringify!(get_frame_url)
16758 )
16759 );
16760 assert_eq!(
16761 unsafe { ::std::ptr::addr_of!((*ptr).get_frame_charset) as usize - ptr as usize },
16762 120usize,
16763 concat!(
16764 "Offset of field: ",
16765 stringify!(_cef_context_menu_params_t),
16766 "::",
16767 stringify!(get_frame_charset)
16768 )
16769 );
16770 assert_eq!(
16771 unsafe { ::std::ptr::addr_of!((*ptr).get_media_type) as usize - ptr as usize },
16772 128usize,
16773 concat!(
16774 "Offset of field: ",
16775 stringify!(_cef_context_menu_params_t),
16776 "::",
16777 stringify!(get_media_type)
16778 )
16779 );
16780 assert_eq!(
16781 unsafe { ::std::ptr::addr_of!((*ptr).get_media_state_flags) as usize - ptr as usize },
16782 136usize,
16783 concat!(
16784 "Offset of field: ",
16785 stringify!(_cef_context_menu_params_t),
16786 "::",
16787 stringify!(get_media_state_flags)
16788 )
16789 );
16790 assert_eq!(
16791 unsafe { ::std::ptr::addr_of!((*ptr).get_selection_text) as usize - ptr as usize },
16792 144usize,
16793 concat!(
16794 "Offset of field: ",
16795 stringify!(_cef_context_menu_params_t),
16796 "::",
16797 stringify!(get_selection_text)
16798 )
16799 );
16800 assert_eq!(
16801 unsafe { ::std::ptr::addr_of!((*ptr).get_misspelled_word) as usize - ptr as usize },
16802 152usize,
16803 concat!(
16804 "Offset of field: ",
16805 stringify!(_cef_context_menu_params_t),
16806 "::",
16807 stringify!(get_misspelled_word)
16808 )
16809 );
16810 assert_eq!(
16811 unsafe { ::std::ptr::addr_of!((*ptr).get_dictionary_suggestions) as usize - ptr as usize },
16812 160usize,
16813 concat!(
16814 "Offset of field: ",
16815 stringify!(_cef_context_menu_params_t),
16816 "::",
16817 stringify!(get_dictionary_suggestions)
16818 )
16819 );
16820 assert_eq!(
16821 unsafe { ::std::ptr::addr_of!((*ptr).is_editable) as usize - ptr as usize },
16822 168usize,
16823 concat!(
16824 "Offset of field: ",
16825 stringify!(_cef_context_menu_params_t),
16826 "::",
16827 stringify!(is_editable)
16828 )
16829 );
16830 assert_eq!(
16831 unsafe { ::std::ptr::addr_of!((*ptr).is_spell_check_enabled) as usize - ptr as usize },
16832 176usize,
16833 concat!(
16834 "Offset of field: ",
16835 stringify!(_cef_context_menu_params_t),
16836 "::",
16837 stringify!(is_spell_check_enabled)
16838 )
16839 );
16840 assert_eq!(
16841 unsafe { ::std::ptr::addr_of!((*ptr).get_edit_state_flags) as usize - ptr as usize },
16842 184usize,
16843 concat!(
16844 "Offset of field: ",
16845 stringify!(_cef_context_menu_params_t),
16846 "::",
16847 stringify!(get_edit_state_flags)
16848 )
16849 );
16850 assert_eq!(
16851 unsafe { ::std::ptr::addr_of!((*ptr).is_custom_menu) as usize - ptr as usize },
16852 192usize,
16853 concat!(
16854 "Offset of field: ",
16855 stringify!(_cef_context_menu_params_t),
16856 "::",
16857 stringify!(is_custom_menu)
16858 )
16859 );
16860}
16861#[doc = "\n Provides information about the context menu state. The functions of this\n structure can only be accessed on browser process the UI thread.\n"]
16862pub type cef_context_menu_params_t = _cef_context_menu_params_t;
16863#[doc = "\n Callback structure for asynchronous continuation of file dialog requests.\n"]
16864#[repr(C)]
16865#[derive(Debug, Copy, Clone)]
16866pub struct _cef_file_dialog_callback_t {
16867 #[doc = "\n Base structure.\n"]
16868 pub base: cef_base_ref_counted_t,
16869 #[doc = "\n Continue the file selection. |file_paths| should be a single value or a\n list of values depending on the dialog mode. An NULL |file_paths| value is\n treated the same as calling cancel().\n"]
16870 pub cont: ::std::option::Option<
16871 unsafe extern "C" fn(
16872 self_: *mut _cef_file_dialog_callback_t,
16873 file_paths: cef_string_list_t,
16874 ),
16875 >,
16876 #[doc = "\n Cancel the file selection.\n"]
16877 pub cancel:
16878 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_file_dialog_callback_t)>,
16879}
16880#[test]
16881fn bindgen_test_layout__cef_file_dialog_callback_t() {
16882 const UNINIT: ::std::mem::MaybeUninit<_cef_file_dialog_callback_t> =
16883 ::std::mem::MaybeUninit::uninit();
16884 let ptr = UNINIT.as_ptr();
16885 assert_eq!(
16886 ::std::mem::size_of::<_cef_file_dialog_callback_t>(),
16887 56usize,
16888 concat!("Size of: ", stringify!(_cef_file_dialog_callback_t))
16889 );
16890 assert_eq!(
16891 ::std::mem::align_of::<_cef_file_dialog_callback_t>(),
16892 8usize,
16893 concat!("Alignment of ", stringify!(_cef_file_dialog_callback_t))
16894 );
16895 assert_eq!(
16896 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
16897 0usize,
16898 concat!(
16899 "Offset of field: ",
16900 stringify!(_cef_file_dialog_callback_t),
16901 "::",
16902 stringify!(base)
16903 )
16904 );
16905 assert_eq!(
16906 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
16907 40usize,
16908 concat!(
16909 "Offset of field: ",
16910 stringify!(_cef_file_dialog_callback_t),
16911 "::",
16912 stringify!(cont)
16913 )
16914 );
16915 assert_eq!(
16916 unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize },
16917 48usize,
16918 concat!(
16919 "Offset of field: ",
16920 stringify!(_cef_file_dialog_callback_t),
16921 "::",
16922 stringify!(cancel)
16923 )
16924 );
16925}
16926#[doc = "\n Callback structure for asynchronous continuation of file dialog requests.\n"]
16927pub type cef_file_dialog_callback_t = _cef_file_dialog_callback_t;
16928#[doc = "\n Implement this structure to handle dialog events. The functions of this\n structure will be called on the browser process UI thread.\n"]
16929#[repr(C)]
16930#[derive(Debug, Copy, Clone)]
16931pub struct _cef_dialog_handler_t {
16932 #[doc = "\n Base structure.\n"]
16933 pub base: cef_base_ref_counted_t,
16934 #[doc = "\n Called to run a file chooser dialog. |mode| represents the type of dialog\n to display. |title| to the title to be used for the dialog and may be NULL\n to show the default title (\"Open\" or \"Save\" depending on the mode).\n |default_file_path| is the path with optional directory and/or file name\n component that should be initially selected in the dialog.\n |accept_filters| are used to restrict the selectable file types and may\n any combination of (a) valid lower-cased MIME types (e.g. \"text/*\" or\n \"image/*\"), (b) individual file extensions (e.g. \".txt\" or \".png\"), or (c)\n combined description and file extension delimited using \"|\" and \";\" (e.g.\n \"Image Types|.png;.gif;.jpg\"). To display a custom dialog return true (1)\n and execute |callback| either inline or at a later time. To display the\n default dialog return false (0).\n"]
16935 pub on_file_dialog: ::std::option::Option<
16936 unsafe extern "C" fn(
16937 self_: *mut _cef_dialog_handler_t,
16938 browser: *mut _cef_browser_t,
16939 mode: cef_file_dialog_mode_t,
16940 title: *const cef_string_t,
16941 default_file_path: *const cef_string_t,
16942 accept_filters: cef_string_list_t,
16943 callback: *mut _cef_file_dialog_callback_t,
16944 ) -> ::std::os::raw::c_int,
16945 >,
16946}
16947#[test]
16948fn bindgen_test_layout__cef_dialog_handler_t() {
16949 const UNINIT: ::std::mem::MaybeUninit<_cef_dialog_handler_t> =
16950 ::std::mem::MaybeUninit::uninit();
16951 let ptr = UNINIT.as_ptr();
16952 assert_eq!(
16953 ::std::mem::size_of::<_cef_dialog_handler_t>(),
16954 48usize,
16955 concat!("Size of: ", stringify!(_cef_dialog_handler_t))
16956 );
16957 assert_eq!(
16958 ::std::mem::align_of::<_cef_dialog_handler_t>(),
16959 8usize,
16960 concat!("Alignment of ", stringify!(_cef_dialog_handler_t))
16961 );
16962 assert_eq!(
16963 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
16964 0usize,
16965 concat!(
16966 "Offset of field: ",
16967 stringify!(_cef_dialog_handler_t),
16968 "::",
16969 stringify!(base)
16970 )
16971 );
16972 assert_eq!(
16973 unsafe { ::std::ptr::addr_of!((*ptr).on_file_dialog) as usize - ptr as usize },
16974 40usize,
16975 concat!(
16976 "Offset of field: ",
16977 stringify!(_cef_dialog_handler_t),
16978 "::",
16979 stringify!(on_file_dialog)
16980 )
16981 );
16982}
16983#[doc = "\n Implement this structure to handle dialog events. The functions of this\n structure will be called on the browser process UI thread.\n"]
16984pub type cef_dialog_handler_t = _cef_dialog_handler_t;
16985#[doc = "\n Implement this structure to handle events related to browser display state.\n The functions of this structure will be called on the UI thread.\n"]
16986#[repr(C)]
16987#[derive(Debug, Copy, Clone)]
16988pub struct _cef_display_handler_t {
16989 #[doc = "\n Base structure.\n"]
16990 pub base: cef_base_ref_counted_t,
16991 #[doc = "\n Called when a frame's address has changed.\n"]
16992 pub on_address_change: ::std::option::Option<
16993 unsafe extern "C" fn(
16994 self_: *mut _cef_display_handler_t,
16995 browser: *mut _cef_browser_t,
16996 frame: *mut _cef_frame_t,
16997 url: *const cef_string_t,
16998 ),
16999 >,
17000 #[doc = "\n Called when the page title changes.\n"]
17001 pub on_title_change: ::std::option::Option<
17002 unsafe extern "C" fn(
17003 self_: *mut _cef_display_handler_t,
17004 browser: *mut _cef_browser_t,
17005 title: *const cef_string_t,
17006 ),
17007 >,
17008 #[doc = "\n Called when the page icon changes.\n"]
17009 pub on_favicon_urlchange: ::std::option::Option<
17010 unsafe extern "C" fn(
17011 self_: *mut _cef_display_handler_t,
17012 browser: *mut _cef_browser_t,
17013 icon_urls: cef_string_list_t,
17014 ),
17015 >,
17016 #[doc = "\n Called when web content in the page has toggled fullscreen mode. If\n |fullscreen| is true (1) the content will automatically be sized to fill\n the browser content area. If |fullscreen| is false (0) the content will\n automatically return to its original size and position. With the Alloy\n runtime the client is responsible for triggering the fullscreen transition\n (for example, by calling cef_window_t::SetFullscreen when using Views).\n With the Chrome runtime the fullscreen transition will be triggered\n automatically. The cef_window_delegate_t::OnWindowFullscreenTransition\n function will be called during the fullscreen transition for notification\n purposes.\n"]
17017 pub on_fullscreen_mode_change: ::std::option::Option<
17018 unsafe extern "C" fn(
17019 self_: *mut _cef_display_handler_t,
17020 browser: *mut _cef_browser_t,
17021 fullscreen: ::std::os::raw::c_int,
17022 ),
17023 >,
17024 #[doc = "\n Called when the browser is about to display a tooltip. |text| contains the\n text that will be displayed in the tooltip. To handle the display of the\n tooltip yourself return true (1). Otherwise, you can optionally modify\n |text| and then return false (0) to allow the browser to display the\n tooltip. When window rendering is disabled the application is responsible\n for drawing tooltips and the return value is ignored.\n"]
17025 pub on_tooltip: ::std::option::Option<
17026 unsafe extern "C" fn(
17027 self_: *mut _cef_display_handler_t,
17028 browser: *mut _cef_browser_t,
17029 text: *mut cef_string_t,
17030 ) -> ::std::os::raw::c_int,
17031 >,
17032 #[doc = "\n Called when the browser receives a status message. |value| contains the\n text that will be displayed in the status message.\n"]
17033 pub on_status_message: ::std::option::Option<
17034 unsafe extern "C" fn(
17035 self_: *mut _cef_display_handler_t,
17036 browser: *mut _cef_browser_t,
17037 value: *const cef_string_t,
17038 ),
17039 >,
17040 #[doc = "\n Called to display a console message. Return true (1) to stop the message\n from being output to the console.\n"]
17041 pub on_console_message: ::std::option::Option<
17042 unsafe extern "C" fn(
17043 self_: *mut _cef_display_handler_t,
17044 browser: *mut _cef_browser_t,
17045 level: cef_log_severity_t,
17046 message: *const cef_string_t,
17047 source: *const cef_string_t,
17048 line: ::std::os::raw::c_int,
17049 ) -> ::std::os::raw::c_int,
17050 >,
17051 #[doc = "\n Called when auto-resize is enabled via\n cef_browser_host_t::SetAutoResizeEnabled and the contents have auto-\n resized. |new_size| will be the desired size in view coordinates. Return\n true (1) if the resize was handled or false (0) for default handling.\n"]
17052 pub on_auto_resize: ::std::option::Option<
17053 unsafe extern "C" fn(
17054 self_: *mut _cef_display_handler_t,
17055 browser: *mut _cef_browser_t,
17056 new_size: *const cef_size_t,
17057 ) -> ::std::os::raw::c_int,
17058 >,
17059 #[doc = "\n Called when the overall page loading progress has changed. |progress|\n ranges from 0.0 to 1.0.\n"]
17060 pub on_loading_progress_change: ::std::option::Option<
17061 unsafe extern "C" fn(
17062 self_: *mut _cef_display_handler_t,
17063 browser: *mut _cef_browser_t,
17064 progress: f64,
17065 ),
17066 >,
17067 #[doc = "\n Called when the browser's cursor has changed. If |type| is CT_CUSTOM then\n |custom_cursor_info| will be populated with the custom cursor information.\n Return true (1) if the cursor change was handled or false (0) for default\n handling.\n"]
17068 pub on_cursor_change: ::std::option::Option<
17069 unsafe extern "C" fn(
17070 self_: *mut _cef_display_handler_t,
17071 browser: *mut _cef_browser_t,
17072 cursor: ::std::os::raw::c_ulong,
17073 type_: cef_cursor_type_t,
17074 custom_cursor_info: *const cef_cursor_info_t,
17075 ) -> ::std::os::raw::c_int,
17076 >,
17077 #[doc = "\n Called when the browser's access to an audio and/or video source has\n changed.\n"]
17078 pub on_media_access_change: ::std::option::Option<
17079 unsafe extern "C" fn(
17080 self_: *mut _cef_display_handler_t,
17081 browser: *mut _cef_browser_t,
17082 has_video_access: ::std::os::raw::c_int,
17083 has_audio_access: ::std::os::raw::c_int,
17084 ),
17085 >,
17086}
17087#[test]
17088fn bindgen_test_layout__cef_display_handler_t() {
17089 const UNINIT: ::std::mem::MaybeUninit<_cef_display_handler_t> =
17090 ::std::mem::MaybeUninit::uninit();
17091 let ptr = UNINIT.as_ptr();
17092 assert_eq!(
17093 ::std::mem::size_of::<_cef_display_handler_t>(),
17094 128usize,
17095 concat!("Size of: ", stringify!(_cef_display_handler_t))
17096 );
17097 assert_eq!(
17098 ::std::mem::align_of::<_cef_display_handler_t>(),
17099 8usize,
17100 concat!("Alignment of ", stringify!(_cef_display_handler_t))
17101 );
17102 assert_eq!(
17103 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
17104 0usize,
17105 concat!(
17106 "Offset of field: ",
17107 stringify!(_cef_display_handler_t),
17108 "::",
17109 stringify!(base)
17110 )
17111 );
17112 assert_eq!(
17113 unsafe { ::std::ptr::addr_of!((*ptr).on_address_change) as usize - ptr as usize },
17114 40usize,
17115 concat!(
17116 "Offset of field: ",
17117 stringify!(_cef_display_handler_t),
17118 "::",
17119 stringify!(on_address_change)
17120 )
17121 );
17122 assert_eq!(
17123 unsafe { ::std::ptr::addr_of!((*ptr).on_title_change) as usize - ptr as usize },
17124 48usize,
17125 concat!(
17126 "Offset of field: ",
17127 stringify!(_cef_display_handler_t),
17128 "::",
17129 stringify!(on_title_change)
17130 )
17131 );
17132 assert_eq!(
17133 unsafe { ::std::ptr::addr_of!((*ptr).on_favicon_urlchange) as usize - ptr as usize },
17134 56usize,
17135 concat!(
17136 "Offset of field: ",
17137 stringify!(_cef_display_handler_t),
17138 "::",
17139 stringify!(on_favicon_urlchange)
17140 )
17141 );
17142 assert_eq!(
17143 unsafe { ::std::ptr::addr_of!((*ptr).on_fullscreen_mode_change) as usize - ptr as usize },
17144 64usize,
17145 concat!(
17146 "Offset of field: ",
17147 stringify!(_cef_display_handler_t),
17148 "::",
17149 stringify!(on_fullscreen_mode_change)
17150 )
17151 );
17152 assert_eq!(
17153 unsafe { ::std::ptr::addr_of!((*ptr).on_tooltip) as usize - ptr as usize },
17154 72usize,
17155 concat!(
17156 "Offset of field: ",
17157 stringify!(_cef_display_handler_t),
17158 "::",
17159 stringify!(on_tooltip)
17160 )
17161 );
17162 assert_eq!(
17163 unsafe { ::std::ptr::addr_of!((*ptr).on_status_message) as usize - ptr as usize },
17164 80usize,
17165 concat!(
17166 "Offset of field: ",
17167 stringify!(_cef_display_handler_t),
17168 "::",
17169 stringify!(on_status_message)
17170 )
17171 );
17172 assert_eq!(
17173 unsafe { ::std::ptr::addr_of!((*ptr).on_console_message) as usize - ptr as usize },
17174 88usize,
17175 concat!(
17176 "Offset of field: ",
17177 stringify!(_cef_display_handler_t),
17178 "::",
17179 stringify!(on_console_message)
17180 )
17181 );
17182 assert_eq!(
17183 unsafe { ::std::ptr::addr_of!((*ptr).on_auto_resize) as usize - ptr as usize },
17184 96usize,
17185 concat!(
17186 "Offset of field: ",
17187 stringify!(_cef_display_handler_t),
17188 "::",
17189 stringify!(on_auto_resize)
17190 )
17191 );
17192 assert_eq!(
17193 unsafe { ::std::ptr::addr_of!((*ptr).on_loading_progress_change) as usize - ptr as usize },
17194 104usize,
17195 concat!(
17196 "Offset of field: ",
17197 stringify!(_cef_display_handler_t),
17198 "::",
17199 stringify!(on_loading_progress_change)
17200 )
17201 );
17202 assert_eq!(
17203 unsafe { ::std::ptr::addr_of!((*ptr).on_cursor_change) as usize - ptr as usize },
17204 112usize,
17205 concat!(
17206 "Offset of field: ",
17207 stringify!(_cef_display_handler_t),
17208 "::",
17209 stringify!(on_cursor_change)
17210 )
17211 );
17212 assert_eq!(
17213 unsafe { ::std::ptr::addr_of!((*ptr).on_media_access_change) as usize - ptr as usize },
17214 120usize,
17215 concat!(
17216 "Offset of field: ",
17217 stringify!(_cef_display_handler_t),
17218 "::",
17219 stringify!(on_media_access_change)
17220 )
17221 );
17222}
17223#[doc = "\n Implement this structure to handle events related to browser display state.\n The functions of this structure will be called on the UI thread.\n"]
17224pub type cef_display_handler_t = _cef_display_handler_t;
17225#[doc = "\n Structure used to represent a download item.\n"]
17226#[repr(C)]
17227#[derive(Debug, Copy, Clone)]
17228pub struct _cef_download_item_t {
17229 #[doc = "\n Base structure.\n"]
17230 pub base: cef_base_ref_counted_t,
17231 #[doc = "\n Returns true (1) if this object is valid. Do not call any other functions\n if this function returns false (0).\n"]
17232 pub is_valid: ::std::option::Option<
17233 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> ::std::os::raw::c_int,
17234 >,
17235 #[doc = "\n Returns true (1) if the download is in progress.\n"]
17236 pub is_in_progress: ::std::option::Option<
17237 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> ::std::os::raw::c_int,
17238 >,
17239 #[doc = "\n Returns true (1) if the download is complete.\n"]
17240 pub is_complete: ::std::option::Option<
17241 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> ::std::os::raw::c_int,
17242 >,
17243 #[doc = "\n Returns true (1) if the download has been canceled.\n"]
17244 pub is_canceled: ::std::option::Option<
17245 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> ::std::os::raw::c_int,
17246 >,
17247 #[doc = "\n Returns true (1) if the download has been interrupted.\n"]
17248 pub is_interrupted: ::std::option::Option<
17249 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> ::std::os::raw::c_int,
17250 >,
17251 #[doc = "\n Returns the most recent interrupt reason.\n"]
17252 pub get_interrupt_reason: ::std::option::Option<
17253 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> cef_download_interrupt_reason_t,
17254 >,
17255 #[doc = "\n Returns a simple speed estimate in bytes/s.\n"]
17256 pub get_current_speed:
17257 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> i64>,
17258 #[doc = "\n Returns the rough percent complete or -1 if the receive total size is\n unknown.\n"]
17259 pub get_percent_complete: ::std::option::Option<
17260 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> ::std::os::raw::c_int,
17261 >,
17262 #[doc = "\n Returns the total number of bytes.\n"]
17263 pub get_total_bytes:
17264 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> i64>,
17265 #[doc = "\n Returns the number of received bytes.\n"]
17266 pub get_received_bytes:
17267 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> i64>,
17268 #[doc = "\n Returns the time that the download started.\n"]
17269 pub get_start_time: ::std::option::Option<
17270 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> cef_basetime_t,
17271 >,
17272 #[doc = "\n Returns the time that the download ended.\n"]
17273 pub get_end_time: ::std::option::Option<
17274 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> cef_basetime_t,
17275 >,
17276 #[doc = "\n Returns the full path to the downloaded or downloading file.\n"]
17277 pub get_full_path: ::std::option::Option<
17278 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> cef_string_userfree_t,
17279 >,
17280 #[doc = "\n Returns the unique identifier for this download.\n"]
17281 pub get_id:
17282 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> u32>,
17283 #[doc = "\n Returns the URL.\n"]
17284 pub get_url: ::std::option::Option<
17285 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> cef_string_userfree_t,
17286 >,
17287 #[doc = "\n Returns the original URL before any redirections.\n"]
17288 pub get_original_url: ::std::option::Option<
17289 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> cef_string_userfree_t,
17290 >,
17291 #[doc = "\n Returns the suggested file name.\n"]
17292 pub get_suggested_file_name: ::std::option::Option<
17293 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> cef_string_userfree_t,
17294 >,
17295 #[doc = "\n Returns the content disposition.\n"]
17296 pub get_content_disposition: ::std::option::Option<
17297 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> cef_string_userfree_t,
17298 >,
17299 #[doc = "\n Returns the mime type.\n"]
17300 pub get_mime_type: ::std::option::Option<
17301 unsafe extern "C" fn(self_: *mut _cef_download_item_t) -> cef_string_userfree_t,
17302 >,
17303}
17304#[test]
17305fn bindgen_test_layout__cef_download_item_t() {
17306 const UNINIT: ::std::mem::MaybeUninit<_cef_download_item_t> = ::std::mem::MaybeUninit::uninit();
17307 let ptr = UNINIT.as_ptr();
17308 assert_eq!(
17309 ::std::mem::size_of::<_cef_download_item_t>(),
17310 192usize,
17311 concat!("Size of: ", stringify!(_cef_download_item_t))
17312 );
17313 assert_eq!(
17314 ::std::mem::align_of::<_cef_download_item_t>(),
17315 8usize,
17316 concat!("Alignment of ", stringify!(_cef_download_item_t))
17317 );
17318 assert_eq!(
17319 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
17320 0usize,
17321 concat!(
17322 "Offset of field: ",
17323 stringify!(_cef_download_item_t),
17324 "::",
17325 stringify!(base)
17326 )
17327 );
17328 assert_eq!(
17329 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
17330 40usize,
17331 concat!(
17332 "Offset of field: ",
17333 stringify!(_cef_download_item_t),
17334 "::",
17335 stringify!(is_valid)
17336 )
17337 );
17338 assert_eq!(
17339 unsafe { ::std::ptr::addr_of!((*ptr).is_in_progress) as usize - ptr as usize },
17340 48usize,
17341 concat!(
17342 "Offset of field: ",
17343 stringify!(_cef_download_item_t),
17344 "::",
17345 stringify!(is_in_progress)
17346 )
17347 );
17348 assert_eq!(
17349 unsafe { ::std::ptr::addr_of!((*ptr).is_complete) as usize - ptr as usize },
17350 56usize,
17351 concat!(
17352 "Offset of field: ",
17353 stringify!(_cef_download_item_t),
17354 "::",
17355 stringify!(is_complete)
17356 )
17357 );
17358 assert_eq!(
17359 unsafe { ::std::ptr::addr_of!((*ptr).is_canceled) as usize - ptr as usize },
17360 64usize,
17361 concat!(
17362 "Offset of field: ",
17363 stringify!(_cef_download_item_t),
17364 "::",
17365 stringify!(is_canceled)
17366 )
17367 );
17368 assert_eq!(
17369 unsafe { ::std::ptr::addr_of!((*ptr).is_interrupted) as usize - ptr as usize },
17370 72usize,
17371 concat!(
17372 "Offset of field: ",
17373 stringify!(_cef_download_item_t),
17374 "::",
17375 stringify!(is_interrupted)
17376 )
17377 );
17378 assert_eq!(
17379 unsafe { ::std::ptr::addr_of!((*ptr).get_interrupt_reason) as usize - ptr as usize },
17380 80usize,
17381 concat!(
17382 "Offset of field: ",
17383 stringify!(_cef_download_item_t),
17384 "::",
17385 stringify!(get_interrupt_reason)
17386 )
17387 );
17388 assert_eq!(
17389 unsafe { ::std::ptr::addr_of!((*ptr).get_current_speed) as usize - ptr as usize },
17390 88usize,
17391 concat!(
17392 "Offset of field: ",
17393 stringify!(_cef_download_item_t),
17394 "::",
17395 stringify!(get_current_speed)
17396 )
17397 );
17398 assert_eq!(
17399 unsafe { ::std::ptr::addr_of!((*ptr).get_percent_complete) as usize - ptr as usize },
17400 96usize,
17401 concat!(
17402 "Offset of field: ",
17403 stringify!(_cef_download_item_t),
17404 "::",
17405 stringify!(get_percent_complete)
17406 )
17407 );
17408 assert_eq!(
17409 unsafe { ::std::ptr::addr_of!((*ptr).get_total_bytes) as usize - ptr as usize },
17410 104usize,
17411 concat!(
17412 "Offset of field: ",
17413 stringify!(_cef_download_item_t),
17414 "::",
17415 stringify!(get_total_bytes)
17416 )
17417 );
17418 assert_eq!(
17419 unsafe { ::std::ptr::addr_of!((*ptr).get_received_bytes) as usize - ptr as usize },
17420 112usize,
17421 concat!(
17422 "Offset of field: ",
17423 stringify!(_cef_download_item_t),
17424 "::",
17425 stringify!(get_received_bytes)
17426 )
17427 );
17428 assert_eq!(
17429 unsafe { ::std::ptr::addr_of!((*ptr).get_start_time) as usize - ptr as usize },
17430 120usize,
17431 concat!(
17432 "Offset of field: ",
17433 stringify!(_cef_download_item_t),
17434 "::",
17435 stringify!(get_start_time)
17436 )
17437 );
17438 assert_eq!(
17439 unsafe { ::std::ptr::addr_of!((*ptr).get_end_time) as usize - ptr as usize },
17440 128usize,
17441 concat!(
17442 "Offset of field: ",
17443 stringify!(_cef_download_item_t),
17444 "::",
17445 stringify!(get_end_time)
17446 )
17447 );
17448 assert_eq!(
17449 unsafe { ::std::ptr::addr_of!((*ptr).get_full_path) as usize - ptr as usize },
17450 136usize,
17451 concat!(
17452 "Offset of field: ",
17453 stringify!(_cef_download_item_t),
17454 "::",
17455 stringify!(get_full_path)
17456 )
17457 );
17458 assert_eq!(
17459 unsafe { ::std::ptr::addr_of!((*ptr).get_id) as usize - ptr as usize },
17460 144usize,
17461 concat!(
17462 "Offset of field: ",
17463 stringify!(_cef_download_item_t),
17464 "::",
17465 stringify!(get_id)
17466 )
17467 );
17468 assert_eq!(
17469 unsafe { ::std::ptr::addr_of!((*ptr).get_url) as usize - ptr as usize },
17470 152usize,
17471 concat!(
17472 "Offset of field: ",
17473 stringify!(_cef_download_item_t),
17474 "::",
17475 stringify!(get_url)
17476 )
17477 );
17478 assert_eq!(
17479 unsafe { ::std::ptr::addr_of!((*ptr).get_original_url) as usize - ptr as usize },
17480 160usize,
17481 concat!(
17482 "Offset of field: ",
17483 stringify!(_cef_download_item_t),
17484 "::",
17485 stringify!(get_original_url)
17486 )
17487 );
17488 assert_eq!(
17489 unsafe { ::std::ptr::addr_of!((*ptr).get_suggested_file_name) as usize - ptr as usize },
17490 168usize,
17491 concat!(
17492 "Offset of field: ",
17493 stringify!(_cef_download_item_t),
17494 "::",
17495 stringify!(get_suggested_file_name)
17496 )
17497 );
17498 assert_eq!(
17499 unsafe { ::std::ptr::addr_of!((*ptr).get_content_disposition) as usize - ptr as usize },
17500 176usize,
17501 concat!(
17502 "Offset of field: ",
17503 stringify!(_cef_download_item_t),
17504 "::",
17505 stringify!(get_content_disposition)
17506 )
17507 );
17508 assert_eq!(
17509 unsafe { ::std::ptr::addr_of!((*ptr).get_mime_type) as usize - ptr as usize },
17510 184usize,
17511 concat!(
17512 "Offset of field: ",
17513 stringify!(_cef_download_item_t),
17514 "::",
17515 stringify!(get_mime_type)
17516 )
17517 );
17518}
17519#[doc = "\n Structure used to represent a download item.\n"]
17520pub type cef_download_item_t = _cef_download_item_t;
17521#[doc = "\n Callback structure used to asynchronously continue a download.\n"]
17522#[repr(C)]
17523#[derive(Debug, Copy, Clone)]
17524pub struct _cef_before_download_callback_t {
17525 #[doc = "\n Base structure.\n"]
17526 pub base: cef_base_ref_counted_t,
17527 #[doc = "\n Call to continue the download. Set |download_path| to the full file path\n for the download including the file name or leave blank to use the\n suggested name and the default temp directory. Set |show_dialog| to true\n (1) if you do wish to show the default \"Save As\" dialog.\n"]
17528 pub cont: ::std::option::Option<
17529 unsafe extern "C" fn(
17530 self_: *mut _cef_before_download_callback_t,
17531 download_path: *const cef_string_t,
17532 show_dialog: ::std::os::raw::c_int,
17533 ),
17534 >,
17535}
17536#[test]
17537fn bindgen_test_layout__cef_before_download_callback_t() {
17538 const UNINIT: ::std::mem::MaybeUninit<_cef_before_download_callback_t> =
17539 ::std::mem::MaybeUninit::uninit();
17540 let ptr = UNINIT.as_ptr();
17541 assert_eq!(
17542 ::std::mem::size_of::<_cef_before_download_callback_t>(),
17543 48usize,
17544 concat!("Size of: ", stringify!(_cef_before_download_callback_t))
17545 );
17546 assert_eq!(
17547 ::std::mem::align_of::<_cef_before_download_callback_t>(),
17548 8usize,
17549 concat!("Alignment of ", stringify!(_cef_before_download_callback_t))
17550 );
17551 assert_eq!(
17552 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
17553 0usize,
17554 concat!(
17555 "Offset of field: ",
17556 stringify!(_cef_before_download_callback_t),
17557 "::",
17558 stringify!(base)
17559 )
17560 );
17561 assert_eq!(
17562 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
17563 40usize,
17564 concat!(
17565 "Offset of field: ",
17566 stringify!(_cef_before_download_callback_t),
17567 "::",
17568 stringify!(cont)
17569 )
17570 );
17571}
17572#[doc = "\n Callback structure used to asynchronously continue a download.\n"]
17573pub type cef_before_download_callback_t = _cef_before_download_callback_t;
17574#[doc = "\n Callback structure used to asynchronously cancel a download.\n"]
17575#[repr(C)]
17576#[derive(Debug, Copy, Clone)]
17577pub struct _cef_download_item_callback_t {
17578 #[doc = "\n Base structure.\n"]
17579 pub base: cef_base_ref_counted_t,
17580 #[doc = "\n Call to cancel the download.\n"]
17581 pub cancel:
17582 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_download_item_callback_t)>,
17583 #[doc = "\n Call to pause the download.\n"]
17584 pub pause:
17585 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_download_item_callback_t)>,
17586 #[doc = "\n Call to resume the download.\n"]
17587 pub resume:
17588 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_download_item_callback_t)>,
17589}
17590#[test]
17591fn bindgen_test_layout__cef_download_item_callback_t() {
17592 const UNINIT: ::std::mem::MaybeUninit<_cef_download_item_callback_t> =
17593 ::std::mem::MaybeUninit::uninit();
17594 let ptr = UNINIT.as_ptr();
17595 assert_eq!(
17596 ::std::mem::size_of::<_cef_download_item_callback_t>(),
17597 64usize,
17598 concat!("Size of: ", stringify!(_cef_download_item_callback_t))
17599 );
17600 assert_eq!(
17601 ::std::mem::align_of::<_cef_download_item_callback_t>(),
17602 8usize,
17603 concat!("Alignment of ", stringify!(_cef_download_item_callback_t))
17604 );
17605 assert_eq!(
17606 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
17607 0usize,
17608 concat!(
17609 "Offset of field: ",
17610 stringify!(_cef_download_item_callback_t),
17611 "::",
17612 stringify!(base)
17613 )
17614 );
17615 assert_eq!(
17616 unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize },
17617 40usize,
17618 concat!(
17619 "Offset of field: ",
17620 stringify!(_cef_download_item_callback_t),
17621 "::",
17622 stringify!(cancel)
17623 )
17624 );
17625 assert_eq!(
17626 unsafe { ::std::ptr::addr_of!((*ptr).pause) as usize - ptr as usize },
17627 48usize,
17628 concat!(
17629 "Offset of field: ",
17630 stringify!(_cef_download_item_callback_t),
17631 "::",
17632 stringify!(pause)
17633 )
17634 );
17635 assert_eq!(
17636 unsafe { ::std::ptr::addr_of!((*ptr).resume) as usize - ptr as usize },
17637 56usize,
17638 concat!(
17639 "Offset of field: ",
17640 stringify!(_cef_download_item_callback_t),
17641 "::",
17642 stringify!(resume)
17643 )
17644 );
17645}
17646#[doc = "\n Callback structure used to asynchronously cancel a download.\n"]
17647pub type cef_download_item_callback_t = _cef_download_item_callback_t;
17648#[doc = "\n Structure used to handle file downloads. The functions of this structure\n will called on the browser process UI thread.\n"]
17649#[repr(C)]
17650#[derive(Debug, Copy, Clone)]
17651pub struct _cef_download_handler_t {
17652 #[doc = "\n Base structure.\n"]
17653 pub base: cef_base_ref_counted_t,
17654 #[doc = "\n Called before a download begins in response to a user-initiated action\n (e.g. alt + link click or link click that returns a `Content-Disposition:\n attachment` response from the server). |url| is the target download URL\n and |request_function| is the target function (GET, POST, etc). Return\n true (1) to proceed with the download or false (0) to cancel the download.\n"]
17655 pub can_download: ::std::option::Option<
17656 unsafe extern "C" fn(
17657 self_: *mut _cef_download_handler_t,
17658 browser: *mut _cef_browser_t,
17659 url: *const cef_string_t,
17660 request_method: *const cef_string_t,
17661 ) -> ::std::os::raw::c_int,
17662 >,
17663 #[doc = "\n Called before a download begins. |suggested_name| is the suggested name\n for the download file. By default the download will be canceled. Execute\n |callback| either asynchronously or in this function to continue the\n download if desired. Do not keep a reference to |download_item| outside of\n this function.\n"]
17664 pub on_before_download: ::std::option::Option<
17665 unsafe extern "C" fn(
17666 self_: *mut _cef_download_handler_t,
17667 browser: *mut _cef_browser_t,
17668 download_item: *mut _cef_download_item_t,
17669 suggested_name: *const cef_string_t,
17670 callback: *mut _cef_before_download_callback_t,
17671 ),
17672 >,
17673 #[doc = "\n Called when a download's status or progress information has been updated.\n This may be called multiple times before and after on_before_download().\n Execute |callback| either asynchronously or in this function to cancel the\n download if desired. Do not keep a reference to |download_item| outside of\n this function.\n"]
17674 pub on_download_updated: ::std::option::Option<
17675 unsafe extern "C" fn(
17676 self_: *mut _cef_download_handler_t,
17677 browser: *mut _cef_browser_t,
17678 download_item: *mut _cef_download_item_t,
17679 callback: *mut _cef_download_item_callback_t,
17680 ),
17681 >,
17682}
17683#[test]
17684fn bindgen_test_layout__cef_download_handler_t() {
17685 const UNINIT: ::std::mem::MaybeUninit<_cef_download_handler_t> =
17686 ::std::mem::MaybeUninit::uninit();
17687 let ptr = UNINIT.as_ptr();
17688 assert_eq!(
17689 ::std::mem::size_of::<_cef_download_handler_t>(),
17690 64usize,
17691 concat!("Size of: ", stringify!(_cef_download_handler_t))
17692 );
17693 assert_eq!(
17694 ::std::mem::align_of::<_cef_download_handler_t>(),
17695 8usize,
17696 concat!("Alignment of ", stringify!(_cef_download_handler_t))
17697 );
17698 assert_eq!(
17699 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
17700 0usize,
17701 concat!(
17702 "Offset of field: ",
17703 stringify!(_cef_download_handler_t),
17704 "::",
17705 stringify!(base)
17706 )
17707 );
17708 assert_eq!(
17709 unsafe { ::std::ptr::addr_of!((*ptr).can_download) as usize - ptr as usize },
17710 40usize,
17711 concat!(
17712 "Offset of field: ",
17713 stringify!(_cef_download_handler_t),
17714 "::",
17715 stringify!(can_download)
17716 )
17717 );
17718 assert_eq!(
17719 unsafe { ::std::ptr::addr_of!((*ptr).on_before_download) as usize - ptr as usize },
17720 48usize,
17721 concat!(
17722 "Offset of field: ",
17723 stringify!(_cef_download_handler_t),
17724 "::",
17725 stringify!(on_before_download)
17726 )
17727 );
17728 assert_eq!(
17729 unsafe { ::std::ptr::addr_of!((*ptr).on_download_updated) as usize - ptr as usize },
17730 56usize,
17731 concat!(
17732 "Offset of field: ",
17733 stringify!(_cef_download_handler_t),
17734 "::",
17735 stringify!(on_download_updated)
17736 )
17737 );
17738}
17739#[doc = "\n Structure used to handle file downloads. The functions of this structure\n will called on the browser process UI thread.\n"]
17740pub type cef_download_handler_t = _cef_download_handler_t;
17741#[doc = "\n Implement this structure to handle events related to dragging. The functions\n of this structure will be called on the UI thread.\n"]
17742#[repr(C)]
17743#[derive(Debug, Copy, Clone)]
17744pub struct _cef_drag_handler_t {
17745 #[doc = "\n Base structure.\n"]
17746 pub base: cef_base_ref_counted_t,
17747 #[doc = "\n Called when an external drag event enters the browser window. |dragData|\n contains the drag event data and |mask| represents the type of drag\n operation. Return false (0) for default drag handling behavior or true (1)\n to cancel the drag event.\n"]
17748 pub on_drag_enter: ::std::option::Option<
17749 unsafe extern "C" fn(
17750 self_: *mut _cef_drag_handler_t,
17751 browser: *mut _cef_browser_t,
17752 dragData: *mut _cef_drag_data_t,
17753 mask: cef_drag_operations_mask_t,
17754 ) -> ::std::os::raw::c_int,
17755 >,
17756 #[doc = "\n Called whenever draggable regions for the browser window change. These can\n be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If\n draggable regions are never defined in a document this function will also\n never be called. If the last draggable region is removed from a document\n this function will be called with an NULL vector.\n"]
17757 pub on_draggable_regions_changed: ::std::option::Option<
17758 unsafe extern "C" fn(
17759 self_: *mut _cef_drag_handler_t,
17760 browser: *mut _cef_browser_t,
17761 frame: *mut _cef_frame_t,
17762 regionsCount: usize,
17763 regions: *const cef_draggable_region_t,
17764 ),
17765 >,
17766}
17767#[test]
17768fn bindgen_test_layout__cef_drag_handler_t() {
17769 const UNINIT: ::std::mem::MaybeUninit<_cef_drag_handler_t> = ::std::mem::MaybeUninit::uninit();
17770 let ptr = UNINIT.as_ptr();
17771 assert_eq!(
17772 ::std::mem::size_of::<_cef_drag_handler_t>(),
17773 56usize,
17774 concat!("Size of: ", stringify!(_cef_drag_handler_t))
17775 );
17776 assert_eq!(
17777 ::std::mem::align_of::<_cef_drag_handler_t>(),
17778 8usize,
17779 concat!("Alignment of ", stringify!(_cef_drag_handler_t))
17780 );
17781 assert_eq!(
17782 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
17783 0usize,
17784 concat!(
17785 "Offset of field: ",
17786 stringify!(_cef_drag_handler_t),
17787 "::",
17788 stringify!(base)
17789 )
17790 );
17791 assert_eq!(
17792 unsafe { ::std::ptr::addr_of!((*ptr).on_drag_enter) as usize - ptr as usize },
17793 40usize,
17794 concat!(
17795 "Offset of field: ",
17796 stringify!(_cef_drag_handler_t),
17797 "::",
17798 stringify!(on_drag_enter)
17799 )
17800 );
17801 assert_eq!(
17802 unsafe {
17803 ::std::ptr::addr_of!((*ptr).on_draggable_regions_changed) as usize - ptr as usize
17804 },
17805 48usize,
17806 concat!(
17807 "Offset of field: ",
17808 stringify!(_cef_drag_handler_t),
17809 "::",
17810 stringify!(on_draggable_regions_changed)
17811 )
17812 );
17813}
17814#[doc = "\n Implement this structure to handle events related to dragging. The functions\n of this structure will be called on the UI thread.\n"]
17815pub type cef_drag_handler_t = _cef_drag_handler_t;
17816#[doc = "\n Implement this structure to handle events related to find results. The\n functions of this structure will be called on the UI thread.\n"]
17817#[repr(C)]
17818#[derive(Debug, Copy, Clone)]
17819pub struct _cef_find_handler_t {
17820 #[doc = "\n Base structure.\n"]
17821 pub base: cef_base_ref_counted_t,
17822 #[doc = "\n Called to report find results returned by cef_browser_host_t::find().\n |identifer| is a unique incremental identifier for the currently active\n search, |count| is the number of matches currently identified,\n |selectionRect| is the location of where the match was found (in window\n coordinates), |activeMatchOrdinal| is the current position in the search\n results, and |finalUpdate| is true (1) if this is the last find\n notification.\n"]
17823 pub on_find_result: ::std::option::Option<
17824 unsafe extern "C" fn(
17825 self_: *mut _cef_find_handler_t,
17826 browser: *mut _cef_browser_t,
17827 identifier: ::std::os::raw::c_int,
17828 count: ::std::os::raw::c_int,
17829 selectionRect: *const cef_rect_t,
17830 activeMatchOrdinal: ::std::os::raw::c_int,
17831 finalUpdate: ::std::os::raw::c_int,
17832 ),
17833 >,
17834}
17835#[test]
17836fn bindgen_test_layout__cef_find_handler_t() {
17837 const UNINIT: ::std::mem::MaybeUninit<_cef_find_handler_t> = ::std::mem::MaybeUninit::uninit();
17838 let ptr = UNINIT.as_ptr();
17839 assert_eq!(
17840 ::std::mem::size_of::<_cef_find_handler_t>(),
17841 48usize,
17842 concat!("Size of: ", stringify!(_cef_find_handler_t))
17843 );
17844 assert_eq!(
17845 ::std::mem::align_of::<_cef_find_handler_t>(),
17846 8usize,
17847 concat!("Alignment of ", stringify!(_cef_find_handler_t))
17848 );
17849 assert_eq!(
17850 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
17851 0usize,
17852 concat!(
17853 "Offset of field: ",
17854 stringify!(_cef_find_handler_t),
17855 "::",
17856 stringify!(base)
17857 )
17858 );
17859 assert_eq!(
17860 unsafe { ::std::ptr::addr_of!((*ptr).on_find_result) as usize - ptr as usize },
17861 40usize,
17862 concat!(
17863 "Offset of field: ",
17864 stringify!(_cef_find_handler_t),
17865 "::",
17866 stringify!(on_find_result)
17867 )
17868 );
17869}
17870#[doc = "\n Implement this structure to handle events related to find results. The\n functions of this structure will be called on the UI thread.\n"]
17871pub type cef_find_handler_t = _cef_find_handler_t;
17872#[doc = "\n Implement this structure to handle events related to focus. The functions of\n this structure will be called on the UI thread.\n"]
17873#[repr(C)]
17874#[derive(Debug, Copy, Clone)]
17875pub struct _cef_focus_handler_t {
17876 #[doc = "\n Base structure.\n"]
17877 pub base: cef_base_ref_counted_t,
17878 #[doc = "\n Called when the browser component is about to loose focus. For instance,\n if focus was on the last HTML element and the user pressed the TAB key.\n |next| will be true (1) if the browser is giving focus to the next\n component and false (0) if the browser is giving focus to the previous\n component.\n"]
17879 pub on_take_focus: ::std::option::Option<
17880 unsafe extern "C" fn(
17881 self_: *mut _cef_focus_handler_t,
17882 browser: *mut _cef_browser_t,
17883 next: ::std::os::raw::c_int,
17884 ),
17885 >,
17886 #[doc = "\n Called when the browser component is requesting focus. |source| indicates\n where the focus request is originating from. Return false (0) to allow the\n focus to be set or true (1) to cancel setting the focus.\n"]
17887 pub on_set_focus: ::std::option::Option<
17888 unsafe extern "C" fn(
17889 self_: *mut _cef_focus_handler_t,
17890 browser: *mut _cef_browser_t,
17891 source: cef_focus_source_t,
17892 ) -> ::std::os::raw::c_int,
17893 >,
17894 #[doc = "\n Called when the browser component has received focus.\n"]
17895 pub on_got_focus: ::std::option::Option<
17896 unsafe extern "C" fn(self_: *mut _cef_focus_handler_t, browser: *mut _cef_browser_t),
17897 >,
17898}
17899#[test]
17900fn bindgen_test_layout__cef_focus_handler_t() {
17901 const UNINIT: ::std::mem::MaybeUninit<_cef_focus_handler_t> = ::std::mem::MaybeUninit::uninit();
17902 let ptr = UNINIT.as_ptr();
17903 assert_eq!(
17904 ::std::mem::size_of::<_cef_focus_handler_t>(),
17905 64usize,
17906 concat!("Size of: ", stringify!(_cef_focus_handler_t))
17907 );
17908 assert_eq!(
17909 ::std::mem::align_of::<_cef_focus_handler_t>(),
17910 8usize,
17911 concat!("Alignment of ", stringify!(_cef_focus_handler_t))
17912 );
17913 assert_eq!(
17914 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
17915 0usize,
17916 concat!(
17917 "Offset of field: ",
17918 stringify!(_cef_focus_handler_t),
17919 "::",
17920 stringify!(base)
17921 )
17922 );
17923 assert_eq!(
17924 unsafe { ::std::ptr::addr_of!((*ptr).on_take_focus) as usize - ptr as usize },
17925 40usize,
17926 concat!(
17927 "Offset of field: ",
17928 stringify!(_cef_focus_handler_t),
17929 "::",
17930 stringify!(on_take_focus)
17931 )
17932 );
17933 assert_eq!(
17934 unsafe { ::std::ptr::addr_of!((*ptr).on_set_focus) as usize - ptr as usize },
17935 48usize,
17936 concat!(
17937 "Offset of field: ",
17938 stringify!(_cef_focus_handler_t),
17939 "::",
17940 stringify!(on_set_focus)
17941 )
17942 );
17943 assert_eq!(
17944 unsafe { ::std::ptr::addr_of!((*ptr).on_got_focus) as usize - ptr as usize },
17945 56usize,
17946 concat!(
17947 "Offset of field: ",
17948 stringify!(_cef_focus_handler_t),
17949 "::",
17950 stringify!(on_got_focus)
17951 )
17952 );
17953}
17954#[doc = "\n Implement this structure to handle events related to focus. The functions of\n this structure will be called on the UI thread.\n"]
17955pub type cef_focus_handler_t = _cef_focus_handler_t;
17956#[doc = "\n Implement this structure to handle events related to cef_frame_t life span.\n The order of callbacks is:\n\n (1) During initial cef_browser_host_t creation and navigation of the main\n frame: - cef_frame_handler_t::OnFrameCreated => The initial main frame\n object has been\n created. Any commands will be queued until the frame is attached.\n - cef_frame_handler_t::OnMainFrameChanged => The initial main frame object\n has\n been assigned to the browser.\n - cef_life_span_handler_t::OnAfterCreated => The browser is now valid and\n can be\n used.\n - cef_frame_handler_t::OnFrameAttached => The initial main frame object is\n now\n connected to its peer in the renderer process. Commands can be routed.\n\n (2) During further cef_browser_host_t navigation/loading of the main frame\n and/or sub-frames:\n - cef_frame_handler_t::OnFrameCreated => A new main frame or sub-frame\n object\n has been created. Any commands will be queued until the frame is attached.\n - cef_frame_handler_t::OnFrameAttached => A new main frame or sub-frame\n object\n is now connected to its peer in the renderer process. Commands can be\n routed.\n - cef_frame_handler_t::OnFrameDetached => An existing main frame or sub-\n frame\n object has lost its connection to the renderer process. If multiple\n objects are detached at the same time then notifications will be sent for\n any sub-frame objects before the main frame object. Commands can no longer\n be routed and will be discarded.\n - cef_frame_handler_t::OnMainFrameChanged => A new main frame object has\n been\n assigned to the browser. This will only occur with cross-origin navigation\n or re-navigation after renderer process termination (due to crashes, etc).\n\n (3) During final cef_browser_host_t destruction of the main frame: -\n cef_frame_handler_t::OnFrameDetached => Any sub-frame objects have lost\n their\n connection to the renderer process. Commands can no longer be routed and\n will be discarded.\n - cef_life_span_handler_t::OnBeforeClose => The browser has been destroyed.\n - cef_frame_handler_t::OnFrameDetached => The main frame object have lost\n its\n connection to the renderer process. Notifications will be sent for any\n sub-frame objects before the main frame object. Commands can no longer be\n routed and will be discarded.\n - cef_frame_handler_t::OnMainFrameChanged => The final main frame object has\n been removed from the browser.\n\n Cross-origin navigation and/or loading receives special handling.\n\n When the main frame navigates to a different origin the OnMainFrameChanged\n callback (2) will be executed with the old and new main frame objects.\n\n When a new sub-frame is loaded in, or an existing sub-frame is navigated to,\n a different origin from the parent frame, a temporary sub-frame object will\n first be created in the parent's renderer process. That temporary sub-frame\n will then be discarded after the real cross-origin sub-frame is created in\n the new/target renderer process. The client will receive cross-origin\n navigation callbacks (2) for the transition from the temporary sub-frame to\n the real sub-frame. The temporary sub-frame will not recieve or execute\n commands during this transitional period (any sent commands will be\n discarded).\n\n When a new popup browser is created in a different origin from the parent\n browser, a temporary main frame object for the popup will first be created\n in the parent's renderer process. That temporary main frame will then be\n discarded after the real cross-origin main frame is created in the\n new/target renderer process. The client will recieve creation and initial\n navigation callbacks (1) for the temporary main frame, followed by cross-\n origin navigation callbacks (2) for the transition from the temporary main\n frame to the real main frame. The temporary main frame may receive and\n execute commands during this transitional period (any sent commands may be\n executed, but the behavior is potentially undesirable since they execute in\n the parent browser's renderer process and not the new/target renderer\n process).\n\n Callbacks will not be executed for placeholders that may be created during\n pre-commit navigation for sub-frames that do not yet exist in the renderer\n process. Placeholders will have cef_frame_t::get_identifier() == -4.\n\n The functions of this structure will be called on the UI thread unless\n otherwise indicated.\n"]
17957#[repr(C)]
17958#[derive(Debug, Copy, Clone)]
17959pub struct _cef_frame_handler_t {
17960 #[doc = "\n Base structure.\n"]
17961 pub base: cef_base_ref_counted_t,
17962 #[doc = "\n Called when a new frame is created. This will be the first notification\n that references |frame|. Any commands that require transport to the\n associated renderer process (LoadRequest, SendProcessMessage, GetSource,\n etc.) will be queued until OnFrameAttached is called for |frame|.\n"]
17963 pub on_frame_created: ::std::option::Option<
17964 unsafe extern "C" fn(
17965 self_: *mut _cef_frame_handler_t,
17966 browser: *mut _cef_browser_t,
17967 frame: *mut _cef_frame_t,
17968 ),
17969 >,
17970 #[doc = "\n Called when a frame can begin routing commands to/from the associated\n renderer process. |reattached| will be true (1) if the frame was re-\n attached after exiting the BackForwardCache. Any commands that were queued\n have now been dispatched.\n"]
17971 pub on_frame_attached: ::std::option::Option<
17972 unsafe extern "C" fn(
17973 self_: *mut _cef_frame_handler_t,
17974 browser: *mut _cef_browser_t,
17975 frame: *mut _cef_frame_t,
17976 reattached: ::std::os::raw::c_int,
17977 ),
17978 >,
17979 #[doc = "\n Called when a frame loses its connection to the renderer process and will\n be destroyed. Any pending or future commands will be discarded and\n cef_frame_t::is_valid() will now return false (0) for |frame|. If called\n after cef_life_span_handler_t::on_before_close() during browser\n destruction then cef_browser_t::is_valid() will return false (0) for\n |browser|.\n"]
17980 pub on_frame_detached: ::std::option::Option<
17981 unsafe extern "C" fn(
17982 self_: *mut _cef_frame_handler_t,
17983 browser: *mut _cef_browser_t,
17984 frame: *mut _cef_frame_t,
17985 ),
17986 >,
17987 #[doc = "\n Called when the main frame changes due to (a) initial browser creation,\n (b) final browser destruction, (c) cross-origin navigation or (d) re-\n navigation after renderer process termination (due to crashes, etc).\n |old_frame| will be NULL and |new_frame| will be non-NULL when a main\n frame is assigned to |browser| for the first time. |old_frame| will be\n non-NULL and |new_frame| will be NULL and when a main frame is removed\n from |browser| for the last time. Both |old_frame| and |new_frame| will be\n non-NULL for cross-origin navigations or re-navigation after renderer\n process termination. This function will be called after on_frame_created()\n for |new_frame| and/or after on_frame_detached() for |old_frame|. If\n called after cef_life_span_handler_t::on_before_close() during browser\n destruction then cef_browser_t::is_valid() will return false (0) for\n |browser|.\n"]
17988 pub on_main_frame_changed: ::std::option::Option<
17989 unsafe extern "C" fn(
17990 self_: *mut _cef_frame_handler_t,
17991 browser: *mut _cef_browser_t,
17992 old_frame: *mut _cef_frame_t,
17993 new_frame: *mut _cef_frame_t,
17994 ),
17995 >,
17996}
17997#[test]
17998fn bindgen_test_layout__cef_frame_handler_t() {
17999 const UNINIT: ::std::mem::MaybeUninit<_cef_frame_handler_t> = ::std::mem::MaybeUninit::uninit();
18000 let ptr = UNINIT.as_ptr();
18001 assert_eq!(
18002 ::std::mem::size_of::<_cef_frame_handler_t>(),
18003 72usize,
18004 concat!("Size of: ", stringify!(_cef_frame_handler_t))
18005 );
18006 assert_eq!(
18007 ::std::mem::align_of::<_cef_frame_handler_t>(),
18008 8usize,
18009 concat!("Alignment of ", stringify!(_cef_frame_handler_t))
18010 );
18011 assert_eq!(
18012 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
18013 0usize,
18014 concat!(
18015 "Offset of field: ",
18016 stringify!(_cef_frame_handler_t),
18017 "::",
18018 stringify!(base)
18019 )
18020 );
18021 assert_eq!(
18022 unsafe { ::std::ptr::addr_of!((*ptr).on_frame_created) as usize - ptr as usize },
18023 40usize,
18024 concat!(
18025 "Offset of field: ",
18026 stringify!(_cef_frame_handler_t),
18027 "::",
18028 stringify!(on_frame_created)
18029 )
18030 );
18031 assert_eq!(
18032 unsafe { ::std::ptr::addr_of!((*ptr).on_frame_attached) as usize - ptr as usize },
18033 48usize,
18034 concat!(
18035 "Offset of field: ",
18036 stringify!(_cef_frame_handler_t),
18037 "::",
18038 stringify!(on_frame_attached)
18039 )
18040 );
18041 assert_eq!(
18042 unsafe { ::std::ptr::addr_of!((*ptr).on_frame_detached) as usize - ptr as usize },
18043 56usize,
18044 concat!(
18045 "Offset of field: ",
18046 stringify!(_cef_frame_handler_t),
18047 "::",
18048 stringify!(on_frame_detached)
18049 )
18050 );
18051 assert_eq!(
18052 unsafe { ::std::ptr::addr_of!((*ptr).on_main_frame_changed) as usize - ptr as usize },
18053 64usize,
18054 concat!(
18055 "Offset of field: ",
18056 stringify!(_cef_frame_handler_t),
18057 "::",
18058 stringify!(on_main_frame_changed)
18059 )
18060 );
18061}
18062#[doc = "\n Implement this structure to handle events related to cef_frame_t life span.\n The order of callbacks is:\n\n (1) During initial cef_browser_host_t creation and navigation of the main\n frame: - cef_frame_handler_t::OnFrameCreated => The initial main frame\n object has been\n created. Any commands will be queued until the frame is attached.\n - cef_frame_handler_t::OnMainFrameChanged => The initial main frame object\n has\n been assigned to the browser.\n - cef_life_span_handler_t::OnAfterCreated => The browser is now valid and\n can be\n used.\n - cef_frame_handler_t::OnFrameAttached => The initial main frame object is\n now\n connected to its peer in the renderer process. Commands can be routed.\n\n (2) During further cef_browser_host_t navigation/loading of the main frame\n and/or sub-frames:\n - cef_frame_handler_t::OnFrameCreated => A new main frame or sub-frame\n object\n has been created. Any commands will be queued until the frame is attached.\n - cef_frame_handler_t::OnFrameAttached => A new main frame or sub-frame\n object\n is now connected to its peer in the renderer process. Commands can be\n routed.\n - cef_frame_handler_t::OnFrameDetached => An existing main frame or sub-\n frame\n object has lost its connection to the renderer process. If multiple\n objects are detached at the same time then notifications will be sent for\n any sub-frame objects before the main frame object. Commands can no longer\n be routed and will be discarded.\n - cef_frame_handler_t::OnMainFrameChanged => A new main frame object has\n been\n assigned to the browser. This will only occur with cross-origin navigation\n or re-navigation after renderer process termination (due to crashes, etc).\n\n (3) During final cef_browser_host_t destruction of the main frame: -\n cef_frame_handler_t::OnFrameDetached => Any sub-frame objects have lost\n their\n connection to the renderer process. Commands can no longer be routed and\n will be discarded.\n - cef_life_span_handler_t::OnBeforeClose => The browser has been destroyed.\n - cef_frame_handler_t::OnFrameDetached => The main frame object have lost\n its\n connection to the renderer process. Notifications will be sent for any\n sub-frame objects before the main frame object. Commands can no longer be\n routed and will be discarded.\n - cef_frame_handler_t::OnMainFrameChanged => The final main frame object has\n been removed from the browser.\n\n Cross-origin navigation and/or loading receives special handling.\n\n When the main frame navigates to a different origin the OnMainFrameChanged\n callback (2) will be executed with the old and new main frame objects.\n\n When a new sub-frame is loaded in, or an existing sub-frame is navigated to,\n a different origin from the parent frame, a temporary sub-frame object will\n first be created in the parent's renderer process. That temporary sub-frame\n will then be discarded after the real cross-origin sub-frame is created in\n the new/target renderer process. The client will receive cross-origin\n navigation callbacks (2) for the transition from the temporary sub-frame to\n the real sub-frame. The temporary sub-frame will not recieve or execute\n commands during this transitional period (any sent commands will be\n discarded).\n\n When a new popup browser is created in a different origin from the parent\n browser, a temporary main frame object for the popup will first be created\n in the parent's renderer process. That temporary main frame will then be\n discarded after the real cross-origin main frame is created in the\n new/target renderer process. The client will recieve creation and initial\n navigation callbacks (1) for the temporary main frame, followed by cross-\n origin navigation callbacks (2) for the transition from the temporary main\n frame to the real main frame. The temporary main frame may receive and\n execute commands during this transitional period (any sent commands may be\n executed, but the behavior is potentially undesirable since they execute in\n the parent browser's renderer process and not the new/target renderer\n process).\n\n Callbacks will not be executed for placeholders that may be created during\n pre-commit navigation for sub-frames that do not yet exist in the renderer\n process. Placeholders will have cef_frame_t::get_identifier() == -4.\n\n The functions of this structure will be called on the UI thread unless\n otherwise indicated.\n"]
18063pub type cef_frame_handler_t = _cef_frame_handler_t;
18064#[doc = "\n Callback structure used for asynchronous continuation of JavaScript dialog\n requests.\n"]
18065#[repr(C)]
18066#[derive(Debug, Copy, Clone)]
18067pub struct _cef_jsdialog_callback_t {
18068 #[doc = "\n Base structure.\n"]
18069 pub base: cef_base_ref_counted_t,
18070 #[doc = "\n Continue the JS dialog request. Set |success| to true (1) if the OK button\n was pressed. The |user_input| value should be specified for prompt\n dialogs.\n"]
18071 pub cont: ::std::option::Option<
18072 unsafe extern "C" fn(
18073 self_: *mut _cef_jsdialog_callback_t,
18074 success: ::std::os::raw::c_int,
18075 user_input: *const cef_string_t,
18076 ),
18077 >,
18078}
18079#[test]
18080fn bindgen_test_layout__cef_jsdialog_callback_t() {
18081 const UNINIT: ::std::mem::MaybeUninit<_cef_jsdialog_callback_t> =
18082 ::std::mem::MaybeUninit::uninit();
18083 let ptr = UNINIT.as_ptr();
18084 assert_eq!(
18085 ::std::mem::size_of::<_cef_jsdialog_callback_t>(),
18086 48usize,
18087 concat!("Size of: ", stringify!(_cef_jsdialog_callback_t))
18088 );
18089 assert_eq!(
18090 ::std::mem::align_of::<_cef_jsdialog_callback_t>(),
18091 8usize,
18092 concat!("Alignment of ", stringify!(_cef_jsdialog_callback_t))
18093 );
18094 assert_eq!(
18095 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
18096 0usize,
18097 concat!(
18098 "Offset of field: ",
18099 stringify!(_cef_jsdialog_callback_t),
18100 "::",
18101 stringify!(base)
18102 )
18103 );
18104 assert_eq!(
18105 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
18106 40usize,
18107 concat!(
18108 "Offset of field: ",
18109 stringify!(_cef_jsdialog_callback_t),
18110 "::",
18111 stringify!(cont)
18112 )
18113 );
18114}
18115#[doc = "\n Callback structure used for asynchronous continuation of JavaScript dialog\n requests.\n"]
18116pub type cef_jsdialog_callback_t = _cef_jsdialog_callback_t;
18117#[doc = "\n Implement this structure to handle events related to JavaScript dialogs. The\n functions of this structure will be called on the UI thread.\n"]
18118#[repr(C)]
18119#[derive(Debug, Copy, Clone)]
18120pub struct _cef_jsdialog_handler_t {
18121 #[doc = "\n Base structure.\n"]
18122 pub base: cef_base_ref_counted_t,
18123 #[doc = "\n Called to run a JavaScript dialog. If |origin_url| is non-NULL it can be\n passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure\n and user-friendly display string. The |default_prompt_text| value will be\n specified for prompt dialogs only. Set |suppress_message| to true (1) and\n return false (0) to suppress the message (suppressing messages is\n preferable to immediately executing the callback as this is used to detect\n presumably malicious behavior like spamming alert messages in\n onbeforeunload). Set |suppress_message| to false (0) and return false (0)\n to use the default implementation (the default implementation will show\n one modal dialog at a time and suppress any additional dialog requests\n until the displayed dialog is dismissed). Return true (1) if the\n application will use a custom dialog or if the callback has been executed\n immediately. Custom dialogs may be either modal or modeless. If a custom\n dialog is used the application must execute |callback| once the custom\n dialog is dismissed.\n"]
18124 pub on_jsdialog: ::std::option::Option<
18125 unsafe extern "C" fn(
18126 self_: *mut _cef_jsdialog_handler_t,
18127 browser: *mut _cef_browser_t,
18128 origin_url: *const cef_string_t,
18129 dialog_type: cef_jsdialog_type_t,
18130 message_text: *const cef_string_t,
18131 default_prompt_text: *const cef_string_t,
18132 callback: *mut _cef_jsdialog_callback_t,
18133 suppress_message: *mut ::std::os::raw::c_int,
18134 ) -> ::std::os::raw::c_int,
18135 >,
18136 #[doc = "\n Called to run a dialog asking the user if they want to leave a page.\n Return false (0) to use the default dialog implementation. Return true (1)\n if the application will use a custom dialog or if the callback has been\n executed immediately. Custom dialogs may be either modal or modeless. If a\n custom dialog is used the application must execute |callback| once the\n custom dialog is dismissed.\n"]
18137 pub on_before_unload_dialog: ::std::option::Option<
18138 unsafe extern "C" fn(
18139 self_: *mut _cef_jsdialog_handler_t,
18140 browser: *mut _cef_browser_t,
18141 message_text: *const cef_string_t,
18142 is_reload: ::std::os::raw::c_int,
18143 callback: *mut _cef_jsdialog_callback_t,
18144 ) -> ::std::os::raw::c_int,
18145 >,
18146 #[doc = "\n Called to cancel any pending dialogs and reset any saved dialog state.\n Will be called due to events like page navigation irregardless of whether\n any dialogs are currently pending.\n"]
18147 pub on_reset_dialog_state: ::std::option::Option<
18148 unsafe extern "C" fn(self_: *mut _cef_jsdialog_handler_t, browser: *mut _cef_browser_t),
18149 >,
18150 #[doc = "\n Called when the dialog is closed.\n"]
18151 pub on_dialog_closed: ::std::option::Option<
18152 unsafe extern "C" fn(self_: *mut _cef_jsdialog_handler_t, browser: *mut _cef_browser_t),
18153 >,
18154}
18155#[test]
18156fn bindgen_test_layout__cef_jsdialog_handler_t() {
18157 const UNINIT: ::std::mem::MaybeUninit<_cef_jsdialog_handler_t> =
18158 ::std::mem::MaybeUninit::uninit();
18159 let ptr = UNINIT.as_ptr();
18160 assert_eq!(
18161 ::std::mem::size_of::<_cef_jsdialog_handler_t>(),
18162 72usize,
18163 concat!("Size of: ", stringify!(_cef_jsdialog_handler_t))
18164 );
18165 assert_eq!(
18166 ::std::mem::align_of::<_cef_jsdialog_handler_t>(),
18167 8usize,
18168 concat!("Alignment of ", stringify!(_cef_jsdialog_handler_t))
18169 );
18170 assert_eq!(
18171 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
18172 0usize,
18173 concat!(
18174 "Offset of field: ",
18175 stringify!(_cef_jsdialog_handler_t),
18176 "::",
18177 stringify!(base)
18178 )
18179 );
18180 assert_eq!(
18181 unsafe { ::std::ptr::addr_of!((*ptr).on_jsdialog) as usize - ptr as usize },
18182 40usize,
18183 concat!(
18184 "Offset of field: ",
18185 stringify!(_cef_jsdialog_handler_t),
18186 "::",
18187 stringify!(on_jsdialog)
18188 )
18189 );
18190 assert_eq!(
18191 unsafe { ::std::ptr::addr_of!((*ptr).on_before_unload_dialog) as usize - ptr as usize },
18192 48usize,
18193 concat!(
18194 "Offset of field: ",
18195 stringify!(_cef_jsdialog_handler_t),
18196 "::",
18197 stringify!(on_before_unload_dialog)
18198 )
18199 );
18200 assert_eq!(
18201 unsafe { ::std::ptr::addr_of!((*ptr).on_reset_dialog_state) as usize - ptr as usize },
18202 56usize,
18203 concat!(
18204 "Offset of field: ",
18205 stringify!(_cef_jsdialog_handler_t),
18206 "::",
18207 stringify!(on_reset_dialog_state)
18208 )
18209 );
18210 assert_eq!(
18211 unsafe { ::std::ptr::addr_of!((*ptr).on_dialog_closed) as usize - ptr as usize },
18212 64usize,
18213 concat!(
18214 "Offset of field: ",
18215 stringify!(_cef_jsdialog_handler_t),
18216 "::",
18217 stringify!(on_dialog_closed)
18218 )
18219 );
18220}
18221#[doc = "\n Implement this structure to handle events related to JavaScript dialogs. The\n functions of this structure will be called on the UI thread.\n"]
18222pub type cef_jsdialog_handler_t = _cef_jsdialog_handler_t;
18223#[doc = "\n Implement this structure to handle events related to keyboard input. The\n functions of this structure will be called on the UI thread.\n"]
18224#[repr(C)]
18225#[derive(Debug, Copy, Clone)]
18226pub struct _cef_keyboard_handler_t {
18227 #[doc = "\n Base structure.\n"]
18228 pub base: cef_base_ref_counted_t,
18229 #[doc = "\n Called before a keyboard event is sent to the renderer. |event| contains\n information about the keyboard event. |os_event| is the operating system\n event message, if any. Return true (1) if the event was handled or false\n (0) otherwise. If the event will be handled in on_key_event() as a\n keyboard shortcut set |is_keyboard_shortcut| to true (1) and return false\n (0).\n"]
18230 pub on_pre_key_event: ::std::option::Option<
18231 unsafe extern "C" fn(
18232 self_: *mut _cef_keyboard_handler_t,
18233 browser: *mut _cef_browser_t,
18234 event: *const cef_key_event_t,
18235 os_event: *mut XEvent,
18236 is_keyboard_shortcut: *mut ::std::os::raw::c_int,
18237 ) -> ::std::os::raw::c_int,
18238 >,
18239 #[doc = "\n Called after the renderer and JavaScript in the page has had a chance to\n handle the event. |event| contains information about the keyboard event.\n |os_event| is the operating system event message, if any. Return true (1)\n if the keyboard event was handled or false (0) otherwise.\n"]
18240 pub on_key_event: ::std::option::Option<
18241 unsafe extern "C" fn(
18242 self_: *mut _cef_keyboard_handler_t,
18243 browser: *mut _cef_browser_t,
18244 event: *const cef_key_event_t,
18245 os_event: *mut XEvent,
18246 ) -> ::std::os::raw::c_int,
18247 >,
18248}
18249#[test]
18250fn bindgen_test_layout__cef_keyboard_handler_t() {
18251 const UNINIT: ::std::mem::MaybeUninit<_cef_keyboard_handler_t> =
18252 ::std::mem::MaybeUninit::uninit();
18253 let ptr = UNINIT.as_ptr();
18254 assert_eq!(
18255 ::std::mem::size_of::<_cef_keyboard_handler_t>(),
18256 56usize,
18257 concat!("Size of: ", stringify!(_cef_keyboard_handler_t))
18258 );
18259 assert_eq!(
18260 ::std::mem::align_of::<_cef_keyboard_handler_t>(),
18261 8usize,
18262 concat!("Alignment of ", stringify!(_cef_keyboard_handler_t))
18263 );
18264 assert_eq!(
18265 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
18266 0usize,
18267 concat!(
18268 "Offset of field: ",
18269 stringify!(_cef_keyboard_handler_t),
18270 "::",
18271 stringify!(base)
18272 )
18273 );
18274 assert_eq!(
18275 unsafe { ::std::ptr::addr_of!((*ptr).on_pre_key_event) as usize - ptr as usize },
18276 40usize,
18277 concat!(
18278 "Offset of field: ",
18279 stringify!(_cef_keyboard_handler_t),
18280 "::",
18281 stringify!(on_pre_key_event)
18282 )
18283 );
18284 assert_eq!(
18285 unsafe { ::std::ptr::addr_of!((*ptr).on_key_event) as usize - ptr as usize },
18286 48usize,
18287 concat!(
18288 "Offset of field: ",
18289 stringify!(_cef_keyboard_handler_t),
18290 "::",
18291 stringify!(on_key_event)
18292 )
18293 );
18294}
18295#[doc = "\n Implement this structure to handle events related to keyboard input. The\n functions of this structure will be called on the UI thread.\n"]
18296pub type cef_keyboard_handler_t = _cef_keyboard_handler_t;
18297#[doc = "\n Implement this structure to handle events related to browser life span. The\n functions of this structure will be called on the UI thread unless otherwise\n indicated.\n"]
18298#[repr(C)]
18299#[derive(Copy, Clone)]
18300pub struct _cef_life_span_handler_t {
18301 #[doc = "\n Base structure.\n"]
18302 pub base: cef_base_ref_counted_t,
18303 #[doc = "\n Called on the UI thread before a new popup browser is created. The\n |browser| and |frame| values represent the source of the popup request.\n The |target_url| and |target_frame_name| values indicate where the popup\n browser should navigate and may be NULL if not specified with the request.\n The |target_disposition| value indicates where the user intended to open\n the popup (e.g. current tab, new tab, etc). The |user_gesture| value will\n be true (1) if the popup was opened via explicit user gesture (e.g.\n clicking a link) or false (0) if the popup opened automatically (e.g. via\n the DomContentLoaded event). The |popupFeatures| structure contains\n additional information about the requested popup window. To allow creation\n of the popup browser optionally modify |windowInfo|, |client|, |settings|\n and |no_javascript_access| and return false (0). To cancel creation of the\n popup browser return true (1). The |client| and |settings| values will\n default to the source browser's values. If the |no_javascript_access|\n value is set to false (0) the new browser will not be scriptable and may\n not be hosted in the same renderer process as the source browser. Any\n modifications to |windowInfo| will be ignored if the parent browser is\n wrapped in a cef_browser_view_t. Popup browser creation will be canceled\n if the parent browser is destroyed before the popup browser creation\n completes (indicated by a call to OnAfterCreated for the popup browser).\n The |extra_info| parameter provides an opportunity to specify extra\n information specific to the created popup browser that will be passed to\n cef_render_process_handler_t::on_browser_created() in the render process.\n"]
18304 pub on_before_popup: ::std::option::Option<
18305 unsafe extern "C" fn(
18306 self_: *mut _cef_life_span_handler_t,
18307 browser: *mut _cef_browser_t,
18308 frame: *mut _cef_frame_t,
18309 target_url: *const cef_string_t,
18310 target_frame_name: *const cef_string_t,
18311 target_disposition: cef_window_open_disposition_t,
18312 user_gesture: ::std::os::raw::c_int,
18313 popupFeatures: *const cef_popup_features_t,
18314 windowInfo: *mut _cef_window_info_t,
18315 client: *mut *mut _cef_client_t,
18316 settings: *mut _cef_browser_settings_t,
18317 extra_info: *mut *mut _cef_dictionary_value_t,
18318 no_javascript_access: *mut ::std::os::raw::c_int,
18319 ) -> ::std::os::raw::c_int,
18320 >,
18321 #[doc = "\n Called after a new browser is created. It is now safe to begin performing\n actions with |browser|. cef_frame_handler_t callbacks related to initial\n main frame creation will arrive before this callback. See\n cef_frame_handler_t documentation for additional usage information.\n"]
18322 pub on_after_created: ::std::option::Option<
18323 unsafe extern "C" fn(self_: *mut _cef_life_span_handler_t, browser: *mut _cef_browser_t),
18324 >,
18325 #[doc = "\n Called when a browser has recieved a request to close. This may result\n directly from a call to cef_browser_host_t::*close_browser() or indirectly\n if the browser is parented to a top-level window created by CEF and the\n user attempts to close that window (by clicking the 'X', for example). The\n do_close() function will be called after the JavaScript 'onunload' event\n has been fired.\n\n An application should handle top-level owner window close notifications by\n calling cef_browser_host_t::try_close_browser() or\n cef_browser_host_t::CloseBrowser(false (0)) instead of allowing the window\n to close immediately (see the examples below). This gives CEF an\n opportunity to process the 'onbeforeunload' event and optionally cancel\n the close before do_close() is called.\n\n When windowed rendering is enabled CEF will internally create a window or\n view to host the browser. In that case returning false (0) from do_close()\n will send the standard close notification to the browser's top-level owner\n window (e.g. WM_CLOSE on Windows, performClose: on OS X, \"delete_event\" on\n Linux or cef_window_delegate_t::can_close() callback from Views). If the\n browser's host window/view has already been destroyed (via view hierarchy\n tear-down, for example) then do_close() will not be called for that\n browser since is no longer possible to cancel the close.\n\n When windowed rendering is disabled returning false (0) from do_close()\n will cause the browser object to be destroyed immediately.\n\n If the browser's top-level owner window requires a non-standard close\n notification then send that notification from do_close() and return true\n (1).\n\n The cef_life_span_handler_t::on_before_close() function will be called\n after do_close() (if do_close() is called) and immediately before the\n browser object is destroyed. The application should only exit after\n on_before_close() has been called for all existing browsers.\n\n The below examples describe what should happen during window close when\n the browser is parented to an application-provided top-level window.\n\n Example 1: Using cef_browser_host_t::try_close_browser(). This is\n recommended for clients using standard close handling and windows created\n on the browser process UI thread. 1. User clicks the window close button\n which sends a close notification\n to the application's top-level window.\n 2. Application's top-level window receives the close notification and\n calls TryCloseBrowser() (which internally calls CloseBrowser(false)).\n TryCloseBrowser() returns false so the client cancels the window\n close.\n 3. JavaScript 'onbeforeunload' handler executes and shows the close\n confirmation dialog (which can be overridden via\n CefJSDialogHandler::OnBeforeUnloadDialog()).\n 4. User approves the close. 5. JavaScript 'onunload' handler executes.\n 6. CEF sends a close notification to the application's top-level window\n (because DoClose() returned false by default).\n 7. Application's top-level window receives the close notification and\n calls TryCloseBrowser(). TryCloseBrowser() returns true so the client\n allows the window close.\n 8. Application's top-level window is destroyed. 9. Application's\n on_before_close() handler is called and the browser object\n is destroyed.\n 10. Application exits by calling cef_quit_message_loop() if no other\n browsers\n exist.\n\n Example 2: Using cef_browser_host_t::CloseBrowser(false (0)) and\n implementing the do_close() callback. This is recommended for clients\n using non-standard close handling or windows that were not created on the\n browser process UI thread. 1. User clicks the window close button which\n sends a close notification\n to the application's top-level window.\n 2. Application's top-level window receives the close notification and:\n A. Calls CefBrowserHost::CloseBrowser(false).\n B. Cancels the window close.\n 3. JavaScript 'onbeforeunload' handler executes and shows the close\n confirmation dialog (which can be overridden via\n CefJSDialogHandler::OnBeforeUnloadDialog()).\n 4. User approves the close. 5. JavaScript 'onunload' handler executes.\n 6. Application's do_close() handler is called. Application will:\n A. Set a flag to indicate that the next close attempt will be allowed.\n B. Return false.\n 7. CEF sends an close notification to the application's top-level window.\n 8. Application's top-level window receives the close notification and\n allows the window to close based on the flag from #6B.\n 9. Application's top-level window is destroyed. 10. Application's\n on_before_close() handler is called and the browser object\n is destroyed.\n 11. Application exits by calling cef_quit_message_loop() if no other\n browsers\n exist.\n"]
18326 pub do_close: ::std::option::Option<
18327 unsafe extern "C" fn(
18328 self_: *mut _cef_life_span_handler_t,
18329 browser: *mut _cef_browser_t,
18330 ) -> ::std::os::raw::c_int,
18331 >,
18332 #[doc = "\n Called just before a browser is destroyed. Release all references to the\n browser object and do not attempt to execute any functions on the browser\n object (other than IsValid, GetIdentifier or IsSame) after this callback\n returns. cef_frame_handler_t callbacks related to final main frame\n destruction will arrive after this callback and cef_browser_t::IsValid\n will return false (0) at that time. Any in-progress network requests\n associated with |browser| will be aborted when the browser is destroyed,\n and cef_resource_request_handler_t callbacks related to those requests may\n still arrive on the IO thread after this callback. See cef_frame_handler_t\n and do_close() documentation for additional usage information.\n"]
18333 pub on_before_close: ::std::option::Option<
18334 unsafe extern "C" fn(self_: *mut _cef_life_span_handler_t, browser: *mut _cef_browser_t),
18335 >,
18336}
18337#[test]
18338fn bindgen_test_layout__cef_life_span_handler_t() {
18339 const UNINIT: ::std::mem::MaybeUninit<_cef_life_span_handler_t> =
18340 ::std::mem::MaybeUninit::uninit();
18341 let ptr = UNINIT.as_ptr();
18342 assert_eq!(
18343 ::std::mem::size_of::<_cef_life_span_handler_t>(),
18344 72usize,
18345 concat!("Size of: ", stringify!(_cef_life_span_handler_t))
18346 );
18347 assert_eq!(
18348 ::std::mem::align_of::<_cef_life_span_handler_t>(),
18349 8usize,
18350 concat!("Alignment of ", stringify!(_cef_life_span_handler_t))
18351 );
18352 assert_eq!(
18353 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
18354 0usize,
18355 concat!(
18356 "Offset of field: ",
18357 stringify!(_cef_life_span_handler_t),
18358 "::",
18359 stringify!(base)
18360 )
18361 );
18362 assert_eq!(
18363 unsafe { ::std::ptr::addr_of!((*ptr).on_before_popup) as usize - ptr as usize },
18364 40usize,
18365 concat!(
18366 "Offset of field: ",
18367 stringify!(_cef_life_span_handler_t),
18368 "::",
18369 stringify!(on_before_popup)
18370 )
18371 );
18372 assert_eq!(
18373 unsafe { ::std::ptr::addr_of!((*ptr).on_after_created) as usize - ptr as usize },
18374 48usize,
18375 concat!(
18376 "Offset of field: ",
18377 stringify!(_cef_life_span_handler_t),
18378 "::",
18379 stringify!(on_after_created)
18380 )
18381 );
18382 assert_eq!(
18383 unsafe { ::std::ptr::addr_of!((*ptr).do_close) as usize - ptr as usize },
18384 56usize,
18385 concat!(
18386 "Offset of field: ",
18387 stringify!(_cef_life_span_handler_t),
18388 "::",
18389 stringify!(do_close)
18390 )
18391 );
18392 assert_eq!(
18393 unsafe { ::std::ptr::addr_of!((*ptr).on_before_close) as usize - ptr as usize },
18394 64usize,
18395 concat!(
18396 "Offset of field: ",
18397 stringify!(_cef_life_span_handler_t),
18398 "::",
18399 stringify!(on_before_close)
18400 )
18401 );
18402}
18403#[doc = "\n Implement this structure to handle events related to browser life span. The\n functions of this structure will be called on the UI thread unless otherwise\n indicated.\n"]
18404pub type cef_life_span_handler_t = _cef_life_span_handler_t;
18405#[doc = "\n Implement this structure to handle events related to browser load status.\n The functions of this structure will be called on the browser process UI\n thread or render process main thread (TID_RENDERER).\n"]
18406#[repr(C)]
18407#[derive(Debug, Copy, Clone)]
18408pub struct _cef_load_handler_t {
18409 #[doc = "\n Base structure.\n"]
18410 pub base: cef_base_ref_counted_t,
18411 #[doc = "\n Called when the loading state has changed. This callback will be executed\n twice -- once when loading is initiated either programmatically or by user\n action, and once when loading is terminated due to completion,\n cancellation of failure. It will be called before any calls to OnLoadStart\n and after all calls to OnLoadError and/or OnLoadEnd.\n"]
18412 pub on_loading_state_change: ::std::option::Option<
18413 unsafe extern "C" fn(
18414 self_: *mut _cef_load_handler_t,
18415 browser: *mut _cef_browser_t,
18416 isLoading: ::std::os::raw::c_int,
18417 canGoBack: ::std::os::raw::c_int,
18418 canGoForward: ::std::os::raw::c_int,
18419 ),
18420 >,
18421 #[doc = "\n Called after a navigation has been committed and before the browser begins\n loading contents in the frame. The |frame| value will never be NULL --\n call the is_main() function to check if this frame is the main frame.\n |transition_type| provides information about the source of the navigation\n and an accurate value is only available in the browser process. Multiple\n frames may be loading at the same time. Sub-frames may start or continue\n loading after the main frame load has ended. This function will not be\n called for same page navigations (fragments, history state, etc.) or for\n navigations that fail or are canceled before commit. For notification of\n overall browser load status use OnLoadingStateChange instead.\n"]
18422 pub on_load_start: ::std::option::Option<
18423 unsafe extern "C" fn(
18424 self_: *mut _cef_load_handler_t,
18425 browser: *mut _cef_browser_t,
18426 frame: *mut _cef_frame_t,
18427 transition_type: cef_transition_type_t,
18428 ),
18429 >,
18430 #[doc = "\n Called when the browser is done loading a frame. The |frame| value will\n never be NULL -- call the is_main() function to check if this frame is the\n main frame. Multiple frames may be loading at the same time. Sub-frames\n may start or continue loading after the main frame load has ended. This\n function will not be called for same page navigations (fragments, history\n state, etc.) or for navigations that fail or are canceled before commit.\n For notification of overall browser load status use OnLoadingStateChange\n instead.\n"]
18431 pub on_load_end: ::std::option::Option<
18432 unsafe extern "C" fn(
18433 self_: *mut _cef_load_handler_t,
18434 browser: *mut _cef_browser_t,
18435 frame: *mut _cef_frame_t,
18436 httpStatusCode: ::std::os::raw::c_int,
18437 ),
18438 >,
18439 #[doc = "\n Called when a navigation fails or is canceled. This function may be called\n by itself if before commit or in combination with OnLoadStart/OnLoadEnd if\n after commit. |errorCode| is the error code number, |errorText| is the\n error text and |failedUrl| is the URL that failed to load. See\n net\\base\\net_error_list.h for complete descriptions of the error codes.\n"]
18440 pub on_load_error: ::std::option::Option<
18441 unsafe extern "C" fn(
18442 self_: *mut _cef_load_handler_t,
18443 browser: *mut _cef_browser_t,
18444 frame: *mut _cef_frame_t,
18445 errorCode: cef_errorcode_t,
18446 errorText: *const cef_string_t,
18447 failedUrl: *const cef_string_t,
18448 ),
18449 >,
18450}
18451#[test]
18452fn bindgen_test_layout__cef_load_handler_t() {
18453 const UNINIT: ::std::mem::MaybeUninit<_cef_load_handler_t> = ::std::mem::MaybeUninit::uninit();
18454 let ptr = UNINIT.as_ptr();
18455 assert_eq!(
18456 ::std::mem::size_of::<_cef_load_handler_t>(),
18457 72usize,
18458 concat!("Size of: ", stringify!(_cef_load_handler_t))
18459 );
18460 assert_eq!(
18461 ::std::mem::align_of::<_cef_load_handler_t>(),
18462 8usize,
18463 concat!("Alignment of ", stringify!(_cef_load_handler_t))
18464 );
18465 assert_eq!(
18466 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
18467 0usize,
18468 concat!(
18469 "Offset of field: ",
18470 stringify!(_cef_load_handler_t),
18471 "::",
18472 stringify!(base)
18473 )
18474 );
18475 assert_eq!(
18476 unsafe { ::std::ptr::addr_of!((*ptr).on_loading_state_change) as usize - ptr as usize },
18477 40usize,
18478 concat!(
18479 "Offset of field: ",
18480 stringify!(_cef_load_handler_t),
18481 "::",
18482 stringify!(on_loading_state_change)
18483 )
18484 );
18485 assert_eq!(
18486 unsafe { ::std::ptr::addr_of!((*ptr).on_load_start) as usize - ptr as usize },
18487 48usize,
18488 concat!(
18489 "Offset of field: ",
18490 stringify!(_cef_load_handler_t),
18491 "::",
18492 stringify!(on_load_start)
18493 )
18494 );
18495 assert_eq!(
18496 unsafe { ::std::ptr::addr_of!((*ptr).on_load_end) as usize - ptr as usize },
18497 56usize,
18498 concat!(
18499 "Offset of field: ",
18500 stringify!(_cef_load_handler_t),
18501 "::",
18502 stringify!(on_load_end)
18503 )
18504 );
18505 assert_eq!(
18506 unsafe { ::std::ptr::addr_of!((*ptr).on_load_error) as usize - ptr as usize },
18507 64usize,
18508 concat!(
18509 "Offset of field: ",
18510 stringify!(_cef_load_handler_t),
18511 "::",
18512 stringify!(on_load_error)
18513 )
18514 );
18515}
18516#[doc = "\n Implement this structure to handle events related to browser load status.\n The functions of this structure will be called on the browser process UI\n thread or render process main thread (TID_RENDERER).\n"]
18517pub type cef_load_handler_t = _cef_load_handler_t;
18518#[doc = "\n Callback structure used for asynchronous continuation of media access\n permission requests.\n"]
18519#[repr(C)]
18520#[derive(Debug, Copy, Clone)]
18521pub struct _cef_media_access_callback_t {
18522 #[doc = "\n Base structure.\n"]
18523 pub base: cef_base_ref_counted_t,
18524 #[doc = "\n Call to allow or deny media access. If this callback was initiated in\n response to a getUserMedia (indicated by\n CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE and/or\n CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE being set) then\n |allowed_permissions| must match |required_permissions| passed to\n OnRequestMediaAccessPermission.\n"]
18525 pub cont: ::std::option::Option<
18526 unsafe extern "C" fn(self_: *mut _cef_media_access_callback_t, allowed_permissions: u32),
18527 >,
18528 #[doc = "\n Cancel the media access request.\n"]
18529 pub cancel:
18530 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_media_access_callback_t)>,
18531}
18532#[test]
18533fn bindgen_test_layout__cef_media_access_callback_t() {
18534 const UNINIT: ::std::mem::MaybeUninit<_cef_media_access_callback_t> =
18535 ::std::mem::MaybeUninit::uninit();
18536 let ptr = UNINIT.as_ptr();
18537 assert_eq!(
18538 ::std::mem::size_of::<_cef_media_access_callback_t>(),
18539 56usize,
18540 concat!("Size of: ", stringify!(_cef_media_access_callback_t))
18541 );
18542 assert_eq!(
18543 ::std::mem::align_of::<_cef_media_access_callback_t>(),
18544 8usize,
18545 concat!("Alignment of ", stringify!(_cef_media_access_callback_t))
18546 );
18547 assert_eq!(
18548 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
18549 0usize,
18550 concat!(
18551 "Offset of field: ",
18552 stringify!(_cef_media_access_callback_t),
18553 "::",
18554 stringify!(base)
18555 )
18556 );
18557 assert_eq!(
18558 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
18559 40usize,
18560 concat!(
18561 "Offset of field: ",
18562 stringify!(_cef_media_access_callback_t),
18563 "::",
18564 stringify!(cont)
18565 )
18566 );
18567 assert_eq!(
18568 unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize },
18569 48usize,
18570 concat!(
18571 "Offset of field: ",
18572 stringify!(_cef_media_access_callback_t),
18573 "::",
18574 stringify!(cancel)
18575 )
18576 );
18577}
18578#[doc = "\n Callback structure used for asynchronous continuation of media access\n permission requests.\n"]
18579pub type cef_media_access_callback_t = _cef_media_access_callback_t;
18580#[doc = "\n Callback structure used for asynchronous continuation of permission prompts.\n"]
18581#[repr(C)]
18582#[derive(Debug, Copy, Clone)]
18583pub struct _cef_permission_prompt_callback_t {
18584 #[doc = "\n Base structure.\n"]
18585 pub base: cef_base_ref_counted_t,
18586 #[doc = "\n Complete the permissions request with the specified |result|.\n"]
18587 pub cont: ::std::option::Option<
18588 unsafe extern "C" fn(
18589 self_: *mut _cef_permission_prompt_callback_t,
18590 result: cef_permission_request_result_t,
18591 ),
18592 >,
18593}
18594#[test]
18595fn bindgen_test_layout__cef_permission_prompt_callback_t() {
18596 const UNINIT: ::std::mem::MaybeUninit<_cef_permission_prompt_callback_t> =
18597 ::std::mem::MaybeUninit::uninit();
18598 let ptr = UNINIT.as_ptr();
18599 assert_eq!(
18600 ::std::mem::size_of::<_cef_permission_prompt_callback_t>(),
18601 48usize,
18602 concat!("Size of: ", stringify!(_cef_permission_prompt_callback_t))
18603 );
18604 assert_eq!(
18605 ::std::mem::align_of::<_cef_permission_prompt_callback_t>(),
18606 8usize,
18607 concat!(
18608 "Alignment of ",
18609 stringify!(_cef_permission_prompt_callback_t)
18610 )
18611 );
18612 assert_eq!(
18613 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
18614 0usize,
18615 concat!(
18616 "Offset of field: ",
18617 stringify!(_cef_permission_prompt_callback_t),
18618 "::",
18619 stringify!(base)
18620 )
18621 );
18622 assert_eq!(
18623 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
18624 40usize,
18625 concat!(
18626 "Offset of field: ",
18627 stringify!(_cef_permission_prompt_callback_t),
18628 "::",
18629 stringify!(cont)
18630 )
18631 );
18632}
18633#[doc = "\n Callback structure used for asynchronous continuation of permission prompts.\n"]
18634pub type cef_permission_prompt_callback_t = _cef_permission_prompt_callback_t;
18635#[doc = "\n Implement this structure to handle events related to permission requests.\n The functions of this structure will be called on the browser process UI\n thread.\n"]
18636#[repr(C)]
18637#[derive(Debug, Copy, Clone)]
18638pub struct _cef_permission_handler_t {
18639 #[doc = "\n Base structure.\n"]
18640 pub base: cef_base_ref_counted_t,
18641 #[doc = "\n Called when a page requests permission to access media.\n |requesting_origin| is the URL origin requesting permission.\n |requested_permissions| is a combination of values from\n cef_media_access_permission_types_t that represent the requested\n permissions. Return true (1) and call cef_media_access_callback_t\n functions either in this function or at a later time to continue or cancel\n the request. Return false (0) to proceed with default handling. With the\n Chrome runtime, default handling will display the permission request UI.\n With the Alloy runtime, default handling will deny the request. This\n function will not be called if the \"--enable-media-stream\" command-line\n switch is used to grant all permissions.\n"]
18642 pub on_request_media_access_permission: ::std::option::Option<
18643 unsafe extern "C" fn(
18644 self_: *mut _cef_permission_handler_t,
18645 browser: *mut _cef_browser_t,
18646 frame: *mut _cef_frame_t,
18647 requesting_origin: *const cef_string_t,
18648 requested_permissions: u32,
18649 callback: *mut _cef_media_access_callback_t,
18650 ) -> ::std::os::raw::c_int,
18651 >,
18652 #[doc = "\n Called when a page should show a permission prompt. |prompt_id| uniquely\n identifies the prompt. |requesting_origin| is the URL origin requesting\n permission. |requested_permissions| is a combination of values from\n cef_permission_request_types_t that represent the requested permissions.\n Return true (1) and call cef_permission_prompt_callback_t::Continue either\n in this function or at a later time to continue or cancel the request.\n Return false (0) to proceed with default handling. With the Chrome\n runtime, default handling will display the permission prompt UI. With the\n Alloy runtime, default handling is CEF_PERMISSION_RESULT_IGNORE.\n"]
18653 pub on_show_permission_prompt: ::std::option::Option<
18654 unsafe extern "C" fn(
18655 self_: *mut _cef_permission_handler_t,
18656 browser: *mut _cef_browser_t,
18657 prompt_id: u64,
18658 requesting_origin: *const cef_string_t,
18659 requested_permissions: u32,
18660 callback: *mut _cef_permission_prompt_callback_t,
18661 ) -> ::std::os::raw::c_int,
18662 >,
18663 #[doc = "\n Called when a permission prompt handled via OnShowPermissionPrompt is\n dismissed. |prompt_id| will match the value that was passed to\n OnShowPermissionPrompt. |result| will be the value passed to\n cef_permission_prompt_callback_t::Continue or CEF_PERMISSION_RESULT_IGNORE\n if the dialog was dismissed for other reasons such as navigation, browser\n closure, etc. This function will not be called if OnShowPermissionPrompt\n returned false (0) for |prompt_id|.\n"]
18664 pub on_dismiss_permission_prompt: ::std::option::Option<
18665 unsafe extern "C" fn(
18666 self_: *mut _cef_permission_handler_t,
18667 browser: *mut _cef_browser_t,
18668 prompt_id: u64,
18669 result: cef_permission_request_result_t,
18670 ),
18671 >,
18672}
18673#[test]
18674fn bindgen_test_layout__cef_permission_handler_t() {
18675 const UNINIT: ::std::mem::MaybeUninit<_cef_permission_handler_t> =
18676 ::std::mem::MaybeUninit::uninit();
18677 let ptr = UNINIT.as_ptr();
18678 assert_eq!(
18679 ::std::mem::size_of::<_cef_permission_handler_t>(),
18680 64usize,
18681 concat!("Size of: ", stringify!(_cef_permission_handler_t))
18682 );
18683 assert_eq!(
18684 ::std::mem::align_of::<_cef_permission_handler_t>(),
18685 8usize,
18686 concat!("Alignment of ", stringify!(_cef_permission_handler_t))
18687 );
18688 assert_eq!(
18689 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
18690 0usize,
18691 concat!(
18692 "Offset of field: ",
18693 stringify!(_cef_permission_handler_t),
18694 "::",
18695 stringify!(base)
18696 )
18697 );
18698 assert_eq!(
18699 unsafe {
18700 ::std::ptr::addr_of!((*ptr).on_request_media_access_permission) as usize - ptr as usize
18701 },
18702 40usize,
18703 concat!(
18704 "Offset of field: ",
18705 stringify!(_cef_permission_handler_t),
18706 "::",
18707 stringify!(on_request_media_access_permission)
18708 )
18709 );
18710 assert_eq!(
18711 unsafe { ::std::ptr::addr_of!((*ptr).on_show_permission_prompt) as usize - ptr as usize },
18712 48usize,
18713 concat!(
18714 "Offset of field: ",
18715 stringify!(_cef_permission_handler_t),
18716 "::",
18717 stringify!(on_show_permission_prompt)
18718 )
18719 );
18720 assert_eq!(
18721 unsafe {
18722 ::std::ptr::addr_of!((*ptr).on_dismiss_permission_prompt) as usize - ptr as usize
18723 },
18724 56usize,
18725 concat!(
18726 "Offset of field: ",
18727 stringify!(_cef_permission_handler_t),
18728 "::",
18729 stringify!(on_dismiss_permission_prompt)
18730 )
18731 );
18732}
18733#[doc = "\n Implement this structure to handle events related to permission requests.\n The functions of this structure will be called on the browser process UI\n thread.\n"]
18734pub type cef_permission_handler_t = _cef_permission_handler_t;
18735#[doc = "\n Structure representing print settings.\n"]
18736#[repr(C)]
18737#[derive(Debug, Copy, Clone)]
18738pub struct _cef_print_settings_t {
18739 #[doc = "\n Base structure.\n"]
18740 pub base: cef_base_ref_counted_t,
18741 #[doc = "\n Returns true (1) if this object is valid. Do not call any other functions\n if this function returns false (0).\n"]
18742 pub is_valid: ::std::option::Option<
18743 unsafe extern "C" fn(self_: *mut _cef_print_settings_t) -> ::std::os::raw::c_int,
18744 >,
18745 #[doc = "\n Returns true (1) if the values of this object are read-only. Some APIs may\n expose read-only objects.\n"]
18746 pub is_read_only: ::std::option::Option<
18747 unsafe extern "C" fn(self_: *mut _cef_print_settings_t) -> ::std::os::raw::c_int,
18748 >,
18749 #[doc = "\n Set the page orientation.\n"]
18750 pub set_orientation: ::std::option::Option<
18751 unsafe extern "C" fn(self_: *mut _cef_print_settings_t, landscape: ::std::os::raw::c_int),
18752 >,
18753 #[doc = "\n Returns true (1) if the orientation is landscape.\n"]
18754 pub is_landscape: ::std::option::Option<
18755 unsafe extern "C" fn(self_: *mut _cef_print_settings_t) -> ::std::os::raw::c_int,
18756 >,
18757 #[doc = "\n Set the printer printable area in device units. Some platforms already\n provide flipped area. Set |landscape_needs_flip| to false (0) on those\n platforms to avoid double flipping.\n"]
18758 pub set_printer_printable_area: ::std::option::Option<
18759 unsafe extern "C" fn(
18760 self_: *mut _cef_print_settings_t,
18761 physical_size_device_units: *const cef_size_t,
18762 printable_area_device_units: *const cef_rect_t,
18763 landscape_needs_flip: ::std::os::raw::c_int,
18764 ),
18765 >,
18766 #[doc = "\n Set the device name.\n"]
18767 pub set_device_name: ::std::option::Option<
18768 unsafe extern "C" fn(self_: *mut _cef_print_settings_t, name: *const cef_string_t),
18769 >,
18770 #[doc = "\n Get the device name.\n"]
18771 pub get_device_name: ::std::option::Option<
18772 unsafe extern "C" fn(self_: *mut _cef_print_settings_t) -> cef_string_userfree_t,
18773 >,
18774 #[doc = "\n Set the DPI (dots per inch).\n"]
18775 pub set_dpi: ::std::option::Option<
18776 unsafe extern "C" fn(self_: *mut _cef_print_settings_t, dpi: ::std::os::raw::c_int),
18777 >,
18778 #[doc = "\n Get the DPI (dots per inch).\n"]
18779 pub get_dpi: ::std::option::Option<
18780 unsafe extern "C" fn(self_: *mut _cef_print_settings_t) -> ::std::os::raw::c_int,
18781 >,
18782 #[doc = "\n Set the page ranges.\n"]
18783 pub set_page_ranges: ::std::option::Option<
18784 unsafe extern "C" fn(
18785 self_: *mut _cef_print_settings_t,
18786 rangesCount: usize,
18787 ranges: *const cef_range_t,
18788 ),
18789 >,
18790 #[doc = "\n Returns the number of page ranges that currently exist.\n"]
18791 pub get_page_ranges_count:
18792 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_print_settings_t) -> usize>,
18793 #[doc = "\n Retrieve the page ranges.\n"]
18794 pub get_page_ranges: ::std::option::Option<
18795 unsafe extern "C" fn(
18796 self_: *mut _cef_print_settings_t,
18797 rangesCount: *mut usize,
18798 ranges: *mut cef_range_t,
18799 ),
18800 >,
18801 #[doc = "\n Set whether only the selection will be printed.\n"]
18802 pub set_selection_only: ::std::option::Option<
18803 unsafe extern "C" fn(
18804 self_: *mut _cef_print_settings_t,
18805 selection_only: ::std::os::raw::c_int,
18806 ),
18807 >,
18808 #[doc = "\n Returns true (1) if only the selection will be printed.\n"]
18809 pub is_selection_only: ::std::option::Option<
18810 unsafe extern "C" fn(self_: *mut _cef_print_settings_t) -> ::std::os::raw::c_int,
18811 >,
18812 #[doc = "\n Set whether pages will be collated.\n"]
18813 pub set_collate: ::std::option::Option<
18814 unsafe extern "C" fn(self_: *mut _cef_print_settings_t, collate: ::std::os::raw::c_int),
18815 >,
18816 #[doc = "\n Returns true (1) if pages will be collated.\n"]
18817 pub will_collate: ::std::option::Option<
18818 unsafe extern "C" fn(self_: *mut _cef_print_settings_t) -> ::std::os::raw::c_int,
18819 >,
18820 #[doc = "\n Set the color model.\n"]
18821 pub set_color_model: ::std::option::Option<
18822 unsafe extern "C" fn(self_: *mut _cef_print_settings_t, model: cef_color_model_t),
18823 >,
18824 #[doc = "\n Get the color model.\n"]
18825 pub get_color_model: ::std::option::Option<
18826 unsafe extern "C" fn(self_: *mut _cef_print_settings_t) -> cef_color_model_t,
18827 >,
18828 #[doc = "\n Set the number of copies.\n"]
18829 pub set_copies: ::std::option::Option<
18830 unsafe extern "C" fn(self_: *mut _cef_print_settings_t, copies: ::std::os::raw::c_int),
18831 >,
18832 #[doc = "\n Get the number of copies.\n"]
18833 pub get_copies: ::std::option::Option<
18834 unsafe extern "C" fn(self_: *mut _cef_print_settings_t) -> ::std::os::raw::c_int,
18835 >,
18836 #[doc = "\n Set the duplex mode.\n"]
18837 pub set_duplex_mode: ::std::option::Option<
18838 unsafe extern "C" fn(self_: *mut _cef_print_settings_t, mode: cef_duplex_mode_t),
18839 >,
18840 #[doc = "\n Get the duplex mode.\n"]
18841 pub get_duplex_mode: ::std::option::Option<
18842 unsafe extern "C" fn(self_: *mut _cef_print_settings_t) -> cef_duplex_mode_t,
18843 >,
18844}
18845#[test]
18846fn bindgen_test_layout__cef_print_settings_t() {
18847 const UNINIT: ::std::mem::MaybeUninit<_cef_print_settings_t> =
18848 ::std::mem::MaybeUninit::uninit();
18849 let ptr = UNINIT.as_ptr();
18850 assert_eq!(
18851 ::std::mem::size_of::<_cef_print_settings_t>(),
18852 216usize,
18853 concat!("Size of: ", stringify!(_cef_print_settings_t))
18854 );
18855 assert_eq!(
18856 ::std::mem::align_of::<_cef_print_settings_t>(),
18857 8usize,
18858 concat!("Alignment of ", stringify!(_cef_print_settings_t))
18859 );
18860 assert_eq!(
18861 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
18862 0usize,
18863 concat!(
18864 "Offset of field: ",
18865 stringify!(_cef_print_settings_t),
18866 "::",
18867 stringify!(base)
18868 )
18869 );
18870 assert_eq!(
18871 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
18872 40usize,
18873 concat!(
18874 "Offset of field: ",
18875 stringify!(_cef_print_settings_t),
18876 "::",
18877 stringify!(is_valid)
18878 )
18879 );
18880 assert_eq!(
18881 unsafe { ::std::ptr::addr_of!((*ptr).is_read_only) as usize - ptr as usize },
18882 48usize,
18883 concat!(
18884 "Offset of field: ",
18885 stringify!(_cef_print_settings_t),
18886 "::",
18887 stringify!(is_read_only)
18888 )
18889 );
18890 assert_eq!(
18891 unsafe { ::std::ptr::addr_of!((*ptr).set_orientation) as usize - ptr as usize },
18892 56usize,
18893 concat!(
18894 "Offset of field: ",
18895 stringify!(_cef_print_settings_t),
18896 "::",
18897 stringify!(set_orientation)
18898 )
18899 );
18900 assert_eq!(
18901 unsafe { ::std::ptr::addr_of!((*ptr).is_landscape) as usize - ptr as usize },
18902 64usize,
18903 concat!(
18904 "Offset of field: ",
18905 stringify!(_cef_print_settings_t),
18906 "::",
18907 stringify!(is_landscape)
18908 )
18909 );
18910 assert_eq!(
18911 unsafe { ::std::ptr::addr_of!((*ptr).set_printer_printable_area) as usize - ptr as usize },
18912 72usize,
18913 concat!(
18914 "Offset of field: ",
18915 stringify!(_cef_print_settings_t),
18916 "::",
18917 stringify!(set_printer_printable_area)
18918 )
18919 );
18920 assert_eq!(
18921 unsafe { ::std::ptr::addr_of!((*ptr).set_device_name) as usize - ptr as usize },
18922 80usize,
18923 concat!(
18924 "Offset of field: ",
18925 stringify!(_cef_print_settings_t),
18926 "::",
18927 stringify!(set_device_name)
18928 )
18929 );
18930 assert_eq!(
18931 unsafe { ::std::ptr::addr_of!((*ptr).get_device_name) as usize - ptr as usize },
18932 88usize,
18933 concat!(
18934 "Offset of field: ",
18935 stringify!(_cef_print_settings_t),
18936 "::",
18937 stringify!(get_device_name)
18938 )
18939 );
18940 assert_eq!(
18941 unsafe { ::std::ptr::addr_of!((*ptr).set_dpi) as usize - ptr as usize },
18942 96usize,
18943 concat!(
18944 "Offset of field: ",
18945 stringify!(_cef_print_settings_t),
18946 "::",
18947 stringify!(set_dpi)
18948 )
18949 );
18950 assert_eq!(
18951 unsafe { ::std::ptr::addr_of!((*ptr).get_dpi) as usize - ptr as usize },
18952 104usize,
18953 concat!(
18954 "Offset of field: ",
18955 stringify!(_cef_print_settings_t),
18956 "::",
18957 stringify!(get_dpi)
18958 )
18959 );
18960 assert_eq!(
18961 unsafe { ::std::ptr::addr_of!((*ptr).set_page_ranges) as usize - ptr as usize },
18962 112usize,
18963 concat!(
18964 "Offset of field: ",
18965 stringify!(_cef_print_settings_t),
18966 "::",
18967 stringify!(set_page_ranges)
18968 )
18969 );
18970 assert_eq!(
18971 unsafe { ::std::ptr::addr_of!((*ptr).get_page_ranges_count) as usize - ptr as usize },
18972 120usize,
18973 concat!(
18974 "Offset of field: ",
18975 stringify!(_cef_print_settings_t),
18976 "::",
18977 stringify!(get_page_ranges_count)
18978 )
18979 );
18980 assert_eq!(
18981 unsafe { ::std::ptr::addr_of!((*ptr).get_page_ranges) as usize - ptr as usize },
18982 128usize,
18983 concat!(
18984 "Offset of field: ",
18985 stringify!(_cef_print_settings_t),
18986 "::",
18987 stringify!(get_page_ranges)
18988 )
18989 );
18990 assert_eq!(
18991 unsafe { ::std::ptr::addr_of!((*ptr).set_selection_only) as usize - ptr as usize },
18992 136usize,
18993 concat!(
18994 "Offset of field: ",
18995 stringify!(_cef_print_settings_t),
18996 "::",
18997 stringify!(set_selection_only)
18998 )
18999 );
19000 assert_eq!(
19001 unsafe { ::std::ptr::addr_of!((*ptr).is_selection_only) as usize - ptr as usize },
19002 144usize,
19003 concat!(
19004 "Offset of field: ",
19005 stringify!(_cef_print_settings_t),
19006 "::",
19007 stringify!(is_selection_only)
19008 )
19009 );
19010 assert_eq!(
19011 unsafe { ::std::ptr::addr_of!((*ptr).set_collate) as usize - ptr as usize },
19012 152usize,
19013 concat!(
19014 "Offset of field: ",
19015 stringify!(_cef_print_settings_t),
19016 "::",
19017 stringify!(set_collate)
19018 )
19019 );
19020 assert_eq!(
19021 unsafe { ::std::ptr::addr_of!((*ptr).will_collate) as usize - ptr as usize },
19022 160usize,
19023 concat!(
19024 "Offset of field: ",
19025 stringify!(_cef_print_settings_t),
19026 "::",
19027 stringify!(will_collate)
19028 )
19029 );
19030 assert_eq!(
19031 unsafe { ::std::ptr::addr_of!((*ptr).set_color_model) as usize - ptr as usize },
19032 168usize,
19033 concat!(
19034 "Offset of field: ",
19035 stringify!(_cef_print_settings_t),
19036 "::",
19037 stringify!(set_color_model)
19038 )
19039 );
19040 assert_eq!(
19041 unsafe { ::std::ptr::addr_of!((*ptr).get_color_model) as usize - ptr as usize },
19042 176usize,
19043 concat!(
19044 "Offset of field: ",
19045 stringify!(_cef_print_settings_t),
19046 "::",
19047 stringify!(get_color_model)
19048 )
19049 );
19050 assert_eq!(
19051 unsafe { ::std::ptr::addr_of!((*ptr).set_copies) as usize - ptr as usize },
19052 184usize,
19053 concat!(
19054 "Offset of field: ",
19055 stringify!(_cef_print_settings_t),
19056 "::",
19057 stringify!(set_copies)
19058 )
19059 );
19060 assert_eq!(
19061 unsafe { ::std::ptr::addr_of!((*ptr).get_copies) as usize - ptr as usize },
19062 192usize,
19063 concat!(
19064 "Offset of field: ",
19065 stringify!(_cef_print_settings_t),
19066 "::",
19067 stringify!(get_copies)
19068 )
19069 );
19070 assert_eq!(
19071 unsafe { ::std::ptr::addr_of!((*ptr).set_duplex_mode) as usize - ptr as usize },
19072 200usize,
19073 concat!(
19074 "Offset of field: ",
19075 stringify!(_cef_print_settings_t),
19076 "::",
19077 stringify!(set_duplex_mode)
19078 )
19079 );
19080 assert_eq!(
19081 unsafe { ::std::ptr::addr_of!((*ptr).get_duplex_mode) as usize - ptr as usize },
19082 208usize,
19083 concat!(
19084 "Offset of field: ",
19085 stringify!(_cef_print_settings_t),
19086 "::",
19087 stringify!(get_duplex_mode)
19088 )
19089 );
19090}
19091#[doc = "\n Structure representing print settings.\n"]
19092pub type cef_print_settings_t = _cef_print_settings_t;
19093extern "C" {
19094 #[doc = "\n Create a new cef_print_settings_t object.\n"]
19095 pub fn cef_print_settings_create() -> *mut cef_print_settings_t;
19096}
19097#[doc = "\n Callback structure for asynchronous continuation of print dialog requests.\n"]
19098#[repr(C)]
19099#[derive(Debug, Copy, Clone)]
19100pub struct _cef_print_dialog_callback_t {
19101 #[doc = "\n Base structure.\n"]
19102 pub base: cef_base_ref_counted_t,
19103 #[doc = "\n Continue printing with the specified |settings|.\n"]
19104 pub cont: ::std::option::Option<
19105 unsafe extern "C" fn(
19106 self_: *mut _cef_print_dialog_callback_t,
19107 settings: *mut _cef_print_settings_t,
19108 ),
19109 >,
19110 #[doc = "\n Cancel the printing.\n"]
19111 pub cancel:
19112 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_print_dialog_callback_t)>,
19113}
19114#[test]
19115fn bindgen_test_layout__cef_print_dialog_callback_t() {
19116 const UNINIT: ::std::mem::MaybeUninit<_cef_print_dialog_callback_t> =
19117 ::std::mem::MaybeUninit::uninit();
19118 let ptr = UNINIT.as_ptr();
19119 assert_eq!(
19120 ::std::mem::size_of::<_cef_print_dialog_callback_t>(),
19121 56usize,
19122 concat!("Size of: ", stringify!(_cef_print_dialog_callback_t))
19123 );
19124 assert_eq!(
19125 ::std::mem::align_of::<_cef_print_dialog_callback_t>(),
19126 8usize,
19127 concat!("Alignment of ", stringify!(_cef_print_dialog_callback_t))
19128 );
19129 assert_eq!(
19130 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
19131 0usize,
19132 concat!(
19133 "Offset of field: ",
19134 stringify!(_cef_print_dialog_callback_t),
19135 "::",
19136 stringify!(base)
19137 )
19138 );
19139 assert_eq!(
19140 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
19141 40usize,
19142 concat!(
19143 "Offset of field: ",
19144 stringify!(_cef_print_dialog_callback_t),
19145 "::",
19146 stringify!(cont)
19147 )
19148 );
19149 assert_eq!(
19150 unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize },
19151 48usize,
19152 concat!(
19153 "Offset of field: ",
19154 stringify!(_cef_print_dialog_callback_t),
19155 "::",
19156 stringify!(cancel)
19157 )
19158 );
19159}
19160#[doc = "\n Callback structure for asynchronous continuation of print dialog requests.\n"]
19161pub type cef_print_dialog_callback_t = _cef_print_dialog_callback_t;
19162#[doc = "\n Callback structure for asynchronous continuation of print job requests.\n"]
19163#[repr(C)]
19164#[derive(Debug, Copy, Clone)]
19165pub struct _cef_print_job_callback_t {
19166 #[doc = "\n Base structure.\n"]
19167 pub base: cef_base_ref_counted_t,
19168 #[doc = "\n Indicate completion of the print job.\n"]
19169 pub cont: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_print_job_callback_t)>,
19170}
19171#[test]
19172fn bindgen_test_layout__cef_print_job_callback_t() {
19173 const UNINIT: ::std::mem::MaybeUninit<_cef_print_job_callback_t> =
19174 ::std::mem::MaybeUninit::uninit();
19175 let ptr = UNINIT.as_ptr();
19176 assert_eq!(
19177 ::std::mem::size_of::<_cef_print_job_callback_t>(),
19178 48usize,
19179 concat!("Size of: ", stringify!(_cef_print_job_callback_t))
19180 );
19181 assert_eq!(
19182 ::std::mem::align_of::<_cef_print_job_callback_t>(),
19183 8usize,
19184 concat!("Alignment of ", stringify!(_cef_print_job_callback_t))
19185 );
19186 assert_eq!(
19187 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
19188 0usize,
19189 concat!(
19190 "Offset of field: ",
19191 stringify!(_cef_print_job_callback_t),
19192 "::",
19193 stringify!(base)
19194 )
19195 );
19196 assert_eq!(
19197 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
19198 40usize,
19199 concat!(
19200 "Offset of field: ",
19201 stringify!(_cef_print_job_callback_t),
19202 "::",
19203 stringify!(cont)
19204 )
19205 );
19206}
19207#[doc = "\n Callback structure for asynchronous continuation of print job requests.\n"]
19208pub type cef_print_job_callback_t = _cef_print_job_callback_t;
19209#[doc = "\n Implement this structure to handle printing on Linux. Each browser will have\n only one print job in progress at a time. The functions of this structure\n will be called on the browser process UI thread.\n"]
19210#[repr(C)]
19211#[derive(Debug, Copy, Clone)]
19212pub struct _cef_print_handler_t {
19213 #[doc = "\n Base structure.\n"]
19214 pub base: cef_base_ref_counted_t,
19215 #[doc = "\n Called when printing has started for the specified |browser|. This\n function will be called before the other OnPrint*() functions and\n irrespective of how printing was initiated (e.g.\n cef_browser_host_t::print(), JavaScript window.print() or PDF extension\n print button).\n"]
19216 pub on_print_start: ::std::option::Option<
19217 unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t),
19218 >,
19219 #[doc = "\n Synchronize |settings| with client state. If |get_defaults| is true (1)\n then populate |settings| with the default print settings. Do not keep a\n reference to |settings| outside of this callback.\n"]
19220 pub on_print_settings: ::std::option::Option<
19221 unsafe extern "C" fn(
19222 self_: *mut _cef_print_handler_t,
19223 browser: *mut _cef_browser_t,
19224 settings: *mut _cef_print_settings_t,
19225 get_defaults: ::std::os::raw::c_int,
19226 ),
19227 >,
19228 #[doc = "\n Show the print dialog. Execute |callback| once the dialog is dismissed.\n Return true (1) if the dialog will be displayed or false (0) to cancel the\n printing immediately.\n"]
19229 pub on_print_dialog: ::std::option::Option<
19230 unsafe extern "C" fn(
19231 self_: *mut _cef_print_handler_t,
19232 browser: *mut _cef_browser_t,
19233 has_selection: ::std::os::raw::c_int,
19234 callback: *mut _cef_print_dialog_callback_t,
19235 ) -> ::std::os::raw::c_int,
19236 >,
19237 #[doc = "\n Send the print job to the printer. Execute |callback| once the job is\n completed. Return true (1) if the job will proceed or false (0) to cancel\n the job immediately.\n"]
19238 pub on_print_job: ::std::option::Option<
19239 unsafe extern "C" fn(
19240 self_: *mut _cef_print_handler_t,
19241 browser: *mut _cef_browser_t,
19242 document_name: *const cef_string_t,
19243 pdf_file_path: *const cef_string_t,
19244 callback: *mut _cef_print_job_callback_t,
19245 ) -> ::std::os::raw::c_int,
19246 >,
19247 #[doc = "\n Reset client state related to printing.\n"]
19248 pub on_print_reset: ::std::option::Option<
19249 unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t),
19250 >,
19251 #[doc = "\n Return the PDF paper size in device units. Used in combination with\n cef_browser_host_t::print_to_pdf().\n"]
19252 pub get_pdf_paper_size: ::std::option::Option<
19253 unsafe extern "C" fn(
19254 self_: *mut _cef_print_handler_t,
19255 browser: *mut _cef_browser_t,
19256 device_units_per_inch: ::std::os::raw::c_int,
19257 ) -> cef_size_t,
19258 >,
19259}
19260#[test]
19261fn bindgen_test_layout__cef_print_handler_t() {
19262 const UNINIT: ::std::mem::MaybeUninit<_cef_print_handler_t> = ::std::mem::MaybeUninit::uninit();
19263 let ptr = UNINIT.as_ptr();
19264 assert_eq!(
19265 ::std::mem::size_of::<_cef_print_handler_t>(),
19266 88usize,
19267 concat!("Size of: ", stringify!(_cef_print_handler_t))
19268 );
19269 assert_eq!(
19270 ::std::mem::align_of::<_cef_print_handler_t>(),
19271 8usize,
19272 concat!("Alignment of ", stringify!(_cef_print_handler_t))
19273 );
19274 assert_eq!(
19275 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
19276 0usize,
19277 concat!(
19278 "Offset of field: ",
19279 stringify!(_cef_print_handler_t),
19280 "::",
19281 stringify!(base)
19282 )
19283 );
19284 assert_eq!(
19285 unsafe { ::std::ptr::addr_of!((*ptr).on_print_start) as usize - ptr as usize },
19286 40usize,
19287 concat!(
19288 "Offset of field: ",
19289 stringify!(_cef_print_handler_t),
19290 "::",
19291 stringify!(on_print_start)
19292 )
19293 );
19294 assert_eq!(
19295 unsafe { ::std::ptr::addr_of!((*ptr).on_print_settings) as usize - ptr as usize },
19296 48usize,
19297 concat!(
19298 "Offset of field: ",
19299 stringify!(_cef_print_handler_t),
19300 "::",
19301 stringify!(on_print_settings)
19302 )
19303 );
19304 assert_eq!(
19305 unsafe { ::std::ptr::addr_of!((*ptr).on_print_dialog) as usize - ptr as usize },
19306 56usize,
19307 concat!(
19308 "Offset of field: ",
19309 stringify!(_cef_print_handler_t),
19310 "::",
19311 stringify!(on_print_dialog)
19312 )
19313 );
19314 assert_eq!(
19315 unsafe { ::std::ptr::addr_of!((*ptr).on_print_job) as usize - ptr as usize },
19316 64usize,
19317 concat!(
19318 "Offset of field: ",
19319 stringify!(_cef_print_handler_t),
19320 "::",
19321 stringify!(on_print_job)
19322 )
19323 );
19324 assert_eq!(
19325 unsafe { ::std::ptr::addr_of!((*ptr).on_print_reset) as usize - ptr as usize },
19326 72usize,
19327 concat!(
19328 "Offset of field: ",
19329 stringify!(_cef_print_handler_t),
19330 "::",
19331 stringify!(on_print_reset)
19332 )
19333 );
19334 assert_eq!(
19335 unsafe { ::std::ptr::addr_of!((*ptr).get_pdf_paper_size) as usize - ptr as usize },
19336 80usize,
19337 concat!(
19338 "Offset of field: ",
19339 stringify!(_cef_print_handler_t),
19340 "::",
19341 stringify!(get_pdf_paper_size)
19342 )
19343 );
19344}
19345#[doc = "\n Implement this structure to handle printing on Linux. Each browser will have\n only one print job in progress at a time. The functions of this structure\n will be called on the browser process UI thread.\n"]
19346pub type cef_print_handler_t = _cef_print_handler_t;
19347#[doc = "\n Implement this structure to receive accessibility notification when\n accessibility events have been registered. The functions of this structure\n will be called on the UI thread.\n"]
19348#[repr(C)]
19349#[derive(Debug, Copy, Clone)]
19350pub struct _cef_accessibility_handler_t {
19351 #[doc = "\n Base structure.\n"]
19352 pub base: cef_base_ref_counted_t,
19353 #[doc = "\n Called after renderer process sends accessibility tree changes to the\n browser process.\n"]
19354 pub on_accessibility_tree_change: ::std::option::Option<
19355 unsafe extern "C" fn(self_: *mut _cef_accessibility_handler_t, value: *mut _cef_value_t),
19356 >,
19357 #[doc = "\n Called after renderer process sends accessibility location changes to the\n browser process.\n"]
19358 pub on_accessibility_location_change: ::std::option::Option<
19359 unsafe extern "C" fn(self_: *mut _cef_accessibility_handler_t, value: *mut _cef_value_t),
19360 >,
19361}
19362#[test]
19363fn bindgen_test_layout__cef_accessibility_handler_t() {
19364 const UNINIT: ::std::mem::MaybeUninit<_cef_accessibility_handler_t> =
19365 ::std::mem::MaybeUninit::uninit();
19366 let ptr = UNINIT.as_ptr();
19367 assert_eq!(
19368 ::std::mem::size_of::<_cef_accessibility_handler_t>(),
19369 56usize,
19370 concat!("Size of: ", stringify!(_cef_accessibility_handler_t))
19371 );
19372 assert_eq!(
19373 ::std::mem::align_of::<_cef_accessibility_handler_t>(),
19374 8usize,
19375 concat!("Alignment of ", stringify!(_cef_accessibility_handler_t))
19376 );
19377 assert_eq!(
19378 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
19379 0usize,
19380 concat!(
19381 "Offset of field: ",
19382 stringify!(_cef_accessibility_handler_t),
19383 "::",
19384 stringify!(base)
19385 )
19386 );
19387 assert_eq!(
19388 unsafe {
19389 ::std::ptr::addr_of!((*ptr).on_accessibility_tree_change) as usize - ptr as usize
19390 },
19391 40usize,
19392 concat!(
19393 "Offset of field: ",
19394 stringify!(_cef_accessibility_handler_t),
19395 "::",
19396 stringify!(on_accessibility_tree_change)
19397 )
19398 );
19399 assert_eq!(
19400 unsafe {
19401 ::std::ptr::addr_of!((*ptr).on_accessibility_location_change) as usize - ptr as usize
19402 },
19403 48usize,
19404 concat!(
19405 "Offset of field: ",
19406 stringify!(_cef_accessibility_handler_t),
19407 "::",
19408 stringify!(on_accessibility_location_change)
19409 )
19410 );
19411}
19412#[doc = "\n Implement this structure to receive accessibility notification when\n accessibility events have been registered. The functions of this structure\n will be called on the UI thread.\n"]
19413pub type cef_accessibility_handler_t = _cef_accessibility_handler_t;
19414#[doc = "\n Implement this structure to handle events when window rendering is disabled.\n The functions of this structure will be called on the UI thread.\n"]
19415#[repr(C)]
19416#[derive(Debug, Copy, Clone)]
19417pub struct _cef_render_handler_t {
19418 #[doc = "\n Base structure.\n"]
19419 pub base: cef_base_ref_counted_t,
19420 #[doc = "\n Return the handler for accessibility notifications. If no handler is\n provided the default implementation will be used.\n"]
19421 pub get_accessibility_handler: ::std::option::Option<
19422 unsafe extern "C" fn(
19423 self_: *mut _cef_render_handler_t,
19424 ) -> *mut _cef_accessibility_handler_t,
19425 >,
19426 #[doc = "\n Called to retrieve the root window rectangle in screen DIP coordinates.\n Return true (1) if the rectangle was provided. If this function returns\n false (0) the rectangle from GetViewRect will be used.\n"]
19427 pub get_root_screen_rect: ::std::option::Option<
19428 unsafe extern "C" fn(
19429 self_: *mut _cef_render_handler_t,
19430 browser: *mut _cef_browser_t,
19431 rect: *mut cef_rect_t,
19432 ) -> ::std::os::raw::c_int,
19433 >,
19434 #[doc = "\n Called to retrieve the view rectangle in screen DIP coordinates. This\n function must always provide a non-NULL rectangle.\n"]
19435 pub get_view_rect: ::std::option::Option<
19436 unsafe extern "C" fn(
19437 self_: *mut _cef_render_handler_t,
19438 browser: *mut _cef_browser_t,
19439 rect: *mut cef_rect_t,
19440 ),
19441 >,
19442 #[doc = "\n Called to retrieve the translation from view DIP coordinates to screen\n coordinates. Windows/Linux should provide screen device (pixel)\n coordinates and MacOS should provide screen DIP coordinates. Return true\n (1) if the requested coordinates were provided.\n"]
19443 pub get_screen_point: ::std::option::Option<
19444 unsafe extern "C" fn(
19445 self_: *mut _cef_render_handler_t,
19446 browser: *mut _cef_browser_t,
19447 viewX: ::std::os::raw::c_int,
19448 viewY: ::std::os::raw::c_int,
19449 screenX: *mut ::std::os::raw::c_int,
19450 screenY: *mut ::std::os::raw::c_int,
19451 ) -> ::std::os::raw::c_int,
19452 >,
19453 #[doc = "\n Called to allow the client to fill in the CefScreenInfo object with\n appropriate values. Return true (1) if the |screen_info| structure has\n been modified.\n\n If the screen info rectangle is left NULL the rectangle from GetViewRect\n will be used. If the rectangle is still NULL or invalid popups may not be\n drawn correctly.\n"]
19454 pub get_screen_info: ::std::option::Option<
19455 unsafe extern "C" fn(
19456 self_: *mut _cef_render_handler_t,
19457 browser: *mut _cef_browser_t,
19458 screen_info: *mut cef_screen_info_t,
19459 ) -> ::std::os::raw::c_int,
19460 >,
19461 #[doc = "\n Called when the browser wants to show or hide the popup widget. The popup\n should be shown if |show| is true (1) and hidden if |show| is false (0).\n"]
19462 pub on_popup_show: ::std::option::Option<
19463 unsafe extern "C" fn(
19464 self_: *mut _cef_render_handler_t,
19465 browser: *mut _cef_browser_t,
19466 show: ::std::os::raw::c_int,
19467 ),
19468 >,
19469 #[doc = "\n Called when the browser wants to move or resize the popup widget. |rect|\n contains the new location and size in view coordinates.\n"]
19470 pub on_popup_size: ::std::option::Option<
19471 unsafe extern "C" fn(
19472 self_: *mut _cef_render_handler_t,
19473 browser: *mut _cef_browser_t,
19474 rect: *const cef_rect_t,
19475 ),
19476 >,
19477 #[doc = "\n Called when an element should be painted. Pixel values passed to this\n function are scaled relative to view coordinates based on the value of\n CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type|\n indicates whether the element is the view or the popup widget. |buffer|\n contains the pixel data for the whole image. |dirtyRects| contains the set\n of rectangles in pixel coordinates that need to be repainted. |buffer|\n will be |width|*|height|*4 bytes in size and represents a BGRA image with\n an upper-left origin. This function is only called when\n cef_window_tInfo::shared_texture_enabled is set to false (0).\n"]
19478 pub on_paint: ::std::option::Option<
19479 unsafe extern "C" fn(
19480 self_: *mut _cef_render_handler_t,
19481 browser: *mut _cef_browser_t,
19482 type_: cef_paint_element_type_t,
19483 dirtyRectsCount: usize,
19484 dirtyRects: *const cef_rect_t,
19485 buffer: *const ::std::os::raw::c_void,
19486 width: ::std::os::raw::c_int,
19487 height: ::std::os::raw::c_int,
19488 ),
19489 >,
19490 #[doc = "\n Called when an element has been rendered to the shared texture handle.\n |type| indicates whether the element is the view or the popup widget.\n |dirtyRects| contains the set of rectangles in pixel coordinates that need\n to be repainted. |shared_handle| is the handle for a D3D11 Texture2D that\n can be accessed via ID3D11Device using the OpenSharedResource function.\n This function is only called when cef_window_tInfo::shared_texture_enabled\n is set to true (1), and is currently only supported on Windows.\n"]
19491 pub on_accelerated_paint: ::std::option::Option<
19492 unsafe extern "C" fn(
19493 self_: *mut _cef_render_handler_t,
19494 browser: *mut _cef_browser_t,
19495 type_: cef_paint_element_type_t,
19496 dirtyRectsCount: usize,
19497 dirtyRects: *const cef_rect_t,
19498 shared_handle: *mut ::std::os::raw::c_void,
19499 ),
19500 >,
19501 #[doc = "\n Called to retrieve the size of the touch handle for the specified\n |orientation|.\n"]
19502 pub get_touch_handle_size: ::std::option::Option<
19503 unsafe extern "C" fn(
19504 self_: *mut _cef_render_handler_t,
19505 browser: *mut _cef_browser_t,
19506 orientation: cef_horizontal_alignment_t,
19507 size: *mut cef_size_t,
19508 ),
19509 >,
19510 #[doc = "\n Called when touch handle state is updated. The client is responsible for\n rendering the touch handles.\n"]
19511 pub on_touch_handle_state_changed: ::std::option::Option<
19512 unsafe extern "C" fn(
19513 self_: *mut _cef_render_handler_t,
19514 browser: *mut _cef_browser_t,
19515 state: *const cef_touch_handle_state_t,
19516 ),
19517 >,
19518 #[doc = "\n Called when the user starts dragging content in the web view. Contextual\n information about the dragged content is supplied by |drag_data|. (|x|,\n |y|) is the drag start location in screen coordinates. OS APIs that run a\n system message loop may be used within the StartDragging call.\n\n Return false (0) to abort the drag operation. Don't call any of\n cef_browser_host_t::DragSource*Ended* functions after returning false (0).\n\n Return true (1) to handle the drag operation. Call\n cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either\n synchronously or asynchronously to inform the web view that the drag\n operation has ended.\n"]
19519 pub start_dragging: ::std::option::Option<
19520 unsafe extern "C" fn(
19521 self_: *mut _cef_render_handler_t,
19522 browser: *mut _cef_browser_t,
19523 drag_data: *mut _cef_drag_data_t,
19524 allowed_ops: cef_drag_operations_mask_t,
19525 x: ::std::os::raw::c_int,
19526 y: ::std::os::raw::c_int,
19527 ) -> ::std::os::raw::c_int,
19528 >,
19529 #[doc = "\n Called when the web view wants to update the mouse cursor during a drag &\n drop operation. |operation| describes the allowed operation (none, move,\n copy, link).\n"]
19530 pub update_drag_cursor: ::std::option::Option<
19531 unsafe extern "C" fn(
19532 self_: *mut _cef_render_handler_t,
19533 browser: *mut _cef_browser_t,
19534 operation: cef_drag_operations_mask_t,
19535 ),
19536 >,
19537 #[doc = "\n Called when the scroll offset has changed.\n"]
19538 pub on_scroll_offset_changed: ::std::option::Option<
19539 unsafe extern "C" fn(
19540 self_: *mut _cef_render_handler_t,
19541 browser: *mut _cef_browser_t,
19542 x: f64,
19543 y: f64,
19544 ),
19545 >,
19546 #[doc = "\n Called when the IME composition range has changed. |selected_range| is the\n range of characters that have been selected. |character_bounds| is the\n bounds of each character in view coordinates.\n"]
19547 pub on_ime_composition_range_changed: ::std::option::Option<
19548 unsafe extern "C" fn(
19549 self_: *mut _cef_render_handler_t,
19550 browser: *mut _cef_browser_t,
19551 selected_range: *const cef_range_t,
19552 character_boundsCount: usize,
19553 character_bounds: *const cef_rect_t,
19554 ),
19555 >,
19556 #[doc = "\n Called when text selection has changed for the specified |browser|.\n |selected_text| is the currently selected text and |selected_range| is the\n character range.\n"]
19557 pub on_text_selection_changed: ::std::option::Option<
19558 unsafe extern "C" fn(
19559 self_: *mut _cef_render_handler_t,
19560 browser: *mut _cef_browser_t,
19561 selected_text: *const cef_string_t,
19562 selected_range: *const cef_range_t,
19563 ),
19564 >,
19565 #[doc = "\n Called when an on-screen keyboard should be shown or hidden for the\n specified |browser|. |input_mode| specifies what kind of keyboard should\n be opened. If |input_mode| is CEF_TEXT_INPUT_MODE_NONE, any existing\n keyboard for this browser should be hidden.\n"]
19566 pub on_virtual_keyboard_requested: ::std::option::Option<
19567 unsafe extern "C" fn(
19568 self_: *mut _cef_render_handler_t,
19569 browser: *mut _cef_browser_t,
19570 input_mode: cef_text_input_mode_t,
19571 ),
19572 >,
19573}
19574#[test]
19575fn bindgen_test_layout__cef_render_handler_t() {
19576 const UNINIT: ::std::mem::MaybeUninit<_cef_render_handler_t> =
19577 ::std::mem::MaybeUninit::uninit();
19578 let ptr = UNINIT.as_ptr();
19579 assert_eq!(
19580 ::std::mem::size_of::<_cef_render_handler_t>(),
19581 176usize,
19582 concat!("Size of: ", stringify!(_cef_render_handler_t))
19583 );
19584 assert_eq!(
19585 ::std::mem::align_of::<_cef_render_handler_t>(),
19586 8usize,
19587 concat!("Alignment of ", stringify!(_cef_render_handler_t))
19588 );
19589 assert_eq!(
19590 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
19591 0usize,
19592 concat!(
19593 "Offset of field: ",
19594 stringify!(_cef_render_handler_t),
19595 "::",
19596 stringify!(base)
19597 )
19598 );
19599 assert_eq!(
19600 unsafe { ::std::ptr::addr_of!((*ptr).get_accessibility_handler) as usize - ptr as usize },
19601 40usize,
19602 concat!(
19603 "Offset of field: ",
19604 stringify!(_cef_render_handler_t),
19605 "::",
19606 stringify!(get_accessibility_handler)
19607 )
19608 );
19609 assert_eq!(
19610 unsafe { ::std::ptr::addr_of!((*ptr).get_root_screen_rect) as usize - ptr as usize },
19611 48usize,
19612 concat!(
19613 "Offset of field: ",
19614 stringify!(_cef_render_handler_t),
19615 "::",
19616 stringify!(get_root_screen_rect)
19617 )
19618 );
19619 assert_eq!(
19620 unsafe { ::std::ptr::addr_of!((*ptr).get_view_rect) as usize - ptr as usize },
19621 56usize,
19622 concat!(
19623 "Offset of field: ",
19624 stringify!(_cef_render_handler_t),
19625 "::",
19626 stringify!(get_view_rect)
19627 )
19628 );
19629 assert_eq!(
19630 unsafe { ::std::ptr::addr_of!((*ptr).get_screen_point) as usize - ptr as usize },
19631 64usize,
19632 concat!(
19633 "Offset of field: ",
19634 stringify!(_cef_render_handler_t),
19635 "::",
19636 stringify!(get_screen_point)
19637 )
19638 );
19639 assert_eq!(
19640 unsafe { ::std::ptr::addr_of!((*ptr).get_screen_info) as usize - ptr as usize },
19641 72usize,
19642 concat!(
19643 "Offset of field: ",
19644 stringify!(_cef_render_handler_t),
19645 "::",
19646 stringify!(get_screen_info)
19647 )
19648 );
19649 assert_eq!(
19650 unsafe { ::std::ptr::addr_of!((*ptr).on_popup_show) as usize - ptr as usize },
19651 80usize,
19652 concat!(
19653 "Offset of field: ",
19654 stringify!(_cef_render_handler_t),
19655 "::",
19656 stringify!(on_popup_show)
19657 )
19658 );
19659 assert_eq!(
19660 unsafe { ::std::ptr::addr_of!((*ptr).on_popup_size) as usize - ptr as usize },
19661 88usize,
19662 concat!(
19663 "Offset of field: ",
19664 stringify!(_cef_render_handler_t),
19665 "::",
19666 stringify!(on_popup_size)
19667 )
19668 );
19669 assert_eq!(
19670 unsafe { ::std::ptr::addr_of!((*ptr).on_paint) as usize - ptr as usize },
19671 96usize,
19672 concat!(
19673 "Offset of field: ",
19674 stringify!(_cef_render_handler_t),
19675 "::",
19676 stringify!(on_paint)
19677 )
19678 );
19679 assert_eq!(
19680 unsafe { ::std::ptr::addr_of!((*ptr).on_accelerated_paint) as usize - ptr as usize },
19681 104usize,
19682 concat!(
19683 "Offset of field: ",
19684 stringify!(_cef_render_handler_t),
19685 "::",
19686 stringify!(on_accelerated_paint)
19687 )
19688 );
19689 assert_eq!(
19690 unsafe { ::std::ptr::addr_of!((*ptr).get_touch_handle_size) as usize - ptr as usize },
19691 112usize,
19692 concat!(
19693 "Offset of field: ",
19694 stringify!(_cef_render_handler_t),
19695 "::",
19696 stringify!(get_touch_handle_size)
19697 )
19698 );
19699 assert_eq!(
19700 unsafe {
19701 ::std::ptr::addr_of!((*ptr).on_touch_handle_state_changed) as usize - ptr as usize
19702 },
19703 120usize,
19704 concat!(
19705 "Offset of field: ",
19706 stringify!(_cef_render_handler_t),
19707 "::",
19708 stringify!(on_touch_handle_state_changed)
19709 )
19710 );
19711 assert_eq!(
19712 unsafe { ::std::ptr::addr_of!((*ptr).start_dragging) as usize - ptr as usize },
19713 128usize,
19714 concat!(
19715 "Offset of field: ",
19716 stringify!(_cef_render_handler_t),
19717 "::",
19718 stringify!(start_dragging)
19719 )
19720 );
19721 assert_eq!(
19722 unsafe { ::std::ptr::addr_of!((*ptr).update_drag_cursor) as usize - ptr as usize },
19723 136usize,
19724 concat!(
19725 "Offset of field: ",
19726 stringify!(_cef_render_handler_t),
19727 "::",
19728 stringify!(update_drag_cursor)
19729 )
19730 );
19731 assert_eq!(
19732 unsafe { ::std::ptr::addr_of!((*ptr).on_scroll_offset_changed) as usize - ptr as usize },
19733 144usize,
19734 concat!(
19735 "Offset of field: ",
19736 stringify!(_cef_render_handler_t),
19737 "::",
19738 stringify!(on_scroll_offset_changed)
19739 )
19740 );
19741 assert_eq!(
19742 unsafe {
19743 ::std::ptr::addr_of!((*ptr).on_ime_composition_range_changed) as usize - ptr as usize
19744 },
19745 152usize,
19746 concat!(
19747 "Offset of field: ",
19748 stringify!(_cef_render_handler_t),
19749 "::",
19750 stringify!(on_ime_composition_range_changed)
19751 )
19752 );
19753 assert_eq!(
19754 unsafe { ::std::ptr::addr_of!((*ptr).on_text_selection_changed) as usize - ptr as usize },
19755 160usize,
19756 concat!(
19757 "Offset of field: ",
19758 stringify!(_cef_render_handler_t),
19759 "::",
19760 stringify!(on_text_selection_changed)
19761 )
19762 );
19763 assert_eq!(
19764 unsafe {
19765 ::std::ptr::addr_of!((*ptr).on_virtual_keyboard_requested) as usize - ptr as usize
19766 },
19767 168usize,
19768 concat!(
19769 "Offset of field: ",
19770 stringify!(_cef_render_handler_t),
19771 "::",
19772 stringify!(on_virtual_keyboard_requested)
19773 )
19774 );
19775}
19776#[doc = "\n Implement this structure to handle events when window rendering is disabled.\n The functions of this structure will be called on the UI thread.\n"]
19777pub type cef_render_handler_t = _cef_render_handler_t;
19778#[doc = "\n Callback structure used for asynchronous continuation of authentication\n requests.\n"]
19779#[repr(C)]
19780#[derive(Debug, Copy, Clone)]
19781pub struct _cef_auth_callback_t {
19782 #[doc = "\n Base structure.\n"]
19783 pub base: cef_base_ref_counted_t,
19784 #[doc = "\n Continue the authentication request.\n"]
19785 pub cont: ::std::option::Option<
19786 unsafe extern "C" fn(
19787 self_: *mut _cef_auth_callback_t,
19788 username: *const cef_string_t,
19789 password: *const cef_string_t,
19790 ),
19791 >,
19792 #[doc = "\n Cancel the authentication request.\n"]
19793 pub cancel: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_auth_callback_t)>,
19794}
19795#[test]
19796fn bindgen_test_layout__cef_auth_callback_t() {
19797 const UNINIT: ::std::mem::MaybeUninit<_cef_auth_callback_t> = ::std::mem::MaybeUninit::uninit();
19798 let ptr = UNINIT.as_ptr();
19799 assert_eq!(
19800 ::std::mem::size_of::<_cef_auth_callback_t>(),
19801 56usize,
19802 concat!("Size of: ", stringify!(_cef_auth_callback_t))
19803 );
19804 assert_eq!(
19805 ::std::mem::align_of::<_cef_auth_callback_t>(),
19806 8usize,
19807 concat!("Alignment of ", stringify!(_cef_auth_callback_t))
19808 );
19809 assert_eq!(
19810 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
19811 0usize,
19812 concat!(
19813 "Offset of field: ",
19814 stringify!(_cef_auth_callback_t),
19815 "::",
19816 stringify!(base)
19817 )
19818 );
19819 assert_eq!(
19820 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
19821 40usize,
19822 concat!(
19823 "Offset of field: ",
19824 stringify!(_cef_auth_callback_t),
19825 "::",
19826 stringify!(cont)
19827 )
19828 );
19829 assert_eq!(
19830 unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize },
19831 48usize,
19832 concat!(
19833 "Offset of field: ",
19834 stringify!(_cef_auth_callback_t),
19835 "::",
19836 stringify!(cancel)
19837 )
19838 );
19839}
19840#[doc = "\n Callback structure used for asynchronous continuation of authentication\n requests.\n"]
19841pub type cef_auth_callback_t = _cef_auth_callback_t;
19842#[doc = "\n Structure used to represent a web response. The functions of this structure\n may be called on any thread.\n"]
19843#[repr(C)]
19844#[derive(Debug, Copy, Clone)]
19845pub struct _cef_response_t {
19846 #[doc = "\n Base structure.\n"]
19847 pub base: cef_base_ref_counted_t,
19848 #[doc = "\n Returns true (1) if this object is read-only.\n"]
19849 pub is_read_only: ::std::option::Option<
19850 unsafe extern "C" fn(self_: *mut _cef_response_t) -> ::std::os::raw::c_int,
19851 >,
19852 #[doc = "\n Get the response error code. Returns ERR_NONE if there was no error.\n"]
19853 pub get_error:
19854 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_response_t) -> cef_errorcode_t>,
19855 #[doc = "\n Set the response error code. This can be used by custom scheme handlers to\n return errors during initial request processing.\n"]
19856 pub set_error: ::std::option::Option<
19857 unsafe extern "C" fn(self_: *mut _cef_response_t, error: cef_errorcode_t),
19858 >,
19859 #[doc = "\n Get the response status code.\n"]
19860 pub get_status: ::std::option::Option<
19861 unsafe extern "C" fn(self_: *mut _cef_response_t) -> ::std::os::raw::c_int,
19862 >,
19863 #[doc = "\n Set the response status code.\n"]
19864 pub set_status: ::std::option::Option<
19865 unsafe extern "C" fn(self_: *mut _cef_response_t, status: ::std::os::raw::c_int),
19866 >,
19867 #[doc = "\n Get the response status text.\n"]
19868 pub get_status_text: ::std::option::Option<
19869 unsafe extern "C" fn(self_: *mut _cef_response_t) -> cef_string_userfree_t,
19870 >,
19871 #[doc = "\n Set the response status text.\n"]
19872 pub set_status_text: ::std::option::Option<
19873 unsafe extern "C" fn(self_: *mut _cef_response_t, statusText: *const cef_string_t),
19874 >,
19875 #[doc = "\n Get the response mime type.\n"]
19876 pub get_mime_type: ::std::option::Option<
19877 unsafe extern "C" fn(self_: *mut _cef_response_t) -> cef_string_userfree_t,
19878 >,
19879 #[doc = "\n Set the response mime type.\n"]
19880 pub set_mime_type: ::std::option::Option<
19881 unsafe extern "C" fn(self_: *mut _cef_response_t, mimeType: *const cef_string_t),
19882 >,
19883 #[doc = "\n Get the response charset.\n"]
19884 pub get_charset: ::std::option::Option<
19885 unsafe extern "C" fn(self_: *mut _cef_response_t) -> cef_string_userfree_t,
19886 >,
19887 #[doc = "\n Set the response charset.\n"]
19888 pub set_charset: ::std::option::Option<
19889 unsafe extern "C" fn(self_: *mut _cef_response_t, charset: *const cef_string_t),
19890 >,
19891 #[doc = "\n Get the value for the specified response header field.\n"]
19892 pub get_header_by_name: ::std::option::Option<
19893 unsafe extern "C" fn(
19894 self_: *mut _cef_response_t,
19895 name: *const cef_string_t,
19896 ) -> cef_string_userfree_t,
19897 >,
19898 #[doc = "\n Set the header |name| to |value|. If |overwrite| is true (1) any existing\n values will be replaced with the new value. If |overwrite| is false (0)\n any existing values will not be overwritten.\n"]
19899 pub set_header_by_name: ::std::option::Option<
19900 unsafe extern "C" fn(
19901 self_: *mut _cef_response_t,
19902 name: *const cef_string_t,
19903 value: *const cef_string_t,
19904 overwrite: ::std::os::raw::c_int,
19905 ),
19906 >,
19907 #[doc = "\n Get all response header fields.\n"]
19908 pub get_header_map: ::std::option::Option<
19909 unsafe extern "C" fn(self_: *mut _cef_response_t, headerMap: cef_string_multimap_t),
19910 >,
19911 #[doc = "\n Set all response header fields.\n"]
19912 pub set_header_map: ::std::option::Option<
19913 unsafe extern "C" fn(self_: *mut _cef_response_t, headerMap: cef_string_multimap_t),
19914 >,
19915 #[doc = "\n Get the resolved URL after redirects or changed as a result of HSTS.\n"]
19916 pub get_url: ::std::option::Option<
19917 unsafe extern "C" fn(self_: *mut _cef_response_t) -> cef_string_userfree_t,
19918 >,
19919 #[doc = "\n Set the resolved URL after redirects or changed as a result of HSTS.\n"]
19920 pub set_url: ::std::option::Option<
19921 unsafe extern "C" fn(self_: *mut _cef_response_t, url: *const cef_string_t),
19922 >,
19923}
19924#[test]
19925fn bindgen_test_layout__cef_response_t() {
19926 const UNINIT: ::std::mem::MaybeUninit<_cef_response_t> = ::std::mem::MaybeUninit::uninit();
19927 let ptr = UNINIT.as_ptr();
19928 assert_eq!(
19929 ::std::mem::size_of::<_cef_response_t>(),
19930 176usize,
19931 concat!("Size of: ", stringify!(_cef_response_t))
19932 );
19933 assert_eq!(
19934 ::std::mem::align_of::<_cef_response_t>(),
19935 8usize,
19936 concat!("Alignment of ", stringify!(_cef_response_t))
19937 );
19938 assert_eq!(
19939 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
19940 0usize,
19941 concat!(
19942 "Offset of field: ",
19943 stringify!(_cef_response_t),
19944 "::",
19945 stringify!(base)
19946 )
19947 );
19948 assert_eq!(
19949 unsafe { ::std::ptr::addr_of!((*ptr).is_read_only) as usize - ptr as usize },
19950 40usize,
19951 concat!(
19952 "Offset of field: ",
19953 stringify!(_cef_response_t),
19954 "::",
19955 stringify!(is_read_only)
19956 )
19957 );
19958 assert_eq!(
19959 unsafe { ::std::ptr::addr_of!((*ptr).get_error) as usize - ptr as usize },
19960 48usize,
19961 concat!(
19962 "Offset of field: ",
19963 stringify!(_cef_response_t),
19964 "::",
19965 stringify!(get_error)
19966 )
19967 );
19968 assert_eq!(
19969 unsafe { ::std::ptr::addr_of!((*ptr).set_error) as usize - ptr as usize },
19970 56usize,
19971 concat!(
19972 "Offset of field: ",
19973 stringify!(_cef_response_t),
19974 "::",
19975 stringify!(set_error)
19976 )
19977 );
19978 assert_eq!(
19979 unsafe { ::std::ptr::addr_of!((*ptr).get_status) as usize - ptr as usize },
19980 64usize,
19981 concat!(
19982 "Offset of field: ",
19983 stringify!(_cef_response_t),
19984 "::",
19985 stringify!(get_status)
19986 )
19987 );
19988 assert_eq!(
19989 unsafe { ::std::ptr::addr_of!((*ptr).set_status) as usize - ptr as usize },
19990 72usize,
19991 concat!(
19992 "Offset of field: ",
19993 stringify!(_cef_response_t),
19994 "::",
19995 stringify!(set_status)
19996 )
19997 );
19998 assert_eq!(
19999 unsafe { ::std::ptr::addr_of!((*ptr).get_status_text) as usize - ptr as usize },
20000 80usize,
20001 concat!(
20002 "Offset of field: ",
20003 stringify!(_cef_response_t),
20004 "::",
20005 stringify!(get_status_text)
20006 )
20007 );
20008 assert_eq!(
20009 unsafe { ::std::ptr::addr_of!((*ptr).set_status_text) as usize - ptr as usize },
20010 88usize,
20011 concat!(
20012 "Offset of field: ",
20013 stringify!(_cef_response_t),
20014 "::",
20015 stringify!(set_status_text)
20016 )
20017 );
20018 assert_eq!(
20019 unsafe { ::std::ptr::addr_of!((*ptr).get_mime_type) as usize - ptr as usize },
20020 96usize,
20021 concat!(
20022 "Offset of field: ",
20023 stringify!(_cef_response_t),
20024 "::",
20025 stringify!(get_mime_type)
20026 )
20027 );
20028 assert_eq!(
20029 unsafe { ::std::ptr::addr_of!((*ptr).set_mime_type) as usize - ptr as usize },
20030 104usize,
20031 concat!(
20032 "Offset of field: ",
20033 stringify!(_cef_response_t),
20034 "::",
20035 stringify!(set_mime_type)
20036 )
20037 );
20038 assert_eq!(
20039 unsafe { ::std::ptr::addr_of!((*ptr).get_charset) as usize - ptr as usize },
20040 112usize,
20041 concat!(
20042 "Offset of field: ",
20043 stringify!(_cef_response_t),
20044 "::",
20045 stringify!(get_charset)
20046 )
20047 );
20048 assert_eq!(
20049 unsafe { ::std::ptr::addr_of!((*ptr).set_charset) as usize - ptr as usize },
20050 120usize,
20051 concat!(
20052 "Offset of field: ",
20053 stringify!(_cef_response_t),
20054 "::",
20055 stringify!(set_charset)
20056 )
20057 );
20058 assert_eq!(
20059 unsafe { ::std::ptr::addr_of!((*ptr).get_header_by_name) as usize - ptr as usize },
20060 128usize,
20061 concat!(
20062 "Offset of field: ",
20063 stringify!(_cef_response_t),
20064 "::",
20065 stringify!(get_header_by_name)
20066 )
20067 );
20068 assert_eq!(
20069 unsafe { ::std::ptr::addr_of!((*ptr).set_header_by_name) as usize - ptr as usize },
20070 136usize,
20071 concat!(
20072 "Offset of field: ",
20073 stringify!(_cef_response_t),
20074 "::",
20075 stringify!(set_header_by_name)
20076 )
20077 );
20078 assert_eq!(
20079 unsafe { ::std::ptr::addr_of!((*ptr).get_header_map) as usize - ptr as usize },
20080 144usize,
20081 concat!(
20082 "Offset of field: ",
20083 stringify!(_cef_response_t),
20084 "::",
20085 stringify!(get_header_map)
20086 )
20087 );
20088 assert_eq!(
20089 unsafe { ::std::ptr::addr_of!((*ptr).set_header_map) as usize - ptr as usize },
20090 152usize,
20091 concat!(
20092 "Offset of field: ",
20093 stringify!(_cef_response_t),
20094 "::",
20095 stringify!(set_header_map)
20096 )
20097 );
20098 assert_eq!(
20099 unsafe { ::std::ptr::addr_of!((*ptr).get_url) as usize - ptr as usize },
20100 160usize,
20101 concat!(
20102 "Offset of field: ",
20103 stringify!(_cef_response_t),
20104 "::",
20105 stringify!(get_url)
20106 )
20107 );
20108 assert_eq!(
20109 unsafe { ::std::ptr::addr_of!((*ptr).set_url) as usize - ptr as usize },
20110 168usize,
20111 concat!(
20112 "Offset of field: ",
20113 stringify!(_cef_response_t),
20114 "::",
20115 stringify!(set_url)
20116 )
20117 );
20118}
20119#[doc = "\n Structure used to represent a web response. The functions of this structure\n may be called on any thread.\n"]
20120pub type cef_response_t = _cef_response_t;
20121extern "C" {
20122 #[doc = "\n Create a new cef_response_t object.\n"]
20123 pub fn cef_response_create() -> *mut cef_response_t;
20124}
20125#[doc = "\n Callback for asynchronous continuation of cef_resource_handler_t::skip().\n"]
20126#[repr(C)]
20127#[derive(Debug, Copy, Clone)]
20128pub struct _cef_resource_skip_callback_t {
20129 #[doc = "\n Base structure.\n"]
20130 pub base: cef_base_ref_counted_t,
20131 #[doc = "\n Callback for asynchronous continuation of skip(). If |bytes_skipped| > 0\n then either skip() will be called again until the requested number of\n bytes have been skipped or the request will proceed. If |bytes_skipped| <=\n 0 the request will fail with ERR_REQUEST_RANGE_NOT_SATISFIABLE.\n"]
20132 pub cont: ::std::option::Option<
20133 unsafe extern "C" fn(self_: *mut _cef_resource_skip_callback_t, bytes_skipped: i64),
20134 >,
20135}
20136#[test]
20137fn bindgen_test_layout__cef_resource_skip_callback_t() {
20138 const UNINIT: ::std::mem::MaybeUninit<_cef_resource_skip_callback_t> =
20139 ::std::mem::MaybeUninit::uninit();
20140 let ptr = UNINIT.as_ptr();
20141 assert_eq!(
20142 ::std::mem::size_of::<_cef_resource_skip_callback_t>(),
20143 48usize,
20144 concat!("Size of: ", stringify!(_cef_resource_skip_callback_t))
20145 );
20146 assert_eq!(
20147 ::std::mem::align_of::<_cef_resource_skip_callback_t>(),
20148 8usize,
20149 concat!("Alignment of ", stringify!(_cef_resource_skip_callback_t))
20150 );
20151 assert_eq!(
20152 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
20153 0usize,
20154 concat!(
20155 "Offset of field: ",
20156 stringify!(_cef_resource_skip_callback_t),
20157 "::",
20158 stringify!(base)
20159 )
20160 );
20161 assert_eq!(
20162 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
20163 40usize,
20164 concat!(
20165 "Offset of field: ",
20166 stringify!(_cef_resource_skip_callback_t),
20167 "::",
20168 stringify!(cont)
20169 )
20170 );
20171}
20172#[doc = "\n Callback for asynchronous continuation of cef_resource_handler_t::skip().\n"]
20173pub type cef_resource_skip_callback_t = _cef_resource_skip_callback_t;
20174#[doc = "\n Callback for asynchronous continuation of cef_resource_handler_t::read().\n"]
20175#[repr(C)]
20176#[derive(Debug, Copy, Clone)]
20177pub struct _cef_resource_read_callback_t {
20178 #[doc = "\n Base structure.\n"]
20179 pub base: cef_base_ref_counted_t,
20180 #[doc = "\n Callback for asynchronous continuation of read(). If |bytes_read| == 0 the\n response will be considered complete. If |bytes_read| > 0 then read() will\n be called again until the request is complete (based on either the result\n or the expected content length). If |bytes_read| < 0 then the request will\n fail and the |bytes_read| value will be treated as the error code.\n"]
20181 pub cont: ::std::option::Option<
20182 unsafe extern "C" fn(
20183 self_: *mut _cef_resource_read_callback_t,
20184 bytes_read: ::std::os::raw::c_int,
20185 ),
20186 >,
20187}
20188#[test]
20189fn bindgen_test_layout__cef_resource_read_callback_t() {
20190 const UNINIT: ::std::mem::MaybeUninit<_cef_resource_read_callback_t> =
20191 ::std::mem::MaybeUninit::uninit();
20192 let ptr = UNINIT.as_ptr();
20193 assert_eq!(
20194 ::std::mem::size_of::<_cef_resource_read_callback_t>(),
20195 48usize,
20196 concat!("Size of: ", stringify!(_cef_resource_read_callback_t))
20197 );
20198 assert_eq!(
20199 ::std::mem::align_of::<_cef_resource_read_callback_t>(),
20200 8usize,
20201 concat!("Alignment of ", stringify!(_cef_resource_read_callback_t))
20202 );
20203 assert_eq!(
20204 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
20205 0usize,
20206 concat!(
20207 "Offset of field: ",
20208 stringify!(_cef_resource_read_callback_t),
20209 "::",
20210 stringify!(base)
20211 )
20212 );
20213 assert_eq!(
20214 unsafe { ::std::ptr::addr_of!((*ptr).cont) as usize - ptr as usize },
20215 40usize,
20216 concat!(
20217 "Offset of field: ",
20218 stringify!(_cef_resource_read_callback_t),
20219 "::",
20220 stringify!(cont)
20221 )
20222 );
20223}
20224#[doc = "\n Callback for asynchronous continuation of cef_resource_handler_t::read().\n"]
20225pub type cef_resource_read_callback_t = _cef_resource_read_callback_t;
20226#[doc = "\n Structure used to implement a custom request handler structure. The\n functions of this structure will be called on the IO thread unless otherwise\n indicated.\n"]
20227#[repr(C)]
20228#[derive(Debug, Copy, Clone)]
20229pub struct _cef_resource_handler_t {
20230 #[doc = "\n Base structure.\n"]
20231 pub base: cef_base_ref_counted_t,
20232 #[doc = "\n Open the response stream. To handle the request immediately set\n |handle_request| to true (1) and return true (1). To decide at a later\n time set |handle_request| to false (0), return true (1), and execute\n |callback| to continue or cancel the request. To cancel the request\n immediately set |handle_request| to true (1) and return false (0). This\n function will be called in sequence but not from a dedicated thread. For\n backwards compatibility set |handle_request| to false (0) and return false\n (0) and the ProcessRequest function will be called.\n"]
20233 pub open: ::std::option::Option<
20234 unsafe extern "C" fn(
20235 self_: *mut _cef_resource_handler_t,
20236 request: *mut _cef_request_t,
20237 handle_request: *mut ::std::os::raw::c_int,
20238 callback: *mut _cef_callback_t,
20239 ) -> ::std::os::raw::c_int,
20240 >,
20241 #[doc = "\n Begin processing the request. To handle the request return true (1) and\n call cef_callback_t::cont() once the response header information is\n available (cef_callback_t::cont() can also be called from inside this\n function if header information is available immediately). To cancel the\n request return false (0).\n\n WARNING: This function is deprecated. Use Open instead.\n"]
20242 pub process_request: ::std::option::Option<
20243 unsafe extern "C" fn(
20244 self_: *mut _cef_resource_handler_t,
20245 request: *mut _cef_request_t,
20246 callback: *mut _cef_callback_t,
20247 ) -> ::std::os::raw::c_int,
20248 >,
20249 #[doc = "\n Retrieve response header information. If the response length is not known\n set |response_length| to -1 and read_response() will be called until it\n returns false (0). If the response length is known set |response_length|\n to a positive value and read_response() will be called until it returns\n false (0) or the specified number of bytes have been read. Use the\n |response| object to set the mime type, http status code and other\n optional header values. To redirect the request to a new URL set\n |redirectUrl| to the new URL. |redirectUrl| can be either a relative or\n fully qualified URL. It is also possible to set |response| to a redirect\n http status code and pass the new URL via a Location header. Likewise with\n |redirectUrl| it is valid to set a relative or fully qualified URL as the\n Location header value. If an error occured while setting up the request\n you can call set_error() on |response| to indicate the error condition.\n"]
20250 pub get_response_headers: ::std::option::Option<
20251 unsafe extern "C" fn(
20252 self_: *mut _cef_resource_handler_t,
20253 response: *mut _cef_response_t,
20254 response_length: *mut i64,
20255 redirectUrl: *mut cef_string_t,
20256 ),
20257 >,
20258 #[doc = "\n Skip response data when requested by a Range header. Skip over and discard\n |bytes_to_skip| bytes of response data. If data is available immediately\n set |bytes_skipped| to the number of bytes skipped and return true (1). To\n read the data at a later time set |bytes_skipped| to 0, return true (1)\n and execute |callback| when the data is available. To indicate failure set\n |bytes_skipped| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This\n function will be called in sequence but not from a dedicated thread.\n"]
20259 pub skip: ::std::option::Option<
20260 unsafe extern "C" fn(
20261 self_: *mut _cef_resource_handler_t,
20262 bytes_to_skip: i64,
20263 bytes_skipped: *mut i64,
20264 callback: *mut _cef_resource_skip_callback_t,
20265 ) -> ::std::os::raw::c_int,
20266 >,
20267 #[doc = "\n Read response data. If data is available immediately copy up to\n |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of\n bytes copied, and return true (1). To read the data at a later time keep a\n pointer to |data_out|, set |bytes_read| to 0, return true (1) and execute\n |callback| when the data is available (|data_out| will remain valid until\n the callback is executed). To indicate response completion set\n |bytes_read| to 0 and return false (0). To indicate failure set\n |bytes_read| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This\n function will be called in sequence but not from a dedicated thread. For\n backwards compatibility set |bytes_read| to -1 and return false (0) and\n the ReadResponse function will be called.\n"]
20268 pub read: ::std::option::Option<
20269 unsafe extern "C" fn(
20270 self_: *mut _cef_resource_handler_t,
20271 data_out: *mut ::std::os::raw::c_void,
20272 bytes_to_read: ::std::os::raw::c_int,
20273 bytes_read: *mut ::std::os::raw::c_int,
20274 callback: *mut _cef_resource_read_callback_t,
20275 ) -> ::std::os::raw::c_int,
20276 >,
20277 #[doc = "\n Read response data. If data is available immediately copy up to\n |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of\n bytes copied, and return true (1). To read the data at a later time set\n |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when\n the data is available. To indicate response completion return false (0).\n\n WARNING: This function is deprecated. Use Skip and Read instead.\n"]
20278 pub read_response: ::std::option::Option<
20279 unsafe extern "C" fn(
20280 self_: *mut _cef_resource_handler_t,
20281 data_out: *mut ::std::os::raw::c_void,
20282 bytes_to_read: ::std::os::raw::c_int,
20283 bytes_read: *mut ::std::os::raw::c_int,
20284 callback: *mut _cef_callback_t,
20285 ) -> ::std::os::raw::c_int,
20286 >,
20287 #[doc = "\n Request processing has been canceled.\n"]
20288 pub cancel: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_resource_handler_t)>,
20289}
20290#[test]
20291fn bindgen_test_layout__cef_resource_handler_t() {
20292 const UNINIT: ::std::mem::MaybeUninit<_cef_resource_handler_t> =
20293 ::std::mem::MaybeUninit::uninit();
20294 let ptr = UNINIT.as_ptr();
20295 assert_eq!(
20296 ::std::mem::size_of::<_cef_resource_handler_t>(),
20297 96usize,
20298 concat!("Size of: ", stringify!(_cef_resource_handler_t))
20299 );
20300 assert_eq!(
20301 ::std::mem::align_of::<_cef_resource_handler_t>(),
20302 8usize,
20303 concat!("Alignment of ", stringify!(_cef_resource_handler_t))
20304 );
20305 assert_eq!(
20306 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
20307 0usize,
20308 concat!(
20309 "Offset of field: ",
20310 stringify!(_cef_resource_handler_t),
20311 "::",
20312 stringify!(base)
20313 )
20314 );
20315 assert_eq!(
20316 unsafe { ::std::ptr::addr_of!((*ptr).open) as usize - ptr as usize },
20317 40usize,
20318 concat!(
20319 "Offset of field: ",
20320 stringify!(_cef_resource_handler_t),
20321 "::",
20322 stringify!(open)
20323 )
20324 );
20325 assert_eq!(
20326 unsafe { ::std::ptr::addr_of!((*ptr).process_request) as usize - ptr as usize },
20327 48usize,
20328 concat!(
20329 "Offset of field: ",
20330 stringify!(_cef_resource_handler_t),
20331 "::",
20332 stringify!(process_request)
20333 )
20334 );
20335 assert_eq!(
20336 unsafe { ::std::ptr::addr_of!((*ptr).get_response_headers) as usize - ptr as usize },
20337 56usize,
20338 concat!(
20339 "Offset of field: ",
20340 stringify!(_cef_resource_handler_t),
20341 "::",
20342 stringify!(get_response_headers)
20343 )
20344 );
20345 assert_eq!(
20346 unsafe { ::std::ptr::addr_of!((*ptr).skip) as usize - ptr as usize },
20347 64usize,
20348 concat!(
20349 "Offset of field: ",
20350 stringify!(_cef_resource_handler_t),
20351 "::",
20352 stringify!(skip)
20353 )
20354 );
20355 assert_eq!(
20356 unsafe { ::std::ptr::addr_of!((*ptr).read) as usize - ptr as usize },
20357 72usize,
20358 concat!(
20359 "Offset of field: ",
20360 stringify!(_cef_resource_handler_t),
20361 "::",
20362 stringify!(read)
20363 )
20364 );
20365 assert_eq!(
20366 unsafe { ::std::ptr::addr_of!((*ptr).read_response) as usize - ptr as usize },
20367 80usize,
20368 concat!(
20369 "Offset of field: ",
20370 stringify!(_cef_resource_handler_t),
20371 "::",
20372 stringify!(read_response)
20373 )
20374 );
20375 assert_eq!(
20376 unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize },
20377 88usize,
20378 concat!(
20379 "Offset of field: ",
20380 stringify!(_cef_resource_handler_t),
20381 "::",
20382 stringify!(cancel)
20383 )
20384 );
20385}
20386#[doc = "\n Structure used to implement a custom request handler structure. The\n functions of this structure will be called on the IO thread unless otherwise\n indicated.\n"]
20387pub type cef_resource_handler_t = _cef_resource_handler_t;
20388#[doc = "\n Implement this structure to filter resource response content. The functions\n of this structure will be called on the browser process IO thread.\n"]
20389#[repr(C)]
20390#[derive(Debug, Copy, Clone)]
20391pub struct _cef_response_filter_t {
20392 #[doc = "\n Base structure.\n"]
20393 pub base: cef_base_ref_counted_t,
20394 #[doc = "\n Initialize the response filter. Will only be called a single time. The\n filter will not be installed if this function returns false (0).\n"]
20395 pub init_filter: ::std::option::Option<
20396 unsafe extern "C" fn(self_: *mut _cef_response_filter_t) -> ::std::os::raw::c_int,
20397 >,
20398 #[doc = "\n Called to filter a chunk of data. Expected usage is as follows:\n\n 1. Read input data from |data_in| and set |data_in_read| to the number of\n bytes that were read up to a maximum of |data_in_size|. |data_in| will\n be NULL if |data_in_size| is zero.\n 2. Write filtered output data to |data_out| and set |data_out_written| to\n the number of bytes that were written up to a maximum of\n |data_out_size|. If no output data was written then all data must be\n read from |data_in| (user must set |data_in_read| = |data_in_size|).\n 3. Return RESPONSE_FILTER_DONE if all output data was written or\n RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending.\n\n This function will be called repeatedly until the input buffer has been\n fully read (user sets |data_in_read| = |data_in_size|) and there is no\n more input data to filter (the resource response is complete). This\n function may then be called an additional time with an NULL input buffer\n if the user filled the output buffer (set |data_out_written| =\n |data_out_size|) and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate\n that output data is still pending.\n\n Calls to this function will stop when one of the following conditions is\n met:\n\n 1. There is no more input data to filter (the resource response is\n complete) and the user sets |data_out_written| = 0 or returns\n RESPONSE_FILTER_DONE to indicate that all data has been written, or;\n 2. The user returns RESPONSE_FILTER_ERROR to indicate an error.\n\n Do not keep a reference to the buffers passed to this function.\n"]
20399 pub filter: ::std::option::Option<
20400 unsafe extern "C" fn(
20401 self_: *mut _cef_response_filter_t,
20402 data_in: *mut ::std::os::raw::c_void,
20403 data_in_size: usize,
20404 data_in_read: *mut usize,
20405 data_out: *mut ::std::os::raw::c_void,
20406 data_out_size: usize,
20407 data_out_written: *mut usize,
20408 ) -> cef_response_filter_status_t,
20409 >,
20410}
20411#[test]
20412fn bindgen_test_layout__cef_response_filter_t() {
20413 const UNINIT: ::std::mem::MaybeUninit<_cef_response_filter_t> =
20414 ::std::mem::MaybeUninit::uninit();
20415 let ptr = UNINIT.as_ptr();
20416 assert_eq!(
20417 ::std::mem::size_of::<_cef_response_filter_t>(),
20418 56usize,
20419 concat!("Size of: ", stringify!(_cef_response_filter_t))
20420 );
20421 assert_eq!(
20422 ::std::mem::align_of::<_cef_response_filter_t>(),
20423 8usize,
20424 concat!("Alignment of ", stringify!(_cef_response_filter_t))
20425 );
20426 assert_eq!(
20427 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
20428 0usize,
20429 concat!(
20430 "Offset of field: ",
20431 stringify!(_cef_response_filter_t),
20432 "::",
20433 stringify!(base)
20434 )
20435 );
20436 assert_eq!(
20437 unsafe { ::std::ptr::addr_of!((*ptr).init_filter) as usize - ptr as usize },
20438 40usize,
20439 concat!(
20440 "Offset of field: ",
20441 stringify!(_cef_response_filter_t),
20442 "::",
20443 stringify!(init_filter)
20444 )
20445 );
20446 assert_eq!(
20447 unsafe { ::std::ptr::addr_of!((*ptr).filter) as usize - ptr as usize },
20448 48usize,
20449 concat!(
20450 "Offset of field: ",
20451 stringify!(_cef_response_filter_t),
20452 "::",
20453 stringify!(filter)
20454 )
20455 );
20456}
20457#[doc = "\n Implement this structure to filter resource response content. The functions\n of this structure will be called on the browser process IO thread.\n"]
20458pub type cef_response_filter_t = _cef_response_filter_t;
20459#[doc = "\n Implement this structure to handle events related to browser requests. The\n functions of this structure will be called on the IO thread unless otherwise\n indicated.\n"]
20460#[repr(C)]
20461#[derive(Debug, Copy, Clone)]
20462pub struct _cef_resource_request_handler_t {
20463 #[doc = "\n Base structure.\n"]
20464 pub base: cef_base_ref_counted_t,
20465 #[doc = "\n Called on the IO thread before a resource request is loaded. The |browser|\n and |frame| values represent the source of the request, and may be NULL\n for requests originating from service workers or cef_urlrequest_t. To\n optionally filter cookies for the request return a\n cef_cookie_access_filter_t object. The |request| object cannot not be\n modified in this callback.\n"]
20466 pub get_cookie_access_filter: ::std::option::Option<
20467 unsafe extern "C" fn(
20468 self_: *mut _cef_resource_request_handler_t,
20469 browser: *mut _cef_browser_t,
20470 frame: *mut _cef_frame_t,
20471 request: *mut _cef_request_t,
20472 ) -> *mut _cef_cookie_access_filter_t,
20473 >,
20474 #[doc = "\n Called on the IO thread before a resource request is loaded. The |browser|\n and |frame| values represent the source of the request, and may be NULL\n for requests originating from service workers or cef_urlrequest_t. To\n redirect or change the resource load optionally modify |request|.\n Modification of the request URL will be treated as a redirect. Return\n RV_CONTINUE to continue the request immediately. Return RV_CONTINUE_ASYNC\n and call cef_callback_t functions at a later time to continue or cancel\n the request asynchronously. Return RV_CANCEL to cancel the request\n immediately.\n"]
20475 pub on_before_resource_load: ::std::option::Option<
20476 unsafe extern "C" fn(
20477 self_: *mut _cef_resource_request_handler_t,
20478 browser: *mut _cef_browser_t,
20479 frame: *mut _cef_frame_t,
20480 request: *mut _cef_request_t,
20481 callback: *mut _cef_callback_t,
20482 ) -> cef_return_value_t,
20483 >,
20484 #[doc = "\n Called on the IO thread before a resource is loaded. The |browser| and\n |frame| values represent the source of the request, and may be NULL for\n requests originating from service workers or cef_urlrequest_t. To allow\n the resource to load using the default network loader return NULL. To\n specify a handler for the resource return a cef_resource_handler_t object.\n The |request| object cannot not be modified in this callback.\n"]
20485 pub get_resource_handler: ::std::option::Option<
20486 unsafe extern "C" fn(
20487 self_: *mut _cef_resource_request_handler_t,
20488 browser: *mut _cef_browser_t,
20489 frame: *mut _cef_frame_t,
20490 request: *mut _cef_request_t,
20491 ) -> *mut _cef_resource_handler_t,
20492 >,
20493 #[doc = "\n Called on the IO thread when a resource load is redirected. The |browser|\n and |frame| values represent the source of the request, and may be NULL\n for requests originating from service workers or cef_urlrequest_t. The\n |request| parameter will contain the old URL and other request-related\n information. The |response| parameter will contain the response that\n resulted in the redirect. The |new_url| parameter will contain the new URL\n and can be changed if desired. The |request| and |response| objects cannot\n be modified in this callback.\n"]
20494 pub on_resource_redirect: ::std::option::Option<
20495 unsafe extern "C" fn(
20496 self_: *mut _cef_resource_request_handler_t,
20497 browser: *mut _cef_browser_t,
20498 frame: *mut _cef_frame_t,
20499 request: *mut _cef_request_t,
20500 response: *mut _cef_response_t,
20501 new_url: *mut cef_string_t,
20502 ),
20503 >,
20504 #[doc = "\n Called on the IO thread when a resource response is received. The\n |browser| and |frame| values represent the source of the request, and may\n be NULL for requests originating from service workers or cef_urlrequest_t.\n To allow the resource load to proceed without modification return false\n (0). To redirect or retry the resource load optionally modify |request|\n and return true (1). Modification of the request URL will be treated as a\n redirect. Requests handled using the default network loader cannot be\n redirected in this callback. The |response| object cannot be modified in\n this callback.\n\n WARNING: Redirecting using this function is deprecated. Use\n OnBeforeResourceLoad or GetResourceHandler to perform redirects.\n"]
20505 pub on_resource_response: ::std::option::Option<
20506 unsafe extern "C" fn(
20507 self_: *mut _cef_resource_request_handler_t,
20508 browser: *mut _cef_browser_t,
20509 frame: *mut _cef_frame_t,
20510 request: *mut _cef_request_t,
20511 response: *mut _cef_response_t,
20512 ) -> ::std::os::raw::c_int,
20513 >,
20514 #[doc = "\n Called on the IO thread to optionally filter resource response content.\n The |browser| and |frame| values represent the source of the request, and\n may be NULL for requests originating from service workers or\n cef_urlrequest_t. |request| and |response| represent the request and\n response respectively and cannot be modified in this callback.\n"]
20515 pub get_resource_response_filter: ::std::option::Option<
20516 unsafe extern "C" fn(
20517 self_: *mut _cef_resource_request_handler_t,
20518 browser: *mut _cef_browser_t,
20519 frame: *mut _cef_frame_t,
20520 request: *mut _cef_request_t,
20521 response: *mut _cef_response_t,
20522 ) -> *mut _cef_response_filter_t,
20523 >,
20524 #[doc = "\n Called on the IO thread when a resource load has completed. The |browser|\n and |frame| values represent the source of the request, and may be NULL\n for requests originating from service workers or cef_urlrequest_t.\n |request| and |response| represent the request and response respectively\n and cannot be modified in this callback. |status| indicates the load\n completion status. |received_content_length| is the number of response\n bytes actually read. This function will be called for all requests,\n including requests that are aborted due to CEF shutdown or destruction of\n the associated browser. In cases where the associated browser is destroyed\n this callback may arrive after the cef_life_span_handler_t::OnBeforeClose\n callback for that browser. The cef_frame_t::IsValid function can be used\n to test for this situation, and care should be taken not to call |browser|\n or |frame| functions that modify state (like LoadURL, SendProcessMessage,\n etc.) if the frame is invalid.\n"]
20525 pub on_resource_load_complete: ::std::option::Option<
20526 unsafe extern "C" fn(
20527 self_: *mut _cef_resource_request_handler_t,
20528 browser: *mut _cef_browser_t,
20529 frame: *mut _cef_frame_t,
20530 request: *mut _cef_request_t,
20531 response: *mut _cef_response_t,
20532 status: cef_urlrequest_status_t,
20533 received_content_length: i64,
20534 ),
20535 >,
20536 #[doc = "\n Called on the IO thread to handle requests for URLs with an unknown\n protocol component. The |browser| and |frame| values represent the source\n of the request, and may be NULL for requests originating from service\n workers or cef_urlrequest_t. |request| cannot be modified in this\n callback. Set |allow_os_execution| to true (1) to attempt execution via\n the registered OS protocol handler, if any. SECURITY WARNING: YOU SHOULD\n USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL\n ANALYSIS BEFORE ALLOWING OS EXECUTION.\n"]
20537 pub on_protocol_execution: ::std::option::Option<
20538 unsafe extern "C" fn(
20539 self_: *mut _cef_resource_request_handler_t,
20540 browser: *mut _cef_browser_t,
20541 frame: *mut _cef_frame_t,
20542 request: *mut _cef_request_t,
20543 allow_os_execution: *mut ::std::os::raw::c_int,
20544 ),
20545 >,
20546}
20547#[test]
20548fn bindgen_test_layout__cef_resource_request_handler_t() {
20549 const UNINIT: ::std::mem::MaybeUninit<_cef_resource_request_handler_t> =
20550 ::std::mem::MaybeUninit::uninit();
20551 let ptr = UNINIT.as_ptr();
20552 assert_eq!(
20553 ::std::mem::size_of::<_cef_resource_request_handler_t>(),
20554 104usize,
20555 concat!("Size of: ", stringify!(_cef_resource_request_handler_t))
20556 );
20557 assert_eq!(
20558 ::std::mem::align_of::<_cef_resource_request_handler_t>(),
20559 8usize,
20560 concat!("Alignment of ", stringify!(_cef_resource_request_handler_t))
20561 );
20562 assert_eq!(
20563 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
20564 0usize,
20565 concat!(
20566 "Offset of field: ",
20567 stringify!(_cef_resource_request_handler_t),
20568 "::",
20569 stringify!(base)
20570 )
20571 );
20572 assert_eq!(
20573 unsafe { ::std::ptr::addr_of!((*ptr).get_cookie_access_filter) as usize - ptr as usize },
20574 40usize,
20575 concat!(
20576 "Offset of field: ",
20577 stringify!(_cef_resource_request_handler_t),
20578 "::",
20579 stringify!(get_cookie_access_filter)
20580 )
20581 );
20582 assert_eq!(
20583 unsafe { ::std::ptr::addr_of!((*ptr).on_before_resource_load) as usize - ptr as usize },
20584 48usize,
20585 concat!(
20586 "Offset of field: ",
20587 stringify!(_cef_resource_request_handler_t),
20588 "::",
20589 stringify!(on_before_resource_load)
20590 )
20591 );
20592 assert_eq!(
20593 unsafe { ::std::ptr::addr_of!((*ptr).get_resource_handler) as usize - ptr as usize },
20594 56usize,
20595 concat!(
20596 "Offset of field: ",
20597 stringify!(_cef_resource_request_handler_t),
20598 "::",
20599 stringify!(get_resource_handler)
20600 )
20601 );
20602 assert_eq!(
20603 unsafe { ::std::ptr::addr_of!((*ptr).on_resource_redirect) as usize - ptr as usize },
20604 64usize,
20605 concat!(
20606 "Offset of field: ",
20607 stringify!(_cef_resource_request_handler_t),
20608 "::",
20609 stringify!(on_resource_redirect)
20610 )
20611 );
20612 assert_eq!(
20613 unsafe { ::std::ptr::addr_of!((*ptr).on_resource_response) as usize - ptr as usize },
20614 72usize,
20615 concat!(
20616 "Offset of field: ",
20617 stringify!(_cef_resource_request_handler_t),
20618 "::",
20619 stringify!(on_resource_response)
20620 )
20621 );
20622 assert_eq!(
20623 unsafe {
20624 ::std::ptr::addr_of!((*ptr).get_resource_response_filter) as usize - ptr as usize
20625 },
20626 80usize,
20627 concat!(
20628 "Offset of field: ",
20629 stringify!(_cef_resource_request_handler_t),
20630 "::",
20631 stringify!(get_resource_response_filter)
20632 )
20633 );
20634 assert_eq!(
20635 unsafe { ::std::ptr::addr_of!((*ptr).on_resource_load_complete) as usize - ptr as usize },
20636 88usize,
20637 concat!(
20638 "Offset of field: ",
20639 stringify!(_cef_resource_request_handler_t),
20640 "::",
20641 stringify!(on_resource_load_complete)
20642 )
20643 );
20644 assert_eq!(
20645 unsafe { ::std::ptr::addr_of!((*ptr).on_protocol_execution) as usize - ptr as usize },
20646 96usize,
20647 concat!(
20648 "Offset of field: ",
20649 stringify!(_cef_resource_request_handler_t),
20650 "::",
20651 stringify!(on_protocol_execution)
20652 )
20653 );
20654}
20655#[doc = "\n Implement this structure to handle events related to browser requests. The\n functions of this structure will be called on the IO thread unless otherwise\n indicated.\n"]
20656pub type cef_resource_request_handler_t = _cef_resource_request_handler_t;
20657#[doc = "\n Implement this structure to filter cookies that may be sent or received from\n resource requests. The functions of this structure will be called on the IO\n thread unless otherwise indicated.\n"]
20658#[repr(C)]
20659#[derive(Debug, Copy, Clone)]
20660pub struct _cef_cookie_access_filter_t {
20661 #[doc = "\n Base structure.\n"]
20662 pub base: cef_base_ref_counted_t,
20663 #[doc = "\n Called on the IO thread before a resource request is sent. The |browser|\n and |frame| values represent the source of the request, and may be NULL\n for requests originating from service workers or cef_urlrequest_t.\n |request| cannot be modified in this callback. Return true (1) if the\n specified cookie can be sent with the request or false (0) otherwise.\n"]
20664 pub can_send_cookie: ::std::option::Option<
20665 unsafe extern "C" fn(
20666 self_: *mut _cef_cookie_access_filter_t,
20667 browser: *mut _cef_browser_t,
20668 frame: *mut _cef_frame_t,
20669 request: *mut _cef_request_t,
20670 cookie: *const _cef_cookie_t,
20671 ) -> ::std::os::raw::c_int,
20672 >,
20673 #[doc = "\n Called on the IO thread after a resource response is received. The\n |browser| and |frame| values represent the source of the request, and may\n be NULL for requests originating from service workers or cef_urlrequest_t.\n |request| cannot be modified in this callback. Return true (1) if the\n specified cookie returned with the response can be saved or false (0)\n otherwise.\n"]
20674 pub can_save_cookie: ::std::option::Option<
20675 unsafe extern "C" fn(
20676 self_: *mut _cef_cookie_access_filter_t,
20677 browser: *mut _cef_browser_t,
20678 frame: *mut _cef_frame_t,
20679 request: *mut _cef_request_t,
20680 response: *mut _cef_response_t,
20681 cookie: *const _cef_cookie_t,
20682 ) -> ::std::os::raw::c_int,
20683 >,
20684}
20685#[test]
20686fn bindgen_test_layout__cef_cookie_access_filter_t() {
20687 const UNINIT: ::std::mem::MaybeUninit<_cef_cookie_access_filter_t> =
20688 ::std::mem::MaybeUninit::uninit();
20689 let ptr = UNINIT.as_ptr();
20690 assert_eq!(
20691 ::std::mem::size_of::<_cef_cookie_access_filter_t>(),
20692 56usize,
20693 concat!("Size of: ", stringify!(_cef_cookie_access_filter_t))
20694 );
20695 assert_eq!(
20696 ::std::mem::align_of::<_cef_cookie_access_filter_t>(),
20697 8usize,
20698 concat!("Alignment of ", stringify!(_cef_cookie_access_filter_t))
20699 );
20700 assert_eq!(
20701 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
20702 0usize,
20703 concat!(
20704 "Offset of field: ",
20705 stringify!(_cef_cookie_access_filter_t),
20706 "::",
20707 stringify!(base)
20708 )
20709 );
20710 assert_eq!(
20711 unsafe { ::std::ptr::addr_of!((*ptr).can_send_cookie) as usize - ptr as usize },
20712 40usize,
20713 concat!(
20714 "Offset of field: ",
20715 stringify!(_cef_cookie_access_filter_t),
20716 "::",
20717 stringify!(can_send_cookie)
20718 )
20719 );
20720 assert_eq!(
20721 unsafe { ::std::ptr::addr_of!((*ptr).can_save_cookie) as usize - ptr as usize },
20722 48usize,
20723 concat!(
20724 "Offset of field: ",
20725 stringify!(_cef_cookie_access_filter_t),
20726 "::",
20727 stringify!(can_save_cookie)
20728 )
20729 );
20730}
20731#[doc = "\n Implement this structure to filter cookies that may be sent or received from\n resource requests. The functions of this structure will be called on the IO\n thread unless otherwise indicated.\n"]
20732pub type cef_cookie_access_filter_t = _cef_cookie_access_filter_t;
20733#[doc = "\n Structure representing SSL information.\n"]
20734#[repr(C)]
20735#[derive(Debug, Copy, Clone)]
20736pub struct _cef_sslinfo_t {
20737 #[doc = "\n Base structure.\n"]
20738 pub base: cef_base_ref_counted_t,
20739 #[doc = "\n Returns a bitmask containing any and all problems verifying the server\n certificate.\n"]
20740 pub get_cert_status: ::std::option::Option<
20741 unsafe extern "C" fn(self_: *mut _cef_sslinfo_t) -> cef_cert_status_t,
20742 >,
20743 #[doc = "\n Returns the X.509 certificate.\n"]
20744 pub get_x509certificate: ::std::option::Option<
20745 unsafe extern "C" fn(self_: *mut _cef_sslinfo_t) -> *mut _cef_x509certificate_t,
20746 >,
20747}
20748#[test]
20749fn bindgen_test_layout__cef_sslinfo_t() {
20750 const UNINIT: ::std::mem::MaybeUninit<_cef_sslinfo_t> = ::std::mem::MaybeUninit::uninit();
20751 let ptr = UNINIT.as_ptr();
20752 assert_eq!(
20753 ::std::mem::size_of::<_cef_sslinfo_t>(),
20754 56usize,
20755 concat!("Size of: ", stringify!(_cef_sslinfo_t))
20756 );
20757 assert_eq!(
20758 ::std::mem::align_of::<_cef_sslinfo_t>(),
20759 8usize,
20760 concat!("Alignment of ", stringify!(_cef_sslinfo_t))
20761 );
20762 assert_eq!(
20763 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
20764 0usize,
20765 concat!(
20766 "Offset of field: ",
20767 stringify!(_cef_sslinfo_t),
20768 "::",
20769 stringify!(base)
20770 )
20771 );
20772 assert_eq!(
20773 unsafe { ::std::ptr::addr_of!((*ptr).get_cert_status) as usize - ptr as usize },
20774 40usize,
20775 concat!(
20776 "Offset of field: ",
20777 stringify!(_cef_sslinfo_t),
20778 "::",
20779 stringify!(get_cert_status)
20780 )
20781 );
20782 assert_eq!(
20783 unsafe { ::std::ptr::addr_of!((*ptr).get_x509certificate) as usize - ptr as usize },
20784 48usize,
20785 concat!(
20786 "Offset of field: ",
20787 stringify!(_cef_sslinfo_t),
20788 "::",
20789 stringify!(get_x509certificate)
20790 )
20791 );
20792}
20793#[doc = "\n Structure representing SSL information.\n"]
20794pub type cef_sslinfo_t = _cef_sslinfo_t;
20795extern "C" {
20796 #[doc = "\n Returns true (1) if the certificate status represents an error.\n"]
20797 pub fn cef_is_cert_status_error(status: cef_cert_status_t) -> ::std::os::raw::c_int;
20798}
20799#[doc = "\n Callback structure used to select a client certificate for authentication.\n"]
20800#[repr(C)]
20801#[derive(Debug, Copy, Clone)]
20802pub struct _cef_select_client_certificate_callback_t {
20803 #[doc = "\n Base structure.\n"]
20804 pub base: cef_base_ref_counted_t,
20805 #[doc = "\n Chooses the specified certificate for client certificate authentication.\n NULL value means that no client certificate should be used.\n"]
20806 pub select: ::std::option::Option<
20807 unsafe extern "C" fn(
20808 self_: *mut _cef_select_client_certificate_callback_t,
20809 cert: *mut _cef_x509certificate_t,
20810 ),
20811 >,
20812}
20813#[test]
20814fn bindgen_test_layout__cef_select_client_certificate_callback_t() {
20815 const UNINIT: ::std::mem::MaybeUninit<_cef_select_client_certificate_callback_t> =
20816 ::std::mem::MaybeUninit::uninit();
20817 let ptr = UNINIT.as_ptr();
20818 assert_eq!(
20819 ::std::mem::size_of::<_cef_select_client_certificate_callback_t>(),
20820 48usize,
20821 concat!(
20822 "Size of: ",
20823 stringify!(_cef_select_client_certificate_callback_t)
20824 )
20825 );
20826 assert_eq!(
20827 ::std::mem::align_of::<_cef_select_client_certificate_callback_t>(),
20828 8usize,
20829 concat!(
20830 "Alignment of ",
20831 stringify!(_cef_select_client_certificate_callback_t)
20832 )
20833 );
20834 assert_eq!(
20835 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
20836 0usize,
20837 concat!(
20838 "Offset of field: ",
20839 stringify!(_cef_select_client_certificate_callback_t),
20840 "::",
20841 stringify!(base)
20842 )
20843 );
20844 assert_eq!(
20845 unsafe { ::std::ptr::addr_of!((*ptr).select) as usize - ptr as usize },
20846 40usize,
20847 concat!(
20848 "Offset of field: ",
20849 stringify!(_cef_select_client_certificate_callback_t),
20850 "::",
20851 stringify!(select)
20852 )
20853 );
20854}
20855#[doc = "\n Callback structure used to select a client certificate for authentication.\n"]
20856pub type cef_select_client_certificate_callback_t = _cef_select_client_certificate_callback_t;
20857#[doc = "\n Implement this structure to handle events related to browser requests. The\n functions of this structure will be called on the thread indicated.\n"]
20858#[repr(C)]
20859#[derive(Debug, Copy, Clone)]
20860pub struct _cef_request_handler_t {
20861 #[doc = "\n Base structure.\n"]
20862 pub base: cef_base_ref_counted_t,
20863 #[doc = "\n Called on the UI thread before browser navigation. Return true (1) to\n cancel the navigation or false (0) to allow the navigation to proceed. The\n |request| object cannot be modified in this callback.\n cef_load_handler_t::OnLoadingStateChange will be called twice in all\n cases. If the navigation is allowed cef_load_handler_t::OnLoadStart and\n cef_load_handler_t::OnLoadEnd will be called. If the navigation is\n canceled cef_load_handler_t::OnLoadError will be called with an\n |errorCode| value of ERR_ABORTED. The |user_gesture| value will be true\n (1) if the browser navigated via explicit user gesture (e.g. clicking a\n link) or false (0) if it navigated automatically (e.g. via the\n DomContentLoaded event).\n"]
20864 pub on_before_browse: ::std::option::Option<
20865 unsafe extern "C" fn(
20866 self_: *mut _cef_request_handler_t,
20867 browser: *mut _cef_browser_t,
20868 frame: *mut _cef_frame_t,
20869 request: *mut _cef_request_t,
20870 user_gesture: ::std::os::raw::c_int,
20871 is_redirect: ::std::os::raw::c_int,
20872 ) -> ::std::os::raw::c_int,
20873 >,
20874 #[doc = "\n Called on the UI thread before OnBeforeBrowse in certain limited cases\n where navigating a new or different browser might be desirable. This\n includes user-initiated navigation that might open in a special way (e.g.\n links clicked via middle-click or ctrl + left-click) and certain types of\n cross-origin navigation initiated from the renderer process (e.g.\n navigating the top-level frame to/from a file URL). The |browser| and\n |frame| values represent the source of the navigation. The\n |target_disposition| value indicates where the user intended to navigate\n the browser based on standard Chromium behaviors (e.g. current tab, new\n tab, etc). The |user_gesture| value will be true (1) if the browser\n navigated via explicit user gesture (e.g. clicking a link) or false (0) if\n it navigated automatically (e.g. via the DomContentLoaded event). Return\n true (1) to cancel the navigation or false (0) to allow the navigation to\n proceed in the source browser's top-level frame.\n"]
20875 pub on_open_urlfrom_tab: ::std::option::Option<
20876 unsafe extern "C" fn(
20877 self_: *mut _cef_request_handler_t,
20878 browser: *mut _cef_browser_t,
20879 frame: *mut _cef_frame_t,
20880 target_url: *const cef_string_t,
20881 target_disposition: cef_window_open_disposition_t,
20882 user_gesture: ::std::os::raw::c_int,
20883 ) -> ::std::os::raw::c_int,
20884 >,
20885 #[doc = "\n Called on the browser process IO thread before a resource request is\n initiated. The |browser| and |frame| values represent the source of the\n request. |request| represents the request contents and cannot be modified\n in this callback. |is_navigation| will be true (1) if the resource request\n is a navigation. |is_download| will be true (1) if the resource request is\n a download. |request_initiator| is the origin (scheme + domain) of the\n page that initiated the request. Set |disable_default_handling| to true\n (1) to disable default handling of the request, in which case it will need\n to be handled via cef_resource_request_handler_t::GetResourceHandler or it\n will be canceled. To allow the resource load to proceed with default\n handling return NULL. To specify a handler for the resource return a\n cef_resource_request_handler_t object. If this callback returns NULL the\n same function will be called on the associated\n cef_request_context_handler_t, if any.\n"]
20886 pub get_resource_request_handler: ::std::option::Option<
20887 unsafe extern "C" fn(
20888 self_: *mut _cef_request_handler_t,
20889 browser: *mut _cef_browser_t,
20890 frame: *mut _cef_frame_t,
20891 request: *mut _cef_request_t,
20892 is_navigation: ::std::os::raw::c_int,
20893 is_download: ::std::os::raw::c_int,
20894 request_initiator: *const cef_string_t,
20895 disable_default_handling: *mut ::std::os::raw::c_int,
20896 ) -> *mut _cef_resource_request_handler_t,
20897 >,
20898 #[doc = "\n Called on the IO thread when the browser needs credentials from the user.\n |origin_url| is the origin making this authentication request. |isProxy|\n indicates whether the host is a proxy server. |host| contains the hostname\n and |port| contains the port number. |realm| is the realm of the challenge\n and may be NULL. |scheme| is the authentication scheme used, such as\n \"basic\" or \"digest\", and will be NULL if the source of the request is an\n FTP server. Return true (1) to continue the request and call\n cef_auth_callback_t::cont() either in this function or at a later time\n when the authentication information is available. Return false (0) to\n cancel the request immediately.\n"]
20899 pub get_auth_credentials: ::std::option::Option<
20900 unsafe extern "C" fn(
20901 self_: *mut _cef_request_handler_t,
20902 browser: *mut _cef_browser_t,
20903 origin_url: *const cef_string_t,
20904 isProxy: ::std::os::raw::c_int,
20905 host: *const cef_string_t,
20906 port: ::std::os::raw::c_int,
20907 realm: *const cef_string_t,
20908 scheme: *const cef_string_t,
20909 callback: *mut _cef_auth_callback_t,
20910 ) -> ::std::os::raw::c_int,
20911 >,
20912 #[doc = "\n Called on the UI thread to handle requests for URLs with an invalid SSL\n certificate. Return true (1) and call cef_callback_t functions either in\n this function or at a later time to continue or cancel the request. Return\n false (0) to cancel the request immediately. If\n cef_settings_t.ignore_certificate_errors is set all invalid certificates\n will be accepted without calling this function.\n"]
20913 pub on_certificate_error: ::std::option::Option<
20914 unsafe extern "C" fn(
20915 self_: *mut _cef_request_handler_t,
20916 browser: *mut _cef_browser_t,
20917 cert_error: cef_errorcode_t,
20918 request_url: *const cef_string_t,
20919 ssl_info: *mut _cef_sslinfo_t,
20920 callback: *mut _cef_callback_t,
20921 ) -> ::std::os::raw::c_int,
20922 >,
20923 #[doc = "\n Called on the UI thread when a client certificate is being requested for\n authentication. Return false (0) to use the default behavior and\n automatically select the first certificate available. Return true (1) and\n call cef_select_client_certificate_callback_t::Select either in this\n function or at a later time to select a certificate. Do not call Select or\n call it with NULL to continue without using any certificate. |isProxy|\n indicates whether the host is an HTTPS proxy or the origin server. |host|\n and |port| contains the hostname and port of the SSL server.\n |certificates| is the list of certificates to choose from; this list has\n already been pruned by Chromium so that it only contains certificates from\n issuers that the server trusts.\n"]
20924 pub on_select_client_certificate: ::std::option::Option<
20925 unsafe extern "C" fn(
20926 self_: *mut _cef_request_handler_t,
20927 browser: *mut _cef_browser_t,
20928 isProxy: ::std::os::raw::c_int,
20929 host: *const cef_string_t,
20930 port: ::std::os::raw::c_int,
20931 certificatesCount: usize,
20932 certificates: *const *mut _cef_x509certificate_t,
20933 callback: *mut _cef_select_client_certificate_callback_t,
20934 ) -> ::std::os::raw::c_int,
20935 >,
20936 #[doc = "\n Called on the browser process UI thread when the render view associated\n with |browser| is ready to receive/handle IPC messages in the render\n process.\n"]
20937 pub on_render_view_ready: ::std::option::Option<
20938 unsafe extern "C" fn(self_: *mut _cef_request_handler_t, browser: *mut _cef_browser_t),
20939 >,
20940 #[doc = "\n Called on the browser process UI thread when the render process terminates\n unexpectedly. |status| indicates how the process terminated.\n"]
20941 pub on_render_process_terminated: ::std::option::Option<
20942 unsafe extern "C" fn(
20943 self_: *mut _cef_request_handler_t,
20944 browser: *mut _cef_browser_t,
20945 status: cef_termination_status_t,
20946 ),
20947 >,
20948 #[doc = "\n Called on the browser process UI thread when the window.document object of\n the main frame has been created.\n"]
20949 pub on_document_available_in_main_frame: ::std::option::Option<
20950 unsafe extern "C" fn(self_: *mut _cef_request_handler_t, browser: *mut _cef_browser_t),
20951 >,
20952}
20953#[test]
20954fn bindgen_test_layout__cef_request_handler_t() {
20955 const UNINIT: ::std::mem::MaybeUninit<_cef_request_handler_t> =
20956 ::std::mem::MaybeUninit::uninit();
20957 let ptr = UNINIT.as_ptr();
20958 assert_eq!(
20959 ::std::mem::size_of::<_cef_request_handler_t>(),
20960 112usize,
20961 concat!("Size of: ", stringify!(_cef_request_handler_t))
20962 );
20963 assert_eq!(
20964 ::std::mem::align_of::<_cef_request_handler_t>(),
20965 8usize,
20966 concat!("Alignment of ", stringify!(_cef_request_handler_t))
20967 );
20968 assert_eq!(
20969 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
20970 0usize,
20971 concat!(
20972 "Offset of field: ",
20973 stringify!(_cef_request_handler_t),
20974 "::",
20975 stringify!(base)
20976 )
20977 );
20978 assert_eq!(
20979 unsafe { ::std::ptr::addr_of!((*ptr).on_before_browse) as usize - ptr as usize },
20980 40usize,
20981 concat!(
20982 "Offset of field: ",
20983 stringify!(_cef_request_handler_t),
20984 "::",
20985 stringify!(on_before_browse)
20986 )
20987 );
20988 assert_eq!(
20989 unsafe { ::std::ptr::addr_of!((*ptr).on_open_urlfrom_tab) as usize - ptr as usize },
20990 48usize,
20991 concat!(
20992 "Offset of field: ",
20993 stringify!(_cef_request_handler_t),
20994 "::",
20995 stringify!(on_open_urlfrom_tab)
20996 )
20997 );
20998 assert_eq!(
20999 unsafe {
21000 ::std::ptr::addr_of!((*ptr).get_resource_request_handler) as usize - ptr as usize
21001 },
21002 56usize,
21003 concat!(
21004 "Offset of field: ",
21005 stringify!(_cef_request_handler_t),
21006 "::",
21007 stringify!(get_resource_request_handler)
21008 )
21009 );
21010 assert_eq!(
21011 unsafe { ::std::ptr::addr_of!((*ptr).get_auth_credentials) as usize - ptr as usize },
21012 64usize,
21013 concat!(
21014 "Offset of field: ",
21015 stringify!(_cef_request_handler_t),
21016 "::",
21017 stringify!(get_auth_credentials)
21018 )
21019 );
21020 assert_eq!(
21021 unsafe { ::std::ptr::addr_of!((*ptr).on_certificate_error) as usize - ptr as usize },
21022 72usize,
21023 concat!(
21024 "Offset of field: ",
21025 stringify!(_cef_request_handler_t),
21026 "::",
21027 stringify!(on_certificate_error)
21028 )
21029 );
21030 assert_eq!(
21031 unsafe {
21032 ::std::ptr::addr_of!((*ptr).on_select_client_certificate) as usize - ptr as usize
21033 },
21034 80usize,
21035 concat!(
21036 "Offset of field: ",
21037 stringify!(_cef_request_handler_t),
21038 "::",
21039 stringify!(on_select_client_certificate)
21040 )
21041 );
21042 assert_eq!(
21043 unsafe { ::std::ptr::addr_of!((*ptr).on_render_view_ready) as usize - ptr as usize },
21044 88usize,
21045 concat!(
21046 "Offset of field: ",
21047 stringify!(_cef_request_handler_t),
21048 "::",
21049 stringify!(on_render_view_ready)
21050 )
21051 );
21052 assert_eq!(
21053 unsafe {
21054 ::std::ptr::addr_of!((*ptr).on_render_process_terminated) as usize - ptr as usize
21055 },
21056 96usize,
21057 concat!(
21058 "Offset of field: ",
21059 stringify!(_cef_request_handler_t),
21060 "::",
21061 stringify!(on_render_process_terminated)
21062 )
21063 );
21064 assert_eq!(
21065 unsafe {
21066 ::std::ptr::addr_of!((*ptr).on_document_available_in_main_frame) as usize - ptr as usize
21067 },
21068 104usize,
21069 concat!(
21070 "Offset of field: ",
21071 stringify!(_cef_request_handler_t),
21072 "::",
21073 stringify!(on_document_available_in_main_frame)
21074 )
21075 );
21076}
21077#[doc = "\n Implement this structure to handle events related to browser requests. The\n functions of this structure will be called on the thread indicated.\n"]
21078pub type cef_request_handler_t = _cef_request_handler_t;
21079#[doc = "\n Implement this structure to provide handler implementations.\n"]
21080#[repr(C)]
21081#[derive(Debug, Copy, Clone)]
21082pub struct _cef_client_t {
21083 #[doc = "\n Base structure.\n"]
21084 pub base: cef_base_ref_counted_t,
21085 #[doc = "\n Return the handler for audio rendering events.\n"]
21086 pub get_audio_handler: ::std::option::Option<
21087 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_audio_handler_t,
21088 >,
21089 #[doc = "\n Return the handler for commands. If no handler is provided the default\n implementation will be used.\n"]
21090 pub get_command_handler: ::std::option::Option<
21091 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_command_handler_t,
21092 >,
21093 #[doc = "\n Return the handler for context menus. If no handler is provided the\n default implementation will be used.\n"]
21094 pub get_context_menu_handler: ::std::option::Option<
21095 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_context_menu_handler_t,
21096 >,
21097 #[doc = "\n Return the handler for dialogs. If no handler is provided the default\n implementation will be used.\n"]
21098 pub get_dialog_handler: ::std::option::Option<
21099 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_dialog_handler_t,
21100 >,
21101 #[doc = "\n Return the handler for browser display state events.\n"]
21102 pub get_display_handler: ::std::option::Option<
21103 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_display_handler_t,
21104 >,
21105 #[doc = "\n Return the handler for download events. If no handler is returned\n downloads will not be allowed.\n"]
21106 pub get_download_handler: ::std::option::Option<
21107 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_download_handler_t,
21108 >,
21109 #[doc = "\n Return the handler for drag events.\n"]
21110 pub get_drag_handler: ::std::option::Option<
21111 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_drag_handler_t,
21112 >,
21113 #[doc = "\n Return the handler for find result events.\n"]
21114 pub get_find_handler: ::std::option::Option<
21115 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_find_handler_t,
21116 >,
21117 #[doc = "\n Return the handler for focus events.\n"]
21118 pub get_focus_handler: ::std::option::Option<
21119 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_focus_handler_t,
21120 >,
21121 #[doc = "\n Return the handler for events related to cef_frame_t lifespan. This\n function will be called once during cef_browser_t creation and the result\n will be cached for performance reasons.\n"]
21122 pub get_frame_handler: ::std::option::Option<
21123 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_frame_handler_t,
21124 >,
21125 #[doc = "\n Return the handler for permission requests.\n"]
21126 pub get_permission_handler: ::std::option::Option<
21127 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_permission_handler_t,
21128 >,
21129 #[doc = "\n Return the handler for JavaScript dialogs. If no handler is provided the\n default implementation will be used.\n"]
21130 pub get_jsdialog_handler: ::std::option::Option<
21131 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_jsdialog_handler_t,
21132 >,
21133 #[doc = "\n Return the handler for keyboard events.\n"]
21134 pub get_keyboard_handler: ::std::option::Option<
21135 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_keyboard_handler_t,
21136 >,
21137 #[doc = "\n Return the handler for browser life span events.\n"]
21138 pub get_life_span_handler: ::std::option::Option<
21139 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_life_span_handler_t,
21140 >,
21141 #[doc = "\n Return the handler for browser load status events.\n"]
21142 pub get_load_handler: ::std::option::Option<
21143 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_load_handler_t,
21144 >,
21145 #[doc = "\n Return the handler for printing on Linux. If a print handler is not\n provided then printing will not be supported on the Linux platform.\n"]
21146 pub get_print_handler: ::std::option::Option<
21147 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_print_handler_t,
21148 >,
21149 #[doc = "\n Return the handler for off-screen rendering events.\n"]
21150 pub get_render_handler: ::std::option::Option<
21151 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_render_handler_t,
21152 >,
21153 #[doc = "\n Return the handler for browser request events.\n"]
21154 pub get_request_handler: ::std::option::Option<
21155 unsafe extern "C" fn(self_: *mut _cef_client_t) -> *mut _cef_request_handler_t,
21156 >,
21157 #[doc = "\n Called when a new message is received from a different process. Return\n true (1) if the message was handled or false (0) otherwise. It is safe to\n keep a reference to |message| outside of this callback.\n"]
21158 pub on_process_message_received: ::std::option::Option<
21159 unsafe extern "C" fn(
21160 self_: *mut _cef_client_t,
21161 browser: *mut _cef_browser_t,
21162 frame: *mut _cef_frame_t,
21163 source_process: cef_process_id_t,
21164 message: *mut _cef_process_message_t,
21165 ) -> ::std::os::raw::c_int,
21166 >,
21167}
21168#[test]
21169fn bindgen_test_layout__cef_client_t() {
21170 const UNINIT: ::std::mem::MaybeUninit<_cef_client_t> = ::std::mem::MaybeUninit::uninit();
21171 let ptr = UNINIT.as_ptr();
21172 assert_eq!(
21173 ::std::mem::size_of::<_cef_client_t>(),
21174 192usize,
21175 concat!("Size of: ", stringify!(_cef_client_t))
21176 );
21177 assert_eq!(
21178 ::std::mem::align_of::<_cef_client_t>(),
21179 8usize,
21180 concat!("Alignment of ", stringify!(_cef_client_t))
21181 );
21182 assert_eq!(
21183 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
21184 0usize,
21185 concat!(
21186 "Offset of field: ",
21187 stringify!(_cef_client_t),
21188 "::",
21189 stringify!(base)
21190 )
21191 );
21192 assert_eq!(
21193 unsafe { ::std::ptr::addr_of!((*ptr).get_audio_handler) as usize - ptr as usize },
21194 40usize,
21195 concat!(
21196 "Offset of field: ",
21197 stringify!(_cef_client_t),
21198 "::",
21199 stringify!(get_audio_handler)
21200 )
21201 );
21202 assert_eq!(
21203 unsafe { ::std::ptr::addr_of!((*ptr).get_command_handler) as usize - ptr as usize },
21204 48usize,
21205 concat!(
21206 "Offset of field: ",
21207 stringify!(_cef_client_t),
21208 "::",
21209 stringify!(get_command_handler)
21210 )
21211 );
21212 assert_eq!(
21213 unsafe { ::std::ptr::addr_of!((*ptr).get_context_menu_handler) as usize - ptr as usize },
21214 56usize,
21215 concat!(
21216 "Offset of field: ",
21217 stringify!(_cef_client_t),
21218 "::",
21219 stringify!(get_context_menu_handler)
21220 )
21221 );
21222 assert_eq!(
21223 unsafe { ::std::ptr::addr_of!((*ptr).get_dialog_handler) as usize - ptr as usize },
21224 64usize,
21225 concat!(
21226 "Offset of field: ",
21227 stringify!(_cef_client_t),
21228 "::",
21229 stringify!(get_dialog_handler)
21230 )
21231 );
21232 assert_eq!(
21233 unsafe { ::std::ptr::addr_of!((*ptr).get_display_handler) as usize - ptr as usize },
21234 72usize,
21235 concat!(
21236 "Offset of field: ",
21237 stringify!(_cef_client_t),
21238 "::",
21239 stringify!(get_display_handler)
21240 )
21241 );
21242 assert_eq!(
21243 unsafe { ::std::ptr::addr_of!((*ptr).get_download_handler) as usize - ptr as usize },
21244 80usize,
21245 concat!(
21246 "Offset of field: ",
21247 stringify!(_cef_client_t),
21248 "::",
21249 stringify!(get_download_handler)
21250 )
21251 );
21252 assert_eq!(
21253 unsafe { ::std::ptr::addr_of!((*ptr).get_drag_handler) as usize - ptr as usize },
21254 88usize,
21255 concat!(
21256 "Offset of field: ",
21257 stringify!(_cef_client_t),
21258 "::",
21259 stringify!(get_drag_handler)
21260 )
21261 );
21262 assert_eq!(
21263 unsafe { ::std::ptr::addr_of!((*ptr).get_find_handler) as usize - ptr as usize },
21264 96usize,
21265 concat!(
21266 "Offset of field: ",
21267 stringify!(_cef_client_t),
21268 "::",
21269 stringify!(get_find_handler)
21270 )
21271 );
21272 assert_eq!(
21273 unsafe { ::std::ptr::addr_of!((*ptr).get_focus_handler) as usize - ptr as usize },
21274 104usize,
21275 concat!(
21276 "Offset of field: ",
21277 stringify!(_cef_client_t),
21278 "::",
21279 stringify!(get_focus_handler)
21280 )
21281 );
21282 assert_eq!(
21283 unsafe { ::std::ptr::addr_of!((*ptr).get_frame_handler) as usize - ptr as usize },
21284 112usize,
21285 concat!(
21286 "Offset of field: ",
21287 stringify!(_cef_client_t),
21288 "::",
21289 stringify!(get_frame_handler)
21290 )
21291 );
21292 assert_eq!(
21293 unsafe { ::std::ptr::addr_of!((*ptr).get_permission_handler) as usize - ptr as usize },
21294 120usize,
21295 concat!(
21296 "Offset of field: ",
21297 stringify!(_cef_client_t),
21298 "::",
21299 stringify!(get_permission_handler)
21300 )
21301 );
21302 assert_eq!(
21303 unsafe { ::std::ptr::addr_of!((*ptr).get_jsdialog_handler) as usize - ptr as usize },
21304 128usize,
21305 concat!(
21306 "Offset of field: ",
21307 stringify!(_cef_client_t),
21308 "::",
21309 stringify!(get_jsdialog_handler)
21310 )
21311 );
21312 assert_eq!(
21313 unsafe { ::std::ptr::addr_of!((*ptr).get_keyboard_handler) as usize - ptr as usize },
21314 136usize,
21315 concat!(
21316 "Offset of field: ",
21317 stringify!(_cef_client_t),
21318 "::",
21319 stringify!(get_keyboard_handler)
21320 )
21321 );
21322 assert_eq!(
21323 unsafe { ::std::ptr::addr_of!((*ptr).get_life_span_handler) as usize - ptr as usize },
21324 144usize,
21325 concat!(
21326 "Offset of field: ",
21327 stringify!(_cef_client_t),
21328 "::",
21329 stringify!(get_life_span_handler)
21330 )
21331 );
21332 assert_eq!(
21333 unsafe { ::std::ptr::addr_of!((*ptr).get_load_handler) as usize - ptr as usize },
21334 152usize,
21335 concat!(
21336 "Offset of field: ",
21337 stringify!(_cef_client_t),
21338 "::",
21339 stringify!(get_load_handler)
21340 )
21341 );
21342 assert_eq!(
21343 unsafe { ::std::ptr::addr_of!((*ptr).get_print_handler) as usize - ptr as usize },
21344 160usize,
21345 concat!(
21346 "Offset of field: ",
21347 stringify!(_cef_client_t),
21348 "::",
21349 stringify!(get_print_handler)
21350 )
21351 );
21352 assert_eq!(
21353 unsafe { ::std::ptr::addr_of!((*ptr).get_render_handler) as usize - ptr as usize },
21354 168usize,
21355 concat!(
21356 "Offset of field: ",
21357 stringify!(_cef_client_t),
21358 "::",
21359 stringify!(get_render_handler)
21360 )
21361 );
21362 assert_eq!(
21363 unsafe { ::std::ptr::addr_of!((*ptr).get_request_handler) as usize - ptr as usize },
21364 176usize,
21365 concat!(
21366 "Offset of field: ",
21367 stringify!(_cef_client_t),
21368 "::",
21369 stringify!(get_request_handler)
21370 )
21371 );
21372 assert_eq!(
21373 unsafe { ::std::ptr::addr_of!((*ptr).on_process_message_received) as usize - ptr as usize },
21374 184usize,
21375 concat!(
21376 "Offset of field: ",
21377 stringify!(_cef_client_t),
21378 "::",
21379 stringify!(on_process_message_received)
21380 )
21381 );
21382}
21383#[doc = "\n Implement this structure to provide handler implementations.\n"]
21384pub type cef_client_t = _cef_client_t;
21385#[doc = "\n Structure used to create and/or parse command line arguments. Arguments with\n \"--\", \"-\" and, on Windows, \"/\" prefixes are considered switches. Switches\n will always precede any arguments without switch prefixes. Switches can\n optionally have a value specified using the \"=\" delimiter (e.g.\n \"-switch=value\"). An argument of \"--\" will terminate switch parsing with all\n subsequent tokens, regardless of prefix, being interpreted as non-switch\n arguments. Switch names should be lowercase ASCII and will be converted to\n such if necessary. Switch values will retain the original case and UTF8\n encoding. This structure can be used before cef_initialize() is called.\n"]
21386#[repr(C)]
21387#[derive(Debug, Copy, Clone)]
21388pub struct _cef_command_line_t {
21389 #[doc = "\n Base structure.\n"]
21390 pub base: cef_base_ref_counted_t,
21391 #[doc = "\n Returns true (1) if this object is valid. Do not call any other functions\n if this function returns false (0).\n"]
21392 pub is_valid: ::std::option::Option<
21393 unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> ::std::os::raw::c_int,
21394 >,
21395 #[doc = "\n Returns true (1) if the values of this object are read-only. Some APIs may\n expose read-only objects.\n"]
21396 pub is_read_only: ::std::option::Option<
21397 unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> ::std::os::raw::c_int,
21398 >,
21399 #[doc = "\n Returns a writable copy of this object.\n"]
21400 pub copy: ::std::option::Option<
21401 unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> *mut _cef_command_line_t,
21402 >,
21403 #[doc = "\n Initialize the command line with the specified |argc| and |argv| values.\n The first argument must be the name of the program. This function is only\n supported on non-Windows platforms.\n"]
21404 pub init_from_argv: ::std::option::Option<
21405 unsafe extern "C" fn(
21406 self_: *mut _cef_command_line_t,
21407 argc: ::std::os::raw::c_int,
21408 argv: *const *const ::std::os::raw::c_char,
21409 ),
21410 >,
21411 #[doc = "\n Initialize the command line with the string returned by calling\n GetCommandLineW(). This function is only supported on Windows.\n"]
21412 pub init_from_string: ::std::option::Option<
21413 unsafe extern "C" fn(self_: *mut _cef_command_line_t, command_line: *const cef_string_t),
21414 >,
21415 #[doc = "\n Reset the command-line switches and arguments but leave the program\n component unchanged.\n"]
21416 pub reset: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t)>,
21417 #[doc = "\n Retrieve the original command line string as a vector of strings. The argv\n array: `{ program, [(--|-|/)switch[=value]]*, [--], [argument]* }`\n"]
21418 pub get_argv: ::std::option::Option<
21419 unsafe extern "C" fn(self_: *mut _cef_command_line_t, argv: cef_string_list_t),
21420 >,
21421 #[doc = "\n Constructs and returns the represented command line string. Use this\n function cautiously because quoting behavior is unclear.\n"]
21422 pub get_command_line_string: ::std::option::Option<
21423 unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> cef_string_userfree_t,
21424 >,
21425 #[doc = "\n Get the program part of the command line string (the first item).\n"]
21426 pub get_program: ::std::option::Option<
21427 unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> cef_string_userfree_t,
21428 >,
21429 #[doc = "\n Set the program part of the command line string (the first item).\n"]
21430 pub set_program: ::std::option::Option<
21431 unsafe extern "C" fn(self_: *mut _cef_command_line_t, program: *const cef_string_t),
21432 >,
21433 #[doc = "\n Returns true (1) if the command line has switches.\n"]
21434 pub has_switches: ::std::option::Option<
21435 unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> ::std::os::raw::c_int,
21436 >,
21437 #[doc = "\n Returns true (1) if the command line contains the given switch.\n"]
21438 pub has_switch: ::std::option::Option<
21439 unsafe extern "C" fn(
21440 self_: *mut _cef_command_line_t,
21441 name: *const cef_string_t,
21442 ) -> ::std::os::raw::c_int,
21443 >,
21444 #[doc = "\n Returns the value associated with the given switch. If the switch has no\n value or isn't present this function returns the NULL string.\n"]
21445 pub get_switch_value: ::std::option::Option<
21446 unsafe extern "C" fn(
21447 self_: *mut _cef_command_line_t,
21448 name: *const cef_string_t,
21449 ) -> cef_string_userfree_t,
21450 >,
21451 #[doc = "\n Returns the map of switch names and values. If a switch has no value an\n NULL string is returned.\n"]
21452 pub get_switches: ::std::option::Option<
21453 unsafe extern "C" fn(self_: *mut _cef_command_line_t, switches: cef_string_map_t),
21454 >,
21455 #[doc = "\n Add a switch to the end of the command line.\n"]
21456 pub append_switch: ::std::option::Option<
21457 unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t),
21458 >,
21459 #[doc = "\n Add a switch with the specified value to the end of the command line. If\n the switch has no value pass an NULL value string.\n"]
21460 pub append_switch_with_value: ::std::option::Option<
21461 unsafe extern "C" fn(
21462 self_: *mut _cef_command_line_t,
21463 name: *const cef_string_t,
21464 value: *const cef_string_t,
21465 ),
21466 >,
21467 #[doc = "\n True if there are remaining command line arguments.\n"]
21468 pub has_arguments: ::std::option::Option<
21469 unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> ::std::os::raw::c_int,
21470 >,
21471 #[doc = "\n Get the remaining command line arguments.\n"]
21472 pub get_arguments: ::std::option::Option<
21473 unsafe extern "C" fn(self_: *mut _cef_command_line_t, arguments: cef_string_list_t),
21474 >,
21475 #[doc = "\n Add an argument to the end of the command line.\n"]
21476 pub append_argument: ::std::option::Option<
21477 unsafe extern "C" fn(self_: *mut _cef_command_line_t, argument: *const cef_string_t),
21478 >,
21479 #[doc = "\n Insert a command before the current command. Common for debuggers, like\n \"valgrind\" or \"gdb --args\".\n"]
21480 pub prepend_wrapper: ::std::option::Option<
21481 unsafe extern "C" fn(self_: *mut _cef_command_line_t, wrapper: *const cef_string_t),
21482 >,
21483}
21484#[test]
21485fn bindgen_test_layout__cef_command_line_t() {
21486 const UNINIT: ::std::mem::MaybeUninit<_cef_command_line_t> = ::std::mem::MaybeUninit::uninit();
21487 let ptr = UNINIT.as_ptr();
21488 assert_eq!(
21489 ::std::mem::size_of::<_cef_command_line_t>(),
21490 200usize,
21491 concat!("Size of: ", stringify!(_cef_command_line_t))
21492 );
21493 assert_eq!(
21494 ::std::mem::align_of::<_cef_command_line_t>(),
21495 8usize,
21496 concat!("Alignment of ", stringify!(_cef_command_line_t))
21497 );
21498 assert_eq!(
21499 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
21500 0usize,
21501 concat!(
21502 "Offset of field: ",
21503 stringify!(_cef_command_line_t),
21504 "::",
21505 stringify!(base)
21506 )
21507 );
21508 assert_eq!(
21509 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
21510 40usize,
21511 concat!(
21512 "Offset of field: ",
21513 stringify!(_cef_command_line_t),
21514 "::",
21515 stringify!(is_valid)
21516 )
21517 );
21518 assert_eq!(
21519 unsafe { ::std::ptr::addr_of!((*ptr).is_read_only) as usize - ptr as usize },
21520 48usize,
21521 concat!(
21522 "Offset of field: ",
21523 stringify!(_cef_command_line_t),
21524 "::",
21525 stringify!(is_read_only)
21526 )
21527 );
21528 assert_eq!(
21529 unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize },
21530 56usize,
21531 concat!(
21532 "Offset of field: ",
21533 stringify!(_cef_command_line_t),
21534 "::",
21535 stringify!(copy)
21536 )
21537 );
21538 assert_eq!(
21539 unsafe { ::std::ptr::addr_of!((*ptr).init_from_argv) as usize - ptr as usize },
21540 64usize,
21541 concat!(
21542 "Offset of field: ",
21543 stringify!(_cef_command_line_t),
21544 "::",
21545 stringify!(init_from_argv)
21546 )
21547 );
21548 assert_eq!(
21549 unsafe { ::std::ptr::addr_of!((*ptr).init_from_string) as usize - ptr as usize },
21550 72usize,
21551 concat!(
21552 "Offset of field: ",
21553 stringify!(_cef_command_line_t),
21554 "::",
21555 stringify!(init_from_string)
21556 )
21557 );
21558 assert_eq!(
21559 unsafe { ::std::ptr::addr_of!((*ptr).reset) as usize - ptr as usize },
21560 80usize,
21561 concat!(
21562 "Offset of field: ",
21563 stringify!(_cef_command_line_t),
21564 "::",
21565 stringify!(reset)
21566 )
21567 );
21568 assert_eq!(
21569 unsafe { ::std::ptr::addr_of!((*ptr).get_argv) as usize - ptr as usize },
21570 88usize,
21571 concat!(
21572 "Offset of field: ",
21573 stringify!(_cef_command_line_t),
21574 "::",
21575 stringify!(get_argv)
21576 )
21577 );
21578 assert_eq!(
21579 unsafe { ::std::ptr::addr_of!((*ptr).get_command_line_string) as usize - ptr as usize },
21580 96usize,
21581 concat!(
21582 "Offset of field: ",
21583 stringify!(_cef_command_line_t),
21584 "::",
21585 stringify!(get_command_line_string)
21586 )
21587 );
21588 assert_eq!(
21589 unsafe { ::std::ptr::addr_of!((*ptr).get_program) as usize - ptr as usize },
21590 104usize,
21591 concat!(
21592 "Offset of field: ",
21593 stringify!(_cef_command_line_t),
21594 "::",
21595 stringify!(get_program)
21596 )
21597 );
21598 assert_eq!(
21599 unsafe { ::std::ptr::addr_of!((*ptr).set_program) as usize - ptr as usize },
21600 112usize,
21601 concat!(
21602 "Offset of field: ",
21603 stringify!(_cef_command_line_t),
21604 "::",
21605 stringify!(set_program)
21606 )
21607 );
21608 assert_eq!(
21609 unsafe { ::std::ptr::addr_of!((*ptr).has_switches) as usize - ptr as usize },
21610 120usize,
21611 concat!(
21612 "Offset of field: ",
21613 stringify!(_cef_command_line_t),
21614 "::",
21615 stringify!(has_switches)
21616 )
21617 );
21618 assert_eq!(
21619 unsafe { ::std::ptr::addr_of!((*ptr).has_switch) as usize - ptr as usize },
21620 128usize,
21621 concat!(
21622 "Offset of field: ",
21623 stringify!(_cef_command_line_t),
21624 "::",
21625 stringify!(has_switch)
21626 )
21627 );
21628 assert_eq!(
21629 unsafe { ::std::ptr::addr_of!((*ptr).get_switch_value) as usize - ptr as usize },
21630 136usize,
21631 concat!(
21632 "Offset of field: ",
21633 stringify!(_cef_command_line_t),
21634 "::",
21635 stringify!(get_switch_value)
21636 )
21637 );
21638 assert_eq!(
21639 unsafe { ::std::ptr::addr_of!((*ptr).get_switches) as usize - ptr as usize },
21640 144usize,
21641 concat!(
21642 "Offset of field: ",
21643 stringify!(_cef_command_line_t),
21644 "::",
21645 stringify!(get_switches)
21646 )
21647 );
21648 assert_eq!(
21649 unsafe { ::std::ptr::addr_of!((*ptr).append_switch) as usize - ptr as usize },
21650 152usize,
21651 concat!(
21652 "Offset of field: ",
21653 stringify!(_cef_command_line_t),
21654 "::",
21655 stringify!(append_switch)
21656 )
21657 );
21658 assert_eq!(
21659 unsafe { ::std::ptr::addr_of!((*ptr).append_switch_with_value) as usize - ptr as usize },
21660 160usize,
21661 concat!(
21662 "Offset of field: ",
21663 stringify!(_cef_command_line_t),
21664 "::",
21665 stringify!(append_switch_with_value)
21666 )
21667 );
21668 assert_eq!(
21669 unsafe { ::std::ptr::addr_of!((*ptr).has_arguments) as usize - ptr as usize },
21670 168usize,
21671 concat!(
21672 "Offset of field: ",
21673 stringify!(_cef_command_line_t),
21674 "::",
21675 stringify!(has_arguments)
21676 )
21677 );
21678 assert_eq!(
21679 unsafe { ::std::ptr::addr_of!((*ptr).get_arguments) as usize - ptr as usize },
21680 176usize,
21681 concat!(
21682 "Offset of field: ",
21683 stringify!(_cef_command_line_t),
21684 "::",
21685 stringify!(get_arguments)
21686 )
21687 );
21688 assert_eq!(
21689 unsafe { ::std::ptr::addr_of!((*ptr).append_argument) as usize - ptr as usize },
21690 184usize,
21691 concat!(
21692 "Offset of field: ",
21693 stringify!(_cef_command_line_t),
21694 "::",
21695 stringify!(append_argument)
21696 )
21697 );
21698 assert_eq!(
21699 unsafe { ::std::ptr::addr_of!((*ptr).prepend_wrapper) as usize - ptr as usize },
21700 192usize,
21701 concat!(
21702 "Offset of field: ",
21703 stringify!(_cef_command_line_t),
21704 "::",
21705 stringify!(prepend_wrapper)
21706 )
21707 );
21708}
21709#[doc = "\n Structure used to create and/or parse command line arguments. Arguments with\n \"--\", \"-\" and, on Windows, \"/\" prefixes are considered switches. Switches\n will always precede any arguments without switch prefixes. Switches can\n optionally have a value specified using the \"=\" delimiter (e.g.\n \"-switch=value\"). An argument of \"--\" will terminate switch parsing with all\n subsequent tokens, regardless of prefix, being interpreted as non-switch\n arguments. Switch names should be lowercase ASCII and will be converted to\n such if necessary. Switch values will retain the original case and UTF8\n encoding. This structure can be used before cef_initialize() is called.\n"]
21710pub type cef_command_line_t = _cef_command_line_t;
21711extern "C" {
21712 #[doc = "\n Create a new cef_command_line_t instance.\n"]
21713 pub fn cef_command_line_create() -> *mut cef_command_line_t;
21714}
21715extern "C" {
21716 #[doc = "\n Returns the singleton global cef_command_line_t object. The returned object\n will be read-only.\n"]
21717 pub fn cef_command_line_get_global() -> *mut cef_command_line_t;
21718}
21719#[doc = "\n Structure used to implement browser process callbacks. The functions of this\n structure will be called on the browser process main thread unless otherwise\n indicated.\n"]
21720#[repr(C)]
21721#[derive(Debug, Copy, Clone)]
21722pub struct _cef_browser_process_handler_t {
21723 #[doc = "\n Base structure.\n"]
21724 pub base: cef_base_ref_counted_t,
21725 #[doc = "\n Provides an opportunity to register custom preferences prior to global and\n request context initialization.\n\n If |type| is CEF_PREFERENCES_TYPE_GLOBAL the registered preferences can be\n accessed via cef_preference_manager_t::GetGlobalPreferences after\n OnContextInitialized is called. Global preferences are registered a single\n time at application startup. See related cef_settings_t.cache_path and\n cef_settings_t.persist_user_preferences configuration.\n\n If |type| is CEF_PREFERENCES_TYPE_REQUEST_CONTEXT the preferences can be\n accessed via the cef_request_context_t after\n cef_request_context_handler_t::OnRequestContextInitialized is called.\n Request context preferences are registered each time a new\n cef_request_context_t is created. It is intended but not required that all\n request contexts have the same registered preferences. See related\n cef_request_context_settings_t.cache_path and\n cef_request_context_settings_t.persist_user_preferences configuration.\n\n Do not keep a reference to the |registrar| object. This function is called\n on the browser process UI thread.\n"]
21726 pub on_register_custom_preferences: ::std::option::Option<
21727 unsafe extern "C" fn(
21728 self_: *mut _cef_browser_process_handler_t,
21729 type_: cef_preferences_type_t,
21730 registrar: *mut _cef_preference_registrar_t,
21731 ),
21732 >,
21733 #[doc = "\n Called on the browser process UI thread immediately after the CEF context\n has been initialized.\n"]
21734 pub on_context_initialized:
21735 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_browser_process_handler_t)>,
21736 #[doc = "\n Called before a child process is launched. Will be called on the browser\n process UI thread when launching a render process and on the browser\n process IO thread when launching a GPU process. Provides an opportunity to\n modify the child process command line. Do not keep a reference to\n |command_line| outside of this function.\n"]
21737 pub on_before_child_process_launch: ::std::option::Option<
21738 unsafe extern "C" fn(
21739 self_: *mut _cef_browser_process_handler_t,
21740 command_line: *mut _cef_command_line_t,
21741 ),
21742 >,
21743 #[doc = "\n Called from any thread when work has been scheduled for the browser\n process main (UI) thread. This callback is used in combination with\n cef_settings_t.external_message_pump and cef_do_message_loop_work() in\n cases where the CEF message loop must be integrated into an existing\n application message loop (see additional comments and warnings on\n CefDoMessageLoopWork). This callback should schedule a\n cef_do_message_loop_work() call to happen on the main (UI) thread.\n |delay_ms| is the requested delay in milliseconds. If |delay_ms| is <= 0\n then the call should happen reasonably soon. If |delay_ms| is > 0 then the\n call should be scheduled to happen after the specified delay and any\n currently pending scheduled call should be cancelled.\n"]
21744 pub on_schedule_message_pump_work: ::std::option::Option<
21745 unsafe extern "C" fn(self_: *mut _cef_browser_process_handler_t, delay_ms: i64),
21746 >,
21747 #[doc = "\n Return the default client for use with a newly created browser window. If\n null is returned the browser will be unmanaged (no callbacks will be\n executed for that browser) and application shutdown will be blocked until\n the browser window is closed manually. This function is currently only\n used with the chrome runtime.\n"]
21748 pub get_default_client: ::std::option::Option<
21749 unsafe extern "C" fn(self_: *mut _cef_browser_process_handler_t) -> *mut _cef_client_t,
21750 >,
21751}
21752#[test]
21753fn bindgen_test_layout__cef_browser_process_handler_t() {
21754 const UNINIT: ::std::mem::MaybeUninit<_cef_browser_process_handler_t> =
21755 ::std::mem::MaybeUninit::uninit();
21756 let ptr = UNINIT.as_ptr();
21757 assert_eq!(
21758 ::std::mem::size_of::<_cef_browser_process_handler_t>(),
21759 80usize,
21760 concat!("Size of: ", stringify!(_cef_browser_process_handler_t))
21761 );
21762 assert_eq!(
21763 ::std::mem::align_of::<_cef_browser_process_handler_t>(),
21764 8usize,
21765 concat!("Alignment of ", stringify!(_cef_browser_process_handler_t))
21766 );
21767 assert_eq!(
21768 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
21769 0usize,
21770 concat!(
21771 "Offset of field: ",
21772 stringify!(_cef_browser_process_handler_t),
21773 "::",
21774 stringify!(base)
21775 )
21776 );
21777 assert_eq!(
21778 unsafe {
21779 ::std::ptr::addr_of!((*ptr).on_register_custom_preferences) as usize - ptr as usize
21780 },
21781 40usize,
21782 concat!(
21783 "Offset of field: ",
21784 stringify!(_cef_browser_process_handler_t),
21785 "::",
21786 stringify!(on_register_custom_preferences)
21787 )
21788 );
21789 assert_eq!(
21790 unsafe { ::std::ptr::addr_of!((*ptr).on_context_initialized) as usize - ptr as usize },
21791 48usize,
21792 concat!(
21793 "Offset of field: ",
21794 stringify!(_cef_browser_process_handler_t),
21795 "::",
21796 stringify!(on_context_initialized)
21797 )
21798 );
21799 assert_eq!(
21800 unsafe {
21801 ::std::ptr::addr_of!((*ptr).on_before_child_process_launch) as usize - ptr as usize
21802 },
21803 56usize,
21804 concat!(
21805 "Offset of field: ",
21806 stringify!(_cef_browser_process_handler_t),
21807 "::",
21808 stringify!(on_before_child_process_launch)
21809 )
21810 );
21811 assert_eq!(
21812 unsafe {
21813 ::std::ptr::addr_of!((*ptr).on_schedule_message_pump_work) as usize - ptr as usize
21814 },
21815 64usize,
21816 concat!(
21817 "Offset of field: ",
21818 stringify!(_cef_browser_process_handler_t),
21819 "::",
21820 stringify!(on_schedule_message_pump_work)
21821 )
21822 );
21823 assert_eq!(
21824 unsafe { ::std::ptr::addr_of!((*ptr).get_default_client) as usize - ptr as usize },
21825 72usize,
21826 concat!(
21827 "Offset of field: ",
21828 stringify!(_cef_browser_process_handler_t),
21829 "::",
21830 stringify!(get_default_client)
21831 )
21832 );
21833}
21834#[doc = "\n Structure used to implement browser process callbacks. The functions of this\n structure will be called on the browser process main thread unless otherwise\n indicated.\n"]
21835pub type cef_browser_process_handler_t = _cef_browser_process_handler_t;
21836#[doc = "\n Implement this structure for asynchronous task execution. If the task is\n posted successfully and if the associated message loop is still running then\n the execute() function will be called on the target thread. If the task\n fails to post then the task object may be destroyed on the source thread\n instead of the target thread. For this reason be cautious when performing\n work in the task object destructor.\n"]
21837#[repr(C)]
21838#[derive(Debug, Copy, Clone)]
21839pub struct _cef_task_t {
21840 #[doc = "\n Base structure.\n"]
21841 pub base: cef_base_ref_counted_t,
21842 #[doc = "\n Method that will be executed on the target thread.\n"]
21843 pub execute: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_task_t)>,
21844}
21845#[test]
21846fn bindgen_test_layout__cef_task_t() {
21847 const UNINIT: ::std::mem::MaybeUninit<_cef_task_t> = ::std::mem::MaybeUninit::uninit();
21848 let ptr = UNINIT.as_ptr();
21849 assert_eq!(
21850 ::std::mem::size_of::<_cef_task_t>(),
21851 48usize,
21852 concat!("Size of: ", stringify!(_cef_task_t))
21853 );
21854 assert_eq!(
21855 ::std::mem::align_of::<_cef_task_t>(),
21856 8usize,
21857 concat!("Alignment of ", stringify!(_cef_task_t))
21858 );
21859 assert_eq!(
21860 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
21861 0usize,
21862 concat!(
21863 "Offset of field: ",
21864 stringify!(_cef_task_t),
21865 "::",
21866 stringify!(base)
21867 )
21868 );
21869 assert_eq!(
21870 unsafe { ::std::ptr::addr_of!((*ptr).execute) as usize - ptr as usize },
21871 40usize,
21872 concat!(
21873 "Offset of field: ",
21874 stringify!(_cef_task_t),
21875 "::",
21876 stringify!(execute)
21877 )
21878 );
21879}
21880#[doc = "\n Implement this structure for asynchronous task execution. If the task is\n posted successfully and if the associated message loop is still running then\n the execute() function will be called on the target thread. If the task\n fails to post then the task object may be destroyed on the source thread\n instead of the target thread. For this reason be cautious when performing\n work in the task object destructor.\n"]
21881pub type cef_task_t = _cef_task_t;
21882#[doc = "\n Structure that asynchronously executes tasks on the associated thread. It is\n safe to call the functions of this structure on any thread.\n\n CEF maintains multiple internal threads that are used for handling different\n types of tasks in different processes. The cef_thread_id_t definitions in\n cef_types.h list the common CEF threads. Task runners are also available for\n other CEF threads as appropriate (for example, V8 WebWorker threads).\n"]
21883#[repr(C)]
21884#[derive(Debug, Copy, Clone)]
21885pub struct _cef_task_runner_t {
21886 #[doc = "\n Base structure.\n"]
21887 pub base: cef_base_ref_counted_t,
21888 #[doc = "\n Returns true (1) if this object is pointing to the same task runner as\n |that| object.\n"]
21889 pub is_same: ::std::option::Option<
21890 unsafe extern "C" fn(
21891 self_: *mut _cef_task_runner_t,
21892 that: *mut _cef_task_runner_t,
21893 ) -> ::std::os::raw::c_int,
21894 >,
21895 #[doc = "\n Returns true (1) if this task runner belongs to the current thread.\n"]
21896 pub belongs_to_current_thread: ::std::option::Option<
21897 unsafe extern "C" fn(self_: *mut _cef_task_runner_t) -> ::std::os::raw::c_int,
21898 >,
21899 #[doc = "\n Returns true (1) if this task runner is for the specified CEF thread.\n"]
21900 pub belongs_to_thread: ::std::option::Option<
21901 unsafe extern "C" fn(
21902 self_: *mut _cef_task_runner_t,
21903 threadId: cef_thread_id_t,
21904 ) -> ::std::os::raw::c_int,
21905 >,
21906 #[doc = "\n Post a task for execution on the thread associated with this task runner.\n Execution will occur asynchronously.\n"]
21907 pub post_task: ::std::option::Option<
21908 unsafe extern "C" fn(
21909 self_: *mut _cef_task_runner_t,
21910 task: *mut _cef_task_t,
21911 ) -> ::std::os::raw::c_int,
21912 >,
21913 #[doc = "\n Post a task for delayed execution on the thread associated with this task\n runner. Execution will occur asynchronously. Delayed tasks are not\n supported on V8 WebWorker threads and will be executed without the\n specified delay.\n"]
21914 pub post_delayed_task: ::std::option::Option<
21915 unsafe extern "C" fn(
21916 self_: *mut _cef_task_runner_t,
21917 task: *mut _cef_task_t,
21918 delay_ms: i64,
21919 ) -> ::std::os::raw::c_int,
21920 >,
21921}
21922#[test]
21923fn bindgen_test_layout__cef_task_runner_t() {
21924 const UNINIT: ::std::mem::MaybeUninit<_cef_task_runner_t> = ::std::mem::MaybeUninit::uninit();
21925 let ptr = UNINIT.as_ptr();
21926 assert_eq!(
21927 ::std::mem::size_of::<_cef_task_runner_t>(),
21928 80usize,
21929 concat!("Size of: ", stringify!(_cef_task_runner_t))
21930 );
21931 assert_eq!(
21932 ::std::mem::align_of::<_cef_task_runner_t>(),
21933 8usize,
21934 concat!("Alignment of ", stringify!(_cef_task_runner_t))
21935 );
21936 assert_eq!(
21937 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
21938 0usize,
21939 concat!(
21940 "Offset of field: ",
21941 stringify!(_cef_task_runner_t),
21942 "::",
21943 stringify!(base)
21944 )
21945 );
21946 assert_eq!(
21947 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
21948 40usize,
21949 concat!(
21950 "Offset of field: ",
21951 stringify!(_cef_task_runner_t),
21952 "::",
21953 stringify!(is_same)
21954 )
21955 );
21956 assert_eq!(
21957 unsafe { ::std::ptr::addr_of!((*ptr).belongs_to_current_thread) as usize - ptr as usize },
21958 48usize,
21959 concat!(
21960 "Offset of field: ",
21961 stringify!(_cef_task_runner_t),
21962 "::",
21963 stringify!(belongs_to_current_thread)
21964 )
21965 );
21966 assert_eq!(
21967 unsafe { ::std::ptr::addr_of!((*ptr).belongs_to_thread) as usize - ptr as usize },
21968 56usize,
21969 concat!(
21970 "Offset of field: ",
21971 stringify!(_cef_task_runner_t),
21972 "::",
21973 stringify!(belongs_to_thread)
21974 )
21975 );
21976 assert_eq!(
21977 unsafe { ::std::ptr::addr_of!((*ptr).post_task) as usize - ptr as usize },
21978 64usize,
21979 concat!(
21980 "Offset of field: ",
21981 stringify!(_cef_task_runner_t),
21982 "::",
21983 stringify!(post_task)
21984 )
21985 );
21986 assert_eq!(
21987 unsafe { ::std::ptr::addr_of!((*ptr).post_delayed_task) as usize - ptr as usize },
21988 72usize,
21989 concat!(
21990 "Offset of field: ",
21991 stringify!(_cef_task_runner_t),
21992 "::",
21993 stringify!(post_delayed_task)
21994 )
21995 );
21996}
21997#[doc = "\n Structure that asynchronously executes tasks on the associated thread. It is\n safe to call the functions of this structure on any thread.\n\n CEF maintains multiple internal threads that are used for handling different\n types of tasks in different processes. The cef_thread_id_t definitions in\n cef_types.h list the common CEF threads. Task runners are also available for\n other CEF threads as appropriate (for example, V8 WebWorker threads).\n"]
21998pub type cef_task_runner_t = _cef_task_runner_t;
21999extern "C" {
22000 #[doc = "\n Returns the task runner for the current thread. Only CEF threads will have\n task runners. An NULL reference will be returned if this function is called\n on an invalid thread.\n"]
22001 pub fn cef_task_runner_get_for_current_thread() -> *mut cef_task_runner_t;
22002}
22003extern "C" {
22004 #[doc = "\n Returns the task runner for the specified CEF thread.\n"]
22005 pub fn cef_task_runner_get_for_thread(threadId: cef_thread_id_t) -> *mut cef_task_runner_t;
22006}
22007extern "C" {
22008 #[doc = "\n Returns true (1) if called on the specified thread. Equivalent to using\n cef_task_runner_t::GetForThread(threadId)->belongs_to_current_thread().\n"]
22009 pub fn cef_currently_on(threadId: cef_thread_id_t) -> ::std::os::raw::c_int;
22010}
22011extern "C" {
22012 #[doc = "\n Post a task for execution on the specified thread. Equivalent to using\n cef_task_runner_t::GetForThread(threadId)->PostTask(task).\n"]
22013 pub fn cef_post_task(threadId: cef_thread_id_t, task: *mut cef_task_t)
22014 -> ::std::os::raw::c_int;
22015}
22016extern "C" {
22017 #[doc = "\n Post a task for delayed execution on the specified thread. Equivalent to\n using cef_task_runner_t::GetForThread(threadId)->PostDelayedTask(task,\n delay_ms).\n"]
22018 pub fn cef_post_delayed_task(
22019 threadId: cef_thread_id_t,
22020 task: *mut cef_task_t,
22021 delay_ms: i64,
22022 ) -> ::std::os::raw::c_int;
22023}
22024#[doc = "\n Structure representing a V8 context handle. V8 handles can only be accessed\n from the thread on which they are created. Valid threads for creating a V8\n handle include the render process main thread (TID_RENDERER) and WebWorker\n threads. A task runner for posting tasks on the associated thread can be\n retrieved via the cef_v8context_t::get_task_runner() function.\n"]
22025#[repr(C)]
22026#[derive(Debug, Copy, Clone)]
22027pub struct _cef_v8context_t {
22028 #[doc = "\n Base structure.\n"]
22029 pub base: cef_base_ref_counted_t,
22030 #[doc = "\n Returns the task runner associated with this context. V8 handles can only\n be accessed from the thread on which they are created. This function can\n be called on any render process thread.\n"]
22031 pub get_task_runner: ::std::option::Option<
22032 unsafe extern "C" fn(self_: *mut _cef_v8context_t) -> *mut _cef_task_runner_t,
22033 >,
22034 #[doc = "\n Returns true (1) if the underlying handle is valid and it can be accessed\n on the current thread. Do not call any other functions if this function\n returns false (0).\n"]
22035 pub is_valid: ::std::option::Option<
22036 unsafe extern "C" fn(self_: *mut _cef_v8context_t) -> ::std::os::raw::c_int,
22037 >,
22038 #[doc = "\n Returns the browser for this context. This function will return an NULL\n reference for WebWorker contexts.\n"]
22039 pub get_browser: ::std::option::Option<
22040 unsafe extern "C" fn(self_: *mut _cef_v8context_t) -> *mut _cef_browser_t,
22041 >,
22042 #[doc = "\n Returns the frame for this context. This function will return an NULL\n reference for WebWorker contexts.\n"]
22043 pub get_frame: ::std::option::Option<
22044 unsafe extern "C" fn(self_: *mut _cef_v8context_t) -> *mut _cef_frame_t,
22045 >,
22046 #[doc = "\n Returns the global object for this context. The context must be entered\n before calling this function.\n"]
22047 pub get_global: ::std::option::Option<
22048 unsafe extern "C" fn(self_: *mut _cef_v8context_t) -> *mut _cef_v8value_t,
22049 >,
22050 #[doc = "\n Enter this context. A context must be explicitly entered before creating a\n V8 Object, Array, Function or Date asynchronously. exit() must be called\n the same number of times as enter() before releasing this context. V8\n objects belong to the context in which they are created. Returns true (1)\n if the scope was entered successfully.\n"]
22051 pub enter: ::std::option::Option<
22052 unsafe extern "C" fn(self_: *mut _cef_v8context_t) -> ::std::os::raw::c_int,
22053 >,
22054 #[doc = "\n Exit this context. Call this function only after calling enter(). Returns\n true (1) if the scope was exited successfully.\n"]
22055 pub exit: ::std::option::Option<
22056 unsafe extern "C" fn(self_: *mut _cef_v8context_t) -> ::std::os::raw::c_int,
22057 >,
22058 #[doc = "\n Returns true (1) if this object is pointing to the same handle as |that|\n object.\n"]
22059 pub is_same: ::std::option::Option<
22060 unsafe extern "C" fn(
22061 self_: *mut _cef_v8context_t,
22062 that: *mut _cef_v8context_t,
22063 ) -> ::std::os::raw::c_int,
22064 >,
22065 #[doc = "\n Execute a string of JavaScript code in this V8 context. The |script_url|\n parameter is the URL where the script in question can be found, if any.\n The |start_line| parameter is the base line number to use for error\n reporting. On success |retval| will be set to the return value, if any,\n and the function will return true (1). On failure |exception| will be set\n to the exception, if any, and the function will return false (0).\n"]
22066 pub eval: ::std::option::Option<
22067 unsafe extern "C" fn(
22068 self_: *mut _cef_v8context_t,
22069 code: *const cef_string_t,
22070 script_url: *const cef_string_t,
22071 start_line: ::std::os::raw::c_int,
22072 retval: *mut *mut _cef_v8value_t,
22073 exception: *mut *mut _cef_v8exception_t,
22074 ) -> ::std::os::raw::c_int,
22075 >,
22076}
22077#[test]
22078fn bindgen_test_layout__cef_v8context_t() {
22079 const UNINIT: ::std::mem::MaybeUninit<_cef_v8context_t> = ::std::mem::MaybeUninit::uninit();
22080 let ptr = UNINIT.as_ptr();
22081 assert_eq!(
22082 ::std::mem::size_of::<_cef_v8context_t>(),
22083 112usize,
22084 concat!("Size of: ", stringify!(_cef_v8context_t))
22085 );
22086 assert_eq!(
22087 ::std::mem::align_of::<_cef_v8context_t>(),
22088 8usize,
22089 concat!("Alignment of ", stringify!(_cef_v8context_t))
22090 );
22091 assert_eq!(
22092 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
22093 0usize,
22094 concat!(
22095 "Offset of field: ",
22096 stringify!(_cef_v8context_t),
22097 "::",
22098 stringify!(base)
22099 )
22100 );
22101 assert_eq!(
22102 unsafe { ::std::ptr::addr_of!((*ptr).get_task_runner) as usize - ptr as usize },
22103 40usize,
22104 concat!(
22105 "Offset of field: ",
22106 stringify!(_cef_v8context_t),
22107 "::",
22108 stringify!(get_task_runner)
22109 )
22110 );
22111 assert_eq!(
22112 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
22113 48usize,
22114 concat!(
22115 "Offset of field: ",
22116 stringify!(_cef_v8context_t),
22117 "::",
22118 stringify!(is_valid)
22119 )
22120 );
22121 assert_eq!(
22122 unsafe { ::std::ptr::addr_of!((*ptr).get_browser) as usize - ptr as usize },
22123 56usize,
22124 concat!(
22125 "Offset of field: ",
22126 stringify!(_cef_v8context_t),
22127 "::",
22128 stringify!(get_browser)
22129 )
22130 );
22131 assert_eq!(
22132 unsafe { ::std::ptr::addr_of!((*ptr).get_frame) as usize - ptr as usize },
22133 64usize,
22134 concat!(
22135 "Offset of field: ",
22136 stringify!(_cef_v8context_t),
22137 "::",
22138 stringify!(get_frame)
22139 )
22140 );
22141 assert_eq!(
22142 unsafe { ::std::ptr::addr_of!((*ptr).get_global) as usize - ptr as usize },
22143 72usize,
22144 concat!(
22145 "Offset of field: ",
22146 stringify!(_cef_v8context_t),
22147 "::",
22148 stringify!(get_global)
22149 )
22150 );
22151 assert_eq!(
22152 unsafe { ::std::ptr::addr_of!((*ptr).enter) as usize - ptr as usize },
22153 80usize,
22154 concat!(
22155 "Offset of field: ",
22156 stringify!(_cef_v8context_t),
22157 "::",
22158 stringify!(enter)
22159 )
22160 );
22161 assert_eq!(
22162 unsafe { ::std::ptr::addr_of!((*ptr).exit) as usize - ptr as usize },
22163 88usize,
22164 concat!(
22165 "Offset of field: ",
22166 stringify!(_cef_v8context_t),
22167 "::",
22168 stringify!(exit)
22169 )
22170 );
22171 assert_eq!(
22172 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
22173 96usize,
22174 concat!(
22175 "Offset of field: ",
22176 stringify!(_cef_v8context_t),
22177 "::",
22178 stringify!(is_same)
22179 )
22180 );
22181 assert_eq!(
22182 unsafe { ::std::ptr::addr_of!((*ptr).eval) as usize - ptr as usize },
22183 104usize,
22184 concat!(
22185 "Offset of field: ",
22186 stringify!(_cef_v8context_t),
22187 "::",
22188 stringify!(eval)
22189 )
22190 );
22191}
22192#[doc = "\n Structure representing a V8 context handle. V8 handles can only be accessed\n from the thread on which they are created. Valid threads for creating a V8\n handle include the render process main thread (TID_RENDERER) and WebWorker\n threads. A task runner for posting tasks on the associated thread can be\n retrieved via the cef_v8context_t::get_task_runner() function.\n"]
22193pub type cef_v8context_t = _cef_v8context_t;
22194extern "C" {
22195 #[doc = "\n Returns the current (top) context object in the V8 context stack.\n"]
22196 pub fn cef_v8context_get_current_context() -> *mut cef_v8context_t;
22197}
22198extern "C" {
22199 #[doc = "\n Returns the entered (bottom) context object in the V8 context stack.\n"]
22200 pub fn cef_v8context_get_entered_context() -> *mut cef_v8context_t;
22201}
22202extern "C" {
22203 #[doc = "\n Returns true (1) if V8 is currently inside a context.\n"]
22204 pub fn cef_v8context_in_context() -> ::std::os::raw::c_int;
22205}
22206#[doc = "\n Structure that should be implemented to handle V8 function calls. The\n functions of this structure will be called on the thread associated with the\n V8 function.\n"]
22207#[repr(C)]
22208#[derive(Debug, Copy, Clone)]
22209pub struct _cef_v8handler_t {
22210 #[doc = "\n Base structure.\n"]
22211 pub base: cef_base_ref_counted_t,
22212 #[doc = "\n Handle execution of the function identified by |name|. |object| is the\n receiver ('this' object) of the function. |arguments| is the list of\n arguments passed to the function. If execution succeeds set |retval| to\n the function return value. If execution fails set |exception| to the\n exception that will be thrown. Return true (1) if execution was handled.\n"]
22213 pub execute: ::std::option::Option<
22214 unsafe extern "C" fn(
22215 self_: *mut _cef_v8handler_t,
22216 name: *const cef_string_t,
22217 object: *mut _cef_v8value_t,
22218 argumentsCount: usize,
22219 arguments: *const *mut _cef_v8value_t,
22220 retval: *mut *mut _cef_v8value_t,
22221 exception: *mut cef_string_t,
22222 ) -> ::std::os::raw::c_int,
22223 >,
22224}
22225#[test]
22226fn bindgen_test_layout__cef_v8handler_t() {
22227 const UNINIT: ::std::mem::MaybeUninit<_cef_v8handler_t> = ::std::mem::MaybeUninit::uninit();
22228 let ptr = UNINIT.as_ptr();
22229 assert_eq!(
22230 ::std::mem::size_of::<_cef_v8handler_t>(),
22231 48usize,
22232 concat!("Size of: ", stringify!(_cef_v8handler_t))
22233 );
22234 assert_eq!(
22235 ::std::mem::align_of::<_cef_v8handler_t>(),
22236 8usize,
22237 concat!("Alignment of ", stringify!(_cef_v8handler_t))
22238 );
22239 assert_eq!(
22240 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
22241 0usize,
22242 concat!(
22243 "Offset of field: ",
22244 stringify!(_cef_v8handler_t),
22245 "::",
22246 stringify!(base)
22247 )
22248 );
22249 assert_eq!(
22250 unsafe { ::std::ptr::addr_of!((*ptr).execute) as usize - ptr as usize },
22251 40usize,
22252 concat!(
22253 "Offset of field: ",
22254 stringify!(_cef_v8handler_t),
22255 "::",
22256 stringify!(execute)
22257 )
22258 );
22259}
22260#[doc = "\n Structure that should be implemented to handle V8 function calls. The\n functions of this structure will be called on the thread associated with the\n V8 function.\n"]
22261pub type cef_v8handler_t = _cef_v8handler_t;
22262#[doc = "\n Structure that should be implemented to handle V8 accessor calls. Accessor\n identifiers are registered by calling cef_v8value_t::set_value(). The\n functions of this structure will be called on the thread associated with the\n V8 accessor.\n"]
22263#[repr(C)]
22264#[derive(Debug, Copy, Clone)]
22265pub struct _cef_v8accessor_t {
22266 #[doc = "\n Base structure.\n"]
22267 pub base: cef_base_ref_counted_t,
22268 #[doc = "\n Handle retrieval the accessor value identified by |name|. |object| is the\n receiver ('this' object) of the accessor. If retrieval succeeds set\n |retval| to the return value. If retrieval fails set |exception| to the\n exception that will be thrown. Return true (1) if accessor retrieval was\n handled.\n"]
22269 pub get: ::std::option::Option<
22270 unsafe extern "C" fn(
22271 self_: *mut _cef_v8accessor_t,
22272 name: *const cef_string_t,
22273 object: *mut _cef_v8value_t,
22274 retval: *mut *mut _cef_v8value_t,
22275 exception: *mut cef_string_t,
22276 ) -> ::std::os::raw::c_int,
22277 >,
22278 #[doc = "\n Handle assignment of the accessor value identified by |name|. |object| is\n the receiver ('this' object) of the accessor. |value| is the new value\n being assigned to the accessor. If assignment fails set |exception| to the\n exception that will be thrown. Return true (1) if accessor assignment was\n handled.\n"]
22279 pub set: ::std::option::Option<
22280 unsafe extern "C" fn(
22281 self_: *mut _cef_v8accessor_t,
22282 name: *const cef_string_t,
22283 object: *mut _cef_v8value_t,
22284 value: *mut _cef_v8value_t,
22285 exception: *mut cef_string_t,
22286 ) -> ::std::os::raw::c_int,
22287 >,
22288}
22289#[test]
22290fn bindgen_test_layout__cef_v8accessor_t() {
22291 const UNINIT: ::std::mem::MaybeUninit<_cef_v8accessor_t> = ::std::mem::MaybeUninit::uninit();
22292 let ptr = UNINIT.as_ptr();
22293 assert_eq!(
22294 ::std::mem::size_of::<_cef_v8accessor_t>(),
22295 56usize,
22296 concat!("Size of: ", stringify!(_cef_v8accessor_t))
22297 );
22298 assert_eq!(
22299 ::std::mem::align_of::<_cef_v8accessor_t>(),
22300 8usize,
22301 concat!("Alignment of ", stringify!(_cef_v8accessor_t))
22302 );
22303 assert_eq!(
22304 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
22305 0usize,
22306 concat!(
22307 "Offset of field: ",
22308 stringify!(_cef_v8accessor_t),
22309 "::",
22310 stringify!(base)
22311 )
22312 );
22313 assert_eq!(
22314 unsafe { ::std::ptr::addr_of!((*ptr).get) as usize - ptr as usize },
22315 40usize,
22316 concat!(
22317 "Offset of field: ",
22318 stringify!(_cef_v8accessor_t),
22319 "::",
22320 stringify!(get)
22321 )
22322 );
22323 assert_eq!(
22324 unsafe { ::std::ptr::addr_of!((*ptr).set) as usize - ptr as usize },
22325 48usize,
22326 concat!(
22327 "Offset of field: ",
22328 stringify!(_cef_v8accessor_t),
22329 "::",
22330 stringify!(set)
22331 )
22332 );
22333}
22334#[doc = "\n Structure that should be implemented to handle V8 accessor calls. Accessor\n identifiers are registered by calling cef_v8value_t::set_value(). The\n functions of this structure will be called on the thread associated with the\n V8 accessor.\n"]
22335pub type cef_v8accessor_t = _cef_v8accessor_t;
22336#[doc = "\n Structure that should be implemented to handle V8 interceptor calls. The\n functions of this structure will be called on the thread associated with the\n V8 interceptor. Interceptor's named property handlers (with first argument\n of type CefString) are called when object is indexed by string. Indexed\n property handlers (with first argument of type int) are called when object\n is indexed by integer.\n"]
22337#[repr(C)]
22338#[derive(Debug, Copy, Clone)]
22339pub struct _cef_v8interceptor_t {
22340 #[doc = "\n Base structure.\n"]
22341 pub base: cef_base_ref_counted_t,
22342 #[doc = "\n Handle retrieval of the interceptor value identified by |name|. |object|\n is the receiver ('this' object) of the interceptor. If retrieval succeeds,\n set |retval| to the return value. If the requested value does not exist,\n don't set either |retval| or |exception|. If retrieval fails, set\n |exception| to the exception that will be thrown. If the property has an\n associated accessor, it will be called only if you don't set |retval|.\n Return true (1) if interceptor retrieval was handled, false (0) otherwise.\n"]
22343 pub get_byname: ::std::option::Option<
22344 unsafe extern "C" fn(
22345 self_: *mut _cef_v8interceptor_t,
22346 name: *const cef_string_t,
22347 object: *mut _cef_v8value_t,
22348 retval: *mut *mut _cef_v8value_t,
22349 exception: *mut cef_string_t,
22350 ) -> ::std::os::raw::c_int,
22351 >,
22352 #[doc = "\n Handle retrieval of the interceptor value identified by |index|. |object|\n is the receiver ('this' object) of the interceptor. If retrieval succeeds,\n set |retval| to the return value. If the requested value does not exist,\n don't set either |retval| or |exception|. If retrieval fails, set\n |exception| to the exception that will be thrown. Return true (1) if\n interceptor retrieval was handled, false (0) otherwise.\n"]
22353 pub get_byindex: ::std::option::Option<
22354 unsafe extern "C" fn(
22355 self_: *mut _cef_v8interceptor_t,
22356 index: ::std::os::raw::c_int,
22357 object: *mut _cef_v8value_t,
22358 retval: *mut *mut _cef_v8value_t,
22359 exception: *mut cef_string_t,
22360 ) -> ::std::os::raw::c_int,
22361 >,
22362 #[doc = "\n Handle assignment of the interceptor value identified by |name|. |object|\n is the receiver ('this' object) of the interceptor. |value| is the new\n value being assigned to the interceptor. If assignment fails, set\n |exception| to the exception that will be thrown. This setter will always\n be called, even when the property has an associated accessor. Return true\n (1) if interceptor assignment was handled, false (0) otherwise.\n"]
22363 pub set_byname: ::std::option::Option<
22364 unsafe extern "C" fn(
22365 self_: *mut _cef_v8interceptor_t,
22366 name: *const cef_string_t,
22367 object: *mut _cef_v8value_t,
22368 value: *mut _cef_v8value_t,
22369 exception: *mut cef_string_t,
22370 ) -> ::std::os::raw::c_int,
22371 >,
22372 #[doc = "\n Handle assignment of the interceptor value identified by |index|. |object|\n is the receiver ('this' object) of the interceptor. |value| is the new\n value being assigned to the interceptor. If assignment fails, set\n |exception| to the exception that will be thrown. Return true (1) if\n interceptor assignment was handled, false (0) otherwise.\n"]
22373 pub set_byindex: ::std::option::Option<
22374 unsafe extern "C" fn(
22375 self_: *mut _cef_v8interceptor_t,
22376 index: ::std::os::raw::c_int,
22377 object: *mut _cef_v8value_t,
22378 value: *mut _cef_v8value_t,
22379 exception: *mut cef_string_t,
22380 ) -> ::std::os::raw::c_int,
22381 >,
22382}
22383#[test]
22384fn bindgen_test_layout__cef_v8interceptor_t() {
22385 const UNINIT: ::std::mem::MaybeUninit<_cef_v8interceptor_t> = ::std::mem::MaybeUninit::uninit();
22386 let ptr = UNINIT.as_ptr();
22387 assert_eq!(
22388 ::std::mem::size_of::<_cef_v8interceptor_t>(),
22389 72usize,
22390 concat!("Size of: ", stringify!(_cef_v8interceptor_t))
22391 );
22392 assert_eq!(
22393 ::std::mem::align_of::<_cef_v8interceptor_t>(),
22394 8usize,
22395 concat!("Alignment of ", stringify!(_cef_v8interceptor_t))
22396 );
22397 assert_eq!(
22398 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
22399 0usize,
22400 concat!(
22401 "Offset of field: ",
22402 stringify!(_cef_v8interceptor_t),
22403 "::",
22404 stringify!(base)
22405 )
22406 );
22407 assert_eq!(
22408 unsafe { ::std::ptr::addr_of!((*ptr).get_byname) as usize - ptr as usize },
22409 40usize,
22410 concat!(
22411 "Offset of field: ",
22412 stringify!(_cef_v8interceptor_t),
22413 "::",
22414 stringify!(get_byname)
22415 )
22416 );
22417 assert_eq!(
22418 unsafe { ::std::ptr::addr_of!((*ptr).get_byindex) as usize - ptr as usize },
22419 48usize,
22420 concat!(
22421 "Offset of field: ",
22422 stringify!(_cef_v8interceptor_t),
22423 "::",
22424 stringify!(get_byindex)
22425 )
22426 );
22427 assert_eq!(
22428 unsafe { ::std::ptr::addr_of!((*ptr).set_byname) as usize - ptr as usize },
22429 56usize,
22430 concat!(
22431 "Offset of field: ",
22432 stringify!(_cef_v8interceptor_t),
22433 "::",
22434 stringify!(set_byname)
22435 )
22436 );
22437 assert_eq!(
22438 unsafe { ::std::ptr::addr_of!((*ptr).set_byindex) as usize - ptr as usize },
22439 64usize,
22440 concat!(
22441 "Offset of field: ",
22442 stringify!(_cef_v8interceptor_t),
22443 "::",
22444 stringify!(set_byindex)
22445 )
22446 );
22447}
22448#[doc = "\n Structure that should be implemented to handle V8 interceptor calls. The\n functions of this structure will be called on the thread associated with the\n V8 interceptor. Interceptor's named property handlers (with first argument\n of type CefString) are called when object is indexed by string. Indexed\n property handlers (with first argument of type int) are called when object\n is indexed by integer.\n"]
22449pub type cef_v8interceptor_t = _cef_v8interceptor_t;
22450#[doc = "\n Structure representing a V8 exception. The functions of this structure may\n be called on any render process thread.\n"]
22451#[repr(C)]
22452#[derive(Debug, Copy, Clone)]
22453pub struct _cef_v8exception_t {
22454 #[doc = "\n Base structure.\n"]
22455 pub base: cef_base_ref_counted_t,
22456 #[doc = "\n Returns the exception message.\n"]
22457 pub get_message: ::std::option::Option<
22458 unsafe extern "C" fn(self_: *mut _cef_v8exception_t) -> cef_string_userfree_t,
22459 >,
22460 #[doc = "\n Returns the line of source code that the exception occurred within.\n"]
22461 pub get_source_line: ::std::option::Option<
22462 unsafe extern "C" fn(self_: *mut _cef_v8exception_t) -> cef_string_userfree_t,
22463 >,
22464 #[doc = "\n Returns the resource name for the script from where the function causing\n the error originates.\n"]
22465 pub get_script_resource_name: ::std::option::Option<
22466 unsafe extern "C" fn(self_: *mut _cef_v8exception_t) -> cef_string_userfree_t,
22467 >,
22468 #[doc = "\n Returns the 1-based number of the line where the error occurred or 0 if\n the line number is unknown.\n"]
22469 pub get_line_number: ::std::option::Option<
22470 unsafe extern "C" fn(self_: *mut _cef_v8exception_t) -> ::std::os::raw::c_int,
22471 >,
22472 #[doc = "\n Returns the index within the script of the first character where the error\n occurred.\n"]
22473 pub get_start_position: ::std::option::Option<
22474 unsafe extern "C" fn(self_: *mut _cef_v8exception_t) -> ::std::os::raw::c_int,
22475 >,
22476 #[doc = "\n Returns the index within the script of the last character where the error\n occurred.\n"]
22477 pub get_end_position: ::std::option::Option<
22478 unsafe extern "C" fn(self_: *mut _cef_v8exception_t) -> ::std::os::raw::c_int,
22479 >,
22480 #[doc = "\n Returns the index within the line of the first character where the error\n occurred.\n"]
22481 pub get_start_column: ::std::option::Option<
22482 unsafe extern "C" fn(self_: *mut _cef_v8exception_t) -> ::std::os::raw::c_int,
22483 >,
22484 #[doc = "\n Returns the index within the line of the last character where the error\n occurred.\n"]
22485 pub get_end_column: ::std::option::Option<
22486 unsafe extern "C" fn(self_: *mut _cef_v8exception_t) -> ::std::os::raw::c_int,
22487 >,
22488}
22489#[test]
22490fn bindgen_test_layout__cef_v8exception_t() {
22491 const UNINIT: ::std::mem::MaybeUninit<_cef_v8exception_t> = ::std::mem::MaybeUninit::uninit();
22492 let ptr = UNINIT.as_ptr();
22493 assert_eq!(
22494 ::std::mem::size_of::<_cef_v8exception_t>(),
22495 104usize,
22496 concat!("Size of: ", stringify!(_cef_v8exception_t))
22497 );
22498 assert_eq!(
22499 ::std::mem::align_of::<_cef_v8exception_t>(),
22500 8usize,
22501 concat!("Alignment of ", stringify!(_cef_v8exception_t))
22502 );
22503 assert_eq!(
22504 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
22505 0usize,
22506 concat!(
22507 "Offset of field: ",
22508 stringify!(_cef_v8exception_t),
22509 "::",
22510 stringify!(base)
22511 )
22512 );
22513 assert_eq!(
22514 unsafe { ::std::ptr::addr_of!((*ptr).get_message) as usize - ptr as usize },
22515 40usize,
22516 concat!(
22517 "Offset of field: ",
22518 stringify!(_cef_v8exception_t),
22519 "::",
22520 stringify!(get_message)
22521 )
22522 );
22523 assert_eq!(
22524 unsafe { ::std::ptr::addr_of!((*ptr).get_source_line) as usize - ptr as usize },
22525 48usize,
22526 concat!(
22527 "Offset of field: ",
22528 stringify!(_cef_v8exception_t),
22529 "::",
22530 stringify!(get_source_line)
22531 )
22532 );
22533 assert_eq!(
22534 unsafe { ::std::ptr::addr_of!((*ptr).get_script_resource_name) as usize - ptr as usize },
22535 56usize,
22536 concat!(
22537 "Offset of field: ",
22538 stringify!(_cef_v8exception_t),
22539 "::",
22540 stringify!(get_script_resource_name)
22541 )
22542 );
22543 assert_eq!(
22544 unsafe { ::std::ptr::addr_of!((*ptr).get_line_number) as usize - ptr as usize },
22545 64usize,
22546 concat!(
22547 "Offset of field: ",
22548 stringify!(_cef_v8exception_t),
22549 "::",
22550 stringify!(get_line_number)
22551 )
22552 );
22553 assert_eq!(
22554 unsafe { ::std::ptr::addr_of!((*ptr).get_start_position) as usize - ptr as usize },
22555 72usize,
22556 concat!(
22557 "Offset of field: ",
22558 stringify!(_cef_v8exception_t),
22559 "::",
22560 stringify!(get_start_position)
22561 )
22562 );
22563 assert_eq!(
22564 unsafe { ::std::ptr::addr_of!((*ptr).get_end_position) as usize - ptr as usize },
22565 80usize,
22566 concat!(
22567 "Offset of field: ",
22568 stringify!(_cef_v8exception_t),
22569 "::",
22570 stringify!(get_end_position)
22571 )
22572 );
22573 assert_eq!(
22574 unsafe { ::std::ptr::addr_of!((*ptr).get_start_column) as usize - ptr as usize },
22575 88usize,
22576 concat!(
22577 "Offset of field: ",
22578 stringify!(_cef_v8exception_t),
22579 "::",
22580 stringify!(get_start_column)
22581 )
22582 );
22583 assert_eq!(
22584 unsafe { ::std::ptr::addr_of!((*ptr).get_end_column) as usize - ptr as usize },
22585 96usize,
22586 concat!(
22587 "Offset of field: ",
22588 stringify!(_cef_v8exception_t),
22589 "::",
22590 stringify!(get_end_column)
22591 )
22592 );
22593}
22594#[doc = "\n Structure representing a V8 exception. The functions of this structure may\n be called on any render process thread.\n"]
22595pub type cef_v8exception_t = _cef_v8exception_t;
22596#[doc = "\n Callback structure that is passed to cef_v8value_t::CreateArrayBuffer.\n"]
22597#[repr(C)]
22598#[derive(Debug, Copy, Clone)]
22599pub struct _cef_v8array_buffer_release_callback_t {
22600 #[doc = "\n Base structure.\n"]
22601 pub base: cef_base_ref_counted_t,
22602 #[doc = "\n Called to release |buffer| when the ArrayBuffer JS object is garbage\n collected. |buffer| is the value that was passed to CreateArrayBuffer\n along with this object.\n"]
22603 pub release_buffer: ::std::option::Option<
22604 unsafe extern "C" fn(
22605 self_: *mut _cef_v8array_buffer_release_callback_t,
22606 buffer: *mut ::std::os::raw::c_void,
22607 ),
22608 >,
22609}
22610#[test]
22611fn bindgen_test_layout__cef_v8array_buffer_release_callback_t() {
22612 const UNINIT: ::std::mem::MaybeUninit<_cef_v8array_buffer_release_callback_t> =
22613 ::std::mem::MaybeUninit::uninit();
22614 let ptr = UNINIT.as_ptr();
22615 assert_eq!(
22616 ::std::mem::size_of::<_cef_v8array_buffer_release_callback_t>(),
22617 48usize,
22618 concat!(
22619 "Size of: ",
22620 stringify!(_cef_v8array_buffer_release_callback_t)
22621 )
22622 );
22623 assert_eq!(
22624 ::std::mem::align_of::<_cef_v8array_buffer_release_callback_t>(),
22625 8usize,
22626 concat!(
22627 "Alignment of ",
22628 stringify!(_cef_v8array_buffer_release_callback_t)
22629 )
22630 );
22631 assert_eq!(
22632 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
22633 0usize,
22634 concat!(
22635 "Offset of field: ",
22636 stringify!(_cef_v8array_buffer_release_callback_t),
22637 "::",
22638 stringify!(base)
22639 )
22640 );
22641 assert_eq!(
22642 unsafe { ::std::ptr::addr_of!((*ptr).release_buffer) as usize - ptr as usize },
22643 40usize,
22644 concat!(
22645 "Offset of field: ",
22646 stringify!(_cef_v8array_buffer_release_callback_t),
22647 "::",
22648 stringify!(release_buffer)
22649 )
22650 );
22651}
22652#[doc = "\n Callback structure that is passed to cef_v8value_t::CreateArrayBuffer.\n"]
22653pub type cef_v8array_buffer_release_callback_t = _cef_v8array_buffer_release_callback_t;
22654#[doc = "\n Structure representing a V8 value handle. V8 handles can only be accessed\n from the thread on which they are created. Valid threads for creating a V8\n handle include the render process main thread (TID_RENDERER) and WebWorker\n threads. A task runner for posting tasks on the associated thread can be\n retrieved via the cef_v8context_t::get_task_runner() function.\n"]
22655#[repr(C)]
22656#[derive(Debug, Copy, Clone)]
22657pub struct _cef_v8value_t {
22658 #[doc = "\n Base structure.\n"]
22659 pub base: cef_base_ref_counted_t,
22660 #[doc = "\n Returns true (1) if the underlying handle is valid and it can be accessed\n on the current thread. Do not call any other functions if this function\n returns false (0).\n"]
22661 pub is_valid: ::std::option::Option<
22662 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22663 >,
22664 #[doc = "\n True if the value type is undefined.\n"]
22665 pub is_undefined: ::std::option::Option<
22666 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22667 >,
22668 #[doc = "\n True if the value type is null.\n"]
22669 pub is_null: ::std::option::Option<
22670 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22671 >,
22672 #[doc = "\n True if the value type is bool.\n"]
22673 pub is_bool: ::std::option::Option<
22674 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22675 >,
22676 #[doc = "\n True if the value type is int.\n"]
22677 pub is_int: ::std::option::Option<
22678 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22679 >,
22680 #[doc = "\n True if the value type is unsigned int.\n"]
22681 pub is_uint: ::std::option::Option<
22682 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22683 >,
22684 #[doc = "\n True if the value type is double.\n"]
22685 pub is_double: ::std::option::Option<
22686 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22687 >,
22688 #[doc = "\n True if the value type is Date.\n"]
22689 pub is_date: ::std::option::Option<
22690 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22691 >,
22692 #[doc = "\n True if the value type is string.\n"]
22693 pub is_string: ::std::option::Option<
22694 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22695 >,
22696 #[doc = "\n True if the value type is object.\n"]
22697 pub is_object: ::std::option::Option<
22698 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22699 >,
22700 #[doc = "\n True if the value type is array.\n"]
22701 pub is_array: ::std::option::Option<
22702 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22703 >,
22704 #[doc = "\n True if the value type is an ArrayBuffer.\n"]
22705 pub is_array_buffer: ::std::option::Option<
22706 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22707 >,
22708 #[doc = "\n True if the value type is function.\n"]
22709 pub is_function: ::std::option::Option<
22710 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22711 >,
22712 #[doc = "\n True if the value type is a Promise.\n"]
22713 pub is_promise: ::std::option::Option<
22714 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22715 >,
22716 #[doc = "\n Returns true (1) if this object is pointing to the same handle as |that|\n object.\n"]
22717 pub is_same: ::std::option::Option<
22718 unsafe extern "C" fn(
22719 self_: *mut _cef_v8value_t,
22720 that: *mut _cef_v8value_t,
22721 ) -> ::std::os::raw::c_int,
22722 >,
22723 #[doc = "\n Return a bool value.\n"]
22724 pub get_bool_value: ::std::option::Option<
22725 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22726 >,
22727 #[doc = "\n Return an int value.\n"]
22728 pub get_int_value:
22729 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> i32>,
22730 #[doc = "\n Return an unsigned int value.\n"]
22731 pub get_uint_value:
22732 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> u32>,
22733 #[doc = "\n Return a double value.\n"]
22734 pub get_double_value:
22735 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> f64>,
22736 #[doc = "\n Return a Date value.\n"]
22737 pub get_date_value:
22738 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> cef_basetime_t>,
22739 #[doc = "\n Return a string value.\n"]
22740 pub get_string_value: ::std::option::Option<
22741 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> cef_string_userfree_t,
22742 >,
22743 #[doc = "\n Returns true (1) if this is a user created object.\n"]
22744 pub is_user_created: ::std::option::Option<
22745 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22746 >,
22747 #[doc = "\n Returns true (1) if the last function call resulted in an exception. This\n attribute exists only in the scope of the current CEF value object.\n"]
22748 pub has_exception: ::std::option::Option<
22749 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22750 >,
22751 #[doc = "\n Returns the exception resulting from the last function call. This\n attribute exists only in the scope of the current CEF value object.\n"]
22752 pub get_exception: ::std::option::Option<
22753 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> *mut _cef_v8exception_t,
22754 >,
22755 #[doc = "\n Clears the last exception and returns true (1) on success.\n"]
22756 pub clear_exception: ::std::option::Option<
22757 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22758 >,
22759 #[doc = "\n Returns true (1) if this object will re-throw future exceptions. This\n attribute exists only in the scope of the current CEF value object.\n"]
22760 pub will_rethrow_exceptions: ::std::option::Option<
22761 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22762 >,
22763 #[doc = "\n Set whether this object will re-throw future exceptions. By default\n exceptions are not re-thrown. If a exception is re-thrown the current\n context should not be accessed again until after the exception has been\n caught and not re-thrown. Returns true (1) on success. This attribute\n exists only in the scope of the current CEF value object.\n"]
22764 pub set_rethrow_exceptions: ::std::option::Option<
22765 unsafe extern "C" fn(
22766 self_: *mut _cef_v8value_t,
22767 rethrow: ::std::os::raw::c_int,
22768 ) -> ::std::os::raw::c_int,
22769 >,
22770 #[doc = "\n Returns true (1) if the object has a value with the specified identifier.\n"]
22771 pub has_value_bykey: ::std::option::Option<
22772 unsafe extern "C" fn(
22773 self_: *mut _cef_v8value_t,
22774 key: *const cef_string_t,
22775 ) -> ::std::os::raw::c_int,
22776 >,
22777 #[doc = "\n Returns true (1) if the object has a value with the specified identifier.\n"]
22778 pub has_value_byindex: ::std::option::Option<
22779 unsafe extern "C" fn(
22780 self_: *mut _cef_v8value_t,
22781 index: ::std::os::raw::c_int,
22782 ) -> ::std::os::raw::c_int,
22783 >,
22784 #[doc = "\n Deletes the value with the specified identifier and returns true (1) on\n success. Returns false (0) if this function is called incorrectly or an\n exception is thrown. For read-only and don't-delete values this function\n will return true (1) even though deletion failed.\n"]
22785 pub delete_value_bykey: ::std::option::Option<
22786 unsafe extern "C" fn(
22787 self_: *mut _cef_v8value_t,
22788 key: *const cef_string_t,
22789 ) -> ::std::os::raw::c_int,
22790 >,
22791 #[doc = "\n Deletes the value with the specified identifier and returns true (1) on\n success. Returns false (0) if this function is called incorrectly,\n deletion fails or an exception is thrown. For read-only and don't-delete\n values this function will return true (1) even though deletion failed.\n"]
22792 pub delete_value_byindex: ::std::option::Option<
22793 unsafe extern "C" fn(
22794 self_: *mut _cef_v8value_t,
22795 index: ::std::os::raw::c_int,
22796 ) -> ::std::os::raw::c_int,
22797 >,
22798 #[doc = "\n Returns the value with the specified identifier on success. Returns NULL\n if this function is called incorrectly or an exception is thrown.\n"]
22799 pub get_value_bykey: ::std::option::Option<
22800 unsafe extern "C" fn(
22801 self_: *mut _cef_v8value_t,
22802 key: *const cef_string_t,
22803 ) -> *mut _cef_v8value_t,
22804 >,
22805 #[doc = "\n Returns the value with the specified identifier on success. Returns NULL\n if this function is called incorrectly or an exception is thrown.\n"]
22806 pub get_value_byindex: ::std::option::Option<
22807 unsafe extern "C" fn(
22808 self_: *mut _cef_v8value_t,
22809 index: ::std::os::raw::c_int,
22810 ) -> *mut _cef_v8value_t,
22811 >,
22812 #[doc = "\n Associates a value with the specified identifier and returns true (1) on\n success. Returns false (0) if this function is called incorrectly or an\n exception is thrown. For read-only values this function will return true\n (1) even though assignment failed.\n"]
22813 pub set_value_bykey: ::std::option::Option<
22814 unsafe extern "C" fn(
22815 self_: *mut _cef_v8value_t,
22816 key: *const cef_string_t,
22817 value: *mut _cef_v8value_t,
22818 attribute: cef_v8_propertyattribute_t,
22819 ) -> ::std::os::raw::c_int,
22820 >,
22821 #[doc = "\n Associates a value with the specified identifier and returns true (1) on\n success. Returns false (0) if this function is called incorrectly or an\n exception is thrown. For read-only values this function will return true\n (1) even though assignment failed.\n"]
22822 pub set_value_byindex: ::std::option::Option<
22823 unsafe extern "C" fn(
22824 self_: *mut _cef_v8value_t,
22825 index: ::std::os::raw::c_int,
22826 value: *mut _cef_v8value_t,
22827 ) -> ::std::os::raw::c_int,
22828 >,
22829 #[doc = "\n Registers an identifier and returns true (1) on success. Access to the\n identifier will be forwarded to the cef_v8accessor_t instance passed to\n cef_v8value_t::cef_v8value_create_object(). Returns false (0) if this\n function is called incorrectly or an exception is thrown. For read-only\n values this function will return true (1) even though assignment failed.\n"]
22830 pub set_value_byaccessor: ::std::option::Option<
22831 unsafe extern "C" fn(
22832 self_: *mut _cef_v8value_t,
22833 key: *const cef_string_t,
22834 settings: cef_v8_accesscontrol_t,
22835 attribute: cef_v8_propertyattribute_t,
22836 ) -> ::std::os::raw::c_int,
22837 >,
22838 #[doc = "\n Read the keys for the object's values into the specified vector. Integer-\n based keys will also be returned as strings.\n"]
22839 pub get_keys: ::std::option::Option<
22840 unsafe extern "C" fn(
22841 self_: *mut _cef_v8value_t,
22842 keys: cef_string_list_t,
22843 ) -> ::std::os::raw::c_int,
22844 >,
22845 #[doc = "\n Sets the user data for this object and returns true (1) on success.\n Returns false (0) if this function is called incorrectly. This function\n can only be called on user created objects.\n"]
22846 pub set_user_data: ::std::option::Option<
22847 unsafe extern "C" fn(
22848 self_: *mut _cef_v8value_t,
22849 user_data: *mut _cef_base_ref_counted_t,
22850 ) -> ::std::os::raw::c_int,
22851 >,
22852 #[doc = "\n Returns the user data, if any, assigned to this object.\n"]
22853 pub get_user_data: ::std::option::Option<
22854 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> *mut _cef_base_ref_counted_t,
22855 >,
22856 #[doc = "\n Returns the amount of externally allocated memory registered for the\n object.\n"]
22857 pub get_externally_allocated_memory: ::std::option::Option<
22858 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22859 >,
22860 #[doc = "\n Adjusts the amount of registered external memory for the object. Used to\n give V8 an indication of the amount of externally allocated memory that is\n kept alive by JavaScript objects. V8 uses this information to decide when\n to perform global garbage collection. Each cef_v8value_t tracks the amount\n of external memory associated with it and automatically decreases the\n global total by the appropriate amount on its destruction.\n |change_in_bytes| specifies the number of bytes to adjust by. This\n function returns the number of bytes associated with the object after the\n adjustment. This function can only be called on user created objects.\n"]
22861 pub adjust_externally_allocated_memory: ::std::option::Option<
22862 unsafe extern "C" fn(
22863 self_: *mut _cef_v8value_t,
22864 change_in_bytes: ::std::os::raw::c_int,
22865 ) -> ::std::os::raw::c_int,
22866 >,
22867 #[doc = "\n Returns the number of elements in the array.\n"]
22868 pub get_array_length: ::std::option::Option<
22869 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22870 >,
22871 #[doc = "\n Returns the ReleaseCallback object associated with the ArrayBuffer or NULL\n if the ArrayBuffer was not created with CreateArrayBuffer.\n"]
22872 pub get_array_buffer_release_callback: ::std::option::Option<
22873 unsafe extern "C" fn(
22874 self_: *mut _cef_v8value_t,
22875 ) -> *mut _cef_v8array_buffer_release_callback_t,
22876 >,
22877 #[doc = "\n Prevent the ArrayBuffer from using it's memory block by setting the length\n to zero. This operation cannot be undone. If the ArrayBuffer was created\n with CreateArrayBuffer then\n cef_v8array_buffer_release_callback_t::ReleaseBuffer will be called to\n release the underlying buffer.\n"]
22878 pub neuter_array_buffer: ::std::option::Option<
22879 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> ::std::os::raw::c_int,
22880 >,
22881 #[doc = "\n Returns the function name.\n"]
22882 pub get_function_name: ::std::option::Option<
22883 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> cef_string_userfree_t,
22884 >,
22885 #[doc = "\n Returns the function handler or NULL if not a CEF-created function.\n"]
22886 pub get_function_handler: ::std::option::Option<
22887 unsafe extern "C" fn(self_: *mut _cef_v8value_t) -> *mut _cef_v8handler_t,
22888 >,
22889 #[doc = "\n Execute the function using the current V8 context. This function should\n only be called from within the scope of a cef_v8handler_t or\n cef_v8accessor_t callback, or in combination with calling enter() and\n exit() on a stored cef_v8context_t reference. |object| is the receiver\n ('this' object) of the function. If |object| is NULL the current context's\n global object will be used. |arguments| is the list of arguments that will\n be passed to the function. Returns the function return value on success.\n Returns NULL if this function is called incorrectly or an exception is\n thrown.\n"]
22890 pub execute_function: ::std::option::Option<
22891 unsafe extern "C" fn(
22892 self_: *mut _cef_v8value_t,
22893 object: *mut _cef_v8value_t,
22894 argumentsCount: usize,
22895 arguments: *const *mut _cef_v8value_t,
22896 ) -> *mut _cef_v8value_t,
22897 >,
22898 #[doc = "\n Execute the function using the specified V8 context. |object| is the\n receiver ('this' object) of the function. If |object| is NULL the\n specified context's global object will be used. |arguments| is the list of\n arguments that will be passed to the function. Returns the function return\n value on success. Returns NULL if this function is called incorrectly or\n an exception is thrown.\n"]
22899 pub execute_function_with_context: ::std::option::Option<
22900 unsafe extern "C" fn(
22901 self_: *mut _cef_v8value_t,
22902 context: *mut _cef_v8context_t,
22903 object: *mut _cef_v8value_t,
22904 argumentsCount: usize,
22905 arguments: *const *mut _cef_v8value_t,
22906 ) -> *mut _cef_v8value_t,
22907 >,
22908 #[doc = "\n Resolve the Promise using the current V8 context. This function should\n only be called from within the scope of a cef_v8handler_t or\n cef_v8accessor_t callback, or in combination with calling enter() and\n exit() on a stored cef_v8context_t reference. |arg| is the argument passed\n to the resolved promise. Returns true (1) on success. Returns false (0) if\n this function is called incorrectly or an exception is thrown.\n"]
22909 pub resolve_promise: ::std::option::Option<
22910 unsafe extern "C" fn(
22911 self_: *mut _cef_v8value_t,
22912 arg: *mut _cef_v8value_t,
22913 ) -> ::std::os::raw::c_int,
22914 >,
22915 #[doc = "\n Reject the Promise using the current V8 context. This function should only\n be called from within the scope of a cef_v8handler_t or cef_v8accessor_t\n callback, or in combination with calling enter() and exit() on a stored\n cef_v8context_t reference. Returns true (1) on success. Returns false (0)\n if this function is called incorrectly or an exception is thrown.\n"]
22916 pub reject_promise: ::std::option::Option<
22917 unsafe extern "C" fn(
22918 self_: *mut _cef_v8value_t,
22919 errorMsg: *const cef_string_t,
22920 ) -> ::std::os::raw::c_int,
22921 >,
22922}
22923#[test]
22924fn bindgen_test_layout__cef_v8value_t() {
22925 const UNINIT: ::std::mem::MaybeUninit<_cef_v8value_t> = ::std::mem::MaybeUninit::uninit();
22926 let ptr = UNINIT.as_ptr();
22927 assert_eq!(
22928 ::std::mem::size_of::<_cef_v8value_t>(),
22929 440usize,
22930 concat!("Size of: ", stringify!(_cef_v8value_t))
22931 );
22932 assert_eq!(
22933 ::std::mem::align_of::<_cef_v8value_t>(),
22934 8usize,
22935 concat!("Alignment of ", stringify!(_cef_v8value_t))
22936 );
22937 assert_eq!(
22938 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
22939 0usize,
22940 concat!(
22941 "Offset of field: ",
22942 stringify!(_cef_v8value_t),
22943 "::",
22944 stringify!(base)
22945 )
22946 );
22947 assert_eq!(
22948 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
22949 40usize,
22950 concat!(
22951 "Offset of field: ",
22952 stringify!(_cef_v8value_t),
22953 "::",
22954 stringify!(is_valid)
22955 )
22956 );
22957 assert_eq!(
22958 unsafe { ::std::ptr::addr_of!((*ptr).is_undefined) as usize - ptr as usize },
22959 48usize,
22960 concat!(
22961 "Offset of field: ",
22962 stringify!(_cef_v8value_t),
22963 "::",
22964 stringify!(is_undefined)
22965 )
22966 );
22967 assert_eq!(
22968 unsafe { ::std::ptr::addr_of!((*ptr).is_null) as usize - ptr as usize },
22969 56usize,
22970 concat!(
22971 "Offset of field: ",
22972 stringify!(_cef_v8value_t),
22973 "::",
22974 stringify!(is_null)
22975 )
22976 );
22977 assert_eq!(
22978 unsafe { ::std::ptr::addr_of!((*ptr).is_bool) as usize - ptr as usize },
22979 64usize,
22980 concat!(
22981 "Offset of field: ",
22982 stringify!(_cef_v8value_t),
22983 "::",
22984 stringify!(is_bool)
22985 )
22986 );
22987 assert_eq!(
22988 unsafe { ::std::ptr::addr_of!((*ptr).is_int) as usize - ptr as usize },
22989 72usize,
22990 concat!(
22991 "Offset of field: ",
22992 stringify!(_cef_v8value_t),
22993 "::",
22994 stringify!(is_int)
22995 )
22996 );
22997 assert_eq!(
22998 unsafe { ::std::ptr::addr_of!((*ptr).is_uint) as usize - ptr as usize },
22999 80usize,
23000 concat!(
23001 "Offset of field: ",
23002 stringify!(_cef_v8value_t),
23003 "::",
23004 stringify!(is_uint)
23005 )
23006 );
23007 assert_eq!(
23008 unsafe { ::std::ptr::addr_of!((*ptr).is_double) as usize - ptr as usize },
23009 88usize,
23010 concat!(
23011 "Offset of field: ",
23012 stringify!(_cef_v8value_t),
23013 "::",
23014 stringify!(is_double)
23015 )
23016 );
23017 assert_eq!(
23018 unsafe { ::std::ptr::addr_of!((*ptr).is_date) as usize - ptr as usize },
23019 96usize,
23020 concat!(
23021 "Offset of field: ",
23022 stringify!(_cef_v8value_t),
23023 "::",
23024 stringify!(is_date)
23025 )
23026 );
23027 assert_eq!(
23028 unsafe { ::std::ptr::addr_of!((*ptr).is_string) as usize - ptr as usize },
23029 104usize,
23030 concat!(
23031 "Offset of field: ",
23032 stringify!(_cef_v8value_t),
23033 "::",
23034 stringify!(is_string)
23035 )
23036 );
23037 assert_eq!(
23038 unsafe { ::std::ptr::addr_of!((*ptr).is_object) as usize - ptr as usize },
23039 112usize,
23040 concat!(
23041 "Offset of field: ",
23042 stringify!(_cef_v8value_t),
23043 "::",
23044 stringify!(is_object)
23045 )
23046 );
23047 assert_eq!(
23048 unsafe { ::std::ptr::addr_of!((*ptr).is_array) as usize - ptr as usize },
23049 120usize,
23050 concat!(
23051 "Offset of field: ",
23052 stringify!(_cef_v8value_t),
23053 "::",
23054 stringify!(is_array)
23055 )
23056 );
23057 assert_eq!(
23058 unsafe { ::std::ptr::addr_of!((*ptr).is_array_buffer) as usize - ptr as usize },
23059 128usize,
23060 concat!(
23061 "Offset of field: ",
23062 stringify!(_cef_v8value_t),
23063 "::",
23064 stringify!(is_array_buffer)
23065 )
23066 );
23067 assert_eq!(
23068 unsafe { ::std::ptr::addr_of!((*ptr).is_function) as usize - ptr as usize },
23069 136usize,
23070 concat!(
23071 "Offset of field: ",
23072 stringify!(_cef_v8value_t),
23073 "::",
23074 stringify!(is_function)
23075 )
23076 );
23077 assert_eq!(
23078 unsafe { ::std::ptr::addr_of!((*ptr).is_promise) as usize - ptr as usize },
23079 144usize,
23080 concat!(
23081 "Offset of field: ",
23082 stringify!(_cef_v8value_t),
23083 "::",
23084 stringify!(is_promise)
23085 )
23086 );
23087 assert_eq!(
23088 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
23089 152usize,
23090 concat!(
23091 "Offset of field: ",
23092 stringify!(_cef_v8value_t),
23093 "::",
23094 stringify!(is_same)
23095 )
23096 );
23097 assert_eq!(
23098 unsafe { ::std::ptr::addr_of!((*ptr).get_bool_value) as usize - ptr as usize },
23099 160usize,
23100 concat!(
23101 "Offset of field: ",
23102 stringify!(_cef_v8value_t),
23103 "::",
23104 stringify!(get_bool_value)
23105 )
23106 );
23107 assert_eq!(
23108 unsafe { ::std::ptr::addr_of!((*ptr).get_int_value) as usize - ptr as usize },
23109 168usize,
23110 concat!(
23111 "Offset of field: ",
23112 stringify!(_cef_v8value_t),
23113 "::",
23114 stringify!(get_int_value)
23115 )
23116 );
23117 assert_eq!(
23118 unsafe { ::std::ptr::addr_of!((*ptr).get_uint_value) as usize - ptr as usize },
23119 176usize,
23120 concat!(
23121 "Offset of field: ",
23122 stringify!(_cef_v8value_t),
23123 "::",
23124 stringify!(get_uint_value)
23125 )
23126 );
23127 assert_eq!(
23128 unsafe { ::std::ptr::addr_of!((*ptr).get_double_value) as usize - ptr as usize },
23129 184usize,
23130 concat!(
23131 "Offset of field: ",
23132 stringify!(_cef_v8value_t),
23133 "::",
23134 stringify!(get_double_value)
23135 )
23136 );
23137 assert_eq!(
23138 unsafe { ::std::ptr::addr_of!((*ptr).get_date_value) as usize - ptr as usize },
23139 192usize,
23140 concat!(
23141 "Offset of field: ",
23142 stringify!(_cef_v8value_t),
23143 "::",
23144 stringify!(get_date_value)
23145 )
23146 );
23147 assert_eq!(
23148 unsafe { ::std::ptr::addr_of!((*ptr).get_string_value) as usize - ptr as usize },
23149 200usize,
23150 concat!(
23151 "Offset of field: ",
23152 stringify!(_cef_v8value_t),
23153 "::",
23154 stringify!(get_string_value)
23155 )
23156 );
23157 assert_eq!(
23158 unsafe { ::std::ptr::addr_of!((*ptr).is_user_created) as usize - ptr as usize },
23159 208usize,
23160 concat!(
23161 "Offset of field: ",
23162 stringify!(_cef_v8value_t),
23163 "::",
23164 stringify!(is_user_created)
23165 )
23166 );
23167 assert_eq!(
23168 unsafe { ::std::ptr::addr_of!((*ptr).has_exception) as usize - ptr as usize },
23169 216usize,
23170 concat!(
23171 "Offset of field: ",
23172 stringify!(_cef_v8value_t),
23173 "::",
23174 stringify!(has_exception)
23175 )
23176 );
23177 assert_eq!(
23178 unsafe { ::std::ptr::addr_of!((*ptr).get_exception) as usize - ptr as usize },
23179 224usize,
23180 concat!(
23181 "Offset of field: ",
23182 stringify!(_cef_v8value_t),
23183 "::",
23184 stringify!(get_exception)
23185 )
23186 );
23187 assert_eq!(
23188 unsafe { ::std::ptr::addr_of!((*ptr).clear_exception) as usize - ptr as usize },
23189 232usize,
23190 concat!(
23191 "Offset of field: ",
23192 stringify!(_cef_v8value_t),
23193 "::",
23194 stringify!(clear_exception)
23195 )
23196 );
23197 assert_eq!(
23198 unsafe { ::std::ptr::addr_of!((*ptr).will_rethrow_exceptions) as usize - ptr as usize },
23199 240usize,
23200 concat!(
23201 "Offset of field: ",
23202 stringify!(_cef_v8value_t),
23203 "::",
23204 stringify!(will_rethrow_exceptions)
23205 )
23206 );
23207 assert_eq!(
23208 unsafe { ::std::ptr::addr_of!((*ptr).set_rethrow_exceptions) as usize - ptr as usize },
23209 248usize,
23210 concat!(
23211 "Offset of field: ",
23212 stringify!(_cef_v8value_t),
23213 "::",
23214 stringify!(set_rethrow_exceptions)
23215 )
23216 );
23217 assert_eq!(
23218 unsafe { ::std::ptr::addr_of!((*ptr).has_value_bykey) as usize - ptr as usize },
23219 256usize,
23220 concat!(
23221 "Offset of field: ",
23222 stringify!(_cef_v8value_t),
23223 "::",
23224 stringify!(has_value_bykey)
23225 )
23226 );
23227 assert_eq!(
23228 unsafe { ::std::ptr::addr_of!((*ptr).has_value_byindex) as usize - ptr as usize },
23229 264usize,
23230 concat!(
23231 "Offset of field: ",
23232 stringify!(_cef_v8value_t),
23233 "::",
23234 stringify!(has_value_byindex)
23235 )
23236 );
23237 assert_eq!(
23238 unsafe { ::std::ptr::addr_of!((*ptr).delete_value_bykey) as usize - ptr as usize },
23239 272usize,
23240 concat!(
23241 "Offset of field: ",
23242 stringify!(_cef_v8value_t),
23243 "::",
23244 stringify!(delete_value_bykey)
23245 )
23246 );
23247 assert_eq!(
23248 unsafe { ::std::ptr::addr_of!((*ptr).delete_value_byindex) as usize - ptr as usize },
23249 280usize,
23250 concat!(
23251 "Offset of field: ",
23252 stringify!(_cef_v8value_t),
23253 "::",
23254 stringify!(delete_value_byindex)
23255 )
23256 );
23257 assert_eq!(
23258 unsafe { ::std::ptr::addr_of!((*ptr).get_value_bykey) as usize - ptr as usize },
23259 288usize,
23260 concat!(
23261 "Offset of field: ",
23262 stringify!(_cef_v8value_t),
23263 "::",
23264 stringify!(get_value_bykey)
23265 )
23266 );
23267 assert_eq!(
23268 unsafe { ::std::ptr::addr_of!((*ptr).get_value_byindex) as usize - ptr as usize },
23269 296usize,
23270 concat!(
23271 "Offset of field: ",
23272 stringify!(_cef_v8value_t),
23273 "::",
23274 stringify!(get_value_byindex)
23275 )
23276 );
23277 assert_eq!(
23278 unsafe { ::std::ptr::addr_of!((*ptr).set_value_bykey) as usize - ptr as usize },
23279 304usize,
23280 concat!(
23281 "Offset of field: ",
23282 stringify!(_cef_v8value_t),
23283 "::",
23284 stringify!(set_value_bykey)
23285 )
23286 );
23287 assert_eq!(
23288 unsafe { ::std::ptr::addr_of!((*ptr).set_value_byindex) as usize - ptr as usize },
23289 312usize,
23290 concat!(
23291 "Offset of field: ",
23292 stringify!(_cef_v8value_t),
23293 "::",
23294 stringify!(set_value_byindex)
23295 )
23296 );
23297 assert_eq!(
23298 unsafe { ::std::ptr::addr_of!((*ptr).set_value_byaccessor) as usize - ptr as usize },
23299 320usize,
23300 concat!(
23301 "Offset of field: ",
23302 stringify!(_cef_v8value_t),
23303 "::",
23304 stringify!(set_value_byaccessor)
23305 )
23306 );
23307 assert_eq!(
23308 unsafe { ::std::ptr::addr_of!((*ptr).get_keys) as usize - ptr as usize },
23309 328usize,
23310 concat!(
23311 "Offset of field: ",
23312 stringify!(_cef_v8value_t),
23313 "::",
23314 stringify!(get_keys)
23315 )
23316 );
23317 assert_eq!(
23318 unsafe { ::std::ptr::addr_of!((*ptr).set_user_data) as usize - ptr as usize },
23319 336usize,
23320 concat!(
23321 "Offset of field: ",
23322 stringify!(_cef_v8value_t),
23323 "::",
23324 stringify!(set_user_data)
23325 )
23326 );
23327 assert_eq!(
23328 unsafe { ::std::ptr::addr_of!((*ptr).get_user_data) as usize - ptr as usize },
23329 344usize,
23330 concat!(
23331 "Offset of field: ",
23332 stringify!(_cef_v8value_t),
23333 "::",
23334 stringify!(get_user_data)
23335 )
23336 );
23337 assert_eq!(
23338 unsafe {
23339 ::std::ptr::addr_of!((*ptr).get_externally_allocated_memory) as usize - ptr as usize
23340 },
23341 352usize,
23342 concat!(
23343 "Offset of field: ",
23344 stringify!(_cef_v8value_t),
23345 "::",
23346 stringify!(get_externally_allocated_memory)
23347 )
23348 );
23349 assert_eq!(
23350 unsafe {
23351 ::std::ptr::addr_of!((*ptr).adjust_externally_allocated_memory) as usize - ptr as usize
23352 },
23353 360usize,
23354 concat!(
23355 "Offset of field: ",
23356 stringify!(_cef_v8value_t),
23357 "::",
23358 stringify!(adjust_externally_allocated_memory)
23359 )
23360 );
23361 assert_eq!(
23362 unsafe { ::std::ptr::addr_of!((*ptr).get_array_length) as usize - ptr as usize },
23363 368usize,
23364 concat!(
23365 "Offset of field: ",
23366 stringify!(_cef_v8value_t),
23367 "::",
23368 stringify!(get_array_length)
23369 )
23370 );
23371 assert_eq!(
23372 unsafe {
23373 ::std::ptr::addr_of!((*ptr).get_array_buffer_release_callback) as usize - ptr as usize
23374 },
23375 376usize,
23376 concat!(
23377 "Offset of field: ",
23378 stringify!(_cef_v8value_t),
23379 "::",
23380 stringify!(get_array_buffer_release_callback)
23381 )
23382 );
23383 assert_eq!(
23384 unsafe { ::std::ptr::addr_of!((*ptr).neuter_array_buffer) as usize - ptr as usize },
23385 384usize,
23386 concat!(
23387 "Offset of field: ",
23388 stringify!(_cef_v8value_t),
23389 "::",
23390 stringify!(neuter_array_buffer)
23391 )
23392 );
23393 assert_eq!(
23394 unsafe { ::std::ptr::addr_of!((*ptr).get_function_name) as usize - ptr as usize },
23395 392usize,
23396 concat!(
23397 "Offset of field: ",
23398 stringify!(_cef_v8value_t),
23399 "::",
23400 stringify!(get_function_name)
23401 )
23402 );
23403 assert_eq!(
23404 unsafe { ::std::ptr::addr_of!((*ptr).get_function_handler) as usize - ptr as usize },
23405 400usize,
23406 concat!(
23407 "Offset of field: ",
23408 stringify!(_cef_v8value_t),
23409 "::",
23410 stringify!(get_function_handler)
23411 )
23412 );
23413 assert_eq!(
23414 unsafe { ::std::ptr::addr_of!((*ptr).execute_function) as usize - ptr as usize },
23415 408usize,
23416 concat!(
23417 "Offset of field: ",
23418 stringify!(_cef_v8value_t),
23419 "::",
23420 stringify!(execute_function)
23421 )
23422 );
23423 assert_eq!(
23424 unsafe {
23425 ::std::ptr::addr_of!((*ptr).execute_function_with_context) as usize - ptr as usize
23426 },
23427 416usize,
23428 concat!(
23429 "Offset of field: ",
23430 stringify!(_cef_v8value_t),
23431 "::",
23432 stringify!(execute_function_with_context)
23433 )
23434 );
23435 assert_eq!(
23436 unsafe { ::std::ptr::addr_of!((*ptr).resolve_promise) as usize - ptr as usize },
23437 424usize,
23438 concat!(
23439 "Offset of field: ",
23440 stringify!(_cef_v8value_t),
23441 "::",
23442 stringify!(resolve_promise)
23443 )
23444 );
23445 assert_eq!(
23446 unsafe { ::std::ptr::addr_of!((*ptr).reject_promise) as usize - ptr as usize },
23447 432usize,
23448 concat!(
23449 "Offset of field: ",
23450 stringify!(_cef_v8value_t),
23451 "::",
23452 stringify!(reject_promise)
23453 )
23454 );
23455}
23456#[doc = "\n Structure representing a V8 value handle. V8 handles can only be accessed\n from the thread on which they are created. Valid threads for creating a V8\n handle include the render process main thread (TID_RENDERER) and WebWorker\n threads. A task runner for posting tasks on the associated thread can be\n retrieved via the cef_v8context_t::get_task_runner() function.\n"]
23457pub type cef_v8value_t = _cef_v8value_t;
23458extern "C" {
23459 #[doc = "\n Create a new cef_v8value_t object of type undefined.\n"]
23460 pub fn cef_v8value_create_undefined() -> *mut cef_v8value_t;
23461}
23462extern "C" {
23463 #[doc = "\n Create a new cef_v8value_t object of type null.\n"]
23464 pub fn cef_v8value_create_null() -> *mut cef_v8value_t;
23465}
23466extern "C" {
23467 #[doc = "\n Create a new cef_v8value_t object of type bool.\n"]
23468 pub fn cef_v8value_create_bool(value: ::std::os::raw::c_int) -> *mut cef_v8value_t;
23469}
23470extern "C" {
23471 #[doc = "\n Create a new cef_v8value_t object of type int.\n"]
23472 pub fn cef_v8value_create_int(value: i32) -> *mut cef_v8value_t;
23473}
23474extern "C" {
23475 #[doc = "\n Create a new cef_v8value_t object of type unsigned int.\n"]
23476 pub fn cef_v8value_create_uint(value: u32) -> *mut cef_v8value_t;
23477}
23478extern "C" {
23479 #[doc = "\n Create a new cef_v8value_t object of type double.\n"]
23480 pub fn cef_v8value_create_double(value: f64) -> *mut cef_v8value_t;
23481}
23482extern "C" {
23483 #[doc = "\n Create a new cef_v8value_t object of type Date. This function should only be\n called from within the scope of a cef_render_process_handler_t,\n cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling\n enter() and exit() on a stored cef_v8context_t reference.\n"]
23484 pub fn cef_v8value_create_date(date: cef_basetime_t) -> *mut cef_v8value_t;
23485}
23486extern "C" {
23487 #[doc = "\n Create a new cef_v8value_t object of type string.\n"]
23488 pub fn cef_v8value_create_string(value: *const cef_string_t) -> *mut cef_v8value_t;
23489}
23490extern "C" {
23491 #[doc = "\n Create a new cef_v8value_t object of type object with optional accessor\n and/or interceptor. This function should only be called from within the\n scope of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t\n callback, or in combination with calling enter() and exit() on a stored\n cef_v8context_t reference.\n"]
23492 pub fn cef_v8value_create_object(
23493 accessor: *mut cef_v8accessor_t,
23494 interceptor: *mut cef_v8interceptor_t,
23495 ) -> *mut cef_v8value_t;
23496}
23497extern "C" {
23498 #[doc = "\n Create a new cef_v8value_t object of type array with the specified |length|.\n If |length| is negative the returned array will have length 0. This function\n should only be called from within the scope of a\n cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback,\n or in combination with calling enter() and exit() on a stored\n cef_v8context_t reference.\n"]
23499 pub fn cef_v8value_create_array(length: ::std::os::raw::c_int) -> *mut cef_v8value_t;
23500}
23501extern "C" {
23502 #[doc = "\n Create a new cef_v8value_t object of type ArrayBuffer which wraps the\n provided |buffer| of size |length| bytes. The ArrayBuffer is externalized,\n meaning that it does not own |buffer|. The caller is responsible for freeing\n |buffer| when requested via a call to\n cef_v8array_buffer_release_callback_t::ReleaseBuffer. This function should\n only be called from within the scope of a cef_render_process_handler_t,\n cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling\n enter() and exit() on a stored cef_v8context_t reference.\n"]
23503 pub fn cef_v8value_create_array_buffer(
23504 buffer: *mut ::std::os::raw::c_void,
23505 length: usize,
23506 release_callback: *mut cef_v8array_buffer_release_callback_t,
23507 ) -> *mut cef_v8value_t;
23508}
23509extern "C" {
23510 #[doc = "\n Create a new cef_v8value_t object of type function. This function should\n only be called from within the scope of a cef_render_process_handler_t,\n cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling\n enter() and exit() on a stored cef_v8context_t reference.\n"]
23511 pub fn cef_v8value_create_function(
23512 name: *const cef_string_t,
23513 handler: *mut cef_v8handler_t,
23514 ) -> *mut cef_v8value_t;
23515}
23516extern "C" {
23517 #[doc = "\n Create a new cef_v8value_t object of type Promise. This function should only\n be called from within the scope of a cef_render_process_handler_t,\n cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling\n enter() and exit() on a stored cef_v8context_t reference.\n"]
23518 pub fn cef_v8value_create_promise() -> *mut cef_v8value_t;
23519}
23520#[doc = "\n Structure representing a V8 stack trace handle. V8 handles can only be\n accessed from the thread on which they are created. Valid threads for\n creating a V8 handle include the render process main thread (TID_RENDERER)\n and WebWorker threads. A task runner for posting tasks on the associated\n thread can be retrieved via the cef_v8context_t::get_task_runner() function.\n"]
23521#[repr(C)]
23522#[derive(Debug, Copy, Clone)]
23523pub struct _cef_v8stack_trace_t {
23524 #[doc = "\n Base structure.\n"]
23525 pub base: cef_base_ref_counted_t,
23526 #[doc = "\n Returns true (1) if the underlying handle is valid and it can be accessed\n on the current thread. Do not call any other functions if this function\n returns false (0).\n"]
23527 pub is_valid: ::std::option::Option<
23528 unsafe extern "C" fn(self_: *mut _cef_v8stack_trace_t) -> ::std::os::raw::c_int,
23529 >,
23530 #[doc = "\n Returns the number of stack frames.\n"]
23531 pub get_frame_count: ::std::option::Option<
23532 unsafe extern "C" fn(self_: *mut _cef_v8stack_trace_t) -> ::std::os::raw::c_int,
23533 >,
23534 #[doc = "\n Returns the stack frame at the specified 0-based index.\n"]
23535 pub get_frame: ::std::option::Option<
23536 unsafe extern "C" fn(
23537 self_: *mut _cef_v8stack_trace_t,
23538 index: ::std::os::raw::c_int,
23539 ) -> *mut _cef_v8stack_frame_t,
23540 >,
23541}
23542#[test]
23543fn bindgen_test_layout__cef_v8stack_trace_t() {
23544 const UNINIT: ::std::mem::MaybeUninit<_cef_v8stack_trace_t> = ::std::mem::MaybeUninit::uninit();
23545 let ptr = UNINIT.as_ptr();
23546 assert_eq!(
23547 ::std::mem::size_of::<_cef_v8stack_trace_t>(),
23548 64usize,
23549 concat!("Size of: ", stringify!(_cef_v8stack_trace_t))
23550 );
23551 assert_eq!(
23552 ::std::mem::align_of::<_cef_v8stack_trace_t>(),
23553 8usize,
23554 concat!("Alignment of ", stringify!(_cef_v8stack_trace_t))
23555 );
23556 assert_eq!(
23557 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
23558 0usize,
23559 concat!(
23560 "Offset of field: ",
23561 stringify!(_cef_v8stack_trace_t),
23562 "::",
23563 stringify!(base)
23564 )
23565 );
23566 assert_eq!(
23567 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
23568 40usize,
23569 concat!(
23570 "Offset of field: ",
23571 stringify!(_cef_v8stack_trace_t),
23572 "::",
23573 stringify!(is_valid)
23574 )
23575 );
23576 assert_eq!(
23577 unsafe { ::std::ptr::addr_of!((*ptr).get_frame_count) as usize - ptr as usize },
23578 48usize,
23579 concat!(
23580 "Offset of field: ",
23581 stringify!(_cef_v8stack_trace_t),
23582 "::",
23583 stringify!(get_frame_count)
23584 )
23585 );
23586 assert_eq!(
23587 unsafe { ::std::ptr::addr_of!((*ptr).get_frame) as usize - ptr as usize },
23588 56usize,
23589 concat!(
23590 "Offset of field: ",
23591 stringify!(_cef_v8stack_trace_t),
23592 "::",
23593 stringify!(get_frame)
23594 )
23595 );
23596}
23597#[doc = "\n Structure representing a V8 stack trace handle. V8 handles can only be\n accessed from the thread on which they are created. Valid threads for\n creating a V8 handle include the render process main thread (TID_RENDERER)\n and WebWorker threads. A task runner for posting tasks on the associated\n thread can be retrieved via the cef_v8context_t::get_task_runner() function.\n"]
23598pub type cef_v8stack_trace_t = _cef_v8stack_trace_t;
23599extern "C" {
23600 #[doc = "\n Returns the stack trace for the currently active context. |frame_limit| is\n the maximum number of frames that will be captured.\n"]
23601 pub fn cef_v8stack_trace_get_current(
23602 frame_limit: ::std::os::raw::c_int,
23603 ) -> *mut cef_v8stack_trace_t;
23604}
23605#[doc = "\n Structure representing a V8 stack frame handle. V8 handles can only be\n accessed from the thread on which they are created. Valid threads for\n creating a V8 handle include the render process main thread (TID_RENDERER)\n and WebWorker threads. A task runner for posting tasks on the associated\n thread can be retrieved via the cef_v8context_t::get_task_runner() function.\n"]
23606#[repr(C)]
23607#[derive(Debug, Copy, Clone)]
23608pub struct _cef_v8stack_frame_t {
23609 #[doc = "\n Base structure.\n"]
23610 pub base: cef_base_ref_counted_t,
23611 #[doc = "\n Returns true (1) if the underlying handle is valid and it can be accessed\n on the current thread. Do not call any other functions if this function\n returns false (0).\n"]
23612 pub is_valid: ::std::option::Option<
23613 unsafe extern "C" fn(self_: *mut _cef_v8stack_frame_t) -> ::std::os::raw::c_int,
23614 >,
23615 #[doc = "\n Returns the name of the resource script that contains the function.\n"]
23616 pub get_script_name: ::std::option::Option<
23617 unsafe extern "C" fn(self_: *mut _cef_v8stack_frame_t) -> cef_string_userfree_t,
23618 >,
23619 #[doc = "\n Returns the name of the resource script that contains the function or the\n sourceURL value if the script name is undefined and its source ends with a\n \"//@ sourceURL=...\" string.\n"]
23620 pub get_script_name_or_source_url: ::std::option::Option<
23621 unsafe extern "C" fn(self_: *mut _cef_v8stack_frame_t) -> cef_string_userfree_t,
23622 >,
23623 #[doc = "\n Returns the name of the function.\n"]
23624 pub get_function_name: ::std::option::Option<
23625 unsafe extern "C" fn(self_: *mut _cef_v8stack_frame_t) -> cef_string_userfree_t,
23626 >,
23627 #[doc = "\n Returns the 1-based line number for the function call or 0 if unknown.\n"]
23628 pub get_line_number: ::std::option::Option<
23629 unsafe extern "C" fn(self_: *mut _cef_v8stack_frame_t) -> ::std::os::raw::c_int,
23630 >,
23631 #[doc = "\n Returns the 1-based column offset on the line for the function call or 0\n if unknown.\n"]
23632 pub get_column: ::std::option::Option<
23633 unsafe extern "C" fn(self_: *mut _cef_v8stack_frame_t) -> ::std::os::raw::c_int,
23634 >,
23635 #[doc = "\n Returns true (1) if the function was compiled using eval().\n"]
23636 pub is_eval: ::std::option::Option<
23637 unsafe extern "C" fn(self_: *mut _cef_v8stack_frame_t) -> ::std::os::raw::c_int,
23638 >,
23639 #[doc = "\n Returns true (1) if the function was called as a constructor via \"new\".\n"]
23640 pub is_constructor: ::std::option::Option<
23641 unsafe extern "C" fn(self_: *mut _cef_v8stack_frame_t) -> ::std::os::raw::c_int,
23642 >,
23643}
23644#[test]
23645fn bindgen_test_layout__cef_v8stack_frame_t() {
23646 const UNINIT: ::std::mem::MaybeUninit<_cef_v8stack_frame_t> = ::std::mem::MaybeUninit::uninit();
23647 let ptr = UNINIT.as_ptr();
23648 assert_eq!(
23649 ::std::mem::size_of::<_cef_v8stack_frame_t>(),
23650 104usize,
23651 concat!("Size of: ", stringify!(_cef_v8stack_frame_t))
23652 );
23653 assert_eq!(
23654 ::std::mem::align_of::<_cef_v8stack_frame_t>(),
23655 8usize,
23656 concat!("Alignment of ", stringify!(_cef_v8stack_frame_t))
23657 );
23658 assert_eq!(
23659 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
23660 0usize,
23661 concat!(
23662 "Offset of field: ",
23663 stringify!(_cef_v8stack_frame_t),
23664 "::",
23665 stringify!(base)
23666 )
23667 );
23668 assert_eq!(
23669 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
23670 40usize,
23671 concat!(
23672 "Offset of field: ",
23673 stringify!(_cef_v8stack_frame_t),
23674 "::",
23675 stringify!(is_valid)
23676 )
23677 );
23678 assert_eq!(
23679 unsafe { ::std::ptr::addr_of!((*ptr).get_script_name) as usize - ptr as usize },
23680 48usize,
23681 concat!(
23682 "Offset of field: ",
23683 stringify!(_cef_v8stack_frame_t),
23684 "::",
23685 stringify!(get_script_name)
23686 )
23687 );
23688 assert_eq!(
23689 unsafe {
23690 ::std::ptr::addr_of!((*ptr).get_script_name_or_source_url) as usize - ptr as usize
23691 },
23692 56usize,
23693 concat!(
23694 "Offset of field: ",
23695 stringify!(_cef_v8stack_frame_t),
23696 "::",
23697 stringify!(get_script_name_or_source_url)
23698 )
23699 );
23700 assert_eq!(
23701 unsafe { ::std::ptr::addr_of!((*ptr).get_function_name) as usize - ptr as usize },
23702 64usize,
23703 concat!(
23704 "Offset of field: ",
23705 stringify!(_cef_v8stack_frame_t),
23706 "::",
23707 stringify!(get_function_name)
23708 )
23709 );
23710 assert_eq!(
23711 unsafe { ::std::ptr::addr_of!((*ptr).get_line_number) as usize - ptr as usize },
23712 72usize,
23713 concat!(
23714 "Offset of field: ",
23715 stringify!(_cef_v8stack_frame_t),
23716 "::",
23717 stringify!(get_line_number)
23718 )
23719 );
23720 assert_eq!(
23721 unsafe { ::std::ptr::addr_of!((*ptr).get_column) as usize - ptr as usize },
23722 80usize,
23723 concat!(
23724 "Offset of field: ",
23725 stringify!(_cef_v8stack_frame_t),
23726 "::",
23727 stringify!(get_column)
23728 )
23729 );
23730 assert_eq!(
23731 unsafe { ::std::ptr::addr_of!((*ptr).is_eval) as usize - ptr as usize },
23732 88usize,
23733 concat!(
23734 "Offset of field: ",
23735 stringify!(_cef_v8stack_frame_t),
23736 "::",
23737 stringify!(is_eval)
23738 )
23739 );
23740 assert_eq!(
23741 unsafe { ::std::ptr::addr_of!((*ptr).is_constructor) as usize - ptr as usize },
23742 96usize,
23743 concat!(
23744 "Offset of field: ",
23745 stringify!(_cef_v8stack_frame_t),
23746 "::",
23747 stringify!(is_constructor)
23748 )
23749 );
23750}
23751#[doc = "\n Structure representing a V8 stack frame handle. V8 handles can only be\n accessed from the thread on which they are created. Valid threads for\n creating a V8 handle include the render process main thread (TID_RENDERER)\n and WebWorker threads. A task runner for posting tasks on the associated\n thread can be retrieved via the cef_v8context_t::get_task_runner() function.\n"]
23752pub type cef_v8stack_frame_t = _cef_v8stack_frame_t;
23753extern "C" {
23754 #[doc = "\n Register a new V8 extension with the specified JavaScript extension code and\n handler. Functions implemented by the handler are prototyped using the\n keyword 'native'. The calling of a native function is restricted to the\n scope in which the prototype of the native function is defined. This\n function may only be called on the render process main thread.\n\n Example JavaScript extension code: <pre>\n // create the 'example' global object if it doesn't already exist.\n if (!example)\n example = {};\n // create the 'example.test' global object if it doesn't already exist.\n if (!example.test)\n example.test = {};\n (function() {\n // Define the function 'example.test.myfunction'.\n example.test.myfunction = function() {\n // Call CefV8Handler::Execute() with the function name 'MyFunction'\n // and no arguments.\n native function MyFunction();\n return MyFunction();\n };\n // Define the getter function for parameter 'example.test.myparam'.\n example.test.__defineGetter__('myparam', function() {\n // Call CefV8Handler::Execute() with the function name 'GetMyParam'\n // and no arguments.\n native function GetMyParam();\n return GetMyParam();\n });\n // Define the setter function for parameter 'example.test.myparam'.\n example.test.__defineSetter__('myparam', function(b) {\n // Call CefV8Handler::Execute() with the function name 'SetMyParam'\n // and a single argument.\n native function SetMyParam();\n if(b) SetMyParam(b);\n });\n\n // Extension definitions can also contain normal JavaScript variables\n // and functions.\n var myint = 0;\n example.test.increment = function() {\n myint += 1;\n return myint;\n };\n })();\n </pre>\n\n Example usage in the page: <pre>\n // Call the function.\n example.test.myfunction();\n // Set the parameter.\n example.test.myparam = value;\n // Get the parameter.\n value = example.test.myparam;\n // Call another function.\n example.test.increment();\n </pre>\n"]
23755 pub fn cef_register_extension(
23756 extension_name: *const cef_string_t,
23757 javascript_code: *const cef_string_t,
23758 handler: *mut cef_v8handler_t,
23759 ) -> ::std::os::raw::c_int;
23760}
23761#[doc = "\n Structure used to implement render process callbacks. The functions of this\n structure will be called on the render process main thread (TID_RENDERER)\n unless otherwise indicated.\n"]
23762#[repr(C)]
23763#[derive(Debug, Copy, Clone)]
23764pub struct _cef_render_process_handler_t {
23765 #[doc = "\n Base structure.\n"]
23766 pub base: cef_base_ref_counted_t,
23767 #[doc = "\n Called after WebKit has been initialized.\n"]
23768 pub on_web_kit_initialized:
23769 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t)>,
23770 #[doc = "\n Called after a browser has been created. When browsing cross-origin a new\n browser will be created before the old browser with the same identifier is\n destroyed. |extra_info| is an optional read-only value originating from\n cef_browser_host_t::cef_browser_host_create_browser(),\n cef_browser_host_t::cef_browser_host_create_browser_sync(),\n cef_life_span_handler_t::on_before_popup() or\n cef_browser_view_t::cef_browser_view_create().\n"]
23771 pub on_browser_created: ::std::option::Option<
23772 unsafe extern "C" fn(
23773 self_: *mut _cef_render_process_handler_t,
23774 browser: *mut _cef_browser_t,
23775 extra_info: *mut _cef_dictionary_value_t,
23776 ),
23777 >,
23778 #[doc = "\n Called before a browser is destroyed.\n"]
23779 pub on_browser_destroyed: ::std::option::Option<
23780 unsafe extern "C" fn(
23781 self_: *mut _cef_render_process_handler_t,
23782 browser: *mut _cef_browser_t,
23783 ),
23784 >,
23785 #[doc = "\n Return the handler for browser load status events.\n"]
23786 pub get_load_handler: ::std::option::Option<
23787 unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t) -> *mut _cef_load_handler_t,
23788 >,
23789 #[doc = "\n Called immediately after the V8 context for a frame has been created. To\n retrieve the JavaScript 'window' object use the\n cef_v8context_t::get_global() function. V8 handles can only be accessed\n from the thread on which they are created. A task runner for posting tasks\n on the associated thread can be retrieved via the\n cef_v8context_t::get_task_runner() function.\n"]
23790 pub on_context_created: ::std::option::Option<
23791 unsafe extern "C" fn(
23792 self_: *mut _cef_render_process_handler_t,
23793 browser: *mut _cef_browser_t,
23794 frame: *mut _cef_frame_t,
23795 context: *mut _cef_v8context_t,
23796 ),
23797 >,
23798 #[doc = "\n Called immediately before the V8 context for a frame is released. No\n references to the context should be kept after this function is called.\n"]
23799 pub on_context_released: ::std::option::Option<
23800 unsafe extern "C" fn(
23801 self_: *mut _cef_render_process_handler_t,
23802 browser: *mut _cef_browser_t,
23803 frame: *mut _cef_frame_t,
23804 context: *mut _cef_v8context_t,
23805 ),
23806 >,
23807 #[doc = "\n Called for global uncaught exceptions in a frame. Execution of this\n callback is disabled by default. To enable set\n cef_settings_t.uncaught_exception_stack_size > 0.\n"]
23808 pub on_uncaught_exception: ::std::option::Option<
23809 unsafe extern "C" fn(
23810 self_: *mut _cef_render_process_handler_t,
23811 browser: *mut _cef_browser_t,
23812 frame: *mut _cef_frame_t,
23813 context: *mut _cef_v8context_t,
23814 exception: *mut _cef_v8exception_t,
23815 stackTrace: *mut _cef_v8stack_trace_t,
23816 ),
23817 >,
23818 #[doc = "\n Called when a new node in the the browser gets focus. The |node| value may\n be NULL if no specific node has gained focus. The node object passed to\n this function represents a snapshot of the DOM at the time this function\n is executed. DOM objects are only valid for the scope of this function. Do\n not keep references to or attempt to access any DOM objects outside the\n scope of this function.\n"]
23819 pub on_focused_node_changed: ::std::option::Option<
23820 unsafe extern "C" fn(
23821 self_: *mut _cef_render_process_handler_t,
23822 browser: *mut _cef_browser_t,
23823 frame: *mut _cef_frame_t,
23824 node: *mut _cef_domnode_t,
23825 ),
23826 >,
23827 #[doc = "\n Called when a new message is received from a different process. Return\n true (1) if the message was handled or false (0) otherwise. It is safe to\n keep a reference to |message| outside of this callback.\n"]
23828 pub on_process_message_received: ::std::option::Option<
23829 unsafe extern "C" fn(
23830 self_: *mut _cef_render_process_handler_t,
23831 browser: *mut _cef_browser_t,
23832 frame: *mut _cef_frame_t,
23833 source_process: cef_process_id_t,
23834 message: *mut _cef_process_message_t,
23835 ) -> ::std::os::raw::c_int,
23836 >,
23837}
23838#[test]
23839fn bindgen_test_layout__cef_render_process_handler_t() {
23840 const UNINIT: ::std::mem::MaybeUninit<_cef_render_process_handler_t> =
23841 ::std::mem::MaybeUninit::uninit();
23842 let ptr = UNINIT.as_ptr();
23843 assert_eq!(
23844 ::std::mem::size_of::<_cef_render_process_handler_t>(),
23845 112usize,
23846 concat!("Size of: ", stringify!(_cef_render_process_handler_t))
23847 );
23848 assert_eq!(
23849 ::std::mem::align_of::<_cef_render_process_handler_t>(),
23850 8usize,
23851 concat!("Alignment of ", stringify!(_cef_render_process_handler_t))
23852 );
23853 assert_eq!(
23854 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
23855 0usize,
23856 concat!(
23857 "Offset of field: ",
23858 stringify!(_cef_render_process_handler_t),
23859 "::",
23860 stringify!(base)
23861 )
23862 );
23863 assert_eq!(
23864 unsafe { ::std::ptr::addr_of!((*ptr).on_web_kit_initialized) as usize - ptr as usize },
23865 40usize,
23866 concat!(
23867 "Offset of field: ",
23868 stringify!(_cef_render_process_handler_t),
23869 "::",
23870 stringify!(on_web_kit_initialized)
23871 )
23872 );
23873 assert_eq!(
23874 unsafe { ::std::ptr::addr_of!((*ptr).on_browser_created) as usize - ptr as usize },
23875 48usize,
23876 concat!(
23877 "Offset of field: ",
23878 stringify!(_cef_render_process_handler_t),
23879 "::",
23880 stringify!(on_browser_created)
23881 )
23882 );
23883 assert_eq!(
23884 unsafe { ::std::ptr::addr_of!((*ptr).on_browser_destroyed) as usize - ptr as usize },
23885 56usize,
23886 concat!(
23887 "Offset of field: ",
23888 stringify!(_cef_render_process_handler_t),
23889 "::",
23890 stringify!(on_browser_destroyed)
23891 )
23892 );
23893 assert_eq!(
23894 unsafe { ::std::ptr::addr_of!((*ptr).get_load_handler) as usize - ptr as usize },
23895 64usize,
23896 concat!(
23897 "Offset of field: ",
23898 stringify!(_cef_render_process_handler_t),
23899 "::",
23900 stringify!(get_load_handler)
23901 )
23902 );
23903 assert_eq!(
23904 unsafe { ::std::ptr::addr_of!((*ptr).on_context_created) as usize - ptr as usize },
23905 72usize,
23906 concat!(
23907 "Offset of field: ",
23908 stringify!(_cef_render_process_handler_t),
23909 "::",
23910 stringify!(on_context_created)
23911 )
23912 );
23913 assert_eq!(
23914 unsafe { ::std::ptr::addr_of!((*ptr).on_context_released) as usize - ptr as usize },
23915 80usize,
23916 concat!(
23917 "Offset of field: ",
23918 stringify!(_cef_render_process_handler_t),
23919 "::",
23920 stringify!(on_context_released)
23921 )
23922 );
23923 assert_eq!(
23924 unsafe { ::std::ptr::addr_of!((*ptr).on_uncaught_exception) as usize - ptr as usize },
23925 88usize,
23926 concat!(
23927 "Offset of field: ",
23928 stringify!(_cef_render_process_handler_t),
23929 "::",
23930 stringify!(on_uncaught_exception)
23931 )
23932 );
23933 assert_eq!(
23934 unsafe { ::std::ptr::addr_of!((*ptr).on_focused_node_changed) as usize - ptr as usize },
23935 96usize,
23936 concat!(
23937 "Offset of field: ",
23938 stringify!(_cef_render_process_handler_t),
23939 "::",
23940 stringify!(on_focused_node_changed)
23941 )
23942 );
23943 assert_eq!(
23944 unsafe { ::std::ptr::addr_of!((*ptr).on_process_message_received) as usize - ptr as usize },
23945 104usize,
23946 concat!(
23947 "Offset of field: ",
23948 stringify!(_cef_render_process_handler_t),
23949 "::",
23950 stringify!(on_process_message_received)
23951 )
23952 );
23953}
23954#[doc = "\n Structure used to implement render process callbacks. The functions of this\n structure will be called on the render process main thread (TID_RENDERER)\n unless otherwise indicated.\n"]
23955pub type cef_render_process_handler_t = _cef_render_process_handler_t;
23956#[doc = "\n Structure used to implement a custom resource bundle structure. See\n CefSettings for additional options related to resource bundle loading. The\n functions of this structure may be called on multiple threads.\n"]
23957#[repr(C)]
23958#[derive(Debug, Copy, Clone)]
23959pub struct _cef_resource_bundle_handler_t {
23960 #[doc = "\n Base structure.\n"]
23961 pub base: cef_base_ref_counted_t,
23962 #[doc = "\n Called to retrieve a localized translation for the specified |string_id|.\n To provide the translation set |string| to the translation string and\n return true (1). To use the default translation return false (0). Include\n cef_pack_strings.h for a listing of valid string ID values.\n"]
23963 pub get_localized_string: ::std::option::Option<
23964 unsafe extern "C" fn(
23965 self_: *mut _cef_resource_bundle_handler_t,
23966 string_id: ::std::os::raw::c_int,
23967 string: *mut cef_string_t,
23968 ) -> ::std::os::raw::c_int,
23969 >,
23970 #[doc = "\n Called to retrieve data for the specified scale independent |resource_id|.\n To provide the resource data set |data| and |data_size| to the data\n pointer and size respectively and return true (1). To use the default\n resource data return false (0). The resource data will not be copied and\n must remain resident in memory. Include cef_pack_resources.h for a listing\n of valid resource ID values.\n"]
23971 pub get_data_resource: ::std::option::Option<
23972 unsafe extern "C" fn(
23973 self_: *mut _cef_resource_bundle_handler_t,
23974 resource_id: ::std::os::raw::c_int,
23975 data: *mut *mut ::std::os::raw::c_void,
23976 data_size: *mut usize,
23977 ) -> ::std::os::raw::c_int,
23978 >,
23979 #[doc = "\n Called to retrieve data for the specified |resource_id| nearest the scale\n factor |scale_factor|. To provide the resource data set |data| and\n |data_size| to the data pointer and size respectively and return true (1).\n To use the default resource data return false (0). The resource data will\n not be copied and must remain resident in memory. Include\n cef_pack_resources.h for a listing of valid resource ID values.\n"]
23980 pub get_data_resource_for_scale: ::std::option::Option<
23981 unsafe extern "C" fn(
23982 self_: *mut _cef_resource_bundle_handler_t,
23983 resource_id: ::std::os::raw::c_int,
23984 scale_factor: cef_scale_factor_t,
23985 data: *mut *mut ::std::os::raw::c_void,
23986 data_size: *mut usize,
23987 ) -> ::std::os::raw::c_int,
23988 >,
23989}
23990#[test]
23991fn bindgen_test_layout__cef_resource_bundle_handler_t() {
23992 const UNINIT: ::std::mem::MaybeUninit<_cef_resource_bundle_handler_t> =
23993 ::std::mem::MaybeUninit::uninit();
23994 let ptr = UNINIT.as_ptr();
23995 assert_eq!(
23996 ::std::mem::size_of::<_cef_resource_bundle_handler_t>(),
23997 64usize,
23998 concat!("Size of: ", stringify!(_cef_resource_bundle_handler_t))
23999 );
24000 assert_eq!(
24001 ::std::mem::align_of::<_cef_resource_bundle_handler_t>(),
24002 8usize,
24003 concat!("Alignment of ", stringify!(_cef_resource_bundle_handler_t))
24004 );
24005 assert_eq!(
24006 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
24007 0usize,
24008 concat!(
24009 "Offset of field: ",
24010 stringify!(_cef_resource_bundle_handler_t),
24011 "::",
24012 stringify!(base)
24013 )
24014 );
24015 assert_eq!(
24016 unsafe { ::std::ptr::addr_of!((*ptr).get_localized_string) as usize - ptr as usize },
24017 40usize,
24018 concat!(
24019 "Offset of field: ",
24020 stringify!(_cef_resource_bundle_handler_t),
24021 "::",
24022 stringify!(get_localized_string)
24023 )
24024 );
24025 assert_eq!(
24026 unsafe { ::std::ptr::addr_of!((*ptr).get_data_resource) as usize - ptr as usize },
24027 48usize,
24028 concat!(
24029 "Offset of field: ",
24030 stringify!(_cef_resource_bundle_handler_t),
24031 "::",
24032 stringify!(get_data_resource)
24033 )
24034 );
24035 assert_eq!(
24036 unsafe { ::std::ptr::addr_of!((*ptr).get_data_resource_for_scale) as usize - ptr as usize },
24037 56usize,
24038 concat!(
24039 "Offset of field: ",
24040 stringify!(_cef_resource_bundle_handler_t),
24041 "::",
24042 stringify!(get_data_resource_for_scale)
24043 )
24044 );
24045}
24046#[doc = "\n Structure used to implement a custom resource bundle structure. See\n CefSettings for additional options related to resource bundle loading. The\n functions of this structure may be called on multiple threads.\n"]
24047pub type cef_resource_bundle_handler_t = _cef_resource_bundle_handler_t;
24048#[doc = "\n Structure that manages custom scheme registrations.\n"]
24049#[repr(C)]
24050#[derive(Debug, Copy, Clone)]
24051pub struct _cef_scheme_registrar_t {
24052 #[doc = "\n Base structure.\n"]
24053 pub base: cef_base_scoped_t,
24054 #[doc = "\n Register a custom scheme. This function should not be called for the\n built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.\n\n See cef_scheme_options_t for possible values for |options|.\n\n This function may be called on any thread. It should only be called once\n per unique |scheme_name| value. If |scheme_name| is already registered or\n if an error occurs this function will return false (0).\n"]
24055 pub add_custom_scheme: ::std::option::Option<
24056 unsafe extern "C" fn(
24057 self_: *mut _cef_scheme_registrar_t,
24058 scheme_name: *const cef_string_t,
24059 options: ::std::os::raw::c_int,
24060 ) -> ::std::os::raw::c_int,
24061 >,
24062}
24063#[test]
24064fn bindgen_test_layout__cef_scheme_registrar_t() {
24065 const UNINIT: ::std::mem::MaybeUninit<_cef_scheme_registrar_t> =
24066 ::std::mem::MaybeUninit::uninit();
24067 let ptr = UNINIT.as_ptr();
24068 assert_eq!(
24069 ::std::mem::size_of::<_cef_scheme_registrar_t>(),
24070 24usize,
24071 concat!("Size of: ", stringify!(_cef_scheme_registrar_t))
24072 );
24073 assert_eq!(
24074 ::std::mem::align_of::<_cef_scheme_registrar_t>(),
24075 8usize,
24076 concat!("Alignment of ", stringify!(_cef_scheme_registrar_t))
24077 );
24078 assert_eq!(
24079 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
24080 0usize,
24081 concat!(
24082 "Offset of field: ",
24083 stringify!(_cef_scheme_registrar_t),
24084 "::",
24085 stringify!(base)
24086 )
24087 );
24088 assert_eq!(
24089 unsafe { ::std::ptr::addr_of!((*ptr).add_custom_scheme) as usize - ptr as usize },
24090 16usize,
24091 concat!(
24092 "Offset of field: ",
24093 stringify!(_cef_scheme_registrar_t),
24094 "::",
24095 stringify!(add_custom_scheme)
24096 )
24097 );
24098}
24099#[doc = "\n Structure that manages custom scheme registrations.\n"]
24100pub type cef_scheme_registrar_t = _cef_scheme_registrar_t;
24101#[doc = "\n Structure that creates cef_resource_handler_t instances for handling scheme\n requests. The functions of this structure will always be called on the IO\n thread.\n"]
24102#[repr(C)]
24103#[derive(Debug, Copy, Clone)]
24104pub struct _cef_scheme_handler_factory_t {
24105 #[doc = "\n Base structure.\n"]
24106 pub base: cef_base_ref_counted_t,
24107 #[doc = "\n Return a new resource handler instance to handle the request or an NULL\n reference to allow default handling of the request. |browser| and |frame|\n will be the browser window and frame respectively that originated the\n request or NULL if the request did not originate from a browser window\n (for example, if the request came from cef_urlrequest_t). The |request|\n object passed to this function cannot be modified.\n"]
24108 pub create: ::std::option::Option<
24109 unsafe extern "C" fn(
24110 self_: *mut _cef_scheme_handler_factory_t,
24111 browser: *mut _cef_browser_t,
24112 frame: *mut _cef_frame_t,
24113 scheme_name: *const cef_string_t,
24114 request: *mut _cef_request_t,
24115 ) -> *mut _cef_resource_handler_t,
24116 >,
24117}
24118#[test]
24119fn bindgen_test_layout__cef_scheme_handler_factory_t() {
24120 const UNINIT: ::std::mem::MaybeUninit<_cef_scheme_handler_factory_t> =
24121 ::std::mem::MaybeUninit::uninit();
24122 let ptr = UNINIT.as_ptr();
24123 assert_eq!(
24124 ::std::mem::size_of::<_cef_scheme_handler_factory_t>(),
24125 48usize,
24126 concat!("Size of: ", stringify!(_cef_scheme_handler_factory_t))
24127 );
24128 assert_eq!(
24129 ::std::mem::align_of::<_cef_scheme_handler_factory_t>(),
24130 8usize,
24131 concat!("Alignment of ", stringify!(_cef_scheme_handler_factory_t))
24132 );
24133 assert_eq!(
24134 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
24135 0usize,
24136 concat!(
24137 "Offset of field: ",
24138 stringify!(_cef_scheme_handler_factory_t),
24139 "::",
24140 stringify!(base)
24141 )
24142 );
24143 assert_eq!(
24144 unsafe { ::std::ptr::addr_of!((*ptr).create) as usize - ptr as usize },
24145 40usize,
24146 concat!(
24147 "Offset of field: ",
24148 stringify!(_cef_scheme_handler_factory_t),
24149 "::",
24150 stringify!(create)
24151 )
24152 );
24153}
24154#[doc = "\n Structure that creates cef_resource_handler_t instances for handling scheme\n requests. The functions of this structure will always be called on the IO\n thread.\n"]
24155pub type cef_scheme_handler_factory_t = _cef_scheme_handler_factory_t;
24156extern "C" {
24157 #[doc = "\n Register a scheme handler factory with the global request context. An NULL\n |domain_name| value for a standard scheme will cause the factory to match\n all domain names. The |domain_name| value will be ignored for non-standard\n schemes. If |scheme_name| is a built-in scheme and no handler is returned by\n |factory| then the built-in scheme handler factory will be called. If\n |scheme_name| is a custom scheme then you must also implement the\n cef_app_t::on_register_custom_schemes() function in all processes. This\n function may be called multiple times to change or remove the factory that\n matches the specified |scheme_name| and optional |domain_name|. Returns\n false (0) if an error occurs. This function may be called on any thread in\n the browser process. Using this function is equivalent to calling cef_reques\n t_context_t::cef_request_context_get_global_context()->register_scheme_handl\n er_factory().\n"]
24158 pub fn cef_register_scheme_handler_factory(
24159 scheme_name: *const cef_string_t,
24160 domain_name: *const cef_string_t,
24161 factory: *mut cef_scheme_handler_factory_t,
24162 ) -> ::std::os::raw::c_int;
24163}
24164extern "C" {
24165 #[doc = "\n Clear all scheme handler factories registered with the global request\n context. Returns false (0) on error. This function may be called on any\n thread in the browser process. Using this function is equivalent to calling\n cef_request_context_t::cef_request_context_get_global_context()->clear_schem\n e_handler_factories().\n"]
24166 pub fn cef_clear_scheme_handler_factories() -> ::std::os::raw::c_int;
24167}
24168#[doc = "\n Implement this structure to provide handler implementations. Methods will be\n called by the process and/or thread indicated.\n"]
24169#[repr(C)]
24170#[derive(Debug, Copy, Clone)]
24171pub struct _cef_app_t {
24172 #[doc = "\n Base structure.\n"]
24173 pub base: cef_base_ref_counted_t,
24174 #[doc = "\n Provides an opportunity to view and/or modify command-line arguments\n before processing by CEF and Chromium. The |process_type| value will be\n NULL for the browser process. Do not keep a reference to the\n cef_command_line_t object passed to this function. The\n cef_settings_t.command_line_args_disabled value can be used to start with\n an NULL command-line object. Any values specified in CefSettings that\n equate to command-line arguments will be set before this function is\n called. Be cautious when using this function to modify command-line\n arguments for non-browser processes as this may result in undefined\n behavior including crashes.\n"]
24175 pub on_before_command_line_processing: ::std::option::Option<
24176 unsafe extern "C" fn(
24177 self_: *mut _cef_app_t,
24178 process_type: *const cef_string_t,
24179 command_line: *mut _cef_command_line_t,
24180 ),
24181 >,
24182 #[doc = "\n Provides an opportunity to register custom schemes. Do not keep a\n reference to the |registrar| object. This function is called on the main\n thread for each process and the registered schemes should be the same\n across all processes.\n"]
24183 pub on_register_custom_schemes: ::std::option::Option<
24184 unsafe extern "C" fn(self_: *mut _cef_app_t, registrar: *mut _cef_scheme_registrar_t),
24185 >,
24186 #[doc = "\n Return the handler for resource bundle events. If\n cef_settings_t.pack_loading_disabled is true (1) a handler must be\n returned. If no handler is returned resources will be loaded from pack\n files. This function is called by the browser and render processes on\n multiple threads.\n"]
24187 pub get_resource_bundle_handler: ::std::option::Option<
24188 unsafe extern "C" fn(self_: *mut _cef_app_t) -> *mut _cef_resource_bundle_handler_t,
24189 >,
24190 #[doc = "\n Return the handler for functionality specific to the browser process. This\n function is called on multiple threads in the browser process.\n"]
24191 pub get_browser_process_handler: ::std::option::Option<
24192 unsafe extern "C" fn(self_: *mut _cef_app_t) -> *mut _cef_browser_process_handler_t,
24193 >,
24194 #[doc = "\n Return the handler for functionality specific to the render process. This\n function is called on the render process main thread.\n"]
24195 pub get_render_process_handler: ::std::option::Option<
24196 unsafe extern "C" fn(self_: *mut _cef_app_t) -> *mut _cef_render_process_handler_t,
24197 >,
24198}
24199#[test]
24200fn bindgen_test_layout__cef_app_t() {
24201 const UNINIT: ::std::mem::MaybeUninit<_cef_app_t> = ::std::mem::MaybeUninit::uninit();
24202 let ptr = UNINIT.as_ptr();
24203 assert_eq!(
24204 ::std::mem::size_of::<_cef_app_t>(),
24205 80usize,
24206 concat!("Size of: ", stringify!(_cef_app_t))
24207 );
24208 assert_eq!(
24209 ::std::mem::align_of::<_cef_app_t>(),
24210 8usize,
24211 concat!("Alignment of ", stringify!(_cef_app_t))
24212 );
24213 assert_eq!(
24214 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
24215 0usize,
24216 concat!(
24217 "Offset of field: ",
24218 stringify!(_cef_app_t),
24219 "::",
24220 stringify!(base)
24221 )
24222 );
24223 assert_eq!(
24224 unsafe {
24225 ::std::ptr::addr_of!((*ptr).on_before_command_line_processing) as usize - ptr as usize
24226 },
24227 40usize,
24228 concat!(
24229 "Offset of field: ",
24230 stringify!(_cef_app_t),
24231 "::",
24232 stringify!(on_before_command_line_processing)
24233 )
24234 );
24235 assert_eq!(
24236 unsafe { ::std::ptr::addr_of!((*ptr).on_register_custom_schemes) as usize - ptr as usize },
24237 48usize,
24238 concat!(
24239 "Offset of field: ",
24240 stringify!(_cef_app_t),
24241 "::",
24242 stringify!(on_register_custom_schemes)
24243 )
24244 );
24245 assert_eq!(
24246 unsafe { ::std::ptr::addr_of!((*ptr).get_resource_bundle_handler) as usize - ptr as usize },
24247 56usize,
24248 concat!(
24249 "Offset of field: ",
24250 stringify!(_cef_app_t),
24251 "::",
24252 stringify!(get_resource_bundle_handler)
24253 )
24254 );
24255 assert_eq!(
24256 unsafe { ::std::ptr::addr_of!((*ptr).get_browser_process_handler) as usize - ptr as usize },
24257 64usize,
24258 concat!(
24259 "Offset of field: ",
24260 stringify!(_cef_app_t),
24261 "::",
24262 stringify!(get_browser_process_handler)
24263 )
24264 );
24265 assert_eq!(
24266 unsafe { ::std::ptr::addr_of!((*ptr).get_render_process_handler) as usize - ptr as usize },
24267 72usize,
24268 concat!(
24269 "Offset of field: ",
24270 stringify!(_cef_app_t),
24271 "::",
24272 stringify!(get_render_process_handler)
24273 )
24274 );
24275}
24276#[doc = "\n Implement this structure to provide handler implementations. Methods will be\n called by the process and/or thread indicated.\n"]
24277pub type cef_app_t = _cef_app_t;
24278extern "C" {
24279 #[doc = "\n This function should be called from the application entry point function to\n execute a secondary process. It can be used to run secondary processes from\n the browser client executable (default behavior) or from a separate\n executable specified by the cef_settings_t.browser_subprocess_path value. If\n called for the browser process (identified by no \"type\" command-line value)\n it will return immediately with a value of -1. If called for a recognized\n secondary process it will block until the process should exit and then\n return the process exit code. The |application| parameter may be NULL. The\n |windows_sandbox_info| parameter is only used on Windows and may be NULL\n (see cef_sandbox_win.h for details).\n"]
24280 pub fn cef_execute_process(
24281 args: *const cef_main_args_t,
24282 application: *mut cef_app_t,
24283 windows_sandbox_info: *mut ::std::os::raw::c_void,
24284 ) -> ::std::os::raw::c_int;
24285}
24286extern "C" {
24287 #[doc = "\n This function should be called on the main application thread to initialize\n the CEF browser process. The |application| parameter may be NULL. A return\n value of true (1) indicates that it succeeded and false (0) indicates that\n it failed. The |windows_sandbox_info| parameter is only used on Windows and\n may be NULL (see cef_sandbox_win.h for details).\n"]
24288 pub fn cef_initialize(
24289 args: *const cef_main_args_t,
24290 settings: *const _cef_settings_t,
24291 application: *mut cef_app_t,
24292 windows_sandbox_info: *mut ::std::os::raw::c_void,
24293 ) -> ::std::os::raw::c_int;
24294}
24295extern "C" {
24296 #[doc = "\n This function should be called on the main application thread to shut down\n the CEF browser process before the application exits.\n"]
24297 pub fn cef_shutdown();
24298}
24299extern "C" {
24300 #[doc = "\n Perform a single iteration of CEF message loop processing. This function is\n provided for cases where the CEF message loop must be integrated into an\n existing application message loop. Use of this function is not recommended\n for most users; use either the cef_run_message_loop() function or\n cef_settings_t.multi_threaded_message_loop if possible. When using this\n function care must be taken to balance performance against excessive CPU\n usage. It is recommended to enable the cef_settings_t.external_message_pump\n option when using this function so that\n cef_browser_process_handler_t::on_schedule_message_pump_work() callbacks can\n facilitate the scheduling process. This function should only be called on\n the main application thread and only if cef_initialize() is called with a\n cef_settings_t.multi_threaded_message_loop value of false (0). This function\n will not block.\n"]
24301 pub fn cef_do_message_loop_work();
24302}
24303extern "C" {
24304 #[doc = "\n Run the CEF message loop. Use this function instead of an application-\n provided message loop to get the best balance between performance and CPU\n usage. This function should only be called on the main application thread\n and only if cef_initialize() is called with a\n cef_settings_t.multi_threaded_message_loop value of false (0). This function\n will block until a quit message is received by the system.\n"]
24305 pub fn cef_run_message_loop();
24306}
24307extern "C" {
24308 #[doc = "\n Quit the CEF message loop that was started by calling\n cef_run_message_loop(). This function should only be called on the main\n application thread and only if cef_run_message_loop() was used.\n"]
24309 pub fn cef_quit_message_loop();
24310}
24311#[doc = "\n Implement this structure to handle view events. All size and position values\n are in density independent pixels (DIP) unless otherwise indicated. The\n functions of this structure will be called on the browser process UI thread\n unless otherwise indicated.\n"]
24312#[repr(C)]
24313#[derive(Debug, Copy, Clone)]
24314pub struct _cef_view_delegate_t {
24315 #[doc = "\n Base structure.\n"]
24316 pub base: cef_base_ref_counted_t,
24317 #[doc = "\n Return the preferred size for |view|. The Layout will use this information\n to determine the display size.\n"]
24318 pub get_preferred_size: ::std::option::Option<
24319 unsafe extern "C" fn(
24320 self_: *mut _cef_view_delegate_t,
24321 view: *mut _cef_view_t,
24322 ) -> cef_size_t,
24323 >,
24324 #[doc = "\n Return the minimum size for |view|.\n"]
24325 pub get_minimum_size: ::std::option::Option<
24326 unsafe extern "C" fn(
24327 self_: *mut _cef_view_delegate_t,
24328 view: *mut _cef_view_t,
24329 ) -> cef_size_t,
24330 >,
24331 #[doc = "\n Return the maximum size for |view|.\n"]
24332 pub get_maximum_size: ::std::option::Option<
24333 unsafe extern "C" fn(
24334 self_: *mut _cef_view_delegate_t,
24335 view: *mut _cef_view_t,
24336 ) -> cef_size_t,
24337 >,
24338 #[doc = "\n Return the height necessary to display |view| with the provided |width|.\n If not specified the result of get_preferred_size().height will be used by\n default. Override if |view|'s preferred height depends upon the width (for\n example, with Labels).\n"]
24339 pub get_height_for_width: ::std::option::Option<
24340 unsafe extern "C" fn(
24341 self_: *mut _cef_view_delegate_t,
24342 view: *mut _cef_view_t,
24343 width: ::std::os::raw::c_int,
24344 ) -> ::std::os::raw::c_int,
24345 >,
24346 #[doc = "\n Called when the parent of |view| has changed. If |view| is being added to\n |parent| then |added| will be true (1). If |view| is being removed from\n |parent| then |added| will be false (0). If |view| is being reparented the\n remove notification will be sent before the add notification. Do not\n modify the view hierarchy in this callback.\n"]
24347 pub on_parent_view_changed: ::std::option::Option<
24348 unsafe extern "C" fn(
24349 self_: *mut _cef_view_delegate_t,
24350 view: *mut _cef_view_t,
24351 added: ::std::os::raw::c_int,
24352 parent: *mut _cef_view_t,
24353 ),
24354 >,
24355 #[doc = "\n Called when a child of |view| has changed. If |child| is being added to\n |view| then |added| will be true (1). If |child| is being removed from\n |view| then |added| will be false (0). If |child| is being reparented the\n remove notification will be sent to the old parent before the add\n notification is sent to the new parent. Do not modify the view hierarchy\n in this callback.\n"]
24356 pub on_child_view_changed: ::std::option::Option<
24357 unsafe extern "C" fn(
24358 self_: *mut _cef_view_delegate_t,
24359 view: *mut _cef_view_t,
24360 added: ::std::os::raw::c_int,
24361 child: *mut _cef_view_t,
24362 ),
24363 >,
24364 #[doc = "\n Called when |view| is added or removed from the cef_window_t.\n"]
24365 pub on_window_changed: ::std::option::Option<
24366 unsafe extern "C" fn(
24367 self_: *mut _cef_view_delegate_t,
24368 view: *mut _cef_view_t,
24369 added: ::std::os::raw::c_int,
24370 ),
24371 >,
24372 #[doc = "\n Called when the layout of |view| has changed.\n"]
24373 pub on_layout_changed: ::std::option::Option<
24374 unsafe extern "C" fn(
24375 self_: *mut _cef_view_delegate_t,
24376 view: *mut _cef_view_t,
24377 new_bounds: *const cef_rect_t,
24378 ),
24379 >,
24380 #[doc = "\n Called when |view| gains focus.\n"]
24381 pub on_focus: ::std::option::Option<
24382 unsafe extern "C" fn(self_: *mut _cef_view_delegate_t, view: *mut _cef_view_t),
24383 >,
24384 #[doc = "\n Called when |view| loses focus.\n"]
24385 pub on_blur: ::std::option::Option<
24386 unsafe extern "C" fn(self_: *mut _cef_view_delegate_t, view: *mut _cef_view_t),
24387 >,
24388}
24389#[test]
24390fn bindgen_test_layout__cef_view_delegate_t() {
24391 const UNINIT: ::std::mem::MaybeUninit<_cef_view_delegate_t> = ::std::mem::MaybeUninit::uninit();
24392 let ptr = UNINIT.as_ptr();
24393 assert_eq!(
24394 ::std::mem::size_of::<_cef_view_delegate_t>(),
24395 120usize,
24396 concat!("Size of: ", stringify!(_cef_view_delegate_t))
24397 );
24398 assert_eq!(
24399 ::std::mem::align_of::<_cef_view_delegate_t>(),
24400 8usize,
24401 concat!("Alignment of ", stringify!(_cef_view_delegate_t))
24402 );
24403 assert_eq!(
24404 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
24405 0usize,
24406 concat!(
24407 "Offset of field: ",
24408 stringify!(_cef_view_delegate_t),
24409 "::",
24410 stringify!(base)
24411 )
24412 );
24413 assert_eq!(
24414 unsafe { ::std::ptr::addr_of!((*ptr).get_preferred_size) as usize - ptr as usize },
24415 40usize,
24416 concat!(
24417 "Offset of field: ",
24418 stringify!(_cef_view_delegate_t),
24419 "::",
24420 stringify!(get_preferred_size)
24421 )
24422 );
24423 assert_eq!(
24424 unsafe { ::std::ptr::addr_of!((*ptr).get_minimum_size) as usize - ptr as usize },
24425 48usize,
24426 concat!(
24427 "Offset of field: ",
24428 stringify!(_cef_view_delegate_t),
24429 "::",
24430 stringify!(get_minimum_size)
24431 )
24432 );
24433 assert_eq!(
24434 unsafe { ::std::ptr::addr_of!((*ptr).get_maximum_size) as usize - ptr as usize },
24435 56usize,
24436 concat!(
24437 "Offset of field: ",
24438 stringify!(_cef_view_delegate_t),
24439 "::",
24440 stringify!(get_maximum_size)
24441 )
24442 );
24443 assert_eq!(
24444 unsafe { ::std::ptr::addr_of!((*ptr).get_height_for_width) as usize - ptr as usize },
24445 64usize,
24446 concat!(
24447 "Offset of field: ",
24448 stringify!(_cef_view_delegate_t),
24449 "::",
24450 stringify!(get_height_for_width)
24451 )
24452 );
24453 assert_eq!(
24454 unsafe { ::std::ptr::addr_of!((*ptr).on_parent_view_changed) as usize - ptr as usize },
24455 72usize,
24456 concat!(
24457 "Offset of field: ",
24458 stringify!(_cef_view_delegate_t),
24459 "::",
24460 stringify!(on_parent_view_changed)
24461 )
24462 );
24463 assert_eq!(
24464 unsafe { ::std::ptr::addr_of!((*ptr).on_child_view_changed) as usize - ptr as usize },
24465 80usize,
24466 concat!(
24467 "Offset of field: ",
24468 stringify!(_cef_view_delegate_t),
24469 "::",
24470 stringify!(on_child_view_changed)
24471 )
24472 );
24473 assert_eq!(
24474 unsafe { ::std::ptr::addr_of!((*ptr).on_window_changed) as usize - ptr as usize },
24475 88usize,
24476 concat!(
24477 "Offset of field: ",
24478 stringify!(_cef_view_delegate_t),
24479 "::",
24480 stringify!(on_window_changed)
24481 )
24482 );
24483 assert_eq!(
24484 unsafe { ::std::ptr::addr_of!((*ptr).on_layout_changed) as usize - ptr as usize },
24485 96usize,
24486 concat!(
24487 "Offset of field: ",
24488 stringify!(_cef_view_delegate_t),
24489 "::",
24490 stringify!(on_layout_changed)
24491 )
24492 );
24493 assert_eq!(
24494 unsafe { ::std::ptr::addr_of!((*ptr).on_focus) as usize - ptr as usize },
24495 104usize,
24496 concat!(
24497 "Offset of field: ",
24498 stringify!(_cef_view_delegate_t),
24499 "::",
24500 stringify!(on_focus)
24501 )
24502 );
24503 assert_eq!(
24504 unsafe { ::std::ptr::addr_of!((*ptr).on_blur) as usize - ptr as usize },
24505 112usize,
24506 concat!(
24507 "Offset of field: ",
24508 stringify!(_cef_view_delegate_t),
24509 "::",
24510 stringify!(on_blur)
24511 )
24512 );
24513}
24514#[doc = "\n Implement this structure to handle view events. All size and position values\n are in density independent pixels (DIP) unless otherwise indicated. The\n functions of this structure will be called on the browser process UI thread\n unless otherwise indicated.\n"]
24515pub type cef_view_delegate_t = _cef_view_delegate_t;
24516#[doc = "\n Implement this structure to handle BrowserView events. The functions of this\n structure will be called on the browser process UI thread unless otherwise\n indicated.\n"]
24517#[repr(C)]
24518#[derive(Debug, Copy, Clone)]
24519pub struct _cef_browser_view_delegate_t {
24520 #[doc = "\n Base structure.\n"]
24521 pub base: cef_view_delegate_t,
24522 #[doc = "\n Called when |browser| associated with |browser_view| is created. This\n function will be called after cef_life_span_handler_t::on_after_created()\n is called for |browser| and before on_popup_browser_view_created() is\n called for |browser|'s parent delegate if |browser| is a popup.\n"]
24523 pub on_browser_created: ::std::option::Option<
24524 unsafe extern "C" fn(
24525 self_: *mut _cef_browser_view_delegate_t,
24526 browser_view: *mut _cef_browser_view_t,
24527 browser: *mut _cef_browser_t,
24528 ),
24529 >,
24530 #[doc = "\n Called when |browser| associated with |browser_view| is destroyed. Release\n all references to |browser| and do not attempt to execute any functions on\n |browser| after this callback returns. This function will be called before\n cef_life_span_handler_t::on_before_close() is called for |browser|.\n"]
24531 pub on_browser_destroyed: ::std::option::Option<
24532 unsafe extern "C" fn(
24533 self_: *mut _cef_browser_view_delegate_t,
24534 browser_view: *mut _cef_browser_view_t,
24535 browser: *mut _cef_browser_t,
24536 ),
24537 >,
24538 #[doc = "\n Called before a new popup BrowserView is created. The popup originated\n from |browser_view|. |settings| and |client| are the values returned from\n cef_life_span_handler_t::on_before_popup(). |is_devtools| will be true (1)\n if the popup will be a DevTools browser. Return the delegate that will be\n used for the new popup BrowserView.\n"]
24539 pub get_delegate_for_popup_browser_view: ::std::option::Option<
24540 unsafe extern "C" fn(
24541 self_: *mut _cef_browser_view_delegate_t,
24542 browser_view: *mut _cef_browser_view_t,
24543 settings: *const _cef_browser_settings_t,
24544 client: *mut _cef_client_t,
24545 is_devtools: ::std::os::raw::c_int,
24546 ) -> *mut _cef_browser_view_delegate_t,
24547 >,
24548 #[doc = "\n Called after |popup_browser_view| is created. This function will be called\n after cef_life_span_handler_t::on_after_created() and on_browser_created()\n are called for the new popup browser. The popup originated from\n |browser_view|. |is_devtools| will be true (1) if the popup is a DevTools\n browser. Optionally add |popup_browser_view| to the views hierarchy\n yourself and return true (1). Otherwise return false (0) and a default\n cef_window_t will be created for the popup.\n"]
24549 pub on_popup_browser_view_created: ::std::option::Option<
24550 unsafe extern "C" fn(
24551 self_: *mut _cef_browser_view_delegate_t,
24552 browser_view: *mut _cef_browser_view_t,
24553 popup_browser_view: *mut _cef_browser_view_t,
24554 is_devtools: ::std::os::raw::c_int,
24555 ) -> ::std::os::raw::c_int,
24556 >,
24557 #[doc = "\n Returns the Chrome toolbar type that will be available via\n cef_browser_view_t::get_chrome_toolbar(). See that function for related\n documentation.\n"]
24558 pub get_chrome_toolbar_type: ::std::option::Option<
24559 unsafe extern "C" fn(
24560 self_: *mut _cef_browser_view_delegate_t,
24561 browser_view: *mut _cef_browser_view_t,
24562 ) -> cef_chrome_toolbar_type_t,
24563 >,
24564 #[doc = "\n Return true (1) to create frameless windows for Document picture-in-\n picture popups. Content in frameless windows should specify draggable\n regions using \"-webkit-app-region: drag\" CSS.\n"]
24565 pub use_frameless_window_for_picture_in_picture: ::std::option::Option<
24566 unsafe extern "C" fn(
24567 self_: *mut _cef_browser_view_delegate_t,
24568 browser_view: *mut _cef_browser_view_t,
24569 ) -> ::std::os::raw::c_int,
24570 >,
24571 #[doc = "\n Called when |browser_view| receives a gesture command. Return true (1) to\n handle (or disable) a |gesture_command| or false (0) to propagate the\n gesture to the browser for default handling. With the Chrome runtime these\n commands can also be handled via cef_command_handler_t::OnChromeCommand.\n"]
24572 pub on_gesture_command: ::std::option::Option<
24573 unsafe extern "C" fn(
24574 self_: *mut _cef_browser_view_delegate_t,
24575 browser_view: *mut _cef_browser_view_t,
24576 gesture_command: cef_gesture_command_t,
24577 ) -> ::std::os::raw::c_int,
24578 >,
24579}
24580#[test]
24581fn bindgen_test_layout__cef_browser_view_delegate_t() {
24582 const UNINIT: ::std::mem::MaybeUninit<_cef_browser_view_delegate_t> =
24583 ::std::mem::MaybeUninit::uninit();
24584 let ptr = UNINIT.as_ptr();
24585 assert_eq!(
24586 ::std::mem::size_of::<_cef_browser_view_delegate_t>(),
24587 176usize,
24588 concat!("Size of: ", stringify!(_cef_browser_view_delegate_t))
24589 );
24590 assert_eq!(
24591 ::std::mem::align_of::<_cef_browser_view_delegate_t>(),
24592 8usize,
24593 concat!("Alignment of ", stringify!(_cef_browser_view_delegate_t))
24594 );
24595 assert_eq!(
24596 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
24597 0usize,
24598 concat!(
24599 "Offset of field: ",
24600 stringify!(_cef_browser_view_delegate_t),
24601 "::",
24602 stringify!(base)
24603 )
24604 );
24605 assert_eq!(
24606 unsafe { ::std::ptr::addr_of!((*ptr).on_browser_created) as usize - ptr as usize },
24607 120usize,
24608 concat!(
24609 "Offset of field: ",
24610 stringify!(_cef_browser_view_delegate_t),
24611 "::",
24612 stringify!(on_browser_created)
24613 )
24614 );
24615 assert_eq!(
24616 unsafe { ::std::ptr::addr_of!((*ptr).on_browser_destroyed) as usize - ptr as usize },
24617 128usize,
24618 concat!(
24619 "Offset of field: ",
24620 stringify!(_cef_browser_view_delegate_t),
24621 "::",
24622 stringify!(on_browser_destroyed)
24623 )
24624 );
24625 assert_eq!(
24626 unsafe {
24627 ::std::ptr::addr_of!((*ptr).get_delegate_for_popup_browser_view) as usize - ptr as usize
24628 },
24629 136usize,
24630 concat!(
24631 "Offset of field: ",
24632 stringify!(_cef_browser_view_delegate_t),
24633 "::",
24634 stringify!(get_delegate_for_popup_browser_view)
24635 )
24636 );
24637 assert_eq!(
24638 unsafe {
24639 ::std::ptr::addr_of!((*ptr).on_popup_browser_view_created) as usize - ptr as usize
24640 },
24641 144usize,
24642 concat!(
24643 "Offset of field: ",
24644 stringify!(_cef_browser_view_delegate_t),
24645 "::",
24646 stringify!(on_popup_browser_view_created)
24647 )
24648 );
24649 assert_eq!(
24650 unsafe { ::std::ptr::addr_of!((*ptr).get_chrome_toolbar_type) as usize - ptr as usize },
24651 152usize,
24652 concat!(
24653 "Offset of field: ",
24654 stringify!(_cef_browser_view_delegate_t),
24655 "::",
24656 stringify!(get_chrome_toolbar_type)
24657 )
24658 );
24659 assert_eq!(
24660 unsafe {
24661 ::std::ptr::addr_of!((*ptr).use_frameless_window_for_picture_in_picture) as usize
24662 - ptr as usize
24663 },
24664 160usize,
24665 concat!(
24666 "Offset of field: ",
24667 stringify!(_cef_browser_view_delegate_t),
24668 "::",
24669 stringify!(use_frameless_window_for_picture_in_picture)
24670 )
24671 );
24672 assert_eq!(
24673 unsafe { ::std::ptr::addr_of!((*ptr).on_gesture_command) as usize - ptr as usize },
24674 168usize,
24675 concat!(
24676 "Offset of field: ",
24677 stringify!(_cef_browser_view_delegate_t),
24678 "::",
24679 stringify!(on_gesture_command)
24680 )
24681 );
24682}
24683#[doc = "\n Implement this structure to handle BrowserView events. The functions of this\n structure will be called on the browser process UI thread unless otherwise\n indicated.\n"]
24684pub type cef_browser_view_delegate_t = _cef_browser_view_delegate_t;
24685#[repr(C)]
24686#[derive(Debug, Copy, Clone)]
24687pub struct _cef_button_t {
24688 _unused: [u8; 0],
24689}
24690#[repr(C)]
24691#[derive(Debug, Copy, Clone)]
24692pub struct _cef_scroll_view_t {
24693 _unused: [u8; 0],
24694}
24695#[repr(C)]
24696#[derive(Debug, Copy, Clone)]
24697pub struct _cef_textfield_t {
24698 _unused: [u8; 0],
24699}
24700#[doc = "\n A View is a rectangle within the views View hierarchy. It is the base\n structure for all Views. All size and position values are in density\n independent pixels (DIP) unless otherwise indicated. Methods must be called\n on the browser process UI thread unless otherwise indicated.\n"]
24701#[repr(C)]
24702#[derive(Debug, Copy, Clone)]
24703pub struct _cef_view_t {
24704 #[doc = "\n Base structure.\n"]
24705 pub base: cef_base_ref_counted_t,
24706 #[doc = "\n Returns this View as a BrowserView or NULL if this is not a BrowserView.\n"]
24707 pub as_browser_view: ::std::option::Option<
24708 unsafe extern "C" fn(self_: *mut _cef_view_t) -> *mut _cef_browser_view_t,
24709 >,
24710 #[doc = "\n Returns this View as a Button or NULL if this is not a Button.\n"]
24711 pub as_button:
24712 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> *mut _cef_button_t>,
24713 #[doc = "\n Returns this View as a Panel or NULL if this is not a Panel.\n"]
24714 pub as_panel:
24715 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> *mut _cef_panel_t>,
24716 #[doc = "\n Returns this View as a ScrollView or NULL if this is not a ScrollView.\n"]
24717 pub as_scroll_view: ::std::option::Option<
24718 unsafe extern "C" fn(self_: *mut _cef_view_t) -> *mut _cef_scroll_view_t,
24719 >,
24720 #[doc = "\n Returns this View as a Textfield or NULL if this is not a Textfield.\n"]
24721 pub as_textfield: ::std::option::Option<
24722 unsafe extern "C" fn(self_: *mut _cef_view_t) -> *mut _cef_textfield_t,
24723 >,
24724 #[doc = "\n Returns the type of this View as a string. Used primarily for testing\n purposes.\n"]
24725 pub get_type_string: ::std::option::Option<
24726 unsafe extern "C" fn(self_: *mut _cef_view_t) -> cef_string_userfree_t,
24727 >,
24728 #[doc = "\n Returns a string representation of this View which includes the type and\n various type-specific identifying attributes. If |include_children| is\n true (1) any child Views will also be included. Used primarily for testing\n purposes.\n"]
24729 pub to_string: ::std::option::Option<
24730 unsafe extern "C" fn(
24731 self_: *mut _cef_view_t,
24732 include_children: ::std::os::raw::c_int,
24733 ) -> cef_string_userfree_t,
24734 >,
24735 #[doc = "\n Returns true (1) if this View is valid.\n"]
24736 pub is_valid: ::std::option::Option<
24737 unsafe extern "C" fn(self_: *mut _cef_view_t) -> ::std::os::raw::c_int,
24738 >,
24739 #[doc = "\n Returns true (1) if this View is currently attached to another View. A\n View can only be attached to one View at a time.\n"]
24740 pub is_attached: ::std::option::Option<
24741 unsafe extern "C" fn(self_: *mut _cef_view_t) -> ::std::os::raw::c_int,
24742 >,
24743 #[doc = "\n Returns true (1) if this View is the same as |that| View.\n"]
24744 pub is_same: ::std::option::Option<
24745 unsafe extern "C" fn(
24746 self_: *mut _cef_view_t,
24747 that: *mut _cef_view_t,
24748 ) -> ::std::os::raw::c_int,
24749 >,
24750 #[doc = "\n Returns the delegate associated with this View, if any.\n"]
24751 pub get_delegate: ::std::option::Option<
24752 unsafe extern "C" fn(self_: *mut _cef_view_t) -> *mut _cef_view_delegate_t,
24753 >,
24754 #[doc = "\n Returns the top-level Window hosting this View, if any.\n"]
24755 pub get_window:
24756 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> *mut _cef_window_t>,
24757 #[doc = "\n Returns the ID for this View.\n"]
24758 pub get_id: ::std::option::Option<
24759 unsafe extern "C" fn(self_: *mut _cef_view_t) -> ::std::os::raw::c_int,
24760 >,
24761 #[doc = "\n Sets the ID for this View. ID should be unique within the subtree that you\n intend to search for it. 0 is the default ID for views.\n"]
24762 pub set_id: ::std::option::Option<
24763 unsafe extern "C" fn(self_: *mut _cef_view_t, id: ::std::os::raw::c_int),
24764 >,
24765 #[doc = "\n Returns the group id of this View, or -1 if not set.\n"]
24766 pub get_group_id: ::std::option::Option<
24767 unsafe extern "C" fn(self_: *mut _cef_view_t) -> ::std::os::raw::c_int,
24768 >,
24769 #[doc = "\n A group id is used to tag Views which are part of the same logical group.\n Focus can be moved between views with the same group using the arrow keys.\n The group id is immutable once it's set.\n"]
24770 pub set_group_id: ::std::option::Option<
24771 unsafe extern "C" fn(self_: *mut _cef_view_t, group_id: ::std::os::raw::c_int),
24772 >,
24773 #[doc = "\n Returns the View that contains this View, if any.\n"]
24774 pub get_parent_view:
24775 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> *mut _cef_view_t>,
24776 #[doc = "\n Recursively descends the view tree starting at this View, and returns the\n first child that it encounters with the given ID. Returns NULL if no\n matching child view is found.\n"]
24777 pub get_view_for_id: ::std::option::Option<
24778 unsafe extern "C" fn(
24779 self_: *mut _cef_view_t,
24780 id: ::std::os::raw::c_int,
24781 ) -> *mut _cef_view_t,
24782 >,
24783 #[doc = "\n Sets the bounds (size and position) of this View. |bounds| is in parent\n coordinates, or DIP screen coordinates if there is no parent.\n"]
24784 pub set_bounds: ::std::option::Option<
24785 unsafe extern "C" fn(self_: *mut _cef_view_t, bounds: *const cef_rect_t),
24786 >,
24787 #[doc = "\n Returns the bounds (size and position) of this View in parent coordinates,\n or DIP screen coordinates if there is no parent.\n"]
24788 pub get_bounds:
24789 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> cef_rect_t>,
24790 #[doc = "\n Returns the bounds (size and position) of this View in DIP screen\n coordinates.\n"]
24791 pub get_bounds_in_screen:
24792 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> cef_rect_t>,
24793 #[doc = "\n Sets the size of this View without changing the position. |size| in parent\n coordinates, or DIP screen coordinates if there is no parent.\n"]
24794 pub set_size: ::std::option::Option<
24795 unsafe extern "C" fn(self_: *mut _cef_view_t, size: *const cef_size_t),
24796 >,
24797 #[doc = "\n Returns the size of this View in parent coordinates, or DIP screen\n coordinates if there is no parent.\n"]
24798 pub get_size:
24799 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> cef_size_t>,
24800 #[doc = "\n Sets the position of this View without changing the size. |position| is in\n parent coordinates, or DIP screen coordinates if there is no parent.\n"]
24801 pub set_position: ::std::option::Option<
24802 unsafe extern "C" fn(self_: *mut _cef_view_t, position: *const cef_point_t),
24803 >,
24804 #[doc = "\n Returns the position of this View. Position is in parent coordinates, or\n DIP screen coordinates if there is no parent.\n"]
24805 pub get_position:
24806 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> cef_point_t>,
24807 #[doc = "\n Sets the insets for this View. |insets| is in parent coordinates, or DIP\n screen coordinates if there is no parent.\n"]
24808 pub set_insets: ::std::option::Option<
24809 unsafe extern "C" fn(self_: *mut _cef_view_t, insets: *const cef_insets_t),
24810 >,
24811 #[doc = "\n Returns the insets for this View in parent coordinates, or DIP screen\n coordinates if there is no parent.\n"]
24812 pub get_insets:
24813 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> cef_insets_t>,
24814 #[doc = "\n Returns the size this View would like to be if enough space is available.\n Size is in parent coordinates, or DIP screen coordinates if there is no\n parent.\n"]
24815 pub get_preferred_size:
24816 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> cef_size_t>,
24817 #[doc = "\n Size this View to its preferred size. Size is in parent coordinates, or\n DIP screen coordinates if there is no parent.\n"]
24818 pub size_to_preferred_size:
24819 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t)>,
24820 #[doc = "\n Returns the minimum size for this View. Size is in parent coordinates, or\n DIP screen coordinates if there is no parent.\n"]
24821 pub get_minimum_size:
24822 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> cef_size_t>,
24823 #[doc = "\n Returns the maximum size for this View. Size is in parent coordinates, or\n DIP screen coordinates if there is no parent.\n"]
24824 pub get_maximum_size:
24825 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> cef_size_t>,
24826 #[doc = "\n Returns the height necessary to display this View with the provided width.\n"]
24827 pub get_height_for_width: ::std::option::Option<
24828 unsafe extern "C" fn(
24829 self_: *mut _cef_view_t,
24830 width: ::std::os::raw::c_int,
24831 ) -> ::std::os::raw::c_int,
24832 >,
24833 #[doc = "\n Indicate that this View and all parent Views require a re-layout. This\n ensures the next call to layout() will propagate to this View even if the\n bounds of parent Views do not change.\n"]
24834 pub invalidate_layout: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t)>,
24835 #[doc = "\n Sets whether this View is visible. Windows are hidden by default and other\n views are visible by default. This View and any parent views must be set\n as visible for this View to be drawn in a Window. If this View is set as\n hidden then it and any child views will not be drawn and, if any of those\n views currently have focus, then focus will also be cleared. Painting is\n scheduled as needed. If this View is a Window then calling this function\n is equivalent to calling the Window show() and hide() functions.\n"]
24836 pub set_visible: ::std::option::Option<
24837 unsafe extern "C" fn(self_: *mut _cef_view_t, visible: ::std::os::raw::c_int),
24838 >,
24839 #[doc = "\n Returns whether this View is visible. A view may be visible but still not\n drawn in a Window if any parent views are hidden. If this View is a Window\n then a return value of true (1) indicates that this Window is currently\n visible to the user on-screen. If this View is not a Window then call\n is_drawn() to determine whether this View and all parent views are visible\n and will be drawn.\n"]
24840 pub is_visible: ::std::option::Option<
24841 unsafe extern "C" fn(self_: *mut _cef_view_t) -> ::std::os::raw::c_int,
24842 >,
24843 #[doc = "\n Returns whether this View is visible and drawn in a Window. A view is\n drawn if it and all parent views are visible. If this View is a Window\n then calling this function is equivalent to calling is_visible().\n Otherwise, to determine if the containing Window is visible to the user\n on-screen call is_visible() on the Window.\n"]
24844 pub is_drawn: ::std::option::Option<
24845 unsafe extern "C" fn(self_: *mut _cef_view_t) -> ::std::os::raw::c_int,
24846 >,
24847 #[doc = "\n Set whether this View is enabled. A disabled View does not receive\n keyboard or mouse inputs. If |enabled| differs from the current value the\n View will be repainted. Also, clears focus if the focused View is\n disabled.\n"]
24848 pub set_enabled: ::std::option::Option<
24849 unsafe extern "C" fn(self_: *mut _cef_view_t, enabled: ::std::os::raw::c_int),
24850 >,
24851 #[doc = "\n Returns whether this View is enabled.\n"]
24852 pub is_enabled: ::std::option::Option<
24853 unsafe extern "C" fn(self_: *mut _cef_view_t) -> ::std::os::raw::c_int,
24854 >,
24855 #[doc = "\n Sets whether this View is capable of taking focus. It will clear focus if\n the focused View is set to be non-focusable. This is false (0) by default\n so that a View used as a container does not get the focus.\n"]
24856 pub set_focusable: ::std::option::Option<
24857 unsafe extern "C" fn(self_: *mut _cef_view_t, focusable: ::std::os::raw::c_int),
24858 >,
24859 #[doc = "\n Returns true (1) if this View is focusable, enabled and drawn.\n"]
24860 pub is_focusable: ::std::option::Option<
24861 unsafe extern "C" fn(self_: *mut _cef_view_t) -> ::std::os::raw::c_int,
24862 >,
24863 #[doc = "\n Return whether this View is focusable when the user requires full keyboard\n access, even though it may not be normally focusable.\n"]
24864 pub is_accessibility_focusable: ::std::option::Option<
24865 unsafe extern "C" fn(self_: *mut _cef_view_t) -> ::std::os::raw::c_int,
24866 >,
24867 #[doc = "\n Request keyboard focus. If this View is focusable it will become the\n focused View.\n"]
24868 pub request_focus: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t)>,
24869 #[doc = "\n Sets the background color for this View.\n"]
24870 pub set_background_color:
24871 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t, color: cef_color_t)>,
24872 #[doc = "\n Returns the background color for this View.\n"]
24873 pub get_background_color:
24874 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_view_t) -> cef_color_t>,
24875 #[doc = "\n Convert |point| from this View's coordinate system to DIP screen\n coordinates. This View must belong to a Window when calling this function.\n Returns true (1) if the conversion is successful or false (0) otherwise.\n Use cef_display_t::convert_point_to_pixels() after calling this function\n if further conversion to display-specific pixel coordinates is desired.\n"]
24876 pub convert_point_to_screen: ::std::option::Option<
24877 unsafe extern "C" fn(
24878 self_: *mut _cef_view_t,
24879 point: *mut cef_point_t,
24880 ) -> ::std::os::raw::c_int,
24881 >,
24882 #[doc = "\n Convert |point| to this View's coordinate system from DIP screen\n coordinates. This View must belong to a Window when calling this function.\n Returns true (1) if the conversion is successful or false (0) otherwise.\n Use cef_display_t::convert_point_from_pixels() before calling this\n function if conversion from display-specific pixel coordinates is\n necessary.\n"]
24883 pub convert_point_from_screen: ::std::option::Option<
24884 unsafe extern "C" fn(
24885 self_: *mut _cef_view_t,
24886 point: *mut cef_point_t,
24887 ) -> ::std::os::raw::c_int,
24888 >,
24889 #[doc = "\n Convert |point| from this View's coordinate system to that of the Window.\n This View must belong to a Window when calling this function. Returns true\n (1) if the conversion is successful or false (0) otherwise.\n"]
24890 pub convert_point_to_window: ::std::option::Option<
24891 unsafe extern "C" fn(
24892 self_: *mut _cef_view_t,
24893 point: *mut cef_point_t,
24894 ) -> ::std::os::raw::c_int,
24895 >,
24896 #[doc = "\n Convert |point| to this View's coordinate system from that of the Window.\n This View must belong to a Window when calling this function. Returns true\n (1) if the conversion is successful or false (0) otherwise.\n"]
24897 pub convert_point_from_window: ::std::option::Option<
24898 unsafe extern "C" fn(
24899 self_: *mut _cef_view_t,
24900 point: *mut cef_point_t,
24901 ) -> ::std::os::raw::c_int,
24902 >,
24903 #[doc = "\n Convert |point| from this View's coordinate system to that of |view|.\n |view| needs to be in the same Window but not necessarily the same view\n hierarchy. Returns true (1) if the conversion is successful or false (0)\n otherwise.\n"]
24904 pub convert_point_to_view: ::std::option::Option<
24905 unsafe extern "C" fn(
24906 self_: *mut _cef_view_t,
24907 view: *mut _cef_view_t,
24908 point: *mut cef_point_t,
24909 ) -> ::std::os::raw::c_int,
24910 >,
24911 #[doc = "\n Convert |point| to this View's coordinate system from that |view|. |view|\n needs to be in the same Window but not necessarily the same view\n hierarchy. Returns true (1) if the conversion is successful or false (0)\n otherwise.\n"]
24912 pub convert_point_from_view: ::std::option::Option<
24913 unsafe extern "C" fn(
24914 self_: *mut _cef_view_t,
24915 view: *mut _cef_view_t,
24916 point: *mut cef_point_t,
24917 ) -> ::std::os::raw::c_int,
24918 >,
24919}
24920#[test]
24921fn bindgen_test_layout__cef_view_t() {
24922 const UNINIT: ::std::mem::MaybeUninit<_cef_view_t> = ::std::mem::MaybeUninit::uninit();
24923 let ptr = UNINIT.as_ptr();
24924 assert_eq!(
24925 ::std::mem::size_of::<_cef_view_t>(),
24926 440usize,
24927 concat!("Size of: ", stringify!(_cef_view_t))
24928 );
24929 assert_eq!(
24930 ::std::mem::align_of::<_cef_view_t>(),
24931 8usize,
24932 concat!("Alignment of ", stringify!(_cef_view_t))
24933 );
24934 assert_eq!(
24935 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
24936 0usize,
24937 concat!(
24938 "Offset of field: ",
24939 stringify!(_cef_view_t),
24940 "::",
24941 stringify!(base)
24942 )
24943 );
24944 assert_eq!(
24945 unsafe { ::std::ptr::addr_of!((*ptr).as_browser_view) as usize - ptr as usize },
24946 40usize,
24947 concat!(
24948 "Offset of field: ",
24949 stringify!(_cef_view_t),
24950 "::",
24951 stringify!(as_browser_view)
24952 )
24953 );
24954 assert_eq!(
24955 unsafe { ::std::ptr::addr_of!((*ptr).as_button) as usize - ptr as usize },
24956 48usize,
24957 concat!(
24958 "Offset of field: ",
24959 stringify!(_cef_view_t),
24960 "::",
24961 stringify!(as_button)
24962 )
24963 );
24964 assert_eq!(
24965 unsafe { ::std::ptr::addr_of!((*ptr).as_panel) as usize - ptr as usize },
24966 56usize,
24967 concat!(
24968 "Offset of field: ",
24969 stringify!(_cef_view_t),
24970 "::",
24971 stringify!(as_panel)
24972 )
24973 );
24974 assert_eq!(
24975 unsafe { ::std::ptr::addr_of!((*ptr).as_scroll_view) as usize - ptr as usize },
24976 64usize,
24977 concat!(
24978 "Offset of field: ",
24979 stringify!(_cef_view_t),
24980 "::",
24981 stringify!(as_scroll_view)
24982 )
24983 );
24984 assert_eq!(
24985 unsafe { ::std::ptr::addr_of!((*ptr).as_textfield) as usize - ptr as usize },
24986 72usize,
24987 concat!(
24988 "Offset of field: ",
24989 stringify!(_cef_view_t),
24990 "::",
24991 stringify!(as_textfield)
24992 )
24993 );
24994 assert_eq!(
24995 unsafe { ::std::ptr::addr_of!((*ptr).get_type_string) as usize - ptr as usize },
24996 80usize,
24997 concat!(
24998 "Offset of field: ",
24999 stringify!(_cef_view_t),
25000 "::",
25001 stringify!(get_type_string)
25002 )
25003 );
25004 assert_eq!(
25005 unsafe { ::std::ptr::addr_of!((*ptr).to_string) as usize - ptr as usize },
25006 88usize,
25007 concat!(
25008 "Offset of field: ",
25009 stringify!(_cef_view_t),
25010 "::",
25011 stringify!(to_string)
25012 )
25013 );
25014 assert_eq!(
25015 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
25016 96usize,
25017 concat!(
25018 "Offset of field: ",
25019 stringify!(_cef_view_t),
25020 "::",
25021 stringify!(is_valid)
25022 )
25023 );
25024 assert_eq!(
25025 unsafe { ::std::ptr::addr_of!((*ptr).is_attached) as usize - ptr as usize },
25026 104usize,
25027 concat!(
25028 "Offset of field: ",
25029 stringify!(_cef_view_t),
25030 "::",
25031 stringify!(is_attached)
25032 )
25033 );
25034 assert_eq!(
25035 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
25036 112usize,
25037 concat!(
25038 "Offset of field: ",
25039 stringify!(_cef_view_t),
25040 "::",
25041 stringify!(is_same)
25042 )
25043 );
25044 assert_eq!(
25045 unsafe { ::std::ptr::addr_of!((*ptr).get_delegate) as usize - ptr as usize },
25046 120usize,
25047 concat!(
25048 "Offset of field: ",
25049 stringify!(_cef_view_t),
25050 "::",
25051 stringify!(get_delegate)
25052 )
25053 );
25054 assert_eq!(
25055 unsafe { ::std::ptr::addr_of!((*ptr).get_window) as usize - ptr as usize },
25056 128usize,
25057 concat!(
25058 "Offset of field: ",
25059 stringify!(_cef_view_t),
25060 "::",
25061 stringify!(get_window)
25062 )
25063 );
25064 assert_eq!(
25065 unsafe { ::std::ptr::addr_of!((*ptr).get_id) as usize - ptr as usize },
25066 136usize,
25067 concat!(
25068 "Offset of field: ",
25069 stringify!(_cef_view_t),
25070 "::",
25071 stringify!(get_id)
25072 )
25073 );
25074 assert_eq!(
25075 unsafe { ::std::ptr::addr_of!((*ptr).set_id) as usize - ptr as usize },
25076 144usize,
25077 concat!(
25078 "Offset of field: ",
25079 stringify!(_cef_view_t),
25080 "::",
25081 stringify!(set_id)
25082 )
25083 );
25084 assert_eq!(
25085 unsafe { ::std::ptr::addr_of!((*ptr).get_group_id) as usize - ptr as usize },
25086 152usize,
25087 concat!(
25088 "Offset of field: ",
25089 stringify!(_cef_view_t),
25090 "::",
25091 stringify!(get_group_id)
25092 )
25093 );
25094 assert_eq!(
25095 unsafe { ::std::ptr::addr_of!((*ptr).set_group_id) as usize - ptr as usize },
25096 160usize,
25097 concat!(
25098 "Offset of field: ",
25099 stringify!(_cef_view_t),
25100 "::",
25101 stringify!(set_group_id)
25102 )
25103 );
25104 assert_eq!(
25105 unsafe { ::std::ptr::addr_of!((*ptr).get_parent_view) as usize - ptr as usize },
25106 168usize,
25107 concat!(
25108 "Offset of field: ",
25109 stringify!(_cef_view_t),
25110 "::",
25111 stringify!(get_parent_view)
25112 )
25113 );
25114 assert_eq!(
25115 unsafe { ::std::ptr::addr_of!((*ptr).get_view_for_id) as usize - ptr as usize },
25116 176usize,
25117 concat!(
25118 "Offset of field: ",
25119 stringify!(_cef_view_t),
25120 "::",
25121 stringify!(get_view_for_id)
25122 )
25123 );
25124 assert_eq!(
25125 unsafe { ::std::ptr::addr_of!((*ptr).set_bounds) as usize - ptr as usize },
25126 184usize,
25127 concat!(
25128 "Offset of field: ",
25129 stringify!(_cef_view_t),
25130 "::",
25131 stringify!(set_bounds)
25132 )
25133 );
25134 assert_eq!(
25135 unsafe { ::std::ptr::addr_of!((*ptr).get_bounds) as usize - ptr as usize },
25136 192usize,
25137 concat!(
25138 "Offset of field: ",
25139 stringify!(_cef_view_t),
25140 "::",
25141 stringify!(get_bounds)
25142 )
25143 );
25144 assert_eq!(
25145 unsafe { ::std::ptr::addr_of!((*ptr).get_bounds_in_screen) as usize - ptr as usize },
25146 200usize,
25147 concat!(
25148 "Offset of field: ",
25149 stringify!(_cef_view_t),
25150 "::",
25151 stringify!(get_bounds_in_screen)
25152 )
25153 );
25154 assert_eq!(
25155 unsafe { ::std::ptr::addr_of!((*ptr).set_size) as usize - ptr as usize },
25156 208usize,
25157 concat!(
25158 "Offset of field: ",
25159 stringify!(_cef_view_t),
25160 "::",
25161 stringify!(set_size)
25162 )
25163 );
25164 assert_eq!(
25165 unsafe { ::std::ptr::addr_of!((*ptr).get_size) as usize - ptr as usize },
25166 216usize,
25167 concat!(
25168 "Offset of field: ",
25169 stringify!(_cef_view_t),
25170 "::",
25171 stringify!(get_size)
25172 )
25173 );
25174 assert_eq!(
25175 unsafe { ::std::ptr::addr_of!((*ptr).set_position) as usize - ptr as usize },
25176 224usize,
25177 concat!(
25178 "Offset of field: ",
25179 stringify!(_cef_view_t),
25180 "::",
25181 stringify!(set_position)
25182 )
25183 );
25184 assert_eq!(
25185 unsafe { ::std::ptr::addr_of!((*ptr).get_position) as usize - ptr as usize },
25186 232usize,
25187 concat!(
25188 "Offset of field: ",
25189 stringify!(_cef_view_t),
25190 "::",
25191 stringify!(get_position)
25192 )
25193 );
25194 assert_eq!(
25195 unsafe { ::std::ptr::addr_of!((*ptr).set_insets) as usize - ptr as usize },
25196 240usize,
25197 concat!(
25198 "Offset of field: ",
25199 stringify!(_cef_view_t),
25200 "::",
25201 stringify!(set_insets)
25202 )
25203 );
25204 assert_eq!(
25205 unsafe { ::std::ptr::addr_of!((*ptr).get_insets) as usize - ptr as usize },
25206 248usize,
25207 concat!(
25208 "Offset of field: ",
25209 stringify!(_cef_view_t),
25210 "::",
25211 stringify!(get_insets)
25212 )
25213 );
25214 assert_eq!(
25215 unsafe { ::std::ptr::addr_of!((*ptr).get_preferred_size) as usize - ptr as usize },
25216 256usize,
25217 concat!(
25218 "Offset of field: ",
25219 stringify!(_cef_view_t),
25220 "::",
25221 stringify!(get_preferred_size)
25222 )
25223 );
25224 assert_eq!(
25225 unsafe { ::std::ptr::addr_of!((*ptr).size_to_preferred_size) as usize - ptr as usize },
25226 264usize,
25227 concat!(
25228 "Offset of field: ",
25229 stringify!(_cef_view_t),
25230 "::",
25231 stringify!(size_to_preferred_size)
25232 )
25233 );
25234 assert_eq!(
25235 unsafe { ::std::ptr::addr_of!((*ptr).get_minimum_size) as usize - ptr as usize },
25236 272usize,
25237 concat!(
25238 "Offset of field: ",
25239 stringify!(_cef_view_t),
25240 "::",
25241 stringify!(get_minimum_size)
25242 )
25243 );
25244 assert_eq!(
25245 unsafe { ::std::ptr::addr_of!((*ptr).get_maximum_size) as usize - ptr as usize },
25246 280usize,
25247 concat!(
25248 "Offset of field: ",
25249 stringify!(_cef_view_t),
25250 "::",
25251 stringify!(get_maximum_size)
25252 )
25253 );
25254 assert_eq!(
25255 unsafe { ::std::ptr::addr_of!((*ptr).get_height_for_width) as usize - ptr as usize },
25256 288usize,
25257 concat!(
25258 "Offset of field: ",
25259 stringify!(_cef_view_t),
25260 "::",
25261 stringify!(get_height_for_width)
25262 )
25263 );
25264 assert_eq!(
25265 unsafe { ::std::ptr::addr_of!((*ptr).invalidate_layout) as usize - ptr as usize },
25266 296usize,
25267 concat!(
25268 "Offset of field: ",
25269 stringify!(_cef_view_t),
25270 "::",
25271 stringify!(invalidate_layout)
25272 )
25273 );
25274 assert_eq!(
25275 unsafe { ::std::ptr::addr_of!((*ptr).set_visible) as usize - ptr as usize },
25276 304usize,
25277 concat!(
25278 "Offset of field: ",
25279 stringify!(_cef_view_t),
25280 "::",
25281 stringify!(set_visible)
25282 )
25283 );
25284 assert_eq!(
25285 unsafe { ::std::ptr::addr_of!((*ptr).is_visible) as usize - ptr as usize },
25286 312usize,
25287 concat!(
25288 "Offset of field: ",
25289 stringify!(_cef_view_t),
25290 "::",
25291 stringify!(is_visible)
25292 )
25293 );
25294 assert_eq!(
25295 unsafe { ::std::ptr::addr_of!((*ptr).is_drawn) as usize - ptr as usize },
25296 320usize,
25297 concat!(
25298 "Offset of field: ",
25299 stringify!(_cef_view_t),
25300 "::",
25301 stringify!(is_drawn)
25302 )
25303 );
25304 assert_eq!(
25305 unsafe { ::std::ptr::addr_of!((*ptr).set_enabled) as usize - ptr as usize },
25306 328usize,
25307 concat!(
25308 "Offset of field: ",
25309 stringify!(_cef_view_t),
25310 "::",
25311 stringify!(set_enabled)
25312 )
25313 );
25314 assert_eq!(
25315 unsafe { ::std::ptr::addr_of!((*ptr).is_enabled) as usize - ptr as usize },
25316 336usize,
25317 concat!(
25318 "Offset of field: ",
25319 stringify!(_cef_view_t),
25320 "::",
25321 stringify!(is_enabled)
25322 )
25323 );
25324 assert_eq!(
25325 unsafe { ::std::ptr::addr_of!((*ptr).set_focusable) as usize - ptr as usize },
25326 344usize,
25327 concat!(
25328 "Offset of field: ",
25329 stringify!(_cef_view_t),
25330 "::",
25331 stringify!(set_focusable)
25332 )
25333 );
25334 assert_eq!(
25335 unsafe { ::std::ptr::addr_of!((*ptr).is_focusable) as usize - ptr as usize },
25336 352usize,
25337 concat!(
25338 "Offset of field: ",
25339 stringify!(_cef_view_t),
25340 "::",
25341 stringify!(is_focusable)
25342 )
25343 );
25344 assert_eq!(
25345 unsafe { ::std::ptr::addr_of!((*ptr).is_accessibility_focusable) as usize - ptr as usize },
25346 360usize,
25347 concat!(
25348 "Offset of field: ",
25349 stringify!(_cef_view_t),
25350 "::",
25351 stringify!(is_accessibility_focusable)
25352 )
25353 );
25354 assert_eq!(
25355 unsafe { ::std::ptr::addr_of!((*ptr).request_focus) as usize - ptr as usize },
25356 368usize,
25357 concat!(
25358 "Offset of field: ",
25359 stringify!(_cef_view_t),
25360 "::",
25361 stringify!(request_focus)
25362 )
25363 );
25364 assert_eq!(
25365 unsafe { ::std::ptr::addr_of!((*ptr).set_background_color) as usize - ptr as usize },
25366 376usize,
25367 concat!(
25368 "Offset of field: ",
25369 stringify!(_cef_view_t),
25370 "::",
25371 stringify!(set_background_color)
25372 )
25373 );
25374 assert_eq!(
25375 unsafe { ::std::ptr::addr_of!((*ptr).get_background_color) as usize - ptr as usize },
25376 384usize,
25377 concat!(
25378 "Offset of field: ",
25379 stringify!(_cef_view_t),
25380 "::",
25381 stringify!(get_background_color)
25382 )
25383 );
25384 assert_eq!(
25385 unsafe { ::std::ptr::addr_of!((*ptr).convert_point_to_screen) as usize - ptr as usize },
25386 392usize,
25387 concat!(
25388 "Offset of field: ",
25389 stringify!(_cef_view_t),
25390 "::",
25391 stringify!(convert_point_to_screen)
25392 )
25393 );
25394 assert_eq!(
25395 unsafe { ::std::ptr::addr_of!((*ptr).convert_point_from_screen) as usize - ptr as usize },
25396 400usize,
25397 concat!(
25398 "Offset of field: ",
25399 stringify!(_cef_view_t),
25400 "::",
25401 stringify!(convert_point_from_screen)
25402 )
25403 );
25404 assert_eq!(
25405 unsafe { ::std::ptr::addr_of!((*ptr).convert_point_to_window) as usize - ptr as usize },
25406 408usize,
25407 concat!(
25408 "Offset of field: ",
25409 stringify!(_cef_view_t),
25410 "::",
25411 stringify!(convert_point_to_window)
25412 )
25413 );
25414 assert_eq!(
25415 unsafe { ::std::ptr::addr_of!((*ptr).convert_point_from_window) as usize - ptr as usize },
25416 416usize,
25417 concat!(
25418 "Offset of field: ",
25419 stringify!(_cef_view_t),
25420 "::",
25421 stringify!(convert_point_from_window)
25422 )
25423 );
25424 assert_eq!(
25425 unsafe { ::std::ptr::addr_of!((*ptr).convert_point_to_view) as usize - ptr as usize },
25426 424usize,
25427 concat!(
25428 "Offset of field: ",
25429 stringify!(_cef_view_t),
25430 "::",
25431 stringify!(convert_point_to_view)
25432 )
25433 );
25434 assert_eq!(
25435 unsafe { ::std::ptr::addr_of!((*ptr).convert_point_from_view) as usize - ptr as usize },
25436 432usize,
25437 concat!(
25438 "Offset of field: ",
25439 stringify!(_cef_view_t),
25440 "::",
25441 stringify!(convert_point_from_view)
25442 )
25443 );
25444}
25445#[doc = "\n A View is a rectangle within the views View hierarchy. It is the base\n structure for all Views. All size and position values are in density\n independent pixels (DIP) unless otherwise indicated. Methods must be called\n on the browser process UI thread unless otherwise indicated.\n"]
25446pub type cef_view_t = _cef_view_t;
25447#[doc = "\n A View hosting a cef_browser_t instance. Methods must be called on the\n browser process UI thread unless otherwise indicated.\n"]
25448#[repr(C)]
25449#[derive(Debug, Copy, Clone)]
25450pub struct _cef_browser_view_t {
25451 #[doc = "\n Base structure.\n"]
25452 pub base: cef_view_t,
25453 #[doc = "\n Returns the cef_browser_t hosted by this BrowserView. Will return NULL if\n the browser has not yet been created or has already been destroyed.\n"]
25454 pub get_browser: ::std::option::Option<
25455 unsafe extern "C" fn(self_: *mut _cef_browser_view_t) -> *mut _cef_browser_t,
25456 >,
25457 #[doc = "\n Returns the Chrome toolbar associated with this BrowserView. Only\n supported when using the Chrome runtime. The cef_browser_view_delegate_t::\n get_chrome_toolbar_type() function must return a value other than\n CEF_CTT_NONE and the toolbar will not be available until after this\n BrowserView is added to a cef_window_t and\n cef_view_delegate_t::on_window_changed() has been called.\n"]
25458 pub get_chrome_toolbar: ::std::option::Option<
25459 unsafe extern "C" fn(self_: *mut _cef_browser_view_t) -> *mut _cef_view_t,
25460 >,
25461 #[doc = "\n Sets whether accelerators registered with cef_window_t::SetAccelerator are\n triggered before or after the event is sent to the cef_browser_t. If\n |prefer_accelerators| is true (1) then the matching accelerator will be\n triggered immediately and the event will not be sent to the cef_browser_t.\n If |prefer_accelerators| is false (0) then the matching accelerator will\n only be triggered if the event is not handled by web content or by\n cef_keyboard_handler_t. The default value is false (0).\n"]
25462 pub set_prefer_accelerators: ::std::option::Option<
25463 unsafe extern "C" fn(
25464 self_: *mut _cef_browser_view_t,
25465 prefer_accelerators: ::std::os::raw::c_int,
25466 ),
25467 >,
25468}
25469#[test]
25470fn bindgen_test_layout__cef_browser_view_t() {
25471 const UNINIT: ::std::mem::MaybeUninit<_cef_browser_view_t> = ::std::mem::MaybeUninit::uninit();
25472 let ptr = UNINIT.as_ptr();
25473 assert_eq!(
25474 ::std::mem::size_of::<_cef_browser_view_t>(),
25475 464usize,
25476 concat!("Size of: ", stringify!(_cef_browser_view_t))
25477 );
25478 assert_eq!(
25479 ::std::mem::align_of::<_cef_browser_view_t>(),
25480 8usize,
25481 concat!("Alignment of ", stringify!(_cef_browser_view_t))
25482 );
25483 assert_eq!(
25484 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
25485 0usize,
25486 concat!(
25487 "Offset of field: ",
25488 stringify!(_cef_browser_view_t),
25489 "::",
25490 stringify!(base)
25491 )
25492 );
25493 assert_eq!(
25494 unsafe { ::std::ptr::addr_of!((*ptr).get_browser) as usize - ptr as usize },
25495 440usize,
25496 concat!(
25497 "Offset of field: ",
25498 stringify!(_cef_browser_view_t),
25499 "::",
25500 stringify!(get_browser)
25501 )
25502 );
25503 assert_eq!(
25504 unsafe { ::std::ptr::addr_of!((*ptr).get_chrome_toolbar) as usize - ptr as usize },
25505 448usize,
25506 concat!(
25507 "Offset of field: ",
25508 stringify!(_cef_browser_view_t),
25509 "::",
25510 stringify!(get_chrome_toolbar)
25511 )
25512 );
25513 assert_eq!(
25514 unsafe { ::std::ptr::addr_of!((*ptr).set_prefer_accelerators) as usize - ptr as usize },
25515 456usize,
25516 concat!(
25517 "Offset of field: ",
25518 stringify!(_cef_browser_view_t),
25519 "::",
25520 stringify!(set_prefer_accelerators)
25521 )
25522 );
25523}
25524#[doc = "\n A View hosting a cef_browser_t instance. Methods must be called on the\n browser process UI thread unless otherwise indicated.\n"]
25525pub type cef_browser_view_t = _cef_browser_view_t;
25526extern "C" {
25527 #[doc = "\n Create a new BrowserView. The underlying cef_browser_t will not be created\n until this view is added to the views hierarchy. The optional |extra_info|\n parameter provides an opportunity to specify extra information specific to\n the created browser that will be passed to\n cef_render_process_handler_t::on_browser_created() in the render process.\n"]
25528 pub fn cef_browser_view_create(
25529 client: *mut _cef_client_t,
25530 url: *const cef_string_t,
25531 settings: *const _cef_browser_settings_t,
25532 extra_info: *mut _cef_dictionary_value_t,
25533 request_context: *mut _cef_request_context_t,
25534 delegate: *mut _cef_browser_view_delegate_t,
25535 ) -> *mut cef_browser_view_t;
25536}
25537extern "C" {
25538 #[doc = "\n Returns the BrowserView associated with |browser|.\n"]
25539 pub fn cef_browser_view_get_for_browser(
25540 browser: *mut _cef_browser_t,
25541 ) -> *mut cef_browser_view_t;
25542}
25543#[doc = "\n This structure typically, but not always, corresponds to a physical display\n connected to the system. A fake Display may exist on a headless system, or a\n Display may correspond to a remote, virtual display. All size and position\n values are in density independent pixel (DIP) coordinates unless otherwise\n indicated. Methods must be called on the browser process UI thread unless\n otherwise indicated.\n"]
25544#[repr(C)]
25545#[derive(Debug, Copy, Clone)]
25546pub struct _cef_display_t {
25547 #[doc = "\n Base structure.\n"]
25548 pub base: cef_base_ref_counted_t,
25549 #[doc = "\n Returns the unique identifier for this Display.\n"]
25550 pub get_id: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_display_t) -> i64>,
25551 #[doc = "\n Returns this Display's device pixel scale factor. This specifies how much\n the UI should be scaled when the actual output has more pixels than\n standard displays (which is around 100~120dpi). The potential return\n values differ by platform.\n"]
25552 pub get_device_scale_factor:
25553 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_display_t) -> f32>,
25554 #[doc = "\n Convert |point| from DIP coordinates to pixel coordinates using this\n Display's device scale factor.\n"]
25555 pub convert_point_to_pixels: ::std::option::Option<
25556 unsafe extern "C" fn(self_: *mut _cef_display_t, point: *mut cef_point_t),
25557 >,
25558 #[doc = "\n Convert |point| from pixel coordinates to DIP coordinates using this\n Display's device scale factor.\n"]
25559 pub convert_point_from_pixels: ::std::option::Option<
25560 unsafe extern "C" fn(self_: *mut _cef_display_t, point: *mut cef_point_t),
25561 >,
25562 #[doc = "\n Returns this Display's bounds in DIP screen coordinates. This is the full\n size of the display.\n"]
25563 pub get_bounds:
25564 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_display_t) -> cef_rect_t>,
25565 #[doc = "\n Returns this Display's work area in DIP screen coordinates. This excludes\n areas of the display that are occupied with window manager toolbars, etc.\n"]
25566 pub get_work_area:
25567 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_display_t) -> cef_rect_t>,
25568 #[doc = "\n Returns this Display's rotation in degrees.\n"]
25569 pub get_rotation: ::std::option::Option<
25570 unsafe extern "C" fn(self_: *mut _cef_display_t) -> ::std::os::raw::c_int,
25571 >,
25572}
25573#[test]
25574fn bindgen_test_layout__cef_display_t() {
25575 const UNINIT: ::std::mem::MaybeUninit<_cef_display_t> = ::std::mem::MaybeUninit::uninit();
25576 let ptr = UNINIT.as_ptr();
25577 assert_eq!(
25578 ::std::mem::size_of::<_cef_display_t>(),
25579 96usize,
25580 concat!("Size of: ", stringify!(_cef_display_t))
25581 );
25582 assert_eq!(
25583 ::std::mem::align_of::<_cef_display_t>(),
25584 8usize,
25585 concat!("Alignment of ", stringify!(_cef_display_t))
25586 );
25587 assert_eq!(
25588 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
25589 0usize,
25590 concat!(
25591 "Offset of field: ",
25592 stringify!(_cef_display_t),
25593 "::",
25594 stringify!(base)
25595 )
25596 );
25597 assert_eq!(
25598 unsafe { ::std::ptr::addr_of!((*ptr).get_id) as usize - ptr as usize },
25599 40usize,
25600 concat!(
25601 "Offset of field: ",
25602 stringify!(_cef_display_t),
25603 "::",
25604 stringify!(get_id)
25605 )
25606 );
25607 assert_eq!(
25608 unsafe { ::std::ptr::addr_of!((*ptr).get_device_scale_factor) as usize - ptr as usize },
25609 48usize,
25610 concat!(
25611 "Offset of field: ",
25612 stringify!(_cef_display_t),
25613 "::",
25614 stringify!(get_device_scale_factor)
25615 )
25616 );
25617 assert_eq!(
25618 unsafe { ::std::ptr::addr_of!((*ptr).convert_point_to_pixels) as usize - ptr as usize },
25619 56usize,
25620 concat!(
25621 "Offset of field: ",
25622 stringify!(_cef_display_t),
25623 "::",
25624 stringify!(convert_point_to_pixels)
25625 )
25626 );
25627 assert_eq!(
25628 unsafe { ::std::ptr::addr_of!((*ptr).convert_point_from_pixels) as usize - ptr as usize },
25629 64usize,
25630 concat!(
25631 "Offset of field: ",
25632 stringify!(_cef_display_t),
25633 "::",
25634 stringify!(convert_point_from_pixels)
25635 )
25636 );
25637 assert_eq!(
25638 unsafe { ::std::ptr::addr_of!((*ptr).get_bounds) as usize - ptr as usize },
25639 72usize,
25640 concat!(
25641 "Offset of field: ",
25642 stringify!(_cef_display_t),
25643 "::",
25644 stringify!(get_bounds)
25645 )
25646 );
25647 assert_eq!(
25648 unsafe { ::std::ptr::addr_of!((*ptr).get_work_area) as usize - ptr as usize },
25649 80usize,
25650 concat!(
25651 "Offset of field: ",
25652 stringify!(_cef_display_t),
25653 "::",
25654 stringify!(get_work_area)
25655 )
25656 );
25657 assert_eq!(
25658 unsafe { ::std::ptr::addr_of!((*ptr).get_rotation) as usize - ptr as usize },
25659 88usize,
25660 concat!(
25661 "Offset of field: ",
25662 stringify!(_cef_display_t),
25663 "::",
25664 stringify!(get_rotation)
25665 )
25666 );
25667}
25668#[doc = "\n This structure typically, but not always, corresponds to a physical display\n connected to the system. A fake Display may exist on a headless system, or a\n Display may correspond to a remote, virtual display. All size and position\n values are in density independent pixel (DIP) coordinates unless otherwise\n indicated. Methods must be called on the browser process UI thread unless\n otherwise indicated.\n"]
25669pub type cef_display_t = _cef_display_t;
25670extern "C" {
25671 #[doc = "\n Returns the primary Display.\n"]
25672 pub fn cef_display_get_primary() -> *mut cef_display_t;
25673}
25674extern "C" {
25675 #[doc = "\n Returns the Display nearest |point|. Set |input_pixel_coords| to true (1) if\n |point| is in pixel screen coordinates instead of DIP screen coordinates.\n"]
25676 pub fn cef_display_get_nearest_point(
25677 point: *const cef_point_t,
25678 input_pixel_coords: ::std::os::raw::c_int,
25679 ) -> *mut cef_display_t;
25680}
25681extern "C" {
25682 #[doc = "\n Returns the Display that most closely intersects |bounds|. Set\n |input_pixel_coords| to true (1) if |bounds| is in pixel screen coordinates\n instead of DIP screen coordinates.\n"]
25683 pub fn cef_display_get_matching_bounds(
25684 bounds: *const cef_rect_t,
25685 input_pixel_coords: ::std::os::raw::c_int,
25686 ) -> *mut cef_display_t;
25687}
25688extern "C" {
25689 #[doc = "\n Returns the total number of Displays. Mirrored displays are excluded; this\n function is intended to return the number of distinct, usable displays.\n"]
25690 pub fn cef_display_get_count() -> usize;
25691}
25692extern "C" {
25693 #[doc = "\n Returns all Displays. Mirrored displays are excluded; this function is\n intended to return distinct, usable displays.\n"]
25694 pub fn cef_display_get_alls(displaysCount: *mut usize, displays: *mut *mut cef_display_t);
25695}
25696extern "C" {
25697 #[doc = "\n Convert |point| from DIP screen coordinates to pixel screen coordinates.\n This function is only used on Windows.\n"]
25698 pub fn cef_display_convert_screen_point_to_pixels(point: *const cef_point_t) -> cef_point_t;
25699}
25700extern "C" {
25701 #[doc = "\n Convert |point| from pixel screen coordinates to DIP screen coordinates.\n This function is only used on Windows.\n"]
25702 pub fn cef_display_convert_screen_point_from_pixels(point: *const cef_point_t) -> cef_point_t;
25703}
25704extern "C" {
25705 #[doc = "\n Convert |rect| from DIP screen coordinates to pixel screen coordinates. This\n function is only used on Windows.\n"]
25706 pub fn cef_display_convert_screen_rect_to_pixels(rect: *const cef_rect_t) -> cef_rect_t;
25707}
25708extern "C" {
25709 #[doc = "\n Convert |rect| from pixel screen coordinates to DIP screen coordinates. This\n function is only used on Windows.\n"]
25710 pub fn cef_display_convert_screen_rect_from_pixels(rect: *const cef_rect_t) -> cef_rect_t;
25711}
25712#[doc = "\n Controller for an overlay that contains a contents View added via\n cef_window_t::AddOverlayView. Methods exposed by this controller should be\n called in preference to functions of the same name exposed by the contents\n View unless otherwise indicated. Methods must be called on the browser\n process UI thread unless otherwise indicated.\n"]
25713#[repr(C)]
25714#[derive(Debug, Copy, Clone)]
25715pub struct _cef_overlay_controller_t {
25716 #[doc = "\n Base structure.\n"]
25717 pub base: cef_base_ref_counted_t,
25718 #[doc = "\n Returns true (1) if this object is valid.\n"]
25719 pub is_valid: ::std::option::Option<
25720 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t) -> ::std::os::raw::c_int,
25721 >,
25722 #[doc = "\n Returns true (1) if this object is the same as |that| object.\n"]
25723 pub is_same: ::std::option::Option<
25724 unsafe extern "C" fn(
25725 self_: *mut _cef_overlay_controller_t,
25726 that: *mut _cef_overlay_controller_t,
25727 ) -> ::std::os::raw::c_int,
25728 >,
25729 #[doc = "\n Returns the contents View for this overlay.\n"]
25730 pub get_contents_view: ::std::option::Option<
25731 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t) -> *mut _cef_view_t,
25732 >,
25733 #[doc = "\n Returns the top-level Window hosting this overlay. Use this function\n instead of calling get_window() on the contents View.\n"]
25734 pub get_window: ::std::option::Option<
25735 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t) -> *mut _cef_window_t,
25736 >,
25737 #[doc = "\n Returns the docking mode for this overlay.\n"]
25738 pub get_docking_mode: ::std::option::Option<
25739 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t) -> cef_docking_mode_t,
25740 >,
25741 #[doc = "\n Destroy this overlay.\n"]
25742 pub destroy: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t)>,
25743 #[doc = "\n Sets the bounds (size and position) of this overlay. This will set the\n bounds of the contents View to match and trigger a re-layout if necessary.\n |bounds| is in parent coordinates and any insets configured on this\n overlay will be ignored. Use this function only for overlays created with\n a docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking modes\n modify the insets of this overlay and/or layout of the contents View and\n call size_to_preferred_size() instead to calculate the new size and re-\n position the overlay if necessary.\n"]
25744 pub set_bounds: ::std::option::Option<
25745 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t, bounds: *const cef_rect_t),
25746 >,
25747 #[doc = "\n Returns the bounds (size and position) of this overlay in parent\n coordinates.\n"]
25748 pub get_bounds: ::std::option::Option<
25749 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t) -> cef_rect_t,
25750 >,
25751 #[doc = "\n Returns the bounds (size and position) of this overlay in DIP screen\n coordinates.\n"]
25752 pub get_bounds_in_screen: ::std::option::Option<
25753 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t) -> cef_rect_t,
25754 >,
25755 #[doc = "\n Sets the size of this overlay without changing the position. This will set\n the size of the contents View to match and trigger a re-layout if\n necessary. |size| is in parent coordinates and any insets configured on\n this overlay will be ignored. Use this function only for overlays created\n with a docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking\n modes modify the insets of this overlay and/or layout of the contents View\n and call size_to_preferred_size() instead to calculate the new size and\n re-position the overlay if necessary.\n"]
25756 pub set_size: ::std::option::Option<
25757 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t, size: *const cef_size_t),
25758 >,
25759 #[doc = "\n Returns the size of this overlay in parent coordinates.\n"]
25760 pub get_size: ::std::option::Option<
25761 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t) -> cef_size_t,
25762 >,
25763 #[doc = "\n Sets the position of this overlay without changing the size. |position| is\n in parent coordinates and any insets configured on this overlay will be\n ignored. Use this function only for overlays created with a docking mode\n value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the\n insets of this overlay and/or layout of the contents View and call\n size_to_preferred_size() instead to calculate the new size and re-position\n the overlay if necessary.\n"]
25764 pub set_position: ::std::option::Option<
25765 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t, position: *const cef_point_t),
25766 >,
25767 #[doc = "\n Returns the position of this overlay in parent coordinates.\n"]
25768 pub get_position: ::std::option::Option<
25769 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t) -> cef_point_t,
25770 >,
25771 #[doc = "\n Sets the insets for this overlay. |insets| is in parent coordinates. Use\n this function only for overlays created with a docking mode value other\n than CEF_DOCKING_MODE_CUSTOM.\n"]
25772 pub set_insets: ::std::option::Option<
25773 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t, insets: *const cef_insets_t),
25774 >,
25775 #[doc = "\n Returns the insets for this overlay in parent coordinates.\n"]
25776 pub get_insets: ::std::option::Option<
25777 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t) -> cef_insets_t,
25778 >,
25779 #[doc = "\n Size this overlay to its preferred size and trigger a re-layout if\n necessary. The position of overlays created with a docking mode value of\n CEF_DOCKING_MODE_CUSTOM will not be modified by calling this function.\n With other docking modes this function may re-position the overlay if\n necessary to accommodate the new size and any insets configured on the\n contents View.\n"]
25780 pub size_to_preferred_size:
25781 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t)>,
25782 #[doc = "\n Sets whether this overlay is visible. Overlays are hidden by default. If\n this overlay is hidden then it and any child Views will not be drawn and,\n if any of those Views currently have focus, then focus will also be\n cleared. Painting is scheduled as needed.\n"]
25783 pub set_visible: ::std::option::Option<
25784 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t, visible: ::std::os::raw::c_int),
25785 >,
25786 #[doc = "\n Returns whether this overlay is visible. A View may be visible but still\n not drawn in a Window if any parent Views are hidden. Call is_drawn() to\n determine whether this overlay and all parent Views are visible and will\n be drawn.\n"]
25787 pub is_visible: ::std::option::Option<
25788 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t) -> ::std::os::raw::c_int,
25789 >,
25790 #[doc = "\n Returns whether this overlay is visible and drawn in a Window. A View is\n drawn if it and all parent Views are visible. To determine if the\n containing Window is visible to the user on-screen call is_visible() on\n the Window.\n"]
25791 pub is_drawn: ::std::option::Option<
25792 unsafe extern "C" fn(self_: *mut _cef_overlay_controller_t) -> ::std::os::raw::c_int,
25793 >,
25794}
25795#[test]
25796fn bindgen_test_layout__cef_overlay_controller_t() {
25797 const UNINIT: ::std::mem::MaybeUninit<_cef_overlay_controller_t> =
25798 ::std::mem::MaybeUninit::uninit();
25799 let ptr = UNINIT.as_ptr();
25800 assert_eq!(
25801 ::std::mem::size_of::<_cef_overlay_controller_t>(),
25802 192usize,
25803 concat!("Size of: ", stringify!(_cef_overlay_controller_t))
25804 );
25805 assert_eq!(
25806 ::std::mem::align_of::<_cef_overlay_controller_t>(),
25807 8usize,
25808 concat!("Alignment of ", stringify!(_cef_overlay_controller_t))
25809 );
25810 assert_eq!(
25811 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
25812 0usize,
25813 concat!(
25814 "Offset of field: ",
25815 stringify!(_cef_overlay_controller_t),
25816 "::",
25817 stringify!(base)
25818 )
25819 );
25820 assert_eq!(
25821 unsafe { ::std::ptr::addr_of!((*ptr).is_valid) as usize - ptr as usize },
25822 40usize,
25823 concat!(
25824 "Offset of field: ",
25825 stringify!(_cef_overlay_controller_t),
25826 "::",
25827 stringify!(is_valid)
25828 )
25829 );
25830 assert_eq!(
25831 unsafe { ::std::ptr::addr_of!((*ptr).is_same) as usize - ptr as usize },
25832 48usize,
25833 concat!(
25834 "Offset of field: ",
25835 stringify!(_cef_overlay_controller_t),
25836 "::",
25837 stringify!(is_same)
25838 )
25839 );
25840 assert_eq!(
25841 unsafe { ::std::ptr::addr_of!((*ptr).get_contents_view) as usize - ptr as usize },
25842 56usize,
25843 concat!(
25844 "Offset of field: ",
25845 stringify!(_cef_overlay_controller_t),
25846 "::",
25847 stringify!(get_contents_view)
25848 )
25849 );
25850 assert_eq!(
25851 unsafe { ::std::ptr::addr_of!((*ptr).get_window) as usize - ptr as usize },
25852 64usize,
25853 concat!(
25854 "Offset of field: ",
25855 stringify!(_cef_overlay_controller_t),
25856 "::",
25857 stringify!(get_window)
25858 )
25859 );
25860 assert_eq!(
25861 unsafe { ::std::ptr::addr_of!((*ptr).get_docking_mode) as usize - ptr as usize },
25862 72usize,
25863 concat!(
25864 "Offset of field: ",
25865 stringify!(_cef_overlay_controller_t),
25866 "::",
25867 stringify!(get_docking_mode)
25868 )
25869 );
25870 assert_eq!(
25871 unsafe { ::std::ptr::addr_of!((*ptr).destroy) as usize - ptr as usize },
25872 80usize,
25873 concat!(
25874 "Offset of field: ",
25875 stringify!(_cef_overlay_controller_t),
25876 "::",
25877 stringify!(destroy)
25878 )
25879 );
25880 assert_eq!(
25881 unsafe { ::std::ptr::addr_of!((*ptr).set_bounds) as usize - ptr as usize },
25882 88usize,
25883 concat!(
25884 "Offset of field: ",
25885 stringify!(_cef_overlay_controller_t),
25886 "::",
25887 stringify!(set_bounds)
25888 )
25889 );
25890 assert_eq!(
25891 unsafe { ::std::ptr::addr_of!((*ptr).get_bounds) as usize - ptr as usize },
25892 96usize,
25893 concat!(
25894 "Offset of field: ",
25895 stringify!(_cef_overlay_controller_t),
25896 "::",
25897 stringify!(get_bounds)
25898 )
25899 );
25900 assert_eq!(
25901 unsafe { ::std::ptr::addr_of!((*ptr).get_bounds_in_screen) as usize - ptr as usize },
25902 104usize,
25903 concat!(
25904 "Offset of field: ",
25905 stringify!(_cef_overlay_controller_t),
25906 "::",
25907 stringify!(get_bounds_in_screen)
25908 )
25909 );
25910 assert_eq!(
25911 unsafe { ::std::ptr::addr_of!((*ptr).set_size) as usize - ptr as usize },
25912 112usize,
25913 concat!(
25914 "Offset of field: ",
25915 stringify!(_cef_overlay_controller_t),
25916 "::",
25917 stringify!(set_size)
25918 )
25919 );
25920 assert_eq!(
25921 unsafe { ::std::ptr::addr_of!((*ptr).get_size) as usize - ptr as usize },
25922 120usize,
25923 concat!(
25924 "Offset of field: ",
25925 stringify!(_cef_overlay_controller_t),
25926 "::",
25927 stringify!(get_size)
25928 )
25929 );
25930 assert_eq!(
25931 unsafe { ::std::ptr::addr_of!((*ptr).set_position) as usize - ptr as usize },
25932 128usize,
25933 concat!(
25934 "Offset of field: ",
25935 stringify!(_cef_overlay_controller_t),
25936 "::",
25937 stringify!(set_position)
25938 )
25939 );
25940 assert_eq!(
25941 unsafe { ::std::ptr::addr_of!((*ptr).get_position) as usize - ptr as usize },
25942 136usize,
25943 concat!(
25944 "Offset of field: ",
25945 stringify!(_cef_overlay_controller_t),
25946 "::",
25947 stringify!(get_position)
25948 )
25949 );
25950 assert_eq!(
25951 unsafe { ::std::ptr::addr_of!((*ptr).set_insets) as usize - ptr as usize },
25952 144usize,
25953 concat!(
25954 "Offset of field: ",
25955 stringify!(_cef_overlay_controller_t),
25956 "::",
25957 stringify!(set_insets)
25958 )
25959 );
25960 assert_eq!(
25961 unsafe { ::std::ptr::addr_of!((*ptr).get_insets) as usize - ptr as usize },
25962 152usize,
25963 concat!(
25964 "Offset of field: ",
25965 stringify!(_cef_overlay_controller_t),
25966 "::",
25967 stringify!(get_insets)
25968 )
25969 );
25970 assert_eq!(
25971 unsafe { ::std::ptr::addr_of!((*ptr).size_to_preferred_size) as usize - ptr as usize },
25972 160usize,
25973 concat!(
25974 "Offset of field: ",
25975 stringify!(_cef_overlay_controller_t),
25976 "::",
25977 stringify!(size_to_preferred_size)
25978 )
25979 );
25980 assert_eq!(
25981 unsafe { ::std::ptr::addr_of!((*ptr).set_visible) as usize - ptr as usize },
25982 168usize,
25983 concat!(
25984 "Offset of field: ",
25985 stringify!(_cef_overlay_controller_t),
25986 "::",
25987 stringify!(set_visible)
25988 )
25989 );
25990 assert_eq!(
25991 unsafe { ::std::ptr::addr_of!((*ptr).is_visible) as usize - ptr as usize },
25992 176usize,
25993 concat!(
25994 "Offset of field: ",
25995 stringify!(_cef_overlay_controller_t),
25996 "::",
25997 stringify!(is_visible)
25998 )
25999 );
26000 assert_eq!(
26001 unsafe { ::std::ptr::addr_of!((*ptr).is_drawn) as usize - ptr as usize },
26002 184usize,
26003 concat!(
26004 "Offset of field: ",
26005 stringify!(_cef_overlay_controller_t),
26006 "::",
26007 stringify!(is_drawn)
26008 )
26009 );
26010}
26011#[doc = "\n Controller for an overlay that contains a contents View added via\n cef_window_t::AddOverlayView. Methods exposed by this controller should be\n called in preference to functions of the same name exposed by the contents\n View unless otherwise indicated. Methods must be called on the browser\n process UI thread unless otherwise indicated.\n"]
26012pub type cef_overlay_controller_t = _cef_overlay_controller_t;
26013#[doc = "\n Implement this structure to handle Panel events. The functions of this\n structure will be called on the browser process UI thread unless otherwise\n indicated.\n"]
26014#[repr(C)]
26015#[derive(Debug, Copy, Clone)]
26016pub struct _cef_panel_delegate_t {
26017 #[doc = "\n Base structure.\n"]
26018 pub base: cef_view_delegate_t,
26019}
26020#[test]
26021fn bindgen_test_layout__cef_panel_delegate_t() {
26022 const UNINIT: ::std::mem::MaybeUninit<_cef_panel_delegate_t> =
26023 ::std::mem::MaybeUninit::uninit();
26024 let ptr = UNINIT.as_ptr();
26025 assert_eq!(
26026 ::std::mem::size_of::<_cef_panel_delegate_t>(),
26027 120usize,
26028 concat!("Size of: ", stringify!(_cef_panel_delegate_t))
26029 );
26030 assert_eq!(
26031 ::std::mem::align_of::<_cef_panel_delegate_t>(),
26032 8usize,
26033 concat!("Alignment of ", stringify!(_cef_panel_delegate_t))
26034 );
26035 assert_eq!(
26036 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
26037 0usize,
26038 concat!(
26039 "Offset of field: ",
26040 stringify!(_cef_panel_delegate_t),
26041 "::",
26042 stringify!(base)
26043 )
26044 );
26045}
26046#[doc = "\n Implement this structure to handle Panel events. The functions of this\n structure will be called on the browser process UI thread unless otherwise\n indicated.\n"]
26047pub type cef_panel_delegate_t = _cef_panel_delegate_t;
26048#[repr(C)]
26049#[derive(Debug, Copy, Clone)]
26050pub struct _cef_box_layout_t {
26051 _unused: [u8; 0],
26052}
26053#[repr(C)]
26054#[derive(Debug, Copy, Clone)]
26055pub struct _cef_fill_layout_t {
26056 _unused: [u8; 0],
26057}
26058#[repr(C)]
26059#[derive(Debug, Copy, Clone)]
26060pub struct _cef_layout_t {
26061 _unused: [u8; 0],
26062}
26063#[doc = "\n A Panel is a container in the views hierarchy that can contain other Views\n as children. Methods must be called on the browser process UI thread unless\n otherwise indicated.\n"]
26064#[repr(C)]
26065#[derive(Debug, Copy, Clone)]
26066pub struct _cef_panel_t {
26067 #[doc = "\n Base structure.\n"]
26068 pub base: cef_view_t,
26069 #[doc = "\n Returns this Panel as a Window or NULL if this is not a Window.\n"]
26070 pub as_window:
26071 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_panel_t) -> *mut _cef_window_t>,
26072 #[doc = "\n Set this Panel's Layout to FillLayout and return the FillLayout object.\n"]
26073 pub set_to_fill_layout: ::std::option::Option<
26074 unsafe extern "C" fn(self_: *mut _cef_panel_t) -> *mut _cef_fill_layout_t,
26075 >,
26076 #[doc = "\n Set this Panel's Layout to BoxLayout and return the BoxLayout object.\n"]
26077 pub set_to_box_layout: ::std::option::Option<
26078 unsafe extern "C" fn(
26079 self_: *mut _cef_panel_t,
26080 settings: *const cef_box_layout_settings_t,
26081 ) -> *mut _cef_box_layout_t,
26082 >,
26083 #[doc = "\n Get the Layout.\n"]
26084 pub get_layout:
26085 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_panel_t) -> *mut _cef_layout_t>,
26086 #[doc = "\n Lay out the child Views (set their bounds based on sizing heuristics\n specific to the current Layout).\n"]
26087 pub layout: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_panel_t)>,
26088 #[doc = "\n Add a child View.\n"]
26089 pub add_child_view: ::std::option::Option<
26090 unsafe extern "C" fn(self_: *mut _cef_panel_t, view: *mut _cef_view_t),
26091 >,
26092 #[doc = "\n Add a child View at the specified |index|. If |index| matches the result\n of GetChildCount() then the View will be added at the end.\n"]
26093 pub add_child_view_at: ::std::option::Option<
26094 unsafe extern "C" fn(
26095 self_: *mut _cef_panel_t,
26096 view: *mut _cef_view_t,
26097 index: ::std::os::raw::c_int,
26098 ),
26099 >,
26100 #[doc = "\n Move the child View to the specified |index|. A negative value for |index|\n will move the View to the end.\n"]
26101 pub reorder_child_view: ::std::option::Option<
26102 unsafe extern "C" fn(
26103 self_: *mut _cef_panel_t,
26104 view: *mut _cef_view_t,
26105 index: ::std::os::raw::c_int,
26106 ),
26107 >,
26108 #[doc = "\n Remove a child View. The View can then be added to another Panel.\n"]
26109 pub remove_child_view: ::std::option::Option<
26110 unsafe extern "C" fn(self_: *mut _cef_panel_t, view: *mut _cef_view_t),
26111 >,
26112 #[doc = "\n Remove all child Views. The removed Views will be deleted if the client\n holds no references to them.\n"]
26113 pub remove_all_child_views:
26114 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_panel_t)>,
26115 #[doc = "\n Returns the number of child Views.\n"]
26116 pub get_child_view_count:
26117 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_panel_t) -> usize>,
26118 #[doc = "\n Returns the child View at the specified |index|.\n"]
26119 pub get_child_view_at: ::std::option::Option<
26120 unsafe extern "C" fn(
26121 self_: *mut _cef_panel_t,
26122 index: ::std::os::raw::c_int,
26123 ) -> *mut _cef_view_t,
26124 >,
26125}
26126#[test]
26127fn bindgen_test_layout__cef_panel_t() {
26128 const UNINIT: ::std::mem::MaybeUninit<_cef_panel_t> = ::std::mem::MaybeUninit::uninit();
26129 let ptr = UNINIT.as_ptr();
26130 assert_eq!(
26131 ::std::mem::size_of::<_cef_panel_t>(),
26132 536usize,
26133 concat!("Size of: ", stringify!(_cef_panel_t))
26134 );
26135 assert_eq!(
26136 ::std::mem::align_of::<_cef_panel_t>(),
26137 8usize,
26138 concat!("Alignment of ", stringify!(_cef_panel_t))
26139 );
26140 assert_eq!(
26141 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
26142 0usize,
26143 concat!(
26144 "Offset of field: ",
26145 stringify!(_cef_panel_t),
26146 "::",
26147 stringify!(base)
26148 )
26149 );
26150 assert_eq!(
26151 unsafe { ::std::ptr::addr_of!((*ptr).as_window) as usize - ptr as usize },
26152 440usize,
26153 concat!(
26154 "Offset of field: ",
26155 stringify!(_cef_panel_t),
26156 "::",
26157 stringify!(as_window)
26158 )
26159 );
26160 assert_eq!(
26161 unsafe { ::std::ptr::addr_of!((*ptr).set_to_fill_layout) as usize - ptr as usize },
26162 448usize,
26163 concat!(
26164 "Offset of field: ",
26165 stringify!(_cef_panel_t),
26166 "::",
26167 stringify!(set_to_fill_layout)
26168 )
26169 );
26170 assert_eq!(
26171 unsafe { ::std::ptr::addr_of!((*ptr).set_to_box_layout) as usize - ptr as usize },
26172 456usize,
26173 concat!(
26174 "Offset of field: ",
26175 stringify!(_cef_panel_t),
26176 "::",
26177 stringify!(set_to_box_layout)
26178 )
26179 );
26180 assert_eq!(
26181 unsafe { ::std::ptr::addr_of!((*ptr).get_layout) as usize - ptr as usize },
26182 464usize,
26183 concat!(
26184 "Offset of field: ",
26185 stringify!(_cef_panel_t),
26186 "::",
26187 stringify!(get_layout)
26188 )
26189 );
26190 assert_eq!(
26191 unsafe { ::std::ptr::addr_of!((*ptr).layout) as usize - ptr as usize },
26192 472usize,
26193 concat!(
26194 "Offset of field: ",
26195 stringify!(_cef_panel_t),
26196 "::",
26197 stringify!(layout)
26198 )
26199 );
26200 assert_eq!(
26201 unsafe { ::std::ptr::addr_of!((*ptr).add_child_view) as usize - ptr as usize },
26202 480usize,
26203 concat!(
26204 "Offset of field: ",
26205 stringify!(_cef_panel_t),
26206 "::",
26207 stringify!(add_child_view)
26208 )
26209 );
26210 assert_eq!(
26211 unsafe { ::std::ptr::addr_of!((*ptr).add_child_view_at) as usize - ptr as usize },
26212 488usize,
26213 concat!(
26214 "Offset of field: ",
26215 stringify!(_cef_panel_t),
26216 "::",
26217 stringify!(add_child_view_at)
26218 )
26219 );
26220 assert_eq!(
26221 unsafe { ::std::ptr::addr_of!((*ptr).reorder_child_view) as usize - ptr as usize },
26222 496usize,
26223 concat!(
26224 "Offset of field: ",
26225 stringify!(_cef_panel_t),
26226 "::",
26227 stringify!(reorder_child_view)
26228 )
26229 );
26230 assert_eq!(
26231 unsafe { ::std::ptr::addr_of!((*ptr).remove_child_view) as usize - ptr as usize },
26232 504usize,
26233 concat!(
26234 "Offset of field: ",
26235 stringify!(_cef_panel_t),
26236 "::",
26237 stringify!(remove_child_view)
26238 )
26239 );
26240 assert_eq!(
26241 unsafe { ::std::ptr::addr_of!((*ptr).remove_all_child_views) as usize - ptr as usize },
26242 512usize,
26243 concat!(
26244 "Offset of field: ",
26245 stringify!(_cef_panel_t),
26246 "::",
26247 stringify!(remove_all_child_views)
26248 )
26249 );
26250 assert_eq!(
26251 unsafe { ::std::ptr::addr_of!((*ptr).get_child_view_count) as usize - ptr as usize },
26252 520usize,
26253 concat!(
26254 "Offset of field: ",
26255 stringify!(_cef_panel_t),
26256 "::",
26257 stringify!(get_child_view_count)
26258 )
26259 );
26260 assert_eq!(
26261 unsafe { ::std::ptr::addr_of!((*ptr).get_child_view_at) as usize - ptr as usize },
26262 528usize,
26263 concat!(
26264 "Offset of field: ",
26265 stringify!(_cef_panel_t),
26266 "::",
26267 stringify!(get_child_view_at)
26268 )
26269 );
26270}
26271#[doc = "\n A Panel is a container in the views hierarchy that can contain other Views\n as children. Methods must be called on the browser process UI thread unless\n otherwise indicated.\n"]
26272pub type cef_panel_t = _cef_panel_t;
26273extern "C" {
26274 #[doc = "\n Create a new Panel.\n"]
26275 pub fn cef_panel_create(delegate: *mut _cef_panel_delegate_t) -> *mut cef_panel_t;
26276}
26277#[doc = "\n Implement this structure to handle window events. The functions of this\n structure will be called on the browser process UI thread unless otherwise\n indicated.\n"]
26278#[repr(C)]
26279#[derive(Debug, Copy, Clone)]
26280pub struct _cef_window_delegate_t {
26281 #[doc = "\n Base structure.\n"]
26282 pub base: cef_panel_delegate_t,
26283 #[doc = "\n Called when |window| is created.\n"]
26284 pub on_window_created: ::std::option::Option<
26285 unsafe extern "C" fn(self_: *mut _cef_window_delegate_t, window: *mut _cef_window_t),
26286 >,
26287 #[doc = "\n Called when |window| is closing.\n"]
26288 pub on_window_closing: ::std::option::Option<
26289 unsafe extern "C" fn(self_: *mut _cef_window_delegate_t, window: *mut _cef_window_t),
26290 >,
26291 #[doc = "\n Called when |window| is destroyed. Release all references to |window| and\n do not attempt to execute any functions on |window| after this callback\n returns.\n"]
26292 pub on_window_destroyed: ::std::option::Option<
26293 unsafe extern "C" fn(self_: *mut _cef_window_delegate_t, window: *mut _cef_window_t),
26294 >,
26295 #[doc = "\n Called when |window| is activated or deactivated.\n"]
26296 pub on_window_activation_changed: ::std::option::Option<
26297 unsafe extern "C" fn(
26298 self_: *mut _cef_window_delegate_t,
26299 window: *mut _cef_window_t,
26300 active: ::std::os::raw::c_int,
26301 ),
26302 >,
26303 #[doc = "\n Called when |window| bounds have changed. |new_bounds| will be in DIP\n screen coordinates.\n"]
26304 pub on_window_bounds_changed: ::std::option::Option<
26305 unsafe extern "C" fn(
26306 self_: *mut _cef_window_delegate_t,
26307 window: *mut _cef_window_t,
26308 new_bounds: *const cef_rect_t,
26309 ),
26310 >,
26311 #[doc = "\n Called when |window| is transitioning to or from fullscreen mode. On MacOS\n the transition occurs asynchronously with |is_competed| set to false (0)\n when the transition starts and true (1) after the transition completes. On\n other platforms the transition occurs synchronously with |is_completed|\n set to true (1) after the transition completes. With the Alloy runtime you\n must also implement cef_display_handler_t::OnFullscreenModeChange to\n handle fullscreen transitions initiated by browser content.\n"]
26312 pub on_window_fullscreen_transition: ::std::option::Option<
26313 unsafe extern "C" fn(
26314 self_: *mut _cef_window_delegate_t,
26315 window: *mut _cef_window_t,
26316 is_completed: ::std::os::raw::c_int,
26317 ),
26318 >,
26319 #[doc = "\n Return the parent for |window| or NULL if the |window| does not have a\n parent. Windows with parents will not get a taskbar button. Set |is_menu|\n to true (1) if |window| will be displayed as a menu, in which case it will\n not be clipped to the parent window bounds. Set |can_activate_menu| to\n false (0) if |is_menu| is true (1) and |window| should not be activated\n (given keyboard focus) when displayed.\n"]
26320 pub get_parent_window: ::std::option::Option<
26321 unsafe extern "C" fn(
26322 self_: *mut _cef_window_delegate_t,
26323 window: *mut _cef_window_t,
26324 is_menu: *mut ::std::os::raw::c_int,
26325 can_activate_menu: *mut ::std::os::raw::c_int,
26326 ) -> *mut _cef_window_t,
26327 >,
26328 #[doc = "\n Return true (1) if |window| should be created as a window modal dialog.\n Only called when a Window is returned via get_parent_window() with\n |is_menu| set to false (0). All controls in the parent Window will be\n disabled while |window| is visible. This functionality is not supported by\n all Linux window managers. Alternately, use\n cef_window_t::show_as_browser_modal_dialog() for a browser modal dialog\n that works on all platforms.\n"]
26329 pub is_window_modal_dialog: ::std::option::Option<
26330 unsafe extern "C" fn(
26331 self_: *mut _cef_window_delegate_t,
26332 window: *mut _cef_window_t,
26333 ) -> ::std::os::raw::c_int,
26334 >,
26335 #[doc = "\n Return the initial bounds for |window| in density independent pixel (DIP)\n coordinates. If this function returns an NULL CefRect then\n get_preferred_size() will be called to retrieve the size, and the window\n will be placed on the screen with origin (0,0). This function can be used\n in combination with cef_view_t::get_bounds_in_screen() to restore the\n previous window bounds.\n"]
26336 pub get_initial_bounds: ::std::option::Option<
26337 unsafe extern "C" fn(
26338 self_: *mut _cef_window_delegate_t,
26339 window: *mut _cef_window_t,
26340 ) -> cef_rect_t,
26341 >,
26342 #[doc = "\n Return the initial show state for |window|.\n"]
26343 pub get_initial_show_state: ::std::option::Option<
26344 unsafe extern "C" fn(
26345 self_: *mut _cef_window_delegate_t,
26346 window: *mut _cef_window_t,
26347 ) -> cef_show_state_t,
26348 >,
26349 #[doc = "\n Return true (1) if |window| should be created without a frame or title\n bar. The window will be resizable if can_resize() returns true (1). Use\n cef_window_t::set_draggable_regions() to specify draggable regions.\n"]
26350 pub is_frameless: ::std::option::Option<
26351 unsafe extern "C" fn(
26352 self_: *mut _cef_window_delegate_t,
26353 window: *mut _cef_window_t,
26354 ) -> ::std::os::raw::c_int,
26355 >,
26356 #[doc = "\n Return true (1) if |window| should be created with standard window buttons\n like close, minimize and zoom. This function is only supported on macOS.\n"]
26357 pub with_standard_window_buttons: ::std::option::Option<
26358 unsafe extern "C" fn(
26359 self_: *mut _cef_window_delegate_t,
26360 window: *mut _cef_window_t,
26361 ) -> ::std::os::raw::c_int,
26362 >,
26363 #[doc = "\n Return whether the titlebar height should be overridden, and sets the\n height of the titlebar in |titlebar_height|. On macOS, it can also be used\n to adjust the vertical position of the traffic light buttons in frameless\n windows. The buttons will be positioned halfway down the titlebar at a\n height of |titlebar_height| / 2.\n"]
26364 pub get_titlebar_height: ::std::option::Option<
26365 unsafe extern "C" fn(
26366 self_: *mut _cef_window_delegate_t,
26367 window: *mut _cef_window_t,
26368 titlebar_height: *mut f32,
26369 ) -> ::std::os::raw::c_int,
26370 >,
26371 #[doc = "\n Return true (1) if |window| can be resized.\n"]
26372 pub can_resize: ::std::option::Option<
26373 unsafe extern "C" fn(
26374 self_: *mut _cef_window_delegate_t,
26375 window: *mut _cef_window_t,
26376 ) -> ::std::os::raw::c_int,
26377 >,
26378 #[doc = "\n Return true (1) if |window| can be maximized.\n"]
26379 pub can_maximize: ::std::option::Option<
26380 unsafe extern "C" fn(
26381 self_: *mut _cef_window_delegate_t,
26382 window: *mut _cef_window_t,
26383 ) -> ::std::os::raw::c_int,
26384 >,
26385 #[doc = "\n Return true (1) if |window| can be minimized.\n"]
26386 pub can_minimize: ::std::option::Option<
26387 unsafe extern "C" fn(
26388 self_: *mut _cef_window_delegate_t,
26389 window: *mut _cef_window_t,
26390 ) -> ::std::os::raw::c_int,
26391 >,
26392 #[doc = "\n Return true (1) if |window| can be closed. This will be called for user-\n initiated window close actions and when cef_window_t::close() is called.\n"]
26393 pub can_close: ::std::option::Option<
26394 unsafe extern "C" fn(
26395 self_: *mut _cef_window_delegate_t,
26396 window: *mut _cef_window_t,
26397 ) -> ::std::os::raw::c_int,
26398 >,
26399 #[doc = "\n Called when a keyboard accelerator registered with\n cef_window_t::SetAccelerator is triggered. Return true (1) if the\n accelerator was handled or false (0) otherwise.\n"]
26400 pub on_accelerator: ::std::option::Option<
26401 unsafe extern "C" fn(
26402 self_: *mut _cef_window_delegate_t,
26403 window: *mut _cef_window_t,
26404 command_id: ::std::os::raw::c_int,
26405 ) -> ::std::os::raw::c_int,
26406 >,
26407 #[doc = "\n Called after all other controls in the window have had a chance to handle\n the event. |event| contains information about the keyboard event. Return\n true (1) if the keyboard event was handled or false (0) otherwise.\n"]
26408 pub on_key_event: ::std::option::Option<
26409 unsafe extern "C" fn(
26410 self_: *mut _cef_window_delegate_t,
26411 window: *mut _cef_window_t,
26412 event: *const cef_key_event_t,
26413 ) -> ::std::os::raw::c_int,
26414 >,
26415}
26416#[test]
26417fn bindgen_test_layout__cef_window_delegate_t() {
26418 const UNINIT: ::std::mem::MaybeUninit<_cef_window_delegate_t> =
26419 ::std::mem::MaybeUninit::uninit();
26420 let ptr = UNINIT.as_ptr();
26421 assert_eq!(
26422 ::std::mem::size_of::<_cef_window_delegate_t>(),
26423 272usize,
26424 concat!("Size of: ", stringify!(_cef_window_delegate_t))
26425 );
26426 assert_eq!(
26427 ::std::mem::align_of::<_cef_window_delegate_t>(),
26428 8usize,
26429 concat!("Alignment of ", stringify!(_cef_window_delegate_t))
26430 );
26431 assert_eq!(
26432 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
26433 0usize,
26434 concat!(
26435 "Offset of field: ",
26436 stringify!(_cef_window_delegate_t),
26437 "::",
26438 stringify!(base)
26439 )
26440 );
26441 assert_eq!(
26442 unsafe { ::std::ptr::addr_of!((*ptr).on_window_created) as usize - ptr as usize },
26443 120usize,
26444 concat!(
26445 "Offset of field: ",
26446 stringify!(_cef_window_delegate_t),
26447 "::",
26448 stringify!(on_window_created)
26449 )
26450 );
26451 assert_eq!(
26452 unsafe { ::std::ptr::addr_of!((*ptr).on_window_closing) as usize - ptr as usize },
26453 128usize,
26454 concat!(
26455 "Offset of field: ",
26456 stringify!(_cef_window_delegate_t),
26457 "::",
26458 stringify!(on_window_closing)
26459 )
26460 );
26461 assert_eq!(
26462 unsafe { ::std::ptr::addr_of!((*ptr).on_window_destroyed) as usize - ptr as usize },
26463 136usize,
26464 concat!(
26465 "Offset of field: ",
26466 stringify!(_cef_window_delegate_t),
26467 "::",
26468 stringify!(on_window_destroyed)
26469 )
26470 );
26471 assert_eq!(
26472 unsafe {
26473 ::std::ptr::addr_of!((*ptr).on_window_activation_changed) as usize - ptr as usize
26474 },
26475 144usize,
26476 concat!(
26477 "Offset of field: ",
26478 stringify!(_cef_window_delegate_t),
26479 "::",
26480 stringify!(on_window_activation_changed)
26481 )
26482 );
26483 assert_eq!(
26484 unsafe { ::std::ptr::addr_of!((*ptr).on_window_bounds_changed) as usize - ptr as usize },
26485 152usize,
26486 concat!(
26487 "Offset of field: ",
26488 stringify!(_cef_window_delegate_t),
26489 "::",
26490 stringify!(on_window_bounds_changed)
26491 )
26492 );
26493 assert_eq!(
26494 unsafe {
26495 ::std::ptr::addr_of!((*ptr).on_window_fullscreen_transition) as usize - ptr as usize
26496 },
26497 160usize,
26498 concat!(
26499 "Offset of field: ",
26500 stringify!(_cef_window_delegate_t),
26501 "::",
26502 stringify!(on_window_fullscreen_transition)
26503 )
26504 );
26505 assert_eq!(
26506 unsafe { ::std::ptr::addr_of!((*ptr).get_parent_window) as usize - ptr as usize },
26507 168usize,
26508 concat!(
26509 "Offset of field: ",
26510 stringify!(_cef_window_delegate_t),
26511 "::",
26512 stringify!(get_parent_window)
26513 )
26514 );
26515 assert_eq!(
26516 unsafe { ::std::ptr::addr_of!((*ptr).is_window_modal_dialog) as usize - ptr as usize },
26517 176usize,
26518 concat!(
26519 "Offset of field: ",
26520 stringify!(_cef_window_delegate_t),
26521 "::",
26522 stringify!(is_window_modal_dialog)
26523 )
26524 );
26525 assert_eq!(
26526 unsafe { ::std::ptr::addr_of!((*ptr).get_initial_bounds) as usize - ptr as usize },
26527 184usize,
26528 concat!(
26529 "Offset of field: ",
26530 stringify!(_cef_window_delegate_t),
26531 "::",
26532 stringify!(get_initial_bounds)
26533 )
26534 );
26535 assert_eq!(
26536 unsafe { ::std::ptr::addr_of!((*ptr).get_initial_show_state) as usize - ptr as usize },
26537 192usize,
26538 concat!(
26539 "Offset of field: ",
26540 stringify!(_cef_window_delegate_t),
26541 "::",
26542 stringify!(get_initial_show_state)
26543 )
26544 );
26545 assert_eq!(
26546 unsafe { ::std::ptr::addr_of!((*ptr).is_frameless) as usize - ptr as usize },
26547 200usize,
26548 concat!(
26549 "Offset of field: ",
26550 stringify!(_cef_window_delegate_t),
26551 "::",
26552 stringify!(is_frameless)
26553 )
26554 );
26555 assert_eq!(
26556 unsafe {
26557 ::std::ptr::addr_of!((*ptr).with_standard_window_buttons) as usize - ptr as usize
26558 },
26559 208usize,
26560 concat!(
26561 "Offset of field: ",
26562 stringify!(_cef_window_delegate_t),
26563 "::",
26564 stringify!(with_standard_window_buttons)
26565 )
26566 );
26567 assert_eq!(
26568 unsafe { ::std::ptr::addr_of!((*ptr).get_titlebar_height) as usize - ptr as usize },
26569 216usize,
26570 concat!(
26571 "Offset of field: ",
26572 stringify!(_cef_window_delegate_t),
26573 "::",
26574 stringify!(get_titlebar_height)
26575 )
26576 );
26577 assert_eq!(
26578 unsafe { ::std::ptr::addr_of!((*ptr).can_resize) as usize - ptr as usize },
26579 224usize,
26580 concat!(
26581 "Offset of field: ",
26582 stringify!(_cef_window_delegate_t),
26583 "::",
26584 stringify!(can_resize)
26585 )
26586 );
26587 assert_eq!(
26588 unsafe { ::std::ptr::addr_of!((*ptr).can_maximize) as usize - ptr as usize },
26589 232usize,
26590 concat!(
26591 "Offset of field: ",
26592 stringify!(_cef_window_delegate_t),
26593 "::",
26594 stringify!(can_maximize)
26595 )
26596 );
26597 assert_eq!(
26598 unsafe { ::std::ptr::addr_of!((*ptr).can_minimize) as usize - ptr as usize },
26599 240usize,
26600 concat!(
26601 "Offset of field: ",
26602 stringify!(_cef_window_delegate_t),
26603 "::",
26604 stringify!(can_minimize)
26605 )
26606 );
26607 assert_eq!(
26608 unsafe { ::std::ptr::addr_of!((*ptr).can_close) as usize - ptr as usize },
26609 248usize,
26610 concat!(
26611 "Offset of field: ",
26612 stringify!(_cef_window_delegate_t),
26613 "::",
26614 stringify!(can_close)
26615 )
26616 );
26617 assert_eq!(
26618 unsafe { ::std::ptr::addr_of!((*ptr).on_accelerator) as usize - ptr as usize },
26619 256usize,
26620 concat!(
26621 "Offset of field: ",
26622 stringify!(_cef_window_delegate_t),
26623 "::",
26624 stringify!(on_accelerator)
26625 )
26626 );
26627 assert_eq!(
26628 unsafe { ::std::ptr::addr_of!((*ptr).on_key_event) as usize - ptr as usize },
26629 264usize,
26630 concat!(
26631 "Offset of field: ",
26632 stringify!(_cef_window_delegate_t),
26633 "::",
26634 stringify!(on_key_event)
26635 )
26636 );
26637}
26638#[doc = "\n Implement this structure to handle window events. The functions of this\n structure will be called on the browser process UI thread unless otherwise\n indicated.\n"]
26639pub type cef_window_delegate_t = _cef_window_delegate_t;
26640#[doc = "\n A Window is a top-level Window/widget in the Views hierarchy. By default it\n will have a non-client area with title bar, icon and buttons that supports\n moving and resizing. All size and position values are in density independent\n pixels (DIP) unless otherwise indicated. Methods must be called on the\n browser process UI thread unless otherwise indicated.\n"]
26641#[repr(C)]
26642#[derive(Debug, Copy, Clone)]
26643pub struct _cef_window_t {
26644 #[doc = "\n Base structure.\n"]
26645 pub base: cef_panel_t,
26646 #[doc = "\n Show the Window.\n"]
26647 pub show: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t)>,
26648 #[doc = "\n Show the Window as a browser modal dialog relative to |browser_view|. A\n parent Window must be returned via\n cef_window_delegate_t::get_parent_window() and |browser_view| must belong\n to that parent Window. While this Window is visible, |browser_view| will\n be disabled while other controls in the parent Window remain enabled.\n Navigating or destroying the |browser_view| will close this Window\n automatically. Alternately, use show() and return true (1) from\n cef_window_delegate_t::is_window_modal_dialog() for a window modal dialog\n where all controls in the parent Window are disabled.\n"]
26649 pub show_as_browser_modal_dialog: ::std::option::Option<
26650 unsafe extern "C" fn(self_: *mut _cef_window_t, browser_view: *mut _cef_browser_view_t),
26651 >,
26652 #[doc = "\n Hide the Window.\n"]
26653 pub hide: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t)>,
26654 #[doc = "\n Sizes the Window to |size| and centers it in the current display.\n"]
26655 pub center_window: ::std::option::Option<
26656 unsafe extern "C" fn(self_: *mut _cef_window_t, size: *const cef_size_t),
26657 >,
26658 #[doc = "\n Close the Window.\n"]
26659 pub close: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t)>,
26660 #[doc = "\n Returns true (1) if the Window has been closed.\n"]
26661 pub is_closed: ::std::option::Option<
26662 unsafe extern "C" fn(self_: *mut _cef_window_t) -> ::std::os::raw::c_int,
26663 >,
26664 #[doc = "\n Activate the Window, assuming it already exists and is visible.\n"]
26665 pub activate: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t)>,
26666 #[doc = "\n Deactivate the Window, making the next Window in the Z order the active\n Window.\n"]
26667 pub deactivate: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t)>,
26668 #[doc = "\n Returns whether the Window is the currently active Window.\n"]
26669 pub is_active: ::std::option::Option<
26670 unsafe extern "C" fn(self_: *mut _cef_window_t) -> ::std::os::raw::c_int,
26671 >,
26672 #[doc = "\n Bring this Window to the top of other Windows in the Windowing system.\n"]
26673 pub bring_to_top: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t)>,
26674 #[doc = "\n Set the Window to be on top of other Windows in the Windowing system.\n"]
26675 pub set_always_on_top: ::std::option::Option<
26676 unsafe extern "C" fn(self_: *mut _cef_window_t, on_top: ::std::os::raw::c_int),
26677 >,
26678 #[doc = "\n Returns whether the Window has been set to be on top of other Windows in\n the Windowing system.\n"]
26679 pub is_always_on_top: ::std::option::Option<
26680 unsafe extern "C" fn(self_: *mut _cef_window_t) -> ::std::os::raw::c_int,
26681 >,
26682 #[doc = "\n Maximize the Window.\n"]
26683 pub maximize: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t)>,
26684 #[doc = "\n Minimize the Window.\n"]
26685 pub minimize: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t)>,
26686 #[doc = "\n Restore the Window.\n"]
26687 pub restore: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t)>,
26688 #[doc = "\n Set fullscreen Window state. The\n cef_window_delegate_t::OnWindowFullscreenTransition function will be\n called during the fullscreen transition for notification purposes.\n"]
26689 pub set_fullscreen: ::std::option::Option<
26690 unsafe extern "C" fn(self_: *mut _cef_window_t, fullscreen: ::std::os::raw::c_int),
26691 >,
26692 #[doc = "\n Returns true (1) if the Window is maximized.\n"]
26693 pub is_maximized: ::std::option::Option<
26694 unsafe extern "C" fn(self_: *mut _cef_window_t) -> ::std::os::raw::c_int,
26695 >,
26696 #[doc = "\n Returns true (1) if the Window is minimized.\n"]
26697 pub is_minimized: ::std::option::Option<
26698 unsafe extern "C" fn(self_: *mut _cef_window_t) -> ::std::os::raw::c_int,
26699 >,
26700 #[doc = "\n Returns true (1) if the Window is fullscreen.\n"]
26701 pub is_fullscreen: ::std::option::Option<
26702 unsafe extern "C" fn(self_: *mut _cef_window_t) -> ::std::os::raw::c_int,
26703 >,
26704 #[doc = "\n Set the Window title.\n"]
26705 pub set_title: ::std::option::Option<
26706 unsafe extern "C" fn(self_: *mut _cef_window_t, title: *const cef_string_t),
26707 >,
26708 #[doc = "\n Get the Window title.\n"]
26709 pub get_title: ::std::option::Option<
26710 unsafe extern "C" fn(self_: *mut _cef_window_t) -> cef_string_userfree_t,
26711 >,
26712 #[doc = "\n Set the Window icon. This should be a 16x16 icon suitable for use in the\n Windows's title bar.\n"]
26713 pub set_window_icon: ::std::option::Option<
26714 unsafe extern "C" fn(self_: *mut _cef_window_t, image: *mut _cef_image_t),
26715 >,
26716 #[doc = "\n Get the Window icon.\n"]
26717 pub get_window_icon:
26718 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t) -> *mut _cef_image_t>,
26719 #[doc = "\n Set the Window App icon. This should be a larger icon for use in the host\n environment app switching UI. On Windows, this is the ICON_BIG used in\n Alt-Tab list and Windows taskbar. The Window icon will be used by default\n if no Window App icon is specified.\n"]
26720 pub set_window_app_icon: ::std::option::Option<
26721 unsafe extern "C" fn(self_: *mut _cef_window_t, image: *mut _cef_image_t),
26722 >,
26723 #[doc = "\n Get the Window App icon.\n"]
26724 pub get_window_app_icon:
26725 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t) -> *mut _cef_image_t>,
26726 #[doc = "\n Add a View that will be overlayed on the Window contents with absolute\n positioning and high z-order. Positioning is controlled by |docking_mode|\n as described below. The returned cef_overlay_controller_t object is used\n to control the overlay. Overlays are hidden by default.\n\n With CEF_DOCKING_MODE_CUSTOM:\n 1. The overlay is initially hidden, sized to |view|'s preferred size,\n and positioned in the top-left corner.\n 2. Optionally change the overlay position and/or size by calling\n CefOverlayController methods.\n 3. Call CefOverlayController::SetVisible(true) to show the overlay.\n 4. The overlay will be automatically re-sized if |view|'s layout\n changes. Optionally change the overlay position and/or size when\n OnLayoutChanged is called on the Window's delegate to indicate a\n change in Window bounds.\n\n With other docking modes:\n 1. The overlay is initially hidden, sized to |view|'s preferred size,\n and positioned based on |docking_mode|.\n 2. Call CefOverlayController::SetVisible(true) to show the overlay.\n 3. The overlay will be automatically re-sized if |view|'s layout changes\n and re-positioned as appropriate when the Window resizes.\n\n Overlays created by this function will receive a higher z-order then any\n child Views added previously. It is therefore recommended to call this\n function last after all other child Views have been added so that the\n overlay displays as the top-most child of the Window.\n"]
26727 pub add_overlay_view: ::std::option::Option<
26728 unsafe extern "C" fn(
26729 self_: *mut _cef_window_t,
26730 view: *mut _cef_view_t,
26731 docking_mode: cef_docking_mode_t,
26732 ) -> *mut _cef_overlay_controller_t,
26733 >,
26734 #[doc = "\n Show a menu with contents |menu_model|. |screen_point| specifies the menu\n position in screen coordinates. |anchor_position| specifies how the menu\n will be anchored relative to |screen_point|.\n"]
26735 pub show_menu: ::std::option::Option<
26736 unsafe extern "C" fn(
26737 self_: *mut _cef_window_t,
26738 menu_model: *mut _cef_menu_model_t,
26739 screen_point: *const cef_point_t,
26740 anchor_position: cef_menu_anchor_position_t,
26741 ),
26742 >,
26743 #[doc = "\n Cancel the menu that is currently showing, if any.\n"]
26744 pub cancel_menu: ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t)>,
26745 #[doc = "\n Returns the Display that most closely intersects the bounds of this\n Window. May return NULL if this Window is not currently displayed.\n"]
26746 pub get_display: ::std::option::Option<
26747 unsafe extern "C" fn(self_: *mut _cef_window_t) -> *mut _cef_display_t,
26748 >,
26749 #[doc = "\n Returns the bounds (size and position) of this Window's client area.\n Position is in screen coordinates.\n"]
26750 pub get_client_area_bounds_in_screen:
26751 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t) -> cef_rect_t>,
26752 #[doc = "\n Set the regions where mouse events will be intercepted by this Window to\n support drag operations. Call this function with an NULL vector to clear\n the draggable regions. The draggable region bounds should be in window\n coordinates.\n"]
26753 pub set_draggable_regions: ::std::option::Option<
26754 unsafe extern "C" fn(
26755 self_: *mut _cef_window_t,
26756 regionsCount: usize,
26757 regions: *const cef_draggable_region_t,
26758 ),
26759 >,
26760 #[doc = "\n Retrieve the platform window handle for this Window.\n"]
26761 pub get_window_handle: ::std::option::Option<
26762 unsafe extern "C" fn(self_: *mut _cef_window_t) -> ::std::os::raw::c_ulong,
26763 >,
26764 #[doc = "\n Simulate a key press. |key_code| is the VKEY_* value from Chromium's\n ui/events/keycodes/keyboard_codes.h header (VK_* values on Windows).\n |event_flags| is some combination of EVENTFLAG_SHIFT_DOWN,\n EVENTFLAG_CONTROL_DOWN and/or EVENTFLAG_ALT_DOWN. This function is exposed\n primarily for testing purposes.\n"]
26765 pub send_key_press: ::std::option::Option<
26766 unsafe extern "C" fn(
26767 self_: *mut _cef_window_t,
26768 key_code: ::std::os::raw::c_int,
26769 event_flags: u32,
26770 ),
26771 >,
26772 #[doc = "\n Simulate a mouse move. The mouse cursor will be moved to the specified\n (screen_x, screen_y) position. This function is exposed primarily for\n testing purposes.\n"]
26773 pub send_mouse_move: ::std::option::Option<
26774 unsafe extern "C" fn(
26775 self_: *mut _cef_window_t,
26776 screen_x: ::std::os::raw::c_int,
26777 screen_y: ::std::os::raw::c_int,
26778 ),
26779 >,
26780 #[doc = "\n Simulate mouse down and/or mouse up events. |button| is the mouse button\n type. If |mouse_down| is true (1) a mouse down event will be sent. If\n |mouse_up| is true (1) a mouse up event will be sent. If both are true (1)\n a mouse down event will be sent followed by a mouse up event (equivalent\n to clicking the mouse button). The events will be sent using the current\n cursor position so make sure to call send_mouse_move() first to position\n the mouse. This function is exposed primarily for testing purposes.\n"]
26781 pub send_mouse_events: ::std::option::Option<
26782 unsafe extern "C" fn(
26783 self_: *mut _cef_window_t,
26784 button: cef_mouse_button_type_t,
26785 mouse_down: ::std::os::raw::c_int,
26786 mouse_up: ::std::os::raw::c_int,
26787 ),
26788 >,
26789 #[doc = "\n Set the keyboard accelerator for the specified |command_id|. |key_code|\n can be any virtual key or character value.\n cef_window_delegate_t::OnAccelerator will be called if the keyboard\n combination is triggered while this window has focus.\n"]
26790 pub set_accelerator: ::std::option::Option<
26791 unsafe extern "C" fn(
26792 self_: *mut _cef_window_t,
26793 command_id: ::std::os::raw::c_int,
26794 key_code: ::std::os::raw::c_int,
26795 shift_pressed: ::std::os::raw::c_int,
26796 ctrl_pressed: ::std::os::raw::c_int,
26797 alt_pressed: ::std::os::raw::c_int,
26798 ),
26799 >,
26800 #[doc = "\n Remove the keyboard accelerator for the specified |command_id|.\n"]
26801 pub remove_accelerator: ::std::option::Option<
26802 unsafe extern "C" fn(self_: *mut _cef_window_t, command_id: ::std::os::raw::c_int),
26803 >,
26804 #[doc = "\n Remove all keyboard accelerators.\n"]
26805 pub remove_all_accelerators:
26806 ::std::option::Option<unsafe extern "C" fn(self_: *mut _cef_window_t)>,
26807}
26808#[test]
26809fn bindgen_test_layout__cef_window_t() {
26810 const UNINIT: ::std::mem::MaybeUninit<_cef_window_t> = ::std::mem::MaybeUninit::uninit();
26811 let ptr = UNINIT.as_ptr();
26812 assert_eq!(
26813 ::std::mem::size_of::<_cef_window_t>(),
26814 840usize,
26815 concat!("Size of: ", stringify!(_cef_window_t))
26816 );
26817 assert_eq!(
26818 ::std::mem::align_of::<_cef_window_t>(),
26819 8usize,
26820 concat!("Alignment of ", stringify!(_cef_window_t))
26821 );
26822 assert_eq!(
26823 unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
26824 0usize,
26825 concat!(
26826 "Offset of field: ",
26827 stringify!(_cef_window_t),
26828 "::",
26829 stringify!(base)
26830 )
26831 );
26832 assert_eq!(
26833 unsafe { ::std::ptr::addr_of!((*ptr).show) as usize - ptr as usize },
26834 536usize,
26835 concat!(
26836 "Offset of field: ",
26837 stringify!(_cef_window_t),
26838 "::",
26839 stringify!(show)
26840 )
26841 );
26842 assert_eq!(
26843 unsafe {
26844 ::std::ptr::addr_of!((*ptr).show_as_browser_modal_dialog) as usize - ptr as usize
26845 },
26846 544usize,
26847 concat!(
26848 "Offset of field: ",
26849 stringify!(_cef_window_t),
26850 "::",
26851 stringify!(show_as_browser_modal_dialog)
26852 )
26853 );
26854 assert_eq!(
26855 unsafe { ::std::ptr::addr_of!((*ptr).hide) as usize - ptr as usize },
26856 552usize,
26857 concat!(
26858 "Offset of field: ",
26859 stringify!(_cef_window_t),
26860 "::",
26861 stringify!(hide)
26862 )
26863 );
26864 assert_eq!(
26865 unsafe { ::std::ptr::addr_of!((*ptr).center_window) as usize - ptr as usize },
26866 560usize,
26867 concat!(
26868 "Offset of field: ",
26869 stringify!(_cef_window_t),
26870 "::",
26871 stringify!(center_window)
26872 )
26873 );
26874 assert_eq!(
26875 unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize },
26876 568usize,
26877 concat!(
26878 "Offset of field: ",
26879 stringify!(_cef_window_t),
26880 "::",
26881 stringify!(close)
26882 )
26883 );
26884 assert_eq!(
26885 unsafe { ::std::ptr::addr_of!((*ptr).is_closed) as usize - ptr as usize },
26886 576usize,
26887 concat!(
26888 "Offset of field: ",
26889 stringify!(_cef_window_t),
26890 "::",
26891 stringify!(is_closed)
26892 )
26893 );
26894 assert_eq!(
26895 unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize },
26896 584usize,
26897 concat!(
26898 "Offset of field: ",
26899 stringify!(_cef_window_t),
26900 "::",
26901 stringify!(activate)
26902 )
26903 );
26904 assert_eq!(
26905 unsafe { ::std::ptr::addr_of!((*ptr).deactivate) as usize - ptr as usize },
26906 592usize,
26907 concat!(
26908 "Offset of field: ",
26909 stringify!(_cef_window_t),
26910 "::",
26911 stringify!(deactivate)
26912 )
26913 );
26914 assert_eq!(
26915 unsafe { ::std::ptr::addr_of!((*ptr).is_active) as usize - ptr as usize },
26916 600usize,
26917 concat!(
26918 "Offset of field: ",
26919 stringify!(_cef_window_t),
26920 "::",
26921 stringify!(is_active)
26922 )
26923 );
26924 assert_eq!(
26925 unsafe { ::std::ptr::addr_of!((*ptr).bring_to_top) as usize - ptr as usize },
26926 608usize,
26927 concat!(
26928 "Offset of field: ",
26929 stringify!(_cef_window_t),
26930 "::",
26931 stringify!(bring_to_top)
26932 )
26933 );
26934 assert_eq!(
26935 unsafe { ::std::ptr::addr_of!((*ptr).set_always_on_top) as usize - ptr as usize },
26936 616usize,
26937 concat!(
26938 "Offset of field: ",
26939 stringify!(_cef_window_t),
26940 "::",
26941 stringify!(set_always_on_top)
26942 )
26943 );
26944 assert_eq!(
26945 unsafe { ::std::ptr::addr_of!((*ptr).is_always_on_top) as usize - ptr as usize },
26946 624usize,
26947 concat!(
26948 "Offset of field: ",
26949 stringify!(_cef_window_t),
26950 "::",
26951 stringify!(is_always_on_top)
26952 )
26953 );
26954 assert_eq!(
26955 unsafe { ::std::ptr::addr_of!((*ptr).maximize) as usize - ptr as usize },
26956 632usize,
26957 concat!(
26958 "Offset of field: ",
26959 stringify!(_cef_window_t),
26960 "::",
26961 stringify!(maximize)
26962 )
26963 );
26964 assert_eq!(
26965 unsafe { ::std::ptr::addr_of!((*ptr).minimize) as usize - ptr as usize },
26966 640usize,
26967 concat!(
26968 "Offset of field: ",
26969 stringify!(_cef_window_t),
26970 "::",
26971 stringify!(minimize)
26972 )
26973 );
26974 assert_eq!(
26975 unsafe { ::std::ptr::addr_of!((*ptr).restore) as usize - ptr as usize },
26976 648usize,
26977 concat!(
26978 "Offset of field: ",
26979 stringify!(_cef_window_t),
26980 "::",
26981 stringify!(restore)
26982 )
26983 );
26984 assert_eq!(
26985 unsafe { ::std::ptr::addr_of!((*ptr).set_fullscreen) as usize - ptr as usize },
26986 656usize,
26987 concat!(
26988 "Offset of field: ",
26989 stringify!(_cef_window_t),
26990 "::",
26991 stringify!(set_fullscreen)
26992 )
26993 );
26994 assert_eq!(
26995 unsafe { ::std::ptr::addr_of!((*ptr).is_maximized) as usize - ptr as usize },
26996 664usize,
26997 concat!(
26998 "Offset of field: ",
26999 stringify!(_cef_window_t),
27000 "::",
27001 stringify!(is_maximized)
27002 )
27003 );
27004 assert_eq!(
27005 unsafe { ::std::ptr::addr_of!((*ptr).is_minimized) as usize - ptr as usize },
27006 672usize,
27007 concat!(
27008 "Offset of field: ",
27009 stringify!(_cef_window_t),
27010 "::",
27011 stringify!(is_minimized)
27012 )
27013 );
27014 assert_eq!(
27015 unsafe { ::std::ptr::addr_of!((*ptr).is_fullscreen) as usize - ptr as usize },
27016 680usize,
27017 concat!(
27018 "Offset of field: ",
27019 stringify!(_cef_window_t),
27020 "::",
27021 stringify!(is_fullscreen)
27022 )
27023 );
27024 assert_eq!(
27025 unsafe { ::std::ptr::addr_of!((*ptr).set_title) as usize - ptr as usize },
27026 688usize,
27027 concat!(
27028 "Offset of field: ",
27029 stringify!(_cef_window_t),
27030 "::",
27031 stringify!(set_title)
27032 )
27033 );
27034 assert_eq!(
27035 unsafe { ::std::ptr::addr_of!((*ptr).get_title) as usize - ptr as usize },
27036 696usize,
27037 concat!(
27038 "Offset of field: ",
27039 stringify!(_cef_window_t),
27040 "::",
27041 stringify!(get_title)
27042 )
27043 );
27044 assert_eq!(
27045 unsafe { ::std::ptr::addr_of!((*ptr).set_window_icon) as usize - ptr as usize },
27046 704usize,
27047 concat!(
27048 "Offset of field: ",
27049 stringify!(_cef_window_t),
27050 "::",
27051 stringify!(set_window_icon)
27052 )
27053 );
27054 assert_eq!(
27055 unsafe { ::std::ptr::addr_of!((*ptr).get_window_icon) as usize - ptr as usize },
27056 712usize,
27057 concat!(
27058 "Offset of field: ",
27059 stringify!(_cef_window_t),
27060 "::",
27061 stringify!(get_window_icon)
27062 )
27063 );
27064 assert_eq!(
27065 unsafe { ::std::ptr::addr_of!((*ptr).set_window_app_icon) as usize - ptr as usize },
27066 720usize,
27067 concat!(
27068 "Offset of field: ",
27069 stringify!(_cef_window_t),
27070 "::",
27071 stringify!(set_window_app_icon)
27072 )
27073 );
27074 assert_eq!(
27075 unsafe { ::std::ptr::addr_of!((*ptr).get_window_app_icon) as usize - ptr as usize },
27076 728usize,
27077 concat!(
27078 "Offset of field: ",
27079 stringify!(_cef_window_t),
27080 "::",
27081 stringify!(get_window_app_icon)
27082 )
27083 );
27084 assert_eq!(
27085 unsafe { ::std::ptr::addr_of!((*ptr).add_overlay_view) as usize - ptr as usize },
27086 736usize,
27087 concat!(
27088 "Offset of field: ",
27089 stringify!(_cef_window_t),
27090 "::",
27091 stringify!(add_overlay_view)
27092 )
27093 );
27094 assert_eq!(
27095 unsafe { ::std::ptr::addr_of!((*ptr).show_menu) as usize - ptr as usize },
27096 744usize,
27097 concat!(
27098 "Offset of field: ",
27099 stringify!(_cef_window_t),
27100 "::",
27101 stringify!(show_menu)
27102 )
27103 );
27104 assert_eq!(
27105 unsafe { ::std::ptr::addr_of!((*ptr).cancel_menu) as usize - ptr as usize },
27106 752usize,
27107 concat!(
27108 "Offset of field: ",
27109 stringify!(_cef_window_t),
27110 "::",
27111 stringify!(cancel_menu)
27112 )
27113 );
27114 assert_eq!(
27115 unsafe { ::std::ptr::addr_of!((*ptr).get_display) as usize - ptr as usize },
27116 760usize,
27117 concat!(
27118 "Offset of field: ",
27119 stringify!(_cef_window_t),
27120 "::",
27121 stringify!(get_display)
27122 )
27123 );
27124 assert_eq!(
27125 unsafe {
27126 ::std::ptr::addr_of!((*ptr).get_client_area_bounds_in_screen) as usize - ptr as usize
27127 },
27128 768usize,
27129 concat!(
27130 "Offset of field: ",
27131 stringify!(_cef_window_t),
27132 "::",
27133 stringify!(get_client_area_bounds_in_screen)
27134 )
27135 );
27136 assert_eq!(
27137 unsafe { ::std::ptr::addr_of!((*ptr).set_draggable_regions) as usize - ptr as usize },
27138 776usize,
27139 concat!(
27140 "Offset of field: ",
27141 stringify!(_cef_window_t),
27142 "::",
27143 stringify!(set_draggable_regions)
27144 )
27145 );
27146 assert_eq!(
27147 unsafe { ::std::ptr::addr_of!((*ptr).get_window_handle) as usize - ptr as usize },
27148 784usize,
27149 concat!(
27150 "Offset of field: ",
27151 stringify!(_cef_window_t),
27152 "::",
27153 stringify!(get_window_handle)
27154 )
27155 );
27156 assert_eq!(
27157 unsafe { ::std::ptr::addr_of!((*ptr).send_key_press) as usize - ptr as usize },
27158 792usize,
27159 concat!(
27160 "Offset of field: ",
27161 stringify!(_cef_window_t),
27162 "::",
27163 stringify!(send_key_press)
27164 )
27165 );
27166 assert_eq!(
27167 unsafe { ::std::ptr::addr_of!((*ptr).send_mouse_move) as usize - ptr as usize },
27168 800usize,
27169 concat!(
27170 "Offset of field: ",
27171 stringify!(_cef_window_t),
27172 "::",
27173 stringify!(send_mouse_move)
27174 )
27175 );
27176 assert_eq!(
27177 unsafe { ::std::ptr::addr_of!((*ptr).send_mouse_events) as usize - ptr as usize },
27178 808usize,
27179 concat!(
27180 "Offset of field: ",
27181 stringify!(_cef_window_t),
27182 "::",
27183 stringify!(send_mouse_events)
27184 )
27185 );
27186 assert_eq!(
27187 unsafe { ::std::ptr::addr_of!((*ptr).set_accelerator) as usize - ptr as usize },
27188 816usize,
27189 concat!(
27190 "Offset of field: ",
27191 stringify!(_cef_window_t),
27192 "::",
27193 stringify!(set_accelerator)
27194 )
27195 );
27196 assert_eq!(
27197 unsafe { ::std::ptr::addr_of!((*ptr).remove_accelerator) as usize - ptr as usize },
27198 824usize,
27199 concat!(
27200 "Offset of field: ",
27201 stringify!(_cef_window_t),
27202 "::",
27203 stringify!(remove_accelerator)
27204 )
27205 );
27206 assert_eq!(
27207 unsafe { ::std::ptr::addr_of!((*ptr).remove_all_accelerators) as usize - ptr as usize },
27208 832usize,
27209 concat!(
27210 "Offset of field: ",
27211 stringify!(_cef_window_t),
27212 "::",
27213 stringify!(remove_all_accelerators)
27214 )
27215 );
27216}
27217#[doc = "\n A Window is a top-level Window/widget in the Views hierarchy. By default it\n will have a non-client area with title bar, icon and buttons that supports\n moving and resizing. All size and position values are in density independent\n pixels (DIP) unless otherwise indicated. Methods must be called on the\n browser process UI thread unless otherwise indicated.\n"]
27218pub type cef_window_t = _cef_window_t;
27219extern "C" {
27220 #[doc = "\n Create a new Window.\n"]
27221 pub fn cef_window_create_top_level(delegate: *mut _cef_window_delegate_t) -> *mut cef_window_t;
27222}