1 // Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 //
5 // ---------------------------------------------------------------------------
6 //
7 // This file was generated by the CEF translator tool. If making changes by
8 // hand only do so within the body of existing method and function
9 // implementations. See the translator.README.txt file in the tools directory
10 // for more information.
11 //
12 // $hash=1d17ae751431af3baf83b3386f1cab410964a17f$
13 //
14
15 #include "libcef_dll/cpptoc/views/window_cpptoc.h"
16 #include "libcef_dll/cpptoc/image_cpptoc.h"
17 #include "libcef_dll/cpptoc/menu_model_cpptoc.h"
18 #include "libcef_dll/cpptoc/views/box_layout_cpptoc.h"
19 #include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
20 #include "libcef_dll/cpptoc/views/button_cpptoc.h"
21 #include "libcef_dll/cpptoc/views/display_cpptoc.h"
22 #include "libcef_dll/cpptoc/views/fill_layout_cpptoc.h"
23 #include "libcef_dll/cpptoc/views/layout_cpptoc.h"
24 #include "libcef_dll/cpptoc/views/panel_cpptoc.h"
25 #include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h"
26 #include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
27 #include "libcef_dll/cpptoc/views/view_cpptoc.h"
28 #include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h"
29 #include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h"
30 #include "libcef_dll/shutdown_checker.h"
31
32 // GLOBAL FUNCTIONS - Body may be edited by hand.
33
cef_window_create_top_level(struct _cef_window_delegate_t * delegate)34 CEF_EXPORT cef_window_t* cef_window_create_top_level(
35 struct _cef_window_delegate_t* delegate) {
36 shutdown_checker::AssertNotShutdown();
37
38 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
39
40 // Unverified params: delegate
41
42 // Execute
43 CefRefPtr<CefWindow> _retval =
44 CefWindow::CreateTopLevelWindow(CefWindowDelegateCToCpp::Wrap(delegate));
45
46 // Return type: refptr_same
47 return CefWindowCppToC::Wrap(_retval);
48 }
49
50 namespace {
51
52 // MEMBER FUNCTIONS - Body may be edited by hand.
53
window_show(struct _cef_window_t * self)54 void CEF_CALLBACK window_show(struct _cef_window_t* self) {
55 shutdown_checker::AssertNotShutdown();
56
57 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
58
59 DCHECK(self);
60 if (!self)
61 return;
62
63 // Execute
64 CefWindowCppToC::Get(self)->Show();
65 }
66
window_hide(struct _cef_window_t * self)67 void CEF_CALLBACK window_hide(struct _cef_window_t* self) {
68 shutdown_checker::AssertNotShutdown();
69
70 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
71
72 DCHECK(self);
73 if (!self)
74 return;
75
76 // Execute
77 CefWindowCppToC::Get(self)->Hide();
78 }
79
window_center_window(struct _cef_window_t * self,const cef_size_t * size)80 void CEF_CALLBACK window_center_window(struct _cef_window_t* self,
81 const cef_size_t* size) {
82 shutdown_checker::AssertNotShutdown();
83
84 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
85
86 DCHECK(self);
87 if (!self)
88 return;
89 // Verify param: size; type: simple_byref_const
90 DCHECK(size);
91 if (!size)
92 return;
93
94 // Translate param: size; type: simple_byref_const
95 CefSize sizeVal = size ? *size : CefSize();
96
97 // Execute
98 CefWindowCppToC::Get(self)->CenterWindow(sizeVal);
99 }
100
window_close(struct _cef_window_t * self)101 void CEF_CALLBACK window_close(struct _cef_window_t* self) {
102 shutdown_checker::AssertNotShutdown();
103
104 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
105
106 DCHECK(self);
107 if (!self)
108 return;
109
110 // Execute
111 CefWindowCppToC::Get(self)->Close();
112 }
113
window_is_closed(struct _cef_window_t * self)114 int CEF_CALLBACK window_is_closed(struct _cef_window_t* self) {
115 shutdown_checker::AssertNotShutdown();
116
117 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
118
119 DCHECK(self);
120 if (!self)
121 return 0;
122
123 // Execute
124 bool _retval = CefWindowCppToC::Get(self)->IsClosed();
125
126 // Return type: bool
127 return _retval;
128 }
129
window_activate(struct _cef_window_t * self)130 void CEF_CALLBACK window_activate(struct _cef_window_t* self) {
131 shutdown_checker::AssertNotShutdown();
132
133 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
134
135 DCHECK(self);
136 if (!self)
137 return;
138
139 // Execute
140 CefWindowCppToC::Get(self)->Activate();
141 }
142
window_deactivate(struct _cef_window_t * self)143 void CEF_CALLBACK window_deactivate(struct _cef_window_t* self) {
144 shutdown_checker::AssertNotShutdown();
145
146 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
147
148 DCHECK(self);
149 if (!self)
150 return;
151
152 // Execute
153 CefWindowCppToC::Get(self)->Deactivate();
154 }
155
window_is_active(struct _cef_window_t * self)156 int CEF_CALLBACK window_is_active(struct _cef_window_t* self) {
157 shutdown_checker::AssertNotShutdown();
158
159 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
160
161 DCHECK(self);
162 if (!self)
163 return 0;
164
165 // Execute
166 bool _retval = CefWindowCppToC::Get(self)->IsActive();
167
168 // Return type: bool
169 return _retval;
170 }
171
window_bring_to_top(struct _cef_window_t * self)172 void CEF_CALLBACK window_bring_to_top(struct _cef_window_t* self) {
173 shutdown_checker::AssertNotShutdown();
174
175 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
176
177 DCHECK(self);
178 if (!self)
179 return;
180
181 // Execute
182 CefWindowCppToC::Get(self)->BringToTop();
183 }
184
window_set_always_on_top(struct _cef_window_t * self,int on_top)185 void CEF_CALLBACK window_set_always_on_top(struct _cef_window_t* self,
186 int on_top) {
187 shutdown_checker::AssertNotShutdown();
188
189 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
190
191 DCHECK(self);
192 if (!self)
193 return;
194
195 // Execute
196 CefWindowCppToC::Get(self)->SetAlwaysOnTop(on_top ? true : false);
197 }
198
window_is_always_on_top(struct _cef_window_t * self)199 int CEF_CALLBACK window_is_always_on_top(struct _cef_window_t* self) {
200 shutdown_checker::AssertNotShutdown();
201
202 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
203
204 DCHECK(self);
205 if (!self)
206 return 0;
207
208 // Execute
209 bool _retval = CefWindowCppToC::Get(self)->IsAlwaysOnTop();
210
211 // Return type: bool
212 return _retval;
213 }
214
window_maximize(struct _cef_window_t * self)215 void CEF_CALLBACK window_maximize(struct _cef_window_t* self) {
216 shutdown_checker::AssertNotShutdown();
217
218 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
219
220 DCHECK(self);
221 if (!self)
222 return;
223
224 // Execute
225 CefWindowCppToC::Get(self)->Maximize();
226 }
227
window_minimize(struct _cef_window_t * self)228 void CEF_CALLBACK window_minimize(struct _cef_window_t* self) {
229 shutdown_checker::AssertNotShutdown();
230
231 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
232
233 DCHECK(self);
234 if (!self)
235 return;
236
237 // Execute
238 CefWindowCppToC::Get(self)->Minimize();
239 }
240
window_restore(struct _cef_window_t * self)241 void CEF_CALLBACK window_restore(struct _cef_window_t* self) {
242 shutdown_checker::AssertNotShutdown();
243
244 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
245
246 DCHECK(self);
247 if (!self)
248 return;
249
250 // Execute
251 CefWindowCppToC::Get(self)->Restore();
252 }
253
window_set_fullscreen(struct _cef_window_t * self,int fullscreen)254 void CEF_CALLBACK window_set_fullscreen(struct _cef_window_t* self,
255 int fullscreen) {
256 shutdown_checker::AssertNotShutdown();
257
258 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
259
260 DCHECK(self);
261 if (!self)
262 return;
263
264 // Execute
265 CefWindowCppToC::Get(self)->SetFullscreen(fullscreen ? true : false);
266 }
267
window_is_maximized(struct _cef_window_t * self)268 int CEF_CALLBACK window_is_maximized(struct _cef_window_t* self) {
269 shutdown_checker::AssertNotShutdown();
270
271 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
272
273 DCHECK(self);
274 if (!self)
275 return 0;
276
277 // Execute
278 bool _retval = CefWindowCppToC::Get(self)->IsMaximized();
279
280 // Return type: bool
281 return _retval;
282 }
283
window_is_minimized(struct _cef_window_t * self)284 int CEF_CALLBACK window_is_minimized(struct _cef_window_t* self) {
285 shutdown_checker::AssertNotShutdown();
286
287 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
288
289 DCHECK(self);
290 if (!self)
291 return 0;
292
293 // Execute
294 bool _retval = CefWindowCppToC::Get(self)->IsMinimized();
295
296 // Return type: bool
297 return _retval;
298 }
299
window_is_fullscreen(struct _cef_window_t * self)300 int CEF_CALLBACK window_is_fullscreen(struct _cef_window_t* self) {
301 shutdown_checker::AssertNotShutdown();
302
303 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
304
305 DCHECK(self);
306 if (!self)
307 return 0;
308
309 // Execute
310 bool _retval = CefWindowCppToC::Get(self)->IsFullscreen();
311
312 // Return type: bool
313 return _retval;
314 }
315
window_set_title(struct _cef_window_t * self,const cef_string_t * title)316 void CEF_CALLBACK window_set_title(struct _cef_window_t* self,
317 const cef_string_t* title) {
318 shutdown_checker::AssertNotShutdown();
319
320 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
321
322 DCHECK(self);
323 if (!self)
324 return;
325 // Unverified params: title
326
327 // Execute
328 CefWindowCppToC::Get(self)->SetTitle(CefString(title));
329 }
330
331 cef_string_userfree_t CEF_CALLBACK
window_get_title(struct _cef_window_t * self)332 window_get_title(struct _cef_window_t* self) {
333 shutdown_checker::AssertNotShutdown();
334
335 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
336
337 DCHECK(self);
338 if (!self)
339 return NULL;
340
341 // Execute
342 CefString _retval = CefWindowCppToC::Get(self)->GetTitle();
343
344 // Return type: string
345 return _retval.DetachToUserFree();
346 }
347
window_set_window_icon(struct _cef_window_t * self,cef_image_t * image)348 void CEF_CALLBACK window_set_window_icon(struct _cef_window_t* self,
349 cef_image_t* image) {
350 shutdown_checker::AssertNotShutdown();
351
352 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
353
354 DCHECK(self);
355 if (!self)
356 return;
357 // Verify param: image; type: refptr_same
358 DCHECK(image);
359 if (!image)
360 return;
361
362 // Execute
363 CefWindowCppToC::Get(self)->SetWindowIcon(CefImageCppToC::Unwrap(image));
364 }
365
window_get_window_icon(struct _cef_window_t * self)366 cef_image_t* CEF_CALLBACK window_get_window_icon(struct _cef_window_t* self) {
367 shutdown_checker::AssertNotShutdown();
368
369 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
370
371 DCHECK(self);
372 if (!self)
373 return NULL;
374
375 // Execute
376 CefRefPtr<CefImage> _retval = CefWindowCppToC::Get(self)->GetWindowIcon();
377
378 // Return type: refptr_same
379 return CefImageCppToC::Wrap(_retval);
380 }
381
window_set_window_app_icon(struct _cef_window_t * self,cef_image_t * image)382 void CEF_CALLBACK window_set_window_app_icon(struct _cef_window_t* self,
383 cef_image_t* image) {
384 shutdown_checker::AssertNotShutdown();
385
386 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
387
388 DCHECK(self);
389 if (!self)
390 return;
391 // Verify param: image; type: refptr_same
392 DCHECK(image);
393 if (!image)
394 return;
395
396 // Execute
397 CefWindowCppToC::Get(self)->SetWindowAppIcon(CefImageCppToC::Unwrap(image));
398 }
399
400 cef_image_t* CEF_CALLBACK
window_get_window_app_icon(struct _cef_window_t * self)401 window_get_window_app_icon(struct _cef_window_t* self) {
402 shutdown_checker::AssertNotShutdown();
403
404 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
405
406 DCHECK(self);
407 if (!self)
408 return NULL;
409
410 // Execute
411 CefRefPtr<CefImage> _retval = CefWindowCppToC::Get(self)->GetWindowAppIcon();
412
413 // Return type: refptr_same
414 return CefImageCppToC::Wrap(_retval);
415 }
416
window_show_menu(struct _cef_window_t * self,cef_menu_model_t * menu_model,const cef_point_t * screen_point,cef_menu_anchor_position_t anchor_position)417 void CEF_CALLBACK window_show_menu(struct _cef_window_t* self,
418 cef_menu_model_t* menu_model,
419 const cef_point_t* screen_point,
420 cef_menu_anchor_position_t anchor_position) {
421 shutdown_checker::AssertNotShutdown();
422
423 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
424
425 DCHECK(self);
426 if (!self)
427 return;
428 // Verify param: menu_model; type: refptr_same
429 DCHECK(menu_model);
430 if (!menu_model)
431 return;
432 // Verify param: screen_point; type: simple_byref_const
433 DCHECK(screen_point);
434 if (!screen_point)
435 return;
436
437 // Translate param: screen_point; type: simple_byref_const
438 CefPoint screen_pointVal = screen_point ? *screen_point : CefPoint();
439
440 // Execute
441 CefWindowCppToC::Get(self)->ShowMenu(CefMenuModelCppToC::Unwrap(menu_model),
442 screen_pointVal, anchor_position);
443 }
444
window_cancel_menu(struct _cef_window_t * self)445 void CEF_CALLBACK window_cancel_menu(struct _cef_window_t* self) {
446 shutdown_checker::AssertNotShutdown();
447
448 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
449
450 DCHECK(self);
451 if (!self)
452 return;
453
454 // Execute
455 CefWindowCppToC::Get(self)->CancelMenu();
456 }
457
window_get_display(struct _cef_window_t * self)458 cef_display_t* CEF_CALLBACK window_get_display(struct _cef_window_t* self) {
459 shutdown_checker::AssertNotShutdown();
460
461 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
462
463 DCHECK(self);
464 if (!self)
465 return NULL;
466
467 // Execute
468 CefRefPtr<CefDisplay> _retval = CefWindowCppToC::Get(self)->GetDisplay();
469
470 // Return type: refptr_same
471 return CefDisplayCppToC::Wrap(_retval);
472 }
473
474 cef_rect_t CEF_CALLBACK
window_get_client_area_bounds_in_screen(struct _cef_window_t * self)475 window_get_client_area_bounds_in_screen(struct _cef_window_t* self) {
476 shutdown_checker::AssertNotShutdown();
477
478 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
479
480 DCHECK(self);
481 if (!self)
482 return CefRect();
483
484 // Execute
485 cef_rect_t _retval =
486 CefWindowCppToC::Get(self)->GetClientAreaBoundsInScreen();
487
488 // Return type: simple
489 return _retval;
490 }
491
492 void CEF_CALLBACK
window_set_draggable_regions(struct _cef_window_t * self,size_t regionsCount,cef_draggable_region_t const * regions)493 window_set_draggable_regions(struct _cef_window_t* self,
494 size_t regionsCount,
495 cef_draggable_region_t const* regions) {
496 shutdown_checker::AssertNotShutdown();
497
498 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
499
500 DCHECK(self);
501 if (!self)
502 return;
503 // Unverified params: regions
504
505 // Translate param: regions; type: simple_vec_byref_const
506 std::vector<CefDraggableRegion> regionsList;
507 if (regionsCount > 0) {
508 for (size_t i = 0; i < regionsCount; ++i) {
509 CefDraggableRegion regionsVal = regions[i];
510 regionsList.push_back(regionsVal);
511 }
512 }
513
514 // Execute
515 CefWindowCppToC::Get(self)->SetDraggableRegions(regionsList);
516 }
517
518 cef_window_handle_t CEF_CALLBACK
window_get_window_handle(struct _cef_window_t * self)519 window_get_window_handle(struct _cef_window_t* self) {
520 shutdown_checker::AssertNotShutdown();
521
522 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
523
524 DCHECK(self);
525 if (!self)
526 return kNullWindowHandle;
527
528 // Execute
529 cef_window_handle_t _retval = CefWindowCppToC::Get(self)->GetWindowHandle();
530
531 // Return type: simple
532 return _retval;
533 }
534
window_send_key_press(struct _cef_window_t * self,int key_code,uint32 event_flags)535 void CEF_CALLBACK window_send_key_press(struct _cef_window_t* self,
536 int key_code,
537 uint32 event_flags) {
538 shutdown_checker::AssertNotShutdown();
539
540 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
541
542 DCHECK(self);
543 if (!self)
544 return;
545
546 // Execute
547 CefWindowCppToC::Get(self)->SendKeyPress(key_code, event_flags);
548 }
549
window_send_mouse_move(struct _cef_window_t * self,int screen_x,int screen_y)550 void CEF_CALLBACK window_send_mouse_move(struct _cef_window_t* self,
551 int screen_x,
552 int screen_y) {
553 shutdown_checker::AssertNotShutdown();
554
555 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
556
557 DCHECK(self);
558 if (!self)
559 return;
560
561 // Execute
562 CefWindowCppToC::Get(self)->SendMouseMove(screen_x, screen_y);
563 }
564
window_send_mouse_events(struct _cef_window_t * self,cef_mouse_button_type_t button,int mouse_down,int mouse_up)565 void CEF_CALLBACK window_send_mouse_events(struct _cef_window_t* self,
566 cef_mouse_button_type_t button,
567 int mouse_down,
568 int mouse_up) {
569 shutdown_checker::AssertNotShutdown();
570
571 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
572
573 DCHECK(self);
574 if (!self)
575 return;
576
577 // Execute
578 CefWindowCppToC::Get(self)->SendMouseEvents(button, mouse_down ? true : false,
579 mouse_up ? true : false);
580 }
581
window_set_accelerator(struct _cef_window_t * self,int command_id,int key_code,int shift_pressed,int ctrl_pressed,int alt_pressed)582 void CEF_CALLBACK window_set_accelerator(struct _cef_window_t* self,
583 int command_id,
584 int key_code,
585 int shift_pressed,
586 int ctrl_pressed,
587 int alt_pressed) {
588 shutdown_checker::AssertNotShutdown();
589
590 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
591
592 DCHECK(self);
593 if (!self)
594 return;
595
596 // Execute
597 CefWindowCppToC::Get(self)->SetAccelerator(
598 command_id, key_code, shift_pressed ? true : false,
599 ctrl_pressed ? true : false, alt_pressed ? true : false);
600 }
601
window_remove_accelerator(struct _cef_window_t * self,int command_id)602 void CEF_CALLBACK window_remove_accelerator(struct _cef_window_t* self,
603 int command_id) {
604 shutdown_checker::AssertNotShutdown();
605
606 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
607
608 DCHECK(self);
609 if (!self)
610 return;
611
612 // Execute
613 CefWindowCppToC::Get(self)->RemoveAccelerator(command_id);
614 }
615
window_remove_all_accelerators(struct _cef_window_t * self)616 void CEF_CALLBACK window_remove_all_accelerators(struct _cef_window_t* self) {
617 shutdown_checker::AssertNotShutdown();
618
619 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
620
621 DCHECK(self);
622 if (!self)
623 return;
624
625 // Execute
626 CefWindowCppToC::Get(self)->RemoveAllAccelerators();
627 }
628
window_as_window(struct _cef_panel_t * self)629 struct _cef_window_t* CEF_CALLBACK window_as_window(struct _cef_panel_t* self) {
630 shutdown_checker::AssertNotShutdown();
631
632 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
633
634 DCHECK(self);
635 if (!self)
636 return NULL;
637
638 // Execute
639 CefRefPtr<CefWindow> _retval =
640 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->AsWindow();
641
642 // Return type: refptr_same
643 return CefWindowCppToC::Wrap(_retval);
644 }
645
646 cef_fill_layout_t* CEF_CALLBACK
window_set_to_fill_layout(struct _cef_panel_t * self)647 window_set_to_fill_layout(struct _cef_panel_t* self) {
648 shutdown_checker::AssertNotShutdown();
649
650 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
651
652 DCHECK(self);
653 if (!self)
654 return NULL;
655
656 // Execute
657 CefRefPtr<CefFillLayout> _retval =
658 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
659 ->SetToFillLayout();
660
661 // Return type: refptr_same
662 return CefFillLayoutCppToC::Wrap(_retval);
663 }
664
665 cef_box_layout_t* CEF_CALLBACK
window_set_to_box_layout(struct _cef_panel_t * self,const struct _cef_box_layout_settings_t * settings)666 window_set_to_box_layout(struct _cef_panel_t* self,
667 const struct _cef_box_layout_settings_t* settings) {
668 shutdown_checker::AssertNotShutdown();
669
670 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
671
672 DCHECK(self);
673 if (!self)
674 return NULL;
675 // Verify param: settings; type: struct_byref_const
676 DCHECK(settings);
677 if (!settings)
678 return NULL;
679
680 // Translate param: settings; type: struct_byref_const
681 CefBoxLayoutSettings settingsObj;
682 if (settings)
683 settingsObj.Set(*settings, false);
684
685 // Execute
686 CefRefPtr<CefBoxLayout> _retval =
687 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
688 ->SetToBoxLayout(settingsObj);
689
690 // Return type: refptr_same
691 return CefBoxLayoutCppToC::Wrap(_retval);
692 }
693
window_get_layout(struct _cef_panel_t * self)694 cef_layout_t* CEF_CALLBACK window_get_layout(struct _cef_panel_t* self) {
695 shutdown_checker::AssertNotShutdown();
696
697 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
698
699 DCHECK(self);
700 if (!self)
701 return NULL;
702
703 // Execute
704 CefRefPtr<CefLayout> _retval =
705 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->GetLayout();
706
707 // Return type: refptr_same
708 return CefLayoutCppToC::Wrap(_retval);
709 }
710
window_layout(struct _cef_panel_t * self)711 void CEF_CALLBACK window_layout(struct _cef_panel_t* self) {
712 shutdown_checker::AssertNotShutdown();
713
714 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
715
716 DCHECK(self);
717 if (!self)
718 return;
719
720 // Execute
721 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->Layout();
722 }
723
window_add_child_view(struct _cef_panel_t * self,cef_view_t * view)724 void CEF_CALLBACK window_add_child_view(struct _cef_panel_t* self,
725 cef_view_t* view) {
726 shutdown_checker::AssertNotShutdown();
727
728 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
729
730 DCHECK(self);
731 if (!self)
732 return;
733 // Verify param: view; type: refptr_same
734 DCHECK(view);
735 if (!view)
736 return;
737
738 // Execute
739 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
740 ->AddChildView(CefViewCppToC::Unwrap(view));
741 }
742
window_add_child_view_at(struct _cef_panel_t * self,cef_view_t * view,int index)743 void CEF_CALLBACK window_add_child_view_at(struct _cef_panel_t* self,
744 cef_view_t* view,
745 int index) {
746 shutdown_checker::AssertNotShutdown();
747
748 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
749
750 DCHECK(self);
751 if (!self)
752 return;
753 // Verify param: view; type: refptr_same
754 DCHECK(view);
755 if (!view)
756 return;
757 // Verify param: index; type: simple_byval
758 DCHECK_GE(index, 0);
759 if (index < 0)
760 return;
761
762 // Execute
763 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
764 ->AddChildViewAt(CefViewCppToC::Unwrap(view), index);
765 }
766
window_reorder_child_view(struct _cef_panel_t * self,cef_view_t * view,int index)767 void CEF_CALLBACK window_reorder_child_view(struct _cef_panel_t* self,
768 cef_view_t* view,
769 int index) {
770 shutdown_checker::AssertNotShutdown();
771
772 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
773
774 DCHECK(self);
775 if (!self)
776 return;
777 // Verify param: view; type: refptr_same
778 DCHECK(view);
779 if (!view)
780 return;
781
782 // Execute
783 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
784 ->ReorderChildView(CefViewCppToC::Unwrap(view), index);
785 }
786
window_remove_child_view(struct _cef_panel_t * self,cef_view_t * view)787 void CEF_CALLBACK window_remove_child_view(struct _cef_panel_t* self,
788 cef_view_t* view) {
789 shutdown_checker::AssertNotShutdown();
790
791 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
792
793 DCHECK(self);
794 if (!self)
795 return;
796 // Verify param: view; type: refptr_same
797 DCHECK(view);
798 if (!view)
799 return;
800
801 // Execute
802 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
803 ->RemoveChildView(CefViewCppToC::Unwrap(view));
804 }
805
window_remove_all_child_views(struct _cef_panel_t * self)806 void CEF_CALLBACK window_remove_all_child_views(struct _cef_panel_t* self) {
807 shutdown_checker::AssertNotShutdown();
808
809 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
810
811 DCHECK(self);
812 if (!self)
813 return;
814
815 // Execute
816 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
817 ->RemoveAllChildViews();
818 }
819
window_get_child_view_count(struct _cef_panel_t * self)820 size_t CEF_CALLBACK window_get_child_view_count(struct _cef_panel_t* self) {
821 shutdown_checker::AssertNotShutdown();
822
823 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
824
825 DCHECK(self);
826 if (!self)
827 return 0;
828
829 // Execute
830 size_t _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
831 ->GetChildViewCount();
832
833 // Return type: simple
834 return _retval;
835 }
836
window_get_child_view_at(struct _cef_panel_t * self,int index)837 cef_view_t* CEF_CALLBACK window_get_child_view_at(struct _cef_panel_t* self,
838 int index) {
839 shutdown_checker::AssertNotShutdown();
840
841 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
842
843 DCHECK(self);
844 if (!self)
845 return NULL;
846 // Verify param: index; type: simple_byval
847 DCHECK_GE(index, 0);
848 if (index < 0)
849 return NULL;
850
851 // Execute
852 CefRefPtr<CefView> _retval =
853 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
854 ->GetChildViewAt(index);
855
856 // Return type: refptr_same
857 return CefViewCppToC::Wrap(_retval);
858 }
859
860 cef_browser_view_t* CEF_CALLBACK
window_as_browser_view(struct _cef_view_t * self)861 window_as_browser_view(struct _cef_view_t* self) {
862 shutdown_checker::AssertNotShutdown();
863
864 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
865
866 DCHECK(self);
867 if (!self)
868 return NULL;
869
870 // Execute
871 CefRefPtr<CefBrowserView> _retval =
872 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
873 ->AsBrowserView();
874
875 // Return type: refptr_same
876 return CefBrowserViewCppToC::Wrap(_retval);
877 }
878
window_as_button(struct _cef_view_t * self)879 cef_button_t* CEF_CALLBACK window_as_button(struct _cef_view_t* self) {
880 shutdown_checker::AssertNotShutdown();
881
882 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
883
884 DCHECK(self);
885 if (!self)
886 return NULL;
887
888 // Execute
889 CefRefPtr<CefButton> _retval =
890 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->AsButton();
891
892 // Return type: refptr_same
893 return CefButtonCppToC::Wrap(_retval);
894 }
895
window_as_panel(struct _cef_view_t * self)896 cef_panel_t* CEF_CALLBACK window_as_panel(struct _cef_view_t* self) {
897 shutdown_checker::AssertNotShutdown();
898
899 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
900
901 DCHECK(self);
902 if (!self)
903 return NULL;
904
905 // Execute
906 CefRefPtr<CefPanel> _retval =
907 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->AsPanel();
908
909 // Return type: refptr_same
910 return CefPanelCppToC::Wrap(_retval);
911 }
912
913 cef_scroll_view_t* CEF_CALLBACK
window_as_scroll_view(struct _cef_view_t * self)914 window_as_scroll_view(struct _cef_view_t* self) {
915 shutdown_checker::AssertNotShutdown();
916
917 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
918
919 DCHECK(self);
920 if (!self)
921 return NULL;
922
923 // Execute
924 CefRefPtr<CefScrollView> _retval =
925 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
926 ->AsScrollView();
927
928 // Return type: refptr_same
929 return CefScrollViewCppToC::Wrap(_retval);
930 }
931
window_as_textfield(struct _cef_view_t * self)932 cef_textfield_t* CEF_CALLBACK window_as_textfield(struct _cef_view_t* self) {
933 shutdown_checker::AssertNotShutdown();
934
935 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
936
937 DCHECK(self);
938 if (!self)
939 return NULL;
940
941 // Execute
942 CefRefPtr<CefTextfield> _retval =
943 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
944 ->AsTextfield();
945
946 // Return type: refptr_same
947 return CefTextfieldCppToC::Wrap(_retval);
948 }
949
950 cef_string_userfree_t CEF_CALLBACK
window_get_type_string(struct _cef_view_t * self)951 window_get_type_string(struct _cef_view_t* self) {
952 shutdown_checker::AssertNotShutdown();
953
954 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
955
956 DCHECK(self);
957 if (!self)
958 return NULL;
959
960 // Execute
961 CefString _retval =
962 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
963 ->GetTypeString();
964
965 // Return type: string
966 return _retval.DetachToUserFree();
967 }
968
window_to_string(struct _cef_view_t * self,int include_children)969 cef_string_userfree_t CEF_CALLBACK window_to_string(struct _cef_view_t* self,
970 int include_children) {
971 shutdown_checker::AssertNotShutdown();
972
973 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
974
975 DCHECK(self);
976 if (!self)
977 return NULL;
978
979 // Execute
980 CefString _retval =
981 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
982 ->ToString(include_children ? true : false);
983
984 // Return type: string
985 return _retval.DetachToUserFree();
986 }
987
window_is_valid(struct _cef_view_t * self)988 int CEF_CALLBACK window_is_valid(struct _cef_view_t* self) {
989 shutdown_checker::AssertNotShutdown();
990
991 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
992
993 DCHECK(self);
994 if (!self)
995 return 0;
996
997 // Execute
998 bool _retval =
999 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->IsValid();
1000
1001 // Return type: bool
1002 return _retval;
1003 }
1004
window_is_attached(struct _cef_view_t * self)1005 int CEF_CALLBACK window_is_attached(struct _cef_view_t* self) {
1006 shutdown_checker::AssertNotShutdown();
1007
1008 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1009
1010 DCHECK(self);
1011 if (!self)
1012 return 0;
1013
1014 // Execute
1015 bool _retval =
1016 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->IsAttached();
1017
1018 // Return type: bool
1019 return _retval;
1020 }
1021
window_is_same(struct _cef_view_t * self,cef_view_t * that)1022 int CEF_CALLBACK window_is_same(struct _cef_view_t* self, cef_view_t* that) {
1023 shutdown_checker::AssertNotShutdown();
1024
1025 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1026
1027 DCHECK(self);
1028 if (!self)
1029 return 0;
1030 // Verify param: that; type: refptr_same
1031 DCHECK(that);
1032 if (!that)
1033 return 0;
1034
1035 // Execute
1036 bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1037 ->IsSame(CefViewCppToC::Unwrap(that));
1038
1039 // Return type: bool
1040 return _retval;
1041 }
1042
1043 cef_view_delegate_t* CEF_CALLBACK
window_get_delegate(struct _cef_view_t * self)1044 window_get_delegate(struct _cef_view_t* self) {
1045 shutdown_checker::AssertNotShutdown();
1046
1047 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1048
1049 DCHECK(self);
1050 if (!self)
1051 return NULL;
1052
1053 // Execute
1054 CefRefPtr<CefViewDelegate> _retval =
1055 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1056 ->GetDelegate();
1057
1058 // Return type: refptr_diff
1059 return CefViewDelegateCToCpp::Unwrap(_retval);
1060 }
1061
window_get_window(struct _cef_view_t * self)1062 struct _cef_window_t* CEF_CALLBACK window_get_window(struct _cef_view_t* self) {
1063 shutdown_checker::AssertNotShutdown();
1064
1065 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1066
1067 DCHECK(self);
1068 if (!self)
1069 return NULL;
1070
1071 // Execute
1072 CefRefPtr<CefWindow> _retval =
1073 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->GetWindow();
1074
1075 // Return type: refptr_same
1076 return CefWindowCppToC::Wrap(_retval);
1077 }
1078
window_get_id(struct _cef_view_t * self)1079 int CEF_CALLBACK window_get_id(struct _cef_view_t* self) {
1080 shutdown_checker::AssertNotShutdown();
1081
1082 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1083
1084 DCHECK(self);
1085 if (!self)
1086 return 0;
1087
1088 // Execute
1089 int _retval =
1090 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->GetID();
1091
1092 // Return type: simple
1093 return _retval;
1094 }
1095
window_set_id(struct _cef_view_t * self,int id)1096 void CEF_CALLBACK window_set_id(struct _cef_view_t* self, int id) {
1097 shutdown_checker::AssertNotShutdown();
1098
1099 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1100
1101 DCHECK(self);
1102 if (!self)
1103 return;
1104
1105 // Execute
1106 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->SetID(id);
1107 }
1108
window_get_group_id(struct _cef_view_t * self)1109 int CEF_CALLBACK window_get_group_id(struct _cef_view_t* self) {
1110 shutdown_checker::AssertNotShutdown();
1111
1112 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1113
1114 DCHECK(self);
1115 if (!self)
1116 return 0;
1117
1118 // Execute
1119 int _retval =
1120 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->GetGroupID();
1121
1122 // Return type: simple
1123 return _retval;
1124 }
1125
window_set_group_id(struct _cef_view_t * self,int group_id)1126 void CEF_CALLBACK window_set_group_id(struct _cef_view_t* self, int group_id) {
1127 shutdown_checker::AssertNotShutdown();
1128
1129 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1130
1131 DCHECK(self);
1132 if (!self)
1133 return;
1134
1135 // Execute
1136 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1137 ->SetGroupID(group_id);
1138 }
1139
window_get_parent_view(struct _cef_view_t * self)1140 cef_view_t* CEF_CALLBACK window_get_parent_view(struct _cef_view_t* self) {
1141 shutdown_checker::AssertNotShutdown();
1142
1143 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1144
1145 DCHECK(self);
1146 if (!self)
1147 return NULL;
1148
1149 // Execute
1150 CefRefPtr<CefView> _retval =
1151 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1152 ->GetParentView();
1153
1154 // Return type: refptr_same
1155 return CefViewCppToC::Wrap(_retval);
1156 }
1157
window_get_view_for_id(struct _cef_view_t * self,int id)1158 cef_view_t* CEF_CALLBACK window_get_view_for_id(struct _cef_view_t* self,
1159 int id) {
1160 shutdown_checker::AssertNotShutdown();
1161
1162 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1163
1164 DCHECK(self);
1165 if (!self)
1166 return NULL;
1167
1168 // Execute
1169 CefRefPtr<CefView> _retval =
1170 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1171 ->GetViewForID(id);
1172
1173 // Return type: refptr_same
1174 return CefViewCppToC::Wrap(_retval);
1175 }
1176
window_set_bounds(struct _cef_view_t * self,const cef_rect_t * bounds)1177 void CEF_CALLBACK window_set_bounds(struct _cef_view_t* self,
1178 const cef_rect_t* bounds) {
1179 shutdown_checker::AssertNotShutdown();
1180
1181 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1182
1183 DCHECK(self);
1184 if (!self)
1185 return;
1186 // Verify param: bounds; type: simple_byref_const
1187 DCHECK(bounds);
1188 if (!bounds)
1189 return;
1190
1191 // Translate param: bounds; type: simple_byref_const
1192 CefRect boundsVal = bounds ? *bounds : CefRect();
1193
1194 // Execute
1195 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1196 ->SetBounds(boundsVal);
1197 }
1198
window_get_bounds(struct _cef_view_t * self)1199 cef_rect_t CEF_CALLBACK window_get_bounds(struct _cef_view_t* self) {
1200 shutdown_checker::AssertNotShutdown();
1201
1202 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1203
1204 DCHECK(self);
1205 if (!self)
1206 return CefRect();
1207
1208 // Execute
1209 cef_rect_t _retval =
1210 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->GetBounds();
1211
1212 // Return type: simple
1213 return _retval;
1214 }
1215
window_get_bounds_in_screen(struct _cef_view_t * self)1216 cef_rect_t CEF_CALLBACK window_get_bounds_in_screen(struct _cef_view_t* self) {
1217 shutdown_checker::AssertNotShutdown();
1218
1219 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1220
1221 DCHECK(self);
1222 if (!self)
1223 return CefRect();
1224
1225 // Execute
1226 cef_rect_t _retval =
1227 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1228 ->GetBoundsInScreen();
1229
1230 // Return type: simple
1231 return _retval;
1232 }
1233
window_set_size(struct _cef_view_t * self,const cef_size_t * size)1234 void CEF_CALLBACK window_set_size(struct _cef_view_t* self,
1235 const cef_size_t* size) {
1236 shutdown_checker::AssertNotShutdown();
1237
1238 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1239
1240 DCHECK(self);
1241 if (!self)
1242 return;
1243 // Verify param: size; type: simple_byref_const
1244 DCHECK(size);
1245 if (!size)
1246 return;
1247
1248 // Translate param: size; type: simple_byref_const
1249 CefSize sizeVal = size ? *size : CefSize();
1250
1251 // Execute
1252 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->SetSize(sizeVal);
1253 }
1254
window_get_size(struct _cef_view_t * self)1255 cef_size_t CEF_CALLBACK window_get_size(struct _cef_view_t* self) {
1256 shutdown_checker::AssertNotShutdown();
1257
1258 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1259
1260 DCHECK(self);
1261 if (!self)
1262 return CefSize();
1263
1264 // Execute
1265 cef_size_t _retval =
1266 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->GetSize();
1267
1268 // Return type: simple
1269 return _retval;
1270 }
1271
window_set_position(struct _cef_view_t * self,const cef_point_t * position)1272 void CEF_CALLBACK window_set_position(struct _cef_view_t* self,
1273 const cef_point_t* position) {
1274 shutdown_checker::AssertNotShutdown();
1275
1276 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1277
1278 DCHECK(self);
1279 if (!self)
1280 return;
1281 // Verify param: position; type: simple_byref_const
1282 DCHECK(position);
1283 if (!position)
1284 return;
1285
1286 // Translate param: position; type: simple_byref_const
1287 CefPoint positionVal = position ? *position : CefPoint();
1288
1289 // Execute
1290 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1291 ->SetPosition(positionVal);
1292 }
1293
window_get_position(struct _cef_view_t * self)1294 cef_point_t CEF_CALLBACK window_get_position(struct _cef_view_t* self) {
1295 shutdown_checker::AssertNotShutdown();
1296
1297 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1298
1299 DCHECK(self);
1300 if (!self)
1301 return CefPoint();
1302
1303 // Execute
1304 cef_point_t _retval =
1305 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1306 ->GetPosition();
1307
1308 // Return type: simple
1309 return _retval;
1310 }
1311
window_get_preferred_size(struct _cef_view_t * self)1312 cef_size_t CEF_CALLBACK window_get_preferred_size(struct _cef_view_t* self) {
1313 shutdown_checker::AssertNotShutdown();
1314
1315 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1316
1317 DCHECK(self);
1318 if (!self)
1319 return CefSize();
1320
1321 // Execute
1322 cef_size_t _retval =
1323 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1324 ->GetPreferredSize();
1325
1326 // Return type: simple
1327 return _retval;
1328 }
1329
window_size_to_preferred_size(struct _cef_view_t * self)1330 void CEF_CALLBACK window_size_to_preferred_size(struct _cef_view_t* self) {
1331 shutdown_checker::AssertNotShutdown();
1332
1333 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1334
1335 DCHECK(self);
1336 if (!self)
1337 return;
1338
1339 // Execute
1340 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1341 ->SizeToPreferredSize();
1342 }
1343
window_get_minimum_size(struct _cef_view_t * self)1344 cef_size_t CEF_CALLBACK window_get_minimum_size(struct _cef_view_t* self) {
1345 shutdown_checker::AssertNotShutdown();
1346
1347 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1348
1349 DCHECK(self);
1350 if (!self)
1351 return CefSize();
1352
1353 // Execute
1354 cef_size_t _retval =
1355 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1356 ->GetMinimumSize();
1357
1358 // Return type: simple
1359 return _retval;
1360 }
1361
window_get_maximum_size(struct _cef_view_t * self)1362 cef_size_t CEF_CALLBACK window_get_maximum_size(struct _cef_view_t* self) {
1363 shutdown_checker::AssertNotShutdown();
1364
1365 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1366
1367 DCHECK(self);
1368 if (!self)
1369 return CefSize();
1370
1371 // Execute
1372 cef_size_t _retval =
1373 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1374 ->GetMaximumSize();
1375
1376 // Return type: simple
1377 return _retval;
1378 }
1379
window_get_height_for_width(struct _cef_view_t * self,int width)1380 int CEF_CALLBACK window_get_height_for_width(struct _cef_view_t* self,
1381 int width) {
1382 shutdown_checker::AssertNotShutdown();
1383
1384 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1385
1386 DCHECK(self);
1387 if (!self)
1388 return 0;
1389
1390 // Execute
1391 int _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1392 ->GetHeightForWidth(width);
1393
1394 // Return type: simple
1395 return _retval;
1396 }
1397
window_invalidate_layout(struct _cef_view_t * self)1398 void CEF_CALLBACK window_invalidate_layout(struct _cef_view_t* self) {
1399 shutdown_checker::AssertNotShutdown();
1400
1401 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1402
1403 DCHECK(self);
1404 if (!self)
1405 return;
1406
1407 // Execute
1408 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1409 ->InvalidateLayout();
1410 }
1411
window_set_visible(struct _cef_view_t * self,int visible)1412 void CEF_CALLBACK window_set_visible(struct _cef_view_t* self, int visible) {
1413 shutdown_checker::AssertNotShutdown();
1414
1415 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1416
1417 DCHECK(self);
1418 if (!self)
1419 return;
1420
1421 // Execute
1422 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1423 ->SetVisible(visible ? true : false);
1424 }
1425
window_is_visible(struct _cef_view_t * self)1426 int CEF_CALLBACK window_is_visible(struct _cef_view_t* self) {
1427 shutdown_checker::AssertNotShutdown();
1428
1429 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1430
1431 DCHECK(self);
1432 if (!self)
1433 return 0;
1434
1435 // Execute
1436 bool _retval =
1437 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->IsVisible();
1438
1439 // Return type: bool
1440 return _retval;
1441 }
1442
window_is_drawn(struct _cef_view_t * self)1443 int CEF_CALLBACK window_is_drawn(struct _cef_view_t* self) {
1444 shutdown_checker::AssertNotShutdown();
1445
1446 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1447
1448 DCHECK(self);
1449 if (!self)
1450 return 0;
1451
1452 // Execute
1453 bool _retval =
1454 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->IsDrawn();
1455
1456 // Return type: bool
1457 return _retval;
1458 }
1459
window_set_enabled(struct _cef_view_t * self,int enabled)1460 void CEF_CALLBACK window_set_enabled(struct _cef_view_t* self, int enabled) {
1461 shutdown_checker::AssertNotShutdown();
1462
1463 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1464
1465 DCHECK(self);
1466 if (!self)
1467 return;
1468
1469 // Execute
1470 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1471 ->SetEnabled(enabled ? true : false);
1472 }
1473
window_is_enabled(struct _cef_view_t * self)1474 int CEF_CALLBACK window_is_enabled(struct _cef_view_t* self) {
1475 shutdown_checker::AssertNotShutdown();
1476
1477 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1478
1479 DCHECK(self);
1480 if (!self)
1481 return 0;
1482
1483 // Execute
1484 bool _retval =
1485 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->IsEnabled();
1486
1487 // Return type: bool
1488 return _retval;
1489 }
1490
window_set_focusable(struct _cef_view_t * self,int focusable)1491 void CEF_CALLBACK window_set_focusable(struct _cef_view_t* self,
1492 int focusable) {
1493 shutdown_checker::AssertNotShutdown();
1494
1495 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1496
1497 DCHECK(self);
1498 if (!self)
1499 return;
1500
1501 // Execute
1502 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1503 ->SetFocusable(focusable ? true : false);
1504 }
1505
window_is_focusable(struct _cef_view_t * self)1506 int CEF_CALLBACK window_is_focusable(struct _cef_view_t* self) {
1507 shutdown_checker::AssertNotShutdown();
1508
1509 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1510
1511 DCHECK(self);
1512 if (!self)
1513 return 0;
1514
1515 // Execute
1516 bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1517 ->IsFocusable();
1518
1519 // Return type: bool
1520 return _retval;
1521 }
1522
window_is_accessibility_focusable(struct _cef_view_t * self)1523 int CEF_CALLBACK window_is_accessibility_focusable(struct _cef_view_t* self) {
1524 shutdown_checker::AssertNotShutdown();
1525
1526 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1527
1528 DCHECK(self);
1529 if (!self)
1530 return 0;
1531
1532 // Execute
1533 bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1534 ->IsAccessibilityFocusable();
1535
1536 // Return type: bool
1537 return _retval;
1538 }
1539
window_request_focus(struct _cef_view_t * self)1540 void CEF_CALLBACK window_request_focus(struct _cef_view_t* self) {
1541 shutdown_checker::AssertNotShutdown();
1542
1543 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1544
1545 DCHECK(self);
1546 if (!self)
1547 return;
1548
1549 // Execute
1550 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->RequestFocus();
1551 }
1552
window_set_background_color(struct _cef_view_t * self,cef_color_t color)1553 void CEF_CALLBACK window_set_background_color(struct _cef_view_t* self,
1554 cef_color_t color) {
1555 shutdown_checker::AssertNotShutdown();
1556
1557 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1558
1559 DCHECK(self);
1560 if (!self)
1561 return;
1562
1563 // Execute
1564 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1565 ->SetBackgroundColor(color);
1566 }
1567
window_get_background_color(struct _cef_view_t * self)1568 cef_color_t CEF_CALLBACK window_get_background_color(struct _cef_view_t* self) {
1569 shutdown_checker::AssertNotShutdown();
1570
1571 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1572
1573 DCHECK(self);
1574 if (!self)
1575 return 0;
1576
1577 // Execute
1578 cef_color_t _retval =
1579 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1580 ->GetBackgroundColor();
1581
1582 // Return type: simple
1583 return _retval;
1584 }
1585
window_convert_point_to_screen(struct _cef_view_t * self,cef_point_t * point)1586 int CEF_CALLBACK window_convert_point_to_screen(struct _cef_view_t* self,
1587 cef_point_t* point) {
1588 shutdown_checker::AssertNotShutdown();
1589
1590 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1591
1592 DCHECK(self);
1593 if (!self)
1594 return 0;
1595 // Verify param: point; type: simple_byref
1596 DCHECK(point);
1597 if (!point)
1598 return 0;
1599
1600 // Translate param: point; type: simple_byref
1601 CefPoint pointVal = point ? *point : CefPoint();
1602
1603 // Execute
1604 bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1605 ->ConvertPointToScreen(pointVal);
1606
1607 // Restore param: point; type: simple_byref
1608 if (point)
1609 *point = pointVal;
1610
1611 // Return type: bool
1612 return _retval;
1613 }
1614
window_convert_point_from_screen(struct _cef_view_t * self,cef_point_t * point)1615 int CEF_CALLBACK window_convert_point_from_screen(struct _cef_view_t* self,
1616 cef_point_t* point) {
1617 shutdown_checker::AssertNotShutdown();
1618
1619 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1620
1621 DCHECK(self);
1622 if (!self)
1623 return 0;
1624 // Verify param: point; type: simple_byref
1625 DCHECK(point);
1626 if (!point)
1627 return 0;
1628
1629 // Translate param: point; type: simple_byref
1630 CefPoint pointVal = point ? *point : CefPoint();
1631
1632 // Execute
1633 bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1634 ->ConvertPointFromScreen(pointVal);
1635
1636 // Restore param: point; type: simple_byref
1637 if (point)
1638 *point = pointVal;
1639
1640 // Return type: bool
1641 return _retval;
1642 }
1643
window_convert_point_to_window(struct _cef_view_t * self,cef_point_t * point)1644 int CEF_CALLBACK window_convert_point_to_window(struct _cef_view_t* self,
1645 cef_point_t* point) {
1646 shutdown_checker::AssertNotShutdown();
1647
1648 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1649
1650 DCHECK(self);
1651 if (!self)
1652 return 0;
1653 // Verify param: point; type: simple_byref
1654 DCHECK(point);
1655 if (!point)
1656 return 0;
1657
1658 // Translate param: point; type: simple_byref
1659 CefPoint pointVal = point ? *point : CefPoint();
1660
1661 // Execute
1662 bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1663 ->ConvertPointToWindow(pointVal);
1664
1665 // Restore param: point; type: simple_byref
1666 if (point)
1667 *point = pointVal;
1668
1669 // Return type: bool
1670 return _retval;
1671 }
1672
window_convert_point_from_window(struct _cef_view_t * self,cef_point_t * point)1673 int CEF_CALLBACK window_convert_point_from_window(struct _cef_view_t* self,
1674 cef_point_t* point) {
1675 shutdown_checker::AssertNotShutdown();
1676
1677 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1678
1679 DCHECK(self);
1680 if (!self)
1681 return 0;
1682 // Verify param: point; type: simple_byref
1683 DCHECK(point);
1684 if (!point)
1685 return 0;
1686
1687 // Translate param: point; type: simple_byref
1688 CefPoint pointVal = point ? *point : CefPoint();
1689
1690 // Execute
1691 bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1692 ->ConvertPointFromWindow(pointVal);
1693
1694 // Restore param: point; type: simple_byref
1695 if (point)
1696 *point = pointVal;
1697
1698 // Return type: bool
1699 return _retval;
1700 }
1701
window_convert_point_to_view(struct _cef_view_t * self,cef_view_t * view,cef_point_t * point)1702 int CEF_CALLBACK window_convert_point_to_view(struct _cef_view_t* self,
1703 cef_view_t* view,
1704 cef_point_t* point) {
1705 shutdown_checker::AssertNotShutdown();
1706
1707 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1708
1709 DCHECK(self);
1710 if (!self)
1711 return 0;
1712 // Verify param: view; type: refptr_same
1713 DCHECK(view);
1714 if (!view)
1715 return 0;
1716 // Verify param: point; type: simple_byref
1717 DCHECK(point);
1718 if (!point)
1719 return 0;
1720
1721 // Translate param: point; type: simple_byref
1722 CefPoint pointVal = point ? *point : CefPoint();
1723
1724 // Execute
1725 bool _retval =
1726 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1727 ->ConvertPointToView(CefViewCppToC::Unwrap(view), pointVal);
1728
1729 // Restore param: point; type: simple_byref
1730 if (point)
1731 *point = pointVal;
1732
1733 // Return type: bool
1734 return _retval;
1735 }
1736
window_convert_point_from_view(struct _cef_view_t * self,cef_view_t * view,cef_point_t * point)1737 int CEF_CALLBACK window_convert_point_from_view(struct _cef_view_t* self,
1738 cef_view_t* view,
1739 cef_point_t* point) {
1740 shutdown_checker::AssertNotShutdown();
1741
1742 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1743
1744 DCHECK(self);
1745 if (!self)
1746 return 0;
1747 // Verify param: view; type: refptr_same
1748 DCHECK(view);
1749 if (!view)
1750 return 0;
1751 // Verify param: point; type: simple_byref
1752 DCHECK(point);
1753 if (!point)
1754 return 0;
1755
1756 // Translate param: point; type: simple_byref
1757 CefPoint pointVal = point ? *point : CefPoint();
1758
1759 // Execute
1760 bool _retval =
1761 CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
1762 ->ConvertPointFromView(CefViewCppToC::Unwrap(view), pointVal);
1763
1764 // Restore param: point; type: simple_byref
1765 if (point)
1766 *point = pointVal;
1767
1768 // Return type: bool
1769 return _retval;
1770 }
1771
1772 } // namespace
1773
1774 // CONSTRUCTOR - Do not edit by hand.
1775
CefWindowCppToC()1776 CefWindowCppToC::CefWindowCppToC() {
1777 GetStruct()->show = window_show;
1778 GetStruct()->hide = window_hide;
1779 GetStruct()->center_window = window_center_window;
1780 GetStruct()->close = window_close;
1781 GetStruct()->is_closed = window_is_closed;
1782 GetStruct()->activate = window_activate;
1783 GetStruct()->deactivate = window_deactivate;
1784 GetStruct()->is_active = window_is_active;
1785 GetStruct()->bring_to_top = window_bring_to_top;
1786 GetStruct()->set_always_on_top = window_set_always_on_top;
1787 GetStruct()->is_always_on_top = window_is_always_on_top;
1788 GetStruct()->maximize = window_maximize;
1789 GetStruct()->minimize = window_minimize;
1790 GetStruct()->restore = window_restore;
1791 GetStruct()->set_fullscreen = window_set_fullscreen;
1792 GetStruct()->is_maximized = window_is_maximized;
1793 GetStruct()->is_minimized = window_is_minimized;
1794 GetStruct()->is_fullscreen = window_is_fullscreen;
1795 GetStruct()->set_title = window_set_title;
1796 GetStruct()->get_title = window_get_title;
1797 GetStruct()->set_window_icon = window_set_window_icon;
1798 GetStruct()->get_window_icon = window_get_window_icon;
1799 GetStruct()->set_window_app_icon = window_set_window_app_icon;
1800 GetStruct()->get_window_app_icon = window_get_window_app_icon;
1801 GetStruct()->show_menu = window_show_menu;
1802 GetStruct()->cancel_menu = window_cancel_menu;
1803 GetStruct()->get_display = window_get_display;
1804 GetStruct()->get_client_area_bounds_in_screen =
1805 window_get_client_area_bounds_in_screen;
1806 GetStruct()->set_draggable_regions = window_set_draggable_regions;
1807 GetStruct()->get_window_handle = window_get_window_handle;
1808 GetStruct()->send_key_press = window_send_key_press;
1809 GetStruct()->send_mouse_move = window_send_mouse_move;
1810 GetStruct()->send_mouse_events = window_send_mouse_events;
1811 GetStruct()->set_accelerator = window_set_accelerator;
1812 GetStruct()->remove_accelerator = window_remove_accelerator;
1813 GetStruct()->remove_all_accelerators = window_remove_all_accelerators;
1814 GetStruct()->base.as_window = window_as_window;
1815 GetStruct()->base.set_to_fill_layout = window_set_to_fill_layout;
1816 GetStruct()->base.set_to_box_layout = window_set_to_box_layout;
1817 GetStruct()->base.get_layout = window_get_layout;
1818 GetStruct()->base.layout = window_layout;
1819 GetStruct()->base.add_child_view = window_add_child_view;
1820 GetStruct()->base.add_child_view_at = window_add_child_view_at;
1821 GetStruct()->base.reorder_child_view = window_reorder_child_view;
1822 GetStruct()->base.remove_child_view = window_remove_child_view;
1823 GetStruct()->base.remove_all_child_views = window_remove_all_child_views;
1824 GetStruct()->base.get_child_view_count = window_get_child_view_count;
1825 GetStruct()->base.get_child_view_at = window_get_child_view_at;
1826 GetStruct()->base.base.as_browser_view = window_as_browser_view;
1827 GetStruct()->base.base.as_button = window_as_button;
1828 GetStruct()->base.base.as_panel = window_as_panel;
1829 GetStruct()->base.base.as_scroll_view = window_as_scroll_view;
1830 GetStruct()->base.base.as_textfield = window_as_textfield;
1831 GetStruct()->base.base.get_type_string = window_get_type_string;
1832 GetStruct()->base.base.to_string = window_to_string;
1833 GetStruct()->base.base.is_valid = window_is_valid;
1834 GetStruct()->base.base.is_attached = window_is_attached;
1835 GetStruct()->base.base.is_same = window_is_same;
1836 GetStruct()->base.base.get_delegate = window_get_delegate;
1837 GetStruct()->base.base.get_window = window_get_window;
1838 GetStruct()->base.base.get_id = window_get_id;
1839 GetStruct()->base.base.set_id = window_set_id;
1840 GetStruct()->base.base.get_group_id = window_get_group_id;
1841 GetStruct()->base.base.set_group_id = window_set_group_id;
1842 GetStruct()->base.base.get_parent_view = window_get_parent_view;
1843 GetStruct()->base.base.get_view_for_id = window_get_view_for_id;
1844 GetStruct()->base.base.set_bounds = window_set_bounds;
1845 GetStruct()->base.base.get_bounds = window_get_bounds;
1846 GetStruct()->base.base.get_bounds_in_screen = window_get_bounds_in_screen;
1847 GetStruct()->base.base.set_size = window_set_size;
1848 GetStruct()->base.base.get_size = window_get_size;
1849 GetStruct()->base.base.set_position = window_set_position;
1850 GetStruct()->base.base.get_position = window_get_position;
1851 GetStruct()->base.base.get_preferred_size = window_get_preferred_size;
1852 GetStruct()->base.base.size_to_preferred_size = window_size_to_preferred_size;
1853 GetStruct()->base.base.get_minimum_size = window_get_minimum_size;
1854 GetStruct()->base.base.get_maximum_size = window_get_maximum_size;
1855 GetStruct()->base.base.get_height_for_width = window_get_height_for_width;
1856 GetStruct()->base.base.invalidate_layout = window_invalidate_layout;
1857 GetStruct()->base.base.set_visible = window_set_visible;
1858 GetStruct()->base.base.is_visible = window_is_visible;
1859 GetStruct()->base.base.is_drawn = window_is_drawn;
1860 GetStruct()->base.base.set_enabled = window_set_enabled;
1861 GetStruct()->base.base.is_enabled = window_is_enabled;
1862 GetStruct()->base.base.set_focusable = window_set_focusable;
1863 GetStruct()->base.base.is_focusable = window_is_focusable;
1864 GetStruct()->base.base.is_accessibility_focusable =
1865 window_is_accessibility_focusable;
1866 GetStruct()->base.base.request_focus = window_request_focus;
1867 GetStruct()->base.base.set_background_color = window_set_background_color;
1868 GetStruct()->base.base.get_background_color = window_get_background_color;
1869 GetStruct()->base.base.convert_point_to_screen =
1870 window_convert_point_to_screen;
1871 GetStruct()->base.base.convert_point_from_screen =
1872 window_convert_point_from_screen;
1873 GetStruct()->base.base.convert_point_to_window =
1874 window_convert_point_to_window;
1875 GetStruct()->base.base.convert_point_from_window =
1876 window_convert_point_from_window;
1877 GetStruct()->base.base.convert_point_to_view = window_convert_point_to_view;
1878 GetStruct()->base.base.convert_point_from_view =
1879 window_convert_point_from_view;
1880 }
1881
1882 // DESTRUCTOR - Do not edit by hand.
1883
~CefWindowCppToC()1884 CefWindowCppToC::~CefWindowCppToC() {
1885 shutdown_checker::AssertNotShutdown();
1886 }
1887
1888 template <>
1889 CefRefPtr<CefWindow>
UnwrapDerived(CefWrapperType type,cef_window_t * s)1890 CefCppToCRefCounted<CefWindowCppToC, CefWindow, cef_window_t>::UnwrapDerived(
1891 CefWrapperType type,
1892 cef_window_t* s) {
1893 NOTREACHED() << "Unexpected class type: " << type;
1894 return nullptr;
1895 }
1896
1897 template <>
1898 CefWrapperType CefCppToCRefCounted<CefWindowCppToC, CefWindow, cef_window_t>::
1899 kWrapperType = WT_WINDOW;
1900